3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-28 04:46:29 +00:00

proc: ignore nosync temporaries in always_latch checks

This commit is contained in:
junyao 2026-05-26 00:56:07 +08:00
parent 9d0cdb8551
commit 6f111118de
2 changed files with 23 additions and 2 deletions

View file

@ -18,6 +18,20 @@ always_latch
endmodule
EOT
# Good case: dynamic memory writes in always_latch create nosync mem2reg
# temporaries, but only the memory words themselves should be checked for
# latch inference.
${YOSYS} -f "verilog -sv" -qp proc - <<EOT
module top(input [3:0] addr, input we, input [31:0] data);
logic [31:0] regs [0:15];
always_latch
if (we)
regs[addr] = data;
endmodule
EOT
# Incorrect always_comb syntax
((${YOSYS} -f "verilog -sv" -qp proc -|| true) <<EOT
module top(input d, output reg q);