Number | 403
|
Category | errata
|
Synopsis | 4.1.13: "known" and "ambiguous" are ambiguous
|
State | lrmdraft
|
Class | errata-simple
|
Arrival-Date | Jul 27 2003
|
Originator | Shalom.Bresticker@motorola.com
|
Release | 2001b: 4.1.13
|
Environment |
|
Description |
4.1.13 ("Conditional operator") says, "The evaluation of a conditional operator shall begin with the evaluation of expression1. If expression1 evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If expression1 evaluates to true (known value other than 0), then expression2 is evaluated and used as the result. If expression1 evaluates to ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit" The question is, what is meant by "true (known value other than 0)" and "ambiguous value (x or z)". The correct interpretation (according to Verilog-XL, VCS, and NC-Verilog) is that "2'b1x" is considered "true" even though it contains x, because it is definitely different from 0. However, someone might interpret "known value" to mean that all bits are known, and that 2'b1x does not have a "known value", and that a value is "ambiguous" if it contains any x or z even if it is definitely different from 0. This should be clarified. I bring this up because I saw someone who wrote that ?: combines expr2 and expr3 if any bits of expr1 are x/z. I suspect that maybe he thought so because of the wording of this section. An example of such a case should be added. |
Fix |
In 4.1.13, replace: The evaluation of a conditional operator shall begin with the evaluation of expression1. If expression1 evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If expression1 evaluates to true (known value other than 0), then expression2 is evaluated and used as the result. If expression1 evaluates to ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit. With: The evaluation of a conditional operator shall begin with a logical equality comparison (see 4.1.8) of expression1 with zero, termed the condition. If the condition evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If the condition evaluates to true (1), then expression2 is evaluated and used as the result. If the condition evaluates to an ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit. |
Audit-Trail |
Fix replaced by pieper@synopsys.com on Mon Jul 26 10:21:26 2004 In 4.1.13, replace: The evaluation of a conditional operator shall begin with the evaluation of expression1. If expression1 evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If expression1 evaluates to true (known value other than 0), then expression2 is evaluated and used as the result. If expression1 evaluates to ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit. With: The evaluation of a conditional operator shall begin with a logical equality comparison (see 4.1.8) of expression1 with zero, termed the condition. If the condition evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If the condition evaluates to true (1), then expression2 is evaluated and used as the result. If the condition evaluates to ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit. Fix replaced by pieper@synopsys.com on Mon Aug 23 09:10:02 2004 In 4.1.13, replace: The evaluation of a conditional operator shall begin with the evaluation of expression1. If expression1 evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If expression1 evaluates to true (known value other than 0), then expression2 is evaluated and used as the result. If expression1 evaluates to ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit. With: The evaluation of a conditional operator shall begin with a logical equality comparison (see 4.1.8) of expression1 with zero, termed the condition. If the condition evaluates to false (0), then expression3 shall be evaluated and used as the result of the conditional expression. If the condition evaluates to true (1), then expression2 is evaluated and used as the result. If the condition evaluates to an ambiguous value (x or z), then both expression2 and expression3 shall be evaluated and their results shall be combined, bit by bit. |
Unformatted |
|
Hosted by Boyd Technology