diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-09-03 19:10:11 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-09-03 19:10:11 +0200 |
commit | 73914d1a414ad2277beca87fe1c52a564a796481 (patch) | |
tree | 7c3f53c65456a3ae5ad037e5b949aa8c36e30ec8 /backends/ilang | |
parent | 5059b3166098044a87b3d0b7f3ae2957df7e6194 (diff) | |
download | yosys-73914d1a414ad2277beca87fe1c52a564a796481.tar.gz yosys-73914d1a414ad2277beca87fe1c52a564a796481.tar.bz2 yosys-73914d1a414ad2277beca87fe1c52a564a796481.zip |
Added -selected option to various backends
Diffstat (limited to 'backends/ilang')
-rw-r--r-- | backends/ilang/ilang_backend.cc | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/backends/ilang/ilang_backend.cc b/backends/ilang/ilang_backend.cc index 503164d43..5d70457e8 100644 --- a/backends/ilang/ilang_backend.cc +++ b/backends/ilang/ilang_backend.cc @@ -342,12 +342,29 @@ struct IlangBackend : public Backend { log("Write the current design to an 'ilang' file. (ilang is a text representation\n"); log("of a design in yosys's internal format.)\n"); log("\n"); + log(" -selected\n"); + log(" only write selected parts of the design.\n"); + log("\n"); } - virtual void execute(FILE *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) { + virtual void execute(FILE *&f, std::string filename, std::vector<std::string> args, RTLIL::Design *design) + { + bool selected = false; + log_header("Executing ILANG backend.\n"); - extra_args(f, filename, args, 1); + + size_t argidx; + for (argidx = 1; argidx < args.size(); argidx++) { + std::string arg = args[argidx]; + if (arg == "-selected") { + selected = true; + continue; + } + break; + } + extra_args(f, filename, args, argidx); + log("Output filename: %s\n", filename.c_str()); - ILANG_BACKEND::dump_design(f, design, false); + ILANG_BACKEND::dump_design(f, design, selected); } } IlangBackend; |