aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/place_common.cc8
1 files changed, 4 insertions, 4 deletions
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) {