00001 #ifndef __HOTSPOT_IFACE_H_
00002 #define __HOTSPOT_IFACE_H_
00003
00004 #define STR_SIZE 512
00005 #define MAX_UNITS 8192
00006 #define NULLFILE "(null)"
00007 #define BLOCK_MODEL 0
00008 #define GRID_MODEL 1
00009
00010
00011 typedef struct unit_t_st
00012 {
00013 char name[STR_SIZE];
00014 double width;
00015 double height;
00016 double leftx;
00017 double bottomy;
00018 }unit_t;
00019 typedef struct flp_t_st
00020 {
00021 unit_t *units;
00022 int n_units;
00023 double **wire_density;
00024 } flp_t;
00025
00026
00027
00028
00029
00030
00031
00032
00033 flp_t *read_flp(char *file, int read_connects);
00034
00035
00036
00037
00038
00039 void free_flp(flp_t *flp, int compacted);
00040
00041
00042 typedef struct thermal_config_t_st
00043 {
00044 double t_chip;
00045 double thermal_threshold;
00046 double c_convec;
00047 double r_convec;
00048 double s_sink;
00049 double t_sink;
00050 double s_spreader;
00051 double t_spreader;
00052 double t_interface;
00053 double ambient;
00054 char init_file[STR_SIZE];
00055 double init_temp;
00056 char steady_file[STR_SIZE];
00057 double sampling_intvl;
00058 double base_proc_freq;
00059 int dtm_used;
00060 char model_type[STR_SIZE];
00061 int block_omit_lateral;
00062 int grid_rows;
00063 int grid_cols;
00064 char grid_layer_file[STR_SIZE];
00065 char grid_steady_file[STR_SIZE];
00066 char grid_map_mode[STR_SIZE];
00067 }thermal_config_t;
00068
00069
00070
00071
00072
00073
00074 thermal_config_t default_thermal_config(void);
00075
00076
00077 struct block_model_t_st;
00078 struct grid_model_t_st;
00079 typedef struct RC_model_t_st
00080 {
00081 union
00082 {
00083 struct block_model_t_st *block;
00084 struct grid_model_t_st *grid;
00085 };
00086 int type;
00087 thermal_config_t *config;
00088 }RC_model_t;
00089
00090
00091
00092
00093
00094
00095
00096
00097 RC_model_t *alloc_RC_model(thermal_config_t *config, flp_t *placeholder);
00098
00099
00100 void delete_RC_model(RC_model_t *model);
00101
00102
00103
00104
00105
00106 void populate_R_model(RC_model_t *model, flp_t *flp);
00107
00108
00109
00110
00111 void populate_C_model(RC_model_t *model, flp_t *flp);
00112
00113
00114 double *hotspot_vector(RC_model_t *model);
00115
00116
00117 void free_dvector(double *v);
00118
00119
00120
00121
00122 void dump_temp (RC_model_t *model, double *temp, char *file);
00123
00124
00125
00126
00127
00128 void set_temp (RC_model_t *model, double *temp, double val);
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138 void read_temp (RC_model_t *model, double *temp, char *file, int clip);
00139
00140
00141
00142
00143
00144
00145
00146
00147 void steady_state_temp(RC_model_t *model, double *power, double *temp);
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 void compute_temp(RC_model_t *model, double *power, double *temp, double time_elapsed);
00159
00160 #endif