Skip to content

Commit 25e803c

Browse files
add comments
1 parent da61fdb commit 25e803c

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ class PlaceLocVars {
926926
inline int tile_pin_index(const ClusterPinId pin) const { return physical_pins_[pin]; }
927927

928928
///@brief Returns the physical pin of the tile, related to the given ClusterNedId, and the net pin index.
929-
inline int net_pin_to_tile_pin_index(const ClusterNetId net_id, int net_pin_index) const;
929+
int net_pin_to_tile_pin_index(const ClusterNetId net_id, int net_pin_index) const;
930930
};
931931

932932
///@brief Names of various files

vpr/src/draw/draw_global.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,22 @@ t_draw_coords* get_draw_coords_vars();
2727

2828
t_draw_state* get_draw_state_vars();
2929

30+
/**
31+
* @brief Set the reference to placement location variable.
32+
*
33+
* During the placement stage, this reference should point to a local object
34+
* in the placement stage because the placement stage does not change the
35+
* global stage in place_ctx until the end of placement. After the placement is
36+
* done, the reference should point to the global state stored in place_ctx.
37+
*
38+
* @param place_loc_vars The PlaceLocVars that the reference will point to.
39+
*/
3040
void set_graphics_place_loc_vars_ref(const PlaceLocVars& place_loc_vars);
3141

42+
/**
43+
* @brief Returns the reference to placement block location variables.
44+
* @return A const reference to placement block location variables.
45+
*/
3246
const PlaceLocVars& get_graphics_place_loc_vars_ref();
3347

3448
#endif // NO_GRAPHICS

vpr/src/draw/draw_types.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
*******************************************/
1414
ezgl::color t_draw_state::block_color(ClusterBlockId blk) const {
1515
if (use_default_block_color_[blk]) {
16-
1716
auto& cluster_ctx = g_vpr_ctx.clustering();
18-
auto& block_locs = get_graphics_place_loc_vars_ref().block_locs();
17+
const auto& block_locs = get_graphics_place_loc_vars_ref().block_locs();
1918

2019
t_physical_tile_type_ptr tile_type = nullptr;
2120
if (block_locs.empty()) { //No placement, pick best match

vpr/src/place/RL_agent_util.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ enum class e_agent_state {
1515
* This function creates 2 move generators to be used by the annealer. The type of the move generators created here depends on the
1616
* type selected in placer_opts.
1717
* It returns a unique pointer for each move generator in move_generator and move_generator2
18-
* move_lim: represents the num of moves per temp.
18+
*
19+
* @param placer_ctx Move generators store a reference to the placer context to avoid global state access.
20+
* @param placer_opts Contains information about the placement algorithm and its parameters.
21+
* @param move_lim represents the num of moves per temp.
22+
* @param noc_attraction_weight The attraction weight by which the NoC-biased centroid move adjust the computed location
23+
* towards reachable NoC routers from the moving block.
24+
*
25+
* @return Two unique pointers referring to move generators. These move generators are supposed to be used
26+
* in the first and second states of the agent.
27+
*
1928
*/
2029
std::pair<std::unique_ptr<MoveGenerator>, std::unique_ptr<MoveGenerator>> create_move_generators(PlacerContext& placer_ctx,
2130
const t_placer_opts& placer_opts,
@@ -33,7 +42,7 @@ void assign_current_move_generator(std::unique_ptr<MoveGenerator>& move_generato
3342
std::unique_ptr<MoveGenerator>& current_move_generator);
3443

3544
/**
36-
* @ brief move the updated current_move_generator to its original move_Generator structure based on he placer_options and the agent state
45+
* @brief move the updated current_move_generator to its original move_Generator structure based on he placer_options and the agent state
3746
*/
3847
void update_move_generator(std::unique_ptr<MoveGenerator>& move_generator,
3948
std::unique_ptr<MoveGenerator>& move_generator2,

0 commit comments

Comments
 (0)