Skip to content

Commit 3a0ad03

Browse files
Fix issue with interposers and 3D connection blocks
1 parent fd7c0b9 commit 3a0ad03

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

vpr/src/route/rr_graph_generation/interposer_cut.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,15 @@ std::vector<RREdgeId> mark_interposer_cut_edges_for_removal(const RRGraphView& r
110110
VTR_LOG("HI\n");
111111
}
112112

113-
// TODO: ignoring chanz nodes for now
113+
// TODO: ignoring ChanZ nodes for now
114114
if (rr_graph.node_type(src_node) == e_rr_type::CHANZ || rr_graph.node_type(sink_node) == e_rr_type::CHANZ) {
115115
continue;
116116
}
117117

118-
VTR_ASSERT(rr_graph.node_layer_low(src_node) == rr_graph.node_layer_low(sink_node));
118+
// Currently 3D connection block edges cross layers. We don't want to cut these edges.
119+
if (rr_graph.node_layer_low(src_node) != rr_graph.node_layer_low(sink_node)) {
120+
continue;
121+
}
119122
VTR_ASSERT(rr_graph.node_layer_low(src_node) == rr_graph.node_layer_high(src_node));
120123
VTR_ASSERT(rr_graph.node_layer_low(sink_node) == rr_graph.node_layer_high(sink_node));
121124

vpr/src/route/rr_graph_generation/rr_graph.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,11 +1670,12 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
16701670
}
16711671
}
16721672

1673-
std::vector<RREdgeId> interposer_edges = mark_interposer_cut_edges_for_removal(rr_graph, grid);
1674-
rr_graph_builder.remove_edges(interposer_edges);
1675-
1676-
update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(rr_graph, grid, rr_graph_builder, sg_node_indices);
1673+
if (!grid.get_horizontal_interposer_cuts().empty() || !grid.get_vertical_interposer_cuts().empty()) {
1674+
std::vector<RREdgeId> interposer_edges = mark_interposer_cut_edges_for_removal(rr_graph, grid);
1675+
rr_graph_builder.remove_edges(interposer_edges);
16771676

1677+
update_interposer_crossing_nodes_in_spatial_lookup_and_rr_graph_storage(rr_graph, grid, rr_graph_builder, sg_node_indices);
1678+
}
16781679

16791680
add_and_connect_non_3d_sg_links(rr_graph_builder, sg_links, sg_node_indices, chan_details_x, chan_details_y, num_seg_types_x, rr_edges_to_create);
16801681
uniquify_edges(rr_edges_to_create);
@@ -2091,7 +2092,7 @@ static void add_and_connect_non_3d_sg_links(RRGraphBuilder& rr_graph_builder,
20912092
// SG links are confined to one layer (non-3D), but can run in X or Y.
20922093
VTR_ASSERT_SAFE(src_loc.layer_num == dst_loc.layer_num);
20932094
const int layer = src_loc.layer_num;
2094-
compute_non_3d_sg_link_geometry(src_loc, dst_loc, chan_type, xlow, xhigh, ylow, yhigh,direction);
2095+
compute_non_3d_sg_link_geometry(src_loc, dst_loc, chan_type, xlow, xhigh, ylow, yhigh, direction);
20952096

20962097
// Retrieve the node ID and track number allocated earlier
20972098
const RRNodeId node_id = sg_node_indices[i].first;

0 commit comments

Comments
 (0)