Skip to content

Commit 481d596

Browse files
committed
abc9_ops -prep_box: Adjust for repeated invocation
`abc9_ops -prep_box` command interprets the `abc9_box` attribute and prepares a .box file for ABC consumption. Previously this command was removing the attribute as it was processing each module which prevented repeated invocation of this command unless the box definitions were refreshed from a source file. Also the command was keeping existing `abc9_box_id` attributes instead of overwriting them with values from a new number sequence. Change both behaviors to allow repeated invocations of the command on the same design.
1 parent 66734f5 commit 481d596

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

passes/techmap/abc9_ops.cc

Lines changed: 0 additions & 3 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)) {

0 commit comments

Comments
 (0)