Skip to content

Commit fa880d5

Browse files
committed
[VPR] Deploy RRGraphView in post-routing packing sync function
1 parent 6e442d1 commit fa880d5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

vpr/src/pack/post_routing_pb_pin_fixup.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,10 @@ static void update_cluster_pin_with_post_routing_results(const DeviceContext& de
152152
short valid_routing_net_cnt = 0;
153153
for (const e_side& pin_side : pin_sides) {
154154
/* Find the net mapped to this pin in routing results */
155-
const int& rr_node = get_rr_node_index(device_ctx.rr_node_indices,
156-
grid_coord.x(), grid_coord.y(),
157-
rr_node_type, physical_pin, pin_side);
155+
RRNodeId rr_node = device_ctx.rr_graph.node_lookup().find_node(grid_coord.x(), grid_coord.y(), rr_node_type, physical_pin, pin_side);
158156

159157
/* Bypass invalid nodes, after that we must have a valid rr_node id */
160-
if (OPEN == rr_node) {
158+
if (!rr_node) {
161159
continue;
162160
}
163161
VTR_ASSERT((size_t)rr_node < device_ctx.rr_nodes.size());
@@ -179,19 +177,19 @@ static void update_cluster_pin_with_post_routing_results(const DeviceContext& de
179177
* - A invalid net id (others should be all invalid as well)
180178
* assume that this pin is not used by router
181179
*/
182-
if (rr_node_nets[RRNodeId(rr_node)]) {
180+
if (rr_node_nets[rr_node]) {
183181
if (routing_net_id) {
184-
if (routing_net_id != rr_node_nets[RRNodeId(rr_node)]) {
182+
if (routing_net_id != rr_node_nets[rr_node]) {
185183
VTR_LOG_ERROR("Pin '%s' is mapped to two nets: '%s' and '%s'\n",
186184
pb_graph_pin->to_string().c_str(),
187185
clustering_ctx.clb_nlist.net_name(routing_net_id).c_str(),
188-
clustering_ctx.clb_nlist.net_name(rr_node_nets[RRNodeId(rr_node)]).c_str());
186+
clustering_ctx.clb_nlist.net_name(rr_node_nets[rr_node]).c_str());
189187
}
190-
VTR_ASSERT(routing_net_id == rr_node_nets[RRNodeId(rr_node)]);
188+
VTR_ASSERT(routing_net_id == rr_node_nets[rr_node]);
191189
}
192-
routing_net_id = rr_node_nets[RRNodeId(rr_node)];
190+
routing_net_id = rr_node_nets[rr_node];
193191
valid_routing_net_cnt++;
194-
visited_rr_nodes.push_back(RRNodeId(rr_node));
192+
visited_rr_nodes.push_back(rr_node);
195193
}
196194
}
197195

0 commit comments

Comments
 (0)