Skip to content

[Router] Enhanced the Connection Router by Optimizing the Heap Structure #2720

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
Show all changes
22 commits
Select commit Hold shift + click to select a range
b11b2eb
[Router] Enhanced the Connection Router by Optimizing the Heap Structure
ueqri Sep 12, 2024
0066be2
[Router] Enhanced the Data Structure Used for RCV
ueqri Sep 13, 2024
ed8277b
[Router] Removed the R_upstream field in `t_rr_node_route_inf`
ueqri Sep 13, 2024
87a7e97
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Sep 13, 2024
726294a
[Router] Refactored Heap Interface & Removed Deprecated Implementations
ueqri Sep 14, 2024
d307ea0
[Router] Refactored `t_heap` to `RTExploredNode`
ueqri Sep 17, 2024
9dcb514
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Sep 18, 2024
cb015ea
[Router] Added YOYO Routing Budgets Algorithm Option to the CLI and Docs
ueqri Sep 19, 2024
084fb54
[Router] Fixed the Logging Issues and Reverted the Changes for RCV Tests
ueqri Sep 24, 2024
599e06e
[Router] No Pointer in DAryHeap to Make ParallelNetlistRouter Happy
ueqri Sep 24, 2024
06e6983
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Sep 24, 2024
d303831
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Sep 27, 2024
c360f71
[Router] Updated Golden Results of Regression Tests
ueqri Sep 27, 2024
2966d66
[Router] Resolved Comments and Fixed the RCV Pre-Push Prune Condition
ueqri Oct 8, 2024
5925e69
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Oct 15, 2024
e459f93
[Router] Added Comments for RCV in the Post-Pop Prune Function
ueqri Oct 15, 2024
45e2b13
[Router] Fixed a Bug in the Connection Router After Changing Some APIs
ueqri Oct 15, 2024
c16bb23
[Router] Fixed `vtr_reg_strong` QoR Failures After Rebasing to Master
ueqri Oct 15, 2024
6680afb
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
vaughnbetz Oct 17, 2024
d9f18cd
[Router] Fixed the Bug Causing Tons of Nightly Test Failures
ueqri Oct 18, 2024
93d051d
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Oct 18, 2024
d7ea38a
Merge branch 'master' into ueqri-enhanced-heap-for-connection-router
ueqri Oct 18, 2024
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,8 @@ tags
cmake-build-debug
cmake-build-release
/.metadata/

#
# Clangd
#
compile_commands.json
7 changes: 7 additions & 0 deletions doc/src/api/vpr/route_tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ RouteTreeNode
.. doxygenclass:: RouteTreeNode
:project: vpr
:members:

RTExploredNode
-------------

.. doxygenclass:: RTExploredNode
:project: vpr
:members:
21 changes: 2 additions & 19 deletions doc/src/api/vprinternals/router_heap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,13 @@
Router Heap
==============

t_heap
----------
.. doxygenstruct:: t_heap
:project: vpr
:members:

HeapInterface
----------
.. doxygenclass:: HeapInterface
:project: vpr
:members:

HeapStorage
----------
.. doxygenclass:: HeapStorage
:project: vpr
:members:

KAryHeap
DAryHeap
----------
.. doxygenclass:: KAryHeap
.. doxygenclass:: DAryHeap
:project: vpr

