Skip to content

Commit efddfbf

Browse files
mkurc-antkmurray
authored andcommitted
Added code comment.
Signed-off-by: Maciej Kurc <[email protected]>
1 parent e2b9e2d commit efddfbf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

vpr/src/place/place.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,6 +2348,11 @@ static void alloc_and_load_for_fast_cost_update(float place_cost_exp) {
23482348

23492349
for (size_t high = 0; high < device_ctx.grid.height(); high++)
23502350
for (size_t low = 0; low <= high; low++) {
2351+
/* Since we will divide the wiring cost by the average channel *
2352+
* capacity between high and low, having only 0 width channels *
2353+
* will result in infinite wiring capacity normalization *
2354+
* factor, and extremely bad placer behaviour. Hence we change *
2355+
* this to a small (1 track) channel capacity instead. */
23512356
if (chanx_place_cost_fac[high][low] == 0.0f) {
23522357
VTR_LOG_WARN("CHANX place cost fac is 0 at %d %d\n", high, low);
23532358
chanx_place_cost_fac[high][low] = 1.0f;
@@ -2375,6 +2380,11 @@ static void alloc_and_load_for_fast_cost_update(float place_cost_exp) {
23752380

23762381
for (size_t high = 0; high < device_ctx.grid.width(); high++)
23772382
for (size_t low = 0; low <= high; low++) {
2383+
/* Since we will divide the wiring cost by the average channel *
2384+
* capacity between high and low, having only 0 width channels *
2385+
* will result in infinite wiring capacity normalization *
2386+
* factor, and extremely bad placer behaviour. Hence we change *
2387+
* this to a small (1 track) channel capacity instead. */
23782388
if (chany_place_cost_fac[high][low] == 0.0f) {
23792389
VTR_LOG_WARN("CHANY place cost fac is 0 at %d %d\n", high, low);
23802390
chany_place_cost_fac[high][low] = 1.0f;

0 commit comments

Comments
 (0)