Skip to content

Commit fbd2015

Browse files
committed
make format
1 parent ad8bfce commit fbd2015

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

vpr/src/base/vpr_api.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,18 +373,18 @@ void vpr_init_with_options(const t_options* options, t_vpr_setup* vpr_setup, t_a
373373

374374
/** Port equivalence does not make sense during flat routing.
375375
* Remove port equivalence from all ports in the architecture */
376-
static void unset_port_equivalences(DeviceContext& device_ctx){
377-
for(auto& physical_type: device_ctx.physical_tile_types){
378-
for(auto& sub_tile: physical_type.sub_tiles){
379-
for(auto& port: sub_tile.ports){
376+
static void unset_port_equivalences(DeviceContext& device_ctx) {
377+
for (auto& physical_type : device_ctx.physical_tile_types) {
378+
for (auto& sub_tile : physical_type.sub_tiles) {
379+
for (auto& port : sub_tile.ports) {
380380
port.equivalent = PortEquivalence::NONE;
381381
}
382382
}
383383
}
384-
for(auto& logical_type: device_ctx.logical_block_types){
385-
if(!logical_type.pb_type)
384+
for (auto& logical_type : device_ctx.logical_block_types) {
385+
if (!logical_type.pb_type)
386386
continue;
387-
for(int i=0; i<logical_type.pb_type->num_ports; i++){
387+
for (int i=0; i < logical_type.pb_type->num_ports; i++) {
388388
logical_type.pb_type->ports[i].equivalent = PortEquivalence::NONE;
389389
}
390390
}
@@ -468,7 +468,7 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
468468

469469
bool is_flat = vpr_setup.RouterOpts.flat_routing;
470470
const Netlist<>& router_net_list = is_flat ? (const Netlist<>&)g_vpr_ctx.atom().netlist() : (const Netlist<>&)g_vpr_ctx.clustering().clb_nlist;
471-
if (is_flat){
471+
if (is_flat) {
472472
VTR_LOG_WARN("Disabling port equivalence in the architecture since flat routing is enabled.\n");
473473
unset_port_equivalences(g_vpr_ctx.mutable_device());
474474
}

vpr/src/pack/post_routing_pb_pin_fixup.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,9 +1032,9 @@ void sync_netlists_to_routing(const Netlist<>& net_list,
10321032

10331033
/* Create net-to-rr_node mapping */
10341034
vtr::vector<RRNodeId, ClusterNetId> rr_node_nets = annotate_rr_node_nets(clustering_ctx,
1035-
device_ctx,
1036-
atom_ctx,
1037-
verbose);
1035+
device_ctx,
1036+
atom_ctx,
1037+
verbose);
10381038

10391039
IntraLbPbPinLookup intra_lb_pb_pin_lookup(device_ctx.logical_block_types);
10401040

vpr/src/pack/sync_netlists_to_routing_flat.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static void sync_pb_routes_to_routing(void) {
173173
/* Don't erase entries for nets without routing in place (clocks, globals...) */
174174
std::vector<int> pins_to_erase;
175175
auto& pb_routes = cluster_ctx.clb_nlist.block_pb(clb_blk_id)->pb_route;
176-
for(auto& [pin, pb_route]: pb_routes){
176+
for (auto& [pin, pb_route] : pb_routes) {
177177
/* No route tree: no routing in place, it is global or clock */
178178
if(!route_ctx.route_trees[ParentNetId(int(pb_route.atom_net_id))])
179179
continue;
@@ -266,27 +266,27 @@ static void sync_clustered_netlist_to_routing(void) {
266266

267267
for (auto net_id : clb_netlist.nets()) {
268268
auto atom_net_id = atom_lookup.atom_net(net_id);
269-
if(!route_ctx.route_trees[ParentNetId(int(atom_net_id))])
269+
if (!route_ctx.route_trees[ParentNetId(int(atom_net_id))])
270270
continue;
271271

272272
nets_to_remove.push_back(net_id);
273273
}
274274
/* Mark ports and pins for removal. Don't remove a port if
275275
* it has at least one pin remaining */
276-
for(auto port_id: clb_netlist.ports()){
276+
for (auto port_id : clb_netlist.ports()) {
277277
size_t skipped_pins = 0;
278278

279-
for(auto pin_id: clb_netlist.port_pins(port_id)){
279+
for (auto pin_id : clb_netlist.port_pins(port_id)) {
280280
ClusterNetId clb_net_id = clb_netlist.pin_net(pin_id);
281281
auto atom_net_id = atom_lookup.atom_net(clb_net_id);
282-
if(atom_net_id && !route_ctx.route_trees[ParentNetId(int(atom_net_id))]){
282+
if (atom_net_id && !route_ctx.route_trees[ParentNetId(int(atom_net_id))]) {
283283
skipped_pins++;
284-
}else{
284+
} else {
285285
pins_to_remove.push_back(pin_id);
286286
}
287287
}
288288

289-
if(!skipped_pins) // All pins have been removed, remove port
289+
if (!skipped_pins) // All pins have been removed, remove port
290290
ports_to_remove.push_back(port_id);
291291
}
292292

@@ -334,7 +334,7 @@ static void sync_clustered_netlist_to_routing(void) {
334334
/* OPIN on the tile: create a new clb_net_id and add all ports & pins into here
335335
* Due to how the route tree is traversed, all nodes until the next OPIN on the tile will
336336
* be under this OPIN, so this is valid (we don't need to get the branch explicitly) */
337-
if(node_type == OPIN){
337+
if (node_type == OPIN) {
338338
std::string net_name = atom_ctx.netlist().net_name(parent_net_id) + "_" + std::to_string(clb_nets_so_far);
339339
clb_net_id = clb_netlist.create_net(net_name);
340340
atom_ctx.mutable_lookup().add_atom_clb_net(atom_net_id, clb_net_id);
@@ -362,10 +362,10 @@ static void sync_clustered_netlist_to_routing(void) {
362362
/* Pin already exists. This means a global was connected to here. */
363363
if (clb_netlist.port_pin(port_id, pb_graph_pin->pin_number)) {
364364
VTR_LOG_WARN("Pin %s of block %s has a global or clock net"
365-
" connected and it has a routing clash with the flat router."
366-
" This may cause inconsistent results.\n",
367-
pb_graph_pin->to_string().c_str(),
368-
clb_netlist.block_name(clb).c_str());
365+
" connected and it has a routing clash with the flat router."
366+
" This may cause inconsistent results.\n",
367+
pb_graph_pin->to_string().c_str(),
368+
clb_netlist.block_name(clb).c_str());
369369
continue;
370370
}
371371
ClusterPinId new_pin = clb_netlist.create_pin(port_id, pb_graph_pin->pin_number, clb_net_id, pin_type, pb_graph_pin->pin_count_in_cluster);
@@ -415,7 +415,7 @@ static void fixup_atom_pb_graph_pin_mapping(void) {
415415
continue;
416416
}
417417

418-
for(AtomPinId atom_pin: atom_ctx.netlist().port_pins(atom_port)){
418+
for (AtomPinId atom_pin : atom_ctx.netlist().port_pins(atom_port)) {
419419
/* Match net IDs from pb_route and atom netlist and connect in lookup */
420420
if (pb_route.atom_net_id == atom_ctx.netlist().pin_net(atom_pin)) {
421421
atom_ctx.mutable_lookup().set_atom_pin_pb_graph_pin(atom_pin, atom_pbg_pin);

vpr/src/route/annotate_routing.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include "annotate_routing.h"
1515

1616
vtr::vector<RRNodeId, ClusterNetId> annotate_rr_node_nets(const ClusteringContext& cluster_ctx,
17-
const DeviceContext& device_ctx,
18-
const AtomContext& atom_ctx,
19-
const bool& verbose) {
17+
const DeviceContext& device_ctx,
18+
const AtomContext& atom_ctx,
19+
const bool& verbose) {
2020
size_t counter = 0;
2121
vtr::ScopedStartFinishTimer timer("Annotating rr_node with routed nets");
2222

vpr/src/route/annotate_routing.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
* - Unmapped rr_node will use invalid ids
1212
*******************************************************************/
1313
vtr::vector<RRNodeId, ClusterNetId> annotate_rr_node_nets(const ClusteringContext& cluster_ctx,
14-
const DeviceContext& device_ctx,
15-
const AtomContext& atom_ctx,
16-
const bool& verbose);
14+
const DeviceContext& device_ctx,
15+
const AtomContext& atom_ctx,
16+
const bool& verbose);
1717

1818
#endif

0 commit comments

Comments
 (0)