From 7d4d1b4b9cb9ea3e05e0feea8ac0d478ea347dc2 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 3 Jul 2025 11:57:23 +0200 Subject: [PATCH] Connect CPOUTs --- himbaechel/uarch/gatemate/cells.cc | 1 + himbaechel/uarch/gatemate/pack_mult.cc | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/himbaechel/uarch/gatemate/cells.cc b/himbaechel/uarch/gatemate/cells.cc index ca73385c..3b5f62a6 100644 --- a/himbaechel/uarch/gatemate/cells.cc +++ b/himbaechel/uarch/gatemate/cells.cc @@ -39,6 +39,7 @@ CellInfo *GateMatePacker::create_cell_ptr(IdString type, IdString name) add_port(id_IN3, PORT_IN); add_port(id_IN4, PORT_IN); add_port(id_OUT, PORT_OUT); + add_port(id_CPOUT, PORT_OUT); // These are used to propagate alternate inputs for first LUT2 levels add_port(id_CINX, PORT_IN); add_port(id_PINX, PORT_IN); diff --git a/himbaechel/uarch/gatemate/pack_mult.cc b/himbaechel/uarch/gatemate/pack_mult.cc index 2141d906..22bdb7b2 100644 --- a/himbaechel/uarch/gatemate/pack_mult.cc +++ b/himbaechel/uarch/gatemate/pack_mult.cc @@ -357,8 +357,8 @@ MultCell::MultCell(CellInfo *lower, CellInfo *upper, CellInfo *cplines, IdString lower->params[id_C_C_P] = Property(0, 1); } - upper->params[id_C_O1] = Property(0b10, 2); // CP_OUT1 -> OUT1 - upper->params[id_C_O2] = Property(0b10, 2); // CP_OUT2 -> OUT2 + //upper->params[id_C_O1] = Property(0b10, 2); // CP_OUT1 -> OUT1 + //upper->params[id_C_O2] = Property(0b10, 2); // CP_OUT2 -> OUT2 } MsbRoutingCell::MsbRoutingCell(CellInfo *lower, CellInfo *upper, CellInfo *comp, CellInfo *cplines, IdString name) @@ -912,14 +912,14 @@ void GateMatePacker::pack_mult() auto &mult_cell = m.cols[p / 2].mults[0]; auto *cpe_half = (p % 2 == 1) ? mult_cell.upper : mult_cell.lower; - mult->movePortTo(ctx->idf("P[%d]", p), cpe_half, id_OUT); + mult->movePortTo(ctx->idf("P[%d]", p), cpe_half, id_CPOUT); } for (int p = 0; p < vertical_p_width; p++) { auto &mult_cell = m.cols.back().mults[1 + (p / 2)]; auto *cpe_half = (p % 2 == 1) ? mult_cell.upper : mult_cell.lower; - mult->movePortTo(ctx->idf("P[%d]", p + diagonal_p_width), cpe_half, id_OUT); + mult->movePortTo(ctx->idf("P[%d]", p + diagonal_p_width), cpe_half, id_CPOUT); } // Clean up the multiplier.