Subject: Re: [sv-bc] New errata for enumeration type bnf definition
From: Francoise Martinolle (fm@cadence.com)
Date: Fri Jan 16 2004 - 14:59:08 PST
Brad,
Yes, the example should have been:
enum [3:0] {a,b,c,d} alphabet;
The bnf is currently
data_type_common_item = ...
enum [ enum_base_type ] {
enum_name_declaration { , enum_name_declaration } }
enum_base_type ::=
integer_atom_type [ signing ]
| integer_vector_type [ signing ] [ packed_dimension ]
enum_name_declaration ::=
enum_identifier [ [ integral_number ] ] [ = constant_expression ]
| enum_identifier [ [ integral_number : integral_number ] ] [ =
constant_expression ]
integer_vector_type ::= bit | logic | reg
integer_atom_type ::= byte | shortint | int | longint | integer
The bnf does not allow to have an optional integer_atom_type or
integer_vector_type. I cannot write enum [3:0] ... it looks like I always
have to specify either logic or bit or reg wherever I want to specify an
explicit range.
At 02:39 PM 1/16/2004 -0800, Brad Pierce wrote:
>Francoise,
>
>I think the = in your example is not correct syntax.
>Also, according to the second paragraph of 3.10,
>
> "In the absence of a data type declaration, the
> default data type shall be 'int'. Any other
> data type used with enumerated types shall
> require an explicit data type declaration."
>
>So I think the BNF is correct for this issue.
>
>-- Brad
>
>
>-----Original Message-----
>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of
>Francoise Martinolle
>Sent: Friday, January 16, 2004 11:40 AM
>To: sv-bc@eda.org
>Subject: [sv-bc] New errata for enumeration type bnf definition
>
>
>I believe that the BNF is not correct and does not support the following
>legal enumeration type:
>
>enum [3:0] = {a, b, c, b};
>
>
>The bnf seems to require to have the bit or logic qualifier before the
>range.
>
>Francoise
> '
This archive was generated by hypermail 2b28 : Fri Jan 16 2004 - 15:05:35 PST