diff options
author | David Shah <dave@ds0.me> | 2019-01-30 19:28:15 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-03-22 10:31:54 +0000 |
commit | 6cf001d35546fb05d0d3dec4a22bd48fecad0126 (patch) | |
tree | 900d9c26f76caa9fdf0b97042bbdfc12544cd01e | |
parent | 352f15e96b408dac40658ab058a7575d9daa85cb (diff) | |
download | nextpnr-6cf001d35546fb05d0d3dec4a22bd48fecad0126.tar.gz nextpnr-6cf001d35546fb05d0d3dec4a22bd48fecad0126.tar.bz2 nextpnr-6cf001d35546fb05d0d3dec4a22bd48fecad0126.zip |
HeAP: Legaliser fixes
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | common/placer_heap.cc | 4 |
1 files 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 |