Skip to content

Commit c9af1fb

Browse files
compute inverse average channel for all valid indices
1 parent 1106c75 commit c9af1fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ void NetCostHandler::alloc_and_load_chan_w_factors_for_place_cost_(float place_c
195195
* place_cost_exp power -- numbers other than one mean this is no *
196196
* longer a simple "average number of tracks"; it is some power of *
197197
* that, allowing greater penalization of narrow channels. */
198-
for (int high = 0; high < (int)grid_height; high++) {
199-
for (int low = 0; low <= high; low++) {
198+
for (int high = -1; high < (int)grid_height; high++) {
199+
for (int low = -1; low <= high; low++) {
200200
/* Since we will divide the wiring cost by the average channel *
201201
* capacity between high and low, having only 0 width channels *
202202
* will result in infinite wiring capacity normalization *
@@ -225,8 +225,8 @@ void NetCostHandler::alloc_and_load_chan_w_factors_for_place_cost_(float place_c
225225

226226
/* Now compute the inverse of the average number of tracks per channel
227227
* between high and low. Take to specified power. */
228-
for (int high = 0; high < (int)grid_width; high++) {
229-
for (int low = 0; low <= high; low++) {
228+
for (int high = -1; high < (int)grid_width; high++) {
229+
for (int low = -1; low <= high; low++) {
230230
/* Since we will divide the wiring cost by the average channel *
231231
* capacity between high and low, having only 0 width channels *
232232
* will result in infinite wiring capacity normalization *

0 commit comments

Comments
 (0)