[sv-bc] Fixed proposal for SV-BC issue #61 - BNF unpacked struts should not allow signing.


Subject: [sv-bc] Fixed proposal for SV-BC issue #61 - BNF unpacked struts should not allow signing.
From: Jacobi, Dan (dan.jacobi@intel.com)
Date: Sun Nov 02 2003 - 04:40:30 PST


Hello All,

Following in the proposal for SV-BC issue 61, after fixing the typo
(A.3.3 was replaced with 10.3.3).

 

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 10.3.3

10.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 : Sun Nov 02 2003 - 04:45:25 PST