Skip to content

Commit 7ef33f1

Browse files
committed
make format
1 parent 7139c9e commit 7ef33f1

File tree

4 files changed

+22
-36
lines changed

4 files changed

+22
-36
lines changed

vpr/src/base/read_options.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,7 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
32863286
.help("Switch block map file that specifed the switch block template used for each location")
32873287
.default_value("")
32883288
.show_in(argparse::ShowIn::HELP_ONLY);
3289-
3289+
32903290
crr_grp.add_argument(args.sb_templates, "--sb_templates")
32913291
.help("Directory containing the switch block templates")
32923292
.default_value("")
@@ -3296,17 +3296,16 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
32963296
.help("Number of threads to use for the CRR generation")
32973297
.default_value("1")
32983298
.show_in(argparse::ShowIn::HELP_ONLY);
3299-
3299+
33003300
crr_grp.add_argument<bool, ParseOnOff>(args.preserve_pin_connections, "--preserve_pin_connections")
33013301
.help("If it set to on, the pin connections will be generated by the default flow and not from the CRR template")
33023302
.default_value("off")
33033303
.show_in(argparse::ShowIn::HELP_ONLY);
3304-
3304+
33053305
crr_grp.add_argument<bool, ParseOnOff>(args.annotated_rr_graph, "--annotated_rr_graph")
33063306
.help("Whether the generated CRR should be annotated with delay")
33073307
.default_value("off")
33083308
.show_in(argparse::ShowIn::HELP_ONLY);
3309-
33103309

33113310
auto& power_grp = parser.add_argument_group("power analysis options");
33123311

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/crr_connection_builder.cpp

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ std::vector<Connection> CRRConnectionBuilder::get_tile_connections(size_t tile_x
209209
return tile_connections;
210210
}
211211

