VPR-7.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
power_components.h
Go to the documentation of this file.
1 /*********************************************************************
2  * The following code is part of the power modelling feature of VTR.
3  *
4  * For support:
5  * http://code.google.com/p/vtr-verilog-to-routing/wiki/Power
6  *
7  * or email:
8  * vtr.power.estimation@gmail.com
9  *
10  * If you are using power estimation for your researach please cite:
11  *
12  * Jeffrey Goeders and Steven Wilton. VersaPower: Power Estimation
13  * for Diverse FPGA Architectures. In International Conference on
14  * Field Programmable Technology, 2012.
15  *
16  ********************************************************************/
17 
18 /**
19  * This file offers functions to estimate power of major components
20  * within the FPGA (flip-flops, LUTs, interconnect structures, etc).
21  */
22 
23 #ifndef __POWER_COMPONENTS_H__
24 #define __POWER_COMPONENTS_H__
25 
26 /************************* INCLUDES *********************************/
27 #include "power.h"
28 
29 /************************* Defines **********************************/
30 
31 /* This controlls the level of accuracy used for transition density
32  * calculations of internal LUT nodes. The more detailed model
33  * looks at SRAM values in deciding if toggles on the inputs will
34  * toggle the internal nets. The fast method uses only signal
35  * probabilities.
36  */
37 #define POWER_LUT_SLOW
38 #if (!(defined(POWER_LUT_SLOW) || defined(POWER_LUT_FAST)))
39 #define POWER_LUT_SLOW
40 #endif
41 
42 /************************* ENUMS ************************************/
43 typedef enum {
45  POWER_COMPONENT_TOTAL, /* Total power for entire FPGA */
46 
47  POWER_COMPONENT_ROUTING, /* Power for routing fabric (not local routing) */
48  POWER_COMPONENT_ROUTE_SB, /* Switch-box */
49  POWER_COMPONENT_ROUTE_CB, /* Connection box*/
51 
52  POWER_COMPONENT_CLOCK, /* Clock network */
53  POWER_COMPONENT_CLOCK_BUFFER, /* Buffers in clock network */
54  POWER_COMPONENT_CLOCK_WIRE, /* Wires in clock network */
55 
56  POWER_COMPONENT_PB, /* Logic Blocks, and other hard blocks */
57  POWER_COMPONENT_PB_PRIMITIVES, /* Primitives (LUTs, FF, etc) */
58  POWER_COMPONENT_PB_INTERC_MUXES, /* Local interconnect structures (muxes) */
59  POWER_COMPONENT_PB_BUFS_WIRE, /* Local buffers and wire capacitance */
60 
61  POWER_COMPONENT_PB_OTHER, /* Power from other estimation methods - not transistor-level */
62 
65 
66 /************************* STRUCTS **********************************/
68 
71 };
72 
73 /************************* FUNCTION DECLARATIONS ********************/
75 
76 /************************* FUNCTION DECLARATIONS ********************/
77 
78 void power_components_init(void);
79 void power_components_uninit(void);
80 void power_component_get_usage(t_power_usage * power_usage,
81  e_power_component_type component_idx);
82 void power_component_add_usage(t_power_usage * power_usage,
83  e_power_component_type component_idx);
85 
86 void power_usage_ff(t_power_usage * power_usage, float size, float D_prob,
87  float D_dens, float Q_prob, float Q_dens, float clk_prob,
88  float clk_dens, float period);
89 void power_usage_lut(t_power_usage * power_usage, int LUT_size,
90  float transistor_size, char * SRAM_values, float * input_densities,
91  float * input_probabilities, float period);
92 void power_usage_local_interc_mux(t_power_usage * power_usage, t_pb * pb,
93  t_interconnect_pins * interc_pins);
94 void power_usage_mux_multilevel(t_power_usage * power_usage,
95  t_mux_arch * mux_arch, float * in_prob, float * in_dens,
96  int selected_input, boolean output_level_restored, float period);
97 void power_usage_buffer(t_power_usage * power_usage, float size, float in_prob,
98  float in_dens, boolean level_restored, float period);
99 
100 #endif
void power_component_get_usage(t_power_usage *power_usage, e_power_component_type component_idx)
void power_usage_local_interc_mux(t_power_usage *power_usage, t_pb *pb, t_interconnect_pins *interc_pins)
float power_component_get_usage_sum(e_power_component_type component_idx)
t_power_components g_power_by_component
e_power_component_type
void power_components_init(void)
void power_usage_ff(t_power_usage *power_usage, float size, float D_prob, float D_dens, float Q_prob, float Q_dens, float clk_prob, float clk_dens, float period)
void power_usage_lut(t_power_usage *power_usage, int LUT_size, float transistor_size, char *SRAM_values, float *input_densities, float *input_probabilities, float period)
void power_component_add_usage(t_power_usage *power_usage, e_power_component_type component_idx)
void power_usage_buffer(t_power_usage *power_usage, float size, float in_prob, float in_dens, boolean level_restored, float period)
void power_components_uninit(void)
void power_usage_mux_multilevel(t_power_usage *power_usage, t_mux_arch *mux_arch, float *in_prob, float *in_dens, int selected_input, boolean output_level_restored, float period)
t_power_usage * components