Re: [sv-bc] A new proposal uploaded for issue 216

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Thu May 05 2005 - 13:53:43 PDT
Matt,

Is a compiler directive definitely sufficient in the presence of generate?
Compiler directives and macro extensions happen before generate unrolling,
so if

  `define INST(module,args) \
    module i``module```counter``args \
   `incr(counter,1)

  `define GEN GEN```counter

and then

   for (genvar I = 0; I < 8; I++) begin : `GEN
     `INST(this_mod,(out[I],in[I]))
   end

   for (genvar I = 0; I < 8; I++) begin : `GEN
     `INST(that_mod,(out[I],in[I]))
   end

the instance names are

   GEN0[0].i_this_mod0
   GEN0[1].i_this_mod0
        ...
   GEN0[7].i_this_mod0

and

   GEN1[0].i_that_mod1
   GEN1[1].i_that_mod1
        ...
   GEN1[7].i_that_mod1

Is that definitely going to be sufficient?

If there were instead a system function as originally requested, then
the localparam values corresponding to the unrolled genvars would still
be available during generate unrolling. On the other hand, those values
are there in the generated names already. 

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of
Maidment, Matthew R
Sent: Thursday, May 05, 2005 4:07 AM
To: Gordon Vreugdenhil; Greg Jaxon
Cc: Rich, Dave; sv-bc@eda.org
Subject: RE: [sv-bc] A new proposal uploaded for issue 216


>-----Original Message-----
>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On 
>Behalf Of Gordon Vreugdenhil
>Sent: Tuesday, May 03, 2005 1:01 PM
>To: Greg Jaxon
>Cc: Rich, Dave; sv-bc@eda.org
>Subject: Re: [sv-bc] A new proposal uploaded for issue 216
>
>
>
>
>Still, is there any good reason for not making this look like 
>a normal macro invocation?  If we don't do that, all 
>occurrences will have to be on separate lines (was that the intent?).

I was trying to model it after `define by starting from this:

`define a 1
`define a a+1

and moving to

`incr a
`incr a 1

I'm open to making it look like any other macro call (e.g
`incr(macro,val) )
as long as it delivers the desired semantics.

Matt
--
Matt Maidment
mmaidmen@ichips.intel.com
 
Received on Thu May 5 13:53:46 2005

This archive was generated by hypermail 2.1.8 : Thu May 05 2005 - 13:53:55 PDT