Remove unused blackbox modules in opt_clean.
authorMingyu Gao <mgao12@stanford.edu>
Mon, 10 Aug 2015 20:14:21 +0000 (13:14 -0700)
committerMingyu Gao <mgao12@stanford.edu>
Tue, 11 Aug 2015 16:51:08 +0000 (09:51 -0700)
passes/opt/opt_clean.cc

index 16d6add8e706e791dd5eab18df51543900901e18..3f1d83b9c7e9c8b468aa5b7ac8dd2202c5325da3 100644 (file)
@@ -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();