Skip to content

Commit

Permalink
Merge pull request #2310 from coolbreeze413/segment-stats-cap-fix
Browse files Browse the repository at this point in the history
fix calculation of segment cap/utilization by adding all axes caps
  • Loading branch information
vaughnbetz authored May 24, 2023
2 parents 924fd89 + f654a8b commit df19148
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vpr/src/route/segment_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void get_segment_usage_stats(std::vector<t_segment_inf>& segment_inf) {
int cap = 0;
for (auto ax : {X_AXIS, Y_AXIS}) {
occ += directed_occ_by_length[ax][seg_length];
cap = directed_cap_by_length[ax][seg_length];
cap += directed_cap_by_length[ax][seg_length];
}
utilization = (float)occ / (float)cap;
VTR_LOG(" %s%s %4d %11.3g\n", std::string(std::max(4 - seg_name_size, (max_segment_name_length - seg_name_size)), ' ').c_str(), seg_name.c_str(), seg_type, utilization);
Expand Down

0 comments on commit df19148

Please sign in to comment.