projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35a02ee
)
Added check: only one module for "show" unless format is "ps"
author
Clifford Wolf
<clifford@clifford.at>
Wed, 27 Mar 2013 17:31:42 +0000
(18:31 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Wed, 27 Mar 2013 17:31:42 +0000
(18:31 +0100)
kernel/show.cc
patch
|
blob
|
history
diff --git
a/kernel/show.cc
b/kernel/show.cc
index e95d13171757fc583e330f9f755a70dfe02ddade..244a4d08e022cd1f781a1f015f86aadf7684b90c 100644
(file)
--- a/
kernel/show.cc
+++ b/
kernel/show.cc
@@
-459,6
+459,15
@@
struct ShowPass : public Pass {
}
extra_args(args, argidx, design);
+ if (format != "ps") {
+ int modcount = 0;
+ for (auto &mod_it : design->modules)
+ 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");
+ }
+
for (auto filename : libfiles) {
FILE *f = fopen(filename.c_str(), "rt");
if (f == NULL)