112 int inet, bends, total_bends, max_bends;
113 int length, total_length, max_length;
114 int segments, total_segments, max_segments;
115 float av_bends, av_length, av_segments;
116 int num_global_nets, num_clb_opins_reserved;
125 num_clb_opins_reserved = 0;
127 for (inet = 0; inet <
num_nets; inet++) {
131 total_bends += bends;
132 max_bends =
std::max(bends, max_bends);
134 total_length += length;
135 max_length =
std::max(length, max_length);
137 total_segments += segments;
138 max_segments =
std::max(segments, max_segments);
142 num_clb_opins_reserved++;
146 av_bends = (float) total_bends / (
float) (num_nets - num_global_nets);
148 vpr_printf(TIO_MESSAGE_INFO,
"Average number of bends per net: %#g Maximum # of bends: %d\n", av_bends, max_bends);
151 av_length = (float) total_length / (
float) (num_nets - num_global_nets);
152 vpr_printf(TIO_MESSAGE_INFO,
"Number of routed nets (nonglobal): %d\n", num_nets - num_global_nets);
153 vpr_printf(TIO_MESSAGE_INFO,
"Wirelength results (in units of 1 clb segments)...\n");
154 vpr_printf(TIO_MESSAGE_INFO,
"\tTotal wirelength: %d, average net length: %#g\n", total_length, av_length);
155 vpr_printf(TIO_MESSAGE_INFO,
"\tMaximum net length: %d\n", max_length);
158 av_segments = (float) total_segments / (
float) (num_nets - num_global_nets);
159 vpr_printf(TIO_MESSAGE_INFO,
"Wirelength results in terms of physical segments...\n");
160 vpr_printf(TIO_MESSAGE_INFO,
"\tTotal wiring segments used: %d, average wire segments per net: %#g\n", total_segments, av_segments);
161 vpr_printf(TIO_MESSAGE_INFO,
"\tMaximum segments used by a net: %d\n", max_segments);
162 vpr_printf(TIO_MESSAGE_INFO,
"\tTotal local nets with reserved CLB opins: %d\n", num_clb_opins_reserved);
void get_num_bends_and_length(int inet, int *bends_ptr, int *len_ptr, int *segments_ptr)