diff --git a/himbaechel/uarch/gatemate/bitstream.cc b/himbaechel/uarch/gatemate/bitstream.cc index 23f49805..30859430 100644 --- a/himbaechel/uarch/gatemate/bitstream.cc +++ b/himbaechel/uarch/gatemate/bitstream.cc @@ -347,6 +347,7 @@ struct BitstreamBackend dict params = cell.second->params; Loc l = ctx->getBelLocation(cell.second->bel); params.erase(id_L2T4_UPPER); + params.erase(id_MULT_INVERT); int c_i1 = int_or_default(params, id_C_I1, 0); int c_i2 = int_or_default(params, id_C_I2, 0); int c_i3 = int_or_default(params, id_C_I3, 0); diff --git a/himbaechel/uarch/gatemate/constids.inc b/himbaechel/uarch/gatemate/constids.inc index d68a5196..11140382 100644 --- a/himbaechel/uarch/gatemate/constids.inc +++ b/himbaechel/uarch/gatemate/constids.inc @@ -2272,3 +2272,4 @@ X(CPE_LATCH) X(L2T4_UPPER) X(CPE_MX8) X(CPE_BRIDGE) +X(MULT_INVERT) diff --git a/himbaechel/uarch/gatemate/pack_mult.cc b/himbaechel/uarch/gatemate/pack_mult.cc index 7bae5514..b8dc36e6 100644 --- a/himbaechel/uarch/gatemate/pack_mult.cc +++ b/himbaechel/uarch/gatemate/pack_mult.cc @@ -516,6 +516,7 @@ void GateMatePacker::pack_mult() for (int i = 0; i < (a_width / 2); i++) { auto *mult_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$row%d$mult_lower", name.c_str(ctx), i)); auto *mult_upper = create_cell_ptr(id_CPE_LT_U, ctx->idf("%s$row%d$mult_upper", name.c_str(ctx), i)); + mult_lower->params[id_MULT_INVERT] = Property(is_even_x ? Property::State::S0 : Property::State::S1); col.mults.push_back(MultCell{mult_lower, mult_upper, name, i == ((a_width / 2) - 1)}); uarch->multipliers.push_back(mult_lower);