Skip to content

Commit 14ddc5c

Browse files
Merge pull request #3350 from AlexandreSinger/feature-spelling
[Spelling] Fixed Spelling Mistakes in AP Folder
2 parents 94f671d + 21914d9 commit 14ddc5c

17 files changed

+45
-48
lines changed

vpr/src/analytical_place/analytical_placement_flow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static void print_ap_netlist_stats(const APNetlist& netlist) {
7777
* @param flat_placement_info The flat placement information to be read.
7878
* @param ap_netlist The APNetlist that used to iterate over its blocks.
7979
* @param prepacker The Prepacker to get molecule of blocks in the ap_netlist.
80-
* @param p_placement The partial placement to be updated which is assumend
80+
* @param p_placement The partial placement to be updated which is assumed
8181
* to be generated on ap_netlist or have the same blocks.
8282
*/
8383
static void convert_flat_to_partial_placement(const FlatPlacementInfo& flat_placement_info, const APNetlist& ap_netlist, const Prepacker& prepacker, PartialPlacement& p_placement) {

vpr/src/analytical_place/analytical_solver.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void IdentityAnalyticalSolver::solve(unsigned iteration, PartialPlacement& p_pla
183183
// If this is the first iteration, we need to create a starting placement
184184
// to act as the starting point.
185185
// TODO: It may be convenient to create a class which creates the initial
186-
// placement. That way we can use different intial placements with
186+
// placement. That way we can use different initial placements with
187187
// the identity solver not optimizing.
188188
// Place all of the moveable blocks at the center of the device.
189189
for (APBlockId blk_id : netlist_.blocks()) {
@@ -250,7 +250,7 @@ static inline void add_connection_to_system(size_t src_row_id,
250250
// Verify that this is a valid block id.
251251
VTR_ASSERT_DEBUG(target_blk_id.is_valid());
252252
// The src_row_id is always a moveable block (rows in the matrix always
253-
// coorespond to a moveable APBlock or a star node.
253+
// correspond to a moveable APBlock or a star node.
254254
if (netlist.block_mobility(target_blk_id) == APBlockMobility::MOVEABLE) {
255255
// If the target is also moveable, update the coefficient matrix.
256256
size_t target_row_id = (size_t)blk_id_to_row_id[target_blk_id];
@@ -309,7 +309,7 @@ void QPHybridSolver::init_linear_system() {
309309
tripletList.reserve(num_nets);
310310

311311
// Create the connections using a hybrid connection model of the star and
312-
// clique connnection models.
312+
// clique connection models.
313313
size_t star_node_offset = 0;
314314
for (APNetId net_id : netlist_.nets()) {
315315
if (netlist_.net_is_ignored(net_id))
@@ -454,7 +454,7 @@ void QPHybridSolver::solve(unsigned iteration, PartialPlacement& p_placement) {
454454
Eigen::SparseMatrix<double> A_sparse_diff = Eigen::SparseMatrix<double>(A_sparse);
455455
Eigen::VectorXd b_x_diff = Eigen::VectorXd(b_x);
456456
Eigen::VectorXd b_y_diff = Eigen::VectorXd(b_y);
457-
// In the first iteration, the orginal linear system is used.
457+
// In the first iteration, the original linear system is used.
458458
// In any other iteration, use the moveable APBlocks current placement as
459459
// anchor-points (fixed block positions).
460460
if (iteration != 0) {
@@ -600,7 +600,7 @@ void B2BSolver::solve(unsigned iteration, PartialPlacement& p_placement) {
600600
}
601601

602602
// In the first iteration, we have no prior information.
603-
// Run the intial placer to get a first guess.
603+
// Run the initial placer to get a first guess.
604604
switch (initial_placement_ty_) {
605605
case e_initial_placement_type::LeastDense:
606606
initialize_placement_least_dense(p_placement);

vpr/src/analytical_place/analytical_solver.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ typedef vtr::StrongId<struct ap_row_id_tag, size_t> APRowId;
4848
* This provides functionality that all Analytical Solvers will use.
4949
*
5050
* It provides a standard interface that all Analytical Solvers must implement
51-
* so they can be used interchangably. This makes it very easy to test and
51+
* so they can be used interchangeably. This makes it very easy to test and
5252
* compare different solvers.
5353
*/
5454
class AnalyticalSolver {
@@ -90,7 +90,7 @@ class AnalyticalSolver {
9090
/**
9191
* @brief Print statistics on the analytical solver.
9292
*
93-
* This is expected to be called after global placement to collect cummulative
93+
* This is expected to be called after global placement to collect cumulative
9494
* information on how the solver performed.
9595
*/
9696
virtual void print_statistics() = 0;
@@ -178,7 +178,7 @@ std::unique_ptr<AnalyticalSolver> make_analytical_solver(e_ap_analytical_solver
178178
int log_verbosity);
179179

180180
/**
181-
* @brief An analytical solver which does not solve anthing. This solver acts
181+
* @brief An analytical solver which does not solve anything. This solver acts
182182
* like the identity matrix in a system of equations and just passes the
183183
* previous solution (from the partial legalizer) along. This solver
184184
* should only be used for testing.
@@ -295,7 +295,7 @@ class QPHybridSolver : public AnalyticalSolver {
295295
void init_linear_system();
296296

297297
/**
298-
* @brief Intializes the guesses which will be used in the solver.
298+
* @brief Initializes the guesses which will be used in the solver.
299299
*
300300
* The guesses will be used as starting points for the CG solver. The better
301301
* these guesses are, the faster the solver will converge.
@@ -473,7 +473,7 @@ class B2BSolver : public AnalyticalSolver {
473473
/// @brief Since the weights in the B2B model divide by the distance between
474474
/// blocks and their bounds, that distance may get very very close to
475475
/// 0. This causes the weight matrix to become numerically unstable.
476-
/// We can gaurd against this by clamping the distance to not be smaller
476+
/// We can guard against this by clamping the distance to not be smaller
477477
/// than some epsilon.
478478
/// Decreasing this number may lead to more instability, but can yield
479479
/// a higher quality solution.
@@ -703,7 +703,7 @@ class B2BSolver : public AnalyticalSolver {
703703
* placement object.
704704
*
705705
* Note: The x_soln and y_soln may be modified if it is found that the
706-
* solution is imposible (i.e. has negative positions).
706+
* solution is impossible (i.e. has negative positions).
707707
*/
708708
void store_solution_into_placement(Eigen::VectorXd& x_soln,
709709
Eigen::VectorXd& y_soln,

vpr/src/analytical_place/ap_argparse_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ parse_key_val_arg(const std::string& arg, unsigned expected_num_vals_per_key) {
104104
"Error when parsing argument string");
105105
}
106106

107-
// Collect the comma seperated values into a vector.
107+
// Collect the comma separated values into a vector.
108108
std::vector<float> vals;
109109
vals.reserve(expected_num_vals_per_key);
110110

vpr/src/analytical_place/ap_argparse_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @file
44
* @author Alex Singer
55
* @date June 2025
6-
* @brief Delcarations of utility functions used to parse AP options.
6+
* @brief Declarations of utility functions used to parse AP options.
77
*/
88

99
#include <string>

vpr/src/analytical_place/ap_draw_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @file
44
* @author Yulang (Robert) Luo
55
* @date October 2025
6-
* @brief The decalarations of the AP Draw Manager class which is used
6+
* @brief The declarations of the AP Draw Manager class which is used
77
* to handle graphics updates during analytical placement.
88
*/
99

vpr/src/analytical_place/ap_mass_report.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void print_physical_tiles(std::ofstream& os,
243243
* @brief Prints all of the non-zero dimensions of the given primitive vector.
244244
*
245245
* @param os
246-
* The output file stream to print the primtive vector to.
246+
* The output file stream to print the primitive vector to.
247247
* @param primitive_vec
248248
* The primitive vector to print.
249249
* @param dim_manager
@@ -466,7 +466,7 @@ void print_expected_device_utilization(std::ofstream& os,
466466
}
467467

468468
// Print the expected number of logical blocks and the expected block utilization.
469-
// Note: These may be innacurate if a model appears in multiple different
469+
// Note: These may be inaccurate if a model appears in multiple different
470470
// logical blocks.
471471
// TODO: Investigate resolving this issue.
472472
os << "Expected number of logical blocks:\n";

vpr/src/analytical_place/flat_placement_density_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct t_physical_tile_type;
4444
* capacity of each bin is the capacity of the tile it represents (as computed
4545
* by the flat placement mass calculator). When AP blocks are added / removed
4646
* from bins, this class will maintain the current utilization of the bin. Since
47-
* these masses / capacities are repesented by M-dimensional quantities (where
47+
* these masses / capacities are represented by M-dimensional quantities (where
4848
* M is the number of models in the architecture), the overfill and underfill of
4949
* each bin is given as an M-dimensional vector. For example, in an architecture
5050
* of only LUTs and FFs, an overfill of <3, 1> means that a bin has 3 too many

vpr/src/analytical_place/flat_placement_mass_calculator.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,15 @@ static PrimitiveVector calc_pb_type_capacity(const t_pb_type* pb_type,
231231
return capacity;
232232
}
233233
// For now, we simply mix the capacities of modes by taking the max of each
234-
// dimension of the capcities. This provides an upper-bound on the amount of
234+
// dimension of the capacities. This provides an upper-bound on the amount of
235235
// primitives this pb can contain.
236236
for (int mode = 0; mode < pb_type->num_modes; mode++) {
237237
PrimitiveVector mode_capacity = calc_mode_capacity(pb_type->modes[mode], memory_model_dims, dim_manager);
238238
capacity = PrimitiveVector::max(capacity, mode_capacity);
239239
}
240240

241-
// A pb_type represents a heirarchy of physical blocks that can be implemented,
242-
// with leaves of primitives at the bottom of the heirarchy. A pb_type will have
241+
// A pb_type represents a hierarchy of physical blocks that can be implemented,
242+
// with leaves of primitives at the bottom of the hierarchy. A pb_type will have
243243
// many children, each with their own physical cost; however, a parent pb_type
244244
// should not have higher cost than its children. For example, here we use
245245
// pin counts to represent cost. The children of the pb_type cannot use more
@@ -264,7 +264,7 @@ static PrimitiveVector calc_pb_type_capacity(const t_pb_type* pb_type,
264264
}
265265

266266
/**
267-
* @brief Calculate the cpacity of the given logical block type.
267+
* @brief Calculate the capacity of the given logical block type.
268268
*/
269269
static PrimitiveVector calc_logical_block_type_capacity(const t_logical_block_type& logical_block_type,
270270
const PrimitiveDimManager& dim_manager) {
@@ -372,7 +372,7 @@ static PrimitiveVector calc_block_mass(APBlockId blk_id,
372372
namespace {
373373

374374
/**
375-
* @brief A struct to hold information on pb types which act like one-hot primitves.
375+
* @brief A struct to hold information on pb types which act like one-hot primitives.
376376
*/
377377
struct OneHotPbType {
378378
/// @brief The root pb type which contains the modes which act in a one-hot
@@ -553,13 +553,13 @@ static void initialize_dim_manager(PrimitiveDimManager& dim_manager,
553553
}
554554
}
555555

556-
// Count the number of occurences of each model in the netlist.
556+
// Count the number of occurrences of each model in the netlist.
557557
vtr::vector<LogicalModelId, unsigned> num_model_occurence(models.all_models().size(), 0);
558558
for (AtomBlockId blk_id : atom_netlist.blocks()) {
559559
LogicalModelId model_id = atom_netlist.block_model(blk_id);
560560

561561
// If this model is not part of a shared dimension, just accumulate its
562-
// number of occurences.
562+
// number of occurrences.
563563
int one_hot_id = model_one_hot_id[model_id];
564564
if (one_hot_id == -1) {
565565
num_model_occurence[model_id]++;
@@ -568,7 +568,7 @@ static void initialize_dim_manager(PrimitiveDimManager& dim_manager,
568568

569569
// If this model is part of a shared dimension, only accumulate into the
570570
// first shared model. This creates an accurate count of the number of
571-
// occurences of the overall shared dimension in this first model id.
571+
// occurrences of the overall shared dimension in this first model id.
572572
const OneHotPbType& one_hot_pb_type = one_hot_pb_types[one_hot_id];
573573
LogicalModelId first_model_id = *one_hot_pb_type.shared_models.begin();
574574
num_model_occurence[first_model_id]++;

vpr/src/analytical_place/full_legalizer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class APClusterPlacer {
174174

175175
/**
176176
* @brief Given a cluster and tile it wants to go into, try to place the
177-
* cluster at this tile's postion.
177+
* cluster at this tile's position.
178178
*/
179179
bool place_cluster(ClusterBlockId clb_blk_id,
180180
const t_physical_tile_loc& tile_loc,
@@ -1312,7 +1312,7 @@ void APPack::legalize(const PartialPlacement& p_placement) {
13121312

13131313
void FullLegalizer::update_drawing_data_structures() {
13141314
#ifndef NO_GRAPHICS
1315-
// update graphic resources incase of clustering changes
1315+
// update graphic resources in case of clustering changes
13161316
if (get_draw_state_vars()) {
13171317
get_draw_state_vars()->refresh_graphic_resources_after_cluster_change();
13181318
}

0 commit comments

Comments
 (0)