@@ -29,7 +29,7 @@ static float get_delay_normalization_fac(const vtr::vector<RRIndexedDataId, t_rr
29
29
30
30
static void load_rr_indexed_data_T_values (const RRGraphView& rr_graph, vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data);
31
31
32
- static void calculate_average_switch (const RRGraphView& rr_graph, int inode, double & avg_switch_R, double & avg_switch_T, double & avg_switch_Cinternal, int & num_switches, short & buffered, vtr::vector<RRNodeId, std::vector<RREdgeId>>& fan_in_list);
32
+ static void calculate_average_switch (const RRGraphView& rr_graph, int inode, double & avg_switch_R, double & avg_switch_T, double & avg_switch_Cinternal, int & num_switches, int & num_shorts, short & buffered, vtr::vector<RRNodeId, std::vector<RREdgeId>>& fan_in_list);
33
33
34
34
static void fixup_rr_indexed_data_T_values (vtr::vector<RRIndexedDataId, t_rr_indexed_data>& rr_indexed_data, size_t num_segment);
35
35
@@ -546,12 +546,15 @@ static void load_rr_indexed_data_T_values(const RRGraphView& rr_graph,
546
546
double avg_switch_T = 0 ;
547
547
double avg_switch_Cinternal = 0 ;
548
548
int num_switches = 0 ;
549
+ int num_shorts = 0 ;
549
550
short buffered = UNDEFINED;
550
- calculate_average_switch (rr_graph, (size_t )rr_id, avg_switch_R, avg_switch_T, avg_switch_Cinternal, num_switches, buffered, fan_in_list);
551
+ calculate_average_switch (rr_graph, (size_t )rr_id, avg_switch_R, avg_switch_T, avg_switch_Cinternal, num_switches, num_shorts, buffered, fan_in_list);
551
552
552
553
if (num_switches == 0 ) {
553
- VTR_LOG_WARN (" Node: %d with RR_type: %s at Location:%s, had no out-going switches\n " , rr_id,
554
- rr_graph.node_type_string (rr_id), node_cords.c_str ());
554
+ if (num_shorts == 0 ) {
555
+ VTR_LOG_WARN (" Node: %d with RR_type: %s at Location:%s, had no out-going switches\n " , rr_id,
556
+ rr_graph.node_type_string (rr_id), node_cords.c_str ());
557
+ }
555
558
continue ;
556
559
}
557
560
VTR_ASSERT (num_switches > 0 );
@@ -638,20 +641,24 @@ static void load_rr_indexed_data_T_values(const RRGraphView& rr_graph,
638
641
* It is not safe to assume that each node of the same wire type has the same switches with the same
639
642
* delays, therefore we take their average to take into account the possible differences
640
643
*/
641
- static void calculate_average_switch (const RRGraphView& rr_graph, int inode, double & avg_switch_R, double & avg_switch_T, double & avg_switch_Cinternal, int & num_switches, short & buffered, vtr::vector<RRNodeId, std::vector<RREdgeId>>& fan_in_list) {
644
+ static void calculate_average_switch (const RRGraphView& rr_graph, int inode, double & avg_switch_R, double & avg_switch_T, double & avg_switch_Cinternal, int & num_switches, int & num_shorts, short & buffered, vtr::vector<RRNodeId, std::vector<RREdgeId>>& fan_in_list) {
642
645
auto node = RRNodeId (inode);
643
646
644
647
avg_switch_R = 0 ;
645
648
avg_switch_T = 0 ;
646
649
avg_switch_Cinternal = 0 ;
647
650
num_switches = 0 ;
651
+ num_shorts = 0 ;
648
652
buffered = UNDEFINED;
649
653
for (const auto & edge : fan_in_list[node]) {
650
654
/* want to get C/R/Tdel/Cinternal of switches that connect this track segment to other track segments */
651
655
if (rr_graph.node_type (node) == CHANX || rr_graph.node_type (node) == CHANY) {
652
656
int switch_index = rr_graph.rr_nodes ().edge_switch (edge);
653
657
654
- if (rr_graph.rr_switch_inf (RRSwitchId (switch_index)).type () == SwitchType::SHORT) continue ;
658
+ if (rr_graph.rr_switch_inf (RRSwitchId (switch_index)).type () == SwitchType::SHORT) {
659
+ num_shorts++;
660
+ continue ;
661
+ }
655
662
656
663
avg_switch_R += rr_graph.rr_switch_inf (RRSwitchId (switch_index)).R ;
657
664
avg_switch_T += rr_graph.rr_switch_inf (RRSwitchId (switch_index)).Tdel ;
0 commit comments