Skip to content

[Infra] Cleaned Up Header Files in Route Folder #3065

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
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions vpr/src/route/NestedNetlistRouter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/** @file Nested parallel case for NetlistRouter */
#include "netlist_routers.h"
#include "partition_tree.h"
#include "vtr_optional.h"
#include "vtr_thread_pool.h"
#include "serial_connection_router.h"
Expand Down
2 changes: 2 additions & 0 deletions vpr/src/route/SerialNetlistRouter.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/** @file Templated implementations for SerialNetlistRouter */

#include "SerialNetlistRouter.h"
#include "partition_tree.h"
#include "route_net.h"
#include "route_utils.h"
#include "vtr_time.h"

template<typename HeapType>
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/route/annotate_routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* from VPR to OpenFPGA. (i.e. create a mapping from RRNodeIds to ClusterNetIds)
*******************************************************************/

#include "describe_rr_node.h"
#include "vpr_error.h"
#include "vtr_assert.h"
#include "vtr_time.h"
#include "vtr_log.h"

#include "route_utils.h"
#include "rr_graph.h"

#include "annotate_routing.h"

Expand Down
8 changes: 7 additions & 1 deletion vpr/src/route/annotate_routing.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#ifndef ANNOTATE_ROUTING_H
#define ANNOTATE_ROUTING_H

#include "vpr_context.h"
#include "clustered_netlist_fwd.h"
#include "rr_graph_fwd.h"
#include "vtr_vector.h"

struct AtomContext;
struct ClusteringContext;
struct DeviceContext;

/********************************************************************
* Create a mapping between each rr_node and its mapped nets
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/route/check_route.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef VPR_CHECK_ROUTE_H
#define VPR_CHECK_ROUTE_H
#include "physical_types.h"

#include "netlist.h"
#include "vpr_types.h"
#include "route_common.h"

void check_route(const Netlist<>& net_list,
enum e_route_type route_type,
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/route/connection_based_routing.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#pragma once

#include <vector>
#include <unordered_map>
#include "route_tree_fwd.h"
#include "vpr_types.h"
#include "timing_info.h"
#include "vpr_net_pins_matrix.h"
#include "connection_based_routing_fwd.h"

/***************** Connection based rerouting **********************/
// encompasses both incremental rerouting through route tree pruning
Expand Down
4 changes: 2 additions & 2 deletions vpr/src/route/connection_router.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
*/

#include "connection_router_interface.h"
#include "globals.h"
#include "rr_graph_storage.h"
#include "route_common.h"
#include "router_lookahead.h"
#include "route_tree.h"
#include "rr_rc_data.h"
#include "router_stats.h"
#include "rr_graph_view.h"
#include "spatial_route_tree_lookup.h"

/**
Expand Down
1 change: 1 addition & 0 deletions vpr/src/route/connection_router.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <algorithm>
#include "describe_rr_node.h"
#include "route_common.h"
#include "rr_graph_fwd.h"
#include "vpr_utils.h"

Expand Down
3 changes: 0 additions & 3 deletions vpr/src/route/connection_router_interface.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#ifndef _CONNECTION_ROUTER_INTERFACE_H
#define _CONNECTION_ROUTER_INTERFACE_H

#include <utility>

#include "heap_type.h"
#include "route_tree_fwd.h"
#include "rr_graph_fwd.h"
#include "vpr_types.h"
Expand Down
1 change: 1 addition & 0 deletions vpr/src/route/edge_groups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <stack>
#include "rr_graph_fwd.h"
#include "vpr_context.h"

// Adds non-configurable (undirected) edge to be grouped.
//
Expand Down
3 changes: 2 additions & 1 deletion vpr/src/route/edge_groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
#include <cstddef>

#include "vpr_types.h"
#include "vpr_context.h"

struct DeviceContext;

// Class for identifying the components of a graph as sets of nodes.
// Each node is reachable from any other node in the same set, and
Expand Down
3 changes: 0 additions & 3 deletions vpr/src/route/heap_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#define _HEAP_TYPE_H

#include <cstdint>
#include "physical_types.h"
#include "device_grid.h"
#include "vtr_memory.h"
#include "vtr_array_view.h"
#include "rr_graph_fwd.h"
#include "route_path_manager.h"

Expand Down
5 changes: 1 addition & 4 deletions vpr/src/route/multi_queue_d_ary_heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* Modified: February 2025
********************************************************************/

#ifndef _MULTI_QUEUE_D_ARY_HEAP_H
#define _MULTI_QUEUE_D_ARY_HEAP_H
#pragma once

#include "device_grid.h"
#include "heap_type.h"
Expand Down Expand Up @@ -129,5 +128,3 @@ class MultiQueueDAryHeap {
private:
std::unique_ptr<MQ_IO> pq_;
};

