Number | 45
|
Category | errata
|
Synopsis | Example in Section 4.5: Incorrect comment
|
State | lrmdraft
|
Class | errata-simple
|
Arrival-Date | Oct 08 2001
|
Originator | Jenjen Tiao @ Agere Systems, Inc.
|
Release | 2001b, 4.5
|
Environment |
|
Description |
For page 65, Section 4.5: regA = $unsigned(-4); // regA = 4'b1100 The above comment seemed wrong? regA is declared to be of size 8 bits, hence, (-4) is a 32 bit constant integer, hence, $unsigned should return a 32 bit, 111...100 bit value, chopped to 8, hence I thought regA would get the value 8'b11111100 instead. |
Fix |
Passed 10/7/02: Section 4.5 example: REPLACE: reg [7:0] regA; reg signed [7:0] regS; regA = $unsigned (-4); // regA = 4'b1100 regS = $signed (4'b1100); // regS = -4 WITH reg [7:0] regA, regB; reg signed [7:0] regS; regA = $unsigned(-4); // regA = 8'b11111100 regB = $unsigned(-4'sd4); // regB = 8'b00001100 regS = $signed(4'b1100); // regS = -4 |
Audit-Trail |
|
Unformatted |
Section 4.5: regA = $unsigned(-4); // regA = 4'b1100 <-- WRONG From: tiao@agere.com Reply-To: tiao@agere.com X-Send-Pr-Version: gnatsweb-2.5 (1.2) X-GNATS-Notify: vlog-synth@eda.org Section 4.5: regA = $unsigned(-4); // regA = 4'b1100 <-- WRONG |
Hosted by Boyd Technology