@@ -152,12 +152,10 @@ static void update_cluster_pin_with_post_routing_results(const DeviceContext& de
152
152
short valid_routing_net_cnt = 0 ;
153
153
for (const e_side& pin_side : pin_sides) {
154
154
/* 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);
158
156
159
157
/* Bypass invalid nodes, after that we must have a valid rr_node id */
160
- if (OPEN == rr_node) {
158
+ if (! rr_node) {
161
159
continue ;
162
160
}
163
161
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
179
177
* - A invalid net id (others should be all invalid as well)
180
178
* assume that this pin is not used by router
181
179
*/
182
- if (rr_node_nets[RRNodeId ( rr_node) ]) {
180
+ if (rr_node_nets[rr_node]) {
183
181
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]) {
185
183
VTR_LOG_ERROR (" Pin '%s' is mapped to two nets: '%s' and '%s'\n " ,
186
184
pb_graph_pin->to_string ().c_str (),
187
185
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 ());
189
187
}
190
- VTR_ASSERT (routing_net_id == rr_node_nets[RRNodeId ( rr_node) ]);
188
+ VTR_ASSERT (routing_net_id == rr_node_nets[rr_node]);
191
189
}
192
- routing_net_id = rr_node_nets[RRNodeId ( rr_node) ];
190
+ routing_net_id = rr_node_nets[rr_node];
193
191
valid_routing_net_cnt++;
194
- visited_rr_nodes.push_back (RRNodeId ( rr_node) );
192
+ visited_rr_nodes.push_back (rr_node);
195
193
}
196
194
}
197
195
0 commit comments