Subject: [sv-bc] Proposal for SV-BC issue 61
From: Jacobi, Dan (dan.jacobi@intel.com)
Date: Mon Sep 15 2003 - 23:33:58 PDT
URL:
http://www.eda.org/sv-bc/display_issue.cgi?issue_num=61
Motivation:
Disable the use of signed unpacked structs/unions such as
- Declaration of an unpacked signed struct type
typdef struct signed { logic a, your_unpacked_struct f1 } mystruct;
-Anonymous unpacked signed unions
union signed { logic [27:0] a, your_unpacked_struct f1 }
aUnionInst;
- Functions that return signed unpacked structs
function signed struct { logic a, your_unpacked_struct f1 }
myfoo ..
typdef struct { logic a, your_unpacked_struct f1 } unpackedstruct;
function signed unpackedstruct myfoo ...
Proposal:
Under A.2.2.1:
REPLACE
data_type ::=
integer_vector_type [ signing ] { packed_dimension } [ range ]
| integer_atom_type [ signing ]
| type_declaration_identifier { packed_dimension }
| non_integer_type
| struct packed [ signing ] { { struct_union_member } } {
packed_dimension }
| union packed [ signing ] { { struct_union_member } } {
packed_dimension }
| struct [ signing ] { { struct_union_member } }
| union [ signing ] { { struct_union_member } }
| enum [ integer_type [ signing ] { packed_dimension } ]
{ enum_identifier [ = constant_expression ] { , enum_identifier [ =
constant_expression ] } }
| string
| event
| chandle
| class_scope_type_identifier
WITH
data_type ::=
integer_vector_type [ signing ] { packed_dimension } [ range ]
| integer_atom_type [ signing ]
| type_declaration_identifier { packed_dimension }
| non_integer_type
| struct [ packed [ signing ] ] { { struct_union_member } } {
packed_dimension }
| union [ packed [ signing ] ] { { struct_union_member } } {
packed_dimension }
| enum [ integer_type [ signing ] { packed_dimension } ]
{ enum_identifier [ = constant_expression ] { , enum_identifier [ =
constant_expression ] } }
| string
| event
| chandle
| class_scope_type_identifier
* all keywords commas (,) , equal sign (=) outer triplets around ' { {
struct_union_member } } ' and around '{ enum_identifier [ =
constant_expression ] { , enum_identifier [ = constant_expression ] } }'
are in bold red font
Under Annex 8
REPLACE foot-note 8
8) void functions, non integer type functions, and functions with a
typedef type cannot have a signing
declaration.
WITH
8) void functions, non integer type functions, unpacked structure or
union functions,
and functions with a typedef type cannot have a signing declaration.
Under 3.11
ADD to the end of the section
The signing of unpacked structures is not allowed. The following
declarations will be considered illegal.
typedef struct signed {
int f1;
logic f2;
} sIllegalSignedUnpackedStructType // illegal decleration
Add a section A.3.3
A.3.3 Restrictions on function signing.
It will be illegal to add signing designators to functions that return
one of the following data types:
- void
- non integer types
- unpacked structures or unions
- data types previously defined by typedef declarations
The following function declarations will be considered illegal
function signed struct { logic a; byte b; } IllegalFoo1 ..
// illegal function declaration
typedef struct { logic a; byte b; } unpackedstruct;
function signed unpackedstruct IllegalFoo2 .. // illegal function
declaration
Dan Jacobi
Tel : 972-4-8655855
INet : 465-5855
This archive was generated by hypermail 2b28 : Mon Sep 15 2003 - 23:37:27 PDT