1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-02-16 12:53:25 +00:00
This commit is contained in:
Miodrag Milanovic
2025-06-20 13:11:11 +02:00
parent d974683ffb
commit e32f3a3792
2 changed files with 15 additions and 5 deletions

View File

@@ -86,7 +86,7 @@ struct BitstreamBackend
unsigned init_val = int_or_default(params, init);
bool invert = need_inversion(cell, port);
if (invert) {
if (port.in(id_IN1, id_IN3))
if (port.in(id_IN1, id_IN3, id_IN5, id_IN7))
init_val = (init_val & 0b1010) >> 1 | (init_val & 0b0101) << 1;
else
init_val = (init_val & 0b0011) << 2 | (init_val & 0b1100) >> 2;
@@ -274,6 +274,17 @@ struct BitstreamBackend
update_cpe_mux(cell.second.get(), id_IN4, id_INIT_L11, 3, params);
}
}
if (l.z==7) {
update_cpe_lt(cell.second.get(), id_IN1, id_INIT_L00, params);
update_cpe_lt(cell.second.get(), id_IN2, id_INIT_L00, params);
update_cpe_lt(cell.second.get(), id_IN3, id_INIT_L01, params);
update_cpe_lt(cell.second.get(), id_IN4, id_INIT_L01, params);
update_cpe_lt(cell.second.get(), id_IN5, id_INIT_L02, params);
update_cpe_lt(cell.second.get(), id_IN6, id_INIT_L02, params);
update_cpe_lt(cell.second.get(), id_IN7, id_INIT_L03, params);
update_cpe_lt(cell.second.get(), id_IN8, id_INIT_L03, params);
}
if (cell.second->type.in(id_CPE_FF)) {
update_cpe_inv(cell.second.get(), id_CLK, id_C_CPE_CLK, params);
update_cpe_inv(cell.second.get(), id_EN, id_C_CPE_EN, params);

View File

@@ -221,7 +221,7 @@ void GateMateImpl::postPlace()
}
}
}
/*std::vector<IdString> delete_cells;
std::vector<IdString> delete_cells;
for (auto &cell : ctx->cells) {
if (cell.second->type == id_CPE_L2T5_L) {
BelId bel = cell.second->bel;
@@ -239,8 +239,8 @@ void GateMateImpl::postPlace()
loc.z = 0;
CellInfo *upper = ctx->getBoundBelCell(ctx->getBelByLocation(loc));
cell.second->params[id_INIT_L00] = upper->params[id_INIT_L00];
cell.second->params[id_INIT_L10] = upper->params[id_INIT_L10];
cell.second->params[id_INIT_L00] = Property(int_or_default(upper->params, id_INIT_L00, 0), 4);
cell.second->params[id_INIT_L10] = Property(int_or_default(upper->params, id_INIT_L10, 0), 4);
upper->movePortTo(id_IN1, cell.second.get(), id_IN1);
}
// Mark for deletion
@@ -255,7 +255,6 @@ void GateMateImpl::postPlace()
ctx->cells.erase(pcell);
}
delete_cells.clear();
*/
ctx->assignArchInfo();
}