Skip to content

Commit f7ad003

Browse files
authored
Merge pull request #4802 from povik/abc9-box-repeat
Adjust `abc9_ops -prep_box` to allow repeated invocation
2 parents ea38fcc + f3f8037 commit f7ad003

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

passes/techmap/abc9_ops.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -969,13 +969,10 @@ void prep_box(RTLIL::Design *design)
969969
if (it == module->attributes.end())
970970
continue;
971971
bool box = it->second.as_bool();
972-
module->attributes.erase(it);
973972
if (!box)
974973
continue;
975974

976975
auto r = module->attributes.insert(ID::abc9_box_id);
977-
if (!r.second)
978-
continue;
979976
r.first->second = abc9_box_id++;
980977

981978
if (module->get_bool_attribute(ID::abc9_flop)) {
@@ -1097,8 +1094,9 @@ void prep_box(RTLIL::Design *design)
10971094
ss << std::endl;
10981095

10991096
auto &t = timing.setup_module(module);
1100-
if (t.comb.empty())
1097+
if (t.comb.empty() && !outputs.empty() && !inputs.empty()) {
11011098
log_error("Module '%s' with (* abc9_box *) has no timing (and thus no connectivity) information.\n", log_id(module));
1099+
}
11021100

11031101
for (const auto &o : outputs) {
11041102
first = true;

0 commit comments

Comments
 (0)