aboutsummaryrefslogtreecommitdiffstats
path: root/passes/sat
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-10 15:58:01 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-10 15:58:01 -0700
commitcea7441d8ae7df8d22f510e6a101ec46a9d7751e (patch)
tree8067ba09ecfaf6d9cf32e8ed9adba42be27b86a4 /passes/sat
parentc865559f9540c29cb9c6302edc8b4a2620c0b49d (diff)
parentbb2144ae733f1a2c5e629a8251bfbdcc15559aa4 (diff)
downloadyosys-cea7441d8ae7df8d22f510e6a101ec46a9d7751e.tar.gz
yosys-cea7441d8ae7df8d22f510e6a101ec46a9d7751e.tar.bz2
yosys-cea7441d8ae7df8d22f510e6a101ec46a9d7751e.zip
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'passes/sat')
-rw-r--r--passes/sat/clk2fflogic.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/passes/sat/clk2fflogic.cc b/passes/sat/clk2fflogic.cc
index 49ec795d3..4bb4aa047 100644
--- a/passes/sat/clk2fflogic.cc
+++ b/passes/sat/clk2fflogic.cc
@@ -253,6 +253,13 @@ struct Clk2fflogicPass : public Pass {
SigSpec qval = module->Mux(NEW_ID, past_q, past_d, clock_edge);
Const rstval = cell->parameters["\\ARST_VALUE"];
+ Wire *past_arst = module->addWire(NEW_ID);
+ module->addFf(NEW_ID, arst, past_arst);
+ if (cell->parameters["\\ARST_POLARITY"].as_bool())
+ arst = module->LogicOr(NEW_ID, arst, past_arst);
+ else
+ arst = module->LogicAnd(NEW_ID, arst, past_arst);
+
if (cell->parameters["\\ARST_POLARITY"].as_bool())
module->addMux(NEW_ID, qval, rstval, arst, sig_q);
else