diff options
author | Andrew Zonenberg <azonenberg@drawersteak.com> | 2016-04-22 19:07:55 -0700 |
---|---|---|
committer | Andrew Zonenberg <azonenberg@drawersteak.com> | 2016-04-22 19:07:55 -0700 |
commit | ab11f2aa701f4ff7a8df98d2a4158ea1f661a205 (patch) | |
tree | d2c8e2b82b7cca57127bd9dd54d3eb40386a88f7 /kernel/driver.cc | |
parent | d90c1e952256dc00d070863835e061d73e4bc6b3 (diff) | |
parent | 7311be4028a9caad5a0fac1a3433220b4233ef84 (diff) | |
download | yosys-ab11f2aa701f4ff7a8df98d2a4158ea1f661a205.tar.gz yosys-ab11f2aa701f4ff7a8df98d2a4158ea1f661a205.tar.bz2 yosys-ab11f2aa701f4ff7a8df98d2a4158ea1f661a205.zip |
Merge https://github.com/cliffordwolf/yosys
Diffstat (limited to 'kernel/driver.cc')
-rw-r--r-- | kernel/driver.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc index a41d0e8cb..0844eaa2e 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -213,6 +213,10 @@ int main(int argc, char **argv) printf(" -A\n"); printf(" will call abort() at the end of the script. for debugging\n"); printf("\n"); + 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("\n"); printf(" -V\n"); printf(" print version information and exit\n"); printf("\n"); @@ -233,7 +237,7 @@ int main(int argc, char **argv) } int opt; - while ((opt = getopt(argc, argv, "MXAQTVSm:f:Hh:b:o:p:l:L:qv:tds:c:")) != -1) + while ((opt = getopt(argc, argv, "MXAQTVSm:f:Hh:b:o:p:l:L:qv:tds:c:D:")) != -1) { switch (opt) { @@ -315,6 +319,18 @@ int main(int argc, char **argv) scriptfile = optarg; scriptfile_tcl = true; break; + 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); + } + log_hdump[args[0]].insert(args[1]); + } + break; default: fprintf(stderr, "Run '%s -h' for help.\n", argv[0]); exit(1); |