3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

sv: fix always_comb auto nosync for nested and function blocks

This commit is contained in:
Zachary Snow 2022-02-22 16:57:08 +01:00 committed by Zachary Snow
parent 957fdb328a
commit bf15dbd0f7
4 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,15 @@
read_verilog -sv <<EOF
module top;
logic [4:0] x;
logic z;
assign z = 1'b1;
always_comb begin : foo
x = '0;
if (z) begin : bar
for (int i = 0; i < 5; i++)
x[i] = 1'b1;
end
end
endmodule
EOF
proc

View file

@ -0,0 +1,15 @@
read_verilog -sv <<EOF
module top(input wire x, y, output reg z);
function automatic f;
input inp;
for (int i = 0; i < 1; i++)
f = inp + 0;
endfunction
always_comb
if (y)
z = f(x);
else
z = 0;
endmodule
EOF
proc