Hi Brad, Yes, the first example is currently illegal. This is the point of this proposal. It would add elaboration_system_task to the list of module_common_item so that the first example would be legal. In that context, the $error system task would be executed during elaboration. In this way errors relating to invalid parameter values would be flagged early. Tom Brad Pierce wrote: > Tom, > > You can't generate a statement, the following is illegal -- > > module test #(N=12) (input [N-1:0] in, output [N-1:0] out); > if ((N < 1) || (N > 8)) // conditional generate construct > $error("Parameter N has an invalid value of %0d", N); > assign out = in; > endmodule > > It would need to be, say > > module test #(N=12) (input [N-1:0] in, output [N-1:0] out); > if ((N < 1) || (N > 8)) // conditional generate construct > initial $error("Parameter N has an invalid value of %0d", N); > assign out = in; > endmodule > > -- Brad > > -----Original Message----- > From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of > Thomas Thatcher > Sent: Friday, February 22, 2008 9:38 AM > To: Thomas.Thatcher@sun.com > Cc: john.havlicek@freescale.com; sv-ac@eda.org > Subject: Re: [sv-ac] call to vote on 1769 > > OK, I found it. *conditional_generate_construct* allows this syntax. > > I vote yes on 1769 > > Tom > > Thomas Thatcher wrote: >> Hello Everyone, >> >> I have question on 1769: Are *if* constructs already allowed outside > >> of procedures in the standard? >> >> The proposal for 1769 only defines the elaboration time system tasks. >> But the examples assume that the *if* construct is already allowed >> outside a procedure. If this is the case, we are fine, but otherwise >> we would have some more work on this. >> >> Can someone point me to the place in Draft 4 (or the Mantis item) >> which allows this? >> >> Thanks, >> >> Tom >> >> John Havlicek wrote: >>> Hi Folks: >>> >>> This is the call to vote on the revised proposal for 1769. >>> The document on Mantis is >>> >>> 1769_ElaborationTimeUserAssert.080221.pdf >>> >>> See details below. >>> >>> J.H. >>> >>> --------------------------------------------------------------------- >>> ------------- >>> >>> Ballot on Mantis 1769 >>> >>> - Called on 2008-02-21, final ballots due by 2008-02-24 T > 23:59-08:00. >>> - Please ensure that John Havlicek receives your ballot. >>> >>> v[x-xxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx-xx] Doron >>> Bustan (Intel) >>> v[xxxxxxxxxx--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-x] Eduard >>> Cerny (Synopsys) >>> n[---------------------------x-xxx---------x-x-xxx-x---x] Surrendra >>> Dudani (Synopsys) >>> v[xxx-xxxxxxxxx-xxxxxx-xxxxxxxxx-xx-xxxxx-xxx-xxx-------] Yaniv Fais >>> (Freescale) >>> t[xxxxxxxxx--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] John >>> Havlicek (Freescale - Chair) >>> v[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrxxxxxxxxxxxxx-xxx] Dmitry >>> Korchemny (Intel - Co-Chair) >>> v[-xxxxxxxxx-xxxxxxxxx-xxx-x--xx--xxxxx----------xx-xxxx] Manisha >>> Kulshrestha (Mentor Graphics) >>> n[--x-x-------------------------------------------------] Ah-Lam Lee >>> (Qualcomm) >>> n[-----------------------------------xxxxx-------x-xx-x-] Jiang Long > >>> (Mentor Graphics) >>> n[--------------x------------x--xxx.....................] Joseph Lu >>> (Altera) >>> v[x-x--xxxxxxxxxxxxxxxxxxx..............................] Johan >>> Martensson (Jasper) >>> n[--------------------------------x--x-xx--xx-xxxxxxx-x-] Hillel >>> Miller (Freescale) >>> v[xxxxxxxxxx-xxxx-xxxxxxxxxxxxxxxxxxx-xxxxxxxx-xxxxxxxxx] Lisa Piper >>> (Cadence) >>> v[-xxxxxxxxxx-x-x-xx-xxxxxxx-x-xxxxx-x..................] Erik >>> Seligman (Intel) >>> n[------------x-x----x--------xxxx-----xxxx-xx----------] Tej Singh >>> (Mentor Graphics) >>> v[-xxx-xxxxxx-x-xxxxxx--xxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxx] Bassam >>> Tabbara (Synopsys) >>> v[xxxxxxxxxxxxxx-xxxxxxxxxxxxx-xxxxxxxxxx...............] Tom >>> Thatcher (Sun Microsystems) >>> |------------------------------------------------------ attendance > >>> on 2008-02-19 >>> |-------------------------------------------------------- voting >>> eligibility for this ballot >>> |--------------------------------------------------------- e-mail >>> votes received >>> >>> Legend: >>> x = attended >>> - = missed >>> r = represented >>> . = not yet a member >>> v = valid voter (2 out of last 3 or 3/4 overall) >>> n = not a valid voter >>> t = chair eligible to vote only to make or break a >>> tie >>> > > -- > This message has been scanned for viruses and dangerous content by > MailScanner, and is believed to be clean. > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Fri Feb 22 10:45:22 2008
This archive was generated by hypermail 2.1.8 : Fri Feb 22 2008 - 10:46:02 PST