Add Proposal | Add Analysis | Edit Class, Environment, or Release |
Number | 663
|
Notify-List |
|
Category | errata
|
Synopsis | Incorrect width extension rule in 4.1.10.
|
State | open
|
Class | errata-simple
|
Arrival-Date | Apr 22 2005
|
Originator | sharp@cadence.com (Behavioral Task Force)
|
Release |
|
Environment |
|
Description |
Section 4.1.10 contains yet another out-of-date description of bit-length extension that assumes that all values are unsigned. The last sentence in the section says: "When the operands are of unequal bit length, the shorter operand is zero-filled in the most significant bit positions." This is incorrect in a couple of ways. First of all, it is describing the behavior from when everything was unsigned, so all extensions were zero-extensions. Now this may be zero-extension or sign-extension, depending on the signedness of the expression. Second, it assumes that these are the only two operands in the expression, so that the shorter will always be extended to the width of the longer. In the general case, both will be extended to the length of the expression, which may be wider than either. |
Fix |
The simplest solution is to delete this sentence, as the full and correct rules are described in 4.4 and 4.5. Alternately, it can be modified to be correct, allowing for the possibility of a signed or unsigned expression, and that both operands may need to be extended to a length greater than either. |
Unformatted |
|
Hosted by Boyd Technology