#include <Cache.h>
Onikiri::Cacheに対する継承グラフ
typedef CacheAccess Onikiri::Cache::Access |
typedef Access::OperationType Onikiri::Cache::AccessType [protected] |
typedef CacheExtraStateTable< LineState, std::vector<LineState> > Onikiri::Cache::ExtraStateTableType [protected] |
typedef CacheHasher Onikiri::Cache::HasherType [protected] |
typedef CacheLine Onikiri::Cache::Line [protected] |
typedef CacheAccessNotifieeIF Onikiri::Cache::NotifieeIF [protected] |
typedef CachePair Onikiri::Cache::PairType [protected] |
typedef Result::State Onikiri::Cache::ResultState [protected] |
typedef size_t Onikiri::Cache::SizeType |
typedef CacheTable Onikiri::Cache::TableType [protected] |
typedef CacheLineValue Onikiri::Cache::Value [protected] |
enum Onikiri::Cache::WritePolicy [protected] |
Cache::Cache | ( | ) |
参照先 m_cacheTable・m_capacityKB・m_lineBitSize・m_lineState.
00083 : 00084 m_latency (0), 00085 m_nextLevelCache (0), 00086 m_prefetcher (0), 00087 m_perfect (0), 00088 m_writePolicy (WP_INVALID), 00089 m_missedAccessList (0), 00090 m_accessQueue (0), 00091 m_level (0), 00092 m_indexBitSize (0), 00093 m_offsetBitSize (0), 00094 m_numWays (0), 00095 m_numPorts (0), 00096 m_reqQueueSize (0), 00097 m_missedAccessListSize(0), 00098 m_numReadHit (0), 00099 m_numReadMiss (0), 00100 m_numReadAccess (0), 00101 m_numReadPendingHit (0), 00102 m_numPrefetchHit (0), 00103 m_numPrefetchMiss (0), 00104 m_numPrefetchPendingHit(0), 00105 m_numPrefetchAccess (0), 00106 m_numWriteHit (0), 00107 m_numWriteMiss (0), 00108 m_numWriteAccess (0), 00109 m_numWritePendingHit(0), 00110 m_numInvalidated (0), 00111 m_capacityKB (0) 00112 { 00113 m_lineBitSize = 0; 00114 m_capacityKB = 0; 00115 m_cacheTable = 0; 00116 m_lineState = new ExtraStateTableType(); 00117 }
Cache::~Cache | ( | ) | [virtual] |
参照先 m_accessQueue・m_lineState・m_missedAccessList・Onikiri::PhysicalResourceNode::ReleaseParam().
00120 { 00121 ReleaseParam(); 00122 00123 if( m_lineState != NULL ){ 00124 delete m_lineState; 00125 m_lineState = NULL; 00126 } 00127 00128 if( m_missedAccessList != NULL ){ 00129 delete m_missedAccessList; 00130 m_missedAccessList = NULL; 00131 } 00132 00133 if( m_accessQueue != NULL ){ 00134 delete m_accessQueue; 00135 m_accessQueue = NULL; 00136 } 00137 }
関数の呼び出しグラフ:
void Cache::AccessFinished | ( | const Access & | addr, | |
const NotifyParam & | param | |||
) | [virtual] |
Onikiri::CacheAccessNotifieeIFを実装しています。
参照先 Onikiri::MemAccess::address・ASSERT・Onikiri::CAET_FILL_FROM_MAL_FINISHED・Onikiri::CAET_FILL_FROM_NEXT_CACHE_FINISHED・Onikiri::CAET_WRITE_ACCESS_FINISHED・Onikiri::CAET_WRITE_ALLOCATE_FINISHED・CheckValidAddress()・Onikiri::CacheAccess::IsWirte()・m_nextLevelCache・m_perfect・m_writePolicy・OnWriteHit()・Onikiri::CacheAccess::OT_WRITE・Onikiri::CacheAccess::type・Onikiri::CacheAccessNotificationParam::type・UpdateTable()・WP_WRITE_THROUGH・Write().
00638 { 00639 CheckValidAddress( access.address ); 00640 00641 switch( param.type ){ 00642 case CAET_FILL_FROM_MAL_FINISHED: 00643 ASSERT( !access.IsWirte() ); 00644 break; 00645 00646 case CAET_FILL_FROM_NEXT_CACHE_FINISHED: 00647 ASSERT( !access.IsWirte() ); 00648 UpdateTable( access ); 00649 break; 00650 00651 case CAET_WRITE_ALLOCATE_FINISHED: 00652 { 00653 ASSERT( !access.IsWirte() ); 00654 Access writeAccess = access; 00655 writeAccess.type = Access::OT_WRITE; 00656 OnWriteHit( writeAccess ); 00657 break; 00658 } 00659 00660 case CAET_WRITE_ACCESS_FINISHED: 00661 ASSERT( access.IsWirte() ); 00662 UpdateTable( access ); 00663 if( m_writePolicy == WP_WRITE_THROUGH && !m_perfect ){ 00664 m_nextLevelCache->Write( access, NULL ); 00665 } 00666 break; 00667 00668 default: 00669 ASSERT(0); 00670 break; 00671 } 00672 00673 }
関数の呼び出しグラフ:
void Cache::AddPreviousLevelCache | ( | Cache * | prev | ) |
参照先 m_prevLevelCaches・THROW_RUNTIME_ERROR.
参照元 SetNextCache().
00694 { 00695 for( int i = 0; i < m_prevLevelCaches.GetSize(); i++ ){ 00696 if( m_prevLevelCaches[i] == prev ){ 00697 THROW_RUNTIME_ERROR( "A same previous level cache is added more than once." ); 00698 } 00699 } 00700 00701 m_prevLevelCaches.Add( prev ); 00702 }
Here is the caller graph for this function:
void Cache::AddToMissedAccessList | ( | const Access & | access, | |
const Result & | result, | |||
CacheAccessNotifieeIF * | notifee, | |||
const NotifyParam & | param | |||
) | [protected] |
参照先 Onikiri::CacheMissedAccessList::Add()・m_missedAccessList.
参照元 OnReadMiss()・OnReadPendingHit()・OnWriteMiss()・OnWritePendingHit().
00299 { 00300 CacheAccessNotifieeIF* notifeeList[2] = { this, notifee }; 00301 int notifieeCount = notifee != NULL ? 2 : 1; 00302 00303 // Add the missed access to the list. 00304 m_missedAccessList->Add( 00305 access, 00306 result, 00307 notifeeList, // Notifiees 00308 notifieeCount, // The number of notifiees 00309 param 00310 ); 00311 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Onikiri::Cache::BEGIN_PARAM_PATH | ( | GetResultPath() | ) |
Onikiri::Cache::BEGIN_PARAM_PATH | ( | GetParamPath() | ) |
void Cache::ChangeSimulationMode | ( | PhysicalResourceNode::SimulationMode | mode | ) | [virtual] |
Onikiri::PhysicalResourceNodeを再定義しています。
参照先 ASSERT・m_accessQueue・m_missedAccessList・Onikiri::CacheAccessRequestQueue::SetEnabled()・Onikiri::CacheMissedAccessList::SetEnabled()・Onikiri::PhysicalResourceNode::SM_SIMULATION.
00227 { 00228 ASSERT( m_missedAccessList ); 00229 ASSERT( m_accessQueue ); 00230 00231 bool isSimulation = ( mode == PhysicalResourceNode::SM_SIMULATION ); 00232 00233 // Disable access queues if the 'mode' is not 'Simulation' because 00234 // Access queues use event mechanisms, which can run only under 'Simulation' mode. 00235 // In disabled queues, pushed accesses are reflected to caches immediately. 00236 m_missedAccessList->SetEnabled( isSimulation ); 00237 m_accessQueue->SetEnabled( isSimulation ); 00238 }
関数の呼び出しグラフ:
void Cache::CheckValidAddress | ( | const Addr & | access | ) | [protected] |
参照先 ASSERT・Onikiri::LogicalData::pid・Onikiri::LogicalData::tid.
参照元 AccessFinished()・ReadBody()・WriteBody().
00284 { 00285 ASSERT( 00286 addr.pid != PID_INVALID && addr.tid != TID_INVALID, 00287 "The address has an invalid id (PID:%d, TID:%d).", 00288 addr.pid, addr.tid 00289 ); 00290 }
Here is the caller graph for this function:
int Onikiri::Cache::GetIndexCount | ( | ) | [inline] |
参照先 m_indexBitSize.
参照元 Onikiri::CacheExtraStateTable< Onikiri::PrefetcherBase::ExLineState >::Resize().
00169 { return 1 << m_indexBitSize; }
Here is the caller graph for this function:
Cache * Cache::GetNextCache | ( | ) |
参照先 m_nextLevelCache.
参照元 Onikiri::MemExecUnit::GetLatency()・Onikiri::CacheSystem::InitCacheHierarchy()・Onikiri::MemExecUnit::Initialize().
00677 { 00678 if( m_nextLevelCache != 0 ){ 00679 return m_nextLevelCache; 00680 } 00681 else{ 00682 return 0; 00683 } 00684 }
Here is the caller graph for this function:
int Cache::GetOffsetBitSize | ( | ) | const |
参照先 m_offsetBitSize.
参照元 Onikiri::Fetcher::Update().
00705 { 00706 return m_offsetBitSize; 00707 }
Here is the caller graph for this function:
const int Onikiri::Cache::GetStaticLatency | ( | ) | const [inline] |
参照先 m_latency.
参照元 Onikiri::Fetcher::Initialize()・Onikiri::MemOrderManager::Initialize().
00142 { return m_latency; }
Here is the caller graph for this function:
int Onikiri::Cache::GetWayCount | ( | ) | [inline] |
参照先 m_numWays.
参照元 Onikiri::CacheExtraStateTable< Onikiri::PrefetcherBase::ExLineState >::Resize().
00170 { return m_numWays; }
Here is the caller graph for this function:
void Cache::Initialize | ( | InitPhase | phase | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
参照先 Onikiri::Cache::LineState::dirty・Onikiri::PipelineNodeBase::DisableLatch()・Onikiri::String::format()・Onikiri::PipelineNodeBase::GetLowerPipeline()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::PipelineNodeBase::Initialize()・Onikiri::ParamExchange::LoadParam()・m_accessQueue・m_cacheTable・m_capacityKB・m_exclusiveAccessCycles・m_indexBitSize・m_latency・m_lineBitSize・m_lineState・m_maxThroughputBytesPerCycle・m_missedAccessList・m_nextLevelCache・m_numPorts・m_numWays・m_offsetBitSize・m_perfect・m_prevLevelCaches・m_reqQueueSize・Onikiri::CacheExtraStateTable< ValueType, ContainerType >::Resize()・RUNTIME_WARNING・THROW_RUNTIME_ERROR.
00140 { 00141 PipelineNodeBase::Initialize( phase ); 00142 00143 if(phase == INIT_PRE_CONNECTION){ 00144 00145 LoadParam(); 00146 m_lineBitSize = m_offsetBitSize; 00147 int lineSize = (1 << m_lineBitSize); 00148 00149 m_capacityKB = 00150 m_numWays * 00151 (1 << m_indexBitSize) * 00152 lineSize / 00153 1024; 00154 00155 // This cache can transfer one line for 'm_exclusiveAccessCycles' cycles. 00156 if( m_exclusiveAccessCycles == 0 || m_numPorts == 0 ){ 00157 m_maxThroughputBytesPerCycle = "Infinite"; 00158 } 00159 else{ 00160 m_maxThroughputBytesPerCycle.format( 00161 "%f", 00162 (double)lineSize / (double)m_exclusiveAccessCycles * m_numPorts 00163 ); 00164 } 00165 00166 00167 if( m_latency < m_exclusiveAccessCycles ){ 00168 THROW_RUNTIME_ERROR( 00169 "The latency is less than the exclusive access cycles. " 00170 "This means that the cache/memory cannot transfer whole " 00171 "line data within the latency because the bandwidth " 00172 "is too narow." 00173 ); 00174 }; 00175 00176 if( m_numPorts != 0 ){ 00177 if( m_exclusiveAccessCycles*m_reqQueueSize/m_numPorts + m_latency > 00178 GetLowerPipeline()->GetWheelSize() 00179 ){ 00180 RUNTIME_WARNING( 00181 "The size of the time wheel may not be enough. " 00182 "Inclease the time wheel size or decrease @ExclusiveAccessCycles/@NumRequestListSize " 00183 ); 00184 } 00185 } 00186 00187 m_cacheTable = 00188 new Cache::TableType( 00189 HasherType( m_indexBitSize, m_offsetBitSize ), 00190 m_numWays 00191 ); 00192 00193 } 00194 else if( phase == INIT_POST_CONNECTION ){ 00195 00196 int offset = m_offsetBitSize; 00197 00198 m_missedAccessList = 00199 new CacheMissedAccessList( GetLowerPipeline(), offset ); 00200 00201 m_accessQueue = 00202 new CacheAccessRequestQueue( GetLowerPipeline(), m_numPorts, m_exclusiveAccessCycles ); 00203 00204 if( m_prevLevelCaches.GetSize() == 0 && 00205 ( m_exclusiveAccessCycles != 0 || m_numPorts != 0) 00206 ){ 00207 // Scheduler assumes that a top level cache(L1) has enough band width. 00208 // If an user enable band width limit option of a top level cache, 00209 // the system will be dead locked... 00210 THROW_RUNTIME_ERROR( "Band width limit of a top level cache is not support." ); 00211 } 00212 00213 if( !m_perfect && !m_nextLevelCache ){ 00214 THROW_RUNTIME_ERROR( "The last level of a memory hierarchy must be 'perfect'." ); 00215 } 00216 00217 LineState initState; 00218 initState.dirty = false; 00219 m_lineState->Resize( this, initState ); 00220 00221 DisableLatch(); 00222 } 00223 }
関数の呼び出しグラフ:
void Cache::Invalidate | ( | const Addr & | addr | ) |
参照先 Onikiri::CacheHookParam::address・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・Onikiri::HookEntry()・InvalidateBody()・Onikiri::CacheHookParam::line・m_cacheTable・m_prefetcher・Onikiri::PrefetcherIF::OnCacheInvalidation()・s_invalidateHook・Onikiri::CacheHookParam::table.
参照元 UpdateTableBody().
00614 { 00615 CacheHookParam param; 00616 param.address = &addr; 00617 param.table = m_cacheTable; 00618 param.line = m_cacheTable->end(); 00619 00620 HookEntry( this, &Cache::InvalidateBody, &s_invalidateHook, ¶m ); 00621 00622 if( m_prefetcher ){ 00623 m_prefetcher->OnCacheInvalidation( this, ¶m ); 00624 } 00625 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Cache::InvalidateBody | ( | CacheHookParam * | param | ) | [protected] |
参照先 Onikiri::CacheHookParam::address・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::invalidate()・Onikiri::CacheHookParam::line・m_cacheTable・m_numInvalidated.
参照元 Invalidate().
00628 { 00629 CacheTableIterator line = m_cacheTable->invalidate( *param->address ); 00630 if( line != m_cacheTable->end() ){ 00631 m_numInvalidated++; 00632 } 00633 param->line = line; 00634 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
bool Onikiri::Cache::IsPerfect | ( | ) | [inline] |
bool Onikiri::Cache::IsPrefetch | ( | const Access & | access | ) | [protected] |
bool Cache::IsStallRequired | ( | ) |
参照先 Onikiri::CacheMissedAccessList::GetSize()・Onikiri::CacheAccessRequestQueue::GetSize()・IsStallRequired()・m_accessQueue・m_missedAccessList・m_missedAccessListSize・m_nextLevelCache・m_reqQueueSize.
参照元 Onikiri::Core::Evaluate()・IsStallRequired().
00711 { 00712 00713 if( m_nextLevelCache && m_nextLevelCache->IsStallRequired() ){ 00714 return true; 00715 } 00716 00717 if( m_reqQueueSize != 0 && 00718 (int)m_accessQueue->GetSize() >= m_reqQueueSize 00719 ){ 00720 return true; 00721 } 00722 00723 if( m_missedAccessListSize != 0 && 00724 (int)m_missedAccessList->GetSize() >= m_missedAccessListSize 00725 ){ 00726 return true; 00727 } 00728 00729 return false; 00730 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::OnReadHit | ( | const Access & | access | ) | [protected] |
参照先 Onikiri::MemAccess::address・Onikiri::CacheAccessResult::latency・m_accessQueue・m_cacheTable・m_latency・m_perfect・Onikiri::CacheAccessRequestQueue::Push()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::read()・Onikiri::CacheAccessResult::ST_HIT.
参照元 ReadBody().
00315 { 00316 // Update cache replacement information. 00317 if( !m_perfect ){ 00318 m_cacheTable->read( access.address ); 00319 } 00320 00321 Result result( (int)m_latency, Result::ST_HIT, this ); 00322 00323 // Push the access to the queue. 00324 result.latency = 00325 (int)m_accessQueue->Push( 00326 access, 00327 m_latency, 00328 NULL, 00329 NotifyParam() 00330 ); 00331 00332 return result; 00333 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::OnReadMiss | ( | const Access & | access, | |
CacheAccessNotifieeIF * | notifee | |||
) | [protected] |
参照先 AddToMissedAccessList()・Onikiri::CacheAccessResult::cache・Onikiri::CAET_FILL_FROM_NEXT_CACHE_FINISHED・Onikiri::CacheAccessResult::latency・m_latency・m_nextLevelCache・Read()・Onikiri::CacheAccessResult::ST_MISS.
参照元 ReadBody().
00360 { 00361 // xLbVCeV 00362 Result nextResult = m_nextLevelCache->Read( access, NULL ); 00363 int nextLatency = nextResult.latency; 00364 00365 Result result( m_latency + nextLatency, Result::ST_MISS, nextResult.cache ); 00366 00367 NotifyParam notification( CAET_FILL_FROM_NEXT_CACHE_FINISHED, result ); 00368 AddToMissedAccessList( access, result, notifee, notification ); 00369 00370 return result; 00371 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::OnReadPendingHit | ( | const Access & | access, | |
const Result & | phResult, | |||
CacheAccessNotifieeIF * | notifee | |||
) | [protected] |
参照先 AddToMissedAccessList()・ASSERT・Onikiri::CAET_FILL_FROM_MAL_FINISHED・Onikiri::CacheAccessResult::latency・m_latency・m_perfect・Onikiri::CacheAccessResult::ST_PENDING_HIT.
参照元 ReadBody().
00341 { 00342 ASSERT( !m_perfect ); 00343 00344 Result result ( phResult.latency, Result::ST_PENDING_HIT, this ); 00345 if( result.latency < m_latency ){ 00346 result.latency = m_latency; 00347 } 00348 00349 NotifyParam notification( CAET_FILL_FROM_MAL_FINISHED, result ); 00350 AddToMissedAccessList( access, result, notifee, notification ); 00351 00352 return result; 00353 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::OnWriteHit | ( | const Access & | access | ) | [protected] |
参照先 Onikiri::CAET_WRITE_ACCESS_FINISHED・Onikiri::CacheAccessResult::latency・m_accessQueue・m_latency・Onikiri::CacheAccessRequestQueue::Push()・Onikiri::CacheAccessResult::ST_HIT.
参照元 AccessFinished()・WriteBody().
00437 { 00438 Result result( (int)m_latency, Result::ST_HIT, this ); 00439 NotifyParam notification( CAET_WRITE_ACCESS_FINISHED, result ); 00440 00441 // Push the access to the queue. 00442 result.latency = 00443 (int)m_accessQueue->Push( 00444 access, 00445 m_latency, 00446 this, 00447 notification 00448 ); 00449 00450 return result; 00451 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::OnWriteMiss | ( | const Access & | access, | |
CacheAccessNotifieeIF * | notifee | |||
) | [protected] |
参照先 AddToMissedAccessList()・Onikiri::CacheAccessResult::cache・Onikiri::CAET_WRITE_ALLOCATE_FINISHED・Onikiri::CacheAccessResult::latency・m_latency・m_nextLevelCache・Onikiri::CacheAccess::OT_READ_FOR_WRITE_ALLOCATE・Read()・Onikiri::CacheAccessResult::ST_MISS・Onikiri::CacheAccess::type.
参照元 WriteBody().
00477 { 00478 // Write allocate 00479 Access writeAllocate = access; 00480 writeAllocate.type = Access::OT_READ_FOR_WRITE_ALLOCATE; 00481 Result nextResult = 00482 m_nextLevelCache->Read( writeAllocate, NULL ); 00483 00484 int nextLatency = nextResult.latency; 00485 00486 NotifyParam notification( CAET_WRITE_ALLOCATE_FINISHED, nextResult ); 00487 AddToMissedAccessList( writeAllocate, nextResult, notifee, notification ); 00488 00489 return Result( 00490 m_latency + nextLatency, 00491 Result::ST_MISS, 00492 nextResult.cache 00493 ); 00494 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::OnWritePendingHit | ( | const Access & | access, | |
const Result & | phResult, | |||
CacheAccessNotifieeIF * | notifee | |||
) | [protected] |
参照先 AddToMissedAccessList()・Onikiri::CAET_WRITE_ALLOCATE_FINISHED・Onikiri::CacheAccessResult::latency・m_latency・Onikiri::CacheAccess::OT_READ_FOR_WRITE_ALLOCATE・Onikiri::CacheAccessResult::ST_MISS・Onikiri::CacheAccess::type.
参照元 WriteBody().
00458 { 00459 Access writeAllocate = access; 00460 writeAllocate.type = Access::OT_READ_FOR_WRITE_ALLOCATE; 00461 00462 // Add the access to the missed accessed list. 00463 NotifyParam notification( CAET_WRITE_ALLOCATE_FINISHED, phResult ); 00464 AddToMissedAccessList( writeAllocate, phResult, notifee, notification ); 00465 00466 return Result( 00467 m_latency + phResult.latency, 00468 Result::ST_MISS, 00469 this 00470 ); 00471 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Onikiri::Cache::PARAM_ENTRY | ( | "@MaxThroughputBytesPerCycle" | , | |
m_maxThroughputBytesPerCycle | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@CapacityKByte" | , | |
m_capacityKB | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumInvalidatedLines" | , | |
m_numInvalidated | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumWritePendingHit" | , | |
m_numWritePendingHit | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumWriteAccess" | , | |
m_numWriteAccess | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumWriteMiss" | , | |
m_numWriteMiss | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumWriteHit" | , | |
m_numWriteHit | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumPrefetchAccess" | , | |
m_numPrefetchAccess | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumPrefetchPendingHit" | , | |
m_numPrefetchPendingHit | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumPrefetchMiss" | , | |
m_numPrefetchMiss | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumPrefetchHit" | , | |
m_numPrefetchHit | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumReadPendingHit" | , | |
m_numReadPendingHit | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumReadAccess" | , | |
m_numReadAccess | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumReadMiss" | , | |
m_numReadMiss | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumReadHit" | , | |
m_numReadHit | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@ExclusiveAccessCycles" | , | |
m_exclusiveAccessCycles | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@MissedAccessListSize" | , | |
m_missedAccessListSize | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@RequestQueueSize" | , | |
m_reqQueueSize | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumPorts" | , | |
m_numPorts | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@NumWays" | , | |
m_numWays | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@OffsetBitSize" | , | |
m_offsetBitSize | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@IndexBitSize" | , | |
m_indexBitSize | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@Perfect" | , | |
m_perfect | ||||
) |
Onikiri::Cache::PARAM_ENTRY | ( | "@Latency" | , | |
m_latency | ||||
) |
Cache::Result Cache::Read | ( | const Access & | access, | |
CacheAccessNotifieeIF * | notifiee | |||
) |
参照先 Onikiri::CacheHookParam::access・Onikiri::MemAccess::address・Onikiri::CacheHookParam::address・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・Onikiri::HookEntry()・Onikiri::CacheHookParam::line・m_cacheTable・m_prefetcher・Onikiri::CacheHookParam::notifiee・Onikiri::PrefetcherIF::OnCacheRead()・ReadBody()・Onikiri::CacheHookParam::result・s_readHook・Onikiri::CacheHookParam::table.
参照元 Onikiri::MemExecUnit::GetExecutedReadLatency()・Onikiri::Fetcher::GetICacheReadLatency()・OnReadMiss()・OnWriteMiss()・Onikiri::PrefetcherBase::Prefetch()・Onikiri::InorderSystem::Run().
00417 { 00418 CacheHookParam param; 00419 param.access = &access; 00420 param.table = m_cacheTable; 00421 param.address = &access.address; 00422 param.notifiee = notifiee; 00423 param.line = m_cacheTable->end(); 00424 00425 HookEntry( this, &Cache::ReadBody, &s_readHook, ¶m ); 00426 00427 if( m_prefetcher ){ 00428 m_prefetcher->OnCacheRead( this, ¶m ); 00429 } 00430 00431 return param.result; 00432 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Cache::ReadBody | ( | CacheHookParam * | param | ) | [protected] |
参照先 Onikiri::CacheHookParam::access・Onikiri::MemAccess::address・CheckValidAddress()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・Onikiri::CacheMissedAccessList::Find()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::find()・Onikiri::CacheHookParam::line・m_cacheTable・m_missedAccessList・m_perfect・Onikiri::CacheHookParam::notifiee・OnReadHit()・OnReadMiss()・OnReadPendingHit()・Onikiri::CacheHookParam::result・Onikiri::CacheAccessResult::ST_HIT・Onikiri::CacheAccessResult::state・UpdateStatistics().
参照元 Read().
00377 { 00378 const Access& access = *param->access; 00379 00380 Addr addr = access.address; 00381 CheckValidAddress( addr ); 00382 00383 Result result; 00384 00385 if( m_perfect ){ 00386 // Perfect 00387 result = OnReadHit( access ); 00388 } 00389 else{ 00390 CacheTableIterator line = m_cacheTable->find( addr ); 00391 if( line != m_cacheTable->end() ){ 00392 // Perfect or Hit 00393 result = OnReadHit( access ); 00394 param->line = line; 00395 } 00396 else{ 00397 00398 Result phResult = m_missedAccessList->Find( addr ); 00399 CacheAccessNotifieeIF* notifee = param->notifiee; 00400 if( phResult.state == Result::ST_HIT ){ 00401 // Hit in the missed access list. 00402 result = OnReadPendingHit( access, phResult, notifee ); 00403 } 00404 else{ 00405 // Miss 00406 result = OnReadMiss( access, notifee ); 00407 } 00408 } 00409 } 00410 00411 // Update statistics 00412 UpdateStatistics( access, result.state ); 00413 param->result = result; 00414 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Cache::SetNextCache | ( | PhysicalResourceArray< Cache > & | next | ) |
参照先 AddPreviousLevelCache()・m_nextLevelCache.
00687 { 00688 m_nextLevelCache = next[0]; 00689 m_nextLevelCache->AddPreviousLevelCache( this ); 00690 }
関数の呼び出しグラフ:
void Cache::Update | ( | ) | [virtual] |
void Cache::UpdateStatistics | ( | const Access & | access, | |
Result::State | state | |||
) | [protected] |
参照先 AOT_PREFETCH・AOT_READ・AOT_READ_FOR_WRITE_ALLOCATE・AOT_WRITE・AOT_WRITE_BACK・ASSERT・m_numPrefetchAccess・m_numPrefetchHit・m_numPrefetchMiss・m_numPrefetchPendingHit・m_numReadAccess・m_numReadHit・m_numReadMiss・m_numReadPendingHit・m_numWriteAccess・m_numWriteHit・m_numWriteMiss・m_numWritePendingHit・Onikiri::CacheAccessResult::ST_HIT・Onikiri::CacheAccessResult::ST_MISS・Onikiri::CacheAccessResult::ST_NOT_ACCESSED・Onikiri::CacheAccessResult::ST_PENDING_HIT・Onikiri::CacheAccess::type.
参照元 ReadBody()・WriteBody().
00243 { 00244 switch( access.type ){ 00245 00246 case AOT_READ: 00247 case AOT_READ_FOR_WRITE_ALLOCATE: 00248 m_numReadAccess++; 00249 switch( state ){ 00250 case Result::ST_HIT: m_numReadHit++; break; 00251 case Result::ST_PENDING_HIT: m_numReadPendingHit++; break; 00252 case Result::ST_MISS: m_numReadMiss++; break; 00253 case Result::ST_NOT_ACCESSED: ASSERT(0); break; 00254 } 00255 break; 00256 00257 case AOT_WRITE: 00258 case AOT_WRITE_BACK: 00259 m_numWriteAccess++; 00260 switch( state ){ 00261 case Result::ST_HIT: m_numWriteHit++; break; 00262 case Result::ST_PENDING_HIT: m_numWritePendingHit++; break; 00263 case Result::ST_MISS: m_numWriteMiss++; break; 00264 case Result::ST_NOT_ACCESSED: ASSERT(0); break; 00265 } 00266 break; 00267 00268 case AOT_PREFETCH: 00269 m_numPrefetchAccess++; 00270 switch( state ){ 00271 case Result::ST_HIT: m_numPrefetchHit++; break; 00272 case Result::ST_PENDING_HIT: m_numPrefetchPendingHit++; break; 00273 case Result::ST_MISS: m_numPrefetchMiss++; break; 00274 case Result::ST_NOT_ACCESSED: ASSERT(0); break; 00275 } 00276 break; 00277 00278 } 00279 }
Here is the caller graph for this function:
void Cache::UpdateTable | ( | const Access & | access | ) | [protected] |
参照先 Onikiri::CacheHookParam::access・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・Onikiri::HookEntry()・Onikiri::CacheHookParam::line・m_cacheTable・m_prefetcher・Onikiri::PrefetcherIF::OnCacheTableUpdate()・s_tableUpdateHook・Onikiri::CacheHookParam::table・UpdateTableBody().
参照元 AccessFinished().
00598 { 00599 CacheHookParam param; 00600 param.access = &access; 00601 param.table = m_cacheTable; 00602 param.line = m_cacheTable->end(); 00603 00604 HookEntry( this, &Cache::UpdateTableBody, &s_tableUpdateHook, ¶m ); 00605 00606 if( m_prefetcher ){ 00607 m_prefetcher->OnCacheTableUpdate( this, ¶m ); 00608 } 00609 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Cache::UpdateTableBody | ( | CacheHookParam * | param | ) | [protected] |
参照先 Onikiri::CacheHookParam::access・Onikiri::MemAccess::address・AOT_WRITE_BACK・Invalidate()・Onikiri::CacheAccess::IsWirte()・Onikiri::CacheHookParam::line・Onikiri::CacheAccess::lineValue・m_cacheTable・m_lineState・m_nextLevelCache・m_perfect・m_prevLevelCaches・m_writePolicy・Onikiri::CacheHookParam::replaced・Onikiri::CacheAccess::type・Onikiri::MemAccess::value・WP_WRITE_BACK・Write()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::write().
参照元 UpdateTable().
00560 { 00561 const CacheAccess& access = *param->access; 00562 bool dirty = access.IsWirte(); 00563 00564 bool replaced; 00565 CacheLine replacedLine; 00566 Addr replacedAddr; 00567 TableType::iterator line = 00568 m_cacheTable->write( access.address, Value(), &replaced, &replacedAddr, &replacedLine ); 00569 param->line = line; 00570 param->replaced = replaced; 00571 00572 if( replaced ){ 00573 00574 // Invalidate replaced lines in previous level caches for keep inclusion. 00575 for( int i = 0; i < m_prevLevelCaches.GetSize(); i++ ){ 00576 m_prevLevelCaches[i]->Invalidate( replacedAddr ); 00577 } 00578 00579 // Write back replaced lines to the next level cache. 00580 if( m_writePolicy == WP_WRITE_BACK && !m_perfect ){ 00581 if( (*m_lineState)[ line ].dirty ){ 00582 Access writeBack = access; 00583 writeBack.address = replacedAddr; 00584 writeBack.value = 0; 00585 writeBack.lineValue = replacedLine.value; 00586 writeBack.type = AOT_WRITE_BACK; 00587 m_nextLevelCache->Write( writeBack, NULL ); 00588 } 00589 } 00590 } 00591 00592 // Set a dirty flag. 00593 (*m_lineState)[ line ].dirty = dirty; 00594 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Cache::Result Cache::Write | ( | const Access & | access, | |
CacheAccessNotifieeIF * | notifiee | |||
) |
参照先 Onikiri::CacheHookParam::access・Onikiri::MemAccess::address・Onikiri::CacheHookParam::address・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・Onikiri::HookEntry()・Onikiri::CacheHookParam::line・m_cacheTable・m_prefetcher・Onikiri::CacheHookParam::notifiee・Onikiri::PrefetcherIF::OnCacheWrite()・Onikiri::CacheHookParam::result・s_writeHook・Onikiri::CacheHookParam::table・WriteBody().
参照元 AccessFinished()・Onikiri::MemOrderManager::Commit()・Onikiri::InorderSystem::Run()・UpdateTableBody().
00500 { 00501 CacheHookParam param; 00502 param.access = &access; 00503 param.address = &access.address; 00504 param.table = m_cacheTable; 00505 param.notifiee = notifiee; 00506 param.line = m_cacheTable->end(); 00507 00508 HookEntry( this, &Cache::WriteBody, &s_writeHook, ¶m ); 00509 00510 if( m_prefetcher ){ 00511 m_prefetcher->OnCacheWrite( this, ¶m ); 00512 } 00513 00514 return param.result; 00515 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Cache::WriteBody | ( | CacheHookParam * | param | ) | [protected] |
参照先 Onikiri::CacheHookParam::access・Onikiri::MemAccess::address・CheckValidAddress()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::end()・Onikiri::CacheMissedAccessList::Find()・shttl::setassoc_table< PairType, Hasher, Replacer, Strage >::find()・Onikiri::CacheHookParam::line・m_cacheTable・m_missedAccessList・m_perfect・Onikiri::CacheHookParam::notifiee・OnWriteHit()・OnWriteMiss()・OnWritePendingHit()・Onikiri::CacheHookParam::result・Onikiri::CacheAccessResult::ST_HIT・Onikiri::CacheAccessResult::state・UpdateStatistics().
参照元 Write().
00518 { 00519 const Access& access = *param->access; 00520 00521 Addr addr = access.address; 00522 CheckValidAddress( addr ); 00523 00524 Result result; 00525 00526 if( m_perfect ){ 00527 // Perfect 00528 result = OnWriteHit( access ); 00529 } 00530 else{ 00531 00532 CacheTableIterator line = m_cacheTable->find( addr ); 00533 if( line != m_cacheTable->end() ){ 00534 // Hit 00535 result = OnWriteHit( access ); 00536 param->line = line; 00537 } 00538 else{ 00539 CacheAccessNotifieeIF* notifee = param->notifiee; 00540 Result phResult = m_missedAccessList->Find( addr ); 00541 if( phResult.state == Result::ST_HIT ){ 00542 // Write allocate request hits in the missed access list. 00543 result = OnWritePendingHit( access, phResult, notifee ); 00544 } 00545 else{ 00546 // Miss 00547 result = OnWriteMiss( access, notifee ); 00548 } 00549 } 00550 } 00551 00552 // Update statistics 00553 UpdateStatistics( access, result.state ); 00554 00555 param->result = result; 00556 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
const AccessType Onikiri::Cache::AOT_PREFETCH = Access::OT_PREFETCH [static, protected] |
const AccessType Onikiri::Cache::AOT_READ = Access::OT_READ [static, protected] |
const AccessType Onikiri::Cache::AOT_READ_FOR_WRITE_ALLOCATE = Access::OT_READ_FOR_WRITE_ALLOCATE [static, protected] |
const AccessType Onikiri::Cache::AOT_WRITE = Access::OT_WRITE [static, protected] |
const AccessType Onikiri::Cache::AOT_WRITE_BACK = Access::OT_WRITE_BACK [static, protected] |
CacheAccessRequestQueue* Onikiri::Cache::m_accessQueue [protected] |
TableType* Onikiri::Cache::m_cacheTable [protected] |
s64 Onikiri::Cache::m_capacityKB [protected] |
int Onikiri::Cache::m_exclusiveAccessCycles [protected] |
int Onikiri::Cache::m_indexBitSize [protected] |
int Onikiri::Cache::m_latency [protected] |
int Onikiri::Cache::m_level [protected] |
int Onikiri::Cache::m_lineBitSize [protected] |
ExtraStateTableType* Onikiri::Cache::m_lineState [protected] |
String Onikiri::Cache::m_maxThroughputBytesPerCycle [protected] |
CacheMissedAccessList* Onikiri::Cache::m_missedAccessList [protected] |
int Onikiri::Cache::m_missedAccessListSize [protected] |
std::string Onikiri::Cache::m_name [protected] |
Cache* Onikiri::Cache::m_nextLevelCache [protected] |
s64 Onikiri::Cache::m_numInvalidated [protected] |
int Onikiri::Cache::m_numPorts [protected] |
s64 Onikiri::Cache::m_numPrefetchAccess [protected] |
s64 Onikiri::Cache::m_numPrefetchHit [protected] |
s64 Onikiri::Cache::m_numPrefetchMiss [protected] |
s64 Onikiri::Cache::m_numPrefetchPendingHit [protected] |
s64 Onikiri::Cache::m_numReadAccess [protected] |
s64 Onikiri::Cache::m_numReadHit [protected] |
s64 Onikiri::Cache::m_numReadMiss [protected] |
s64 Onikiri::Cache::m_numReadPendingHit [protected] |
int Onikiri::Cache::m_numWays [protected] |
s64 Onikiri::Cache::m_numWriteAccess [protected] |
s64 Onikiri::Cache::m_numWriteHit [protected] |
s64 Onikiri::Cache::m_numWriteMiss [protected] |
s64 Onikiri::Cache::m_numWritePendingHit [protected] |
int Onikiri::Cache::m_offsetBitSize [protected] |
int Onikiri::Cache::m_perfect [protected] |
PrefetcherIF* Onikiri::Cache::m_prefetcher [protected] |
PhysicalResourceArray<Cache> Onikiri::Cache::m_prevLevelCaches [protected] |
int Onikiri::Cache::m_reqQueueSize [protected] |
WritePolicy Onikiri::Cache::m_writePolicy [protected] |
HookPoint< Cache, CacheHookParam > Onikiri::Cache::s_invalidateHook [static] |
HookPoint< Cache, CacheHookParam > Onikiri::Cache::s_readHook [static] |
HookPoint< Cache, CacheHookParam > Onikiri::Cache::s_tableUpdateHook [static] |
HookPoint< Cache, CacheHookParam > Onikiri::Cache::s_writeHook [static] |