aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2021-07-27 15:43:36 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-07-27 20:44:45 +0200
commita0e912ba9996536f5eab9989e7119d91b20545f4 (patch)
tree85b4cf71d5639793cb54911bebb09e7b61ea4323
parent436d42c00c2bf1b2eaf84ada388d8aaab65da086 (diff)
downloadyosys-a0e912ba9996536f5eab9989e7119d91b20545f4.tar.gz
yosys-a0e912ba9996536f5eab9989e7119d91b20545f4.tar.bz2
yosys-a0e912ba9996536f5eab9989e7119d91b20545f4.zip
proc: Run opt_expr at the end
-rw-r--r--passes/proc/proc.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/passes/proc/proc.cc b/passes/proc/proc.cc
index 2dfc30e87..d7aac57b6 100644
--- a/passes/proc/proc.cc
+++ b/passes/proc/proc.cc
@@ -45,6 +45,7 @@ struct ProcPass : public Pass {
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");
@@ -61,12 +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();
@@ -86,6 +91,10 @@ struct ProcPass : public Pass {
ifxmode = true;
continue;
}
+ if (args[argidx] == "-noopt") {
+ noopt = true;
+ continue;
+ }
break;
}
extra_args(args, argidx, design);
@@ -105,6 +114,8 @@ struct ProcPass : public Pass {
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();
}