Skip to content

Commit 454fd79

Browse files
add comments
1 parent 89344bf commit 454fd79

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

libs/libvtrutil/src/vtr_ndmatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ class NdMatrixBase {
322322

323323
///@brief Returns the size of the matrix (number of elements) calculated from the current dimensions
324324
size_t calc_size() const {
325-
///@brief Size is the product of all dimension sizes
325+
// Size is the product of all dimension sizes
326326
size_t cnt = dim_size(0);
327327
for (size_t idim = 1; idim < ndims(); ++idim) {
328328
cnt *= dim_size(idim);

vpr/src/route/rr_graph_generation/build_scatter_gathers.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,18 @@ static std::vector<t_sg_candidate> find_candidate_wires(const std::vector<t_chan
102102
int first_type_wire = wire_type_sizes.at(wire_type).start;
103103
int last_type_wire = first_type_wire + num_type_wires - 1;
104104

105+
// Walk through each wire segment of specified type and check whether it matches one
106+
// of the specified switchpoints.
107+
// Note that we walk through the points in order, this ensures that returned switchpoints
108+
// match the order specified in the architecture, which we assume is a priority order specified
109+
// by the architect.
105110
for (int valid_switchpoint : wire_switchpoints.switchpoints) {
106111
for (int iwire = first_type_wire; iwire <= last_type_wire; iwire++) {
107112
Direction seg_direction = chan_details[iwire].direction();
108113

109-
/* unidirectional wires going in the decreasing direction can have an outgoing edge
110-
* only from the top or right switch block sides, and an incoming edge only if they are
111-
* at the left or bottom sides (analogous for wires going in INC direction) */
114+
// unidirectional wires going in the decreasing direction can have an outgoing edge
115+
// only from the top or right switch block sides, and an incoming edge only if they are
116+
// at the left or bottom sides (analogous for wires going in INC direction) */
112117
if (chan_side == TOP || chan_side == RIGHT) {
113118
if (seg_direction == Direction::DEC && is_dest) {
114119
continue;

vpr/src/route/rr_graph_generation/build_scatter_gathers.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ struct t_sg_candidate {
2121
};
2222

2323
/// Represents a scatter/gather bottleneck connection between two locations.
24+
/// This data structure is used in RR graph generation to model a node that is
25+
/// driven by wires at a gather location and drives wires at a scatter location.
2426
struct t_bottleneck_link {
2527
t_physical_tile_loc gather_loc; ///< Source switchblock location.
2628
t_physical_tile_loc scatter_loc; ///< Destination switchblock location.
@@ -44,7 +46,7 @@ struct t_bottleneck_link {
4446
* @param chan_details_y Channel details for vertical routing channels.
4547
* @param nodes_per_chan Channel width data.
4648
* @param interdie_3d_links Output: matrix storing inter-die (3D) bottleneck links.
47-
* @return Vector of intra-die bottleneck links.
49+
* @return Vector of non-3d bottleneck links.
4850
*/
4951
std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const std::vector<t_scatter_gather_pattern>& scatter_gather_patterns,
5052
const std::vector<bool>& inter_cluster_rr,

vpr/src/route/rr_graph_generation/build_switchblocks.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ static void get_switchpoint_wires(const t_chan_seg_details* chan_details,
323323
for (int iwire = first_type_wire; iwire <= last_type_wire; iwire++) {
324324
Direction seg_direction = chan_details[iwire].direction();
325325

326-
/* unidirectional wires going in the decreasing direction can have an outgoing edge
327-
* only from the top or right switch block sides, and an incoming edge only if they are
328-
* at the left or bottom sides (analogous for wires going in INC direction) */
326+
// unidirectional wires going in the decreasing direction can have an outgoing edge
327+
// only from the top or right switch block sides, and an incoming edge only if they are
328+
// at the left or bottom sides (analogous for wires going in INC direction)
329329
if (side == TOP || side == RIGHT) {
330330
if (seg_direction == Direction::DEC && is_dest) {
331331
continue;

0 commit comments

Comments
 (0)