@@ -4207,19 +4207,19 @@ static void ProcessBend(pugi::xml_node Node, std::vector<int>& list, std::vector
4207
4207
4208
4208
int tmp_len = 1 ;
4209
4209
int sum_len = 0 ;
4210
- for (size_t i_len = 0 ; i_len < list.size (); i_len++){
4210
+ for (size_t i_len = 0 ; i_len < list.size (); i_len++) {
4211
4211
if (list[i_len] == 0 ) {
4212
4212
tmp_len++;
4213
4213
} else if (list[i_len] != 0 ) {
4214
- VTR_ASSERT (tmp_len < (int ) list.size ()+ 1 );
4214
+ VTR_ASSERT (tmp_len < (int )list.size () + 1 );
4215
4215
part_len.push_back (tmp_len);
4216
4216
sum_len += tmp_len;
4217
4217
tmp_len = 1 ;
4218
4218
}
4219
4219
}
4220
4220
4221
4221
// add the last clip of segment
4222
- if (sum_len < (int ) list.size ()+ 1 )
4222
+ if (sum_len < (int )list.size () + 1 )
4223
4223
part_len.push_back (list.size () + 1 - sum_len);
4224
4224
}
4225
4225
@@ -5108,7 +5108,7 @@ static T* get_type_by_name(std::string_view type_name, std::vector<T>& types) {
5108
5108
// // we decrease the mesh size by 1 when calculating the spacing so that the first and last routers of each row or column are positioned on the mesh boundary
5109
5109
// /*
5110
5110
// * For example:
5111
- // * - If we had a mesh size of 3, then using 3 would result in a spacing that would result in one router positions being placed in either the start of the reigion or end of the region. This is because the distance calculation resulted in having 3 spaces between the ends of the region
5111
+ // * - If we had a mesh size of 3, then using 3 would result in a spacing that would result in one router positions being placed in either the start of the reigion or end of the region. This is because the distance calculation resulted in having 3 spaces between the ends of the region
5112
5112
// *
5113
5113
// * start end
5114
5114
// *** *** *** ***
@@ -5242,11 +5242,11 @@ static T* get_type_by_name(std::string_view type_name, std::vector<T>& types) {
5242
5242
// }
5243
5243
5244
5244
// /* Each router needs a sperate <router> tag in the architecture description
5245
- // * to declare it. The number of declarations for each router in the
5245
+ // * to declare it. The number of declarations for each router in the
5246
5246
// * architecture file is updated here.
5247
5247
// *
5248
5248
// * Additionally, for any given topology, a router can connect to other routers.
5249
- // * THe number of connections for each router is also updated here.
5249
+ // * THe number of connections for each router is also updated here.
5250
5250
// *
5251
5251
// */
5252
5252
// static void update_router_info_in_arch(int router_id, bool router_updated_as_a_connection, std::map<int, std::pair<int, int>>& routers_in_arch_info) {
@@ -5277,7 +5277,7 @@ static T* get_type_by_name(std::string_view type_name, std::vector<T>& types) {
5277
5277
// * Verify each router in the noc by checking whether they satisfy the following conditions:
5278
5278
// * - The router has only one declaration in the arch file
5279
5279
// * - The router has atleast one connection to another router
5280
- // * If any of the conditions above are not met, then an error is thrown.
5280
+ // * If any of the conditions above are not met, then an error is thrown.
5281
5281
// */
5282
5282
// static void verify_noc_topology(std::map<int, std::pair<int, int>>& routers_in_arch_info) {
5283
5283
// for (auto router_info = routers_in_arch_info.begin(); router_info != routers_in_arch_info.end(); router_info++) {
@@ -5310,7 +5310,7 @@ static void ProcessVibArch(pugi::xml_node Parent, std::vector<t_physical_tile_ty
5310
5310
int num_vibs = count_children (Parent, " vib" , loc_data);
5311
5311
arch->vib_infs .reserve (num_vibs);
5312
5312
Node = get_first_child (Parent, " vib" , loc_data);
5313
-
5313
+
5314
5314
for (int i_vib = 0 ; i_vib < num_vibs; i_vib++) {
5315
5315
ProcessVib (Node, PhysicalTileTypes, arch, loc_data);
5316
5316
Node = Node.next_sibling (Node.name ());
@@ -5330,25 +5330,23 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5330
5330
tmp = get_attribute (Vib_node, " name" , loc_data).as_string (nullptr );
5331
5331
if (tmp) {
5332
5332
vib.set_name (tmp);
5333
- }
5334
- else {
5333
+ } else {
5335
5334
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Vib_node),
5336
5335
" No name specified for the vib!\n " );
5337
5336
}
5338
5337
5339
5338
tmp = get_attribute (Vib_node, " pbtype_name" , loc_data).as_string (nullptr );
5340
5339
if (tmp) {
5341
5340
vib.set_pbtype_name (tmp);
5342
- }
5343
- else {
5341
+ } else {
5344
5342
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Vib_node),
5345
5343
" No pbtype_name specified for the vib!\n " );
5346
5344
}
5347
5345
5348
5346
vib.set_seg_group_num (get_attribute (Vib_node, " vib_seg_group" , loc_data).as_int (1 ));
5349
5347
5350
5348
tmp = get_attribute (Vib_node, " arch_vib_switch" , loc_data).as_string (nullptr );
5351
-
5349
+
5352
5350
if (tmp) {
5353
5351
std::string str_tmp;
5354
5352
str_tmp = tmp;
@@ -5359,8 +5357,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5359
5357
// break;
5360
5358
// }
5361
5359
// }
5362
- }
5363
- else {
5360
+ } else {
5364
5361
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Vib_node),
5365
5362
" No switch specified for the vib!\n " );
5366
5363
}
@@ -5375,7 +5372,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5375
5372
t_seg_group seg_group;
5376
5373
5377
5374
tmp = get_attribute (Node, " name" , loc_data).as_string (nullptr );
5378
-
5375
+
5379
5376
if (tmp) {
5380
5377
seg_group.name = tmp;
5381
5378
// for (int i_seg = 0; i_seg < (int)segments.size(); i_seg++) {
@@ -5384,8 +5381,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5384
5381
// break;
5385
5382
// }
5386
5383
// }
5387
- }
5388
- else {
5384
+ } else {
5389
5385
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Node),
5390
5386
" No name specified for the vib seg group!\n " );
5391
5387
}
@@ -5406,8 +5402,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5406
5402
itmp = get_attribute (Node, " track_nums" , loc_data).as_int ();
5407
5403
if (itmp) {
5408
5404
seg_group.track_num = itmp;
5409
- }
5410
- else {
5405
+ } else {
5411
5406
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Node),
5412
5407
" No track_num specified for the vib seg group!\n " );
5413
5408
}
@@ -5428,7 +5423,6 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5428
5423
for (auto first_stage : first_stages) {
5429
5424
vib.push_first_stage (first_stage);
5430
5425
}
5431
-
5432
5426
}
5433
5427
5434
5428
SubElem = get_single_child (Node, " second_stage" , loc_data);
@@ -5439,7 +5433,6 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5439
5433
for (auto second_stage : second_stages) {
5440
5434
vib.push_second_stage (second_stage);
5441
5435
}
5442
-
5443
5436
}
5444
5437
5445
5438
arch->vib_infs .push_back (vib);
@@ -5503,7 +5496,7 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5503
5496
// //VTR_ASSERT(to.from_type == SEGMENT || to.from_type == PB);
5504
5497
// second_stage_mux.to.push_back(to);
5505
5498
// }
5506
-
5499
+
5507
5500
SubElem = get_first_child (Node, " from" , loc_data);
5508
5501
int from_num = count_children (Node, " from" , loc_data);
5509
5502
for (int i_from = 0 ; i_from < from_num; i_from++) {
@@ -5543,7 +5536,7 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5543
5536
// pb_type_name = new char[strlen(Token_char)];
5544
5537
// port_name = new char[strlen(Token_char)];
5545
5538
// parse_pin_name((char*)Token_char, &start_pin_index, &end_pin_index, pb_type_name, port_name);
5546
-
5539
+
5547
5540
// std::vector<int> all_sub_tile_to_tile_pin_indices;
5548
5541
// for (auto& sub_tile : PhysicalTileTypes[i_phy_type].sub_tiles) {
5549
5542
// int sub_tile_capacity = sub_tile.capacity.total();
@@ -5589,14 +5582,14 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5589
5582
// from_inf.phy_pin_index = all_sub_tile_to_tile_pin_indices[i];
5590
5583
// froms.push_back(from_inf);
5591
5584
// }
5592
-
5585
+
5593
5586
// // for (auto& sub_tile : PhysicalTileTypes[i_phy_type].sub_tiles) {
5594
5587
// // //int sub_tile_index = sub_tile.index;
5595
5588
// // int sub_tile_capacity = sub_tile.capacity.total();
5596
5589
5597
5590
// // int i_port = 0;
5598
5591
// // for (; i_port < (int)sub_tile.ports.size(); ++i_port) {
5599
-
5592
+
5600
5593
// // if (!strcmp(sub_tile.ports[i_port].name, port_name)) {
5601
5594
// // if (start_pin_index == end_pin_index && start_pin_index < 0) {
5602
5595
// // start_pin_index = 0;
@@ -5626,7 +5619,7 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5626
5619
// // }
5627
5620
// // }
5628
5621
// // }
5629
-
5622
+
5630
5623
// }
5631
5624
// }
5632
5625
// for (int i_seg_type = 0; i_seg_type < (int)segments.size(); i_seg_type++) {
@@ -5646,12 +5639,12 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5646
5639
// from_inf.seg_index = seg_index;
5647
5640
// froms.push_back(from_inf);
5648
5641
// }
5649
-
5642
+
5650
5643
// break;
5651
5644
// }
5652
5645
// }
5653
5646
// VTR_ASSERT(from_type == PB || from_type == SEGMENT);
5654
-
5647
+
5655
5648
// }
5656
5649
// else {
5657
5650
// std::string msg = vtr::string_fmt("Failed to parse vib mux from information '%s'", Token.c_str());
@@ -5675,9 +5668,8 @@ void parse_pin_name(char* src_string, int* start_pin_index, int* end_pin_index,
5675
5668
/* Format "pb_type_name.port_name" */
5676
5669
*start_pin_index = *end_pin_index = -1 ;
5677
5670
5678
-
5679
5671
strcpy (source_string, src_string);
5680
-
5672
+
5681
5673
for (ichar = 0 ; ichar < (int )(strlen (source_string)); ichar++) {
5682
5674
if (source_string[ichar] == ' .' )
5683
5675
source_string[ichar] = ' ' ;
@@ -5719,7 +5711,7 @@ void parse_pin_name(char* src_string, int* start_pin_index, int* end_pin_index,
5719
5711
" The end_pin_index and start_pin_index can be the same.\n " ,
5720
5712
src_string);
5721
5713
exit (1 );
5722
- }
5714
+ }
5723
5715
}
5724
5716
if (*end_pin_index < 0 || *start_pin_index < 0 ) {
5725
5717
VTR_LOG_ERROR (
@@ -5777,7 +5769,6 @@ static void ProcessVibLayout(pugi::xml_node vib_layout_tag, t_arch* arch, const
5777
5769
5778
5770
arch->vib_grid_layouts .emplace_back (std::move (grid_def));
5779
5771
}
5780
-
5781
5772
}
5782
5773
5783
5774
static t_vib_grid_def ProcessVibGridLayout (vtr::string_internment& strings, pugi::xml_node layout_type_tag, const pugiutil::loc_data& loc_data, t_arch* arch, int & num_of_avail_layer) {
@@ -5792,13 +5783,13 @@ static t_vib_grid_def ProcessVibGridLayout(vtr::string_internment& strings, pugi
5792
5783
grid_def.grid_type = VibGridDefType::VIB_AUTO;
5793
5784
grid_def.name = " auto" ;
5794
5785
5795
- for (size_t i = 0 ;i < arch->grid_layouts .size (); i++) {
5786
+ for (size_t i = 0 ; i < arch->grid_layouts .size (); i++) {
5796
5787
if (arch->grid_layouts [i].name == grid_def.name ) {
5797
5788
grid_def.aspect_ratio = arch->grid_layouts [i].aspect_ratio ;
5798
5789
}
5799
5790
}
5800
5791
// grid_def.aspect_ratio = get_attribute(layout_type_tag, "aspect_ratio", loc_data, ReqOpt::OPTIONAL).as_float(1.);
5801
-
5792
+
5802
5793
} else if (layout_type_tag.name () == std::string (" fixed_layout" )) {
5803
5794
expect_only_attributes (layout_type_tag, {" name" }, loc_data);
5804
5795
0 commit comments