abc_new: Support abc9_box mode on ordinary design hierarchy

Previously the `abc9_box` mode was reserved to modules with the
`blackbox` or `whitebox` attribute. Allow `abc9_box` on ordinary modules
when doing hierarchical synthesis.
This commit is contained in:
Martin Povišer
2024-12-10 14:27:29 +01:00
parent 285f24d764
commit 2a3f60bc06
2 changed files with 39 additions and 2 deletions
+2 -1
View File
@@ -1078,7 +1078,8 @@ void prep_box(RTLIL::Design *design)
}
ss << log_id(module) << " " << module->attributes.at(ID::abc9_box_id).as_int();
ss << " " << (module->get_bool_attribute(ID::whitebox) ? "1" : "0");
bool has_model = module->get_bool_attribute(ID::whitebox) || !module->get_bool_attribute(ID::blackbox);
ss << " " << (has_model ? "1" : "0");
ss << " " << GetSize(inputs) << " " << GetSize(outputs) << std::endl;
bool first = true;