Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net decomposing router: hotfix #2828

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions vpr/src/route/DecompNetlistRouter.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,15 @@ inline bool is_close_to_cutline(RRNodeId inode, Axis cutline_axis, int cutline_p
const auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;

vtr::Rect<int> tile_bb = device_ctx.grid.get_tile_bb({rr_graph.node_xlow(inode),
rr_graph.node_ylow(inode),
rr_graph.node_layer(inode)});

/* Cutlines are considered to be at x + 0.5, set a thickness of +1 here by checking for equality */
if (cutline_axis == Axis::X) {
return rr_graph.node_xlow(inode) - thickness <= cutline_pos && rr_graph.node_xhigh(inode) + thickness >= cutline_pos;
return tile_bb.xmin() - thickness <= cutline_pos && tile_bb.xmax() + thickness >= cutline_pos;
} else {
return rr_graph.node_ylow(inode) - thickness <= cutline_pos && rr_graph.node_yhigh(inode) + thickness >= cutline_pos;
return tile_bb.ymin() - thickness <= cutline_pos && tile_bb.ymax() + thickness >= cutline_pos;
}
}

Expand All @@ -461,10 +465,14 @@ inline bool is_close_to_bb(RRNodeId inode, const t_bb& bb, int thickness) {
const auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;

int xlow = rr_graph.node_xlow(inode) - thickness;
int ylow = rr_graph.node_ylow(inode) - thickness;
int xhigh = rr_graph.node_xhigh(inode) + thickness;
int yhigh = rr_graph.node_yhigh(inode) + thickness;
vtr::Rect<int> tile_bb = device_ctx.grid.get_tile_bb({rr_graph.node_xlow(inode),
rr_graph.node_ylow(inode),
rr_graph.node_layer(inode)});

int xlow = tile_bb.xmin() - thickness;
int ylow = tile_bb.ymin() - thickness;
int xhigh = tile_bb.xmax() + thickness;
int yhigh = tile_bb.ymax() + thickness;

return (xlow <= bb.xmin && xhigh >= bb.xmin)
|| (ylow <= bb.ymin && yhigh >= bb.ymin)
Expand Down