|
ChampSim
|
#include <assert.h>#include <inttypes.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "ooo_cpu.h"#include <vector>Classes | |
| class | folded_history |
| class | bentry |
| class | gentry |
| class | lentry |
| class | PREDICTOR |
Macros | |
| #define | BORNTICK 1024 |
| #define | SC |
| #define | IMLI |
| #define | LOCALH |
| #define | LOOPPREDICTOR |
| #define | LOCALS |
| #define | LOCALT |
| #define | PERCWIDTH 6 |
| #define | LOGBIAS 8 |
| #define | INDBIAS (((((PC ^ (PC >> 2)) << 1) ^ (LowConf & (LongestMatchPred != alttaken))) << 1) + pred_inter) & ((1 << LOGBIAS) - 1) |
| #define | INDBIASSK (((((PC ^ (PC >> (LOGBIAS - 2))) << 1) ^ (HighConf)) << 1) + pred_inter) & ((1 << LOGBIAS) - 1) |
| #define | INDBIASBANK (pred_inter + (((HitBank + 1) / 4) << 4) + (HighConf << 1) + (LowConf << 2) + ((AltBank != 0) << 3) + ((PC ^ (PC >> 2)) << 7)) & ((1 << LOGBIAS) - 1) |
| #define | LOGINB 8 |
| #define | INB 1 |
| #define | LOGIMNB 9 |
| #define | IMNB 2 |
| #define | LOGGNB 10 |
| #define | GNB 3 |
| #define | PNB 3 |
| #define | LOGPNB 9 |
| #define | LOGLNB 10 |
| #define | LNB 3 |
| #define | LOGLOCAL 8 |
| #define | NLOCAL (1 << LOGLOCAL) |
| #define | INDLOCAL ((PC ^ (PC >> 2)) & (NLOCAL - 1)) |
| #define | LOGSNB 9 |
| #define | SNB 3 |
| #define | LOGSECLOCAL 4 |
| #define | NSECLOCAL (1 << LOGSECLOCAL) |
| #define | INDSLOCAL (((PC ^ (PC >> 5))) & (NSECLOCAL - 1)) |
| #define | LOGTNB 10 |
| #define | TNB 2 |
| #define | NTLOCAL 16 |
| #define | INDTLOCAL (((PC ^ (PC >> (LOGTNB)))) & (NTLOCAL - 1)) |
| #define | VARTHRES |
| #define | WIDTHRES 12 |
| #define | WIDTHRESP 8 |
| #define | LOGSIZEUP 6 |
| #define | LOGSIZEUPS (LOGSIZEUP / 2) |
| #define | INDUPD (PC ^ (PC >> 2)) & ((1 << LOGSIZEUP) - 1) |
| #define | INDUPDS ((PC ^ (PC >> 2)) & ((1 << (LOGSIZEUPS)) - 1)) |
| #define | EWIDTH 6 |
| #define | CONFWIDTH 7 |
| #define | HISTBUFFERLENGTH 4096 |
| #define | POWER |
| #define | NHIST 36 |
| #define | NBANKLOW 10 |
| #define | NBANKHIGH 20 |
| #define | BORN 13 |
| #define | BORNINFASSOC 9 |
| #define | BORNSUPASSOC 23 |
| #define | MINHIST 6 |
| #define | MAXHIST 3000 |
| #define | LOGG 10 /* logsize of the banks in the tagged TAGE tables */ |
| #define | TBITS 8 |
| #define | NNN 1 |
| #define | HYSTSHIFT 2 |
| #define | LOGB 13 |
| #define | PHISTWIDTH 27 |
| #define | UWIDTH 1 |
| #define | CWIDTH 3 |
| #define | LOGSIZEUSEALT 4 |
| #define | ALTWIDTH 5 |
| #define | SIZEUSEALT (1 << (LOGSIZEUSEALT)) |
| #define | INDUSEALT (((((HitBank - 1) / 8) << 1) + AltConf) % (SIZEUSEALT - 1)) |
| #define | LOGL 5 |
| #define | WIDTHNBITERLOOP 10 |
| #define | LOOPTAG 10 |
| #define | OPTREMP |
| #define | GINDEX |
| #define | CONFLOOP 15 |
Functions | |
| int | predictorsize () |
Variables | |
| long long | IMLIcount |
| int8_t | Bias [(1<< LOGBIAS)] |
| int8_t | BiasSK [(1<< LOGBIAS)] |
| int8_t | BiasBank [(1<< LOGBIAS)] |
| int | Im [INB] = {8} |
| int8_t | IGEHLA [INB][(1<< LOGINB)] = {{0}} |
| int8_t * | IGEHL [INB] |
| int | IMm [IMNB] = {10, 4} |
| int8_t | IMGEHLA [IMNB][(1<< LOGIMNB)] = {{0}} |
| int8_t * | IMGEHL [IMNB] |
| long long | IMHIST [256] |
| int | Gm [GNB] = {40, 24, 10} |
| int8_t | GGEHLA [GNB][(1<< LOGGNB)] = {{0}} |
| int8_t * | GGEHL [GNB] |
| int | Pm [PNB] = {25, 16, 9} |
| int8_t | PGEHLA [PNB][(1<< LOGPNB)] = {{0}} |
| int8_t * | PGEHL [PNB] |
| int | Lm [LNB] = {11, 6, 3} |
| int8_t | LGEHLA [LNB][(1<< LOGLNB)] = {{0}} |
| int8_t * | LGEHL [LNB] |
| long long | L_shist [NLOCAL] |
| int | Sm [SNB] = {16, 11, 6} |
| int8_t | SGEHLA [SNB][(1<< LOGSNB)] = {{0}} |
| int8_t * | SGEHL [SNB] |
| long long | S_slhist [NSECLOCAL] |
| int | Tm [TNB] = {9, 4} |
| int8_t | TGEHLA [TNB][(1<< LOGTNB)] = {{0}} |
| int8_t * | TGEHL [TNB] |
| long long | T_slhist [NTLOCAL] |
| int | updatethreshold |
| int | Pupdatethreshold [(1<< LOGSIZEUP)] |
| int8_t | WG [(1<< LOGSIZEUPS)] |
| int8_t | WL [(1<< LOGSIZEUPS)] |
| int8_t | WS [(1<< LOGSIZEUPS)] |
| int8_t | WT [(1<< LOGSIZEUPS)] |
| int8_t | WP [(1<< LOGSIZEUPS)] |
| int8_t | WI [(1<< LOGSIZEUPS)] |
| int8_t | WIM [(1<< LOGSIZEUPS)] |
| int8_t | WB [(1<< LOGSIZEUPS)] |
| int | LSUM |
| int8_t | FirstH |
| int8_t | SecondH |
| bool | MedConf |
| int | SizeTable [NHIST+1] |
| bool | NOSKIP [NHIST+1] |
| bool | LowConf |
| bool | HighConf |
| bool | AltConf |
| int8_t | use_alt_on_na [SIZEUSEALT] |
| long long | GHIST |
| int8_t | BIM |
| int | TICK |
| uint8_t | ghist [HISTBUFFERLENGTH] |
| int | ptghist |
| long long | phist |
| folded_history | ch_i [NHIST+1] |
| folded_history | ch_t [2][NHIST+1] |
| bentry * | btable |
| gentry * | gtable [NHIST+1] |
| int | m [NHIST+1] |
| int | TB [NHIST+1] |
| int | logg [NHIST+1] |
| int | GI [NHIST+1] |
| uint | GTAG [NHIST+1] |
| int | BI |
| bool | pred_taken |
| bool | alttaken |
| bool | tage_pred |
| bool | LongestMatchPred |
| int | HitBank |
| int | AltBank |
| int | Seed |
| bool | pred_inter |
| lentry * | ltable |
| bool | predloop |
| int | LIB |
| int | LI |
| int | LHIT |
| int | LTAG |
| bool | LVALID |
| int8_t | WITHLOOP |
| class PREDICTOR | predictor |
| bool | was_predicted_taken |
| #define ALTWIDTH 5 |
| #define BORN 13 |
| #define BORNINFASSOC 9 |
| #define BORNSUPASSOC 23 |
| #define BORNTICK 1024 |
| #define CONFLOOP 15 |
| #define CONFWIDTH 7 |
| #define CWIDTH 3 |
| #define EWIDTH 6 |
| #define GINDEX |
| #define GNB 3 |
| #define HISTBUFFERLENGTH 4096 |
| #define HYSTSHIFT 2 |
| #define IMLI |
| #define IMNB 2 |
| #define INB 1 |
| #define INDBIAS (((((PC ^ (PC >> 2)) << 1) ^ (LowConf & (LongestMatchPred != alttaken))) << 1) + pred_inter) & ((1 << LOGBIAS) - 1) |
| #define INDBIASBANK (pred_inter + (((HitBank + 1) / 4) << 4) + (HighConf << 1) + (LowConf << 2) + ((AltBank != 0) << 3) + ((PC ^ (PC >> 2)) << 7)) & ((1 << LOGBIAS) - 1) |
| #define INDBIASSK (((((PC ^ (PC >> (LOGBIAS - 2))) << 1) ^ (HighConf)) << 1) + pred_inter) & ((1 << LOGBIAS) - 1) |
| #define INDLOCAL ((PC ^ (PC >> 2)) & (NLOCAL - 1)) |
| #define INDSLOCAL (((PC ^ (PC >> 5))) & (NSECLOCAL - 1)) |
| #define INDUPD (PC ^ (PC >> 2)) & ((1 << LOGSIZEUP) - 1) |
| #define INDUPDS ((PC ^ (PC >> 2)) & ((1 << (LOGSIZEUPS)) - 1)) |
| #define INDUSEALT (((((HitBank - 1) / 8) << 1) + AltConf) % (SIZEUSEALT - 1)) |
| #define LNB 3 |
| #define LOCALH |
| #define LOCALS |
| #define LOCALT |
| #define LOGB 13 |
| #define LOGBIAS 8 |
| #define LOGG 10 /* logsize of the banks in the tagged TAGE tables */ |
| #define LOGGNB 10 |
| #define LOGIMNB 9 |
| #define LOGINB 8 |
| #define LOGL 5 |
| #define LOGLNB 10 |
| #define LOGLOCAL 8 |
| #define LOGPNB 9 |
| #define LOGSECLOCAL 4 |
| #define LOGSIZEUP 6 |
| #define LOGSIZEUPS (LOGSIZEUP / 2) |
| #define LOGSIZEUSEALT 4 |
| #define LOGSNB 9 |
| #define LOGTNB 10 |
| #define LOOPPREDICTOR |
| #define LOOPTAG 10 |
| #define MAXHIST 3000 |
| #define MINHIST 6 |
| #define NBANKHIGH 20 |
| #define NBANKLOW 10 |
| #define NHIST 36 |
| #define NLOCAL (1 << LOGLOCAL) |
| #define NNN 1 |
| #define NSECLOCAL (1 << LOGSECLOCAL) |
| #define NTLOCAL 16 |
| #define OPTREMP |
| #define PERCWIDTH 6 |
| #define PHISTWIDTH 27 |
| #define PNB 3 |
| #define POWER |
| #define SC |
| #define SIZEUSEALT (1 << (LOGSIZEUSEALT)) |
| #define SNB 3 |
| #define TBITS 8 |
| #define TNB 2 |
| #define UWIDTH 1 |
| #define VARTHRES |
| #define WIDTHNBITERLOOP 10 |
| #define WIDTHRES 12 |
| #define WIDTHRESP 8 |
| int predictorsize | ( | ) |
| int AltBank |
| bool AltConf |
| bool alttaken |
| int BI |
| int8_t Bias[(1<< LOGBIAS)] |
| int8_t BiasBank[(1<< LOGBIAS)] |
| int8_t BiasSK[(1<< LOGBIAS)] |
| int8_t BIM |
| bentry* btable |
| folded_history ch_i[NHIST+1] |
| folded_history ch_t[2][NHIST+1] |
| int8_t FirstH |
| int8_t* GGEHL[GNB] |
| long long GHIST |
| uint8_t ghist[HISTBUFFERLENGTH] |
| int GI[NHIST+1] |
| int Gm[GNB] = {40, 24, 10} |
| uint GTAG[NHIST+1] |
| bool HighConf |
| int HitBank |
| int8_t* IGEHL[INB] |
| int Im[INB] = {8} |
| int8_t* IMGEHL[IMNB] |
| long long IMHIST[256] |
| long long IMLIcount |
| int IMm[IMNB] = {10, 4} |
| long long L_shist[NLOCAL] |
| int8_t* LGEHL[LNB] |
| int LHIT |
| int LI |
| int LIB |
| int Lm[LNB] = {11, 6, 3} |
| int logg[NHIST+1] |
| bool LongestMatchPred |
| bool LowConf |
| int LSUM |
| lentry* ltable |
| int LTAG |
| bool LVALID |
| int m[NHIST+1] |
| bool MedConf |
| bool NOSKIP[NHIST+1] |
| int8_t* PGEHL[PNB] |
| long long phist |
| int Pm[PNB] = {25, 16, 9} |
| bool pred_inter |
| bool pred_taken |
| class PREDICTOR predictor |
| bool predloop |
| int ptghist |
| int Pupdatethreshold[(1<< LOGSIZEUP)] |
| long long S_slhist[NSECLOCAL] |
| int8_t SecondH |
| int Seed |
| int8_t* SGEHL[SNB] |
| int SizeTable[NHIST+1] |
| int Sm[SNB] = {16, 11, 6} |
| long long T_slhist[NTLOCAL] |
| bool tage_pred |
| int TB[NHIST+1] |
| int8_t* TGEHL[TNB] |
| int TICK |
| int Tm[TNB] = {9, 4} |
| int updatethreshold |
| int8_t use_alt_on_na[SIZEUSEALT] |
| bool was_predicted_taken |
| int8_t WB[(1<< LOGSIZEUPS)] |
| int8_t WG[(1<< LOGSIZEUPS)] |
| int8_t WI[(1<< LOGSIZEUPS)] |
| int8_t WIM[(1<< LOGSIZEUPS)] |
| int8_t WITHLOOP |
| int8_t WL[(1<< LOGSIZEUPS)] |
| int8_t WP[(1<< LOGSIZEUPS)] |
| int8_t WS[(1<< LOGSIZEUPS)] |
| int8_t WT[(1<< LOGSIZEUPS)] |