212-
std::map<size_t, RRNodeId> CRRConnectionBuilder::get_vertical_nodes(Coordinate x, Coordinate y, const DataFrame& df,
213-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const {
212+
std::map<size_t, RRNodeId> CRRConnectionBuilder::get_vertical_nodes(Coordinate x, Coordinate y, const DataFrame& df, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const {
214213
std::map<size_t, RRNodeId> source_nodes;
215214
std::string prev_seg_type = "";
216215
int prev_seg_index = -1;
@@ -239,8 +238,7 @@ std::map<size_t, RRNodeId> CRRConnectionBuilder::get_vertical_nodes(Coordinate x
239238
return source_nodes;
240239
}
241240

242-
std::map<size_t, RRNodeId> CRRConnectionBuilder::get_horizontal_nodes(Coordinate x, Coordinate y, const DataFrame& df,
243-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const {
241+
std::map<size_t, RRNodeId> CRRConnectionBuilder::get_horizontal_nodes(Coordinate x, Coordinate y, const DataFrame& df, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const {
244242
std::map<size_t, RRNodeId> sink_nodes;
245243
std::string prev_seg_type = "";
246244
int prev_seg_index = -1;
@@ -273,7 +271,7 @@ std::map<size_t, RRNodeId> CRRConnectionBuilder::get_horizontal_nodes(Coordinate
273271
return sink_nodes;
274272
}
275273

276-
CRRConnectionBuilder::SegmentInfo CRRConnectionBuilder::parse_segment_info(const DataFrame& df,
274+
CRRConnectionBuilder::SegmentInfo CRRConnectionBuilder::parse_segment_info(const DataFrame& df,
277275
size_t row_or_col,
278276
bool is_vertical) const {
279277
SegmentInfo info;
@@ -324,8 +322,7 @@ CRRConnectionBuilder::SegmentInfo CRRConnectionBuilder::parse_segment_info(const
324322
return info;
325323
}
326324

327-
RRNodeId CRRConnectionBuilder::process_opin_ipin_node(const SegmentInfo& info, Coordinate x, Coordinate y,
328-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const {
325+
RRNodeId CRRConnectionBuilder::process_opin_ipin_node(const SegmentInfo& info, Coordinate x, Coordinate y, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const {
329326
assert(info.side == Side::OPIN || info.side == Side::IPIN);
330327
e_rr_type node_type = (info.side == Side::OPIN) ? e_rr_type::OPIN : e_rr_type::IPIN;
331328
NodeHash hash = std::make_tuple(node_type,
@@ -340,10 +337,7 @@ RRNodeId CRRConnectionBuilder::process_opin_ipin_node(const SegmentInfo& info, C
340337
return RRNodeId::INVALID();
341338
}
342339

343-
RRNodeId CRRConnectionBuilder::process_channel_node(const SegmentInfo& info, Coordinate x, Coordinate y,
344-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup,
345-
int& prev_seg_index, Side& prev_side, std::string& prev_seg_type, int& prev_ptc_number,
346-
bool is_vertical) const {
340+
RRNodeId CRRConnectionBuilder::process_channel_node(const SegmentInfo& info, Coordinate x, Coordinate y, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup, int& prev_seg_index, Side& prev_side, std::string& prev_seg_type, int& prev_ptc_number, bool is_vertical) const {
347341
// Check grid boundaries
348342
if ((info.side == Side::RIGHT && x == fpga_grid_x_) || (info.side == Side::TOP && y == fpga_grid_y_)) {
349343
return RRNodeId::INVALID();
@@ -398,10 +392,14 @@ RRNodeId CRRConnectionBuilder::process_channel_node(const SegmentInfo& info, Coo
398392
}
399393

400394
void CRRConnectionBuilder::calculate_segment_coordinates(const SegmentInfo& info,
401-
Coordinate x, Coordinate y,
402-
Coordinate& x_low, Coordinate& x_high,
403-
Coordinate& y_low, Coordinate& y_high,
404-
int& physical_length, int& truncated,
395+
Coordinate x,
396+
Coordinate y,
397+
Coordinate& x_low,
398+
Coordinate& x_high,
399+
Coordinate& y_low,
400+
Coordinate& y_high,
401+
int& physical_length,
402+
int& truncated,
405403
bool is_vertical) const {
406404
int seg_length = std::stoi(info.seg_type.substr(1));
407405
int tap = info.tap;
@@ -527,9 +525,7 @@ std::string CRRConnectionBuilder::get_ptc_sequence(int seg_index,
527525
return result;
528526
}
529527

530-
SwitchId CRRConnectionBuilder::get_edge_switch_id(const std::string& cell_value, const std::string& sink_node_type,
531-
RRNodeId /*source_node*/, RRNodeId /*sink_node*/,
532-
int /*segment_length*/) const {
528+
SwitchId CRRConnectionBuilder::get_edge_switch_id(const std::string& cell_value, const std::string& sink_node_type, RRNodeId /*source_node*/, RRNodeId /*sink_node*/, int /*segment_length*/) const {
533529
std::string lower_case_sink_node_type = sink_node_type;
534530
std::transform(lower_case_sink_node_type.begin(),
535531
lower_case_sink_node_type.end(),

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/crr_connection_builder.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,9 @@ class CRRConnectionBuilder {
109109
std::vector<Connection>& tile_connections) const;
110110

111111
// Node processing methods
112-
std::map<size_t, RRNodeId> get_vertical_nodes(Coordinate x, Coordinate y, const DataFrame& df,
113-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const;
112+
std::map<size_t, RRNodeId> get_vertical_nodes(Coordinate x, Coordinate y, const DataFrame& df, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const;
114113

115-
std::map<size_t, RRNodeId> get_horizontal_nodes(Coordinate x, Coordinate y, const DataFrame& df,
116-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const;
114+
std::map<size_t, RRNodeId> get_horizontal_nodes(Coordinate x, Coordinate y, const DataFrame& df, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const;
117115

118116
// PTC sequence calculation
119117
std::string get_ptc_sequence(int seg_index, int seg_length, int physical_length, Direction direction, int truncated) const;
@@ -138,18 +136,12 @@ class CRRConnectionBuilder {
138136

139137
SegmentInfo parse_segment_info(const DataFrame& df, size_t row_or_col, bool is_vertical) const;
140138

141-
RRNodeId process_opin_ipin_node(const SegmentInfo& info, Coordinate x, Coordinate y,
142-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const;
139+
RRNodeId process_opin_ipin_node(const SegmentInfo& info, Coordinate x, Coordinate y, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup) const;
143140

144-
RRNodeId process_channel_node(const SegmentInfo& info, Coordinate x, Coordinate y,
145-
const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup,
146-
int& prev_seg_index, Side& prev_side, std::string& prev_seg_type, int& prev_ptc_number,
147-
bool is_vertical) const;
141+
RRNodeId process_channel_node(const SegmentInfo& info, Coordinate x, Coordinate y, const std::unordered_map<NodeHash, RRNodeId, NodeHasher>& node_lookup, int& prev_seg_index, Side& prev_side, std::string& prev_seg_type, int& prev_ptc_number, bool is_vertical) const;
148142

149143
// Coordinate and direction calculations
150-
void calculate_segment_coordinates(const SegmentInfo& info, Coordinate x, Coordinate y,
151-
Coordinate& x_low, Coordinate& x_high, Coordinate& y_low, Coordinate& y_high,
152-
int& physical_length, int& truncated, bool is_vertical) const;
144+
void calculate_segment_coordinates(const SegmentInfo& info, Coordinate x, Coordinate y, Coordinate& x_low, Coordinate& x_high, Coordinate& y_low, Coordinate& y_high, int& physical_length, int& truncated, bool is_vertical) const;
153145

154146
Direction get_direction_for_side(Side side, bool is_vertical) const;
155147
std::string get_segment_type_label(Side side) const;

vpr/src/route/rr_graph_generation/tileable_rr_graph/crr_generator/node_lookup_manager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ void NodeLookupManager::index_node(RRNodeId node_id) {
106106
short y_low = rr_graph_.node_ylow(node_id);
107107
short y_high = rr_graph_.node_yhigh(node_id);
108108

109-
110109
VTR_ASSERT(static_cast<size_t>(x_low) <= fpga_grid_x_);
111110
VTR_ASSERT(static_cast<size_t>(x_high) <= fpga_grid_x_);
112111
VTR_ASSERT(static_cast<size_t>(y_low) <= fpga_grid_y_);

0 commit comments

Comments
 (0)