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:
parent
957fdb328a
commit
bf15dbd0f7
4 changed files with 45 additions and 1 deletions
15
tests/verilog/always_comb_nolatch_5.ys
Normal file
15
tests/verilog/always_comb_nolatch_5.ys
Normal 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
|
15
tests/verilog/always_comb_nolatch_6.ys
Normal file
15
tests/verilog/always_comb_nolatch_6.ys
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue