Skip to content

Commit 019a8e5

Browse files
make format
1 parent b794872 commit 019a8e5

13 files changed

+73
-68
lines changed

libs/libarchfpga/src/switchblock_types.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,12 @@ struct t_wire_switchpoints {
152152
*
153153
*/
154154
struct t_wireconn_inf {
155-
std::vector<t_wire_switchpoints> from_switchpoint_set; ///< The set of segment/wirepoints representing the 'from' set (union of all t_wire_switchpoints in vector)
156-
std::vector<t_wire_switchpoints> to_switchpoint_set; ///< The set of segment/wirepoints representing the 'to' set (union of all t_wire_switchpoints in vector)
155+
std::vector<t_wire_switchpoints> from_switchpoint_set; ///< The set of segment/wirepoints representing the 'from' set (union of all t_wire_switchpoints in vector)
156+
std::vector<t_wire_switchpoints> to_switchpoint_set; ///< The set of segment/wirepoints representing the 'to' set (union of all t_wire_switchpoints in vector)
157157
e_switch_point_order from_switchpoint_order = e_switch_point_order::FIXED; ///< The desired from_switchpoint_set ordering
158158
e_switch_point_order to_switchpoint_order = e_switch_point_order::FIXED; ///< The desired to_switchpoint_set ordering
159-
int switch_override_indx = DEFAULT_SWITCH; ///< index in switch array of the switch used to override wire_switch of the 'to' set.
160-
///< DEFAULT_SWITCH is a sentinel value (i.e. the usual driving switch from a wire for the receiving wire will be used)
159+
int switch_override_indx = DEFAULT_SWITCH; ///< index in switch array of the switch used to override wire_switch of the 'to' set.
160+
///< DEFAULT_SWITCH is a sentinel value (i.e. the usual driving switch from a wire for the receiving wire will be used)
161161

162162
std::string num_conns_formula; /* Specifies how many connections should be made for this wireconn.
163163
*

vpr/src/route/overuse_report.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void report_overused_nodes(const Netlist<>& net_list,
155155
report_sinks = true;
156156
break;
157157

158-
// TODO: handle CHANZ nodes
158+
// TODO: handle CHANZ nodes
159159

160160
default:
161161
break;
@@ -248,7 +248,7 @@ static void report_overused_ipin_opin(std::ostream& os,
248248
os << "On Tile Pin"
249249
<< "\n";
250250
} else {
251-
const char* pb_type_name = get_pb_graph_node_from_pin_physical_num(physical_type, rr_graph.node_ptc_num(node_id)) ->pb_type->name;
251+
const char* pb_type_name = get_pb_graph_node_from_pin_physical_num(physical_type, rr_graph.node_ptc_num(node_id))->pb_type->name;
252252
const t_pb_graph_pin* pb_pin = get_pb_pin_from_pin_physical_num(physical_type, rr_graph.node_ptc_num(node_id));
253253
os << "Intra-Tile Pin - Port : " << pb_pin->port->name << " - PB Type : " << std::string(pb_type_name) << "\n";
254254
}

vpr/src/route/router_lookahead/router_lookahead_extended_map.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ float ExtendedMapLookahead::get_chan_ipin_delays(RRNodeId to_node) const {
153153
VTR_ASSERT(to_type == e_rr_type::SINK || to_type == e_rr_type::IPIN);
154154

155155
t_physical_tile_type_ptr to_tile_type = device_ctx.grid.get_physical_type({rr_graph.node_xlow(to_node),
156-
rr_graph.node_ylow(to_node),
157-
rr_graph.node_layer_low(to_node)});
156+
rr_graph.node_ylow(to_node),
157+
rr_graph.node_layer_low(to_node)});
158158
int to_tile_index = to_tile_type->index;
159159

160160
int to_ptc = rr_graph.node_ptc_num(to_node);

vpr/src/route/router_lookahead/router_lookahead_map.cpp

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,15 @@ static util::Cost_Entry get_wire_cost_entry(e_rr_type rr_type, int seg_index, in
505505

506506
int chan_index;
507507
switch (rr_type) {
508-
case e_rr_type::CHANX: chan_index = 0; break;
509-
case e_rr_type::CHANY: chan_index = 1; break;
510-
case e_rr_type::CHANZ: chan_index = 2; break;
508+
case e_rr_type::CHANX:
509+
chan_index = 0;
510+
break;
511+
case e_rr_type::CHANY:
512+
chan_index = 1;
513+
break;
514+
case e_rr_type::CHANZ:
515+
chan_index = 2;
516+
break;
511517
default:
512518
VTR_ASSERT(false);
513519
}
@@ -584,9 +590,15 @@ static void set_lookahead_map_costs(unsigned from_layer_num,
584590
util::t_routing_cost_map& routing_cost_map) {
585591
int chan_index;
586592
switch (chan_type) {
587-
case e_rr_type::CHANX: chan_index = 0; break;
588-
case e_rr_type::CHANY: chan_index = 1; break;
589-
case e_rr_type::CHANZ: chan_index = 2; break;
593+
case e_rr_type::CHANX:
594+
chan_index = 0;
595+
break;
596+
case e_rr_type::CHANY:
597+
chan_index = 1;
598+
break;
599+
case e_rr_type::CHANZ:
600+
chan_index = 2;
601+
break;
590602
default:
591603
VTR_ASSERT(false);
592604
}
@@ -608,9 +620,15 @@ static void fill_in_missing_lookahead_entries(int segment_index, e_rr_type chan_
608620

609621
int chan_index;
610622
switch (chan_type) {
611-
case e_rr_type::CHANX: chan_index = 0; break;
612-
case e_rr_type::CHANY: chan_index = 1; break;
613-
case e_rr_type::CHANZ: chan_index = 2; break;
623+
case e_rr_type::CHANX:
624+
chan_index = 0;
625+
break;
626+
case e_rr_type::CHANY:
627+
chan_index = 1;
628+
break;
629+
case e_rr_type::CHANZ:
630+
chan_index = 2;
631+
break;
614632
default:
615633
VTR_ASSERT(false);
616634
}

vpr/src/route/router_lookahead/router_lookahead_map.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,5 @@ class MapLookahead : public RouterLookahead {
6363
*/
6464
typedef vtr::NdMatrix<util::Cost_Entry, 6> t_wire_cost_map;
6565

66-
67-
6866
void read_router_lookahead(const std::string& file);
6967
void write_router_lookahead(const std::string& file);

vpr/src/route/router_lookahead/router_lookahead_map_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ void dump_readable_router_lookahead_map(const std::string& file_name, const std:
936936
"delay_cost\n";
937937

938938
std::vector<e_rr_type> chan_types{e_rr_type::CHANX, e_rr_type::CHANY};
939-
if (num_layers > 1) {
939+
if (num_layers > 1) {
940940
chan_types.push_back(e_rr_type::CHANZ);
941941
}
942942

vpr/src/route/rr_graph_generation/build_scatter_gathers.cpp

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static std::vector<t_sg_candidate> find_candidate_wires(const std::vector<t_chan
4646
const t_chan_details& chan_details_y,
4747
const t_wire_type_sizes& wire_type_sizes_x,
4848
const t_wire_type_sizes& wire_type_sizes_y,
49-
bool is_dest) ;
49+
bool is_dest);
5050

5151
//
5252
// Static Function Definitions
@@ -63,7 +63,7 @@ static void index_to_correct_channels(const t_wireconn_inf& pattern,
6363
t_physical_tile_loc chan_loc;
6464
e_rr_type chan_type;
6565

66-
index_into_correct_chan(loc, side, chan_details_x, chan_details_y,chan_loc, chan_type);
66+
index_into_correct_chan(loc, side, chan_details_x, chan_details_y, chan_loc, chan_type);
6767

6868
if (!chan_coords_out_of_bounds(chan_loc, chan_type)) {
6969
correct_channels.push_back({chan_loc, chan_type, side});
@@ -134,7 +134,6 @@ static std::vector<t_sg_candidate> find_candidate_wires(const std::vector<t_chan
134134
candidates.push_back({chan_loc, chan_type, chan_side, {iwire, wire_switchpoint}});
135135
}
136136
}
137-
138137
}
139138
}
140139

@@ -187,11 +186,10 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
187186
VTR_ASSERT(sg_link_it != sg_pattern.sg_links.end());
188187
const t_sg_link& sg_link = *sg_link_it;
189188

190-
191189
auto seg_it = std::ranges::find_if(segment_inf,
192-
[&](const t_segment_inf& seg) noexcept {
193-
return seg.name == sg_link.seg_type;
194-
});
190+
[&](const t_segment_inf& seg) noexcept {
191+
return seg.name == sg_link.seg_type;
192+
});
195193

196194
VTR_ASSERT(seg_it != segment_inf.end());
197195
const t_segment_inf& wire_segment = *seg_it;
@@ -209,16 +207,16 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
209207
}
210208

