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

From: Steven Sharp <sharp_at_.....>
Date: Wed Jul 26 2006 - 17:59:47 PDT
>From: "Brad Pierce" <Brad.Pierce@synopsys.com>

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

I agree that it is useless.  But the capability falls out naturally
once you provide the implicit localparam.  Why would you go to extra
effort to forbid it, and make it inconsistent with every other
localparam in that scope?

Also, while it is silly and no human would do it, there are always
automated tools that blindly generate code.  If some tool generates
a hierarchical reference to that localparam, why not let it work the
way you would expect?  Why make the tool jump through hoops because
you think the code it is generating looks silly?  What harm does it
do to allow it?

>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"

Agreed.  You already said integer, and all genvars are that type.

If we add a generate foreach, and that behaves like a behavioral foreach,
with the loop index being a type appropriate to an array index, then we
might have to allow different types of genvars.

Steven Sharp
sharp@cadence.com
Received on Wed Jul 26 17:59:51 2006

This archive was generated by hypermail 2.1.8 : Wed Jul 26 2006 - 17:59:57 PDT