This commit is contained in:
Miodrag Milanovic 2025-06-23 10:57:22 +02:00
parent f61c10ea19
commit 6f93d87ac8
1 changed files with 6 additions and 6 deletions

View File

@ -192,18 +192,16 @@ void GateMateImpl::prePlace() { assign_cell_info(); }
void GateMateImpl::postPlace()
{
ctx->assignArchInfo();
std::vector<IdString> delete_cells;
for (auto &cell : ctx->cells) {
if (getBelBucketForCellType(cell.second->type) == id_CPE_LT) {
if (cell.second->type.in(id_CPE_L2T4,id_CPE_CI)) {
Loc l = ctx->getBelLocation(cell.second->bel);
if (l.z == 1) { // CPE_HALF_L
if (!cell.second->params.count(id_INIT_L20))
cell.second->params[id_INIT_L20] = Property(0b1100, 4);
}
}
}
std::vector<IdString> delete_cells;
for (auto &cell : ctx->cells) {
if (cell.second->type.in(id_CPE_L2T5_L,id_CPE_LT_L)) {
else if (cell.second->type.in(id_CPE_L2T5_L,id_CPE_LT_L)) {
BelId bel = cell.second->bel;
PlaceStrength strength = cell.second->belStrength;
uint8_t func = int_or_default(cell.second->params, id_C_FUNCTION, 0);
@ -218,6 +216,8 @@ void GateMateImpl::postPlace()
cell.second->renamePort(id_IN4, id_IN8);
cell.second->renamePort(id_OUT, id_OUT1);
cell.second->renamePort(id_CPOUT, id_CPOUT1);
if (!cell.second->params.count(id_INIT_L20))
cell.second->params[id_INIT_L20] = Property(0b1100, 4);
rename_param(cell.second.get(), id_INIT_L00, id_INIT_L02, 4);
rename_param(cell.second.get(), id_INIT_L01, id_INIT_L03, 4);
rename_param(cell.second.get(), id_INIT_L10, id_INIT_L11, 4);
@ -255,7 +255,7 @@ void GateMateImpl::postPlace()
}
// Mark for deletion
if (cell.second->type.in(id_CPE_L2T5_U,id_CPE_LT_U)) {
else if (cell.second->type.in(id_CPE_L2T5_U,id_CPE_LT_U)) {
delete_cells.push_back(cell.second->name);
}
}