Skip to content

Commit 15859c1

Browse files
committed
Added const RRGraphView& rr_graph to report_overused_nodes() function as
an argument and removed the use of device_ctx within report_overused_nodes(). Signed-off-by: Ethan Rogers <[email protected]>
1 parent fa3e1f7 commit 15859c1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

vpr/src/base/vpr_api.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,8 @@ RouteStatus vpr_route_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
701701

702702
const auto& router_opts = vpr_setup.RouterOpts;
703703
const auto& filename_opts = vpr_setup.FileNameOpts;
704+
const auto& device_ctx = g_vpr_ctx.device();
705+
const auto& rr_graph = device_ctx.rr_graph;
704706

705707
if (router_opts.doRouting == STAGE_SKIP) {
706708
//Assume successful
@@ -762,7 +764,7 @@ RouteStatus vpr_route_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
762764
//Otherwise, remind the user of this possible report option
763765
if (router_opts.generate_rr_node_overuse_report) {
764766
VTR_LOG("See report_overused_nodes.rpt for a detailed report on the RR node overuse information.\n");
765-
report_overused_nodes();
767+
report_overused_nodes(rr_graph);
766768
} else {
767769
VTR_LOG("For a detailed report on the RR node overuse information (report_overused_nodes.rpt), specify --generate_rr_node_overuse_report on.\n");
768770
}

vpr/src/route/overuse_report.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ void log_overused_nodes_status(int max_logged_overused_rr_nodes) {
5959
* This report will be generated only if the last routing attempt fails, which
6060
* causes the whole VPR flow to fail.
6161
*/
62-
void report_overused_nodes() {
63-
const auto& device_ctx = g_vpr_ctx.device();
64-
const auto& rr_graph = device_ctx.rr_graph;
62+
void report_overused_nodes(const RRGraphView& rr_graph) {
6563
const auto& route_ctx = g_vpr_ctx.routing();
6664

6765
/* Generate overuse info lookup table */

vpr/src/route/overuse_report.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

33
#include "rr_graph_storage.h"
4+
#include "rr_graph_view.h"
45
#include <map>
56

67
/**
@@ -21,7 +22,7 @@
2122
void log_overused_nodes_status(int max_logged_overused_rr_nodes);
2223

2324
///@brief Print out RR node overuse info in a post-VPR report file.
24-
void report_overused_nodes();
25+
void report_overused_nodes(const RRGraphView& rr_graph);
2526

2627
///@brief Generate a overused RR nodes to congested nets lookup table.
2728
void generate_overused_nodes_to_congested_net_lookup(std::map<RRNodeId, std::set<ClusterNetId>>& nodes_to_nets_lookup);

0 commit comments

Comments
 (0)