Skip to content

Commit 1063d31

Browse files
committed
fix compile errors
1 parent f0c0ba1 commit 1063d31

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ static std::pair<int, int> process_instance_string(pugi::xml_node Locations,
765765
const pugiutil::loc_data& loc_data) {
766766
Tokens tokens(pin_loc_string);
767767

768-
int token_index = 0;
768+
size_t token_index = 0;
769769
t_token token = tokens[token_index];
770770

771771
if (token.type != e_token_type::STRING || std::string(token.data) != sub_tile.name) {
@@ -858,14 +858,14 @@ static std::pair<int, int> process_pin_string(pugi::xml_node Locations,
858858
}
859859

860860
token_index++;
861-
token = tokens[token_index];
861+
t_token token = tokens[token_index];
862862

863863
// If the string contains index for capacity range, e.g., io[3:3].in[0:5], we skip the capacity range here.
864-
if (token.type == TOKEN_OPEN_SQUARE_BRACKET) {
865-
while (token.type != TOKEN_CLOSE_SQUARE_BRACKET) {
864+
if (token.type == e_token_type::OPEN_SQUARE_BRACKET) {
865+
while (token.type != e_token_type::CLOSE_SQUARE_BRACKET) {
866866
token_index++;
867867
token = tokens[token_index];
868-
if (token_index == num_tokens) {
868+
if (token_index == tokens.size()) {
869869
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
870870
vtr::string_fmt("Found an open '[' but miss close ']' of the port: %s\n", pin_loc_string).c_str());
871871
}
@@ -874,15 +874,15 @@ static std::pair<int, int> process_pin_string(pugi::xml_node Locations,
874874
token = tokens[token_index];
875875
}
876876

877-
if (token.type != TOKEN_DOT) {
877+
if (token.type != e_token_type::DOT) {
878878
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
879879
vtr::string_fmt("No dot is present to separate type name and port name: %s\n", pin_loc_string).c_str());
880880
}
881881

882882
token_index++;
883883
token = tokens[token_index];
884884

885-
if (token.type != TOKEN_STRING) {
885+
if (token.type != e_token_type::STRING) {
886886
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
887887
vtr::string_fmt("No port name is present: %s\n", pin_loc_string).c_str());
888888
}
@@ -900,22 +900,21 @@ static std::pair<int, int> process_pin_string(pugi::xml_node Locations,
900900
token_index++;
901901

902902
// All the pins of the port are taken or the port has a single pin
903-
if (token_index == num_tokens) {
904-
free_tokens(tokens, num_tokens);
903+
if (token_index == tokens.size()) {
905904
return std::make_pair(abs_first_pin_idx, abs_first_pin_idx + port->num_pins);
906905
}
907906

908907
token = tokens[token_index];
909908

910-
if (token.type != TOKEN_OPEN_SQUARE_BRACKET) {
909+
if (token.type != e_token_type::OPEN_SQUARE_BRACKET) {
911910
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
912911
vtr::string_fmt("No open square bracket present: %s\n", pin_loc_string).c_str());
913912
}
914913

915914
token_index++;
916915
token = tokens[token_index];
917916

918-
if (token.type != TOKEN_INT) {
917+
if (token.type != e_token_type::INT) {
919918
archfpga_throw(loc_data.filename_c_str(), loc_data.line(Locations),
920919
vtr::string_fmt("No integer to indicate least significant pin index: %s\n", pin_loc_string).c_str());
921920
}

vpr/src/pack/pb_type_graph.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,6 @@ t_pb_graph_pin*** alloc_and_load_port_pin_ptrs_from_string(const int line_num,
10361036
}
10371037
}
10381038
VTR_ASSERT(curr_set == *num_sets);
1039-
10401039
return pb_graph_pins;
10411040
}
10421041

@@ -1045,6 +1044,10 @@ t_pb_graph_pin*** alloc_and_load_port_pin_ptrs_from_string(const int line_num,
10451044
*/
10461045
static void alloc_and_load_complete_interc_edges(t_interconnect* interconnect,
10471046
t_pb_graph_pin*** input_pb_graph_node_pin_ptrs,
1047+
const int num_input_sets,
1048+
const int* num_input_ptrs,
1049+
t_pb_graph_pin*** output_pb_graph_node_pin_ptrs,
1050+
const int num_output_sets,
10481051
const int* num_output_ptrs) {
10491052
int i_inset, i_outset, i_inpin, i_outpin;
10501053
int in_count, out_count;

0 commit comments

Comments
 (0)