Fix error on wide shift, msg2005.
This commit is contained in:
parent
3f143317a6
commit
f11757e43a
2
Changes
2
Changes
|
|
@ -10,7 +10,7 @@ indicates the contributor was also the author of the fix; Thanks!
|
|||
|
||||
**** Fix SystemC compiles with VPI, bug1081. [Arthur Kahlich]
|
||||
|
||||
**** Fix error on wide numbers that represent small msb/lsb, msg1991. [Mandy Xu]
|
||||
**** Fix error on wide numbers that represent msb/lsb or shifts, msg1991. [Mandy Xu]
|
||||
|
||||
**** Improve Verilation performance on internal strings, msg1975. [Johan Bjork]
|
||||
|
||||
|
|
|
|||
|
|
@ -2632,7 +2632,7 @@ private:
|
|||
AstNode* shiftp = nodep->rhsp();
|
||||
nodep->rhsp()->replaceWith(new AstConst(shiftp->fileline(), num));
|
||||
shiftp->deleteTree(); VL_DANGLING(shiftp);
|
||||
} else {
|
||||
} else if (!m_paramsOnly) {
|
||||
nodep->rhsp()->v3error("Unsupported: Shifting of by over 32-bit number isn't supported."
|
||||
<<" (This isn't a shift of 32 bits, but a shift of 2^32, or 4 billion!)\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,13 @@ module t (/*AUTOARG*/
|
|||
input clk;
|
||||
output [31:0] ign;
|
||||
|
||||
parameter [95:0] P6 = 6;
|
||||
localparam P64 = (1 << P6);
|
||||
|
||||
reg [31:0] right;
|
||||
reg [31:0] left;
|
||||
reg [63:0] qright;
|
||||
reg [63:0] qleft;
|
||||
reg [P64-1:0] qright;
|
||||
reg [P64-1:0] qleft;
|
||||
reg [31:0] amt;
|
||||
|
||||
assign ign = {31'h0, clk} >>> 4'bx; // bug760
|
||||
|
|
@ -37,6 +40,7 @@ module t (/*AUTOARG*/
|
|||
`endif
|
||||
if (cyc==1) begin
|
||||
amt <= 32'd0;
|
||||
if (P64 != 64) $stop;
|
||||
if (5'b10110>>2 != 5'b00101) $stop;
|
||||
if (5'b10110>>>2 != 5'b00101) $stop; // Note it cares about sign-ness
|
||||
if (5'b10110<<2 != 5'b11000) $stop;
|
||||
|
|
|
|||
Loading…
Reference in New Issue