VPR-7.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
power_util.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 provides utility functions used by power estimation.
20  */
21 
22 #ifndef __POWER_UTIL_H__
23 #define __POWER_UTIL_H__
24 
25 /************************* INCLUDES *********************************/
26 #include "power.h"
27 #include "power_components.h"
28 
29 /************************* FUNCTION DECLARATIONS ********************/
30 
31 /* Pins */
32 float pin_dens(t_pb * pb, t_pb_graph_pin * pin);
33 float pin_prob(t_pb * pb, t_pb_graph_pin * pin);
34 int power_calc_pin_fanout(t_pb_graph_pin * pin, int mode_idx);
35 void pb_foreach_pin(t_pb_graph_node * pb_node,
36  void (*fn)(t_pb_graph_pin *, void *), void * context);
37 
38 /* Power Usage */
39 void power_zero_usage(t_power_usage * power_usage);
40 void power_add_usage(t_power_usage * dest, const t_power_usage * src);
41 void power_scale_usage(t_power_usage * power_usage, float scale_factor);
42 float power_sum_usage(t_power_usage * power_usage);
43 float power_perc_dynamic(t_power_usage * power_usage);
44 
45 /* Message Logger */
46 void power_log_msg(e_power_log_type log_type, char * msg);
47 
48 /* Buffers */
49 int power_calc_buffer_num_stages(float final_stage_size, float desired_stage_effort);
50 float calc_buffer_stage_effort(int N, float final_stage_size);
51 float power_buffer_size_from_logical_effort(float C_load);
52 
53 /* Multiplexers */
54 boolean mux_find_selector_values(int * selector_values, t_mux_node * mux_node,
55  int selected_input_pin);
56 t_mux_arch * power_get_mux_arch(int num_mux_inputs, float transistor_size);
57 void mux_arch_fix_levels(t_mux_arch * mux_arch);
58 
59 /* Power Methods */
61  e_power_estimation_method estimation_method);
64 
65 char * transistor_type_name(e_tx_type type);
66 char * alloc_SRAM_values_from_truth_table(int LUT_size,
67  t_linked_vptr * truth_table);
68 float clb_net_density(int net_idx);
69 char * interconnect_type_name(enum e_interconnect type);
70 float clb_net_prob(int net_idx);
71 
72 void output_log(t_log * log_ptr, FILE * fp);
73 
74 void output_logs(FILE * fp, t_log * logs, int num_logs);
75 
76 void power_print_title(FILE * fp, char * title);
77 
78 #endif
float clb_net_density(int net_idx)
Definition: power_util.c:420
void output_logs(FILE *fp, t_log *logs, int num_logs)
Definition: power_util.c:457
enum e_power_estimation_method_ e_power_estimation_method
boolean power_method_is_transistor_level(e_power_estimation_method estimation_method)
Definition: power_util.c:576
void output_log(t_log *log_ptr, FILE *fp)
Definition: power_util.c:449
void mux_arch_fix_levels(t_mux_arch *mux_arch)
Definition: power_util.c:413
float power_sum_usage(t_power_usage *power_usage)
Definition: power_util.c:59
float power_buffer_size_from_logical_effort(float C_load)
Definition: power_util.c:469
float clb_net_prob(int net_idx)
Definition: power_util.c:428
void power_log_msg(e_power_log_type log_type, char *msg)
Definition: power_util.c:67
e_power_log_type
Definition: power.h:47
void pb_foreach_pin(t_pb_graph_node *pb_node, void(*fn)(t_pb_graph_pin *, void *), void *context)
float pin_prob(t_pb *pb, t_pb_graph_pin *pin)
Definition: power_util.c:96
void power_scale_usage(t_power_usage *power_usage, float scale_factor)
Definition: power_util.c:54
char * alloc_SRAM_values_from_truth_table(int LUT_size, t_linked_vptr *truth_table)
Definition: power_util.c:273
int power_calc_buffer_num_stages(float final_stage_size, float desired_stage_effort)
Definition: power_util.c:179
char * transistor_type_name(e_tx_type type)
Definition: power_util.c:71
t_mux_arch * power_get_mux_arch(int num_mux_inputs, float transistor_size)
Definition: power_util.c:490
float calc_buffer_stage_effort(int N, float final_stage_size)
Definition: power_util.c:204
float power_perc_dynamic(t_power_usage *power_usage)
Definition: power_util.c:63
void power_print_title(FILE *fp, char *title)
Definition: power_util.c:475
int power_calc_pin_fanout(t_pb_graph_pin *pin, int mode_idx)
void power_zero_usage(t_power_usage *power_usage)
Definition: power_util.c:44
float pin_dens(t_pb *pb, t_pb_graph_pin *pin)
Definition: power_util.c:81
char * interconnect_type_name(enum e_interconnect type)
Definition: power_util.c:436
e_interconnect
Definition: power.h:205
boolean power_method_is_recursive(e_power_estimation_method method)
Definition: power_util.c:587
void power_add_usage(t_power_usage *dest, const t_power_usage *src)
Definition: power_util.c:49
e_tx_type
Definition: power.h:88
boolean mux_find_selector_values(int *selector_values, t_mux_node *mux_node, int selected_input_pin)
Definition: power_util.c:119