aboutsummaryrefslogtreecommitdiffstats
path: root/passes/hierarchy/hierarchy.cc
diff options
context:
space:
mode:
authorJim Lawson <ucbjrl@berkeley.edu>2019-02-22 16:06:10 -0800
committerJim Lawson <ucbjrl@berkeley.edu>2019-02-22 16:06:10 -0800
commit71bcc4c644b0dafa760ff8b6d7bd1109836be621 (patch)
treead0577feb454de2a87ca6677bed6e9828f0faa8b /passes/hierarchy/hierarchy.cc
parent5c4a72c43ef61420b4b099d87949b0fdba0f4b55 (diff)
downloadyosys-71bcc4c644b0dafa760ff8b6d7bd1109836be621.tar.gz
yosys-71bcc4c644b0dafa760ff8b6d7bd1109836be621.tar.bz2
yosys-71bcc4c644b0dafa760ff8b6d7bd1109836be621.zip
Address requested changes - don't require non-$ name.
Suppress warning if name does begin with a `$`. Fix hierachy tests so they have something to grep. Announce hierarchy test types.
Diffstat (limited to 'passes/hierarchy/hierarchy.cc')
-rw-r--r--passes/hierarchy/hierarchy.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc
index f112e969e..cb54ffa58 100644
--- a/passes/hierarchy/hierarchy.cc
+++ b/passes/hierarchy/hierarchy.cc
@@ -525,14 +525,14 @@ int find_top_mod_score(Design *design, Module *module, dict<Module*, int> &db)
celltype = basic_cell_type(celltype);
}
// Is this cell a module instance?
- if (celltype[0] != '$') {
- auto instModule = design->module(celltype);
- // If there is no instance for this, issue a warning.
- if (instModule == NULL) {
+ auto instModule = design->module(celltype);
+ // If there is no instance for this, issue a warning.
+ if (instModule == NULL) {
+ // but only if we're sure it is a reference to a module.
+ if (celltype[0] != '$')
log_warning("find_top_mod_score: no instance for %s.%s\n", celltype.c_str(), cell->name.c_str());
- } else {
- score = max(score, find_top_mod_score(design, instModule, db) + 1);
- }
+ } else {
+ score = max(score, find_top_mod_score(design, instModule, db) + 1);
}
}
db[module] = score;