Skip to content

Commit cf3850a

Browse files
Fix set_switch_func_type bug
1 parent 827e72b commit cf3850a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

libs/libarchfpga/src/parse_switchblocks.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,21 +178,25 @@ static t_wireconn_inf parse_wireconn_inline(pugi::xml_node node,
178178
if (!can_skip_from_to) {
179179
parse_comma_separated_wire_types(char_prop, wc.from_switchpoint_set);
180180
}
181+
181182
// get to type
182183
char_prop = get_attribute(node, "to_type", loc_data, from_to_required).value();
183184
if (!can_skip_from_to) {
184185
parse_comma_separated_wire_types(char_prop, wc.to_switchpoint_set);
185186
}
187+
186188
// get the source wire point
187189
char_prop = get_attribute(node, "from_switchpoint", loc_data, from_to_required).value();
188190
if (!can_skip_from_to) {
189191
parse_comma_separated_wire_points(char_prop, wc.from_switchpoint_set);
190192
}
193+
191194
// get the destination wire point
192195
char_prop = get_attribute(node, "to_switchpoint", loc_data, from_to_required).value();
193196
if (!can_skip_from_to) {
194197
parse_comma_separated_wire_points(char_prop, wc.to_switchpoint_set);
195198
}
199+
196200
char_prop = get_attribute(node, "from_order", loc_data, ReqOpt::OPTIONAL).value();
197201
parse_switchpoint_order(char_prop, wc.from_switchpoint_order);
198202

@@ -330,8 +334,9 @@ static void set_switch_func_type(SBSideConnection& conn, const char* func_type)
330334
if (std::string(func_type).find_first_not_of("rtlbauRTLBAU") != std::string::npos) {
331335
archfpga_throw(__FILE__, __LINE__, "Unknown direction specified: %s\n", func_type);
332336
}
333-
e_side to_side = CHAR_SIDE_MAP.at(func_type[0]);
334-
e_side from_side = CHAR_SIDE_MAP.at(func_type[1]);
337+
338+
e_side from_side = CHAR_SIDE_MAP.at(func_type[0]);
339+
e_side to_side = CHAR_SIDE_MAP.at(func_type[1]);
335340

336341
// Can't go from side to same side
337342
if (to_side == from_side) {

0 commit comments

Comments
 (0)