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

sst/core/techModels/libsim-panalyzer/sim-outorder.h

00001 /*
00002  * sim-outorder.h - sample out-of-order issue perf simulator implementation
00003  *
00004  * This file is a part of the SimpleScalar tool suite written by
00005  * Todd M. Austin as a part of the Multiscalar Research Project.
00006  *  
00007  * The tool suite is currently maintained by Doug Burger and Todd M. Austin.
00008  * 
00009  * Copyright (C) 1994, 1995, 1996, 1997, 1998 by Todd M. Austin
00010  *
00011  * This source file is distributed "as is" in the hope that it will be
00012  * useful.  The tool set comes with no warranty, and no author or
00013  * distributor accepts any responsibility for the consequences of its
00014  * use. 
00015  * 
00016  * Everyone is granted permission to copy, modify and redistribute
00017  * this tool set under the following conditions:
00018  * 
00019  *    This source code is distributed for non-commercial use only. 
00020  *    Please contact the maintainer for restrictions applying to 
00021  *    commercial use.
00022  *
00023  *    Permission is granted to anyone to make or distribute copies
00024  *    of this source code, either as received or modified, in any
00025  *    medium, provided that all copyright notices, permission and
00026  *    nonwarranty notices are preserved, and that the distributor
00027  *    grants the recipient permission for further redistribution as
00028  *    permitted by this document.
00029  *
00030  *    Permission is granted to distribute this file in compiled
00031  *    or executable form under the same conditions that apply for
00032  *    source code, provided that either:
00033  *
00034  *    A. it is accompanied by the corresponding machine-readable
00035  *       source code,
00036  *    B. it is accompanied by a written offer, with no time limit,
00037  *       to give anyone a machine-readable copy of the corresponding
00038  *       source code in return for reimbursement of the cost of
00039  *       distribution.  This written offer must permit verbatim
00040  *       duplication by anyone, or
00041  *    C. it is distributed by someone who received only the
00042  *       executable form, and is accompanied by a copy of the
00043  *       written offer of source code that they received concurrently.
00044  *
00045  * In other words, you are welcome to use, share and improve this
00046  * source file.  You are forbidden to forbid anyone else to use, share
00047  * and improve what you give them.
00048  *
00049  * 
00050  * This file holds variables shared between sim-outorder.c and other
00051  * modular files (such as power.c)
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 /* 2-level predictor config (<l1size> <l2size> <hist_size> <xor>) */
00090 extern int twolev_config[];
00091 
00092 /* combining predictor config (<meta_table_size> */
00093 extern int comb_config[];
00094 
00095 /* return address stack (RAS) size */
00096 extern int ras_size;
00097 
00098 /* BTB predictor config (<num_sets> <associativity>) */
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 extern qword_t    icache_decaddr_hd;
00138 extern qword_t    icache_tagaddr_hd;
00139 extern qword_t    icache_inst_hd;
00140 extern qword_t    tot_icache_decaddr_hd;
00141 extern qword_t    tot_icache_tagaddr_hd;
00142 extern qword_t    tot_icache_inst_hd;
00143 extern qword_t    icache2_decaddr_hd;
00144 extern qword_t    icache2_tagaddr_hd;
00145 extern qword_t    icache2_inst_hd;
00146 extern qword_t    dcache_decaddr_hd;
00147 extern qword_t    dcache_tagaddr_hd;
00148 extern qword_t    dcache_data_hd;
00149 extern qword_t    tot_dcache_decaddr_hd;
00150 extern qword_t    tot_dcache_tagaddr_hd;
00151 extern qword_t    tot_dcache_data_hd;
00152 extern qword_t    dcache2_decaddr_hd;
00153 extern qword_t    dcache2_tagaddr_hd;
00154 extern qword_t    dcache2_data_hd;
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

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