@@ -416,7 +416,7 @@ static void ProcessVib(pugi::xml_node Vib_node, std::vector<t_physical_tile_type
416
416
static void ProcessFirstStage (pugi::xml_node Stage_node, std::vector<t_physical_tile_type>& PhysicalTileTypes, std::vector<t_first_stage_mux_inf>& first_stages, const pugiutil::loc_data& loc_data);
417
417
static void ProcessSecondStage (pugi::xml_node Stage_node, std::vector<t_physical_tile_type>& PhysicalTileTypes, std::vector<t_second_stage_mux_inf>& second_stages, const pugiutil::loc_data& loc_data);
418
418
// static void ProcessFromOrToTokens(const std::vector<std::string> Tokens, std::vector<t_physical_tile_type>& PhysicalTileTypes, std::vector<t_from_or_to_inf>& froms);
419
- void parse_pin_name (char * src_string, int * start_pin_index, int * end_pin_index, char * pb_type_name, char * port_name);
419
+ // static void parse_pin_name(char* src_string, int* start_pin_index, int* end_pin_index, char* pb_type_name, char* port_name);
420
420
421
421
/*
422
422
*
@@ -5671,81 +5671,81 @@ static void ProcessSecondStage(pugi::xml_node Stage_node, std::vector<t_physical
5671
5671
// }
5672
5672
// }
5673
5673
5674
- void parse_pin_name (char * src_string, int * start_pin_index, int * end_pin_index, char * pb_type_name, char * port_name) {
5675
- /* Parses out the pb_type_name and port_name *
5676
- * If the start_pin_index and end_pin_index is specified, parse them too. *
5677
- * Return the values parsed by reference. */
5674
+ // void parse_pin_name(char* src_string, int* start_pin_index, int* end_pin_index, char* pb_type_name, char* port_name) {
5675
+ // /* Parses out the pb_type_name and port_name *
5676
+ // * If the start_pin_index and end_pin_index is specified, parse them too. *
5677
+ // * Return the values parsed by reference. */
5678
5678
5679
- char * source_string = nullptr ;
5680
- char * find_format = nullptr ;
5681
- int ichar, match_count;
5679
+ // char* source_string = nullptr;
5680
+ // char* find_format = nullptr;
5681
+ // int ichar, match_count;
5682
5682
5683
- // parse out the pb_type and port name, possibly pin_indices
5684
- find_format = strstr (src_string, " [" );
5685
- if (find_format == nullptr ) {
5686
- /* Format "pb_type_name.port_name" */
5687
- *start_pin_index = *end_pin_index = -1 ;
5683
+ // // parse out the pb_type and port name, possibly pin_indices
5684
+ // find_format = strstr(src_string, "[");
5685
+ // if (find_format == nullptr) {
5686
+ // /* Format "pb_type_name.port_name" */
5687
+ // *start_pin_index = *end_pin_index = -1;
5688
5688
5689
- strcpy (source_string, src_string);
5689
+ // strcpy(source_string, src_string);
5690
5690
5691
- for (ichar = 0 ; ichar < (int )(strlen (source_string)); ichar++) {
5692
- if (source_string[ichar] == ' .' )
5693
- source_string[ichar] = ' ' ;
5694
- }
5691
+ // for (ichar = 0; ichar < (int)(strlen(source_string)); ichar++) {
5692
+ // if (source_string[ichar] == '.')
5693
+ // source_string[ichar] = ' ';
5694
+ // }
5695
5695
5696
- match_count = sscanf (source_string, " %s %s" , pb_type_name, port_name);
5697
- if (match_count != 2 ) {
5698
- VTR_LOG_ERROR (
5699
- " Invalid pin - %s, name should be in the format "
5700
- " \" pb_type_name\" .\" port_name\" or \" pb_type_name\" .\" port_name[end_pin_index:start_pin_index]\" . "
5701
- " The end_pin_index and start_pin_index can be the same.\n " ,
5702
- src_string);
5703
- exit (1 );
5704
- }
5705
- } else {
5706
- /* Format "pb_type_name.port_name[end_pin_index:start_pin_index]" */
5707
- strcpy (source_string, src_string);
5708
- for (ichar = 0 ; ichar < (int )(strlen (source_string)); ichar++) {
5709
- // Need white space between the components when using %s with
5710
- // sscanf
5711
- if (source_string[ichar] == ' .' )
5712
- source_string[ichar] = ' ' ;
5713
- if (source_string[ichar] == ' [' )
5714
- source_string[ichar] = ' ' ;
5715
- }
5716
-
5717
- match_count = sscanf (source_string, " %s %s %d:%d]" ,
5718
- pb_type_name, port_name,
5719
- end_pin_index, start_pin_index);
5720
- if (match_count != 4 ) {
5721
- match_count = sscanf (source_string, " %s %s %d]" ,
5722
- pb_type_name, port_name,
5723
- end_pin_index);
5724
- *start_pin_index = *end_pin_index;
5725
- if (match_count != 3 ) {
5726
- VTR_LOG_ERROR (
5727
- " Invalid pin - %s, name should be in the format "
5728
- " \" pb_type_name\" .\" port_name\" or \" pb_type_name\" .\" port_name[end_pin_index:start_pin_index]\" . "
5729
- " The end_pin_index and start_pin_index can be the same.\n " ,
5730
- src_string);
5731
- exit (1 );
5732
- }
5733
- }
5734
- if (*end_pin_index < 0 || *start_pin_index < 0 ) {
5735
- VTR_LOG_ERROR (
5736
- " Invalid pin - %s, the pin_index in "
5737
- " [end_pin_index:start_pin_index] should not be a negative value.\n " ,
5738
- src_string);
5739
- exit (1 );
5740
- }
5741
- if (*end_pin_index < *start_pin_index) {
5742
- int temp;
5743
- temp = *end_pin_index;
5744
- *end_pin_index = *start_pin_index;
5745
- *start_pin_index = temp;
5746
- }
5747
- }
5748
- }
5696
+ // match_count = sscanf(source_string, "%s %s", pb_type_name, port_name);
5697
+ // if (match_count != 2) {
5698
+ // VTR_LOG_ERROR(
5699
+ // "Invalid pin - %s, name should be in the format "
5700
+ // "\"pb_type_name\".\"port_name\" or \"pb_type_name\".\"port_name[end_pin_index:start_pin_index]\". "
5701
+ // "The end_pin_index and start_pin_index can be the same.\n",
5702
+ // src_string);
5703
+ // exit(1);
5704
+ // }
5705
+ // } else {
5706
+ // /* Format "pb_type_name.port_name[end_pin_index:start_pin_index]" */
5707
+ // strcpy(source_string, src_string);
5708
+ // for (ichar = 0; ichar < (int)(strlen(source_string)); ichar++) {
5709
+ // //Need white space between the components when using %s with
5710
+ // //sscanf
5711
+ // if (source_string[ichar] == '.')
5712
+ // source_string[ichar] = ' ';
5713
+ // if (source_string[ichar] == '[')
5714
+ // source_string[ichar] = ' ';
5715
+ // }
5716
+
5717
+ // match_count = sscanf(source_string, "%s %s %d:%d]",
5718
+ // pb_type_name, port_name,
5719
+ // end_pin_index, start_pin_index);
5720
+ // if (match_count != 4) {
5721
+ // match_count = sscanf(source_string, "%s %s %d]",
5722
+ // pb_type_name, port_name,
5723
+ // end_pin_index);
5724
+ // *start_pin_index = *end_pin_index;
5725
+ // if (match_count != 3) {
5726
+ // VTR_LOG_ERROR(
5727
+ // "Invalid pin - %s, name should be in the format "
5728
+ // "\"pb_type_name\".\"port_name\" or \"pb_type_name\".\"port_name[end_pin_index:start_pin_index]\". "
5729
+ // "The end_pin_index and start_pin_index can be the same.\n",
5730
+ // src_string);
5731
+ // exit(1);
5732
+ // }
5733
+ // }
5734
+ // if (*end_pin_index < 0 || *start_pin_index < 0) {
5735
+ // VTR_LOG_ERROR(
5736
+ // "Invalid pin - %s, the pin_index in "
5737
+ // "[end_pin_index:start_pin_index] should not be a negative value.\n",
5738
+ // src_string);
5739
+ // exit(1);
5740
+ // }
5741
+ // if (*end_pin_index < *start_pin_index) {
5742
+ // int temp;
5743
+ // temp = *end_pin_index;
5744
+ // *end_pin_index = *start_pin_index;
5745
+ // *start_pin_index = temp;
5746
+ // }
5747
+ // }
5748
+ // }
5749
5749
5750
5750
/* Process vib layout */
5751
5751
static void ProcessVibLayout (pugi::xml_node vib_layout_tag, t_arch* arch, const pugiutil::loc_data& loc_data) {
0 commit comments