create CPE_CPLINES cells and set properties on them

This commit is contained in:
Miodrag Milanovic 2026-01-09 10:24:55 +01:00
parent 0738ccf6e0
commit c381652b92
1 changed files with 36 additions and 0 deletions

View File

@ -443,6 +443,42 @@ void GateMateImpl::postRoute()
if (extra_data.type == PipExtra::PIP_EXTRA_MUX && (extra_data.flags & MUX_ROUTING)) {
nets_with_bridges.insert(ni->name);
}
if (extra_data.type == PipExtra::PIP_EXTRA_MUX && (extra_data.mask != 0)) {
PipId pip = w.second.pip;
IdStringList id = ctx->getPipName(pip);
Loc loc = ctx->getPipLocation(pip);
BelId bel = ctx->getBelByLocation({loc.x, loc.y, CPE_CPLINES_Z});
CellInfo *cell = ctx->getBoundBelCell(bel);
if (!cell) {
IdString name = ctx->idf("cplines$%s", id[0].c_str(ctx));
cell = ctx->createCell(name, id_CPE_CPLINES);
ctx->bindBel(bel, cell, PlaceStrength::STRENGTH_FIXED);
}
if (extra_data.mask & PipMask::C_SELX)
cell->setParam(id_C_SELX, Property(extra_data.data & PipMask::C_SELX ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_SELY1)
cell->setParam(id_C_SELY1, Property(extra_data.data & PipMask::C_SELY1 ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_SELY2)
cell->setParam(id_C_SELY2, Property(extra_data.data & PipMask::C_SELY2 ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_SEL_C)
cell->setParam(id_C_SEL_C, Property(extra_data.data & PipMask::C_SEL_C ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_SEL_P)
cell->setParam(id_C_SEL_P, Property(extra_data.data & PipMask::C_SEL_P ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_Y12)
cell->setParam(id_C_Y12, Property(extra_data.data & PipMask::C_Y12 ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_CX_I)
cell->setParam(id_C_CX_I, Property(extra_data.data & PipMask::C_CX_I ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_CY1_I)
cell->setParam(id_C_CY1_I, Property(extra_data.data & PipMask::C_CY1_I ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_CY2_I)
cell->setParam(id_C_CY2_I, Property(extra_data.data & PipMask::C_CY2_I ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_PX_I)
cell->setParam(id_C_PX_I, Property(extra_data.data & PipMask::C_PX_I ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_PY1_I)
cell->setParam(id_C_PY1_I, Property(extra_data.data & PipMask::C_PY1_I ? 1 : 0, 1));
if (extra_data.mask & PipMask::C_PY2_I)
cell->setParam(id_C_PY2_I, Property(extra_data.data & PipMask::C_PY2_I ? 1 : 0, 1));
}
}
}
}