diff --git a/vpr/src/analytical_place/analytical_placement_flow.cpp b/vpr/src/analytical_place/analytical_placement_flow.cpp index 62b6f8889f..371fff0164 100644 --- a/vpr/src/analytical_place/analytical_placement_flow.cpp +++ b/vpr/src/analytical_place/analytical_placement_flow.cpp @@ -77,7 +77,7 @@ static void print_ap_netlist_stats(const APNetlist& netlist) { * @param flat_placement_info The flat placement information to be read. * @param ap_netlist The APNetlist that used to iterate over its blocks. * @param prepacker The Prepacker to get molecule of blocks in the ap_netlist. - * @param p_placement The partial placement to be updated which is assumend + * @param p_placement The partial placement to be updated which is assumed * to be generated on ap_netlist or have the same blocks. */ static void convert_flat_to_partial_placement(const FlatPlacementInfo& flat_placement_info, const APNetlist& ap_netlist, const Prepacker& prepacker, PartialPlacement& p_placement) { diff --git a/vpr/src/analytical_place/analytical_solver.cpp b/vpr/src/analytical_place/analytical_solver.cpp index 93b1766aed..218800d272 100644 --- a/vpr/src/analytical_place/analytical_solver.cpp +++ b/vpr/src/analytical_place/analytical_solver.cpp @@ -183,7 +183,7 @@ void IdentityAnalyticalSolver::solve(unsigned iteration, PartialPlacement& p_pla // If this is the first iteration, we need to create a starting placement // to act as the starting point. // TODO: It may be convenient to create a class which creates the initial - // placement. That way we can use different intial placements with + // placement. That way we can use different initial placements with // the identity solver not optimizing. // Place all of the moveable blocks at the center of the device. for (APBlockId blk_id : netlist_.blocks()) { @@ -250,7 +250,7 @@ static inline void add_connection_to_system(size_t src_row_id, // Verify that this is a valid block id. VTR_ASSERT_DEBUG(target_blk_id.is_valid()); // The src_row_id is always a moveable block (rows in the matrix always - // coorespond to a moveable APBlock or a star node. + // correspond to a moveable APBlock or a star node. if (netlist.block_mobility(target_blk_id) == APBlockMobility::MOVEABLE) { // If the target is also moveable, update the coefficient matrix. size_t target_row_id = (size_t)blk_id_to_row_id[target_blk_id]; @@ -309,7 +309,7 @@ void QPHybridSolver::init_linear_system() { tripletList.reserve(num_nets); // Create the connections using a hybrid connection model of the star and - // clique connnection models. + // clique connection models. size_t star_node_offset = 0; for (APNetId net_id : netlist_.nets()) { if (netlist_.net_is_ignored(net_id)) @@ -454,7 +454,7 @@ void QPHybridSolver::solve(unsigned iteration, PartialPlacement& p_placement) { Eigen::SparseMatrix A_sparse_diff = Eigen::SparseMatrix(A_sparse); Eigen::VectorXd b_x_diff = Eigen::VectorXd(b_x); Eigen::VectorXd b_y_diff = Eigen::VectorXd(b_y); - // In the first iteration, the orginal linear system is used. + // In the first iteration, the original linear system is used. // In any other iteration, use the moveable APBlocks current placement as // anchor-points (fixed block positions). if (iteration != 0) { @@ -600,7 +600,7 @@ void B2BSolver::solve(unsigned iteration, PartialPlacement& p_placement) { } // In the first iteration, we have no prior information. - // Run the intial placer to get a first guess. + // Run the initial placer to get a first guess. switch (initial_placement_ty_) { case e_initial_placement_type::LeastDense: initialize_placement_least_dense(p_placement); diff --git a/vpr/src/analytical_place/analytical_solver.h b/vpr/src/analytical_place/analytical_solver.h index faf5a9c236..1e77192595 100644 --- a/vpr/src/analytical_place/analytical_solver.h +++ b/vpr/src/analytical_place/analytical_solver.h @@ -48,7 +48,7 @@ typedef vtr::StrongId APRowId; * This provides functionality that all Analytical Solvers will use. * * It provides a standard interface that all Analytical Solvers must implement - * so they can be used interchangably. This makes it very easy to test and + * so they can be used interchangeably. This makes it very easy to test and * compare different solvers. */ class AnalyticalSolver { @@ -90,7 +90,7 @@ class AnalyticalSolver { /** * @brief Print statistics on the analytical solver. * - * This is expected to be called after global placement to collect cummulative + * This is expected to be called after global placement to collect cumulative * information on how the solver performed. */ virtual void print_statistics() = 0; @@ -178,7 +178,7 @@ std::unique_ptr make_analytical_solver(e_ap_analytical_solver int log_verbosity); /** - * @brief An analytical solver which does not solve anthing. This solver acts + * @brief An analytical solver which does not solve anything. This solver acts * like the identity matrix in a system of equations and just passes the * previous solution (from the partial legalizer) along. This solver * should only be used for testing. @@ -295,7 +295,7 @@ class QPHybridSolver : public AnalyticalSolver { void init_linear_system(); /** - * @brief Intializes the guesses which will be used in the solver. + * @brief Initializes the guesses which will be used in the solver. * * The guesses will be used as starting points for the CG solver. The better * these guesses are, the faster the solver will converge. @@ -473,7 +473,7 @@ class B2BSolver : public AnalyticalSolver { /// @brief Since the weights in the B2B model divide by the distance between /// blocks and their bounds, that distance may get very very close to /// 0. This causes the weight matrix to become numerically unstable. - /// We can gaurd against this by clamping the distance to not be smaller + /// We can guard against this by clamping the distance to not be smaller /// than some epsilon. /// Decreasing this number may lead to more instability, but can yield /// a higher quality solution. @@ -703,7 +703,7 @@ class B2BSolver : public AnalyticalSolver { * placement object. * * Note: The x_soln and y_soln may be modified if it is found that the - * solution is imposible (i.e. has negative positions). + * solution is impossible (i.e. has negative positions). */ void store_solution_into_placement(Eigen::VectorXd& x_soln, Eigen::VectorXd& y_soln, diff --git a/vpr/src/analytical_place/ap_argparse_utils.cpp b/vpr/src/analytical_place/ap_argparse_utils.cpp index c58863c25d..6b5224186f 100644 --- a/vpr/src/analytical_place/ap_argparse_utils.cpp +++ b/vpr/src/analytical_place/ap_argparse_utils.cpp @@ -104,7 +104,7 @@ parse_key_val_arg(const std::string& arg, unsigned expected_num_vals_per_key) { "Error when parsing argument string"); } - // Collect the comma seperated values into a vector. + // Collect the comma separated values into a vector. std::vector vals; vals.reserve(expected_num_vals_per_key); diff --git a/vpr/src/analytical_place/ap_argparse_utils.h b/vpr/src/analytical_place/ap_argparse_utils.h index ba48203592..976af7e6e0 100644 --- a/vpr/src/analytical_place/ap_argparse_utils.h +++ b/vpr/src/analytical_place/ap_argparse_utils.h @@ -3,7 +3,7 @@ * @file * @author Alex Singer * @date June 2025 - * @brief Delcarations of utility functions used to parse AP options. + * @brief Declarations of utility functions used to parse AP options. */ #include diff --git a/vpr/src/analytical_place/ap_draw_manager.h b/vpr/src/analytical_place/ap_draw_manager.h index aed89d77df..bca6814ce1 100644 --- a/vpr/src/analytical_place/ap_draw_manager.h +++ b/vpr/src/analytical_place/ap_draw_manager.h @@ -3,7 +3,7 @@ * @file * @author Yulang (Robert) Luo * @date October 2025 - * @brief The decalarations of the AP Draw Manager class which is used + * @brief The declarations of the AP Draw Manager class which is used * to handle graphics updates during analytical placement. */ diff --git a/vpr/src/analytical_place/ap_mass_report.cpp b/vpr/src/analytical_place/ap_mass_report.cpp index 8202fca550..b31377b6a0 100644 --- a/vpr/src/analytical_place/ap_mass_report.cpp +++ b/vpr/src/analytical_place/ap_mass_report.cpp @@ -243,7 +243,7 @@ void print_physical_tiles(std::ofstream& os, * @brief Prints all of the non-zero dimensions of the given primitive vector. * * @param os - * The output file stream to print the primtive vector to. + * The output file stream to print the primitive vector to. * @param primitive_vec * The primitive vector to print. * @param dim_manager @@ -466,7 +466,7 @@ void print_expected_device_utilization(std::ofstream& os, } // Print the expected number of logical blocks and the expected block utilization. - // Note: These may be innacurate if a model appears in multiple different + // Note: These may be inaccurate if a model appears in multiple different // logical blocks. // TODO: Investigate resolving this issue. os << "Expected number of logical blocks:\n"; diff --git a/vpr/src/analytical_place/flat_placement_density_manager.h b/vpr/src/analytical_place/flat_placement_density_manager.h index c030f773f5..acd201f49f 100644 --- a/vpr/src/analytical_place/flat_placement_density_manager.h +++ b/vpr/src/analytical_place/flat_placement_density_manager.h @@ -44,7 +44,7 @@ struct t_physical_tile_type; * capacity of each bin is the capacity of the tile it represents (as computed * by the flat placement mass calculator). When AP blocks are added / removed * from bins, this class will maintain the current utilization of the bin. Since - * these masses / capacities are repesented by M-dimensional quantities (where + * these masses / capacities are represented by M-dimensional quantities (where * M is the number of models in the architecture), the overfill and underfill of * each bin is given as an M-dimensional vector. For example, in an architecture * of only LUTs and FFs, an overfill of <3, 1> means that a bin has 3 too many diff --git a/vpr/src/analytical_place/flat_placement_mass_calculator.cpp b/vpr/src/analytical_place/flat_placement_mass_calculator.cpp index 93068fa4df..d3d9ae2d6e 100644 --- a/vpr/src/analytical_place/flat_placement_mass_calculator.cpp +++ b/vpr/src/analytical_place/flat_placement_mass_calculator.cpp @@ -231,15 +231,15 @@ static PrimitiveVector calc_pb_type_capacity(const t_pb_type* pb_type, return capacity; } // For now, we simply mix the capacities of modes by taking the max of each - // dimension of the capcities. This provides an upper-bound on the amount of + // dimension of the capacities. This provides an upper-bound on the amount of // primitives this pb can contain. for (int mode = 0; mode < pb_type->num_modes; mode++) { PrimitiveVector mode_capacity = calc_mode_capacity(pb_type->modes[mode], memory_model_dims, dim_manager); capacity = PrimitiveVector::max(capacity, mode_capacity); } - // A pb_type represents a heirarchy of physical blocks that can be implemented, - // with leaves of primitives at the bottom of the heirarchy. A pb_type will have + // A pb_type represents a hierarchy of physical blocks that can be implemented, + // with leaves of primitives at the bottom of the hierarchy. A pb_type will have // many children, each with their own physical cost; however, a parent pb_type // should not have higher cost than its children. For example, here we use // 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, } /** - * @brief Calculate the cpacity of the given logical block type. + * @brief Calculate the capacity of the given logical block type. */ static PrimitiveVector calc_logical_block_type_capacity(const t_logical_block_type& logical_block_type, const PrimitiveDimManager& dim_manager) { @@ -372,7 +372,7 @@ static PrimitiveVector calc_block_mass(APBlockId blk_id, namespace { /** - * @brief A struct to hold information on pb types which act like one-hot primitves. + * @brief A struct to hold information on pb types which act like one-hot primitives. */ struct OneHotPbType { /// @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, } } - // Count the number of occurences of each model in the netlist. + // Count the number of occurrences of each model in the netlist. vtr::vector num_model_occurence(models.all_models().size(), 0); for (AtomBlockId blk_id : atom_netlist.blocks()) { LogicalModelId model_id = atom_netlist.block_model(blk_id); // If this model is not part of a shared dimension, just accumulate its - // number of occurences. + // number of occurrences. int one_hot_id = model_one_hot_id[model_id]; if (one_hot_id == -1) { num_model_occurence[model_id]++; @@ -568,7 +568,7 @@ static void initialize_dim_manager(PrimitiveDimManager& dim_manager, // If this model is part of a shared dimension, only accumulate into the // first shared model. This creates an accurate count of the number of - // occurences of the overall shared dimension in this first model id. + // occurrences of the overall shared dimension in this first model id. const OneHotPbType& one_hot_pb_type = one_hot_pb_types[one_hot_id]; LogicalModelId first_model_id = *one_hot_pb_type.shared_models.begin(); num_model_occurence[first_model_id]++; diff --git a/vpr/src/analytical_place/full_legalizer.cpp b/vpr/src/analytical_place/full_legalizer.cpp index a5f42009fa..2338a53766 100644 --- a/vpr/src/analytical_place/full_legalizer.cpp +++ b/vpr/src/analytical_place/full_legalizer.cpp @@ -174,7 +174,7 @@ class APClusterPlacer { /** * @brief Given a cluster and tile it wants to go into, try to place the - * cluster at this tile's postion. + * cluster at this tile's position. */ bool place_cluster(ClusterBlockId clb_blk_id, const t_physical_tile_loc& tile_loc, @@ -1312,7 +1312,7 @@ void APPack::legalize(const PartialPlacement& p_placement) { void FullLegalizer::update_drawing_data_structures() { #ifndef NO_GRAPHICS - // update graphic resources incase of clustering changes + // update graphic resources in case of clustering changes if (get_draw_state_vars()) { get_draw_state_vars()->refresh_graphic_resources_after_cluster_change(); } diff --git a/vpr/src/analytical_place/full_legalizer.h b/vpr/src/analytical_place/full_legalizer.h index da641dee42..dcb72e4808 100644 --- a/vpr/src/analytical_place/full_legalizer.h +++ b/vpr/src/analytical_place/full_legalizer.h @@ -140,9 +140,6 @@ std::unique_ptr make_full_legalizer(e_ap_full_legalizer full_lega * * After cluster creation, each cluster is placed by the initial placer at the * grid location nearest to the centroid of its atoms. - * - * TODO: Refer to the FPT 2025 Triple-AP paper if accepted. - * */ class FlatRecon : public FullLegalizer { public: @@ -332,7 +329,7 @@ class NaiveFullLegalizer : public FullLegalizer { * * In the Packer, the flat-placement can provide more context for the clusters * to pull in atoms that want to be near the other atoms in the cluster, and - * repell atoms that are far apart. This can potentially make better clusters + * repel atoms that are far apart. This can potentially make better clusters * than a Packer that does not know that information. * * In the Placer, the flat-placement can help decide where clusters of atoms diff --git a/vpr/src/analytical_place/global_placer.cpp b/vpr/src/analytical_place/global_placer.cpp index 0c4caab073..9b670e1f31 100644 --- a/vpr/src/analytical_place/global_placer.cpp +++ b/vpr/src/analytical_place/global_placer.cpp @@ -340,7 +340,7 @@ PartialPlacement SimPLGlobalPlacer::place() { // Print the status header. if (log_verbosity_ >= 1) print_SimPL_status_header(); - // Initialialize the partial placement object. + // Initialize the partial placement object. PartialPlacement p_placement(ap_netlist_); float total_time_spent_in_solver = 0.0f; diff --git a/vpr/src/analytical_place/global_placer.h b/vpr/src/analytical_place/global_placer.h index 3b660b484d..3e22287e0f 100644 --- a/vpr/src/analytical_place/global_placer.h +++ b/vpr/src/analytical_place/global_placer.h @@ -33,7 +33,7 @@ struct PartialPlacement; * * This declares the functionality that all Global Placers will use. This * provides a standard interface for the global placers so they can be used - * interchangably. This makes it very easy to test and compare different global + * interchangeably. This makes it very easy to test and compare different global * placers. */ class GlobalPlacer { @@ -132,7 +132,7 @@ class SimPLGlobalPlacer : public GlobalPlacer { /// @brief The solver which generates the lower-bound placement. std::unique_ptr solver_; - /// @brief The denisty manager the partial legalizer will optimize over. + /// @brief The density manager the partial legalizer will optimize over. std::shared_ptr density_manager_; /// @brief The legalizer which generates the upper-bound placement. diff --git a/vpr/src/analytical_place/model_grouper.h b/vpr/src/analytical_place/model_grouper.h index 17207878b0..2f68ba3946 100644 --- a/vpr/src/analytical_place/model_grouper.h +++ b/vpr/src/analytical_place/model_grouper.h @@ -38,7 +38,7 @@ typedef vtr::StrongId ModelGroupId; * group and must be legalized together. * * This class also manages what models each group contains and the group of each - * model, where the user can use IDs to get relavent information. + * model, where the user can use IDs to get relevant information. */ class ModelGrouper { public: diff --git a/vpr/src/analytical_place/partial_legalizer.cpp b/vpr/src/analytical_place/partial_legalizer.cpp index 027c5125f6..eec41a2ee2 100644 --- a/vpr/src/analytical_place/partial_legalizer.cpp +++ b/vpr/src/analytical_place/partial_legalizer.cpp @@ -624,7 +624,7 @@ void FlowBasedLegalizer::legalize(PartialPlacement& p_placement) { // We take the manhattan (L1) norm here since we only care about the total // amount of overfill in each dimension. For example, a bin that has a // supply of <1, 1> is just as overfilled as a bin of supply <0, 2>. - // The standard L2 norm would give more weigth to <0, 2>. + // The standard L2 norm would give more weight to <0, 2>. // NOTE: Although the supply should always be non-negative, we still // take the absolute value in the norm for completeness. // TODO: This is a guess. Should investigate other norms. @@ -1221,7 +1221,7 @@ void BiPartitioningPartialLegalizer::merge_overlapping_windows( // Add the lower and upper bound of the window into the map. Add a small // epsilon to exclude the border of the window. We do not care if two // windows share a border, only if they overlap. - // NOTE: This will add duplicates; however it ensures that the overlaping + // NOTE: This will add duplicates; however it ensures that the overlapping // region is found in the lower algorithm. const SpreadingWindow& window = windows[i]; x_sorted_windows.insert(std::make_pair(window.region.xmin() + epsilon, i)); @@ -1255,7 +1255,7 @@ void BiPartitioningPartialLegalizer::merge_overlapping_windows( // Get the lower and upper bounds in the spatial lookup. This will // give a list of all windows which could possibly overlap right now // (at least in the x dimension). - // NOTE: There may be duplicates; but thats ok since these checks + // NOTE: There may be duplicates; but that's ok since these checks // are fast. auto lower = x_sorted_windows.lower_bound(region.xmin()); auto upper = x_sorted_windows.upper_bound(region.xmax()); @@ -1913,7 +1913,7 @@ void BiPartitioningPartialLegalizer::move_blocks_out_of_windows( for (APBlockId blk_id : window.contained_blocks) { // Note: The blocks should have been removed from their original // bins when they were put into the windows. There are asserts - // within the denisty manager class which will verify this. + // within the density manager class which will verify this. density_manager_->insert_block_into_bin(blk_id, bin_id); } } diff --git a/vpr/src/analytical_place/partial_legalizer.h b/vpr/src/analytical_place/partial_legalizer.h index b3b5fb1ac5..b31ef40d78 100644 --- a/vpr/src/analytical_place/partial_legalizer.h +++ b/vpr/src/analytical_place/partial_legalizer.h @@ -36,10 +36,10 @@ struct PartialPlacement; /** * @brief The Partial Legalizer base class * - * This provied functionality that all Partial Legalizers will use. + * This provides functionality that all Partial Legalizers will use. * * It provides a standard interface that all Partial Legalizers must implement - * so thet can be used interchangably. This makes it very easy to test and + * so they can be used interchangeably. This makes it very easy to test and * compare different solvers. */ class PartialLegalizer { @@ -49,7 +49,7 @@ class PartialLegalizer { /** * @brief Constructor of the base PartialLegalizer class * - * Currently just copies the parameters into the class as member varaibles. + * Currently just copies the parameters into the class as member variables. */ PartialLegalizer(const APNetlist& netlist, int log_verbosity) : netlist_(netlist) @@ -74,7 +74,7 @@ class PartialLegalizer { * @brief Print statistics on the Partial Legalizer. * * This is expected to be called at the end of Global Placement to provide - * cummulative information on how much work the partial legalizer performed. + * cumulative information on how much work the partial legalizer performed. */ virtual void print_statistics() = 0; @@ -288,7 +288,7 @@ enum class e_partition_dir { * @brief Spatial window used to spread the blocks contained within. * * This window's region is identified and grown until it has enough space to - * accomodate the blocks stored within. This window is then successivly + * accommodate the blocks stored within. This window is then successivly * partitioned until it is small enough (blocks are not too dense). */ struct SpreadingWindow { @@ -526,14 +526,14 @@ class BiPartitioningPartialLegalizer : public PartialLegalizer { * This process is split into 4 stages: * 1) Overfilled bins are identified and clustered. * 2) Grow windows around the overfilled bin clusters. These windows - * will grow until there is just enough space to accomodate the blocks + * will grow until there is just enough space to accommodate the blocks * within the window (capacity of the window is larger than the utilization). * 3) Merge overlapping windows. * 4) Move the blocks within these window regions from their bins into * their windows. This updates the current utilization of bins, making * spreading easier. * - * We identify non-overlapping windows for different model groups independtly + * We identify non-overlapping windows for different model groups independently * for a few reasons: * - Each model group, by design, can be spread independent of each other. * This reduces the problem size by the number of groups. diff --git a/vpr/src/analytical_place/partial_placement.h b/vpr/src/analytical_place/partial_placement.h index 703c42a306..50552b69a1 100644 --- a/vpr/src/analytical_place/partial_placement.h +++ b/vpr/src/analytical_place/partial_placement.h @@ -139,7 +139,7 @@ struct PartialPlacement { * NOTE: This gets the HPWL of the netlist and partial placement as it * currently appears. The user should be aware that fractional * positions of blocks are not realistic and the netlist is ignoring - * some nets to make the analytical placment problem easier. + * some nets to make the analytical placement problem easier. * The user should use an atom or cluster level HPWL for an accurate * result. This is used for the Global Placer. */