1
0
mirror of synced 2026-04-26 04:08:28 +00:00
Files
YosysHQ.yosys/tests/verilog/always_comb_nolatch_2.ys
Zachary Snow aa35f24290 sv: auto add nosync to certain always_comb local vars
If a local variable is always assigned before it is used, then adding
nosync prevents latches from being needlessly generated.
2022-01-07 22:53:22 -07:00

18 lines
244 B
Plaintext

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