mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #4802 from povik/abc9-box-repeat
Adjust `abc9_ops -prep_box` to allow repeated invocation
This commit is contained in:
commit
f7ad003a6f
|
@ -969,13 +969,10 @@ void prep_box(RTLIL::Design *design)
|
|||
if (it == module->attributes.end())
|
||||
continue;
|
||||
bool box = it->second.as_bool();
|
||||
module->attributes.erase(it);
|
||||
if (!box)
|
||||
continue;
|
||||
|
||||
auto r = module->attributes.insert(ID::abc9_box_id);
|
||||
if (!r.second)
|
||||
continue;
|
||||
r.first->second = abc9_box_id++;
|
||||
|
||||
if (module->get_bool_attribute(ID::abc9_flop)) {
|
||||
|
@ -1097,8 +1094,9 @@ void prep_box(RTLIL::Design *design)
|
|||
ss << std::endl;
|
||||
|
||||
auto &t = timing.setup_module(module);
|
||||
if (t.comb.empty())
|
||||
if (t.comb.empty() && !outputs.empty() && !inputs.empty()) {
|
||||
log_error("Module '%s' with (* abc9_box *) has no timing (and thus no connectivity) information.\n", log_id(module));
|
||||
}
|
||||
|
||||
for (const auto &o : outputs) {
|
||||
first = true;
|
||||
|
|
Loading…
Reference in New Issue