RE: [sv-bc] Signed after typedef

From: Radosław Nawrot <Radoslaw.Nawrot@aldec.com.pl>
Date: Thu May 22 2014 - 00:35:22 PDT
Steven ,Dave, Shalom,
Thanks for Your answers. It's true what Steven says. I've tried to declare a
T-type packed array with signed .
Additionally I propose to add to mantis
http://www.eda.org/svdb/view.php?id=1291 information that after revise this
feature 
 
LRM 

7.4.1 Packed arrays

"

A partselect

of a packed array shall be unsigned.

"

Should be removed
 
Thanks,
Radek
  _____  

From: Steven Sharp [mailto:sharp@cadence.com] 
Sent: Wednesday, May 21, 2014 11:42 PM
To: Rich, Dave; Bresticker, Shalom; Radosław Nawrot; 'SV_BC List'
Subject: RE: [sv-bc] Signed after typedef



He isn't trying to modify the signedness of T, or create a new type that is
like T but with a different signedness.  He is trying to construct a packed
array with elements of type T, and set the signedness of that new packed
array type.

 

This is related to another deficiency in the language.  When you compose
packed arrays of packed arrays, there is no way to independently control the
signedness of each level.  The language only allows you to set the array to
signed at one level.  You can declare an unsigned word that is an array of 4
signed bytes, or a signed word that is an array of unsigned bytes.  But
there is no way to declare a signed word that is an array of signed bytes.

 

For the 2005 standard, Cadence proposed a syntax for declaring packed arrays
that would allow separately specifying the signedness at each dimension. But
nobody else seemed to understand what that meant, until after something had
been standardized that was incompatible with it and it was too late.  It
should still be possible to support it in a backward compatible way using
typedefs for each level that needs to be signed, but it requires allowing
the syntax Radoslaw is trying to use here, i.e.

 

typedef logic signed [7:0] mybyte;

typedef mybyte signed [3:0] myword; //signed word composed of signed bytes

 

 

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Rich,
Dave
Sent: Wednesday, May 21, 2014 5:13 PM
To: Bresticker, Shalom; Radosław Nawrot; 'SV_BC List'
Subject: RE: [sv-bc] Signed after typedef

 

And type T is implicitly unsigned. There are no rules to explain how you
could override the signedness of a type.

 

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
Bresticker, Shalom
Sent: Wednesday, May 21, 2014 5:18 AM
To: Radosław Nawrot; 'SV_BC List'
Subject: RE: [sv-bc] Signed after typedef

 

I don't see that the BNF allows it.

 

type_identifier can be followed by packed_dimension, but I don't see that it
can be followed by 'signing'.

 

Shalom

 

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Rados?aw
Nawrot
Sent: Wednesday, May 21, 2014 15:02
To: 'SV_BC List'
Subject: [sv-bc] Signed after typedef

 

Hi,

I have a code:

 

typedef reg T;
T signed [1:0] r;

 

Is it legal ?
I cannot find reason why nobody supports it

 

Regards,

Radek

 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by  <http://www.mailscanner.info/> MailScanner, and is 
believed to be clean. 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu May 22 00:36:11 2014

This archive was generated by hypermail 2.1.8 : Thu May 22 2014 - 00:36:30 PDT