@@ -448,11 +448,15 @@ inline bool is_close_to_cutline(RRNodeId inode, Axis cutline_axis, int cutline_p
448
448
const auto & device_ctx = g_vpr_ctx.device ();
449
449
const auto & rr_graph = device_ctx.rr_graph ;
450
450
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
+
451
455
/* Cutlines are considered to be at x + 0.5, set a thickness of +1 here by checking for equality */
452
456
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;
454
458
} 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;
456
460
}
457
461
}
458
462
@@ -461,10 +465,14 @@ inline bool is_close_to_bb(RRNodeId inode, const t_bb& bb, int thickness) {
461
465
const auto & device_ctx = g_vpr_ctx.device ();
462
466
const auto & rr_graph = device_ctx.rr_graph ;
463
467
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;
468
476
469
477
return (xlow <= bb.xmin && xhigh >= bb.xmin )
470
478
|| (ylow <= bb.ymin && yhigh >= bb.ymin )
0 commit comments