aboutsummaryrefslogtreecommitdiffstats
path: root/common/placer1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/placer1.cc')
-rw-r--r--common/placer1.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/placer1.cc b/common/placer1.cc
index 4659da11..30f0057c 100644
--- a/common/placer1.cc
+++ b/common/placer1.cc
@@ -155,6 +155,7 @@ class SAPlacer
ctx->unlock();
int n_no_progress = 0;
+ wirelen_t min_metric = curr_metric;
double avg_metric = curr_metric;
temp = 10000;
@@ -180,6 +181,11 @@ class SAPlacer
}
}
+ if (curr_metric < min_metric) {
+ min_metric = curr_metric;
+ improved = true;
+ }
+
// Heuristic to improve placement on the 8k
if (improved)
n_no_progress = 0;
@@ -234,6 +240,9 @@ class SAPlacer
ctx->shuffle(autoplaced);
assign_budget(ctx);
}
+ else {
+ update_budget(ctx);
+ }
// Recalculate total metric entirely to avoid rounding errors
// accumulating over time
@@ -382,8 +391,6 @@ class SAPlacer
// SA acceptance criterea
if (delta < 0 || (temp > 1e-6 && (ctx->rng() / float(0x3fffffff)) <= std::exp(-delta / temp))) {
n_accept++;
- if (delta < 2)
- improved = true;
} else {
if (other != IdString())
ctx->unbindBel(oldBel);