Skip to content

Commit d8abda9

Browse files
add doxygen comments
1 parent 42509b0 commit d8abda9

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

vpr/src/base/stats.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ void routing_stats(const Netlist<>& net_list,
2121
int wire_to_ipin_switch,
2222
bool is_flat);
2323

24+
/**
25+
* @brief Calculates the routing channel width at each grid location.
26+
*
27+
* Iterates through all RR nodes and counts how many wires pass through each (x, y) location
28+
* for both horizontal (CHANX) and vertical (CHANY) channels.
29+
*
30+
* @return A pair of 3D matrices:
31+
* - First: CHANX width per [layer][x][y]
32+
* - Second: CHANY width per [layer][x][y]
33+
*/
2434
std::pair<vtr::NdMatrix<int, 3>, vtr::NdMatrix<int, 3>> calculate_channel_width();
2535

2636
void print_wirelen_prob_dist(bool is_flat);

vpr/src/base/vpr_context.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,9 @@ struct RoutingContext : public Context {
559559
/** Is flat routing enabled? */
560560
bool is_flat;
561561

562+
/// @brief Post-placement estimate of CHANX routing utilization per (layer, x, y) location.
562563
vtr::NdMatrix<double, 3> chanx_util;
564+
/// @brief Post-placement estimate of CHANY routing utilization per (layer, x, y) location.
563565
vtr::NdMatrix<double, 3> chany_util;
564566
};
565567

vpr/src/route/route_common.cpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ static vtr::vector<ParentNetId, uint8_t> load_is_clock_net(const Netlist<>& net_
6969

7070
static bool classes_in_same_block(ParentBlockId blk_id, int first_class_ptc_num, int second_class_ptc_num, bool is_flat);
7171

72+
/**
73+
* @brief Computes the initial `acc_cost` for the given RR node by checking
74+
* if the node is of type CHANX/CHANY and goes through a possibly congested
75+
* routing channel.
76+
* @param node_id The RR node whose initial acc_cost is to be computed.
77+
* @param route_opts Contains channel utilization threshold and weighting factor
78+
* used to increase initial 'acc_cost' for nodes going through
79+
* congested channels.
80+
* @return Initial `acc_cost` for the given RR node.
81+
*/
82+
static float comp_initial_acc_cost(RRNodeId node_id,
83+
const t_router_opts& route_opts);
84+
7285
/************************** Subroutine definitions ***************************/
7386

7487
void save_routing(vtr::vector<ParentNetId, vtr::optional<RouteTree>>& best_routing,
@@ -414,7 +427,8 @@ void alloc_and_load_rr_node_route_structs(const t_router_opts& router_opts) {
414427
}
415428
}
416429

417-
static float comp_initial_acc_cost(RRNodeId node_id, const t_router_opts& route_opts) {
430+
static float comp_initial_acc_cost(RRNodeId node_id,
431+
const t_router_opts& route_opts) {
418432
const auto& route_ctx = g_vpr_ctx.routing();
419433
const auto& rr_graph = g_vpr_ctx.device().rr_graph;
420434

vpr/src/route/router_lookahead_extended_map.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,6 @@ void ExtendedMapLookahead::compute(const std::vector<t_segment_inf>& segment_inf
427427

428428
vtr::ScopedStartFinishTimer timer("Computing connection box lookahead map");
429429

430-
// Initialize rr_node_route_inf if not already
431-
// alloc_and_load_rr_node_route_structs();
432-
433430
size_t num_segments = segment_inf.size();
434431
std::vector<SampleRegion> sample_regions = find_sample_regions(num_segments);
435432

0 commit comments

Comments
 (0)