diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-28 09:20:10 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-28 09:20:10 +0100 |
commit | 7bfc7b61a812e10177674def2f640d82cee49791 (patch) | |
tree | cf76a644db7174a9ea6571ad1412f0e23f933681 /kernel | |
parent | 98fcb5daa361c9de56ce75d9416d4eeffd01cc85 (diff) | |
download | yosys-7bfc7b61a812e10177674def2f640d82cee49791.tar.gz yosys-7bfc7b61a812e10177674def2f640d82cee49791.tar.bz2 yosys-7bfc7b61a812e10177674def2f640d82cee49791.zip |
Implemented proper handling of stub placeholder modules
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/show.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/show.cc b/kernel/show.cc index 244a4d08e..33589ca03 100644 --- a/kernel/show.cc +++ b/kernel/show.cc @@ -352,8 +352,12 @@ struct ShowWorker if (!design->selected_module(module->name)) continue; if (design->selected_whole_module(module->name)) { + if (module->attributes.count("\\placeholder") > 0) { + log("Skipping placeholder module %s.\n", id2cstr(module->name)); + continue; + } else if (module->cells.empty() && module->connections.empty()) { - log("Skipping skeletton module %s.\n", id2cstr(module->name)); + log("Skipping empty module %s.\n", id2cstr(module->name)); continue; } else log("Dumping module %s to page %d.\n", id2cstr(module->name), ++page_counter); @@ -461,9 +465,14 @@ struct ShowPass : public Pass { if (format != "ps") { int modcount = 0; - for (auto &mod_it : design->modules) + for (auto &mod_it : design->modules) { + if (mod_it.second->attributes.count("\\placeholder") > 0) + continue; + if (mod_it.second->cells.empty() && mod_it.second->connections.empty()) + continue; if (design->selected_module(mod_it.first)) modcount++; + } if (modcount > 1) log_cmd_error("For formats different than 'ps' only one module must be selected.\n"); } |