mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-05 10:50:25 +00:00
Added "yosys -D ALL"
This commit is contained in:
parent
09ffebb995
commit
9aa4b3309c
3 changed files with 22 additions and 6 deletions
|
@ -216,6 +216,7 @@ int main(int argc, char **argv)
|
|||
printf(" -D <header_id>[:<filename>]\n");
|
||||
printf(" dump the design when printing the specified log header to a file.\n");
|
||||
printf(" yosys_dump_<header_id>.il is used as filename if none is specified.\n");
|
||||
printf(" Use 'ALL' as <header_id> to dump at every header.\n");
|
||||
printf("\n");
|
||||
printf(" -V\n");
|
||||
printf(" print version information and exit\n");
|
||||
|
@ -322,13 +323,23 @@ int main(int argc, char **argv)
|
|||
case 'D':
|
||||
{
|
||||
auto args = split_tokens(optarg, ":");
|
||||
if (GetSize(args) == 1)
|
||||
args.push_back("yosys_dump_" + args[0] + ".il");
|
||||
if (GetSize(args) != 2) {
|
||||
fprintf(stderr, "Invalid number of tokens in -D.\n");
|
||||
exit(1);
|
||||
if (!args.empty() && args[0] == "ALL") {
|
||||
if (GetSize(args) != 1) {
|
||||
fprintf(stderr, "Invalid number of tokens in -D ALL.\n");
|
||||
exit(1);
|
||||
}
|
||||
log_hdump_all = true;
|
||||
} else {
|
||||
if (!args.empty() && !args[0].empty() && args[0].back() == '.')
|
||||
args[0].pop_back();
|
||||
if (GetSize(args) == 1)
|
||||
args.push_back("yosys_dump_" + args[0] + ".il");
|
||||
if (GetSize(args) != 2) {
|
||||
fprintf(stderr, "Invalid number of tokens in -D.\n");
|
||||
exit(1);
|
||||
}
|
||||
log_hdump[args[0]].insert(args[1]);
|
||||
}
|
||||
log_hdump[args[0]].insert(args[1]);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue