aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorArjen Roodselaar <arjen@oxide.computer>2022-12-17 15:50:14 -0800
committerArjen Roodselaar <arjen@oxide.computer>2022-12-17 16:07:57 -0800
commit6e0311efcaea8020d3e137e2708ec188eef8a74c (patch)
treede8cf666364ec781f8439a7d212fe5140bb28dcb /common
parent78926b31db6dbfb465e2585ce0050bf93cb3e35c (diff)
downloadnextpnr-6e0311efcaea8020d3e137e2708ec188eef8a74c.tar.gz
nextpnr-6e0311efcaea8020d3e137e2708ec188eef8a74c.tar.bz2
nextpnr-6e0311efcaea8020d3e137e2708ec188eef8a74c.zip
Timeout when legal placement can't be found for cell
Diffstat (limited to 'common')
-rw-r--r--common/place/placer_heap.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/place/placer_heap.cc b/common/place/placer_heap.cc
index 0dfc29e6..22b97a6c 100644
--- a/common/place/placer_heap.cc
+++ b/common/place/placer_heap.cc
@@ -862,6 +862,7 @@ class HeAPPlacer
int radius = 0;
int iter = 0;
int iter_at_radius = 0;
+ int total_iters_for_cell = 0;
bool placed = false;
BelId bestBel;
int best_inp_len = std::numeric_limits<int>::max();
@@ -880,9 +881,9 @@ class HeAPPlacer
while (!placed) {
// Set a conservative timeout
- if (iter > std::max(10000, 3 * int(ctx->cells.size())))
- log_error("Unable to find legal placement for cell '%s', check constraints and utilisation.\n",
- ctx->nameOf(ci));
+ if (total_iters_for_cell > std::max(10000, 3 * int(ctx->cells.size())))
+ log_error("Unable to find legal placement for cell '%s' after %d attempts, check constraints and utilisation.\n",
+ ctx->nameOf(ci), total_iters_for_cell);
// Determine a search radius around the solver location (which increases over time) that is clamped to
// the region constraint for the cell (if applicable)
@@ -1084,6 +1085,8 @@ class HeAPPlacer
break;
}
}
+
+ total_iters_for_cell++;
}
}
auto endt = std::chrono::high_resolution_clock::now();