Skip to content

Commit 93aba7c

Browse files
[Infra] Cleaned Up Header Files in Route Folder
Continued the header file cleanup effort in the route folder. Some of these files may need to be revisited in more detail, but got some of the major header include issues. Found that some definitions were in the wrong place, so moved them to the correct implementation file.
1 parent 7599927 commit 93aba7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+196
-220
lines changed

vpr/src/route/NestedNetlistRouter.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
/** @file Nested parallel case for NetlistRouter */
44
#include "netlist_routers.h"
5+
#include "partition_tree.h"
56
#include "vtr_optional.h"
67
#include "vtr_thread_pool.h"
78
#include "serial_connection_router.h"

vpr/src/route/SerialNetlistRouter.tpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/** @file Templated implementations for SerialNetlistRouter */
44

55
#include "SerialNetlistRouter.h"
6+
#include "partition_tree.h"
67
#include "route_net.h"
8+
#include "route_utils.h"
79
#include "vtr_time.h"
810

911
template<typename HeapType>

vpr/src/route/annotate_routing.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
* from VPR to OpenFPGA. (i.e. create a mapping from RRNodeIds to ClusterNetIds)
44
*******************************************************************/
55

6+
#include "describe_rr_node.h"
67
#include "vpr_error.h"
7-
#include "vtr_assert.h"
88
#include "vtr_time.h"
99
#include "vtr_log.h"
1010

1111
#include "route_utils.h"
12-
#include "rr_graph.h"
1312

1413
#include "annotate_routing.h"
1514

vpr/src/route/annotate_routing.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#ifndef ANNOTATE_ROUTING_H
22
#define ANNOTATE_ROUTING_H
33

4-
#include "vpr_context.h"
4+
#include "clustered_netlist_fwd.h"
5+
#include "rr_graph_fwd.h"
6+
#include "vtr_vector.h"
7+
8+
struct AtomContext;
9+
struct ClusteringContext;
10+
struct DeviceContext;
511

612
/********************************************************************
713
* Create a mapping between each rr_node and its mapped nets

vpr/src/route/check_route.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#ifndef VPR_CHECK_ROUTE_H
22
#define VPR_CHECK_ROUTE_H
3-
#include "physical_types.h"
3+
4+
#include "netlist.h"
45
#include "vpr_types.h"
5-
#include "route_common.h"
66

77
void check_route(const Netlist<>& net_list,
88
enum e_route_type route_type,

vpr/src/route/connection_based_routing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#pragma once
2+
23
#include <vector>
34
#include <unordered_map>
4-
#include "route_tree_fwd.h"
5-
#include "vpr_types.h"
65
#include "timing_info.h"
76
#include "vpr_net_pins_matrix.h"
7+
#include "connection_based_routing_fwd.h"
88

99
/***************** Connection based rerouting **********************/
1010
// encompasses both incremental rerouting through route tree pruning

vpr/src/route/connection_router.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
*/
2323

2424
#include "connection_router_interface.h"
25+
#include "globals.h"
2526
#include "rr_graph_storage.h"
26-
#include "route_common.h"
2727
#include "router_lookahead.h"
2828
#include "route_tree.h"
29-
#include "rr_rc_data.h"
3029
#include "router_stats.h"
30+
#include "rr_graph_view.h"
3131
#include "spatial_route_tree_lookup.h"
3232

