mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-14 09:56:16 +00:00
Added check: only one module for "show" unless format is "ps"
This commit is contained in:
parent
35a02ee81e
commit
92cf7ae2f7
1 changed files with 9 additions and 0 deletions
|
@ -459,6 +459,15 @@ struct ShowPass : public Pass {
|
||||||
}
|
}
|
||||||
extra_args(args, argidx, design);
|
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) {
|
for (auto filename : libfiles) {
|
||||||
FILE *f = fopen(filename.c_str(), "rt");
|
FILE *f = fopen(filename.c_str(), "rt");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue