diff options
author | Mingyu Gao <mgao12@stanford.edu> | 2015-08-10 13:14:21 -0700 |
---|---|---|
committer | Mingyu Gao <mgao12@stanford.edu> | 2015-08-11 09:51:08 -0700 |
commit | cbda56d178f17ae963bb0ea2f295e222a25c25b4 (patch) | |
tree | 90a04ec57dca2f976d051c99e6ee2fe00796df6a | |
parent | 021b4a24364607de81e5b2dfdd4764d367c5bfb5 (diff) | |
download | yosys-cbda56d178f17ae963bb0ea2f295e222a25c25b4.tar.gz yosys-cbda56d178f17ae963bb0ea2f295e222a25c25b4.tar.bz2 yosys-cbda56d178f17ae963bb0ea2f295e222a25c25b4.zip |
Remove unused blackbox modules in opt_clean.
-rw-r--r-- | passes/opt/opt_clean.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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(); |