00001 /* 00002 * uarch_panalyzer.h - contains top level panalyzer. This integrate all the 00003 * power dissipation from functional units (e.g., il1 cache, aio). 00004 * 00005 * This file is a part of the PowerAnalyzer tool suite written by 00006 * Nam Sung Kim as a part of the PowerAnalyzer Project. 00007 * 00008 * The tool suite is currently maintained by Nam Sung Kim. 00009 * 00010 * Copyright (C) 2001 by Nam Sung Kim 00011 * 00012 * This source file is distributed "as is" in the hope that it will be 00013 * useful. The tool set comes with no warranty, and no author or 00014 * distributor accepts any responsibility for the consequences of its 00015 * use. 00016 * 00017 * Everyone is granted permission to copy, modify and redistribute 00018 * this tool set under the following conditions: 00019 * 00020 * This source code is distributed for non-commercial use only. 00021 * Please contact the maintainer for restrictions applying to 00022 * commercial use. 00023 * 00024 * Permission is granted to anyone to make or distribute copies 00025 * of this source code, either as received or modified, in any 00026 * medium, provided that all copyright notices, permission and 00027 * nonwarranty notices are preserved, and that the distributor 00028 * grants the recipient permission for further redistribution as 00029 * permitted by this document. 00030 * 00031 * Permission is granted to distribute this file in compiled 00032 * or executable form under the same conditions that apply for 00033 * source code, provided that either: 00034 * 00035 * A. it is accompanied by the corresponding machine-readable 00036 * source code, 00037 * B. it is accompanied by a written offer, with no time limit, 00038 * to give anyone a machine-readable copy of the corresponding 00039 * source code in return for reimbursement of the cost of 00040 * distribution. This written offer must permit verbatim 00041 * duplication by anyone, or 00042 * C. it is distributed by someone who received only the 00043 * executable form, and is accompanied by a copy of the 00044 * written offer of source code that they received concurrently. 00045 * 00046 * In other words, you are welcome to use, share and improve this 00047 * source file. You are forbidden to forbid anyone else to use, share 00048 * and improve what you give them. 00049 */ 00050 00051 #ifndef UARCH_PANALYZER_H 00052 #define UARCH_PANALYZER_H 00053 #include "host.h" 00054 #include "stats.h" 00055 #include "panalyzer.h" 00056 #include "clock_panalyzer.h" 00057 #include "io_panalyzer.h" 00058 #include "memory_panalyzer.h" 00059 #include "cache_panalyzer.h" 00060 #include "logic_panalyzer.h" 00061 00062 #ifdef FP_PANALYZER_H 00063 #include "alu_panalyzer.h" 00064 #include "mult_panalyzer.h" 00065 #include "fpu_panalyzer.h" 00066 #endif 00067 00068 00069 /* uarch power specification type: 00070 * contain all the info for analyzing io pdissipation */ 00071 typedef struct _fu_arch_pspec_t { 00072 char *name; /* name */ 00073 fu_pmodel_mode_t pmodel; /* power model mode */ 00074 double opfreq, svolt; /* operating frequency/supply voltage */ 00075 00076 fu_io_pspec_t *aio, *dio; 00077 fu_sbank_pspec_t *irf, *fprf; 00078 fu_sbank_pspec_t *bimod, *lev1, *lev2, *ras; 00079 fu_cache_pspec_t *il1, *dl1, *il2, *dl2, *itlb, *dtlb; 00080 fu_cache_pspec_t *btb; 00081 fu_clock_pspec_t *clock; 00082 fu_clock_pspec_t *logic; 00083 00084 #ifdef FP_PANALYZER_H 00085 fu_alu_pspec_t *alu; 00086 fu_mult_pspec_t *mult; 00087 fu_fpu_pspec_t *fpu; 00088 #endif 00089 00090 00091 fu_Ceffs_t *Ceffs; /* effective pdissipation capacitances */ 00092 fu_pdissipation_t *pdissipation; /* pdissipation statistics */ 00093 fu_pdissipation_t pmwindow[MaxPMWindows]; /* power monitoring window */ 00094 } fu_uarch_pspec_t; 00095 00096 /* uarch: micro architecture */ 00097 fu_uarch_pspec_t * 00098 create_uarch_panalyzer( 00099 char *name, 00100 fu_pmodel_mode_t pmodel, /* power model mode */ 00101 double opfreq, double svolt, /* operating frequency/supply voltage */ 00102 fu_io_pspec_t *aio, fu_io_pspec_t *dio, 00103 fu_sbank_pspec_t *irf, fu_sbank_pspec_t *fprf, 00104 fu_sbank_pspec_t *bimod, fu_sbank_pspec_t *lev1, fu_sbank_pspec_t *lev2, 00105 fu_sbank_pspec_t *ras, 00106 fu_cache_pspec_t *il1, fu_cache_pspec_t *dl1, 00107 fu_cache_pspec_t *il2, fu_cache_pspec_t *dl2, 00108 fu_cache_pspec_t *itlb, fu_cache_pspec_t *dtlb, 00109 fu_cache_pspec_t *btb, 00110 fu_logic_pspec_t *logic, 00111 fu_clock_pspec_t *clock, 00112 00113 #ifdef FP_PANALYZER_H 00114 fu_alu_pspec_t *alu, 00115 fu_mult_pspec_t *mult, 00116 fu_fpu_pspec_t *fpu, 00117 #endif 00118 00119 /* effective capacitance for empirical power model */ 00120 double sCeff, double iCeff, double lCeff); 00121 00122 /* top level panalyzer: 00123 * this routine integrate all the power dissipation from the functional units 00124 * at each simulation cycle */ 00125 void 00126 uarch_panalyzer( 00127 fu_uarch_pspec_t *pspec, 00128 tick_t now); 00129 #endif /* UARCH_PANALYZER_H */