Skip to content

Commit 72e130c

Browse files
update inter_layer_connections_limited_to_opin() to check OPIN-CHANZ
1 parent 0dcb2fa commit 72e130c

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

libs/librrgraph/src/base/rr_graph_utils.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,17 @@ void rr_set_sink_locs(const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_buil
240240
}
241241

242242
bool inter_layer_connections_limited_to_opin(const RRGraphView& rr_graph) {
243-
// TODO: once OPINs are connected to CHANZ nodes, this function should be reworked.
244243
bool limited_to_opin = true;
244+
245245
for (const RRNodeId from_node : rr_graph.nodes()) {
246+
e_rr_type from_type = rr_graph.node_type(from_node);
246247
for (t_edge_size edge : rr_graph.edges(from_node)) {
247248
RRNodeId to_node = rr_graph.edge_sink_node(from_node, edge);
248-
int from_layer = rr_graph.node_layer_low(from_node);
249-
int to_layer = rr_graph.node_layer_low(to_node);
250-
251-
if (from_layer != to_layer) {
252-
if (rr_graph.node_type(from_node) != e_rr_type::OPIN) {
253-
limited_to_opin = false;
254-
break;
255-
}
249+
e_rr_type to_type = rr_graph.node_type(to_node);
250+
251+
if (to_type == e_rr_type::CHANZ && from_type != e_rr_type::OPIN) {
252+
limited_to_opin = false;
253+
break;
256254
}
257255
}
258256
if (!limited_to_opin) {

libs/librrgraph/src/base/rr_graph_utils.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ int seg_index_of_sblock(const RRGraphView& rr_graph, int from_node, int to_node)
9393
* box to be used to estimate the wire-length of a net.
9494
*
9595
* @param rr_graph The routing resource graph
96-
*
97-
* @return limited_to_opin
96+
* @return True if inter-die 3D connections are driven only by OPIN nodes; otherwise, false.
9897
*/
9998
bool inter_layer_connections_limited_to_opin(const RRGraphView& rr_graph);
10099

vpr/src/base/vpr_context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static bool is_cube_bb(const e_place_bounding_box_mode place_bb_mode,
8888
cube_bb = true;
8989
} else {
9090
// The user has specifically asked for PER_LAYER_BB
91-
VTR_ASSERT_SAFE(place_bb_mode == e_place_bounding_box_mode::PER_LAYER_BB);
91+
VTR_ASSERT(place_bb_mode == e_place_bounding_box_mode::PER_LAYER_BB);
9292
cube_bb = false;
9393
}
9494

vpr/src/base/vpr_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
class SetupHoldTimingInfo;
4545
class PostClusterDelayCalculator;
4646

47-
#endif /* NO_SERVER */
47+
#endif // NO_SERVER
4848

4949
struct t_rr_node_route_inf;
5050

vpr/src/route/rr_graph_generation/rr_graph_sg.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ void add_edges_opin_chanz_per_side(const RRGraphView& rr_graph,
132132

133133
case RIGHT:
134134
sb_loc0 = {x, y, layer};
135-
sb_loc1 = {x , y - 1, layer};
135+
sb_loc1 = {x, y - 1, layer};
136136
break;
137137

138138
case LEFT:
139139
sb_loc0 = {x - 1, y, layer};
140-
sb_loc1 = {x - 1 , y - 1, layer};
140+
sb_loc1 = {x - 1, y - 1, layer};
141141
break;
142142

143143
default:
@@ -204,7 +204,6 @@ void add_edges_opin_chanz_per_side(const RRGraphView& rr_graph,
204204
}
205205
}
206206
}
207-
208207
}
209208

210209
void add_edges_opin_chanz_per_block(const RRGraphView& rr_graph,

0 commit comments

Comments
 (0)