RE: [sv-bc] enum ranges


Subject: RE: [sv-bc] enum ranges
From: Brad Pierce (Brad.Pierce@synopsys.com)
Date: Tue Dec 09 2003 - 14:56:22 PST


According to the approved proposal for SV-BC 81 --

   http://www.eda.org/sv-bc/hm/att-1261/01-enums.pdf

the numbers used to generate enumerated names must
be integral literal constants. But the current BNF
does not make that clear. That erratum is my mistake,
and I will make a proposal that repairs it.

-- Brad

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of Dave
Rich
Sent: Tuesday, December 09, 2003 2:47 PM
To: pgraham@cadence.com
Cc: sv-bc@eda.org
Subject: Re: [sv-bc] enum ranges

This is not legal. See
http://www.eda.org/sv-bc/display_issue.cgi?issue_num=81

Paul Graham wrote:

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

--
--
David.Rich@Synopsys.com
Technical Marketing Consultant
http://www.SystemVerilog.org
tele:  650-584-4026
cell:  510-589-2625



This archive was generated by hypermail 2b28 : Tue Dec 09 2003 - 14:58:58 PST