diff options
Diffstat (limited to 'passes/proc/proc.cc')
-rw-r--r-- | passes/proc/proc.cc | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/passes/proc/proc.cc b/passes/proc/proc.cc index f20a167b4..d7aac57b6 100644 --- a/passes/proc/proc.cc +++ b/passes/proc/proc.cc @@ -1,7 +1,7 @@ /* * yosys -- Yosys Open SYnthesis Suite * - * Copyright (C) 2012 Clifford Wolf <clifford@clifford.at> + * Copyright (C) 2012 Claire Xenia Wolf <claire@yosyshq.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -43,13 +43,18 @@ struct ProcPass : public Pass { log(" proc_mux\n"); log(" proc_dlatch\n"); log(" proc_dff\n"); + log(" proc_memwr\n"); log(" proc_clean\n"); + log(" opt_expr -keepdc\n"); log("\n"); log("This replaces the processes in the design with multiplexers,\n"); log("flip-flops and latches.\n"); log("\n"); log("The following options are supported:\n"); log("\n"); + log(" -nomux\n"); + log(" Will omit the proc_mux pass.\n"); + log("\n"); log(" -global_arst [!]<netname>\n"); log(" This option is passed through to proc_arst.\n"); log("\n"); @@ -57,11 +62,16 @@ struct ProcPass : public Pass { log(" This option is passed through to proc_mux. proc_rmdead is not\n"); log(" executed in -ifx mode.\n"); log("\n"); + log(" -noopt\n"); + log(" Will omit the opt_expr pass.\n"); + log("\n"); } void execute(std::vector<std::string> args, RTLIL::Design *design) override { std::string global_arst; bool ifxmode = false; + bool nomux = false; + bool noopt = false; log_header(design, "Executing PROC pass (convert processes to netlists).\n"); log_push(); @@ -69,6 +79,10 @@ struct ProcPass : public Pass { size_t argidx; for (argidx = 1; argidx < args.size(); argidx++) { + if (args[argidx] == "-nomux") { + nomux = true; + continue; + } if (args[argidx] == "-global_arst" && argidx+1 < args.size()) { global_arst = args[++argidx]; continue; @@ -77,6 +91,10 @@ struct ProcPass : public Pass { ifxmode = true; continue; } + if (args[argidx] == "-noopt") { + noopt = true; + continue; + } break; } extra_args(args, argidx, design); @@ -90,10 +108,14 @@ struct ProcPass : public Pass { Pass::call(design, "proc_arst"); else Pass::call(design, "proc_arst -global_arst " + global_arst); - Pass::call(design, ifxmode ? "proc_mux -ifx" : "proc_mux"); + if (!nomux) + Pass::call(design, ifxmode ? "proc_mux -ifx" : "proc_mux"); Pass::call(design, "proc_dlatch"); Pass::call(design, "proc_dff"); + Pass::call(design, "proc_memwr"); Pass::call(design, "proc_clean"); + if (!noopt) + Pass::call(design, "opt_expr -keepdc"); log_pop(); } |