211209
auto gather_wire_candidates = find_candidate_wires(gather_channels,
212-
sg_pattern.gather_pattern.from_switchpoint_set,
213-
chan_details_x, chan_details_y,
214-
wire_type_sizes_x, wire_type_sizes_y,
215-
/*is_dest=*/false);
210+
sg_pattern.gather_pattern.from_switchpoint_set,
211+
chan_details_x, chan_details_y,
212+
wire_type_sizes_x, wire_type_sizes_y,
213+
/*is_dest=*/false);
216214

217215
auto scatter_wire_candidates = find_candidate_wires(scatter_channels,
218-
sg_pattern.scatter_pattern.to_switchpoint_set,
219-
chan_details_x, chan_details_y,
220-
wire_type_sizes_x, wire_type_sizes_y,
221-
/*is_dest=*/true);
216+
sg_pattern.scatter_pattern.to_switchpoint_set,
217+
chan_details_x, chan_details_y,
218+
wire_type_sizes_x, wire_type_sizes_y,
219+
/*is_dest=*/true);
222220

223221
int bottleneck_fanin = evaluate_num_conns_formula(formula_parser,
224222
formula_data,
@@ -279,9 +277,7 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
279277
}
280278
bottleneck_links.push_back(std::move(bottleneck_link));
281279
}
282-
283280
}
284-
285281
}
286282
}
287283
}