#endif
4 changes: 1 addition & 3 deletions vpr/src/route/netlist_routers.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
#include "NetPinTimingInvalidator.h"
#include "clustered_netlist_utils.h"
#include "connection_based_routing_fwd.h"
#include "globals.h"
#include "d_ary_heap.h"
#include "heap_type.h"
#include "netlist_fwd.h"
#include "partition_tree.h"
#include "routing_predictor.h"
#include "route_budgets.h"
#include "route_utils.h"
#include "router_stats.h"
#include "timing_info.h"
#include "vpr_net_pins_matrix.h"
Expand Down
1 change: 1 addition & 0 deletions vpr/src/route/overuse_report.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "overuse_report.h"

#include <fstream>
#include "globals.h"
#include "physical_types_util.h"
#include "vpr_utils.h"
#include "vtr_log.h"
Expand Down
3 changes: 1 addition & 2 deletions vpr/src/route/overuse_report.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#pragma once

#include "rr_graph_storage.h"
#include "netlist.h"
#include "rr_graph_view.h"
#include "globals.h"
#include <map>
#include <set>

Expand Down
1 change: 1 addition & 0 deletions vpr/src/route/parallel_connection_router.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "parallel_connection_router.h"

#include <algorithm>
#include "d_ary_heap.h"
#include "route_tree.h"
#include "rr_graph_fwd.h"

Expand Down
1 change: 0 additions & 1 deletion vpr/src/route/parallel_connection_router.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "connection_router.h"

#include "d_ary_heap.h"
#include "multi_queue_d_ary_heap.h"

#include <atomic>
Expand Down
2 changes: 2 additions & 0 deletions vpr/src/route/partition_tree.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "partition_tree.h"
#include <cmath>
#include <memory>
#include <stack>
#include <unordered_set>
#include "globals.h"

/** Minimum number of nets inside a partition to continue further partitioning.
* Mostly an arbitrary limit. At a certain point, the quality lost due to disturbed net ordering
Expand Down
7 changes: 2 additions & 5 deletions vpr/src/route/partition_tree.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#pragma once

#include "serial_connection_router.h"
#include "netlist_fwd.h"
#include "router_stats.h"
#include "netlist.h"
#include "vpr_types.h"

#include <cmath>
#include <fstream>
#include <memory>
#include <thread>

#ifdef VPR_USE_TBB
#include <tbb/concurrent_vector.h>
Expand Down
22 changes: 0 additions & 22 deletions vpr/src/route/route_budgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,11 @@
#include <fstream>
#include "vpr_error.h"
#include "globals.h"
#include "tatum/util/tatum_assert.hpp"

#include "tatum/timing_analyzers.hpp"
#include "tatum/graph_walkers.hpp"
#include "tatum/analyzer_factory.hpp"

#include "tatum/TimingGraph.hpp"
#include "tatum/TimingConstraints.hpp"
#include "tatum/TimingReporter.hpp"
#include "tatum/timing_paths.hpp"

#include "tatum/delay_calc/FixedDelayCalculator.hpp"

#include "tatum/report/graphviz_dot_writer.hpp"
#include "tatum/base/sta_util.hpp"
#include "tatum/echo_writer.hpp"
#include "tatum/TimingGraphFwd.hpp"
#include "slack_evaluation.h"
#include "tatum/TimingGraphFwd.hpp"

#include "vtr_assert.h"
#include "vtr_log.h"
#include "tatum/report/TimingPathFwd.hpp"
#include "tatum/base/TimingType.hpp"
#include "concrete_timing_info.h"
#include "tatum/echo_writer.hpp"
#include "net_delay.h"
#include "route_budgets.h"
#include "vtr_time.h"

Expand Down
2 changes: 1 addition & 1 deletion vpr/src/route/route_budgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#ifndef ROUTE_BUDGETS_H
#define ROUTE_BUDGETS_H

#include <iostream>
#include <vector>
#include <queue>
#include "RoutingDelayCalculator.h"
#include "timing_info.h"

enum analysis_type {
SETUP,
Expand Down
1 change: 1 addition & 0 deletions vpr/src/route/route_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "logic_types.h"
#include "physical_types_util.h"
#include "route_export.h"
#include "vpr_utils.h"

#if defined(VPR_USE_TBB)
#include <tbb/parallel_for_each.h>
Expand Down
2 changes: 0 additions & 2 deletions vpr/src/route/route_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* router files and some used globally. */

#include <vector>
#include "clustered_netlist.h"
#include "rr_node_fwd.h"
#include "router_stats.h"
#include "globals.h"

Expand Down
14 changes: 7 additions & 7 deletions vpr/src/route/route_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
/** @file Function prototypes for functions in route_common.cpp that
* are used outside the router modules. */

#include <memory>

#include "route_common.h"
#include "timing_info_fwd.h"
#include "vpr_types.h"

#include "RoutingDelayCalculator.h"
#include <vector>
#include "clustered_netlist_fwd.h"
#include "netlist.h"
#include "route_tree.h"
#include "rr_graph_fwd.h"
#include "vtr_optional.h"
#include "vtr_vector.h"

std::vector<RRNodeId> collect_congested_rr_nodes();

Expand Down
Loading