From 55a3faee721257b360b3514695245e1a0448494b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Jul 2025 11:06:18 +0200 Subject: [PATCH] handing of C_EN_IN --- himbaechel/uarch/gatemate/cells.cc | 3 ++- himbaechel/uarch/gatemate/pack_cpe.cc | 4 ++-- himbaechel/uarch/gatemate/pack_mult.cc | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/himbaechel/uarch/gatemate/cells.cc b/himbaechel/uarch/gatemate/cells.cc index 2697cbc9..ca73385c 100644 --- a/himbaechel/uarch/gatemate/cells.cc +++ b/himbaechel/uarch/gatemate/cells.cc @@ -43,8 +43,9 @@ CellInfo *GateMatePacker::create_cell_ptr(IdString type, IdString name) add_port(id_CINX, PORT_IN); add_port(id_PINX, PORT_IN); add_port(id_PINY1, PORT_IN); + // For EN_CIN input + add_port(id_CINY1, PORT_IN); if (type.in(id_CPE_LT_L, id_CPE_L2T5_L)) { - add_port(id_CINY1, PORT_IN); add_port(id_CINY2, PORT_IN); add_port(id_PINY2, PORT_IN); diff --git a/himbaechel/uarch/gatemate/pack_cpe.cc b/himbaechel/uarch/gatemate/pack_cpe.cc index 4f86a456..154618b1 100644 --- a/himbaechel/uarch/gatemate/pack_cpe.cc +++ b/himbaechel/uarch/gatemate/pack_cpe.cc @@ -530,13 +530,13 @@ void GateMatePacker::pack_addf() co_upper->constr_abs_z = false; co_upper->constr_z = -1; co_upper->constr_y = +i + 1; - CellInfo *co_lower = create_cell_ptr(id_CPE_LT_L, ctx->idf("%s$co", cy->name.c_str(ctx))); + CellInfo *co_lower = create_cell_ptr(id_CPE_L2T4, ctx->idf("%s$co", cy->name.c_str(ctx))); co_lower->cluster = root->name; root->constr_children.push_back(co_lower); co_lower->constr_abs_z = false; co_lower->constr_y = +i + 1; co_lower->params[id_C_FUNCTION] = Property(C_EN_CIN, 3); - co_lower->params[id_INIT_L11] = Property(0b1100, 4); + co_lower->params[id_INIT_L10] = Property(0b1100, 4); co_lower->params[id_INIT_L20] = Property(0b1100, 4); NetInfo *co_conn = ctx->createNet(ctx->idf("%s$co_net", cy->name.c_str(ctx))); diff --git a/himbaechel/uarch/gatemate/pack_mult.cc b/himbaechel/uarch/gatemate/pack_mult.cc index da6bd557..c197b2d3 100644 --- a/himbaechel/uarch/gatemate/pack_mult.cc +++ b/himbaechel/uarch/gatemate/pack_mult.cc @@ -303,10 +303,10 @@ FRoutingCell::FRoutingCell(CellInfo *lower, CellInfo *upper, CellInfo *comp, Cel { // TODO: simplify AND with zero/OR with zero into something more sensical. - //lower->params[id_INIT_L02] = Property(LUT_ZERO, 4); // (unused) - //lower->params[id_INIT_L03] = Property(LUT_ONE, 4); // (unused) - //lower->params[id_INIT_L11] = Property(LUT_AND, 4); - //lower->params[id_INIT_L20] = Property(LUT_D1, 4); + lower->params[id_INIT_L02] = Property(LUT_ZERO, 4); // (unused) + lower->params[id_INIT_L03] = Property(LUT_ONE, 4); // (unused) + lower->params[id_INIT_L11] = Property(LUT_AND, 4); + lower->params[id_INIT_L20] = Property(LUT_D1, 4); lower->params[id_C_FUNCTION] = Property(C_ADDCIN, 3); comp->params[id_INIT_L30] = Property(is_even_x ? LUT_ONE : LUT_INV_D1, 4); // L10 -> COMP_OUT