FourAryHeap
----------
.. doxygenclass:: FourAryHeap
:project: vpr
6 changes: 4 additions & 2 deletions doc/src/vpr/command_line_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1396,15 +1396,17 @@ The following options are only valid when the router is in timing-driven mode (t

**Default:** ``safe``

.. option:: --routing_budgets_algorithm { disable | minimax | scale_delay }
.. option:: --routing_budgets_algorithm { disable | minimax | yoyo | scale_delay }

.. warning:: Experimental

Controls how the routing budgets are created. Routing budgets are used to guid VPR's routing algorithm to consider both short path and long path timing constraints :cite:`RCV_algorithm`.

``disable`` is used to disable the budget feature. This uses the default VPR and ignores hold time constraints.

``minimax`` sets the minimum and maximum budgets by distributing the long path and short path slacks depending on the the current delay values. This uses the routing cost valleys and Minimax-PERT algorithm :cite:`minimax_pert,RCV_algorithm`.
``minimax`` sets the minimum and maximum budgets by distributing the long path and short path slacks depending on the the current delay values. This uses the Minimax-PERT algorithm :cite:`minimax_pert`.

``yoyo`` allocates budgets using minimax algorithm (as above), and enables hold slack resolution in the router using the Routing Cost Valleys (RCV) algorithm :cite:`RCV_algorithm`.

``scale_delay`` has the minimum budgets set to 0 and the maximum budgets is set to the delay of a net scaled by the pin criticality (net delay/pin criticality).

Expand Down
2 changes: 1 addition & 1 deletion utils/route_diag/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static void do_one_route(const Netlist<>& net_list,
is_flat);
enable_router_debug(router_opts, ParentNetId(), sink_node, 1, &router);
bool found_path;
t_heap cheapest;
RTExploredNode cheapest;
ConnectionParameters conn_params(ParentNetId::INVALID(),
-1,
false,
Expand Down
3 changes: 0 additions & 3 deletions vpr/src/base/ShowSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,6 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts) {
case e_heap_type::FOUR_ARY_HEAP:
VTR_LOG("FOUR_ARY_HEAP\n");
break;
case e_heap_type::BUCKET_HEAP_APPROXIMATION:
VTR_LOG("BUCKET_HEAP_APPROXIMATION\n");
break;
default:
VPR_FATAL_ERROR(VPR_ERROR_UNKNOWN, "Unknown router_heap\n");
}
Expand Down
10 changes: 3 additions & 7 deletions vpr/src/base/read_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ struct RouteBudgetsAlgorithm {
}

std::vector<std::string> default_choices() {
return {"minimax", "scale_delay", "disable"};
return {"minimax", "yoyo", "scale_delay", "disable"};
}
};

Expand Down Expand Up @@ -1063,8 +1063,6 @@ struct ParseRouterHeap {
conv_value.set_value(e_heap_type::BINARY_HEAP);
else if (str == "four_ary")
conv_value.set_value(e_heap_type::FOUR_ARY_HEAP);
else if (str == "bucket")
conv_value.set_value(e_heap_type::BUCKET_HEAP_APPROXIMATION);
else {
std::stringstream msg;
msg << "Invalid conversion from '" << str << "' to e_heap_type (expected one of: " << argparse::join(default_choices(), ", ") << ")";
Expand All @@ -1077,11 +1075,9 @@ struct ParseRouterHeap {
ConvertedValue<std::string> conv_value;
if (val == e_heap_type::BINARY_HEAP)
conv_value.set_value("binary");
else if (val == e_heap_type::FOUR_ARY_HEAP)
conv_value.set_value("four_ary");
else {
VTR_ASSERT(val == e_heap_type::BUCKET_HEAP_APPROXIMATION);
conv_value.set_value("bucket");
VTR_ASSERT(val == e_heap_type::FOUR_ARY_HEAP);
conv_value.set_value("four_ary");
}
return conv_value;
}
Expand Down
2 changes: 0 additions & 2 deletions vpr/src/base/read_route.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <ctime>
#include <sstream>
#include <string>
#include <unordered_set>

#include "atom_netlist.h"
#include "atom_netlist_utils.h"
Expand All @@ -46,7 +45,6 @@
#include "route_common.h"
#include "route_tree.h"
#include "read_route.h"
#include "four_ary_heap.h"

#include "old_traceback.h"

Expand Down
6 changes: 5 additions & 1 deletion vpr/src/base/vpr_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -1607,14 +1607,18 @@ constexpr bool is_src_sink(e_rr_type type) { return (type == SOURCE || type == S
* is being used.
* @param backward_path_cost Total cost of the path up to and including this
* node.
* @param occ The current occupancy of the associated rr node
* @param R_upstream Upstream resistance to ground from this node in the current
* path search (connection routing), including the resistance
* of the node itself (device_ctx.rr_nodes[index].R).
* @param occ The current occupancy of the associated rr node.
*/
struct t_rr_node_route_inf {
RREdgeId prev_edge;

float acc_cost;
float path_cost;
float backward_path_cost;
float R_upstream;

public: //Accessors
short occ() const { return occ_; }
Expand Down
77 changes: 0 additions & 77 deletions vpr/src/route/binary_heap.cpp

This file was deleted.

17 changes: 0 additions & 17 deletions vpr/src/route/binary_heap.h

This file was deleted.

Loading
Loading