@@ -316,7 +316,6 @@ static void ProcessVibBlockTypeLocs(t_vib_grid_def& grid_def,
316
316
pugi::xml_node layout_block_type_tag,
317
317
const pugiutil::loc_data& loc_data);
318
318
319
-
320
319
static t_grid_def ProcessGridLayout (vtr::string_internment& strings, pugi::xml_node layout_type_tag, const pugiutil::loc_data& loc_data, t_arch* arch, int & num_of_avail_layer);
321
320
static void ProcessBlockTypeLocs (t_grid_def& grid_def, int die_number, vtr::string_internment& strings, pugi::xml_node layout_block_type_tag, const pugiutil::loc_data& loc_data);
322
321
@@ -4193,23 +4192,23 @@ static void ProcessBend(pugi::xml_node Node, std::vector<int>& list, std::vector
4193
4192
4194
4193
int tmp_len = 1 ;
4195
4194
int sum_len = 0 ;
4196
- for (size_t i_len = 0 ; i_len < list.size (); i_len++){
4195
+ for (size_t i_len = 0 ; i_len < list.size (); i_len++) {
4197
4196
if (list[i_len] == 0 ) {
4198
4197
tmp_len++;
4199
4198
} else if (list[i_len] != 0 ) {
4200
- VTR_ASSERT (tmp_len < (int ) list.size ()+ 1 );
4199
+ VTR_ASSERT (tmp_len < (int )list.size () + 1 );
4201
4200
part_len.push_back (tmp_len);
4202
4201
sum_len += tmp_len;
4203
4202
tmp_len = 1 ;
4204
4203
}
4205
4204
}
4206
4205
4207
4206
// add the last clip of segment
4208
- if (sum_len < (int ) list.size ()+ 1 )
4207
+ if (sum_len < (int )list.size () + 1 )
4209
4208
part_len.push_back (list.size () + 1 - sum_len);
4210
4209
}
4211
4210
4212
- static void calculate_custom_SB_locations (const pugiutil::loc_data& loc_data, const pugi::xml_node& SubElem, const int grid_width, const int grid_height, t_switchblock_inf& sb){
4211
+ static void calculate_custom_SB_locations (const pugiutil::loc_data& loc_data, const pugi::xml_node& SubElem, const int grid_width, const int grid_height, t_switchblock_inf& sb) {
4213
4212
auto startx_attr = get_attribute (SubElem, " startx" , loc_data, ReqOpt::OPTIONAL);
4214
4213
auto endx_attr = get_attribute (SubElem, " endx" , loc_data, ReqOpt::OPTIONAL);
4215
4214
@@ -5127,7 +5126,7 @@ static T* get_type_by_name(std::string_view type_name, std::vector<T>& types) {
5127
5126
// // 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
5128
5127
// /*
5129
5128
// * For example:
5130
- // * - 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
5129
+ // * - 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
5131
5130
// *
5132
5131
// * start end
5133
5132
// *** *** *** ***
@@ -5261,11 +5260,11 @@ static T* get_type_by_name(std::string_view type_name, std::vector<T>& types) {
5261
5260
// }
5262
5261
5263
5262
// /* Each router needs a sperate <router> tag in the architecture description
5264
- // * to declare it. The number of declarations for each router in the
5263
+ // * to declare it. The number of declarations for each router in the
5265
5264
// * architecture file is updated here.
5266
5265
// *
5267
5266
// * Additionally, for any given topology, a router can connect to other routers.
5268
- // * THe number of connections for each router is also updated here.
5267
+ // * THe number of connections for each router is also updated here.
5269
5268
// *
5270
5269
// */
5271
5270
// 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) {
@@ -5296,7 +5295,7 @@ static T* get_type_by_name(std::string_view type_name, std::vector<T>& types) {
5296
5295
// * Verify each router in the noc by checking whether they satisfy the following conditions:
5297
5296
// * - The router has only one declaration in the arch file
5298
5297
// * - The router has atleast one connection to another router
5299
- // * If any of the conditions above are not met, then an error is thrown.
5298
+ // * If any of the conditions above are not met, then an error is thrown.
5300
5299
// */
5301
5300
// static void verify_noc_topology(std::map<int, std::pair<int, int>>& routers_in_arch_info) {
5302
5301
// for (auto router_info = routers_in_arch_info.begin(); router_info != routers_in_arch_info.end(); router_info++) {
@@ -5329,7 +5328,7 @@ static void ProcessVibArch(pugi::xml_node Parent, std::vector<t_physical_tile_ty
5329
5328
int num_vibs = count_children (Parent, " vib" , loc_data);
5330
5329
arch->vib_infs .reserve (num_vibs);
5331
5330
Node = get_first_child (Parent, " vib" , loc_data);
5332
-
5331
+
5333
5332
for (int i_vib = 0 ; i_vib < num_vibs; i_vib++) {
5334
5333
ProcessVib (Node, PhysicalTileTypes, arch, loc_data);
5335
5334
Node = Node.next_sibling (Node.name ());
@@ -5349,25 +5348,23 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5349
5348
tmp = get_attribute (Vib_node, " name" , loc_data).as_string (nullptr );
5350
5349
if (tmp) {
5351
5350
vib.set_name (tmp);
5352
- }
5353
- else {
5351
+ } else {
5354
5352
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Vib_node),
5355
5353
" No name specified for the vib!\n " );
5356
5354
}
5357
5355
5358
5356
tmp = get_attribute (Vib_node, " pbtype_name" , loc_data).as_string (nullptr );
5359
5357
if (tmp) {
5360
5358
vib.set_pbtype_name (tmp);
5361
- }
5362
- else {
5359
+ } else {
5363
5360
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Vib_node),
5364
5361
" No pbtype_name specified for the vib!\n " );
5365
5362
}
5366
5363
5367
5364
vib.set_seg_group_num (get_attribute (Vib_node, " vib_seg_group" , loc_data).as_int (1 ));
5368
5365
5369
5366
tmp = get_attribute (Vib_node, " arch_vib_switch" , loc_data).as_string (nullptr );
5370
-
5367
+
5371
5368
if (tmp) {
5372
5369
std::string str_tmp;
5373
5370
str_tmp = tmp;
@@ -5378,8 +5375,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5378
5375
// break;
5379
5376
// }
5380
5377
// }
5381
- }
5382
- else {
5378
+ } else {
5383
5379
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Vib_node),
5384
5380
" No switch specified for the vib!\n " );
5385
5381
}
@@ -5394,7 +5390,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5394
5390
t_seg_group seg_group;
5395
5391
5396
5392
tmp = get_attribute (Node, " name" , loc_data).as_string (nullptr );
5397
-
5393
+
5398
5394
if (tmp) {
5399
5395
seg_group.name = tmp;
5400
5396
// for (int i_seg = 0; i_seg < (int)segments.size(); i_seg++) {
@@ -5403,8 +5399,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5403
5399
// break;
5404
5400
// }
5405
5401
// }
5406
- }
5407
- else {
5402
+ } else {
5408
5403
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Node),
5409
5404
" No name specified for the vib seg group!\n " );
5410
5405
}
@@ -5425,8 +5420,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5425
5420
itmp = get_attribute (Node, " track_nums" , loc_data).as_int ();
5426
5421
if (itmp) {
5427
5422
seg_group.track_num = itmp;
5428
- }
5429
- else {
5423
+ } else {
5430
5424
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Node),
5431
5425
" No track_num specified for the vib seg group!\n " );
5432
5426
}
@@ -5447,7 +5441,6 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5447
5441
for (auto first_stage : first_stages) {
5448
5442
vib.push_first_stage (first_stage);
5449
5443
}
5450
-
5451
5444
}
5452
5445
5453
5446
SubElem = get_single_child (Node, " second_stage" , loc_data);
@@ -5458,7 +5451,6 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
5458
5451
for (auto second_stage : second_stages) {
5459
5452
vib.push_second_stage (second_stage);
5460
5453
}
5461
-
5462
5454
}
5463
5455
5464
5456
arch->vib_infs .push_back (vib);
@@ -5522,7 +5514,7 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5522
5514
// //VTR_ASSERT(to.from_type == SEGMENT || to.from_type == PB);
5523
5515
// second_stage_mux.to.push_back(to);
5524
5516
// }
5525
-
5517
+
5526
5518
SubElem = get_first_child (Node, " from" , loc_data);
5527
5519
int from_num = count_children (Node, " from" , loc_data);
5528
5520
for (int i_from = 0 ; i_from < from_num; i_from++) {
@@ -5562,7 +5554,7 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5562
5554
// pb_type_name = new char[strlen(Token_char)];
5563
5555
// port_name = new char[strlen(Token_char)];
5564
5556
// parse_pin_name((char*)Token_char, &start_pin_index, &end_pin_index, pb_type_name, port_name);
5565
-
5557
+
5566
5558
// std::vector<int> all_sub_tile_to_tile_pin_indices;
5567
5559
// for (auto& sub_tile : PhysicalTileTypes[i_phy_type].sub_tiles) {
5568
5560
// int sub_tile_capacity = sub_tile.capacity.total();
@@ -5608,14 +5600,14 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5608
5600
// from_inf.phy_pin_index = all_sub_tile_to_tile_pin_indices[i];
5609
5601
// froms.push_back(from_inf);
5610
5602
// }
5611
-
5603
+
5612
5604
// // for (auto& sub_tile : PhysicalTileTypes[i_phy_type].sub_tiles) {
5613
5605
// // //int sub_tile_index = sub_tile.index;
5614
5606
// // int sub_tile_capacity = sub_tile.capacity.total();
5615
5607
5616
5608
// // int i_port = 0;
5617
5609
// // for (; i_port < (int)sub_tile.ports.size(); ++i_port) {
5618
-
5610
+
5619
5611
// // if (!strcmp(sub_tile.ports[i_port].name, port_name)) {
5620
5612
// // if (start_pin_index == end_pin_index && start_pin_index < 0) {
5621
5613
// // start_pin_index = 0;
@@ -5645,7 +5637,7 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5645
5637
// // }
5646
5638
// // }
5647
5639
// // }
5648
-
5640
+
5649
5641
// }
5650
5642
// }
5651
5643
// for (int i_seg_type = 0; i_seg_type < (int)segments.size(); i_seg_type++) {
@@ -5665,12 +5657,12 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5665
5657
// from_inf.seg_index = seg_index;
5666
5658
// froms.push_back(from_inf);
5667
5659
// }
5668
-
5660
+
5669
5661
// break;
5670
5662
// }
5671
5663
// }
5672
5664
// VTR_ASSERT(from_type == PB || from_type == SEGMENT);
5673
-
5665
+
5674
5666
// }
5675
5667
// else {
5676
5668
// std::string msg = vtr::string_fmt("Failed to parse vib mux from information '%s'", Token.c_str());
@@ -5694,9 +5686,8 @@ void parse_pin_name(char* src_string, int* start_pin_index, int* end_pin_index,
5694
5686
/* Format "pb_type_name.port_name" */
5695
5687
*start_pin_index = *end_pin_index = -1 ;
5696
5688
5697
-
5698
5689
strcpy (source_string, src_string);
5699
-
5690
+
5700
5691
for (ichar = 0 ; ichar < (int )(strlen (source_string)); ichar++) {
5701
5692
if (source_string[ichar] == ' .' )
5702
5693
source_string[ichar] = ' ' ;
@@ -5738,7 +5729,7 @@ void parse_pin_name(char* src_string, int* start_pin_index, int* end_pin_index,
5738
5729
" The end_pin_index and start_pin_index can be the same.\n " ,
5739
5730
src_string);
5740
5731
exit (1 );
5741
- }
5732
+ }
5742
5733
}
5743
5734
if (*end_pin_index < 0 || *start_pin_index < 0 ) {
5744
5735
VTR_LOG_ERROR (
@@ -5796,7 +5787,6 @@ static void ProcessVibLayout(pugi::xml_node vib_layout_tag, t_arch* arch, const
5796
5787
5797
5788
arch->vib_grid_layouts .emplace_back (std::move (grid_def));
5798
5789
}
5799
-
5800
5790
}
5801
5791
5802
5792
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) {
@@ -5811,13 +5801,13 @@ static t_vib_grid_def ProcessVibGridLayout(vtr::string_internment& strings, pugi
5811
5801
grid_def.grid_type = VibGridDefType::VIB_AUTO;
5812
5802
grid_def.name = " auto" ;
5813
5803
5814
- for (size_t i = 0 ;i < arch->grid_layouts .size (); i++) {
5804
+ for (size_t i = 0 ; i < arch->grid_layouts .size (); i++) {
5815
5805
if (arch->grid_layouts [i].name == grid_def.name ) {
5816
5806
grid_def.aspect_ratio = arch->grid_layouts [i].aspect_ratio ;
5817
5807
}
5818
5808
}
5819
5809
// grid_def.aspect_ratio = get_attribute(layout_type_tag, "aspect_ratio", loc_data, ReqOpt::OPTIONAL).as_float(1.);
5820
-
5810
+
5821
5811
} else if (layout_type_tag.name () == std::string (" fixed_layout" )) {
5822
5812
expect_only_attributes (layout_type_tag, {" name" }, loc_data);
5823
5813
@@ -6111,4 +6101,3 @@ static void ProcessVibBlockTypeLocs(t_vib_grid_def& grid_def,
6111
6101
}
6112
6102
}
6113
6103
}
6114
-
0 commit comments