Skip to content

Commit 0e9f8c2

Browse files
Merge pull request #3359 from AlexandreSinger/feature-spelling
[Spelling] Fixed Simple Spelling Mistakes in Pack and Power
2 parents 1d7a9fb + 74fe02f commit 0e9f8c2

32 files changed

+86
-87
lines changed

vpr/src/pack/appack_max_dist_th_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void APPackMaxDistThManager::init(const std::vector<std::string>& max_dist_ths,
3636
set_max_distance_thresholds_from_strings(max_dist_ths, logical_block_types);
3737
}
3838

39-
// Set the initilized flag to true.
39+
// Set the initialized flag to true.
4040
is_initialized_ = true;
4141

4242
// Log the max distance thresholds for each logical block type. This is

vpr/src/pack/appack_max_dist_th_manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class APPackMaxDistThManager {
136136
void set_max_distance_thresholds_from_strings(const std::vector<std::string>& max_dist_ths,
137137
const std::vector<t_logical_block_type>& logical_block_types);
138138

139-
/// @brief A flag which shows if the thesholds have been computed or not.
139+
/// @brief A flag which shows if the thresholds have been computed or not.
140140
bool is_initialized_ = false;
141141

142142
/// @brief The max distance thresholds of all logical blocks in the architecture.

vpr/src/pack/atom_pb_bimap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class AtomPBBimap {
3535
///@brief Returns the atom block id associated with pb
3636
AtomBlockId pb_atom(const t_pb* pb) const;
3737

38-
///@brief Conveneince wrapper around atom_pb to access the associated graph node
38+
///@brief Convenience wrapper around atom_pb to access the associated graph node
3939
const t_pb_graph_node* atom_pb_graph_node(const AtomBlockId blk_id) const;
4040

4141
/**

vpr/src/pack/cluster_feasibility_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void load_pin_classes_in_pb_graph_head(t_pb_graph_node* pb_graph_node) {
7777
for (i = 0; i < depth; i++) {
7878
input_count = output_count = 0;
7979
// The following function marks pins based on the pin count. This is
80-
// used when traversing the pb heirarchy.
80+
// used when traversing the pb hierarchy.
8181
std::unordered_map<t_pb_graph_pin*, int> pin_marker;
8282
load_pin_class_by_depth(pb_graph_node, i, &input_count, &output_count, pin_marker);
8383
}

vpr/src/pack/cluster_feasibility_filter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* 2) Robustness issue. During packing, we have a limited size queue to store candidates to try to pack. A good filter helps keep that queue filled with candidates likely to pass.
88
*
99
* 1st major filter: Pin counting based on pin classes
10-
* Rationale: If the number of a particular gruop of pins supplied by the pb_graph_node in the architecture is insufficient to meet a candidate packing solution's demand for that group of pins, then that
10+
* Rationale: If the number of a particular group of pins supplied by the pb_graph_node in the architecture is insufficient to meet a candidate packing solution's demand for that group of pins, then that
1111
* candidate solution is for sure invalid without any further legalization checks. For example, if a candidate solution requires 2 clock pins but the architecture only has one clock, then that solution
1212
* can't be legal.
1313
*

vpr/src/pack/cluster_legalizer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ static enum e_block_pack_status check_chain_root_placement_feasibility(const t_p
314314
/*
315315
* @brief Check that the two atom blocks blk_id and sibling_blk_id (which should
316316
* both be memory slices) are feasible, in the sense that they have
317-
* precicely the same net connections (with the exception of nets in data
317+
* precisely the same net connections (with the exception of nets in data
318318
* port classes).
319319
*
320320
* Note that this routine does not check pin feasibility against the cur_pb_type; so
@@ -368,7 +368,7 @@ static bool primitive_memory_sibling_feasible(const AtomBlockId blk_id, const t_
368368
//We can get the actual net provided the port exists
369369
//
370370
//Note that if the port did not exist, the net is left
371-
//as invalid/disconneced
371+
//as invalid/disconnected
372372
if (blk_port_id) {
373373
blk_net_id = atom_ctx.netlist().port_net(blk_port_id, ipin);
374374
}
@@ -503,7 +503,7 @@ try_place_atom_block_rec(const t_pb_graph_node* pb_graph_node,
503503
}
504504
const t_pb_type* pb_type = pb_graph_node->pb_type;
505505

506-
/* Any pb_type under an mode, which is disabled for packing, should not be considerd for mapping
506+
/* Any pb_type under an mode, which is disabled for packing, should not be considered for mapping
507507
* Early exit to flag failure
508508
*/
509509
if (true == pb_type->parent_mode->disable_packing) {

vpr/src/pack/cluster_legalizer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ struct LegalizationCluster {
144144
* 2) FULL
145145
*
146146
* 1) SKIP_INTRA_LB_ROUTE Legalization Strategy Example:
147-
* This strategy will not fully route the interal connections of the clusters
147+
* This strategy will not fully route the internal connections of the clusters
148148
* until when the user specifies. An example of how to use this strategy would
149149
* look something like this. Note, this example is simplified and the result
150150
* of the packings should be checked and handled.
@@ -166,7 +166,7 @@ struct LegalizationCluster {
166166
* if (!legalizer.check_cluster_legality(new_cluster_id))
167167
* // Destroy the illegal cluster.
168168
* legalizer.destroy_cluster(new_cluster_id);
169-
* // Clean-up the internal bookeeping of the class (required after
169+
* // Clean-up the internal bookkeeping of the class (required after
170170
* // destroying a cluster).
171171
* legalizer.compress();
172172
* // Handle how to try again (maybe use FULL strategy).
@@ -372,7 +372,7 @@ class ClusterLegalizer {
372372
bool check_cluster_legality(LegalizationClusterId cluster_id);
373373

374374
/*
375-
* @brief Cleans the cluster of unnessary data, reducing the memory footprint.
375+
* @brief Cleans the cluster of unnecessary data, reducing the memory footprint.
376376
*
377377
* After this function is called, no more molecules can be added to the
378378
* cluster. This method will ensure that the cluster has enough information
@@ -417,7 +417,7 @@ class ClusterLegalizer {
417417
*
418418
* A molecule is compatible with a cluster if there exists a free primitive
419419
* (a primitive that is not currently occupied by other atoms) of the correct
420-
* type to accomodate each type of atom in the molecule.
420+
* type to accommodate each type of atom in the molecule.
421421
*
422422
* This is a quick check to see if a molecule can go in the given cluster.
423423
* "This is a necessary but not sufficient test for a molecule to be able to

vpr/src/pack/cluster_placement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ bool get_next_primitive_list(t_intra_cluster_placement_stats* cluster_placement_
207207
* 4. Return NULL if not found
208208
*/
209209

210-
// Intialize variables
210+
// Initialize variables
211211
bool found_best = false;
212212
lowest_cost = std::numeric_limits<float>::max();
213213

vpr/src/pack/cluster_router.cpp

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static bool check_edge_for_route_conflicts(std::unordered_map<const t_pb_graph_n
246246
pb_graph_node->illegal_modes.push_back(result.first->second->index);
247247
}
248248

249-
// If the number of illegal modes equals the number of available mode for a specific pb_graph_node it means that no cluster can be generated. This resuts
249+
// If the number of illegal modes equals the number of available mode for a specific pb_graph_node it means that no cluster can be generated. This results
250250
// in a fatal error.
251251
if ((int)pb_graph_node->illegal_modes.size() >= pb_graph_node->pb_type->num_modes) {
252252
VPR_FATAL_ERROR(VPR_ERROR_PACK, "There are no more available modes to be used. Routing Failed!");
@@ -693,7 +693,7 @@ static void add_pin_to_rt_terminals(t_lb_router_data* router_data, const AtomPin
693693
if (lb_nets[ipos].terminals.empty()) {
694694
/* Add terminals */
695695

696-
//Default assumption is that the source is outside the current cluster (will be overriden later if required)
696+
//Default assumption is that the source is outside the current cluster (will be overridden later if required)
697697
int source_terminal = get_lb_type_rr_graph_ext_source_index(lb_type);
698698
lb_nets[ipos].terminals.push_back(source_terminal);
699699

@@ -782,10 +782,10 @@ static void add_pin_to_rt_terminals(t_lb_router_data* router_data, const AtomPin
782782
//Sanity checks
783783
int num_extern_sources = 0;
784784
int num_extern_sinks = 0;
785-
for (size_t iterm = 0; iterm < lb_nets[ipos].terminals.size(); ++iterm) {
786-
int inode = lb_nets[ipos].terminals[iterm];
787-
AtomPinId atom_pin = lb_nets[ipos].atom_pins[iterm];
788-
if (iterm == 0) {
785+
for (size_t term_idx = 0; term_idx < lb_nets[ipos].terminals.size(); ++term_idx) {
786+
int inode = lb_nets[ipos].terminals[term_idx];
787+
AtomPinId atom_pin = lb_nets[ipos].atom_pins[term_idx];
788+
if (term_idx == 0) {
789789
//Net driver
790790
VTR_ASSERT_SAFE_MSG(lb_type_graph[inode].type == LB_SOURCE, "Driver must be a source RR node");
791791
VTR_ASSERT_SAFE_MSG(atom_pin, "Driver have an associated atom pin");
@@ -867,7 +867,7 @@ static void remove_pin_from_rt_terminals(t_lb_router_data* router_data, const At
867867

868868
/* Remove sink from list of terminals */
869869
int pin_index = pb_graph_pin->pin_count_in_cluster;
870-
unsigned int iterm;
870+
size_t term_idx;
871871

872872
VTR_ASSERT(lb_type_graph[pin_index].num_modes == 1);
873873
VTR_ASSERT(lb_type_graph[pin_index].num_fanout[0] == 1);
@@ -877,8 +877,8 @@ static void remove_pin_from_rt_terminals(t_lb_router_data* router_data, const At
877877
int target_index = -1;
878878
//Search for the sink
879879
found = false;
880-
for (iterm = 0; iterm < lb_nets[ipos].terminals.size(); iterm++) {
881-
if (lb_nets[ipos].terminals[iterm] == sink_index) {
880+
for (term_idx = 0; term_idx < lb_nets[ipos].terminals.size(); term_idx++) {
881+
if (lb_nets[ipos].terminals[term_idx] == sink_index) {
882882
target_index = sink_index;
883883
found = true;
884884
break;
@@ -887,23 +887,22 @@ static void remove_pin_from_rt_terminals(t_lb_router_data* router_data, const At
887887
if (!found) {
888888
//Search for the pin
889889
found = false;
890-
for (iterm = 0; iterm < lb_nets[ipos].terminals.size(); iterm++) {
891-
if (lb_nets[ipos].terminals[iterm] == pin_index) {
890+
for (term_idx = 0; term_idx < lb_nets[ipos].terminals.size(); term_idx++) {
891+
if (lb_nets[ipos].terminals[term_idx] == pin_index) {
892892
target_index = pin_index;
893893
found = true;
894894
break;
895895
}
896896
}
897897
}
898898
VTR_ASSERT(found == true);
899-
VTR_ASSERT(lb_nets[ipos].terminals[iterm] == target_index);
900-
VTR_ASSERT(iterm > 0);
899+
VTR_ASSERT(lb_nets[ipos].terminals[term_idx] == target_index);
901900

902901
/* Drop terminal from list */
903-
lb_nets[ipos].terminals[iterm] = lb_nets[ipos].terminals.back();
902+
lb_nets[ipos].terminals[term_idx] = lb_nets[ipos].terminals.back();
904903
lb_nets[ipos].terminals.pop_back();
905904

906-
lb_nets[ipos].atom_pins[iterm] = lb_nets[ipos].atom_pins.back();
905+
lb_nets[ipos].atom_pins[term_idx] = lb_nets[ipos].atom_pins.back();
907906
lb_nets[ipos].atom_pins.pop_back();
908907

909908
if (lb_nets[ipos].terminals.size() == 1 && lb_nets[ipos].terminals[0] != get_lb_type_rr_graph_ext_source_index(lb_type)) {
@@ -946,23 +945,23 @@ static void fix_duplicate_equivalent_pins(t_lb_router_data* router_data, const A
946945
std::vector<t_intra_lb_net>& lb_nets = *router_data->intra_lb_nets;
947946

948947
for (size_t ilb_net = 0; ilb_net < lb_nets.size(); ++ilb_net) {
949-
//Collect all the sink terminals indicies which target a particular node
948+
//Collect all the sink terminals indices which target a particular node
950949
std::map<int, std::vector<int>> duplicate_terminals;
951-
for (size_t iterm = 1; iterm < lb_nets[ilb_net].terminals.size(); ++iterm) {
952-
int node = lb_nets[ilb_net].terminals[iterm];
950+
for (size_t term_idx = 1; term_idx < lb_nets[ilb_net].terminals.size(); ++term_idx) {
951+
int node = lb_nets[ilb_net].terminals[term_idx];
953952

954-
duplicate_terminals[node].push_back(iterm);
953+
duplicate_terminals[node].push_back(term_idx);
955954
}
956955

957956
for (auto kv : duplicate_terminals) {
958957
if (kv.second.size() < 2) continue; //Only process duplicates
959958

960959
//Remap all the duplicate terminals so they target the pin instead of the sink
961960
for (size_t idup_term = 0; idup_term < kv.second.size(); ++idup_term) {
962-
int iterm = kv.second[idup_term]; //The index in terminals which is duplicated
961+
int term_idx = kv.second[idup_term]; //The index in terminals which is duplicated
963962

964963
VTR_ASSERT(lb_nets[ilb_net].atom_pins.size() == lb_nets[ilb_net].terminals.size());
965-
AtomPinId atom_pin = lb_nets[ilb_net].atom_pins[iterm];
964+
AtomPinId atom_pin = lb_nets[ilb_net].atom_pins[term_idx];
966965
VTR_ASSERT(atom_pin);
967966

968967
const t_pb_graph_pin* pb_graph_pin = find_pb_graph_pin(atom_ctx.netlist(), atom_to_pb, atom_pin);
@@ -984,10 +983,10 @@ static void fix_duplicate_equivalent_pins(t_lb_router_data* router_data, const A
984983
VTR_ASSERT(lb_type_graph[pin_index].num_fanout[0] == 1);
985984
int sink_index = lb_type_graph[pin_index].outedges[0][0].node_index;
986985
VTR_ASSERT(lb_type_graph[sink_index].type == LB_SINK);
987-
VTR_ASSERT_MSG(sink_index == lb_nets[ilb_net].terminals[iterm], "Remapped pin must be connected to original sink");
986+
VTR_ASSERT_MSG(sink_index == lb_nets[ilb_net].terminals[term_idx], "Remapped pin must be connected to original sink");
988987

989988
//Change the target
990-
lb_nets[ilb_net].terminals[iterm] = pin_index;
989+
lb_nets[ilb_net].terminals[term_idx] = pin_index;
991990
}
992991
}
993992
}
@@ -1370,8 +1369,8 @@ static void save_and_reset_lb_route(t_lb_router_data* router_data) {
13701369
*/
13711370
saved_lb_nets[inet].atom_net_id = lb_nets[inet].atom_net_id;
13721371
saved_lb_nets[inet].terminals.resize(lb_nets[inet].terminals.size());
1373-
for (int iterm = 0; iterm < (int)lb_nets[inet].terminals.size(); iterm++) {
1374-
saved_lb_nets[inet].terminals[iterm] = lb_nets[inet].terminals[iterm];
1372+
for (int term_idx = 0; term_idx < (int)lb_nets[inet].terminals.size(); term_idx++) {
1373+
saved_lb_nets[inet].terminals[term_idx] = lb_nets[inet].terminals[term_idx];
13751374
}
13761375
saved_lb_nets[inet].rt_tree = lb_nets[inet].rt_tree;
13771376
lb_nets[inet].rt_tree = nullptr;

vpr/src/pack/greedy_candidate_selector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void GreedyCandidateSelector::update_cluster_gain_stats_candidate_success(
271271
// TODO: If this threshold lookup gets expensive, move outside.
272272
int high_fanout_net_threshold = high_fanout_thresholds_.get_threshold(cluster_legalizer.get_cluster_type(cluster_id)->name);
273273

274-
// Mark and update the gain stats for each block in the succesfully
274+
// Mark and update the gain stats for each block in the successfully
275275
// clustered molecule.
276276
// Makes calls to update cluster stats such as the gain map for atoms, used
277277
// pins, and clock structures, in order to reflect the new content of the

0 commit comments

Comments
 (0)