Skip to content

Commit 90c70e0

Browse files
[Infra] Cleaned Up Includes in Analysis, Power, and Util Dirs
Continued the cleanup into the analysis, power, and util directories. Nothing majorly changed.
1 parent 0391d48 commit 90c70e0

18 files changed

+15
-61
lines changed

vpr/src/analysis/timing_reports.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
#include "timing_reports.h"
22

33
#include <fstream>
4-
#include <sstream>
54

65
#include "timing_reports.h"
7-
#include "rr_graph.h"
86

97
#include "tatum/TimingReporter.hpp"
108

11-
#include "vtr_version.h"
129
#include "vpr_types.h"
1310
#include "globals.h"
1411

vpr/src/analysis/timing_reports.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#ifndef VPR_TIMING_REPORTS_H
2-
#define VPR_TIMING_REPORTS_H
1+
#pragma once
32

43
#include "timing_info_fwd.h"
54
#include "AnalysisDelayCalculator.h"
@@ -45,5 +44,3 @@ void generate_hold_timing_stats(const std::string& prefix,
4544
void generate_net_timing_report(const std::string& prefix,
4645
const SetupHoldTimingInfo& timing_info,
4746
const AnalysisDelayCalculator& delay_calc);
48-
49-
#endif

vpr/src/power/PowerSpicedComponent.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
*
1616
********************************************************************/
1717

18-
#ifndef __POWER_POWERSPICEDCOMPONENT_NMOS_H__
19-
#define __POWER_POWERSPICEDCOMPONENT_NMOS_H__
18+
#pragma once
2019

2120
#include <vector>
2221
#include <string>
@@ -85,5 +84,3 @@ class PowerSpicedComponent {
8584
bool is_done_callibration();
8685
void print(FILE* fp);
8786
};
88-
89-
#endif

vpr/src/power/power.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
*/
2323

2424
/************************* INCLUDES *********************************/
25-
#include <list>
26-
2725
#include "vpr_types.h"
2826
#include "PowerSpicedComponent.h"
2927

vpr/src/power/power_callibrate.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,11 @@
2020
*/
2121

2222
/************************* INCLUDES *********************************/
23-
#include <iostream>
24-
2523
#include "vtr_assert.h"
26-
#include "vtr_memory.h"
2724

2825
#include "power_callibrate.h"
2926
#include "power_components.h"
30-
#include "power_lowlevel.h"
3127
#include "power_util.h"
32-
#include "power_cmos_tech.h"
3328
#include "globals.h"
3429

3530
/************************* FUNCTION DECLARATIONS ********************/

vpr/src/power/power_callibrate.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121

2222
#pragma once
2323

24-
/************************* INCLUDES *********************************/
25-
#include "power.h"
26-
2724
/************************* DEFINES **********************************/
2825
const float power_callib_period = 5e-9;
2926

vpr/src/power/power_cmos_tech.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,12 @@
2929
#include "pugixml.hpp"
3030
#include "pugixml_util.hpp"
3131

32-
#include "vtr_util.h"
33-
#include "vtr_memory.h"
34-
#include "vtr_math.h"
35-
3632
#include "vpr_error.h"
3733

3834
#include "globals.h"
3935
#include "power_cmos_tech.h"
4036
#include "power.h"
4137
#include "power_util.h"
42-
#include "read_xml_util.h"
4338
#include "PowerSpicedComponent.h"
4439
#include "power_callibrate.h"
4540

vpr/src/power/power_cmos_tech.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
* these data structures.
2323
*/
2424

25-
#ifndef __POWER_CMOS_TECH_H__
26-
#define __POWER_CMOS_TECH_H__
25+
#pragma once
2726

2827
/************************* INCLUDES *********************************/
2928
#include "power.h"
@@ -50,4 +49,3 @@ void power_find_buffer_sc_levr(t_power_buffer_sc_levr_inf** lower,
5049
t_power_buffer_sc_levr_inf** upper,
5150
t_power_buffer_strength_inf* buffer_sc,
5251
int input_mux_size);
53-
#endif

vpr/src/power/power_components.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#include "vtr_math.h"
2929
#include "vtr_assert.h"
30-
#include "vtr_memory.h"
3130

3231
#include "power_components.h"
3332
#include "power_lowlevel.h"

vpr/src/power/power_components.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
* within the FPGA (flip-flops, LUTs, interconnect structures, etc).
2121
*/
2222

23-
#ifndef __POWER_COMPONENTS_H__
24-
#define __POWER_COMPONENTS_H__
23+
#pragma once
2524

2625
/************************* INCLUDES *********************************/
2726
#include <string>
2827
#include "power.h"
29-
#include "clustered_netlist.h"
3028

3129
/************************* Defines **********************************/
3230

@@ -93,5 +91,3 @@ void power_usage_mux_multilevel(t_power_usage* power_usage,
9391
bool output_level_restored,
9492
float period);
9593
void power_usage_buffer(t_power_usage* power_usage, float size, float in_prob, float in_dens, bool level_restored, float period);
96-
97-
#endif

vpr/src/power/power_lowlevel.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
* components (inverters, simple multiplexers, etc)
2121
*/
2222

23-
#ifndef __POWER_LOW_LEVEL_H__
24-
#define __POWER_LOW_LEVEL_H__
23+
#pragma once
2524

2625
/************************* INCLUDES *********************************/
27-
#include "power.h"
26+
#include "physical_types.h"
27+
#include "vpr_types.h"
2828

2929
/************************* GLOBALS **********************************/
3030

@@ -89,5 +89,3 @@ float power_calc_mux_v_out(int num_inputs, float transistor_size, float v_in, fl
8989
float power_calc_node_switching(float capacitance, float density, float period);
9090

9191
float power_calc_buffer_size_from_Cout(float C_out);
92-
93-
#endif

vpr/src/power/power_sizing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
#include "logic_types.h"
2929
#include "vtr_util.h"
3030
#include "vtr_assert.h"
31-
#include "vtr_memory.h"
3231

3332
#include "power_sizing.h"
3433
#include "power.h"
3534
#include "globals.h"
3635
#include "power_util.h"
3736
#include "vpr_utils.h"
37+
3838
/************************ FILE SCOPE *********************************/
3939
static double f_MTA_area;
4040

vpr/src/power/power_sizing.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@
2020
* FPGA, for physical size estimations
2121
*/
2222

23-
#ifndef __POWER_TRANSISTOR_CNT_H__
24-
#define __POWER_TRANSISTOR_CNT_H__
25-
26-
/************************* INCLUDES *********************************/
27-
#include "physical_types.h"
23+
#pragma once
2824

2925
/************************* DEFINES **********************************/
3026

@@ -42,4 +38,3 @@
4238
void power_sizing_init();
4339
double power_count_transistors_buffer(float buffer_size);
4440
double power_transistor_area(double num_transistors);
45-
#endif

vpr/src/power/power_util.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <string>
2727

2828
#include "vtr_assert.h"
29-
#include "vtr_memory.h"
3029

3130
#include "power_util.h"
3231
#include "globals.h"

vpr/src/power/power_util.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@
1919
* This file provides utility functions used by power estimation.
2020
*/
2121

22-
#ifndef __POWER_UTIL_H__
23-
#define __POWER_UTIL_H__
22+
#pragma once
2423

2524
/************************* INCLUDES *********************************/
2625
#include <string>
2726
#include "power.h"
28-
#include "power_components.h"
2927
#include "atom_netlist.h"
30-
#include "clustered_netlist.h"
3128

3229
/************************* FUNCTION DECLARATIONS ********************/
3330

@@ -75,5 +72,3 @@ void output_log(t_log* log_ptr, FILE* fp);
7572
void output_logs(FILE* fp, t_log* logs, int num_logs);
7673

7774
void power_print_title(FILE* fp, const char* title);
78-
79-
#endif

vpr/src/util/hash.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include <cstdlib>
22
#include <cstring>
33

4-
#include "vtr_memory.h"
54
#include "vtr_log.h"
65

76
#include "hash.h"

vpr/src/util/hash.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
#pragma once
2+
13
#define HASHSIZE 5000001
2-
#include <iostream>
4+
35
#include <string>
46

57
struct t_hash {

vpr/src/util/vpr_net_pins_matrix.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
#ifndef VPR_NET_PINS_MATRIX_H
2-
#define VPR_NET_PINS_MATRIX_H
1+
#pragma once
32

4-
#include "atom_netlist_fwd.h"
3+
#include "atom_netlist.h"
54
#include "clustered_netlist.h"
65
#include "clustered_netlist_fwd.h"
76
#include "netlist_fwd.h"
@@ -45,5 +44,3 @@ NetPinsMatrix<T> make_net_pins_matrix(const Netlist<>& nlist, T default_value =
4544

4645
return NetPinsMatrix<T>(nlist.nets().size(), pins_in_net, default_value);
4746
}
48-
49-
#endif

0 commit comments

Comments
 (0)