From c80315cea42414216bcc7b62acb2ef9a41b54eab Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 5 Jan 2018 13:28:45 +0100 Subject: Bugfix in hierarchy handling of blackbox module ports Signed-off-by: Clifford Wolf --- passes/hierarchy/hierarchy.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'passes') 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); -- cgit v1.2.3