mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-04 00:41:13 +02:00
support complex sizes in size casts (resolves #69)
This commit is contained in:
+11
-2
@@ -1,6 +1,15 @@
|
||||
module top;
|
||||
localparam BW = 3;
|
||||
logic [2:0] test;
|
||||
assign test = BW'(0);
|
||||
initial #1 $display(test);
|
||||
logic [3:0] foo;
|
||||
logic [3:0] bar;
|
||||
|
||||
initial begin
|
||||
test = BW'(0);
|
||||
$display(test);
|
||||
foo = 2'('1);
|
||||
$display(foo);
|
||||
bar = $bits(bar)'('1);
|
||||
$display(bar);
|
||||
end
|
||||
endmodule
|
||||
|
||||
+12
-4
@@ -1,6 +1,14 @@
|
||||
module top;
|
||||
localparam BW = 3;
|
||||
wire [2:0] test;
|
||||
assign test = 0;
|
||||
initial #1 $display(test);
|
||||
reg [2:0] test;
|
||||
reg [3:0] foo;
|
||||
reg [3:0] bar;
|
||||
|
||||
initial begin
|
||||
test = 0;
|
||||
$display(test);
|
||||
foo = 4'b0011;
|
||||
$display(foo);
|
||||
bar = 4'b1111;
|
||||
$display(bar);
|
||||
end
|
||||
endmodule
|
||||
|
||||
Reference in New Issue
Block a user