Skip to content

Commit f6aa8d2

Browse files
committed
lookahead: additional comments and assertions
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent 25efd66 commit f6aa8d2

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

vpr/src/route/route_timing.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ struct RoutingMetrics {
6969
* File-scope variables
7070
*/
7171

72-
//Run-time flag to control when router debug information is printed
73-
//Note only enables debug output if compiled with VTR_ENABLE_DEBUG_LOGGING defined
74-
//f_router_debug is used to stop the router when a breakpoint is reached. When a breakpoint is reached, this flag is set to true.
72+
/**
73+
* @brief Run-time flag to control when router debug information is printed
74+
* Note only enables debug output if compiled with VTR_ENABLE_DEBUG_LOGGING defined
75+
* f_router_debug is used to stop the router when a breakpoint is reached. When a breakpoint is reached, this flag is set to true.
76+
*
77+
* In addition f_router_debug is used to print additional debug information during routing, for instance lookahead expected costs
78+
* information.
79+
*/
7580
bool f_router_debug = false;
7681

7782
//Count the number of times the router has failed

vpr/src/route/router_lookahead_extended_map.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ float ExtendedMapLookahead::get_chan_ipin_delays(RRNodeId to_node) const {
143143
auto& device_ctx = g_vpr_ctx.device();
144144
auto& rr_graph = device_ctx.rr_nodes;
145145

146+
e_rr_type to_type = rr_graph.node_type(to_node);
147+
VTR_ASSERT(to_type == SINK);
148+
146149
auto to_tile_type = device_ctx.grid[rr_graph.node_xlow(to_node)][rr_graph.node_ylow(to_node)].type;
147150
auto to_tile_index = to_tile_type->index;
148151

vpr/src/route/router_lookahead_map_utils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ util::Cost_Entry util::Expansion_Cost_Entry::get_median_entry() const {
198198
/* find median by binning the delays of all entries and then chosing the bin
199199
* with the largest number of entries */
200200

201+
// This is code that needs to be revisited. For the time being, if the median entry
202+
// method calculation is used an assertion is thrown.
203+
VTR_ASSERT_MSG(false, "Get median entry calculation method is not implemented!");
204+
201205
int num_bins = 10;
202206

203207
/* find entries with smallest and largest delays */

0 commit comments

Comments
 (0)