Re: Fwd: Genvars only positive?

From: Shalom Bresticker (Shalom.Bresticker@motorola.com)
Date: Tue Jul 10 2001 - 07:53:59 PDT


But that example is a defparam, for which there is no parallel in an array of regs.
True, in a defparam, it would have to be evaluatable at elaboration time.
But on the other hand, the following could be OK:

for (i=0; i<=1; i=i+1)
begin
    u[i].j = 3 ;
end

Shalom

<p>Paul Graham wrote:

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

--
**************************************************************************
Shalom Bresticker                           Shalom.Bresticker@motorola.com
Motorola Semiconductor Israel, Ltd.                  Tel #: +972 9 9522268
P.O.B. 2208, Herzlia 46120, ISRAEL                   Fax #: +972 9 9522890
**************************************************************************


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