[sv-bc] RE: [sv-ac] Mantis 1974: Definitions of true and false conditions

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Tue Aug 14 2007 - 23:17:27 PDT
Shalom,
 
The fix for 1364 issue 403 became the following in 11.4.12 of Draft 3a
--
 
      "If cond_predicate is true, the operator returns the value of the
first expression; if false, it returns the value of  the second
expression. If cond_predicate evaluates to an ambiguous value (x or z),
then both the first expression and the second expression shall be
evaluated, and their results shall be combined bit by bit using Table
11-22 to calculate the final result".
 
The cond_predicate has a scalar type, and cannot usefully be considered
bitwise.  Instead, this paragraph is saying that, if the cond_predicate
is ambiguous, then where the first and second expression agree about
particular bits of the result, a non-x-pessimistic value is calculated
for those bits.
 
This is related to enhancement request
 
     http://www.eda-stds.org/svdb/view.php?id=1190
<http://www.eda-stds.org/svdb/view.php?id=1190> 
 
which was http://www.boyd.com/1364_btf/report/full_pr/401.html
<http://www.boyd.com/1364_btf/report/full_pr/401.html>  .
 
-- Brad

________________________________

From: owner-sv-ac@eda.org [mailto:owner-sv-ac@eda.org] On Behalf Of
Bresticker, Shalom
Sent: Tuesday, August 14, 2007 9:54 PM
To: sv-bc
Cc: sv-ac@eda-stds.org
Subject: [sv-ac] Mantis 1974: Definitions of true and false conditions



Section 12.4 has the following definitions of 'true' and 'false'
conditions: 

"If the cond_predicate expression evaluates to true (that is, has a
nonzero known value), the first statement shall be executed. If it
evaluates to false (that is, has a zero value or the value is x or z),
the first statement shall not execute."

These descriptions are incorrect. We corrected them for the conditional
operator (?:) in 1364-2005, but missed this place. See old 1364 issue
403 (http://boyd.com/1364_btf/report/full_pr/403.html
<http://boyd.com/1364_btf/report/full_pr/403.html> ).

Section 16.3 (Immediate Assertions) has the same mistake: 

"The expression is nontemporal and is interpreted the same way as an
expression in the condition 
of a procedural if statement. In other words, if the expression
evaluates to X, Z, or 0, then it is interpreted as being false, and the
assertion is said to fail. Otherwise, the expression is interpreted as
being true, and the assertion is said to pass."

The difference is where some of the bits are X/Z and some are 0/1. The
value is known but also not completely unknown. The value is not quite
X/Z, but not completely 0s and 1s. What is known is that if any of the
bits is 1, then the value is definitely non-zero. In this case, the
condition is true, even though the value is not quite known. On the
other hand, if the known bits are all 0, then the condition is false,
even though its value is not quite 0, X, or Z.

This is Mantis 1974. 

Shalom 

Shalom Bresticker 
Intel Jerusalem LAD DA 
+972 2 589-6852 
+972 54 721-1033 


-- 
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, and is
believed to be clean.
Received on Tue Aug 14 23:19:22 2007

This archive was generated by hypermail 2.1.8 : Tue Aug 14 2007 - 23:19:41 PDT