fix literal casts larger than 32 bits

This commit is contained in:
Zachary Snow
2020-07-01 23:35:30 -06:00
parent 1dfa9a9e7f
commit 211e4b0ed8
4 changed files with 21 additions and 3 deletions
+6
View File
@@ -23,6 +23,12 @@ module top;
$display("%0d %0d", y, ($clog2(WIDTH))'(y));
$display("%0d %0d", z, ($clog2(WIDTH))'(z));
$display("%b", 32'(4));
$display("%b", 33'(4));
$display("%b", 33'(64'hFFFF_FFFF_FFFF_FFFF));
$display("%b", 32'(4294967296));
$display("%b", 33'(4294967296));
$display("%b", 32'(4294967297));
$display("%b", 33'(4294967297));
end
localparam bit foo = '0;
+6
View File
@@ -26,6 +26,12 @@ module top;
$display("%0d %0d", y, $signed(y[4:0]));
$display("%0d %0d", z, z[4:0]);
$display("%b", 32'd4);
$display("%b", 33'd4);
$display("%b", 33'h1_FFFF_FFFF);
$display("%b", 32'd0);
$display("%b", 33'd4294967296);
$display("%b", 32'd1);
$display("%b", 33'd4294967297);
end
localparam [0:0] foo = 0;