From 1aa4be770cf2162a617551bfbf76e371657cc8fe Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 29 Jun 2018 13:28:06 +0200 Subject: Make single-cell placer less likely to get stuck Signed-off-by: David Shah --- common/place_common.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/place_common.cc b/common/place_common.cc index 12345a89..95faf67f 100644 --- a/common/place_common.cc +++ b/common/place_common.cc @@ -119,16 +119,16 @@ bool place_single_cell(Context *ctx, CellInfo *cell, bool require_legality) if (ctx->getBelType(bel) == targetType && (!require_legality || ctx->isValidBelForCell(cell, bel))) { if (ctx->checkBelAvail(bel)) { wirelen_t wirelen = get_cell_wirelength_at_bel(ctx, cell, bel); - if (wirelen == 0) - wirelen = ctx->rng(100); + if (iters >= 4) + wirelen += ctx->rng(25); if (wirelen <= best_wirelen) { best_wirelen = wirelen; best_bel = bel; } } else { wirelen_t wirelen = get_cell_wirelength_at_bel(ctx, cell, bel); - if (wirelen == 0) - wirelen = ctx->rng(100); + if (iters >= 4) + wirelen += ctx->rng(25); if (wirelen <= best_ripup_wirelen) { ripup_target = ctx->cells.at(ctx->getBoundBelCell(bel)).get(); if (ripup_target->belStrength < STRENGTH_STRONG) { -- cgit v1.2.3