Skip to content

Speed up Router's calculation of OveruseInfo #1376

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions vpr/src/route/route_timing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ struct more_sinks_than {

static size_t calculate_wirelength_available();
static WirelengthInfo calculate_wirelength_info(size_t available_wirelength);
static OveruseInfo calculate_overuse_info();
static OveruseInfo calculate_overuse_info(std::vector<ClusterNetId>& rerouted_nets);

static void print_route_status_header();
static void print_route_status(int itry,
Expand Down Expand Up @@ -503,7 +503,7 @@ bool try_timing_driven_route_tmpl(const t_router_opts& router_opts,
bool routing_is_feasible = feasible_routing();
float est_success_iteration = routing_predictor.estimate_success_iteration();

overuse_info = calculate_overuse_info();
overuse_info = calculate_overuse_info(rerouted_nets);
wirelength_info = calculate_wirelength_info(available_wirelength);
routing_predictor.add_iteration_overuse(itry, overuse_info.overused_nodes());

Expand Down Expand Up @@ -1608,7 +1608,7 @@ static bool early_exit_heuristic(const t_router_opts& router_opts, const Wirelen
return false;
}

static OveruseInfo calculate_overuse_info() {
static OveruseInfo calculate_overuse_info(std::vector<ClusterNetId>& rerouted_nets) {
auto& device_ctx = g_vpr_ctx.device();
auto& cluster_ctx = g_vpr_ctx.clustering();
auto& route_ctx = g_vpr_ctx.routing();
Expand All @@ -1627,7 +1627,10 @@ static OveruseInfo calculate_overuse_info() {
//Note that we walk through the entire routing and *not* the RR graph, which
//should be more efficient (since usually only a portion of the RR graph is
//used by routing, particularly on large devices).
for (auto net_id : cluster_ctx.clb_nlist.nets()) {
//
//We skip the nets that have not been rerouted, since if a net should
//be rerouted if it already has overused nodes (congestion problem).
for (auto net_id : rerouted_nets) {
for (t_trace* tptr = route_ctx.trace[net_id].head; tptr != nullptr; tptr = tptr->next) {
int inode = tptr->index;

Expand Down