aboutsummaryrefslogtreecommitdiffstats
path: root/fpga_interchange/arch.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-05-11 11:51:10 +0100
committergatecat <gatecat@ds0.me>2021-05-11 13:02:23 +0100
commit7a1a95a2d6ba7c9383f75016409aea1f613db547 (patch)
tree1f01a6f9906174fbdc207e63daeaa004822f6d4d /fpga_interchange/arch.cc
parent744e91dda8829a9c5b8c891c5e490612389f48e3 (diff)
downloadnextpnr-7a1a95a2d6ba7c9383f75016409aea1f613db547.tar.gz
nextpnr-7a1a95a2d6ba7c9383f75016409aea1f613db547.tar.bz2
nextpnr-7a1a95a2d6ba7c9383f75016409aea1f613db547.zip
interchange: Fix bounding box computation
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'fpga_interchange/arch.cc')
-rw-r--r--fpga_interchange/arch.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpga_interchange/arch.cc b/fpga_interchange/arch.cc
index 938c4f2c..602f3913 100644
--- a/fpga_interchange/arch.cc
+++ b/fpga_interchange/arch.cc
@@ -733,11 +733,12 @@ ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const
int dst_tile = dst.tile == -1 ? chip_info->nodes[dst.index].tile_wires[0].tile : dst.tile;
int src_tile = src.tile == -1 ? chip_info->nodes[src.index].tile_wires[0].tile : src.tile;
- int x0 = 0, x1 = 0, y0 = 0, y1 = 0;
int src_x, src_y;
get_tile_x_y(src_tile, &src_x, &src_y);
+ int x0 = src_x, x1 = src_x, y0 = src_y, y1 = src_y;
+
int dst_x, dst_y;
get_tile_x_y(dst_tile, &dst_x, &dst_y);
@@ -748,7 +749,6 @@ ArcBounds Arch::getRouteBoundingBox(WireId src, WireId dst) const
y1 = std::max(y1, y);
};
- expand(src_x, src_y);
expand(dst_x, dst_y);
if (source_locs.count(src))