aboutsummaryrefslogtreecommitdiffstats
path: root/common/placer_heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'common/placer_heap.cc')
-rw-r--r--common/placer_heap.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/placer_heap.cc b/common/placer_heap.cc
index e89ce76a..c04e7091 100644
--- a/common/placer_heap.cc
+++ b/common/placer_heap.cc
@@ -594,11 +594,11 @@ class HeAPPlacer
if (child->type == root->type)
chain_size[root->name]++;
if (child->constr_x != child->UNCONSTR)
- cell_locs[child->name].x = std::min(max_x, base.x + child->constr_x);
+ cell_locs[child->name].x = std::max(0, std::min(max_x, base.x + child->constr_x));
else
cell_locs[child->name].x = base.x; // better handling of UNCONSTR?
if (child->constr_y != child->UNCONSTR)
- cell_locs[child->name].y = std::min(max_y, base.y + child->constr_y);
+ cell_locs[child->name].y = std::max(0, std::min(max_y, base.y + child->constr_y));
else
cell_locs[child->name].y = base.y; // better handling of UNCONSTR?
chain_root[child->name] = root;