[sv-bc] ERRATUM: FW: [sv-ec] cast of 4 state to 2 state

From: David W. Smith <dwsmith@synopsys.com>
Date: Mon Apr 12 2004 - 11:40:18 PDT

The following was raised in the SV-EC meeting. Please add it to your list of errata.

Regards
David

David W. Smith
Synopsys Scientist

Synopsys, Inc.
Synopsys Technology Park
2025 NW Cornelius Pass Road
Hillsboro, OR 97124

Voice: 503.547.6467
Main: 503.547.6000
FAX: 503.547.6906
Email: david.smith@synopsys.com
http://www.synopsys.com

-----Original Message-----
From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Ryan, Ray
Sent: Friday, April 09, 2004 4:07 PM
To: sv-ec@eda.org
Subject: [sv-ec] cast of 4 state to 2 state

There are a number of places in the LRM that refer to
'casting a 4-state value to a 2-state value'.

However, the only description (that I can find) for the value mapping when
casting a 4-state value to a 2-state value is in the INFORMATIVE
introduction
to section 3 Data Types. The last sentence of the 5th paragraph in this
section
states:
"To convert a logic value to a bit, 1 converts to 1, anything else to 0."

This definition should be added to a normative section of the LRM.

---
On a related issue, in the 1364 LRM defines division by zero is
defined as producing a result of all 'x's. 
4.1.5 Arithmetic operators, second paragraph: 
... For the division or modulus operators, if the second operand is a zero,
then 
the entire result value shall be x. ...
In SystemVerilog, division with 2-state operands produces a 2-state result.
Does the above definition (2-state cast) imply that the result of division
by zero is all 0's.  It may be more useful to explicitly define this result.
Specifically, for 2-state division by zero if the numerator is:
  - an unsigned 2-state value, the result is all 1's.
  - a non-negative signed 2-state value, the result is 0 followed by all 1's
    (ie largest positive signed value of the specific width).
  - a negative signed 2-state value, the result is 1 followed by all 0's
    (ie largest negative signed value of the specific width).
Ray Ryan
Received on Mon Apr 12 11:40:17 2004

This archive was generated by hypermail 2.1.8 : Mon Apr 12 2004 - 11:40:25 PDT