Re: Fwd: Genvars only positive?

From: Paul Graham (pgraham@cadence.com)
Date: Tue Jul 10 2001 - 07:46:02 PDT


> > What about changing the definition of genvars from positive to unsigned (or
> > signed)?
>
> It's currently described as a non-negative integer.
> Making it unsigned would not help you.

You're right. Last time I checked it was still "positive".

> > That's far too vague. For instance, an array of regs can be referenced
> > using a variable index. Surely this is not allowed for an array of
> > instances.
>
> Why not ?

Because the instance could not be determined by the time simulation starts.
Imagine:

    mod u[1:0] (q, d);
    assign clk = #1 ~clk;
    defparam u[clk].p = 3;

So it's reasonable to restrict an instance array reference to have a
constant index.
    
Paul



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:54:42 PDT and
sponsored by Boyd Technology, Inc.