From e1aaf715c6065c728e1dfe250ef419d1fc405553 Mon Sep 17 00:00:00 2001 From: gatecat Date: Fri, 14 May 2021 23:13:30 +0100 Subject: [PATCH] mistral: Compensate for EF_SEL mirroring in validity check Signed-off-by: gatecat --- mistral/lab.cc | 4 ++-- 1 file 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;