#include <GShare.h>
Onikiri::GShareに対する継承グラフ
Public メソッド | |
BEGIN_PARAM_PATH (GetParamPath()) BEGIN_PARAM_PATH(GetResultPath()) RESULT_RATE_SUM_ENTRY("@HitRate" | |
void | Finished (OpIterator op) |
int | GetPHTIndex (int localThreadID, const PC &pc) |
m_numMiss | GShare () |
void | Initialize (InitPhase phase) |
bool | Predict (OpIterator op, PC predIndexPC) |
void | Retired (OpIterator op) |
virtual | ~GShare () |
Public 変数 | |
m_numHit | |
構成 | |
struct | PredInfo |
GShare::GShare | ( | ) |
GShare.cpp の 48 行で定義されています。
00049 { 00050 m_core = 0; 00051 m_pht = 0; 00052 00053 m_globalHistoryBits = 0; 00054 m_pthIndexBits = 0; 00055 00056 m_numPred = 0; 00057 m_numHit = 0; 00058 m_numMiss = 0; 00059 m_numRetire = 0; 00060 00061 }
GShare::~GShare | ( | ) | [virtual] |
GShare.cpp の 63 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::ReleaseParam().
00064 { 00065 ReleaseParam(); 00066 }
関数の呼び出しグラフ:
Onikiri::GShare::BEGIN_PARAM_PATH | ( | GetParamPath() | ) |
void GShare::Finished | ( | OpIterator | op | ) | [virtual] |
Onikiri::DirPredIFを実装しています。
GShare.cpp の 121 行で定義されています。
00122 { 00123 PredInfo& info = m_predTable[op]; 00124 bool taken = op->GetTaken(); 00125 m_pht->Update(info.phtIndex, taken); 00126 00127 // \MissIGlobalHistoryrbgX 00128 // GShare::Finished`FbN|Cg 00129 // Irbg~Xrbg 00130 if(info.direction != taken){ 00131 m_globalHistory[op->GetLocalTID()]->SetLeastSignificantBit(taken); 00132 } 00133 }
関数の呼び出しグラフ:
int GShare::GetPHTIndex | ( | int | localThreadID, | |
const PC & | pc | |||
) |
GShare.cpp の 155 行で定義されています。
参照先 Onikiri::Addr::address・Onikiri::SimISAInfoDef::SimISAInfo_IW32_RW64_AS64::INSTRUCTION_WORD_BYTE_SHIFT.
参照元 Predict().
00156 { 00157 // pc rbgフ 00158 u64 p = pc.address >> SimISAInfo::INSTRUCTION_WORD_BYTE_SHIFT; 00159 00160 // p jBit + kBit o 00161 if(m_addrXORConvolute){ 00162 p = shttl::xor_convolute(p, m_pthIndexBits); 00163 } 00164 else{ 00165 p = p & shttl::mask(0, m_pthIndexBits); 00166 } 00167 00168 int pos = m_pthIndexBits - m_globalHistoryBits; 00169 u64 mask = shttl::mask(0, m_globalHistoryBits); 00170 u64 global = (m_globalHistory[localThreadID]->GetHistory() & mask) << pos; 00171 return (int)( p ^ global ); 00172 }
Here is the caller graph for this function:
void GShare::Initialize | ( | InitPhase | phase | ) |
GShare.cpp の 68 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::CheckNodeInitialized()・Onikiri::PHT::GetIndexBitSize()・Onikiri::Core::GetOpArray()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::ParamExchange::LoadParam()・THROW_RUNTIME_ERROR.
00069 { 00070 if(phase == INIT_PRE_CONNECTION){ 00071 LoadParam(); // m_jBitSize, m_kBitSize 00072 } 00073 else if(phase == INIT_POST_CONNECTION){ 00074 // o`FbN 00075 CheckNodeInitialized( "core", m_core); 00076 CheckNodeInitialized( "globalHistory", m_globalHistory); 00077 CheckNodeInitialized( "pht", m_pht); 00078 00079 // table 00080 m_predTable.Resize( *m_core->GetOpArray() ); 00081 00082 m_pthIndexBits = m_pht->GetIndexBitSize(); 00083 if(m_pthIndexBits < m_globalHistoryBits){ 00084 THROW_RUNTIME_ERROR("PHT size is less than global history size."); 00085 } 00086 } 00087 }
関数の呼び出しグラフ:
bool GShare::Predict | ( | OpIterator | op, | |
PC | predIndexPC | |||
) | [virtual] |
Onikiri::DirPredIFを実装しています。
GShare.cpp の 90 行で定義されています。
参照先 ASSERT・GetPHTIndex()・Onikiri::PHT::Predict()・Onikiri::LogicalData::tid.
00091 { 00092 ASSERT( 00093 op->GetTID() == predIndexPC.tid, 00094 "The tread ids of the op and current pc are different." 00095 ); 00096 00097 ++m_numPred; 00098 int localTID = op->GetLocalTID(); 00099 int phtIndex = GetPHTIndex( localTID, predIndexPC ); 00100 bool taken = m_pht->Predict(phtIndex); 00101 m_globalHistory[localTID]->Predicted(taken); 00102 00103 PredInfo& info = m_predTable[op]; 00104 00105 // XV pht index o 00106 info.phtIndex = phtIndex; 00107 00108 // Hit/MissA\o 00109 info.direction = taken; 00110 00111 return taken; 00112 }
関数の呼び出しグラフ:
void GShare::Retired | ( | OpIterator | op | ) | [virtual] |
Onikiri::DirPredIFを実装しています。
GShare.cpp の 136 行で定義されています。
00137 { 00138 bool taken = op->GetTaken(); 00139 00140 // CheckpointGlobalHistoryCommitupdate 00141 m_globalHistory[op->GetLocalTID()]->Retired( taken ); 00142 00143 // \Hit/Miss 00144 if(m_predTable[op].direction == taken){ 00145 ++m_numHit; 00146 } 00147 else{ 00148 ++m_numMiss; 00149 } 00150 00151 ++m_numRetire; 00152 }