Skip to content

Commit e3df5b5

Browse files
committed
[base] fix function names formatting
1 parent 09c90f2 commit e3df5b5

File tree

2 files changed

+58
-49
lines changed

2 files changed

+58
-49
lines changed

libs/librrgraph/src/base/rr_graph_view.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,20 @@ class RRGraphView {
580580
/** @brief Get the segment id which a routing resource node represents. Only applicable to nodes whose type is CHANX or CHANY */
581581
RRSegmentId node_segment(RRNodeId node) const;
582582

583-
/** @brief Return incoming edges for a given routing resource node
584-
* Require build_in_edges() to be called first
583+
/**
584+
* @brief Return incoming edges for a given routing resource node
585+
* Require build_in_edges() to be called first
585586
*/
586587
std::vector<RREdgeId> node_in_edges(RRNodeId node) const;
588+
589+
/**
590+
* @brief Return configurable incoming edges for a given routing resource node
591+
*/
587592
std::vector<RREdgeId> node_configurable_in_edges(RRNodeId node) const;
593+
594+
/**
595+
* @brief Return non-configurable incoming edges for a given routing resource node
596+
*/
588597
std::vector<RREdgeId> node_non_configurable_in_edges(RRNodeId node) const;
589598

590599
/** @brief Return detailed routing segment information of a specified segment

vpr/src/base/SetupVPR.cpp

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,36 @@
2424
#include "clock_modeling.h"
2525
#include "ShowSetup.h"
2626

27-
static void SetupNetlistOpts(const t_options& Options, t_netlist_opts& NetlistOpts);
28-
static void SetupAPOpts(const t_options& options,
27+
static void setup_netlist_opts(const t_options& Options, t_netlist_opts& NetlistOpts);
28+
static void setup_ap_opts(const t_options& options,
2929
t_ap_opts& apOpts);
30-
static void SetupPackerOpts(const t_options& Options,
30+
static void setup_packer_opts(const t_options& Options,
3131
t_packer_opts* PackerOpts);
32-
static void SetupPlacerOpts(const t_options& Options,
32+
static void setup_placer_opts(const t_options& Options,
3333
t_placer_opts* PlacerOpts);
34-
static void SetupAnnealSched(const t_options& Options,
34+
static void setup_anneal_sched(const t_options& Options,
3535
t_annealing_sched* AnnealSched);
36-
static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts);
37-
static void SetupNocOpts(const t_options& Options,
36+
static void setup_router_opts(const t_options& Options, t_router_opts* RouterOpts);
37+
static void setup_noc_opts(const t_options& Options,
3838
t_noc_opts* NocOpts);
39-
static void SetupServerOpts(const t_options& Options,
39+
static void setup_server_opts(const t_options& Options,
4040
t_server_opts* ServerOpts);
4141

42-
static void SetupRoutingArch(const t_arch& Arch, t_det_routing_arch& RoutingArch);
42+
static void setup_routing_arch(const t_arch& Arch, t_det_routing_arch& RoutingArch);
4343

44-
static void SetupTiming(const t_options& Options, const bool TimingEnabled, t_timing_inf* Timing);
45-
static void SetupSwitches(const t_arch& Arch,
44+
static void setup_timing(const t_options& Options, const bool TimingEnabled, t_timing_inf* Timing);
45+
static void setup_switches(const t_arch& Arch,
4646
t_det_routing_arch& RoutingArch,
4747
const std::vector<t_arch_switch_inf>& arch_switches);
48-
static void SetupAnalysisOpts(const t_options& Options, t_analysis_opts& analysis_opts);
49-
static void SetupPowerOpts(const t_options& Options, t_power_opts* power_opts, t_arch* Arch);
48+
static void setup_analysis_opts(const t_options& Options, t_analysis_opts& analysis_opts);
49+
static void setup_power_opts(const t_options& Options, t_power_opts* power_opts, t_arch* Arch);
5050

51-
static void SetupVibInf(const std::vector<t_physical_tile_type>& PhysicalTileTypes,
51+
static void setup_vib_inf(const std::vector<t_physical_tile_type>& PhysicalTileTypes,
5252
const std::vector<t_arch_switch_inf>& Switches,
5353
const std::vector<t_segment_inf>& Segments,
5454
std::vector<VibInf>& vib_infs);
5555

56-
static void ProcessFromOrToTokens(const std::vector<std::string> Tokens, const std::vector<t_physical_tile_type>& PhysicalTileTypes, const std::vector<t_segment_inf> segments, std::vector<t_from_or_to_inf>& froms);
56+
static void process_from_or_to_tokens(const std::vector<std::string> Tokens, const std::vector<t_physical_tile_type>& PhysicalTileTypes, const std::vector<t_segment_inf> segments, std::vector<t_from_or_to_inf>& froms);
5757
static void parse_pin_name(const char* src_string, int* start_pin_index, int* end_pin_index, char* pb_type_name, char* port_name);
5858

5959
/**
@@ -151,14 +151,14 @@ void SetupVPR(const t_options* options,
151151

152152
fileNameOpts->verify_file_digests = options->verify_file_digests;
153153

154-
SetupNetlistOpts(*options, *netlistOpts);
155-
SetupPlacerOpts(*options, placerOpts);
156-
SetupAnnealSched(*options, &placerOpts->anneal_sched);
157-
SetupRouterOpts(*options, routerOpts);
158-
SetupAnalysisOpts(*options, *analysisOpts);
159-
SetupPowerOpts(*options, powerOpts, arch);
160-
SetupNocOpts(*options, nocOpts);
161-
SetupServerOpts(*options, serverOpts);
154+
setup_netlist_opts(*options, *netlistOpts);
155+
setup_placer_opts(*options, placerOpts);
156+
setup_anneal_sched(*options, &placerOpts->anneal_sched);
157+
setup_router_opts(*options, routerOpts);
158+
setup_analysis_opts(*options, *analysisOpts);
159+
setup_power_opts(*options, powerOpts, arch);
160+
setup_noc_opts(*options, nocOpts);
161+
setup_server_opts(*options, serverOpts);
162162

163163
//save the device layout, which is required to parse the architecture file
164164
arch->device_layout = options->device_layout;
@@ -236,17 +236,17 @@ void SetupVPR(const t_options* options,
236236

237237
segments = arch->Segments;
238238

239-
SetupSwitches(*arch, routingArch, arch->switches);
240-
SetupRoutingArch(*arch, routingArch);
241-
SetupTiming(*options, timingenabled, timing);
242-
SetupPackerOpts(*options, packerOpts);
243-
SetupAPOpts(*options, *apOpts);
239+
setup_switches(*arch, routingArch, arch->switches);
240+
setup_routing_arch(*arch, routingArch);
241+
setup_timing(*options, timingenabled, timing);
242+
setup_packer_opts(*options, packerOpts);
243+
setup_ap_opts(*options, *apOpts);
244244
routingArch.write_rr_graph_filename = options->write_rr_graph_file;
245245
routingArch.read_rr_graph_filename = options->read_rr_graph_file;
246246
routingArch.read_rr_edge_override_filename = options->read_rr_edge_override_file;
247247

248248
if (!arch->vib_infs.empty()) {
249-
SetupVibInf(device_ctx.physical_tile_types, arch->switches, arch->Segments, arch->vib_infs);
249+
setup_vib_inf(device_ctx.physical_tile_types, arch->switches, arch->Segments, arch->vib_infs);
250250
}
251251

252252
for (auto has_global_routing : arch->layer_global_routing) {
@@ -353,7 +353,7 @@ void SetupVPR(const t_options* options,
353353
}
354354
}
355355

356-
static void SetupTiming(const t_options& Options, const bool TimingEnabled, t_timing_inf* Timing) {
356+
static void setup_timing(const t_options& Options, const bool TimingEnabled, t_timing_inf* Timing) {
357357
/* Don't do anything if they don't want timing */
358358
if (!TimingEnabled) {
359359
Timing->timing_analysis_enabled = false;
@@ -368,7 +368,7 @@ static void SetupTiming(const t_options& Options, const bool TimingEnabled, t_ti
368368
* @brief This loads up VPR's arch_switch_inf data by combining the switches
369369
* from the arch file with the special switches that VPR needs.
370370
*/
371-
static void SetupSwitches(const t_arch& Arch,
371+
static void setup_switches(const t_arch& Arch,
372372
t_det_routing_arch& RoutingArch,
373373
const std::vector<t_arch_switch_inf>& arch_switches) {
374374
auto& device_ctx = g_vpr_ctx.mutable_device();
@@ -425,7 +425,7 @@ static void SetupSwitches(const t_arch& Arch,
425425
*
426426
* Since checks are already done, this just copies values across
427427
*/
428-
static void SetupRoutingArch(const t_arch& Arch,
428+
static void setup_routing_arch(const t_arch& Arch,
429429
t_det_routing_arch& RoutingArch) {
430430
RoutingArch.switch_block_type = Arch.SBType;
431431
RoutingArch.switch_block_subtype = Arch.SBSubType;
@@ -451,7 +451,7 @@ static void SetupRoutingArch(const t_arch& Arch,
451451
RoutingArch.concat_pass_wire = Arch.concat_pass_wire;
452452
}
453453

454-
static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts) {
454+
static void setup_router_opts(const t_options& Options, t_router_opts* RouterOpts) {
455455
RouterOpts->do_check_rr_graph = Options.check_rr_graph;
456456
RouterOpts->astar_fac = Options.astar_fac;
457457
RouterOpts->astar_offset = Options.astar_offset;
@@ -539,7 +539,7 @@ static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts)
539539
RouterOpts->with_timing_analysis = Options.timing_analysis;
540540
}
541541

542-
static void SetupAnnealSched(const t_options& Options,
542+
static void setup_anneal_sched(const t_options& Options,
543543
t_annealing_sched* AnnealSched) {
544544
AnnealSched->alpha_t = Options.PlaceAlphaT;
545545
if (AnnealSched->alpha_t >= 1 || AnnealSched->alpha_t <= 0) {
@@ -575,7 +575,7 @@ static void SetupAnnealSched(const t_options& Options,
575575
* Error checking, such as checking for conflicting params is assumed
576576
* to be done beforehand
577577
*/
578-
void SetupAPOpts(const t_options& options,
578+
void setup_ap_opts(const t_options& options,
579579
t_ap_opts& apOpts) {
580580
apOpts.analytical_solver_type = options.ap_analytical_solver.value();
581581
apOpts.partial_legalizer_type = options.ap_partial_legalizer.value();
@@ -596,7 +596,7 @@ void SetupAPOpts(const t_options& options,
596596
* Error checking, such as checking for conflicting params is assumed
597597
* to be done beforehand
598598
*/
599-
void SetupPackerOpts(const t_options& Options,
599+
void setup_packer_opts(const t_options& Options,
600600
t_packer_opts* PackerOpts) {
601601
PackerOpts->output_file = Options.NetFile;
602602

@@ -627,7 +627,7 @@ void SetupPackerOpts(const t_options& Options,
627627
PackerOpts->timing_update_type = Options.timing_update_type;
628628
}
629629

630-
static void SetupNetlistOpts(const t_options& Options, t_netlist_opts& NetlistOpts) {
630+
static void setup_netlist_opts(const t_options& Options, t_netlist_opts& NetlistOpts) {
631631
NetlistOpts.const_gen_inference = Options.const_gen_inference;
632632
NetlistOpts.absorb_buffer_luts = Options.absorb_buffer_luts;
633633
NetlistOpts.sweep_dangling_primary_ios = Options.sweep_dangling_primary_ios;
@@ -643,7 +643,7 @@ static void SetupNetlistOpts(const t_options& Options, t_netlist_opts& NetlistOp
643643
* Error checking, such as checking for conflicting params
644644
* is assumed to be done beforehand
645645
*/
646-
static void SetupPlacerOpts(const t_options& Options, t_placer_opts* PlacerOpts) {
646+
static void setup_placer_opts(const t_options& Options, t_placer_opts* PlacerOpts) {
647647
if (Options.do_placement) {
648648
PlacerOpts->doPlacement = STAGE_DO;
649649
}
@@ -725,7 +725,7 @@ static void SetupPlacerOpts(const t_options& Options, t_placer_opts* PlacerOpts)
725725
PlacerOpts->placer_debug_net = Options.placer_debug_net;
726726
}
727727

728-
static void SetupAnalysisOpts(const t_options& Options, t_analysis_opts& analysis_opts) {
728+
static void setup_analysis_opts(const t_options& Options, t_analysis_opts& analysis_opts) {
729729
if (Options.do_analysis) {
730730
analysis_opts.doAnalysis = STAGE_DO;
731731
}
@@ -749,7 +749,7 @@ static void SetupAnalysisOpts(const t_options& Options, t_analysis_opts& analysi
749749
analysis_opts.generate_net_timing_report = Options.generate_net_timing_report;
750750
}
751751

752-
static void SetupPowerOpts(const t_options& Options, t_power_opts* power_opts, t_arch* Arch) {
752+
static void setup_power_opts(const t_options& Options, t_power_opts* power_opts, t_arch* Arch) {
753753
auto& device_ctx = g_vpr_ctx.mutable_device();
754754

755755
power_opts->do_power = Options.do_power;
@@ -774,7 +774,7 @@ static void SetupPowerOpts(const t_options& Options, t_power_opts* power_opts, t
774774
/*
775775
* Go through all the NoC options supplied by the user and store them internally.
776776
*/
777-
static void SetupNocOpts(const t_options& Options, t_noc_opts* NocOpts) {
777+
static void setup_noc_opts(const t_options& Options, t_noc_opts* NocOpts) {
778778
// assign the noc specific options from the command line
779779
NocOpts->noc = Options.noc;
780780
NocOpts->noc_flows_file = Options.noc_flows_file;
@@ -798,7 +798,7 @@ static void SetupNocOpts(const t_options& Options, t_noc_opts* NocOpts) {
798798
NocOpts->noc_placement_file_name = Options.noc_placement_file_name;
799799
}
800800

801-
static void SetupServerOpts(const t_options& Options, t_server_opts* ServerOpts) {
801+
static void setup_server_opts(const t_options& Options, t_server_opts* ServerOpts) {
802802
ServerOpts->is_server_mode_enabled = Options.is_server_mode_enabled;
803803
ServerOpts->port_num = Options.server_port_num;
804804
}
@@ -1040,7 +1040,7 @@ static void do_reachability_analysis(t_physical_tile_type* physical_tile,
10401040
}
10411041
}
10421042

1043-
static void SetupVibInf(const std::vector<t_physical_tile_type>& PhysicalTileTypes,
1043+
static void setup_vib_inf(const std::vector<t_physical_tile_type>& PhysicalTileTypes,
10441044
const std::vector<t_arch_switch_inf>& switches,
10451045
const std::vector<t_segment_inf>& Segments,
10461046
std::vector<VibInf>& vib_infs) {
@@ -1068,7 +1068,7 @@ static void SetupVibInf(const std::vector<t_physical_tile_type>& PhysicalTileTyp
10681068
for (auto& first_stage : first_stages) {
10691069
auto& from_tokens = first_stage.from_tokens;
10701070
for (const auto& from_token : from_tokens) {
1071-
ProcessFromOrToTokens(from_token, PhysicalTileTypes, Segments, first_stage.froms);
1071+
process_from_or_to_tokens(from_token, PhysicalTileTypes, Segments, first_stage.froms);
10721072
}
10731073
}
10741074
vib_inf.set_first_stages(first_stages);
@@ -1077,22 +1077,22 @@ static void SetupVibInf(const std::vector<t_physical_tile_type>& PhysicalTileTyp
10771077
for (auto& second_stage : second_stages) {
10781078
std::vector<t_from_or_to_inf> tos;
10791079

1080-
ProcessFromOrToTokens(second_stage.to_tokens, PhysicalTileTypes, Segments, tos);
1080+
process_from_or_to_tokens(second_stage.to_tokens, PhysicalTileTypes, Segments, tos);
10811081
for (auto& to : tos) {
10821082
VTR_ASSERT(to.from_type == SEGMENT || to.from_type == PB);
10831083
second_stage.to.push_back(to);
10841084
}
10851085

10861086
auto from_tokens = second_stage.from_tokens;
10871087
for (const auto& from_token : from_tokens) {
1088-
ProcessFromOrToTokens(from_token, PhysicalTileTypes, Segments, second_stage.froms);
1088+
process_from_or_to_tokens(from_token, PhysicalTileTypes, Segments, second_stage.froms);
10891089
}
10901090
}
10911091
vib_inf.set_second_stages(second_stages);
10921092
}
10931093
}
10941094

1095-
static void ProcessFromOrToTokens(const std::vector<std::string> Tokens, const std::vector<t_physical_tile_type>& PhysicalTileTypes, const std::vector<t_segment_inf> segments, std::vector<t_from_or_to_inf>& froms) {
1095+
static void process_from_or_to_tokens(const std::vector<std::string> Tokens, const std::vector<t_physical_tile_type>& PhysicalTileTypes, const std::vector<t_segment_inf> segments, std::vector<t_from_or_to_inf>& froms) {
10961096
for (int i_token = 0; i_token < (int)Tokens.size(); i_token++) {
10971097
std::string Token = Tokens[i_token];
10981098
const char* Token_char = Token.c_str();

0 commit comments

Comments
 (0)