summaryrefslogtreecommitdiff
path: root/passes/hierarchy
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-07-29 16:33:56 +0200
committerClifford Wolf <clifford@clifford.at>2014-07-29 16:35:13 +0200
commit77e2d39cd079ba98340f55f57e8a6462fb709442 (patch)
treef37e97d7496fed7221f8fdbcb5e0a018fddeee50 /passes/hierarchy
parent03c96f9ce7120adf1c9bab93485a3b4bf6493ae9 (diff)
Allow "hierarchy -generate" for $__ cells
Diffstat (limited to 'passes/hierarchy')
-rw-r--r--passes/hierarchy/hierarchy.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc
index c869ec72..a1361c68 100644
--- a/passes/hierarchy/hierarchy.cc
+++ b/passes/hierarchy/hierarchy.cc
@@ -41,7 +41,9 @@ static void generate(RTLIL::Design *design, const std::vector<std::string> &cell
for (auto i2 : i1.second->cells_)
{
RTLIL::Cell *cell = i2.second;
- if (cell->type[0] == '$' || design->modules_.count(cell->type) > 0)
+ if (design->has(cell->type))
+ continue;
+ if (cell->type.substr(0, 1) == "$" && cell->type.substr(0, 3) != "$__")
continue;
for (auto &pattern : celltypes)
if (!fnmatch(pattern.c_str(), RTLIL::unescape_id(cell->type).c_str(), FNM_NOESCAPE))