[sv-bc] Hierarchical reference to implicit localparam in generate-for-loop

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Wed Jul 26 2006 - 17:02:24 PDT
According to 12.4.1 of IEEE Std 1364-2005, 

 

            "Within the generate block of a loop generate construct,
there is an implicit localparam declaration. This is an integer
parameter that has the same name and type as the loop index variable,
and its value within each instance of the generate block is the value of
the index variable at the time the instance was elaborated. This
parameter can be used anywhere within the generate block that a normal
parameter with an integer value can be used. It can be referenced with a
hierarchical name."

 

But you couldn't hierarchically reference the implicit parameter without
already knowing its value.  For example, if the genvar of for-loop GEN
were I, then the value of GEN[5].I would be 5.

 

So what's the point of allowing this?  Why not say "It cannot be
referenced with a hierarchical name."?

 

Also "and type" is redundant, and even confusing, in 

 

    "This is an integer parameter that has the same name and type as the
loop index variable"

 

-- Brad

 

 
Received on Wed Jul 26 17:02:45 2006

This archive was generated by hypermail 2.1.8 : Wed Jul 26 2006 - 17:03:00 PDT