Skip to content

Commit 561a0d5

Browse files
committed
make format
1 parent 4194e81 commit 561a0d5

File tree

12 files changed

+81
-80
lines changed

12 files changed

+81
-80
lines changed

libs/libarchfpga/src/arch_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ void ProcessMemoryClass(t_pb_type* mem_pb_type) {
700700
mem_pb_type->model_id = LogicalModelId::INVALID();
701701

702702
mem_pb_type->modes[0].num_interconnect = mem_pb_type->num_ports * num_pb;
703-
703+
704704
std::stringstream ss;
705705
ss << "Memory pb_type " << mem_pb_type->name << " has no interconnect";
706706
VTR_ASSERT_MSG(mem_pb_type->modes[0].num_interconnect > 0, ss.str().c_str());

libs/libarchfpga/src/physical_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,11 +2303,11 @@ struct t_arch {
23032303
/// Remove all the routing wires in empty regions
23042304
bool shrink_boundary;
23052305

2306-
/// Allow routing channels to pass through multi-width and
2306+
/// Allow routing channels to pass through multi-width and
23072307
/// multi-height programable blocks
23082308
bool through_channel;
23092309

2310-
/// Allow each output pin of a programmable block to drive the
2310+
/// Allow each output pin of a programmable block to drive the
23112311
/// routing tracks on all the sides of its adjacent switch block
23122312
bool opin2all_sides;
23132313

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5421,11 +5421,13 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
54215421
struct CoordParams {
54225422
std::string x_start, x_end, y_start, y_end;
54235423
std::string x_repeat = "", x_incr = "", y_repeat = "", y_incr = "";
5424-
5425-
CoordParams(const std::string& xs, const std::string& xe,
5426-
const std::string& ys, const std::string& ye)
5427-
: x_start(xs), x_end(xe), y_start(ys), y_end(ye) {}
5428-
5424+
5425+
CoordParams(const std::string& xs, const std::string& xe, const std::string& ys, const std::string& ye)
5426+
: x_start(xs)
5427+
, x_end(xe)
5428+
, y_start(ys)
5429+
, y_end(ye) {}
5430+
54295431
CoordParams() = default;
54305432
};
54315433

@@ -5442,12 +5444,12 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
54425444
expect_only_attributes(loc_spec_tag, {"type", "priority"}, loc_data);
54435445

54445446
const std::vector<CoordParams> perimeter_edges = {
5445-
{"0", "0", "0", "H - 1"}, // left (including corners)
5446-
{"W - 1", "W - 1", "0", "H - 1"}, // right (including corners)
5447-
{"1", "W - 2", "0", "0"}, // bottom (excluding corners)
5448-
{"1", "W - 2", "H - 1", "H - 1"} // top (excluding corners)
5447+
{"0", "0", "0", "H - 1"}, // left (including corners)
5448+
{"W - 1", "W - 1", "0", "H - 1"}, // right (including corners)
5449+
{"1", "W - 2", "0", "0"}, // bottom (excluding corners)
5450+
{"1", "W - 2", "H - 1", "H - 1"} // top (excluding corners)
54495451
};
5450-
5452+
54515453
for (const auto& edge : perimeter_edges) {
54525454
t_vib_grid_loc_def edge_def(type_name, priority);
54535455
edge_def.x.start_expr = edge.x_start;
@@ -5460,12 +5462,12 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
54605462
expect_only_attributes(loc_spec_tag, {"type", "priority"}, loc_data);
54615463

54625464
const std::vector<CoordParams> corner_positions = {
5463-
{"0", "0", "0", "0"}, // bottom_left
5464-
{"0", "0", "H-1", "H-1"}, // top_left
5465-
{"W-1", "W-1", "0", "0"}, // bottom_right
5466-
{"W-1", "W-1", "H-1", "H-1"} // top_right
5465+
{"0", "0", "0", "0"}, // bottom_left
5466+
{"0", "0", "H-1", "H-1"}, // top_left
5467+
{"W-1", "W-1", "0", "0"}, // bottom_right
5468+
{"W-1", "W-1", "H-1", "H-1"} // top_right
54675469
};
5468-
5470+
54695471
for (const auto& corner : corner_positions) {
54705472
t_vib_grid_loc_def corner_def(type_name, priority);
54715473
corner_def.x.start_expr = corner.x_start;
@@ -5488,7 +5490,7 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
54885490

54895491
const std::string x_pos = get_attribute(loc_spec_tag, "x", loc_data).value();
54905492
const std::string y_pos = get_attribute(loc_spec_tag, "y", loc_data).value();
5491-
5493+
54925494
t_vib_grid_loc_def single_def(type_name, priority);
54935495
single_def.x.start_expr = x_pos;
54945496
single_def.x.end_expr = x_pos + " + w - 1";
@@ -5499,54 +5501,54 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
54995501
expect_only_attributes(loc_spec_tag, {"type", "priority", "startx", "repeatx", "starty", "incry"}, loc_data);
55005502

55015503
const std::string start_x = get_attribute(loc_spec_tag, "startx", loc_data).value();
5502-
5504+
55035505
t_vib_grid_loc_def col_def(type_name, priority);
55045506
col_def.x.start_expr = start_x;
55055507
col_def.x.end_expr = start_x + " + w - 1";
5506-
5508+
55075509
// Handle optional attributes
55085510
auto repeat_attr = get_attribute(loc_spec_tag, "repeatx", loc_data, ReqOpt::OPTIONAL);
55095511
if (repeat_attr) {
55105512
col_def.x.repeat_expr = repeat_attr.value();
55115513
}
5512-
5514+
55135515
auto start_y_attr = get_attribute(loc_spec_tag, "starty", loc_data, ReqOpt::OPTIONAL);
55145516
if (start_y_attr) {
55155517
col_def.y.start_expr = start_y_attr.value();
55165518
}
5517-
5519+
55185520
auto incr_y_attr = get_attribute(loc_spec_tag, "incry", loc_data, ReqOpt::OPTIONAL);
55195521
if (incr_y_attr) {
55205522
col_def.y.incr_expr = incr_y_attr.value();
55215523
}
5522-
5524+
55235525
loc_defs.push_back(std::move(col_def));
55245526

55255527
} else if (loc_type == std::string("row")) {
55265528
expect_only_attributes(loc_spec_tag, {"type", "priority", "starty", "repeaty", "startx", "incrx"}, loc_data);
55275529

55285530
const std::string start_y = get_attribute(loc_spec_tag, "starty", loc_data).value();
5529-
5531+
55305532
t_vib_grid_loc_def row_def(type_name, priority);
55315533
row_def.y.start_expr = start_y;
55325534
row_def.y.end_expr = start_y + " + h - 1";
5533-
5535+
55345536
// Handle optional attributes
55355537
auto repeat_attr = get_attribute(loc_spec_tag, "repeaty", loc_data, ReqOpt::OPTIONAL);
55365538
if (repeat_attr) {
55375539
row_def.y.repeat_expr = repeat_attr.value();
55385540
}
5539-
5541+
55405542
auto start_x_attr = get_attribute(loc_spec_tag, "startx", loc_data, ReqOpt::OPTIONAL);
55415543
if (start_x_attr) {
55425544
row_def.x.start_expr = start_x_attr.value();
55435545
}
5544-
5546+
55455547
auto incr_x_attr = get_attribute(loc_spec_tag, "incrx", loc_data, ReqOpt::OPTIONAL);
55465548
if (incr_x_attr) {
55475549
row_def.x.incr_expr = incr_x_attr.value();
55485550
}
5549-
5551+
55505552
loc_defs.push_back(std::move(row_def));
55515553
} else if (loc_type == std::string("region")) {
55525554
expect_only_attributes(loc_spec_tag,
@@ -5555,15 +5557,15 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
55555557
"starty", "endy", "repeaty", "incry"},
55565558
loc_data);
55575559
t_vib_grid_loc_def region_def(type_name, priority);
5558-
5560+
55595561
// Helper lambda to set optional attribute
55605562
auto set_optional_attr = [&](const char* attr_name, std::string& target) {
55615563
auto attr = get_attribute(loc_spec_tag, attr_name, loc_data, ReqOpt::OPTIONAL);
55625564
if (attr) {
55635565
target = attr.value();
55645566
}
55655567
};
5566-
5568+
55675569
// Set all optional region attributes
55685570
set_optional_attr("startx", region_def.x.start_expr);
55695571
set_optional_attr("endx", region_def.x.end_expr);
@@ -5573,7 +5575,7 @@ static void process_vib_block_type_locs(t_vib_grid_def& grid_def,
55735575
set_optional_attr("endy", region_def.y.end_expr);
55745576
set_optional_attr("repeaty", region_def.y.repeat_expr);
55755577
set_optional_attr("incry", region_def.y.incr_expr);
5576-
5578+
55775579
loc_defs.push_back(std::move(region_def));
55785580
} else {
55795581
archfpga_throw(loc_data.filename_c_str(), loc_data.line(loc_spec_tag),

libs/libarchfpga/src/vib_inf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ struct t_seg_group {
4444
* @brief The type of the from or to of the multistage mux.
4545
*/
4646
enum class e_multistage_mux_from_or_to_type {
47-
PB = 0, //Physical block
47+
PB = 0, //Physical block
4848
SEGMENT, //Segment
49-
MUX //MUX
49+
MUX //MUX
5050
};
5151

5252
struct t_from_or_to_inf {

vpr/src/base/SetupVPR.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ static void process_from_or_to_tokens(const std::vector<std::string> Tokens, con
11861186
break;
11871187
}
11881188
}
1189-
VTR_ASSERT(from_type == e_multistage_mux_from_or_to_type::PB
1189+
VTR_ASSERT(from_type == e_multistage_mux_from_or_to_type::PB
11901190
|| from_type == e_multistage_mux_from_or_to_type::SEGMENT);
11911191

11921192
} else {
@@ -1219,10 +1219,10 @@ static void parse_pin_name(const char* src_string, int* start_pin_index, int* en
12191219
int match_count = sscanf(source_string.c_str(), "%s %s", pb_type_name, port_name);
12201220
if (match_count != 2) {
12211221
VPR_FATAL_ERROR(VPR_ERROR_ARCH,
1222-
"Invalid pin - %s, name should be in the format "
1223-
"\"pb_type_name\".\"port_name\" or \"pb_type_name\".\"port_name[end_pin_index:start_pin_index]\". "
1224-
"The end_pin_index and start_pin_index can be the same.\n",
1225-
src_string);
1222+
"Invalid pin - %s, name should be in the format "
1223+
"\"pb_type_name\".\"port_name\" or \"pb_type_name\".\"port_name[end_pin_index:start_pin_index]\". "
1224+
"The end_pin_index and start_pin_index can be the same.\n",
1225+
src_string);
12261226
}
12271227
} else {
12281228
/* Format "pb_type_name.port_name[end_pin_index:start_pin_index]" */
@@ -1237,26 +1237,26 @@ static void parse_pin_name(const char* src_string, int* start_pin_index, int* en
12371237
}
12381238

12391239
int match_count = sscanf(source_string.c_str(), "%s %s %d:%d]",
1240-
pb_type_name, port_name,
1241-
end_pin_index, start_pin_index);
1240+
pb_type_name, port_name,
1241+
end_pin_index, start_pin_index);
12421242
if (match_count != 4) {
12431243
match_count = sscanf(source_string.c_str(), "%s %s %d]",
12441244
pb_type_name, port_name,
12451245
end_pin_index);
12461246
*start_pin_index = *end_pin_index;
12471247
if (match_count != 3) {
12481248
VPR_FATAL_ERROR(VPR_ERROR_ARCH,
1249-
"Invalid pin - %s, name should be in the format "
1250-
"\"pb_type_name\".\"port_name\" or \"pb_type_name\".\"port_name[end_pin_index:start_pin_index]\". "
1251-
"The end_pin_index and start_pin_index can be the same.\n",
1252-
src_string);
1249+
"Invalid pin - %s, name should be in the format "
1250+
"\"pb_type_name\".\"port_name\" or \"pb_type_name\".\"port_name[end_pin_index:start_pin_index]\". "
1251+
"The end_pin_index and start_pin_index can be the same.\n",
1252+
src_string);
12531253
}
12541254
}
12551255
if (*end_pin_index < 0 || *start_pin_index < 0) {
12561256
VPR_FATAL_ERROR(VPR_ERROR_ARCH,
1257-
"Invalid pin - %s, the pin_index in "
1258-
"[end_pin_index:start_pin_index] should not be a negative value.\n",
1259-
src_string);
1257+
"Invalid pin - %s, the pin_index in "
1258+
"[end_pin_index:start_pin_index] should not be a negative value.\n",
1259+
src_string);
12601260
}
12611261
if (*end_pin_index < *start_pin_index) {
12621262
int temp;

vpr/src/route/rr_graph_generation/tileable_rr_graph/rr_graph_builder_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ std::vector<e_side> determine_io_grid_pin_side(const vtr::Point<size_t>& device_
8585
return {TOP, RIGHT, BOTTOM, LEFT};
8686
} else {
8787
VPR_FATAL_ERROR(VPR_ERROR_ROUTE,
88-
"Invalid coordinate (%lu, %lu) for I/O Grid whose size is (%lu, %lu)!\n",
89-
grid_coordinate.x(), grid_coordinate.y(),
90-
device_size.x(), device_size.y());
88+
"Invalid coordinate (%lu, %lu) for I/O Grid whose size is (%lu, %lu)!\n",
89+
grid_coordinate.x(), grid_coordinate.y(),
90+
device_size.x(), device_size.y());
9191
}
9292
return pin_sides;
9393
}

vpr/src/route/rr_graph_generation/tileable_rr_graph/rr_gsb.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
* Constructors
1616
***********************************************************************/
1717
/* Constructor for an empty object */
18-
RRGSB::RRGSB(): coordinate_(size_t(-1), size_t(-1)) {
18+
RRGSB::RRGSB()
19+
: coordinate_(size_t(-1), size_t(-1)) {
1920
/* Set a clean start! */
2021
coordinate_.set(0, 0);
2122

0 commit comments

Comments
 (0)