Skip to content

Commit 2ff4838

Browse files
ueqriAlexandreSinger
authored andcommitted
[ParallelRouter] Added astar_offset and Made Deterministic A-Star Work
Added `astar_offset` for parallel router based on the cherry-picked commit (ada43a5) on VPR master. With this change and setting a suitable value for `astar_offset` (ensuring the ordering heuristic being under- estimated), the deterministic A-Star of parallel router works.
1 parent 153337e commit 2ff4838

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

vpr/src/route/parallel_connection_router.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ void ParallelConnectionRouter::evaluate_timing_driven_node_costs(node_t* to,
780780
target_node,
781781
cost_params,
782782
to->R_upstream);
783-
total_cost += to->backward_path_cost + cost_params.astar_fac * expected_cost;
783+
total_cost += to->backward_path_cost + cost_params.astar_fac * std::max(0.f, expected_cost - cost_params.astar_offset);
784784

785785
// if (rcv_path_manager.is_enabled() && to->path_data != nullptr) {
786786
// to->path_data->backward_delay += cost_params.criticality * Tdel;
@@ -893,12 +893,8 @@ void ParallelConnectionRouter::add_route_tree_node_to_heap(
893893

894894
// if (!rcv_path_manager.is_enabled()) {
895895
// tot_cost = backward_path_cost + cost_params.astar_fac * expected_cost;
896-
float tot_cost = backward_path_cost
897-
+ cost_params.astar_fac
898-
* router_lookahead_.get_expected_cost(inode,
899-
target_node,
900-
cost_params,
901-
R_upstream);
896+
float expected_cost = router_lookahead_.get_expected_cost(inode, target_node, cost_params, R_upstream);
897+
float tot_cost = backward_path_cost + cost_params.astar_fac * std::max(0.f, expected_cost - cost_params.astar_offset);
902898
VTR_LOGV_DEBUG(router_debug_, " Adding node %8d to heap from init route tree with cost %g (%s)\n",
903899
inode,
904900
tot_cost,

0 commit comments

Comments
 (0)