From 6cf001d35546fb05d0d3dec4a22bd48fecad0126 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 30 Jan 2019 19:28:15 +0000 Subject: [PATCH] HeAP: Legaliser fixes Signed-off-by: David Shah --- common/placer_heap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/placer_heap.cc b/common/placer_heap.cc index c9ec068d..4f62e77b 100644 --- a/common/placer_heap.cc +++ b/common/placer_heap.cc @@ -807,7 +807,7 @@ class HeAPPlacer if (ci->constr_children.empty() && !ci->constr_abs_z) { for (auto sz : fb.at(nx).at(ny)) { - if (ctx->checkBelAvail(sz) || radius > ripup_radius) { + if (ctx->checkBelAvail(sz) || (radius > ripup_radius || ctx->rng(20000) < 10)) { CellInfo *bound = ctx->getBoundBelCell(sz); if (bound != nullptr) { if (bound->constr_parent != nullptr || !bound->constr_children.empty() || @@ -869,7 +869,7 @@ class HeAPPlacer visit.pop(); BelId target = ctx->getBelByLocation(ploc); CellInfo *bound; - if (target == BelId()) + if (target == BelId() || ctx->getBelType(target) != vc->type) goto fail; bound = ctx->getBoundBelCell(target); // Chains cannot overlap