Skip to content

Commit dad7ac6

Browse files
committed
[vpr][route] remove has path to sink
1 parent 8192a19 commit dad7ac6

File tree

1 file changed

+1
-45
lines changed

1 file changed

+1
-45
lines changed

vpr/src/route/connection_router.cpp

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,6 @@
55
#include "bucket.h"
66
#include "rr_graph_fwd.h"
77

8-
/**
9-
* @brief This function is relevant when the architecture is 3D. If inter-layer connections are only from OPINs (determine by is_inter_layer_opin_connection),
10-
* then nodes (other that OPINs) which are on the other layer than sink's layer, don't need to be pushed back to the heap.
11-
* @param rr_nodes
12-
* @param rr_graph
13-
* @param from_node
14-
* @param sink_node
15-
* @param is_inter_layer_opin_connection It is true if the architecture is 3D and inter-layer connections are only from OPINs.
16-
* @return
17-
*/
18-
static bool has_path_to_sink(const t_rr_graph_view& rr_nodes,
19-
const RRGraphView* rr_graph,
20-
RRNodeId from_node,
21-
RRNodeId sink_node,
22-
bool is_inter_layer_opin_connection);
23-
248
static bool relevant_node_to_target(const RRGraphView* rr_graph,
259
RRNodeId node_to_add,
2610
RRNodeId target_node);
@@ -851,7 +835,7 @@ void ConnectionRouter<Heap>::add_route_tree_to_heap(
851835
/* Pre-order depth-first traversal */
852836
// IPINs and SINKS are not re_expanded
853837
if (rt_node.re_expand) {
854-
if (target_node.is_valid() && !has_path_to_sink(rr_nodes_, rr_graph_, RRNodeId(rt_node.inode), RRNodeId(target_node), only_opin_inter_layer)) {
838+
if (target_node.is_valid()) {
855839
return;
856840
}
857841
add_route_tree_node_to_heap(rt_node,
@@ -1020,9 +1004,6 @@ t_bb ConnectionRouter<Heap>::add_high_fanout_route_tree_to_heap(
10201004
if (!inside_bb(rr_node_to_add, net_bounding_box))
10211005
continue;
10221006

1023-
if (!has_path_to_sink(rr_nodes_, rr_graph_, RRNodeId(rt_node.inode), target_node, only_opin_inter_layer)) {
1024-
continue;
1025-
}
10261007
// Put the node onto the heap
10271008
add_route_tree_node_to_heap(rt_node, target_node, cost_params, net_bounding_box);
10281009

@@ -1064,31 +1045,6 @@ t_bb ConnectionRouter<Heap>::add_high_fanout_route_tree_to_heap(
10641045
}
10651046
}
10661047

1067-
static inline bool has_path_to_sink(const t_rr_graph_view& rr_nodes,
1068-
const RRGraphView* rr_graph,
1069-
RRNodeId from_node,
1070-
RRNodeId sink_node,
1071-
bool is_inter_layer_opin_connection) {
1072-
int sink_layer = rr_graph->node_layer(sink_node);
1073-
1074-
if (rr_graph->node_layer(from_node) == sink_layer || rr_graph->node_type(from_node) == SOURCE || !is_inter_layer_opin_connection) {
1075-
return true;
1076-
} else if (rr_graph->node_type(from_node) == CHANX || rr_graph->node_type(from_node) == CHANY || rr_graph->node_type(from_node) == IPIN) {
1077-
return false;
1078-
} else {
1079-
VTR_ASSERT(rr_graph->node_type(from_node) == OPIN && is_inter_layer_opin_connection);
1080-
auto edges = rr_nodes.edge_range(from_node);
1081-
1082-
for (RREdgeId from_edge : edges) {
1083-
RRNodeId to_node = rr_nodes.edge_sink_node(from_edge);
1084-
if (rr_graph->node_layer(to_node) == sink_layer) {
1085-
return true;
1086-
}
1087-
}
1088-
return false;
1089-
}
1090-
}
1091-
10921048
static inline bool relevant_node_to_target(const RRGraphView* rr_graph,
10931049
RRNodeId node_to_add,
10941050
RRNodeId target_node) {

0 commit comments

Comments
 (0)