@@ -90,8 +90,8 @@ static t_trace_branch traceback_branch(int node, int target_net_pin_index, std::
90
90
static std::pair<t_trace*, t_trace*> add_trace_non_configurable (t_trace* head, t_trace* tail, int node, std::unordered_set<int >& visited);
91
91
static std::pair<t_trace*, t_trace*> add_trace_non_configurable_recurr (int node, std::unordered_set<int >& visited, int depth = 0 );
92
92
93
- static vtr::vector<ClusterNetId, std::vector<int >> load_net_rr_terminals (const t_rr_node_indices& L_rr_node_indices );
94
- static vtr::vector<ClusterBlockId, std::vector<int >> load_rr_clb_sources (const t_rr_node_indices& L_rr_node_indices );
93
+ static vtr::vector<ClusterNetId, std::vector<int >> load_net_rr_terminals (const RRGraphView& rr_graph );
94
+ static vtr::vector<ClusterBlockId, std::vector<int >> load_rr_clb_sources (const RRGraphView& rr_graph );
95
95
96
96
static t_clb_opins_used alloc_and_load_clb_opins_used_locally ();
97
97
static void adjust_one_rr_occ_and_acc_cost (int inode, int add_or_sub, float acc_fac);
@@ -477,10 +477,10 @@ void init_route_structs(int bb_factor) {
477
477
route_ctx.trace_nodes .resize (cluster_ctx.clb_nlist .nets ().size ());
478
478
479
479
// Various look-ups
480
- route_ctx.net_rr_terminals = load_net_rr_terminals (device_ctx.rr_node_indices );
480
+ route_ctx.net_rr_terminals = load_net_rr_terminals (device_ctx.rr_graph );
481
481
route_ctx.is_clock_net = load_is_clock_net ();
482
482
route_ctx.route_bb = load_route_bb (bb_factor);
483
- route_ctx.rr_blk_source = load_rr_clb_sources (device_ctx.rr_node_indices );
483
+ route_ctx.rr_blk_source = load_rr_clb_sources (device_ctx.rr_graph );
484
484
route_ctx.clb_opins_used_locally = alloc_and_load_clb_opins_used_locally ();
485
485
route_ctx.net_status .resize (cluster_ctx.clb_nlist .nets ().size ());
486
486
}
@@ -966,7 +966,7 @@ void reset_rr_node_route_structs() {
966
966
/* Allocates and loads the route_ctx.net_rr_terminals data structure. For each net it stores the rr_node *
967
967
* index of the SOURCE of the net and all the SINKs of the net [clb_nlist.nets()][clb_nlist.net_pins()]. *
968
968
* Entry [inet][pnum] stores the rr index corresponding to the SOURCE (opin) or SINK (ipin) of the pin. */
969
- static vtr::vector<ClusterNetId, std::vector<int >> load_net_rr_terminals (const t_rr_node_indices& L_rr_node_indices ) {
969
+ static vtr::vector<ClusterNetId, std::vector<int >> load_net_rr_terminals (const RRGraphView& rr_graph ) {
970
970
vtr::vector<ClusterNetId, std::vector<int >> net_rr_terminals;
971
971
972
972
auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -993,9 +993,9 @@ static vtr::vector<ClusterNetId, std::vector<int>> load_net_rr_terminals(const t
993
993
994
994
int iclass = type->pin_class [phys_pin];
995
995
996
- int inode = get_rr_node_index (L_rr_node_indices, i, j, (pin_count == 0 ? SOURCE : SINK), /* First pin is driver */
997
- iclass);
998
- net_rr_terminals[net_id][pin_count] = inode;
996
+ RRNodeId inode = rr_graph. node_lookup (). find_node ( i, j, (pin_count == 0 ? SOURCE : SINK), /* First pin is driver */
997
+ iclass);
998
+ net_rr_terminals[net_id][pin_count] = size_t ( inode) ;
999
999
pin_count++;
1000
1000
}
1001
1001
}
@@ -1008,10 +1008,10 @@ static vtr::vector<ClusterNetId, std::vector<int>> load_net_rr_terminals(const t
1008
1008
* they are used only to reserve pins for locally used OPINs in the router. *
1009
1009
* [0..cluster_ctx.clb_nlist.blocks().size()-1][0..num_class-1]. *
1010
1010
* The values for blocks that are padsare NOT valid. */
1011
- static vtr::vector<ClusterBlockId, std::vector<int >> load_rr_clb_sources (const t_rr_node_indices& L_rr_node_indices ) {
1011
+ static vtr::vector<ClusterBlockId, std::vector<int >> load_rr_clb_sources (const RRGraphView& rr_graph ) {
1012
1012
vtr::vector<ClusterBlockId, std::vector<int >> rr_blk_source;
1013
1013
1014
- int i, j, iclass, inode ;
1014
+ int i, j, iclass;
1015
1015
t_rr_type rr_type;
1016
1016
1017
1017
auto & cluster_ctx = g_vpr_ctx.clustering ();
@@ -1036,8 +1036,8 @@ static vtr::vector<ClusterBlockId, std::vector<int>> load_rr_clb_sources(const t
1036
1036
else
1037
1037
rr_type = SINK;
1038
1038
1039
- inode = get_rr_node_index (L_rr_node_indices, i, j, rr_type, iclass);
1040
- rr_blk_source[blk_id][iclass] = inode;
1039
+ RRNodeId inode = rr_graph. node_lookup (). find_node ( i, j, rr_type, iclass);
1040
+ rr_blk_source[blk_id][iclass] = size_t ( inode) ;
1041
1041
} else {
1042
1042
rr_blk_source[blk_id][iclass] = OPEN;
1043
1043
}
0 commit comments