52 const void * elem_void);
54 const void * elem_void);
56 const void * elem_void);
59 const void * elem_void);
61 const void * elem_void);
65 float (*usage_fn)(
int num_inputs,
float transistor_size));
83 "The CMOS technology behavior file ('%s') does not exist. No power information will be calculated.",
84 cmos_tech_behavior_filepath);
156 float (*usage_fn)(
int num_inputs,
float transistor_size)) {
172 (*component)->add_data_point(num_inputs, transistor_size, power);
218 static void power_tech_xml_load_sc(
ezxml_t parent) {
221 int num_buffer_sizes;
295 int num_leakage_pairs;
427 ezxml_t child, prev, grandchild;
433 if (strcmp(prop,
"nmos") == 0) {
435 }
else if (strcmp(prop,
"pmos") == 0) {
452 grandchild,
"subthreshold",
TRUE, 0);
480 grandchild,
"subthreshold",
TRUE, 0);
515 float min_size, max_size;
516 boolean error =
FALSE;
524 }
else if (type ==
PMOS) {
533 "No transistor information exists. Cannot determine transistor properties.");
548 if (size < min_size) {
550 assert(found == &trans_info->
size_inf[0]);
552 "Using %s transistor of size '%f', which is smaller than the smallest modeled transistor (%f) in the technology behavior file.",
557 }
else if (size > max_size) {
564 "Using %s transistor of size '%f', which is larger than the largest modeled transistor (%f) in the technology behavior file.",
631 assert(stage_gain >= min_size && stage_gain <= max_size);
639 if (stage_gain == max_size) {
664 assert(input_mux_size >= 1);
675 if (input_mux_size > max_size) {
682 "Using buffer driven by mux of size '%d', which is larger than the largest modeled size (%d) in the technology behavior file.",
683 input_mux_size, max_size);
697 const void * elem_void) {
719 }
else if (key->
v_ds < elem->
v_ds) {
721 }
else if (key->
v_ds > next->
v_ds) {
763 const void * elem_void) {
803 const void * elem_void) {
827 const void * elem_void) {
857 }
else if (key->
size < elem->
size) {
869 const void * elem_void) {
891 }
else if (key->
v_in < elem->
v_in) {
893 }
else if (key->
v_in > next->
v_in) {
t_power_tech * g_power_tech
static int power_compare_buffer_strength(const void *key_void, const void *elem_void)
float power_usage_mux_for_callibration(int num_inputs, float transistor_size)
t_transistor_size_inf * size_inf
PowerSpicedComponent ** component_callibration
static t_transistor_inf * g_transistor_last_searched
t_transistor_inf PMOS_inf
t_power_mux_volt_inf * mux_voltage_inf
t_power_commonly_used * g_power_commonly_used
static int power_compare_buffer_sc_levr(const void *key_void, const void *elem_void)
t_power_buffer_sc_levr_inf * sc_levr_inf
t_power_nmos_leakage_pair * leakage_pairs
static int power_compare_transistor_size(const void *key_void, const void *elem_void)
static t_power_mux_volt_inf * g_mux_volt_last_searched
void * my_calloc(size_t nelem, size_t size)
t_power_nmos_mux_inf * nmos_mux_info
static void power_tech_xml_load_components(ezxml_t parent)
static void process_tech_xml_load_transistor_info(ezxml_t parent)
t_power_nmos_leakage_inf * g_power_searching_nmos_leakage_info
static int power_compare_leakage_pair(const void *key_void, const void *elem_void)
float power_usage_ff_for_callibration(int num_inputs, float transistor_size)
static void power_tech_xml_load_nmos_st_leakages(ezxml_t parent)
static void power_tech_xml_load_component(ezxml_t parent, PowerSpicedComponent **component, char *name, float(*usage_fn)(int num_inputs, float transistor_size))
t_power_buffer_strength_inf * strength_inf
static t_power_buffer_strength_inf * g_buffer_strength_last_searched
float power_usage_buf_for_callibration(int num_inputs, float transistor_size)
ezxml_t ezxml_set_attr(ezxml_t xml, char *name, char *value)
void power_find_buffer_sc_levr(t_power_buffer_sc_levr_inf **lower, t_power_buffer_sc_levr_inf **upper, t_power_buffer_strength_inf *buffer_strength, int input_mux_size)
static void * my_malloc(int ibytes)
ezxml_t FindElement(INP ezxml_t Parent, INP const char *Name, INP boolean Required)
static int power_compare_voltage_pair(const void *key_void, const void *elem_void)
float power_usage_lut_for_callibration(int num_inputs, float transistor_size)
static void power_tech_load_xml_file(char *cmos_tech_behavior_filepath)
void power_tech_init(char *cmos_tech_behavior_filepath)
void power_find_nmos_leakage(t_power_nmos_leakage_inf *nmos_leakage_info, t_power_nmos_leakage_pair **lower, t_power_nmos_leakage_pair **upper, float v_ds)
void FreeNode(INOUTP ezxml_t Node)
int num_nmos_leakage_info
ezxml_t FindFirstElement(INP ezxml_t Parent, INP const char *Name, INP boolean Required)
void power_find_mux_volt_inf(t_power_mux_volt_pair **lower, t_power_mux_volt_pair **upper, t_power_mux_volt_inf *volt_inf, float v_in)
t_power_nmos_leakage_inf * nmos_leakage_info
int GetIntProperty(INP ezxml_t Parent, INP char *Name, INP boolean Required, INP int default_value)
float GetFloatProperty(INP ezxml_t Parent, INP char *Name, INP boolean Required, INP float default_value)
boolean file_exists(const char *filename)
float leakage_subthreshold
ezxml_t ezxml_parse_file(const char *file)
int CountChildren(INP ezxml_t Node, INP const char *Name, INP int min_count)
t_transistor_inf NMOS_inf
t_power_buffer_size_inf * buffer_size_inf
char * transistor_type_name(e_tx_type type)
void power_find_buffer_strength_inf(t_power_buffer_strength_inf **lower, t_power_buffer_strength_inf **upper, t_power_buffer_size_inf *size_inf, float stage_gain)
t_transistor_size_inf * long_trans_inf
boolean power_find_transistor_info(t_transistor_size_inf **lower, t_transistor_size_inf **upper, e_tx_type type, float size)
const char * FindProperty(INP ezxml_t Parent, INP const char *Name, INP boolean)
static void power_tech_xml_load_multiplexer_info(ezxml_t parent)
void power_log_msg(e_power_log_type log_type, char *msg)
float power_usage_buf_levr_for_callibration(int num_inputs, float transistor_size)
t_power_mux_volt_pair * mux_voltage_pairs