Skip to content

Commit bc24720

Browse files
authored
Merge pull request #2498 from byuccl/channel_fix
Fix division by zero on arches with many different channel widths
2 parents e5af061 + eddf287 commit bc24720

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vpr/src/route/rr_graph.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,6 +3723,11 @@ static void load_uniform_connection_block_pattern(vtr::NdMatrix<int, 6>& tracks_
37233723
/* Bi-directional treats each track separately, uni-directional works with pairs of tracks */
37243724
for (int j = 0; j < (Fc / group_size); ++j) {
37253725
int max_chan_width = (((side == TOP) || (side == BOTTOM)) ? x_chan_width : y_chan_width);
3726+
3727+
// if the number of tracks we can assign is zero break from the loop
3728+
if (max_chan_width == 0) {
3729+
break;
3730+
}
37263731
float step_size = (float)max_chan_width / (float)(Fc * num_phys_pins);
37273732

37283733
VTR_ASSERT(Fc > 0);

0 commit comments

Comments
 (0)