• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

sst/core/techModels/libHotSpot/temperature_block.h

00001 #ifndef __TEMPERATURE_BLOCK_H_
00002 #define __TEMPERATURE_BLOCK_H_
00003 
00004 #include "temperature.h"
00005 
00006 /* functional block layers      */
00007 /* total        */
00008 #define NL      4
00009 /* silicon is always layer 0    */
00010 /* interface layer      */
00011 #define IFACE   1
00012 /* heat spreader        */
00013 #define HSP     2
00014 /* heat sink */
00015 #define HSINK 3
00016 
00017 /* block thermal model  */
00018 typedef struct block_model_t_st
00019 {
00020         /* floorplan    */
00021         flp_t *flp;
00022 
00023         /* configuration        */
00024         thermal_config_t config;
00025 
00026         /* main matrices        */
00027         /* conductance matrix */
00028         double **b;
00029         /* LUP decomposition of b       */
00030         double **lu; 
00031         int *p;
00032         /* diagonal capacitance matrix stored as a 1-d vector   */
00033         double *a; 
00034         /* inverse of the above */
00035         double *inva;
00036         /* c = inva * b */
00037         double **c;
00038 
00039         /* package parameters   */
00040         package_RC_t pack;
00041 
00042         /* intermediate vectors and matrices    */
00043         double *gx, *gy;
00044         double *gx_int, *gy_int;
00045         double *gx_sp, *gy_sp;
00046         double *gx_hs, *gy_hs;
00047         double *g_amb;
00048         double *t_vector;
00049         double **len, **g;
00050         int **border;
00051 
00052         /* total no. of nodes   */
00053         int n_nodes;
00054         /* total no. of blocks  */
00055         int n_units;
00056         /* to allow for resizing        */
00057         int base_n_units;
00058 
00059         /* flags        */
00060         int r_ready;    /* are the R's initialized?     */
00061         int c_ready;    /* are the C's initialized?     */
00062 }block_model_t;
00063 
00064 /* constructor/destructor       */
00065 /* placeholder is an empty floorplan frame with only the names of the functional units  */
00066 block_model_t *alloc_block_model(thermal_config_t *config, flp_t *placeholder);
00067 void delete_block_model(block_model_t *model);
00068 
00069 /* initialization       */
00070 void populate_R_model_block(block_model_t *model, flp_t *flp);
00071 void populate_C_model_block(block_model_t *model, flp_t *flp);
00072 
00073 /* hotspot main interfaces - temperature.c      */
00074 void steady_state_temp_block(block_model_t *model, double *power, double *temp);
00075 void compute_temp_block(block_model_t *model, double *power, double *temp, double time_elapsed);
00076 /* differs from 'dvector()' in that memory for internal nodes is also allocated */
00077 double *hotspot_vector_block(block_model_t *model);
00078 /* copy 'src' to 'dst' except for a window of 'size'
00079  * elements starting at 'at'. useful in floorplan
00080  * compaction
00081  */
00082 void trim_hotspot_vector_block(block_model_t *model, double *dst, double *src, 
00083                                                            int at, int size);
00084 /* update the model's node count        */                                               
00085 void resize_thermal_model_block(block_model_t *model, int n_units);                                              
00086 void set_temp_block (block_model_t *model, double *temp, double val);
00087 void dump_temp_block (block_model_t *model, double *temp, char *file);
00088 void copy_temp_block (block_model_t *model, double *dst, double *src);
00089 void read_temp_block (block_model_t *model, double *temp, char *file, int clip);
00090 void dump_power_block(block_model_t *model, double *power, char *file);
00091 void read_power_block (block_model_t *model, double *power, char *file);
00092 double find_max_temp_block(block_model_t *model, double *temp);
00093 double find_avg_temp_block(block_model_t *model, double *temp);
00094 double calc_sink_temp_block(block_model_t *model, double *temp, thermal_config_t *config); //for natural convection package model
00095 /* debug print  */
00096 void debug_print_block(block_model_t *model);
00097 
00098 #endif

Generated on Fri Oct 22 2010 11:02:14 for SST by  doxygen 1.7.1