00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #include "machine.h"
00058 #include "cache.h"
00059
00060 #define ADWATTCH
00061
00062 extern int ruu_decode_width;
00063 extern int ruu_issue_width;
00064 extern int ruu_commit_width;
00065 extern int RUU_size;
00066 extern int LSQ_size;
00067 extern int data_width;
00068 extern int res_ialu;
00069 extern int res_fpalu;
00070 extern int res_memport;
00071
00072 extern int bimod_config[];
00073
00074 extern struct cache_t *cache_dl1;
00075 extern struct cache_t *cache_il1;
00076 extern struct cache_t *cache_dl2;
00077 extern struct cache_t *cache_il2;
00078
00079 extern struct cache_t *dtlb;
00080 extern struct cache_t *itlb;
00081
00082 extern char *cache_dl1_opt;
00083 extern char *cache_dl2_opt;
00084 extern char *cache_il1_opt;
00085 extern char *cache_il2_opt;
00086 extern char *itlb_opt;
00087 extern char *dtlb_opt;
00088
00089
00090 extern int twolev_config[];
00091
00092
00093 extern int comb_config[];
00094
00095
00096 extern int ras_size;
00097
00098
00099 extern int btb_config[];
00100
00101 extern counter_t rename_access;
00102 extern counter_t bpred_access;
00103 extern counter_t window_access;
00104 extern counter_t lsq_access;
00105 extern counter_t regfile_access;
00106 extern counter_t icache_access;
00107 extern counter_t dcache_access;
00108 extern counter_t dcache2_access;
00109
00110 extern counter_t itlb_access;
00111 extern counter_t dtlb_access;
00112
00113 extern counter_t alu_access;
00114 extern counter_t ialu_access;
00115 extern counter_t falu_access;
00116 extern counter_t resultbus_access;
00117
00118 extern counter_t window_selection_access;
00119 extern counter_t window_wakeup_access;
00120 extern counter_t window_preg_access;
00121 extern counter_t lsq_preg_access;
00122 extern counter_t lsq_wakeup_access;
00123 extern counter_t lsq_store_data_access;
00124 extern counter_t lsq_load_data_access;
00125
00126 extern counter_t window_total_pop_count_cycle;
00127 extern counter_t window_num_pop_count_cycle;
00128 extern counter_t lsq_total_pop_count_cycle;
00129 extern counter_t lsq_num_pop_count_cycle;
00130 extern counter_t regfile_total_pop_count_cycle;
00131 extern counter_t regfile_num_pop_count_cycle;
00132 extern counter_t resultbus_total_pop_count_cycle;
00133 extern counter_t resultbus_num_pop_count_cycle;
00134
00135 #ifdef ADWATTCH
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 qword_t get_hd_decaddr(struct cache_t *cache, md_addr_t prev_addr, md_addr_t curr_addr);
00157 qword_t get_hd_tagaddr(struct cache_t *cache, md_addr_t prev_addr, md_addr_t curr_addr);
00158 qword_t get_hd_btb_decaddr( int btb_config[], md_addr_t prev_addr, md_addr_t curr_addr);
00159 qword_t get_hd_btb_tagaddr( int btb_config[], md_addr_t prev_addr, md_addr_t curr_addr);
00160
00161 qword_t get_hd_inst(md_inst_t prev_inst, md_inst_t curr_inst);
00162 qword_t get_hd_data(word_t prev_data, word_t curr_data);
00163 qword_t get_hd_btaddr(md_addr_t prev_btaddr, md_addr_t curr_btaddr);
00164
00165 void icache_power_hd(md_addr_t icache_access_addr, md_inst_t icache_inst);
00166 void dcache_power_hd(md_addr_t dcache_access_addr, enum mem_cmd cmd );
00167 void btb_power_hd(md_addr_t curr_btb_addr, md_addr_t curr_btaddr, enum mem_cmd cmd);
00168 void icache2_power_hd(void);
00169 void dcache2_power_hd(void);
00170 #endif
00171
00172 #define WATTCH