mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-07 02:58:49 +02:00
fold concatenations of number literals
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user