@@ -274,8 +274,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
274274 RrGraphSerializer (
275275 const e_graph_type graph_type,
276276 const enum e_base_cost_type base_cost_type,
277- RRSwitchId* wire_to_rr_ipin_switch,
278- int * wire_to_rr_ipin_switch_between_dice,
279277 bool do_check_rr_graph,
280278 const char * read_rr_graph_name,
281279 std::string* loaded_rr_graph_filename,
@@ -297,9 +295,7 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
297295 MetadataStorage<std::tuple<int , int , short >>* rr_edge_metadata,
298296 vtr::string_internment* strings,
299297 bool is_flat)
300- : wire_to_rr_ipin_switch_(wire_to_rr_ipin_switch)
301- , wire_to_rr_ipin_switch_between_dice_(wire_to_rr_ipin_switch_between_dice)
302- , chan_width_(chan_width)
298+ : chan_width_(chan_width)
303299 , rr_nodes_(rr_nodes)
304300 , rr_graph_builder_(rr_graph_builder)
305301 , rr_graph_(rr_graph)
@@ -1129,20 +1125,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
11291125 return nullptr ;
11301126 }
11311127 inline void finish_rr_graph_rr_edges (void *& /* ctx*/ ) final {
1132- /* initialize a vector that keeps track of the number of wire to ipin switches
1133- * There should be only one wire to ipin switch. In case there are more, make sure to
1134- * store the most frequent switch */
1135- const auto & rr_graph = (*rr_graph_);
1136- std::vector<int > count_for_wire_to_ipin_switches;
1137- count_for_wire_to_ipin_switches.resize (rr_switch_inf_->size (), 0 );
1138- // switch for same layer Track to IPIN connection
1139- // first is index, second is count
1140- std::pair<int , int > most_frequent_switch (-1 , 0 );
1141- // switch for different layer Track to IPIN connection
1142- std::vector<int > count_for_wire_to_ipin_switches_between_dice;
1143- count_for_wire_to_ipin_switches_between_dice.resize (rr_switch_inf_->size (), 0 );
1144- std::pair<int ,int > most_frequent_switch_between_dice (-1 ,0 );
1145-
11461128 // Partition the rr graph edges for efficient access to
11471129 // configurable/non-configurable edge subsets. Must be done after RR
11481130 // switches have been allocated.
@@ -1165,37 +1147,8 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
11651147 " switch_id %zu is larger than num_rr_switches %zu" ,
11661148 switch_id, rr_switch_inf_->size ());
11671149 }
1168- auto node = (*rr_nodes_)[source_node];
1169-
1170- /* Keeps track of the number of the specific type of switch that connects a wire to an ipin
1171- * use the pair data structure to keep the maximum*/
1172- if (rr_graph.node_type (node.id ()) == e_rr_type::CHANX || rr_graph.node_type (node.id ()) == e_rr_type::CHANY) {
1173- if (rr_graph.node_type (RRNodeId (sink_node)) == e_rr_type::IPIN){
1174- if (rr_graph.node_layer_low (RRNodeId (sink_node)) == rr_graph.node_layer_low (RRNodeId (source_node))) {
1175- count_for_wire_to_ipin_switches[switch_id]++;
1176- if (count_for_wire_to_ipin_switches[switch_id] > most_frequent_switch.second ) {
1177- most_frequent_switch.first = switch_id;
1178- most_frequent_switch.second = count_for_wire_to_ipin_switches[switch_id];
1179- }
1180- }
1181- else {
1182- VTR_ASSERT (rr_graph.node_layer_low (RRNodeId (sink_node)) != rr_graph.node_layer_low (RRNodeId (source_node)));
1183- count_for_wire_to_ipin_switches_between_dice[switch_id]++;
1184- if (count_for_wire_to_ipin_switches_between_dice[switch_id] > most_frequent_switch_between_dice.second ){
1185- most_frequent_switch_between_dice.first = switch_id;
1186- most_frequent_switch_between_dice.second = count_for_wire_to_ipin_switches_between_dice[switch_id];
1187- }
1188- }
1189- }
1190- }
11911150 }
11921151 }
1193-
1194- VTR_ASSERT (wire_to_rr_ipin_switch_ != nullptr );
1195- *wire_to_rr_ipin_switch_ = (RRSwitchId)most_frequent_switch.first ;
1196-
1197- VTR_ASSERT (wire_to_rr_ipin_switch_between_dice_ != nullptr );
1198- *wire_to_rr_ipin_switch_between_dice_ = most_frequent_switch_between_dice.first ;
11991152 }
12001153
12011154 inline EdgeWalker get_rr_graph_rr_edges (void *& /* ctx*/ ) final {
@@ -1827,7 +1780,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
18271780 segment_inf_y_,
18281781 segment_inf_z_,
18291782 *rr_indexed_data_,
1830- *wire_to_rr_ipin_switch_,
18311783 base_cost_type_,
18321784 echo_enabled_,
18331785 echo_file_name_);
@@ -2169,8 +2121,6 @@ class RrGraphSerializer final : public uxsd::RrGraphBase<RrGraphContextTypes> {
21692121 std::array<uxsd::enum_loc_side, 16 > side_map_;
21702122
21712123 // Output for loads, and constant data for writes.
2172- RRSwitchId* wire_to_rr_ipin_switch_;
2173- int * wire_to_rr_ipin_switch_between_dice_;
21742124 t_chan_width* chan_width_;
21752125 t_rr_graph_storage* rr_nodes_;
21762126 RRGraphBuilder* rr_graph_builder_;
0 commit comments