mirror of https://github.com/YosysHQ/yosys.git
Remove dupe
This commit is contained in:
parent
a54822b1bc
commit
295bd8d0bf
|
@ -552,7 +552,7 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri
|
||||||
|
|
||||||
// Remove all AND, NOT, and ABC box instances
|
// Remove all AND, NOT, and ABC box instances
|
||||||
// in preparation for stitching mapped_mod in
|
// in preparation for stitching mapped_mod in
|
||||||
pool<IdString> erased_boxes;
|
dict<IdString, decltype(RTLIL::Cell::parameters)> erased_boxes;
|
||||||
for (auto it = module->cells_.begin(); it != module->cells_.end(); ) {
|
for (auto it = module->cells_.begin(); it != module->cells_.end(); ) {
|
||||||
RTLIL::Cell* cell = it->second;
|
RTLIL::Cell* cell = it->second;
|
||||||
if (cell->type.in("$_AND_", "$_NOT_")) {
|
if (cell->type.in("$_AND_", "$_NOT_")) {
|
||||||
|
@ -561,7 +561,7 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri
|
||||||
}
|
}
|
||||||
RTLIL::Module* box_module = design->module(cell->type);
|
RTLIL::Module* box_module = design->module(cell->type);
|
||||||
if (box_module && box_module->attributes.count("\\abc_box_id")) {
|
if (box_module && box_module->attributes.count("\\abc_box_id")) {
|
||||||
erased_boxes.insert(it->first);
|
erased_boxes.insert(std::make_pair(it->first, std::move(cell->parameters)));
|
||||||
it = module->cells_.erase(it);
|
it = module->cells_.erase(it);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -645,8 +645,11 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *current_module, std::stri
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
log_assert(erased_boxes.count(c->name));
|
auto it = erased_boxes.find(c->name);
|
||||||
|
log_assert(it != erased_boxes.end());
|
||||||
|
c->parameters = std::move(it->second);
|
||||||
|
}
|
||||||
|
|
||||||
RTLIL::Cell* cell = module->addCell(remap_name(c->name), c->type);
|
RTLIL::Cell* cell = module->addCell(remap_name(c->name), c->type);
|
||||||
if (markgroups) cell->attributes["\\abcgroup"] = map_autoidx;
|
if (markgroups) cell->attributes["\\abcgroup"] = map_autoidx;
|
||||||
|
@ -1226,9 +1229,6 @@ struct Abc9Pass : public Pass {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod->attributes.count("\\abc_box_id"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
assign_map.set(mod);
|
assign_map.set(mod);
|
||||||
signal_init.clear();
|
signal_init.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue