Skip to content

Commit bc7f9d1

Browse files
doxygen comment for e_route_type and improve comments for NetCostHandler::estimate_routing_chan_util()
1 parent af7950c commit bc7f9d1

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

libs/librrgraph/src/base/rr_graph_type.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef RR_GRAPH_TYPE_H
2-
#define RR_GRAPH_TYPE_H
1+
#pragma once
32

43
#include <vector>
54
#include "physical_types.h"
@@ -14,6 +13,7 @@ struct t_chan_width {
1413
std::vector<int> y_list;
1514
};
1615

16+
/// @brief Specifies whether global routing or combined global and detailed routing is performed.
1717
enum class e_route_type {
1818
GLOBAL,
1919
DETAILED
@@ -46,5 +46,3 @@ enum class e_graph_type {
4646
* @see get_parallel_segs for more details.
4747
*/
4848
typedef std::unordered_multimap<size_t, std::pair<size_t, e_parallel_axis>> t_unified_to_parallel_seg_index;
49-
50-
#endif

vpr/src/place/net_cost_handler.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,14 @@ std::pair<vtr::NdMatrix<double, 3>, vtr::NdMatrix<double, 3>> NetCostHandler::es
17701770
device_ctx.grid.height()}},
17711771
0);
17721772

1773+
1774+
// For each net, this function estimates routing channel utilization by distributing
1775+
// the net's expected wirelength across its bounding box. The expected wirelength
1776+
// for each dimension (x, y) is computed proportionally based on the bounding box size
1777+
// in each direction. The wirelength in each dimension is then **evenly spread** across
1778+
// all grid locations within the bounding box, and the demand is accumulated in
1779+
// the channel utilization matrices.
1780+
17731781
for (ClusterNetId net_id : cluster_ctx.clb_nlist.nets()) {
17741782
if (!cluster_ctx.clb_nlist.net_is_ignored(net_id)) {
17751783

vpr/src/place/net_cost_handler.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ class NetCostHandler {
129129
* @brief Estimates routing channel utilization.
130130
*
131131
* For each net, distributes estimated wirelength across its bounding box
132-
* and accumulates demand for different routing channels. Normalizes by channel widths.
132+
* and accumulates demand for different routing channels. Normalizes by channel widths
133+
* (e.g. a value of 0.5 means 50% of the wiring in a channel is expected to be used).
133134
*
134135
* @return Pair of matrices with relative CHANX and CHANY utilization.
136+
* The dimension order for each matrix is [layer][x][y].
135137
*/
136138
std::pair<vtr::NdMatrix<double, 3>, vtr::NdMatrix<double, 3>> estimate_routing_chan_util() const;
137139

0 commit comments

Comments
 (0)