@@ -134,7 +134,6 @@ static void print_chain_starting_points(t_pack_patterns* chain_pattern);
134
134
*/
135
135
static std::vector<t_pack_patterns> alloc_and_load_pack_patterns (const std::vector<t_logical_block_type>& logical_block_types) {
136
136
int L_num_blocks;
137
- std::vector<t_pack_patterns> list_of_packing_patterns;
138
137
t_pb_graph_edge* expansion_edge;
139
138
140
139
/* alloc and initialize array of packing patterns based on architecture complex blocks */
@@ -143,7 +142,7 @@ static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vect
143
142
discover_pattern_names_in_pb_graph_node (type.pb_graph_head , pattern_names);
144
143
}
145
144
146
- list_of_packing_patterns = alloc_and_init_pattern_list_from_hash (pattern_names);
145
+ std::vector<t_pack_patterns> packing_patterns = alloc_and_init_pattern_list_from_hash (pattern_names);
147
146
148
147
/* load packing patterns by traversing the edges to find edges belonging to pattern */
149
148
for (size_t i = 0 ; i < pattern_names.size (); i++) {
@@ -155,30 +154,30 @@ static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vect
155
154
}
156
155
157
156
L_num_blocks = 0 ;
158
- list_of_packing_patterns [i].base_cost = 0 ;
157
+ packing_patterns [i].base_cost = 0 ;
159
158
// use the found expansion edge to build the pack pattern
160
159
backward_expand_pack_pattern_from_edge (expansion_edge,
161
- list_of_packing_patterns [i], nullptr , nullptr , &L_num_blocks);
162
- list_of_packing_patterns [i].num_blocks = L_num_blocks;
160
+ packing_patterns [i], nullptr , nullptr , &L_num_blocks);
161
+ packing_patterns [i].num_blocks = L_num_blocks;
163
162
164
163
/* Default settings: A section of a netlist must match all blocks in a pack
165
164
* pattern before it can be made a molecule except for carry-chains.
166
165
* For carry-chains, since carry-chains are typically quite flexible in terms
167
166
* of size, it is optional whether or not an atom in a netlist matches any
168
167
* particular block inside the chain */
169
- list_of_packing_patterns [i].is_block_optional = new bool [L_num_blocks];
168
+ packing_patterns [i].is_block_optional = new bool [L_num_blocks];
170
169
for (int k = 0 ; k < L_num_blocks; k++) {
171
- list_of_packing_patterns [i].is_block_optional [k] = false ;
172
- if (list_of_packing_patterns [i].is_chain && list_of_packing_patterns [i].root_block ->block_id != k) {
173
- list_of_packing_patterns [i].is_block_optional [k] = true ;
170
+ packing_patterns [i].is_block_optional [k] = false ;
171
+ if (packing_patterns [i].is_chain && packing_patterns [i].root_block ->block_id != k) {
172
+ packing_patterns [i].is_block_optional [k] = true ;
174
173
}
175
174
}
176
175
177
176
// if this is a chain pattern (extends between complex blocks), check if there
178
177
// are multiple equivalent chains with different starting and ending points
179
- if (list_of_packing_patterns [i].is_chain ) {
180
- find_all_equivalent_chains (&list_of_packing_patterns [i], type.pb_graph_head );
181
- print_chain_starting_points (&list_of_packing_patterns [i]);
178
+ if (packing_patterns [i].is_chain ) {
179
+ find_all_equivalent_chains (&packing_patterns [i], type.pb_graph_head );
180
+ print_chain_starting_points (&packing_patterns [i]);
182
181
}
183
182
184
183
// if pack pattern i is found to belong to current block type, go to next pack pattern
@@ -188,12 +187,12 @@ static std::vector<t_pack_patterns> alloc_and_load_pack_patterns(const std::vect
188
187
189
188
// Sanity check, every pattern should have a root block
190
189
for (size_t i = 0 ; i < pattern_names.size (); ++i) {
191
- if (list_of_packing_patterns [i].root_block == nullptr ) {
192
- VPR_FATAL_ERROR (VPR_ERROR_ARCH, " Failed to find root block for pack pattern %s" , list_of_packing_patterns [i].name );
190
+ if (packing_patterns [i].root_block == nullptr ) {
191
+ VPR_FATAL_ERROR (VPR_ERROR_ARCH, " Failed to find root block for pack pattern %s" , packing_patterns [i].name );
193
192
}
194
193
}
195
194
196
- return list_of_packing_patterns ;
195
+ return packing_patterns ;
197
196
}
198
197
199
198
/* *
0 commit comments