#include <CacheAccessRequestQueue.h>
Onikiri::CacheAccessRequestQueueのコラボレーション図
Public 型 | |
typedef CacheAccess | Access |
typedef pool_list< AccessState > | AccessQueue |
typedef AccessQueue::iterator | AccessQueueIterator |
typedef CacheAccessEventType | EventType |
typedef CacheAccessResult | Result |
Public メソッド | |
CacheAccessRequestQueue (Pipeline *pipe, int ports, int serializedCycles) | |
size_t | GetSize () const |
void | Pop (const CacheAccess &access, AccessQueueIterator target) |
s64 | Push (const Access &access, int m_minLatency, CacheAccessNotifieeIF *notifiee, const CacheAccessNotificationParam ¬ification) |
void | SetEnabled (bool enabled) |
virtual | ~CacheAccessRequestQueue () |
Protected メソッド | |
s64 | GetNextAccessStartableTime () |
void | PushAccess (const CacheAccess &access, const AccessState &state, int latency) |
Protected 変数 | |
u64 | m_currentAccessID |
bool | m_enabled |
Pipeline * | m_pipe |
int | m_ports |
AccessQueue | m_queue |
int | m_serializedCycles |
構成 | |
struct | AccessState |
CacheAccessRequestQueue.h の 45 行で定義されています。
CacheAccessRequestQueue.h の 49 行で定義されています。
CacheAccessRequestQueue.h の 70 行で定義されています。
typedef AccessQueue::iterator Onikiri::CacheAccessRequestQueue::AccessQueueIterator |
CacheAccessRequestQueue.h の 71 行で定義されています。
CacheAccessRequestQueue.h の 51 行で定義されています。
CacheAccessRequestQueue.h の 50 行で定義されています。
CacheAccessRequestQueue::CacheAccessRequestQueue | ( | Pipeline * | pipe, | |
int | ports, | |||
int | serializedCycles | |||
) |
CacheAccessRequestQueue.cpp の 46 行で定義されています。
00050 : 00051 m_enabled( false ), 00052 m_currentAccessID( 0 ), 00053 m_pipe( pipe ), 00054 m_ports( ports ), 00055 m_serializedCycles( serializedCycles ) 00056 { 00057 }
CacheAccessRequestQueue::~CacheAccessRequestQueue | ( | ) | [virtual] |
s64 CacheAccessRequestQueue::GetNextAccessStartableTime | ( | ) | [protected] |
CacheAccessRequestQueue.cpp の 69 行で定義されています。
参照先 ASSERT・Onikiri::TimeWheelBase::GetNow()・m_pipe・m_ports・m_queue.
参照元 Push().
00070 { 00071 s64 now = m_pipe->GetNow(); 00072 if( m_ports == 0 || m_queue.size() == 0 ){ 00073 return now; 00074 } 00075 00076 if( (int)m_queue.size() < m_ports ){ 00077 return now; 00078 } 00079 00080 AccessQueue::reverse_iterator firstPortAccess = m_queue.rbegin(); 00081 for( int i = 0; i < m_ports - 1; i++ ) 00082 { 00083 firstPortAccess++; 00084 ASSERT( firstPortAccess != m_queue.rend() ); 00085 } 00086 00087 s64 serializingEndTime = firstPortAccess->serializingEndTime; 00088 00089 //printf( "%I64d - %I64d\n", now, serializingEndTime ); 00090 00091 if( serializingEndTime < now ) 00092 return now; 00093 else 00094 return serializingEndTime; 00095 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
size_t CacheAccessRequestQueue::GetSize | ( | ) | const |
CacheAccessRequestQueue.cpp の 184 行で定義されています。
参照先 m_queue.
参照元 Onikiri::Cache::IsStallRequired().
00185 { 00186 return m_queue.size(); 00187 }
Here is the caller graph for this function:
void CacheAccessRequestQueue::Pop | ( | const CacheAccess & | access, | |
AccessQueueIterator | target | |||
) |
CacheAccessRequestQueue.cpp の 166 行で定義されています。
参照先 Onikiri::CacheAccessNotifieeIF::AccessFinished()・ASSERT・m_enabled・m_queue.
参照元 Onikiri::CacheAccessEndEvent::Update().
00168 { 00169 00170 ASSERT( m_enabled ); 00171 00172 // Remove an access request from the queue. 00173 CacheAccessNotificationParam notification = target->notification; 00174 CacheAccessNotifieeIF* notifiee = target->notifiee; 00175 m_queue.erase( target ); 00176 00177 // Notify access finish. 00178 if( notifiee ){ 00179 notifiee->AccessFinished( access, notification ); 00180 } 00181 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
s64 CacheAccessRequestQueue::Push | ( | const Access & | access, | |
int | m_minLatency, | |||
CacheAccessNotifieeIF * | notifiee, | |||
const CacheAccessNotificationParam & | notification | |||
) |
CacheAccessRequestQueue.cpp の 116 行で定義されています。
参照先 Onikiri::CacheAccessNotifieeIF::AccessFinished()・ASSERT・GetNextAccessStartableTime()・Onikiri::TimeWheelBase::GetNow()・m_currentAccessID・m_enabled・m_pipe・m_ports・m_serializedCycles・PushAccess().
参照元 Onikiri::Cache::OnReadHit()・Onikiri::Cache::OnWriteHit().
00121 { 00122 if( !m_enabled || m_ports == 0 || m_serializedCycles == 0 ){ 00123 // Notify access finish. 00124 if( notifiee ){ 00125 notifiee->AccessFinished( access, notification ); 00126 } 00127 return minLatency; 00128 } 00129 00130 s64 now = m_pipe->GetNow(); 00131 00132 // Each access exclusively use one cache port for S cycles. 00133 // After S cycles, a next access can start. 00134 // L: latency (Cache/@Latency) 00135 // S: serialized cycles () 00136 // *: wait for serializing 00137 // 00138 // A0: <--S--><------(L-S)------> 00139 // A1: *****<--S--><------(L-S)------> 00140 // A2: ***********<--S--><------(L-S)------> 00141 00142 ASSERT( minLatency >= m_serializedCycles, "Minimum latency is shorter than serialized cycles." ); 00143 00144 s64 serializingStartTime = GetNextAccessStartableTime(); 00145 s64 accessEndTime = serializingStartTime + minLatency; 00146 00147 AccessState state = 00148 { 00149 access, // addr 00150 m_currentAccessID, // ID 00151 now, // start 00152 accessEndTime, // end 00153 serializingStartTime, // serializingStart 00154 serializingStartTime + m_serializedCycles, // serializingEnd 00155 notifiee, // notifiee 00156 notification // type 00157 }; 00158 00159 int latency = (int)( accessEndTime - now ); 00160 PushAccess( access, state, latency ); 00161 return latency; 00162 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void CacheAccessRequestQueue::PushAccess | ( | const CacheAccess & | access, | |
const AccessState & | state, | |||
int | latency | |||
) | [protected] |
CacheAccessRequestQueue.cpp の 98 行で定義されています。
参照先 Onikiri::TimeWheelBase::AddEvent()・Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・m_currentAccessID・m_pipe・m_queue.
参照元 Push().
00099 { 00100 m_currentAccessID++; 00101 m_queue.push_back( state ); 00102 00103 // An event of memory access end time. 00104 AccessQueueIterator stateIterator = m_queue.end(); 00105 stateIterator--; 00106 EventPtr evnt( 00107 CacheAccessEndEvent::Construct( access, stateIterator, this ) 00108 ); 00109 m_pipe->AddEvent( evnt, latency ); 00110 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void CacheAccessRequestQueue::SetEnabled | ( | bool | enabled | ) |
CacheAccessRequestQueue.cpp の 63 行で定義されています。
参照先 m_enabled.
参照元 Onikiri::Cache::ChangeSimulationMode().
00064 { 00065 m_enabled = enabled; 00066 }
Here is the caller graph for this function:
bool Onikiri::CacheAccessRequestQueue::m_enabled [protected] |
Pipeline* Onikiri::CacheAccessRequestQueue::m_pipe [protected] |
int Onikiri::CacheAccessRequestQueue::m_ports [protected] |
AccessQueue Onikiri::CacheAccessRequestQueue::m_queue [protected] |
CacheAccessRequestQueue.h の 104 行で定義されています。
参照元 GetNextAccessStartableTime()・GetSize()・Pop()・PushAccess().
int Onikiri::CacheAccessRequestQueue::m_serializedCycles [protected] |