From 3e6e0273dd8772d4838c968df13706f2ca9fd6b0 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 14 Jan 2025 15:17:18 +0100 Subject: [PATCH] Simplify inversion of special signals --- himbaechel/uarch/gatemate/gatemate.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/himbaechel/uarch/gatemate/gatemate.cc b/himbaechel/uarch/gatemate/gatemate.cc index 1e38aed6..dca1e4b6 100644 --- a/himbaechel/uarch/gatemate/gatemate.cc +++ b/himbaechel/uarch/gatemate/gatemate.cc @@ -103,7 +103,7 @@ void updateINV(Context *ctx, CellInfo *cell, IdString port) if (!extra_data.name) continue; if (extra_data.type == PipExtra::PIP_EXTRA_MUX && (extra_data.flags & MUX_CPE_INV)) { - cell->params[port] = Property(init_val==1 ? 2 : 1, 2); + cell->params[port] = Property(3 - init_val, 2); } } } @@ -178,6 +178,7 @@ void GateMateImpl::postRoute() updateLUT(ctx, cell.second.get(), id_IN8, id_INIT_L03); updateINV(ctx, cell.second.get(), id_CLK); updateINV(ctx, cell.second.get(), id_EN); + updateINV(ctx, cell.second.get(), id_SR); } }