@@ -143,7 +143,7 @@ static bool find_direct_connect_sample_locations(const t_direct_inf* direct,
143
143
int to_pin_class,
144
144
int * src_rr,
145
145
int * sink_rr,
146
- std::vector<int >* scratch);
146
+ std::vector<RRNodeId >* scratch);
147
147
148
148
static bool verify_delta_delays (const vtr::Matrix<float >& delta_delays);
149
149
@@ -956,7 +956,7 @@ static bool find_direct_connect_sample_locations(const t_direct_inf* direct,
956
956
int to_pin_class,
957
957
int * src_rr,
958
958
int * sink_rr,
959
- std::vector<int >* scratch) {
959
+ std::vector<RRNodeId >* scratch) {
960
960
VTR_ASSERT (from_type != nullptr );
961
961
VTR_ASSERT (to_type != nullptr );
962
962
@@ -982,9 +982,8 @@ static bool find_direct_connect_sample_locations(const t_direct_inf* direct,
982
982
RRNodeId from_pin_rr = device_ctx.rr_graph .node_lookup ().find_node (from_x, from_y, OPIN, from_pin, direct->from_side );
983
983
from_pin_found = (from_pin_rr != RRNodeId::INVALID ());
984
984
} else {
985
- std::vector<int >& from_pin_rrs = *scratch;
986
- get_rr_node_indices (device_ctx.rr_node_indices , from_x, from_y, OPIN, from_pin, &from_pin_rrs);
987
- from_pin_found = !from_pin_rrs.empty ();
985
+ (*scratch) = device_ctx.rr_graph .node_lookup ().find_nodes_at_all_sides (from_x, from_y, OPIN, from_pin);
986
+ from_pin_found = !(*scratch).empty ();
988
987
}
989
988
if (!from_pin_found) continue ;
990
989
@@ -1000,9 +999,8 @@ static bool find_direct_connect_sample_locations(const t_direct_inf* direct,
1000
999
RRNodeId to_pin_rr = device_ctx.rr_graph .node_lookup ().find_node (to_x, to_y, IPIN, to_pin, direct->to_side );
1001
1000
to_pin_found = (to_pin_rr != RRNodeId::INVALID ());
1002
1001
} else {
1003
- std::vector<int >& to_pin_rrs = *scratch;
1004
- get_rr_node_indices (device_ctx.rr_node_indices , to_x, to_y, IPIN, to_pin, &to_pin_rrs);
1005
- to_pin_found = !to_pin_rrs.empty ();
1002
+ (*scratch) = device_ctx.rr_graph .node_lookup ().find_nodes_at_all_sides (to_x, to_y, IPIN, to_pin);
1003
+ to_pin_found = !(*scratch).empty ();
1006
1004
}
1007
1005
if (!to_pin_found) continue ;
1008
1006
@@ -1039,17 +1037,15 @@ static bool find_direct_connect_sample_locations(const t_direct_inf* direct,
1039
1037
//
1040
1038
1041
1039
{
1042
- std::vector<int >& source_rr_nodes = *scratch;
1043
- get_rr_node_indices (device_ctx.rr_node_indices , from_x, from_y, SOURCE, from_pin_class, &source_rr_nodes);
1044
- VTR_ASSERT (source_rr_nodes.size () > 0 );
1045
- *src_rr = source_rr_nodes[0 ];
1040
+ (*scratch) = device_ctx.rr_graph .node_lookup ().find_nodes_at_all_sides (from_x, from_y, SOURCE, from_pin_class);
1041
+ VTR_ASSERT ((*scratch).size () > 0 );
1042
+ *src_rr = size_t ((*scratch)[0 ]);
1046
1043
}
1047
1044
1048
1045
{
1049
- std::vector<int >& sink_rr_nodes = *scratch;
1050
- get_rr_node_indices (device_ctx.rr_node_indices , to_x, to_y, SINK, to_pin_class, &sink_rr_nodes);
1051
- VTR_ASSERT (sink_rr_nodes.size () > 0 );
1052
- *sink_rr = sink_rr_nodes[0 ];
1046
+ (*scratch) = device_ctx.rr_graph .node_lookup ().find_nodes_at_all_sides (to_x, to_y, SINK, to_pin_class);
1047
+ VTR_ASSERT ((*scratch).size () > 0 );
1048
+ *sink_rr = size_t ((*scratch)[0 ]);
1053
1049
}
1054
1050
1055
1051
return true ;
@@ -1082,7 +1078,7 @@ void OverrideDelayModel::compute_override_delay_model(
1082
1078
1083
1079
// Look at all the direct connections that exist, and add overrides to delay model
1084
1080
auto & device_ctx = g_vpr_ctx.device ();
1085
- std::vector<int > scratch;
1081
+ std::vector<RRNodeId > scratch;
1086
1082
for (int idirect = 0 ; idirect < device_ctx.arch ->num_directs ; ++idirect) {
1087
1083
const t_direct_inf* direct = &device_ctx.arch ->Directs [idirect];
1088
1084
0 commit comments