Skip to content

Commit 825b496

Browse files
add doxygen commetns
1 parent a12b89b commit 825b496

File tree

5 files changed

+31
-11
lines changed

5 files changed

+31
-11
lines changed

vpr/src/base/blk_loc_registry.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef VTR_BLK_LOC_REGISTRY_H
2-
#define VTR_BLK_LOC_REGISTRY_H
1+
2+
#pragma once
33

44
#include "clustered_netlist_fwd.h"
55
#include "vtr_vector_map.h"
@@ -44,7 +44,8 @@ class BlkLocRegistry {
4444
*/
4545
PlaceMacros place_macros_;
4646

47-
///@brief Stores ClusterBlockId of all movable clustered blocks (blocks that are not locked down to a single location)
47+
/// @brief Stores ClusterBlockId of all movable clustered blocks
48+
/// (blocks that are not locked down to a single location)
4849
std::vector<ClusterBlockId> movable_blocks_;
4950

5051
///@brief Stores ClusterBlockId of all movable clustered of each block type
@@ -72,10 +73,18 @@ class BlkLocRegistry {
7273
///@brief Returns a mutable reference to placement macros.
7374
PlaceMacros& mutable_place_macros();
7475

76+
/// @brief Returns a constant reference to the vector of ClusterBlockIds of all movable clustered blocks.
7577
const std::vector<ClusterBlockId>& movable_blocks() const { return movable_blocks_; }
78+
79+
/// @brief Returns a mutable reference to the vector of ClusterBlockIds of all movable clustered blocks.
7680
std::vector<ClusterBlockId>& mutable_movable_blocks() { return movable_blocks_; }
7781

82+
/// @brief Returns a constant reference to a vector of vectors, where each inner vector contains ClusterBlockIds
83+
/// of movable clustered blocks for a specific block type
7884
const std::vector<std::vector<ClusterBlockId>>& movable_blocks_per_type() const { return movable_blocks_per_type_; }
85+
86+
/// @brief Returns a mutable reference to a vector of vectors, where each inner vector contains ClusterBlockIds
87+
/// of movable clustered blocks for a specific block type.
7988
std::vector<std::vector<ClusterBlockId>>& mutable_movable_blocks_per_type() { return movable_blocks_per_type_; }
8089

8190
/**
@@ -161,5 +170,3 @@ class BlkLocRegistry {
161170

162171
e_expected_transaction expected_transaction_;
163172
};
164-
165-
#endif //VTR_BLK_LOC_REGISTRY_H

vpr/src/place/move_generators/move_generator.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef VPR_MOVE_GENERATOR_H
2-
#define VPR_MOVE_GENERATOR_H
1+
2+
#pragma once
33

44
#include "vpr_types.h"
55
#include "move_utils.h"
@@ -35,7 +35,11 @@ struct MoveTypeStat {
3535
vtr::NdMatrix<int, 2> rejected_moves;
3636

3737
/**
38-
* @brief Prints placement perturbation distribution by block and move type.
38+
* @brief Prints statistics on the distribution of placement perturbations,
39+
* categorized by block type and move type.
40+
* @param movable_blocks_per_type A vector of vectors, where each inner vector contains ClusterBlockIds of
41+
* all movable blocks belonging to a specific logical type. The outer vector
42+
* is indexed by the logical type index.
3943
*/
4044
void print_placement_move_types_stats(const std::vector<std::vector<ClusterBlockId>>& movable_blocks_per_type) const;
4145

vpr/src/place/move_generators/simpleRL_move_generator.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ class KArmedBanditAgent {
106106
private:
107107
/**
108108
* @brief Iterates over all logical block types and check whether they exist in the
109-
* netlist. Then, returns the logical block type indices found in the netlist.
110-
*
109+
* netlist. Then, returns the logical block type indices found in the netlist.
110+
* @param movable_blocks_per_type A vector of vectors, where each inner vector contains ClusterBlockIds of
111+
* all movable blocks belonging to a specific logical type. The outer vector
112+
* is indexed by the logical type index.
111113
* @return A vector containing all logical block type indices that exist in the netlist.
112114
*/
113115
static std::vector<int> get_available_logical_blk_types_(const std::vector<int>& num_movable_blocks_per_type);
@@ -179,11 +181,17 @@ class SoftmaxAgent : public KArmedBanditAgent {
179181
private:
180182
/**
181183
* @brief Initialize agent's Q-table and internal variable to zero (RL-agent learns everything throughout the placement run and has no prior knowledge)
184+
* @param movable_blocks_per_type A vector of vectors, where each inner vector contains ClusterBlockIds of
185+
* all movable blocks belonging to a specific logical type. The outer vector
186+
* is indexed by the logical type index.
182187
*/
183188
void init_q_scores_(const std::vector<int>& num_movable_blocks_per_type);
184189

185190
/**
186191
* @brief Calculate the fraction of total netlist blocks for each agent block type and will be used by the "set_action_prob" function.
192+
* @param movable_blocks_per_type A vector of vectors, where each inner vector contains ClusterBlockIds of
193+
* all movable blocks belonging to a specific logical type. The outer vector
194+
* is indexed by the logical type index.
187195
*/
188196
void set_block_ratio_(const std::vector<int>& num_movable_blocks_per_type);
189197

vpr/src/place/move_utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ ClusterBlockId propose_block_to_move(const t_placer_opts& placer_opts,
184184
* @param logical_blk_type_index The logical type of the moving block. If a negative value is passed,
185185
* the block is selected randomly from all movable blocks and not from a specific type.
186186
* @param rng A random number generator used to select a random block.
187+
* @param blk_loc_registry Contains movable blocks and movable blocks per type.
187188
*
188189
* @return BlockId of the selected block, ClusterBlockId::INVALID() if no block with specified block type found
189190
*/

vpr/src/place/placement_log_printer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class PlacementLogPrinter {
6161
void print_initial_placement_stats() const;
6262
/// Prints final placement metrics and generates timing reports.
6363
void print_post_placement_stats() const;
64-
///
64+
/// Returns a bool to indicate whether the instance is in quiet mode.
6565
bool quiet() const { return quiet_; }
6666

6767
private:

0 commit comments

Comments
 (0)