aboutsummaryrefslogtreecommitdiffstats
path: root/ice40/cells.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-12 14:27:04 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-12 14:27:04 +0200
commit95fb0595a591dd68ccb4b39ec0b20738ac047978 (patch)
treedf38d834c33e961ba8038ff06e16ca40380b2635 /ice40/cells.cc
parent9ee6a6e1149e35bcca3c1781f6ce84b11dc80296 (diff)
downloadnextpnr-95fb0595a591dd68ccb4b39ec0b20738ac047978.tar.gz
nextpnr-95fb0595a591dd68ccb4b39ec0b20738ac047978.tar.bz2
nextpnr-95fb0595a591dd68ccb4b39ec0b20738ac047978.zip
ice40: Debugging and fixing FF configuration
Signed-off-by: David Shah <davey1576@gmail.com>
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 6ad9d136..d187d492 100644
--- a/ice40/cells.cc
+++ b/ice40/cells.cc
@@ -99,16 +99,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";
}