diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-06-15 19:36:55 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-06-15 19:36:55 -0700 |
commit | 2309459605b262040f7bea84e6d935d2838686d5 (patch) | |
tree | 4d31a758ed0f351a7a53d21174d5686d862ea218 /passes/techmap | |
parent | 9ec57b46c2f37ca9eafca8e0e919d676c74f99d8 (diff) | |
download | yosys-2309459605b262040f7bea84e6d935d2838686d5.tar.gz yosys-2309459605b262040f7bea84e6d935d2838686d5.tar.bz2 yosys-2309459605b262040f7bea84e6d935d2838686d5.zip |
Do not treat $__ABC_FF_ as a user cell
Diffstat (limited to 'passes/techmap')
-rw-r--r-- | passes/techmap/abc9.cc | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index e13cd0eef..decf5a6aa 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -512,26 +512,18 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri } } - // Remove all AND, NOT, and ABC box instances - // in preparation for stitching mapped_mod in - // Short $_FF_ cells used by ABC (FIXME) dict<IdString, decltype(RTLIL::Cell::parameters)> erased_boxes; - std::vector<RTLIL::Cell*> abc_dff; for (auto it = module->cells_.begin(); it != module->cells_.end(); ) { RTLIL::Cell* cell = it->second; - if (cell->type.in("$_AND_", "$_NOT_")) { + if (cell->type.in("$_AND_", "$_NOT_", "$__ABC_FF_")) { it = module->cells_.erase(it); continue; } - if (cell->type.in("$__ABC_FF_")) - abc_dff.emplace_back(cell); - else { - RTLIL::Module* box_module = design->module(cell->type); - if (box_module && box_module->attributes.count("\\abc_box_id")) { - erased_boxes.insert(std::make_pair(it->first, std::move(cell->parameters))); - it = module->cells_.erase(it); - continue; - } + RTLIL::Module* box_module = design->module(cell->type); + if (box_module && box_module->attributes.count("\\abc_box_id")) { + erased_boxes.insert(std::make_pair(it->first, std::move(cell->parameters))); + it = module->cells_.erase(it); + continue; } ++it; } @@ -695,13 +687,6 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri } } - for (auto cell : abc_dff) { - RTLIL::SigBit D = cell->getPort("\\D"); - RTLIL::SigBit Q = cell->getPort("\\Q"); - module->connect(Q, D); - module->remove(cell); - } - //log("ABC RESULTS: internal signals: %8d\n", int(signal_list.size()) - in_wires - out_wires); log("ABC RESULTS: input signals: %8d\n", in_wires); log("ABC RESULTS: output signals: %8d\n", out_wires); |