Skip to content

Commit

Permalink
Merge pull request #4802 from povik/abc9-box-repeat
Browse files Browse the repository at this point in the history
Adjust `abc9_ops -prep_box` to allow repeated invocation
  • Loading branch information
povik authored Dec 10, 2024
2 parents ea38fcc + f3f8037 commit f7ad003
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions passes/techmap/abc9_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f7ad003

Please sign in to comment.