RE: Errors in wreal BNF

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Mon Oct 03 2011 - 06:35:04 PDT

In SV,

"The term packed array is used to refer to the dimensions declared before the data identifier name. The term unpacked array is used to refer to the dimensions declared after the data identifier name."

"A packed array is a mechanism for subdividing a vector into subfields, which can be conveniently accessed as array elements. Consequently, a packed array is guaranteed to be represented as a contiguous set of bits. An unpacked array may or may not be so represented. A packed array differs from an unpacked array in that, when a packed array appears as a primary, it is treated as a single vector."

"Packed arrays can be made of only the single bit data types (bit, logic, reg), enumerated types, and recursively other packed arrays and packed structures."

"Integer types with predefined widths shall not have packed array dimensions declared. These types are byte, shortint, int, longint, integer, and time."

"Unpacked arrays can be made of any data type."

Shalom

From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On Behalf Of Cary R.
Sent: Wednesday, September 28, 2011 8:09 PM
To: Verilog-AMS LRM Committee
Subject: Re: Errors in wreal BNF

Thanks for the comments Marq.

I had missed the symmetry of electrical and wreal and I'm probably not using all the terminology 100% correctly either.

From my reading of the BNF it appears the following is a valid wreal statement.

wreal [3:0] net [5:0];

I believe this would be called an array of vectored real nets, where the vector part to me looks a lot like a packed array of real nets (which I believe is illegal). Unlike a logical vector the individual elements(bits) in the real vector cannot be combined to represent a single value, so that is my confusion. Basically, what does wreal [3:0] net actually represent and how is it different than wreal net [3:0]?

My assumption is that wreal [3:0] net [5:0] may be equivalent to wreal net [5:0][3:0]. Except a vector of real nets would sidesteps the 1364 limitation that arrays cannot be passed.

Regards,

Cary

________________________________
From: Marq Kole <marq.kole@nxp.com>
To: Verilog-AMS LRM Committee <verilog-ams@eda.org>
Sent: Wednesday, September 28, 2011 12:09 AM
Subject: RE: Errors in wreal BNF

Hi Cary,

I think your assessment of the items below being errors is a bit premature: wreal simply follows the interface descriptions that are also used in electrical and logic. This is a necessary requirement for Verilog-AMS. Do remember that we have not yet merged with SV - any incompatibility needs to be resolved correctly in order to maintain the underlying modeling capabilities. The modeling capabilities that are necessary for real-valued models based on wreal is a consistency between the following declarations:

  inout [3:0] cont_value_net;
  electrical [3:0] cont_value_net;

and

  inout [3:0] cont_value_net;
  wreal [3:0] cont_value_net;

As there are already a lot of models using wreal interfaces out there, we cannot simply declare the above constructs as illegal.

Also, your statement below under item 1 about arrays of wreal is not correct: wreal is a net specification, not a type specification. It is not automatically connected to a (packed) array of reals - that would require a separate declaration and continuous assignment.

I do agree that wreal is always signed so the "signed" qualifier would be superfluous. I'm not sure that this syntactic sugar does any harm. It might be a gentle reminder to the user that the value carried on such a net is signed.

Cheers,
Marq

-----Original Message-----
From: owner-verilog-ams@eda.org [mailto:owner-verilog-ams@eda.org] On Behalf Of Cary R.
Sent: Tuesday, September 27, 2011 1:26 AM
To: Verilog-AMS LRM Committee
Subject: Errors in wreal BNF

I noticed the following errors in the wreal BNF in the
2.3.1 specification. I believe these will still apply after
the merge with 1800-2009.

1. Page 42 Syntax 3-8 and page 330 A.2.1.3

Delete [range] from both lines.

wreal should not take a [range]. Arrays of wreal are
handled in the list_of_net_... part of the syntax. In SV
this range would imply a packed array, but a packed
array of reals is not valid.

2. Page 132 Syntax 6-7 and page 329 A.2.1.2

Make new lines (three) for wreal and delete the [signed]
and [range] fields for the new wreal lines.

A wreal (real value) is always signed and as was
described in 1 above, a range is not valid for a wreal.

Regards,

Cary

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, and is
believed to be clean.
--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, 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 MailScanner, and is
believed to be clean.
Received on Mon, 3 Oct 2011 15:35:04 +0200

This archive was generated by hypermail 2.1.8 : Mon Oct 03 2011 - 06:36:16 PDT