mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #2082 from YosysHQ/eddie/abc9_scc_fixes
abc9: fixes around handling combinatorial loops
This commit is contained in:
commit
45cd323055
|
@ -156,7 +156,7 @@ struct XAigerWriter
|
|||
|
||||
// promote keep wires
|
||||
for (auto wire : module->wires())
|
||||
if (wire->get_bool_attribute(ID::keep))
|
||||
if (wire->get_bool_attribute(ID::keep) || wire->get_bool_attribute(ID::abc9_keep))
|
||||
sigmap.add(wire);
|
||||
|
||||
for (auto wire : module->wires()) {
|
||||
|
|
|
@ -719,8 +719,10 @@ void prep_xaiger(RTLIL::Module *module, bool dff)
|
|||
bit_users[bit].insert(cell->name);
|
||||
|
||||
if (cell->output(conn.first) && !abc9_flop)
|
||||
for (auto bit : sigmap(conn.second))
|
||||
bit_drivers[bit].insert(cell->name);
|
||||
for (const auto &chunk : conn.second.chunks())
|
||||
if (!chunk.wire->get_bool_attribute(ID::abc9_keep))
|
||||
for (auto b : sigmap(SigSpec(chunk)))
|
||||
bit_drivers[b].insert(cell->name);
|
||||
}
|
||||
toposort.node(cell->name);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
read_verilog <<EOT
|
||||
module top(input e, d, output q);
|
||||
reg l;
|
||||
always @*
|
||||
if (e)
|
||||
l = ~d;
|
||||
assign q = ~l;
|
||||
endmodule
|
||||
EOT
|
||||
# Can't run any sort of equivalence check because latches are blown to LUTs
|
||||
synth_ecp5 -abc9
|
||||
select -assert-count 2 t:LUT4
|
||||
select -assert-none t:LUT4 %% t:* %D
|
Loading…
Reference in New Issue