Re: [sv-bc] enumeration types

From: Brad Pierce <Brad.Pierce@synopsys.com>
Date: Mon Dec 13 2004 - 08:46:05 PST

I don't accept that 'logic' is a legal base type. I think that the
base type must be a vector, e.g.,

   typedef enum logic [0:0] {false, true} myenum;

and that if the LRM doesn't explicitly say that, it's an erratum.

-- Brad

-----Original Message-----
From: Francoise Martinolle [mailto:fm@cadence.com]
Sent: Monday, December 13, 2004 8:25 AM
To: 'Maidment, Matthew R'; 'Francoise Martinolle'; 'Steven Sharp';
sv-bc@eda.org; Brad.Pierce@synopsys.COM
Subject: RE: [sv-bc] enumeration types

I don't disagree with it being a scalar, I am just seeking confirmation that
this
is the only case (with a base type) where an enumeration type could be a
scalar
and we would have to check for bit selects or part selects and issue an
error.

Francoise
    '

-----Original Message-----
From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Maidment, Matthew R
Sent: Friday, December 10, 2004 10:29 PM
To: Francoise Martinolle; Steven Sharp; sv-bc@eda.org;
Brad.Pierce@synopsys.com
Subject: RE: [sv-bc] enumeration types

Why is this NOT a scalar?

>-----Original Message-----
>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
>Francoise Martinolle
>Sent: Friday, December 10, 2004 6:47 PM
>To: 'Steven Sharp'; sv-bc@eda.org; Brad.Pierce@synopsys.com
>Subject: RE: [sv-bc] enumeration types
>
>
>Yes, this is exactly my question.
>Is:
>typedef enum logic {flase, true} myenum; a scalar or a vector 1 bit
>wide.
>
>-----Original Message-----
>From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
>Steven Sharp
>Sent: Thursday, December 09, 2004 7:12 PM
>To: sv-bc@eda.org; Brad.Pierce@synopsys.com
>Subject: RE: [sv-bc] enumeration types
>
>Yes, the standard clearly states that it is illegal to bit-select a
>scalar.
>
>The question is whether that applies to an enum that was declared with
>an underlying base type that is a scalar. In other words, when an enum
>data object is used in an expression, is it treated like it is of the
>base type of the enum?
>
>Steven Sharp
>sharp@cadence.com
>
>
>
Received on Tue Dec 14 09:52:49 2004

This archive was generated by hypermail 2.1.8 : Tue Dec 14 2004 - 09:52:52 PST