mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-02 19:48:30 +02:00
fix premature conversion of casts containing dimension queries
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
module top;
|
||||
function automatic [7:0] f;
|
||||
input [2:0] p;
|
||||
begin
|
||||
f = 7'b0;
|
||||
f[p+:2] = 2'b11;
|
||||
end
|
||||
endfunction
|
||||
reg [2:0] p;
|
||||
wire [7:0] q;
|
||||
assign q = f(p);
|
||||
initial begin
|
||||
$monitor("%0d, p=%b q=%b", $time, p, q);
|
||||
#1 p = 0;
|
||||
while (p != 7)
|
||||
#1 p = p + 1;
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user