Skip to content

Commit

Permalink
Merge pull request verilog-to-routing#2626 from verilog-to-routing/re…
Browse files Browse the repository at this point in the history
…move_has_path_to_sink

Remove `has_path_to_sink`
  • Loading branch information
amin1377 authored Jul 1, 2024
2 parents 08d886c + 4293461 commit e7ec219
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions vpr/src/route/connection_router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@
#include "bucket.h"
#include "rr_graph_fwd.h"

/**
* @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),
* 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.
* @param rr_nodes
* @param rr_graph
* @param from_node
* @param sink_node
* @param is_inter_layer_opin_connection It is true if the architecture is 3D and inter-layer connections are only from OPINs.
* @return
*/
static bool has_path_to_sink(const t_rr_graph_view& rr_nodes,
const RRGraphView* rr_graph,
RRNodeId from_node,
RRNodeId sink_node,
bool is_inter_layer_opin_connection);

static bool relevant_node_to_target(const RRGraphView* rr_graph,
RRNodeId node_to_add,
RRNodeId target_node);
Expand Down Expand Up @@ -852,9 +836,6 @@ void ConnectionRouter<Heap>::add_route_tree_to_heap(
/* Pre-order depth-first traversal */
// IPINs and SINKS are not re_expanded
if (rt_node.re_expand) {
if (target_node.is_valid() && !has_path_to_sink(rr_nodes_, rr_graph_, RRNodeId(rt_node.inode), RRNodeId(target_node), only_opin_inter_layer)) {
return;
}
add_route_tree_node_to_heap(rt_node,
target_node,
cost_params,
Expand Down Expand Up @@ -1020,9 +1001,6 @@ t_bb ConnectionRouter<Heap>::add_high_fanout_route_tree_to_heap(
if (!inside_bb(rr_node_to_add, net_bounding_box))
continue;

if (!has_path_to_sink(rr_nodes_, rr_graph_, RRNodeId(rt_node.inode), target_node, only_opin_inter_layer)) {
continue;
}
// Put the node onto the heap
add_route_tree_node_to_heap(rt_node, target_node, cost_params, net_bounding_box);

Expand Down Expand Up @@ -1059,31 +1037,6 @@ t_bb ConnectionRouter<Heap>::add_high_fanout_route_tree_to_heap(
}
}

static inline bool has_path_to_sink(const t_rr_graph_view& rr_nodes,
const RRGraphView* rr_graph,
RRNodeId from_node,
RRNodeId sink_node,
bool is_inter_layer_opin_connection) {
int sink_layer = rr_graph->node_layer(sink_node);

if (rr_graph->node_layer(from_node) == sink_layer || rr_graph->node_type(from_node) == SOURCE || !is_inter_layer_opin_connection) {
return true;
} else if (rr_graph->node_type(from_node) == CHANX || rr_graph->node_type(from_node) == CHANY || rr_graph->node_type(from_node) == IPIN) {
return false;
} else {
VTR_ASSERT(rr_graph->node_type(from_node) == OPIN && is_inter_layer_opin_connection);
auto edges = rr_nodes.edge_range(from_node);

for (RREdgeId from_edge : edges) {
RRNodeId to_node = rr_nodes.edge_sink_node(from_edge);
if (rr_graph->node_layer(to_node) == sink_layer) {
return true;
}
}
return false;
}
}

static inline bool relevant_node_to_target(const RRGraphView* rr_graph,
RRNodeId node_to_add,
RRNodeId target_node) {
Expand Down

0 comments on commit e7ec219

Please sign in to comment.