aboutsummaryrefslogtreecommitdiffstats
path: root/mistral
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-05-14 23:13:30 +0100
committergatecat <gatecat@ds0.me>2021-05-15 14:54:33 +0100
commite1aaf715c6065c728e1dfe250ef419d1fc405553 (patch)
tree4da6e2c4a59ef797f70b6bd0882a048ee7b4c416 /mistral
parent87ebada258dbb6aa4bdf5552ed7a3dc85fcdf17c (diff)
downloadnextpnr-e1aaf715c6065c728e1dfe250ef419d1fc405553.tar.gz
nextpnr-e1aaf715c6065c728e1dfe250ef419d1fc405553.tar.bz2
nextpnr-e1aaf715c6065c728e1dfe250ef419d1fc405553.zip
mistral: Compensate for EF_SEL mirroring in validity check
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'mistral')
-rw-r--r--mistral/lab.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/mistral/lab.cc b/mistral/lab.cc
index 50ef7b11..838c72a3 100644
--- a/mistral/lab.cc
+++ b/mistral/lab.cc
@@ -384,8 +384,8 @@ bool Arch::is_alm_legal(uint32_t lab, uint8_t alm) const
// signals and SLOAD=1 (*PKREF*)
bool route_thru_lut_avail = !luts[i] && !carry_mode && (total_lut_inputs < 8) && (used_lut_bits < 64);
// E/F is available if this LUT is using 3 or fewer inputs - this is conservative and sharing can probably
- // improve this situation
- bool ef_available = (!luts[i] || (luts[i]->combInfo.used_lut_input_count <= 2));
+ // improve this situation. (1 - i) because the F input to EF_SEL is mirrored.
+ bool ef_available = (!luts[1 - i] || (luts[1 - i]->combInfo.used_lut_input_count <= 2));
// Control set checking
bool found_ff = false;