Skip to content

Commit 4138050

Browse files
author
Nathan Shreve
committed
Added RouterLookahead to documentation
1 parent 849e0b2 commit 4138050

File tree

6 files changed

+87
-43
lines changed

6 files changed

+87
-43
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
==============
2+
Router Lookahead
3+
==============
4+
5+
e_router_lookahead
6+
----------
7+
.. doxygenenum:: e_router_lookahead
8+
:project: vpr
9+
10+
11+
RouterLookahead
12+
----------
13+
.. doxygenclass:: RouterLookahead
14+
:project: vpr
15+
:members:
16+
17+
MapLookahead
18+
----------
19+
.. doxygenclass:: MapLookahead
20+
:project: vpr
21+
22+
make_router_lookahead
23+
----------
24+
.. doxygenfunction:: make_router_lookahead
25+
:project: vpr
26+
27+
get_cached_router_lookahead
28+
----------
29+
.. doxygenfunction:: get_cached_router_lookahead
30+
:project: vpr
31+
32+
invalidate_router_lookahead_cache
33+
----------
34+
.. doxygenfunction:: invalidate_router_lookahead_cache
35+
:project: vpr

doc/src/api/vprinternals/vpr_router.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ VPR Router
77
.. toctree::
88
:maxdepth: 1
99

10-
router_heap
10+
router_heap
11+
router_lookahead
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
2-
* @file rr_graph_utils.h
3-
*
4-
* @brief This file includes the most-utilized functions that manipulate the RRGraph object.
5-
*/
2+
* @file rr_graph_utils.h
3+
*
4+
* @brief This file includes the most-utilized functions that manipulate the RRGraph object.
5+
*/
66

77
#ifndef RR_GRAPH_UTILS_H
88
#define RR_GRAPH_UTILS_H
99

1010
/* Include header files which include data structures used by
11-
* the function declaration
12-
*/
11+
* the function declaration
12+
*/
1313
#include <vector>
1414
#include "rr_graph_fwd.h"
1515
#include "rr_node_types.h"
@@ -43,53 +43,53 @@ struct t_cluster_pin_chain {
4343
};
4444

4545
/**
46-
* @brief Get node-to-node switches in a RRGraph
46+
* @brief Get node-to-node switches in a RRGraph
4747
*
4848
* @return A vector of switch ids
49-
* */
49+
*/
5050
std::vector<RRSwitchId> find_rr_graph_switches(const RRGraph& rr_graph,
5151
const RRNodeId& from_node,
5252
const RRNodeId& to_node);
5353

5454
/**
55-
* @brief This function generates and returns a vector indexed by RRNodeId containing a list of fan-in edges for each node.
56-
*/
55+
* @brief This function generates and returns a vector indexed by RRNodeId containing a list of fan-in edges for each node.
56+
*/
5757
vtr::vector<RRNodeId, std::vector<RREdgeId>> get_fan_in_list(const RRGraphView& rr_graph);
5858

5959
/**
60-
* @brief This function sets better locations for SINK nodes.
61-
*
62-
* @details
63-
* build_rr_graph() sets the location of SINK nodes to span the entire tile they are in. This function sets the location
64-
* of SINK nodes to be the average coordinate of the IPINs on their cluster block to which they are connected
65-
*
66-
* @note
67-
* This function only changes SINK locations in tiles which have dimensions greater than 1x1
68-
*/
60+
* @brief This function sets better locations for SINK nodes.
61+
*
62+
* @details
63+
* build_rr_graph() sets the location of SINK nodes to span the entire tile they are in. This function sets the location
64+
* of SINK nodes to be the average coordinate of the IPINs on their cluster block to which they are connected
65+
*
66+
* @note
67+
* This function only changes SINK locations in tiles which have dimensions greater than 1x1
68+
*/
6969
void set_sink_locs(const RRGraphView& rr_graph, RRGraphBuilder& rr_graph_builder);
7070

7171
/**
72-
* @brief Returns the segment number (distance along the channel) of the connection box from from_rr_type (CHANX or
73-
* CHANY) to to_node (IPIN).
74-
*/
72+
* @brief Returns the segment number (distance along the channel) of the connection box from from_rr_type (CHANX or
73+
* CHANY) to to_node (IPIN).
74+
*/
7575
int seg_index_of_cblock(const RRGraphView& rr_graph, t_rr_type from_rr_type, int to_node);
7676

