diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-02-15 12:57:41 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-02-15 12:57:41 +0100 |
commit | a54c994e2be340d3d036c160e5cd065a72fe5603 (patch) | |
tree | a15f9a1506df4d0f9c7c404c2bbb9e10582127c5 /passes/hierarchy | |
parent | 3216f9420e2f5aed0aa3e38ff89ab616db9b0849 (diff) | |
download | yosys-a54c994e2be340d3d036c160e5cd065a72fe5603.tar.gz yosys-a54c994e2be340d3d036c160e5cd065a72fe5603.tar.bz2 yosys-a54c994e2be340d3d036c160e5cd065a72fe5603.zip |
Cosmetic fixes in "hierarchy" for blackbox modules
Diffstat (limited to 'passes/hierarchy')
-rw-r--r-- | passes/hierarchy/hierarchy.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc index 58b796a62..8f2422bd0 100644 --- a/passes/hierarchy/hierarchy.cc +++ b/passes/hierarchy/hierarchy.cc @@ -268,7 +268,7 @@ void hierarchy_worker(RTLIL::Design *design, std::set<RTLIL::Module*> &used, RTL if (indent == 0) log("Top module: %s\n", mod->name.c_str()); - else + else if (!mod->get_bool_attribute("\\blackbox")) log("Used module: %*s%s\n", indent, "", mod->name.c_str()); used.insert(mod); @@ -295,6 +295,7 @@ void hierarchy(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib, bool f if (used.count(it.second) == 0) del_modules.push_back(it.second); + int del_counter = 0; for (auto mod : del_modules) { if (first_pass && mod->name.substr(0, 9) == "$abstract") continue; @@ -302,10 +303,11 @@ void hierarchy(RTLIL::Design *design, RTLIL::Module *top, bool purge_lib, bool f continue; log("Removing unused module `%s'.\n", mod->name.c_str()); design->modules_.erase(mod->name); + del_counter++; delete mod; } - log("Removed %d unused modules.\n", GetSize(del_modules)); + log("Removed %d unused modules.\n", del_counter); } bool set_keep_assert(std::map<RTLIL::Module*, bool> &cache, RTLIL::Module *mod) |