@@ -448,11 +448,15 @@ inline bool is_close_to_cutline(RRNodeId inode, Axis cutline_axis, int cutline_p
448448 const auto & device_ctx = g_vpr_ctx.device ();
449449 const auto & rr_graph = device_ctx.rr_graph ;
450450
451+ vtr::Rect<int > tile_bb = device_ctx.grid .get_tile_bb ({rr_graph.node_xlow (inode),
452+ rr_graph.node_ylow (inode),
453+ rr_graph.node_layer (inode)});
454+
451455 /* Cutlines are considered to be at x + 0.5, set a thickness of +1 here by checking for equality */
452456 if (cutline_axis == Axis::X) {
453- return rr_graph. node_xlow (inode ) - thickness <= cutline_pos && rr_graph. node_xhigh (inode ) + thickness >= cutline_pos;
457+ return tile_bb. xmin ( ) - thickness <= cutline_pos && tile_bb. xmax ( ) + thickness >= cutline_pos;
454458 } else {
455- return rr_graph. node_ylow (inode ) - thickness <= cutline_pos && rr_graph. node_yhigh (inode ) + thickness >= cutline_pos;
459+ return tile_bb. ymin ( ) - thickness <= cutline_pos && tile_bb. ymax ( ) + thickness >= cutline_pos;
456460 }
457461}
458462
@@ -461,10 +465,14 @@ inline bool is_close_to_bb(RRNodeId inode, const t_bb& bb, int thickness) {
461465 const auto & device_ctx = g_vpr_ctx.device ();
462466 const auto & rr_graph = device_ctx.rr_graph ;
463467
464- int xlow = rr_graph.node_xlow (inode) - thickness;
465- int ylow = rr_graph.node_ylow (inode) - thickness;
466- int xhigh = rr_graph.node_xhigh (inode) + thickness;
467- int yhigh = rr_graph.node_yhigh (inode) + thickness;
468+ vtr::Rect<int > tile_bb = device_ctx.grid .get_tile_bb ({rr_graph.node_xlow (inode),
469+ rr_graph.node_ylow (inode),
470+ rr_graph.node_layer (inode)});
471+
472+ int xlow = tile_bb.xmin () - thickness;
473+ int ylow = tile_bb.ymin () - thickness;
474+ int xhigh = tile_bb.xmax () + thickness;
475+ int yhigh = tile_bb.ymax () + thickness;
468476
469477 return (xlow <= bb.xmin && xhigh >= bb.xmin )
470478 || (ylow <= bb.ymin && yhigh >= bb.ymin )
0 commit comments