VPR-7.0
|
#include <cstring>
#include <assert.h>
#include "power_components.h"
#include "power_lowlevel.h"
#include "power_util.h"
#include "power_callibrate.h"
#include "globals.h"
Go to the source code of this file.
Functions | |
static void | power_usage_mux_rec (t_power_usage *power_usage, float *out_prob, float *out_dens, float *v_out, t_mux_node *mux_node, t_mux_arch *mux_arch, int *selector_values, float *primary_input_prob, float *primary_input_dens, boolean v_out_restored, float period) |
void | power_components_init (void) |
void | power_components_uninit (void) |
void | power_component_add_usage (t_power_usage *power_usage, e_power_component_type component_idx) |
void | power_component_get_usage (t_power_usage *power_usage, e_power_component_type component_idx) |
float | power_component_get_usage_sum (e_power_component_type component_idx) |
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_prob, float *input_dens, float period) |
void | power_usage_local_interc_mux (t_power_usage *power_usage, t_pb *pb, t_interconnect_pins *interc_pins) |
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) |
void | power_usage_buffer (t_power_usage *power_usage, float size, float in_prob, float in_dens, boolean level_restorer, float period) |
Variables | |
t_power_components | g_power_by_component |
void power_component_add_usage | ( | t_power_usage * | power_usage, |
e_power_component_type | component_idx | ||
) |
Adds power usage for a component to the global component tracker
Definition at line 74 of file power_components.c.
void power_component_get_usage | ( | t_power_usage * | power_usage, |
e_power_component_type | component_idx | ||
) |
Gets power usage for a component
Definition at line 85 of file power_components.c.
float power_component_get_usage_sum | ( | e_power_component_type | component_idx | ) |
Returns total power for a given component
Definition at line 95 of file power_components.c.
void power_components_init | ( | void | ) |
Module initializer function, called by power_init
Definition at line 52 of file power_components.c.
void power_components_uninit | ( | void | ) |
Module un-initializer function, called by power_uninit
Definition at line 65 of file power_components.c.
void power_usage_buffer | ( | t_power_usage * | power_usage, |
float | size, | ||
float | in_prob, | ||
float | in_dens, | ||
boolean | level_restorer, | ||
float | period | ||
) |
This function calculates the power of a multistage buffer
Definition at line 633 of file power_components.c.
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 | ||
) |
Calculates power of a D flip-flop
Definition at line 109 of file power_components.c.
void power_usage_local_interc_mux | ( | t_power_usage * | power_usage, |
t_pb * | pb, | ||
t_interconnect_pins * | interc_pins | ||
) |
This function calculates power of a local interconnect structure
Definition at line 404 of file power_components.c.
void power_usage_lut | ( | t_power_usage * | power_usage, |
int | lut_size, | ||
float | transistor_size, | ||
char * | SRAM_values, | ||
float * | input_prob, | ||
float * | input_dens, | ||
float | period | ||
) |
Calculated power of a look-up table (LUT)
NOTE: The following provides a diagram of a 3-LUT, the sram bit ordering, and the input array ordering.
X - NMOS gate controlled by complement of input Z - NMOS gate controlled by input
S R I I I A N N N M 2 1 0 | | | | v v | | v | 0 X | |_X_ v 1 Z| | |_X_ 2 X | | |_Z_| | 3 Z| | |---— out 4 X | |_X_ | 5 Z| | | |_Z_| 6 X | |_Z_| 7 Z|
Definition at line 208 of file power_components.c.
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 | ||
) |
This calculates the power of a multilevel multiplexer, with static inputs
Definition at line 530 of file power_components.c.
|
static |
Internal function, used recursively by power_calc_mux
Definition at line 571 of file power_components.c.
t_power_components g_power_by_component |
Definition at line 38 of file power_components.c.