Re: [sv-ec] Initialisation of static data members

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Tue Aug 08 2006 - 14:21:05 PDT
Yes, the second production in class_property looks almost removable,
except that currently data_declaration doesn't allow a
class_item_qualifier after the 'const' keyword.

-- Brad

-----Original Message-----
From: owner-sv-ec@eda-stds.org [mailto:owner-sv-ec@eda-stds.org] On
Behalf Of Rich, Dave
Sent: Tuesday, August 08, 2006 2:06 PM
To: Jonathan Bromley; sv-ec@eda-stds.org
Subject: RE: [sv-ec] Initialisation of static data members

I don't know why the LRM breaks out const data member of a class as a
separate production other than legacy from Vera. const data declarations
outside of classes do not have this BNF production.
An example in section 7.18 shows a const properties initialized with
"$random %4096" and $random is not allowed in a constant_expression.

Dave


> -----Original Message-----
> From: Jonathan Bromley [mailto:jonathan.bromley@doulos.com]
> Sent: Tuesday, August 08, 2006 8:48 AM
> To: Rich, Dave; sv-ec@server.eda-stds.org
> Subject: RE: [sv-ec] Initialisation of static data members
> 
> Dave,
> 
> many thanks for the clarification.
> 
> > There are no special restrictions on the initializers of static data

> > declarations
> 
> OK
> 
> > or even const declarations.
> 
> Really?  A.1.8 says
> 
> class_property ::=
> { property_qualifier } data_declaration
> | const { class_item_qualifier } data_type
>                 const_identifier [ = constant_expression ] ;
> 
> Or did I misunderstand the significance of that?
> --
> Jonathan Bromley, Consultant
> 
> DOULOS - Developing Design Know-how
> VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
> 
> Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24
1AW,
> UK
> Tel: +44 (0)1425 471223                   Email:
> jonathan.bromley@doulos.com
> Fax: +44 (0)1425 471573                           Web:
> http://www.doulos.com
Received on Tue Aug 8 14:21:20 2006

This archive was generated by hypermail 2.1.8 : Tue Aug 08 2006 - 14:21:24 PDT