sw: Fix logic to determine when to enable the output drivers

Before, it was always enabling all outputs,
even when they should have been tristated.
sw
Markus Koch 2019-09-23 21:28:54 +02:00
parent 98a7a5d170
commit 7bb7049eea
1 changed files with 2 additions and 6 deletions

View File

@ -235,15 +235,11 @@ char *fpga_cell_lut34_isp_generate_bitstream(struct fpga_cell *cell)
"Couldn't set LUT output sel %d for output %d.", temp, i);
}
for (i = 0; i < 2; ++i) {
temp = fpga_cell_bitstream_is_set(sbuf, LUT_OUT_BITMAP[i][0]); /* At some point, we set a specific output on this MUX */
for (i = 0; i < 4; ++i) {
temp = fpga_cell_lut34_is_driven(lut34->drive_sel[i]);
BS_SET_BIT(LUT_OUT_EN_N_BITMAP[i], !temp,
"Couldn't %s output for output %d.",
(!temp ? "enable" : "disabled"), i);
if (!temp) {
BS_SET_BITS(0, 2 , LUT_OUT_BITMAP[i],
"Couldn't set LUT output sel 0 for output %d (undriven by user logic).", i);
}
}
/* Routing */