7777
/**
78-
* @breif Returns the segment number (distance along the channel) of the switch box from from_node (CHANX or CHANY) to
79-
* to_node (CHANX or CHANY).
80-
*
81-
* @details
82-
* The switch box on the left side of a CHANX segment at (i,j) has seg_index = i-1, while the switch box on the right
83-
* side of that segment has seg_index = i. CHANY stuff works similarly. Hence the range of values returned is 0 to
84-
* device_ctx.grid.width()-1 (if from_node is a CHANX) or 0 to device_ctx.grid.height()-1 (if from_node is a CHANY).
85-
*/
78+
* @breif Returns the segment number (distance along the channel) of the switch box from from_node (CHANX or CHANY) to
79+
* to_node (CHANX or CHANY).
80+
*
81+
* @details
82+
* The switch box on the left side of a CHANX segment at (i,j) has seg_index = i-1, while the switch box on the right
83+
* side of that segment has seg_index = i. CHANY stuff works similarly. Hence the range of values returned is 0 to
84+
* device_ctx.grid.width()-1 (if from_node is a CHANX) or 0 to device_ctx.grid.height()-1 (if from_node is a CHANY).
85+
*/
8686
int seg_index_of_sblock(const RRGraphView& rr_graph, int from_node, int to_node);
8787

8888
/**
89-
* @brief This function checks whether all inter-die connections are form OPINs. Return "true"
90-
* if that is the case. Can be used for multiple purposes. For example, to determine which type of bounding
91-
* box to be used to estimate the wire-length of a net.
92-
* @return limited_to_opin
93-
*/
89+
* @brief This function checks whether all inter-die connections are form OPINs. Return "true"
90+
* if that is the case. Can be used for multiple purposes. For example, to determine which type of bounding
91+
* box to be used to estimate the wire-length of a net.
92+
* @return limited_to_opin
93+
*/
9494
bool inter_layer_connections_limited_to_opin(const RRGraphView& rr_graph);
9595
#endif

vpr/src/base/vpr_types.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,18 @@ constexpr auto INVALID_BLOCK_ID = ClusterBlockId(-2);
115115
# define UNDEFINED (-1)
116116
#endif
117117

118+
///@brief Router lookahead types.
118119
enum class e_router_lookahead {
119-
CLASSIC, ///<VPR's classic lookahead (assumes uniform wire types)
120-
MAP, ///<Lookahead considering different wire types (see Oleg Petelin's MASc Thesis)
121-
COMPRESSED_MAP, /// Similar to MAP, but use a sparse sampling of the chip
122-
EXTENDED_MAP, ///<Lookahead with a more extensive node sampling method
123-
NO_OP ///<A no-operation lookahead which always returns zero
120+
///@brief VPR's classic lookahead (assumes uniform wire types)
121+
CLASSIC,
122+
///@brief Lookahead considering different wire types (see Oleg Petelin's MASc Thesis)
123+
MAP,
124+
///@brief Similar to MAP, but use a sparse sampling of the chip
125+
COMPRESSED_MAP,
126+
///@breif Lookahead with a more extensive node sampling method
127+
EXTENDED_MAP,
128+
///@brief A no-operation lookahead which always returns zero
129+
NO_OP
124130
};
125131

126132
enum class e_route_bb_update {

vpr/src/route/router_lookahead_map.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
#include "router_lookahead.h"
77
#include "router_lookahead_map_utils.h"
88

9+
/**
10+
* @brief Current VPR RouterLookahead implementation.
11+
*/
912
class MapLookahead : public RouterLookahead {
1013
public:
1114
explicit MapLookahead(const t_det_routing_arch& det_routing_arch, bool is_flat);

vpr/src/route/rr_graph2.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,8 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
15891589
}
15901590
}
15911591
}
1592-
}
15931592

1594-
return true;
1593+
return true;
15951594
}
15961595

15971596
int get_track_to_pins(RRGraphBuilder& rr_graph_builder,

0 commit comments

Comments
 (0)