RE: [sv-bc] DataTypes: wording for optional "var"

From: Mark Hartoog <Mark.Hartoog@synopsys.com>
Date: Thu Nov 18 2004 - 15:15:16 PST

I don't think the data type being optional when you use the var keyword
is reflected in the BNF Brad sent a little while ago, but the idea is
reasonable.

I assume that "var [7:0] v;" is the same as "var logic [7:0] v;" ?

> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org]On Behalf Of Kathy
> McKinley
> Sent: Thursday, November 18, 2004 3:00 PM
> To: btf-dtype@boyd.com; sv-bc@eda.org
> Subject: [sv-bc] DataTypes: wording for optional "var"
>
>
> I have appended some proposed wording for an optional "var" keyword
> in a variable declaration. Please send your feedback as soon as possible.
> Even if you think the wording is fine, can you please send mail
> indicating this?
>
> Thanks,
>
> Kathy
>
> SECTION 5.4. Variables:
>
> CHANGE:
>
> A variable declaration consists of a data type followed by one
> or more instances.
>
> shortint s1, s2[0:9];
>
> TO:
>
> One form of variable declaration consists of a data type followed by one
> or more instances.
>
> shortint s1, s2[0:9];
>
> Another form of variable declaration begins with the keyword "var".
> The data type is optional in this case. If a data type is not
> specified then the data type logic shall be inferred.
>
> var byte my_byte; // equivalent to "byte my_byte;"
>
> var v; // equivalent to "var logic v;"
>
> var enum bit { clear, error } status;
>
> input var logic data_in;
Received on Thu Nov 18 15:14:15 2004

This archive was generated by hypermail 2.1.8 : Thu Nov 18 2004 - 15:14:19 PST