vpr/src/route/rr_graph_generation/build_scatter_gathers.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
/// Identifies a specific channel location in the device grid.
1111
struct t_chan_loc {
12-
t_physical_tile_loc location; ///< Physical grid location of the channel
13-
e_rr_type chan_type; ///< Type of routing channel (e.g., CHANX, CHANY)
14-
e_side side; ///< Side of the reference switch block the channel lies on
12+
t_physical_tile_loc location; ///< Physical grid location of the channel
13+
e_rr_type chan_type; ///< Type of routing channel (e.g., CHANX, CHANY)
14+
e_side side; ///< Side of the reference switch block the channel lies on
1515
};
1616

1717
/// Represents a wire candidate for scatter/gather connections.
1818
struct t_sg_candidate {
19-
t_chan_loc chan_loc; ///< Channel location (coordinates, type, side) where the wire lies.
20-
t_wire_switchpoint wire_switchpoint; ///< Wire index and its valid switchpoint
19+
t_chan_loc chan_loc; ///< Channel location (coordinates, type, side) where the wire lies.
20+
t_wire_switchpoint wire_switchpoint; ///< Wire index and its valid switchpoint
2121
};
2222

2323
/// Represents a scatter/gather bottleneck connection between two locations.
@@ -52,4 +52,4 @@ std::vector<t_bottleneck_link> alloc_and_load_scatter_gather_connections(const s
5252
const t_chan_details& chan_details_x,
5353
const t_chan_details& chan_details_y,
5454
const t_chan_width& nodes_per_chan,
55-
vtr::NdMatrix<std::vector<t_bottleneck_link>, 2>& interdie_3d_links);
55+
vtr::NdMatrix<std::vector<t_bottleneck_link>, 2>& interdie_3d_links);

vpr/src/route/rr_graph_generation/build_switchblocks.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ static void compute_wire_connections(const t_physical_tile_loc& sb_loc,
379379
e_rr_type from_chan_type, to_chan_type; // the type of channel - i.e. CHANX or CHANY
380380
t_physical_tile_loc from_loc, to_loc;
381381

382-
383382
// For indexing into this switchblock's permutation funcs
384383
SBSideConnection side_conn(from_side, to_side);
385384
// For indexing into FPGA's switchblock map
@@ -454,7 +453,7 @@ static void compute_wireconn_connections(e_directionality directionality,
454453
&scratchpad->potential_src_wires,
455454
&scratchpad->scratch_wires);
456455

457-
get_switchpoint_wires(to_chan_details[to_loc.x][to_loc.y].data(), to_chan_type, to_loc.x, to_loc.y, sb_conn.to_side,
456+
get_switchpoint_wires(to_chan_details[to_loc.x][to_loc.y].data(), to_chan_type, to_loc.x, to_loc.y, sb_conn.to_side,
458457
wireconn.to_switchpoint_set, wire_type_sizes_to, /*is_dest=*/true,
459458
wireconn.to_switchpoint_order, rng, &scratchpad->potential_dest_wires,
460459
&scratchpad->scratch_wires);

vpr/src/route/rr_graph_generation/rr_graph.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
20782078
// since these die-crossing connections have more delays.
20792079
if (grid.get_num_layers() > 1) {
20802080
build_inter_die_3d_rr_chan(rr_graph_builder, i, j, interdie_3d_links[i][j],
2081-
CHANX_COST_INDEX_START + num_seg_types_x + num_seg_types_y);
2081+
CHANX_COST_INDEX_START + num_seg_types_x + num_seg_types_y);
20822082
}
20832083

20842084
for (int layer = 0; layer < (int)grid.get_num_layers(); ++layer) {
@@ -2137,12 +2137,9 @@ static std::function<void(t_chan_width*)> alloc_and_load_rr_graph(RRGraphBuilder
21372137
num_edges += interdie_3d_rr_edges_to_create.size();
21382138
interdie_3d_rr_edges_to_create.clear();
21392139
}
2140-
21412140
}
21422141
}
21432142

2144-
2145-
21462143
VTR_LOGV(route_verbosity > 1, "CHAN->CHAN type edge count:%d\n", num_edges);
21472144

21482145
num_edges = 0;
@@ -3197,7 +3194,6 @@ static void build_inter_die_3d_rr_chan(RRGraphBuilder& rr_graph_builder,
31973194
VTR_ASSERT_SAFE(interdie_3d_links[track_num].scatter_loc.layer_num < interdie_3d_links[track_num].gather_loc.layer_num);
31983195
rr_graph_builder.set_node_direction(node, Direction::DEC);
31993196
}
3200-
32013197
}
32023198
}
32033199

0 commit comments

Comments
 (0)