heap: encourage more spreading of heterogenous chains

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat 2022-12-17 10:49:51 +00:00
parent 0eb53d59d8
commit ccb573298c

View File

@ -663,7 +663,7 @@ class HeAPPlacer
if (cell->cluster != ClusterId()) { if (cell->cluster != ClusterId()) {
const auto base = cell_locs[cell->name]; const auto base = cell_locs[cell->name];
for (auto child : cluster2cells.at(cell->cluster)) { for (auto child : cluster2cells.at(cell->cluster)) {
if (child->type == cell->type && child != cell) if (child != cell)
chain_size[cell->name]++; chain_size[cell->name]++;
Loc offset = ctx->getClusterOffset(child); Loc offset = ctx->getClusterOffset(child);
cell_locs[child->name].x = std::max(0, std::min(max_x, base.x + offset.x)); cell_locs[child->name].x = std::max(0, std::min(max_x, base.x + offset.x));
@ -856,7 +856,7 @@ class HeAPPlacer
// Was now placed, ignore // Was now placed, ignore
if (ci->bel != BelId()) if (ci->bel != BelId())
continue; continue;
// log_info(" Legalising %s (%s)\n", top.second.c_str(ctx), ci->type.c_str(ctx)); // log_info(" Legalising %s (%s) %d\n", top.second.c_str(ctx), ci->type.c_str(ctx), top.first);
FastBels::FastBelsData *fb; FastBels::FastBelsData *fb;
fast_bels.getBelsForCellType(ci->type, &fb); fast_bels.getBelsForCellType(ci->type, &fb);
int radius = 0; int radius = 0;