aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ice40/cells.cc')
-rw-r--r--ice40/cells.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ice40/cells.cc b/ice40/cells.cc
index 7abf83ff..004bdb30 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -101,16 +101,18 @@ void dff_to_lc(CellInfo *dff, CellInfo *lc, bool pass_thru_lut)
if (citer != config.end()) {
if ((config.end() - citer) >= 2) {
assert(*(citer++) == 'S');
- lc->params["ASYNC_SR"] = "1";
- } else {
lc->params["ASYNC_SR"] = "0";
+ } else {
+ lc->params["ASYNC_SR"] = "1";
}
if (*citer == 'S') {
+ citer++;
replace_port(dff, "S", lc, "SR");
lc->params["SET_NORESET"] = "1";
} else {
assert(*citer == 'R');
+ citer++;
replace_port(dff, "R", lc, "SR");
lc->params["SET_NORESET"] = "0";
}