3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-02 05:26:07 +00:00

Error out on latches.

This commit is contained in:
nella 2026-06-17 17:36:32 +02:00
parent 1023361d6c
commit b2d688dbf9
14 changed files with 149 additions and 37 deletions

View file

@ -3,6 +3,17 @@ module top(input d, en, output reg q);
always @* if (en) q = d;
endmodule
EOT
logger -expect warning "is a latch of type" 1
synth_ice40
design -save read
logger -expect warning "Latch inferred for signal" 1
synth_ice40 -latches warn
logger -check-expected
select -assert-count 1 t:SB_LUT4
design -load read
synth_ice40 -latches auto
select -assert-count 1 t:SB_LUT4
design -load read
logger -expect error "selection is not empty: t:._DLATCH_" 1
synth_ice40