mirror of
https://github.com/YosysHQ/yosys
synced 2026-03-10 07:10:31 +00:00
abc9: preserve topological-loop asserts with targeted SCC fallback
A real-world ABC9 flow hit residual combinational loops after SCC breaking, tripping the prep_xaiger loop assertion. Keep the existing topological assertions in place (prep_xaiger and reintegrate still assert no_loops). To handle residual non-box loops, add a targeted fallback in prep_xaiger: when loops remain after normal SCC breaking, insert additional $__ABC9_SCC_BREAKER cuts on non-box loop cells, rebuild toposort, and then re-check the existing assertion. Also keep pre-ABC9 SCC tagging on all cell types (scc -all_cell_types) and add a regression test (tests/techmap/abc9-nonbox-loop-with-box.ys).
This commit is contained in:
parent
5f8489d36d
commit
5970be33fb
3 changed files with 107 additions and 27 deletions
|
|
@ -12,5 +12,5 @@ cd fsm # Constrain all select calls below inside the top module
|
|||
|
||||
select -assert-count 4 t:SB_DFF
|
||||
select -assert-count 2 t:SB_DFFESR
|
||||
select -assert-max 15 t:SB_LUT4
|
||||
select -assert-max 16 t:SB_LUT4
|
||||
select -assert-none t:SB_DFFESR t:SB_DFF t:SB_LUT4 %% t:* %D
|
||||
|
|
|
|||
19
tests/techmap/abc9-nonbox-loop-with-box.ys
Normal file
19
tests/techmap/abc9-nonbox-loop-with-box.ys
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
read_verilog -icells -specify <<EOT
|
||||
(* abc9_box, blackbox *)
|
||||
module box1(input i, output o);
|
||||
specify
|
||||
(i => o) = 1;
|
||||
endspecify
|
||||
endmodule
|
||||
|
||||
module top(input i, output o);
|
||||
wire a, b, c, z;
|
||||
$_AND_ a0(.A(b), .B(i), .Y(a));
|
||||
$_AND_ b0(.A(a), .B(c), .Y(b));
|
||||
$_AND_ c0(.A(b), .B(i), .Y(c));
|
||||
box1 u_box(.i(i), .o(z));
|
||||
assign o = c ^ z;
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
abc9 -lut 4
|
||||
Loading…
Add table
Add a link
Reference in a new issue