Skip to content

Commit 1ea2bf8

Browse files
committed
set the cost to zero in the empty cost only if layers are equal
1 parent eb5140e commit 1ea2bf8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vpr/src/route/router_lookahead_map.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,11 @@ static Cost_Entry get_nearby_cost_entry(int from_layer_num, int x, int y, int to
10081008
if (std::isnan(copy_entry.delay) && std::isnan(copy_entry.congestion)) {
10091009
if (copy_x == 0 && copy_y == 0) {
10101010
copy_entry = Cost_Entry(0., 0.); //(0, 0) entry is invalid so set zero to terminate recursion
1011+
if (from_layer_num == to_layer_num) {
1012+
copy_entry = Cost_Entry(0., 0.);
1013+
} else {
1014+
copy_entry = Cost_Entry(std::numeric_limits<float>::max() / 1e12, std::numeric_limits<float>::max() / 1e12);
1015+
}
10111016
} else {
10121017
copy_entry = get_nearby_cost_entry(from_layer_num, copy_x, copy_y, to_layer_num, segment_index, chan_index);
10131018
}

0 commit comments

Comments
 (0)