Skip to content

Commit 08950f5

Browse files
consider CHANZ nodes in map lookahead
1 parent 539aa56 commit 08950f5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

vpr/src/place/net_cost_handler.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
* To get a delay estimation of a connection (from a source to a sink), first, dx and dy between these two points should be calculated,
2121
* and these two numbers are the indices to access this 2D array. By default, the placement delay model is created by iterating over the router lookahead
2222
* to get the minimum cost for each dx and dy.
23-
*
24-
* @date July 12, 2024
2523
*/
2624
#include "net_cost_handler.h"
2725

vpr/src/route/router_lookahead/router_lookahead_map.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,14 @@ float MapLookahead::get_expected_cost(RRNodeId current_node, RRNodeId target_nod
175175
if (is_flat_) {
176176
return get_expected_cost_flat_router(current_node, target_node, params, R_upstream);
177177
} else {
178-
if (from_rr_type == e_rr_type::CHANX || from_rr_type == e_rr_type::CHANY || from_rr_type == e_rr_type::SOURCE || from_rr_type == e_rr_type::OPIN) {
178+
if (from_rr_type == e_rr_type::CHANX || from_rr_type == e_rr_type::CHANY || from_rr_type == e_rr_type::CHANZ
179+
|| from_rr_type == e_rr_type::SOURCE || from_rr_type == e_rr_type::OPIN) {
179180
// Get the total cost using the combined delay and congestion costs
180181
auto [delay_cost, cong_cost] = get_expected_delay_and_cong(current_node, target_node, params, R_upstream);
181182
return delay_cost + cong_cost;
182-
} else if (from_rr_type == e_rr_type::IPIN) { /* Change if you're allowing route-throughs */
183+
} else if (from_rr_type == e_rr_type::IPIN) { // Change if you're allowing route-throughs
183184
return (device_ctx.rr_indexed_data[RRIndexedDataId(SINK_COST_INDEX)].base_cost);
184-
} else { /* Change this if you want to investigate route-throughs */
185+
} else { // Change this if you want to investigate route-throughs
185186
return (0.);
186187
}
187188
}

0 commit comments

Comments
 (0)