According to
http://www.boyd.com/1364_btf/report/full_pr/261.html
"A bit-select or part-select of a scalar, or of a variable
declared as real or realtime, shall be illegal."
-- Brad
-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of Maidment,
Matthew R
Sent: Thursday, December 09, 2004 3:42 PM
To: Francoise Martinolle; sv-bc@eda.org
Subject: RE: [sv-bc] enumeration types
I agree with your conclusions. It should not be legal to
index into an enum if the base type is a scalar.
Practically speaking, my experience is that various simulators
consider it a "feature" to enable reference to a scalar with the index [0].
Not all tools allow it and it's not in the standard AFAICT.
Matt
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Francoise Martinolle
Sent: Thursday, December 09, 2004 1:50 PM
To: sv-bc@eda.org
Subject: [sv-bc] enumeration types
I think that the following is legal:
typedef enum bit {bit0, bit1} mybit;
But can I use a bit select of a variable of that type when the base type of
the enum is just bit or logic or alias
thereof?
mybit v;
initial v[0] = 1'b0;
I think that if I define:
typedef enum bit[0:0] {bit0, bit1} mybitvec;
v[0] is legal.
Francoise
'
Received on Thu Dec 9 15:58:52 2004
This archive was generated by hypermail 2.1.8 : Thu Dec 09 2004 - 15:59:00 PST