fold concatenations of number literals

This commit is contained in:
Zachary Snow
2021-02-11 17:36:05 -05:00
parent 19711ba17b
commit 465060ce4f
4 changed files with 71 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
`define TEST(x, y) $display("{%b, %b} => %b", x, y, {x, y});
module top;
initial begin
`TEST('z, 'x);
`TEST('1, '0);
`TEST(2'sh3, 32'd0);
`TEST(3'sh4, 32'd0);
`TEST(3'sb101, 32'd0);
`TEST('sh3, 32'd0);
`TEST('sh4, 32'd0);
`TEST('b0101, 32'd0);
`TEST('sh3, 'd0);
`TEST('sh4, 'd0);
`TEST('b0101, 'd0);
end
endmodule
+17
View File
@@ -0,0 +1,17 @@
`define TEST(x, y) $display("{%b, %b} => %b", x, y, {x, y});
module top;
initial begin
`TEST(1'sbz, 1'sbx);
`TEST(1'sb1, 1'sb0);
`TEST(2'sh3, 32'd0);
`TEST(3'sh4, 32'd0);
`TEST(3'sb101, 32'd0);
`TEST(32'sh3, 32'd0);
`TEST(32'sh4, 32'd0);
`TEST(32'sb0101, 32'd0);
`TEST(32'sh3, 32'd0);
`TEST(32'sh4, 32'd0);
`TEST(32'sb0101, 32'd0);
end
endmodule