diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc index b2568a313..bb2f77069 100644 --- a/passes/opt/opt_clean.cc +++ b/passes/opt/opt_clean.cc @@ -350,6 +350,11 @@ struct OptCleanPass : public Pass { ct.setup_stdcells(); ct.setup_stdcells_mem(); + for (auto module : design->modules()) { + if (module->get_bool_attribute("\\blackbox")) + ct.setup_module(module); + } + ct_reg.setup_internals_mem(); ct_reg.setup_stdcells_mem(); @@ -409,6 +414,11 @@ struct CleanPass : public Pass { ct.setup_stdcells(); ct.setup_stdcells_mem(); + for (auto module : design->modules()) { + if (module->get_bool_attribute("\\blackbox")) + ct.setup_module(module); + } + ct_reg.setup_internals_mem(); ct_reg.setup_stdcells_mem();