RE: [sv-bc] enum value uniqueness

From: Rich, Dave <Dave_Rich_at_.....>
Date: Tue Oct 23 2007 - 07:37:10 PDT
If you are asking if it's OK to re-use the symbol IDLE, even though it
may have the same value, the answer is: No.

 

Remember that simple assignments to enums are supposed to be type-safe,
and each label of an enum is visible in the current scope.

 

Dave

 

 

________________________________

From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On
Behalf Of Bresticker, Shalom
Sent: Tuesday, October 23, 2007 7:25 AM
To: sv-bc@server.eda.org
Subject: [sv-bc] enum value uniqueness

 

Hi, 

Should the following be legal? 

enum_logic [1:0] {IDLE ='0,START_XFER,WAIT_DONE} xfer_state; 
enum_logic [1:0] {IDLE ='0,START_REQ ,WAIT_ACK } req_ack_state; 

What about this? 

enum_logic [1:0] {IDLE ='0,START_XFER,WAIT_DONE} xfer_state; 
enum_logic [1:0] {IDLE      ,START_REQ, WAIT_ACK } req_ack_state; 

Thanks, 
Shalom 

 

Shalom Bresticker 
Intel Jerusalem LAD DA 
+972 2 589-6852 
+972 54 721-1033 

---------------------------------------------------------------------
Intel Israel (74) Limited
 
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Oct 23 07:37:28 2007

This archive was generated by hypermail 2.1.8 : Tue Oct 23 2007 - 07:38:15 PDT