From 1df8ac805a1e4dd1642312f45d21f1e707defa48 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 25 Jun 2020 19:42:53 +0100 Subject: HeAP: Add timeout to IO placement Signed-off-by: David Shah --- common/placer_heap.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common/placer_heap.cc') diff --git a/common/placer_heap.cc b/common/placer_heap.cc index 8c43c433..790c2230 100644 --- a/common/placer_heap.cc +++ b/common/placer_heap.cc @@ -542,10 +542,14 @@ class HeAPPlacer cell_locs[cell.first].global = ctx->getBelGlobalBuf(ci->bel); } else if (ci->constr_parent == nullptr) { bool placed = false; + int attempt_count = 0; while (!placed) { if (!available_bels.count(ci->type) || available_bels.at(ci->type).empty()) log_error("Unable to place cell '%s', no Bels remaining of type '%s'\n", ci->name.c_str(ctx), ci->type.c_str(ctx)); + ++attempt_count; + if (attempt_count > 25000) + log_error("Unable to find a placement location for cell '%s'\n", ci->name.c_str(ctx)); BelId bel = available_bels.at(ci->type).back(); available_bels.at(ci->type).pop_back(); Loc loc = ctx->getBelLocation(bel); -- cgit v1.2.3