From cbda56d178f17ae963bb0ea2f295e222a25c25b4 Mon Sep 17 00:00:00 2001 From: Mingyu Gao Date: Mon, 10 Aug 2015 13:14:21 -0700 Subject: [PATCH] Remove unused blackbox modules in opt_clean. --- passes/opt/opt_clean.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/passes/opt/opt_clean.cc b/passes/opt/opt_clean.cc index 16d6add8e..3f1d83b9c 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(); @@ -406,6 +411,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(); -- 2.30.2