Subject: Re: [sv-bc] enum ranges
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Tue Dec 09 2003 - 18:21:36 PST
Enum ranges must be literal constants, they cannot be parameters.
This is covered by LRM-82 in
http://www.eda.org/sv/Changes_draft2/LRM_Changes_3.html
Arturo
----- Original Message -----
From: "Paul Graham" <pgraham@cadence.com>
To: <sv-bc@eda.org>
Sent: Tuesday, December 09, 2003 2:20 PM
Subject: [sv-bc] enum ranges
If an enum is declared with a range that depends on a parameter, then you
have to wait until elaboration to tell if an identifier is valid or not.
For instance:
parameter p = 1;
enum { x[p] };
assign y = x2;
It is not known until after parameter p is elaborated whether x2 is a legal
name. Is this intended?
Paul
This archive was generated by hypermail 2b28 : Tue Dec 09 2003 - 18:22:14 PST