3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-24 01:25:33 +00:00

Bugfix in hierarchy handling of blackbox module ports

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-01-05 13:28:45 +01:00
parent fefb652d56
commit c80315cea4
5 changed files with 10 additions and 9 deletions

View file

@ -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);