diff options
author | gatecat <gatecat@ds0.me> | 2021-05-12 21:21:33 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 3d1bb4f1b217b020e750277dd1ee2e4d3516b58f (patch) | |
tree | 01f68fe1da6f26afed4f9c3bb248b3eb1767a0f7 /mistral/bitstream.cc | |
parent | 2f2fde7e6cd687433c687b1f678ceb4bd25f588e (diff) | |
download | nextpnr-3d1bb4f1b217b020e750277dd1ee2e4d3516b58f.tar.gz nextpnr-3d1bb4f1b217b020e750277dd1ee2e4d3516b58f.tar.bz2 nextpnr-3d1bb4f1b217b020e750277dd1ee2e4d3516b58f.zip |
mistral: Carry debugging
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral/bitstream.cc')
-rw-r--r-- | mistral/bitstream.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mistral/bitstream.cc b/mistral/bitstream.cc index 713ca9bb..a9eaeff2 100644 --- a/mistral/bitstream.cc +++ b/mistral/bitstream.cc @@ -223,8 +223,11 @@ struct MistralBitgen cv->bmux_m_set(CycloneV::LAB, pos, CycloneV::BDFF1, alm, CycloneV::NLUT); cv->bmux_m_set(CycloneV::LAB, pos, CycloneV::BDFF1L, alm, CycloneV::NLUT); - if ((luts[0] && luts[0]->combInfo.is_carry) || (luts[1] && luts[1]->combInfo.is_carry)) + bool is_carry = (luts[0] && luts[0]->combInfo.is_carry) || (luts[1] && luts[1]->combInfo.is_carry); + if (is_carry) cv->bmux_m_set(CycloneV::LAB, pos, CycloneV::ARITH_SEL, alm, CycloneV::ADDER); + if (is_carry && alm == 0 && luts[0]->combInfo.carry_start) + cv->bmux_b_set(CycloneV::LAB, pos, CycloneV::TTO_DIS, alm, true); } void write_labs() |