diff options
author | gatecat <gatecat@ds0.me> | 2021-05-15 11:53:04 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 34677d38837af88729a217fea7617c892dfb5a95 (patch) | |
tree | 20931701400024d6e80a32ad3d9396d4406d7623 | |
parent | 9221acc9e211766d79d7c7dde5d5fc8bb053354d (diff) | |
download | nextpnr-34677d38837af88729a217fea7617c892dfb5a95.tar.gz nextpnr-34677d38837af88729a217fea7617c892dfb5a95.tar.bz2 nextpnr-34677d38837af88729a217fea7617c892dfb5a95.zip |
mistral: Workaround for weird SCLR issue
Signed-off-by: gatecat <gatecat@ds0.me>
-rw-r--r-- | mistral/lab.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mistral/lab.cc b/mistral/lab.cc index d34cc0ca..a6512c9a 100644 --- a/mistral/lab.cc +++ b/mistral/lab.cc @@ -322,6 +322,13 @@ void Arch::assign_ff_info(CellInfo *cell) const cell->ffInfo.ctrlset.aclr = get_ctrlsig(getCtx(), cell, id_ACLR); cell->ffInfo.ctrlset.sclr = get_ctrlsig(getCtx(), cell, id_SCLR); cell->ffInfo.ctrlset.sload = get_ctrlsig(getCtx(), cell, id_SLOAD); + // If SCLR is used, but SLOAD isn't, then it seems like we need to pretend as if SLOAD is connected GND (so set + // [BT]SLOAD_EN inside the ALMs, and clear SLOAD_INV) + if (cell->ffInfo.ctrlset.sclr.net != nullptr && cell->ffInfo.ctrlset.sload.net == nullptr) { + cell->ffInfo.ctrlset.sload.net = nets.at(id("$PACKER_GND_NET")).get(); + cell->ffInfo.ctrlset.sload.inverted = false; + } + cell->ffInfo.sdata = get_net_or_empty(cell, id_SDATA); cell->ffInfo.datain = get_net_or_empty(cell, id_DATAIN); } |