nexus: Fix some IO FASM gen

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2021-03-30 12:04:01 +01:00
parent 7ae3f636ef
commit 99298d0aba

View File

@ -385,9 +385,13 @@ struct NexusFasmWriter
} else if (tmux == PINMUX_1 || t == nullptr) {
is_input = true;
}
auto &bank = bank_cfg[ctx->get_bel_pad(bel)->bank];
if (is_lifcl_17 && (is_output || !is_input))
bank.diff_used = true; // what exactly should this bit be called?
const char *iodir = is_input ? "INPUT" : (is_output ? "OUTPUT" : "BIDIR");
write_bit(stringf("BASE_TYPE.%s_%s", iodir, str_or_default(cell->attrs, id_IO_TYPE, "LVCMOS18H").c_str()));
write_ioattr(cell, "PULLMODE", "NONE");
write_ioattr(cell, "SLEWRATE", "MED");
pop();
write_cell_muxes(cell);
pop();