Dave's example demonstrates a concern I have about the proposal. Since 'incr is defined with an *optional* increment step, how does `incr NC \ var my_var``NC; \ parse? It should be an error since "var" is not an integer. Why not make `incr have arguments and appear like a normal macro? ie. `incr(NC,1) That should avoid any parse issues. I could even live with the second argument being optional, but the parens should be there. Another issue is that `incr, although a nice name, may not be a good choice in terms of potential conflicts with user code. How about `builtin_incr(<name>, <value>) ? Definitely more verbose (sorry Cliff) but less likely to pose problems. Gord. Rich, Dave wrote: > Brad, > > > > In the sentences with "simple decimal number with no size or base format > and no unknown or three-state digits", you left out '?' and '_' > > > > Why not just say "simple decimal number". A simple decimal number takes > care of excluding a size, radix, and 'xz?_'. > > > > You may want to add a note in the 'generate for' example that says that > the 'incr directive only increments NC once because it is only read by > the compiler once. Or you could enclose the example in the body of a > text macro that will differentiate the text macro substitution from > elaboration process. > > > > and the following declares four variables GEN1[0].my_var1, > GEN1[1].my_var1, GEN2[0].my_var2, and GEN2[1].my_var2. > > > > `define NC 0 > > `define twovar(name) \ > > for (genvar I = 0; I < 2; I++) begin:GEN``NC \ > > `incr NC \ > > var my_var``NC; \ > > end > > `twovar(my_var) > > `twovar(my_var) > > Dave > > > > > >> -----Original Message----- > >> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Brad > >> Pierce > >> Sent: Monday, May 02, 2005 5:43 PM > >> To: sv-bc@eda.org > >> Subject: [sv-bc] A new proposal uploaded for issue 216 > >> > >> A new proposal has been uploaded for P1800 ballot issue 216 -- > >> > >> http://www.eda.org/svdb/bug_view_page.php?bug_id=693 > >> > >> -- Brad > >> > >> > > > -- -------------------------------------------------------------------- Gordon Vreugdenhil, Staff Engineer 503-685-0808 Model Technology (Mentor Graphics) gordonv@model.comReceived on Tue May 3 07:38:43 2005
This archive was generated by hypermail 2.1.8 : Tue May 03 2005 - 07:38:47 PDT