Skip to content

Commit aa26ba7

Browse files
committed
static: Improve singleton handling
Signed-off-by: gatecat <[email protected]>
1 parent 255633c commit aa26ba7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

common/place/placer_static.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,17 @@ class StaticPlacer
408408
StaticRect rect;
409409
// Mismatched group case
410410
if (!lookup_group(ci->type, cell_group, rect)) {
411-
// TODO: what is the best thing to do here? singletons/odd cells we can probably mostly randomly place
411+
for (auto bel : ctx->getBels()) {
412+
if (ctx->isValidBelForCellType(ci->type, bel) && ctx->checkBelAvail(bel)) {
413+
ctx->bindBel(bel, ci, STRENGTH_STRONG);
414+
if (!ctx->isBelLocationValid(bel)) {
415+
ctx->unbindBel(bel);
416+
} else {
417+
log_info(" placed potpourri cell '%s' at bel '%s'\n", ctx->nameOf(ci), ctx->nameOfBel(bel));
418+
break;
419+
}
420+
}
421+
}
412422
continue;
413423
}
414424
if (ci->cluster != ClusterId()) {

0 commit comments

Comments
 (0)