Skip to content

Commit a1fbe87

Browse files
committed
[vpr][route][lookahead] iterate over layers to get the cost from opin to chan
1 parent 0358c7a commit a1fbe87

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

vpr/src/route/router_lookahead_map.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,17 @@ std::pair<float, float> MapLookahead::get_expected_delay_and_cong(RRNodeId from_
330330

331331
auto from_ptc = rr_graph.node_ptc_num(from_node);
332332

333-
std::tie(expected_delay_cost, expected_cong_cost) = util::get_cost_from_src_opin(src_opin_delays[from_layer_num][from_tile_index][from_ptc][to_layer_num],
334-
delta_x,
335-
delta_y,
336-
to_layer_num,
337-
get_wire_cost_entry);
333+
for (int layer_num = 0; layer_num < device_ctx.grid.get_num_layers(); layer_num++) {
334+
float this_delay_cost;
335+
float this_cong_cost;
336+
std::tie(this_delay_cost, this_cong_cost) = util::get_cost_from_src_opin(src_opin_delays[from_layer_num][from_tile_index][from_ptc][layer_num],
337+
delta_x,
338+
delta_y,
339+
to_layer_num,
340+
get_wire_cost_entry);
341+
expected_delay_cost = std::min(expected_delay_cost, this_delay_cost);
342+
expected_cong_cost = std::min(expected_cong_cost, this_cong_cost);
343+
}
338344

339345
expected_delay_cost *= params.criticality;
340346
expected_cong_cost *= (1 - params.criticality);

0 commit comments

Comments
 (0)