3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-14 21:08:47 +00:00

abc9: break conflict between boxes and outputs

This commit is contained in:
Lofty 2022-05-10 19:12:39 +01:00
parent c862b1dbfb
commit c96e19bd43
2 changed files with 34 additions and 1 deletions

View file

@ -432,8 +432,12 @@ struct XAigerWriter
// that has been padded to its full width
if (bit == State::Sx)
continue;
// A bit might be simultaneously a box output
// and a primary output. The latter wins.
if (input_bits.count(bit))
continue;
if (aig_map.count(bit))
log_error("Visited AIG node more than once; this could be a combinatorial loop that has not been broken\n");
log_error("While visiting box outputs, found a signal bit more than once; this could be a combinatorial loop that has not been broken\n");
aig_map[bit] = 2*aig_m;
}

29
tests/various/bug3311.ys Normal file
View file

@ -0,0 +1,29 @@
read_rtlil <<EOT
# Generated by Yosys 0.16+61 (git sha1 3730db4b9, clang 13.0.1 -fPIC -Os)
autoidx 16887
attribute \blackbox 1
module \TRELLIS_IO
parameter \DIR
wire inout 1 \B
wire input 2 \I
wire output 3 \O
wire input 4 \T
end
attribute \top 1
module \icesugarpro_top
wire width 8 inout 1 \P5_pmod_low
attribute \hdlname "vt spi 1796"
cell $_DFF_PP0_ $auto$ff.cc:262:slice$16873
connect \C 1'x
connect \D 1'x
connect \Q \P5_pmod_low [3]
connect \R 1'x
end
connect \P5_pmod_low [7:4] 4'x
end
EOT
read_verilog -lib -specify +/ecp5/cells_sim.v
techmap -map +/ecp5/cells_map.v
abc9