aboutsummaryrefslogtreecommitdiffstats
path: root/passes
diff options
context:
space:
mode:
Diffstat (limited to 'passes')
-rw-r--r--passes/hierarchy/hierarchy.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc
index 524d57854..c680dbbd8 100644
--- a/passes/hierarchy/hierarchy.cc
+++ b/passes/hierarchy/hierarchy.cc
@@ -625,16 +625,15 @@ struct HierarchyPass : public Pass {
for (auto module : design->modules())
for (auto cell : module->cells())
{
- if (GetSize(cell->parameters) != 0)
- continue;
-
Module *m = design->module(cell->type);
if (m == nullptr)
continue;
- if (m->get_bool_attribute("\\blackbox") && cell->parameters.size()) {
- IdString new_m_name = m->derive(design, cell->parameters);
+ if (m->get_bool_attribute("\\blackbox") && !cell->parameters.empty()) {
+ IdString new_m_name = m->derive(design, cell->parameters, true);
+ if (new_m_name.empty())
+ continue;
if (new_m_name != m->name) {
m = design->module(new_m_name);
blackbox_derivatives.insert(m);