3333
/**

vpr/src/route/connection_router.tpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <algorithm>
66
#include "describe_rr_node.h"
7+
#include "route_common.h"
78
#include "rr_graph_fwd.h"
89
#include "vpr_utils.h"
910

vpr/src/route/connection_router_interface.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#ifndef _CONNECTION_ROUTER_INTERFACE_H
22
#define _CONNECTION_ROUTER_INTERFACE_H
33

4-
#include <utility>
5-
6-
#include "heap_type.h"
74
#include "route_tree_fwd.h"
85
#include "rr_graph_fwd.h"
96
#include "vpr_types.h"

vpr/src/route/edge_groups.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <stack>
44
#include "rr_graph_fwd.h"
5+
#include "vpr_context.h"
56

67
// Adds non-configurable (undirected) edge to be grouped.
78
//

vpr/src/route/edge_groups.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
#include <cstddef>
88

99
#include "vpr_types.h"
10-
#include "vpr_context.h"
10+
11+
struct DeviceContext;
1112

1213
// Class for identifying the components of a graph as sets of nodes.
1314
// Each node is reachable from any other node in the same set, and

vpr/src/route/heap_type.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
#define _HEAP_TYPE_H
33

44
#include <cstdint>
5-
#include "physical_types.h"
65
#include "device_grid.h"
7-
#include "vtr_memory.h"
8-
#include "vtr_array_view.h"
96
#include "rr_graph_fwd.h"
107
#include "route_path_manager.h"
118

vpr/src/route/netlist_routers.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919
#include "NetPinTimingInvalidator.h"
2020
#include "clustered_netlist_utils.h"
2121
#include "connection_based_routing_fwd.h"
22-
#include "globals.h"
22+
#include "d_ary_heap.h"
2323
#include "heap_type.h"
2424
#include "netlist_fwd.h"
25-
#include "partition_tree.h"
2625
#include "routing_predictor.h"
2726
#include "route_budgets.h"
28-
#include "route_utils.h"
2927
#include "router_stats.h"
3028
#include "timing_info.h"
3129
#include "vpr_net_pins_matrix.h"

vpr/src/route/overuse_report.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "overuse_report.h"
22

33
#include <fstream>
4+
#include "globals.h"
45
#include "physical_types_util.h"
56
#include "vpr_utils.h"
67
#include "vtr_log.h"

vpr/src/route/overuse_report.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#pragma once
22

3-
#include "rr_graph_storage.h"
3+
#include "netlist.h"
44
#include "rr_graph_view.h"
5-
#include "globals.h"
65
#include <map>
76
#include <set>
87

vpr/src/route/parallel_connection_router.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "parallel_connection_router.h"
22

33
#include <algorithm>
4+
#include "d_ary_heap.h"
45
#include "route_tree.h"
56
#include "rr_graph_fwd.h"
67

vpr/src/route/parallel_connection_router.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "connection_router.h"
55

6-
#include "d_ary_heap.h"
76
#include "multi_queue_d_ary_heap.h"
87

98
#include <atomic>

vpr/src/route/partition_tree.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#include "partition_tree.h"
22
#include <cmath>
33
#include <memory>
4+
#include <stack>
45
#include <unordered_set>
6+
#include "globals.h"
57

68
/** Minimum number of nets inside a partition to continue further partitioning.
79
* Mostly an arbitrary limit. At a certain point, the quality lost due to disturbed net ordering

vpr/src/route/partition_tree.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
#pragma once
22

3-
#include "serial_connection_router.h"
4-
#include "netlist_fwd.h"
5-
#include "router_stats.h"
3+
#include "netlist.h"
4+
#include "vpr_types.h"
65

76
#include <cmath>
8-
#include <fstream>
97
#include <memory>
10-
#include <thread>
118

129
#ifdef VPR_USE_TBB
1310
#include <tbb/concurrent_vector.h>

vpr/src/route/route_budgets.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,11 @@
2222
#include <fstream>
2323
#include "vpr_error.h"
2424
#include "globals.h"
25-
#include "tatum/util/tatum_assert.hpp"
26-
27-
#include "tatum/timing_analyzers.hpp"
28-
#include "tatum/graph_walkers.hpp"
29-
#include "tatum/analyzer_factory.hpp"
30-
31-
#include "tatum/TimingGraph.hpp"
32-
#include "tatum/TimingConstraints.hpp"
33-
#include "tatum/TimingReporter.hpp"
34-
#include "tatum/timing_paths.hpp"
35-
36-
#include "tatum/delay_calc/FixedDelayCalculator.hpp"
37-
38-
#include "tatum/report/graphviz_dot_writer.hpp"
39-
#include "tatum/base/sta_util.hpp"
40-
#include "tatum/echo_writer.hpp"
4125
#include "tatum/TimingGraphFwd.hpp"
42-
#include "slack_evaluation.h"
4326
#include "tatum/TimingGraphFwd.hpp"
4427

4528
#include "vtr_assert.h"
46-
#include "vtr_log.h"
47-
#include "tatum/report/TimingPathFwd.hpp"
48-
#include "tatum/base/TimingType.hpp"
4929
#include "concrete_timing_info.h"
50-
#include "tatum/echo_writer.hpp"
51-
#include "net_delay.h"
5230
#include "route_budgets.h"
5331
#include "vtr_time.h"
5432

vpr/src/route/route_budgets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#ifndef ROUTE_BUDGETS_H
55
#define ROUTE_BUDGETS_H
66

7-
#include <iostream>
87
#include <vector>
98
#include <queue>
109
#include "RoutingDelayCalculator.h"
10+
#include "timing_info.h"
1111

1212
enum analysis_type {
1313
SETUP,

vpr/src/route/route_common.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "logic_types.h"
88
#include "physical_types_util.h"
99
#include "route_export.h"
10+
#include "vpr_utils.h"
1011

1112
#if defined(VPR_USE_TBB)
1213
#include <tbb/parallel_for_each.h>

vpr/src/route/route_common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* router files and some used globally. */
55

66
#include <vector>
7-
#include "clustered_netlist.h"
8-
#include "rr_node_fwd.h"
97
#include "router_stats.h"
108
#include "globals.h"
119

vpr/src/route/route_export.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
/** @file Function prototypes for functions in route_common.cpp that
44
* are used outside the router modules. */
55

6-
#include <memory>
7-
8-
#include "route_common.h"
9-
#include "timing_info_fwd.h"
10-
#include "vpr_types.h"
11-
12-
#include "RoutingDelayCalculator.h"
6+
#include <vector>
7+
#include "clustered_netlist_fwd.h"
8+
#include "netlist.h"
9+
#include "route_tree.h"
10+
#include "rr_graph_fwd.h"
11+
#include "vtr_optional.h"
12+
#include "vtr_vector.h"
1313

1414
std::vector<RRNodeId> collect_congested_rr_nodes();
1515

0 commit comments

Comments
 (0)