クラス Onikiri::MemExecUnit

#include <MemExecUnit.h>

Onikiri::MemExecUnitに対する継承グラフ

Inheritance graph
[凡例]
Onikiri::MemExecUnitのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public メソッド

 BEGIN_PARAM_PATH (GetParamPath()) MemExecUnit()
virtual void Execute (OpIterator op)
CacheGetCache ()
virtual int GetLatency (const OpClass &opClass, int index)
virtual int GetLatencyCount (const OpClass &opClass)
void Initialize (InitPhase phase)
virtual ~MemExecUnit ()

Protected メソッド

int GetExecutedLatency (OpIterator op)
int GetExecutedReadLatency (OpIterator op)
int GetExecutedWriteLatency (OpIterator op)
OpIterator GetProducerStore (OpIterator consumer)

Protected 変数

Cachem_cache
int m_cacheCount
CacheSystemm_cacheSystem
int m_floatConversionLatency
PhysicalResourceArray< MemOrderManagerm_memOrderManager

説明

MemExecUnit.h48 行で定義されています。


コンストラクタとデストラクタ

MemExecUnit::~MemExecUnit (  )  [virtual]

MemExecUnit.cpp61 行で定義されています。

参照先 Onikiri::PhysicalResourceNode::ReleaseParam().

00062 {
00063     ReleaseParam();
00064 }

関数の呼び出しグラフ:


関数

Onikiri::MemExecUnit::BEGIN_PARAM_PATH ( GetParamPath()   ) 

Onikiri::ExecUnitBaseを再定義しています。

void MemExecUnit::Execute ( OpIterator  op  )  [virtual]

Onikiri::PipelinedExecUnitを再定義しています。

MemExecUnit.cpp87 行で定義されています。

参照先 Onikiri::ExecUnitBase::Execute()GetExecutedLatency()Onikiri::ExecUnitBase::RegisterEvents().

00088 {
00089     ExecUnitBase::Execute( op );    // Not PipelinedExecUnit
00090     RegisterEvents( op, GetExecutedLatency( op ) );
00091 }

関数の呼び出しグラフ:

Cache* Onikiri::MemExecUnit::GetCache (  )  [inline]

MemExecUnit.h80 行で定義されています。

参照先 m_cache.

00080 { return m_cache; }

int MemExecUnit::GetExecutedLatency ( OpIterator  op  )  [protected]

MemExecUnit.cpp94 行で定義されています。

参照先 GetExecutedReadLatency()GetExecutedWriteLatency()THROW_RUNTIME_ERROR.

参照元 Execute().

00095 {
00096     int latency = 0;
00097 
00098     if(op->GetOpClass().IsLoad()) {
00099         latency = GetExecutedReadLatency(op);
00100     } else if(op->GetOpClass().IsStore()) {
00101         latency = GetExecutedWriteLatency(op);
00102     } else {
00103         THROW_RUNTIME_ERROR("Unknwon opclass.");
00104     }
00105 
00106     return latency;
00107 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int MemExecUnit::GetExecutedReadLatency ( OpIterator  op  )  [protected]

MemExecUnit.cpp113 行で定義されています。

参照先 GetLatency()GetProducerStore()Onikiri::OpIterator::IsNull()m_cachem_floatConversionLatencyOnikiri::CacheAccess::OT_READOnikiri::Cache::Read()Onikiri::CacheAccessResult::ST_HITOnikiri::CacheAccessResult::ST_NOT_ACCESSED.

参照元 GetExecutedLatency().

00114 {
00115     int readLatency = 0;
00116 
00117     //  StoreBuffer AhXvs Store 
00118     //  cache ANZX
00119     OpIterator producer = GetProducerStore( op );
00120 
00121     // Only the first access is set to op, because the second or later cache 
00122     // accesses are always partial hit and they are not useful for statistics.
00123     bool firstAccess = 
00124         op->GetCacheAccessResult().state == CacheAccessResult::ST_NOT_ACCESSED;
00125 
00126     if( !producer.IsNull() ) {
00127         readLatency = GetLatency( op->GetOpClass(), 0 );
00128 
00129         if( firstAccess ){
00130             CacheAccessResult result( 0, CacheAccessResult::ST_HIT, NULL );
00131             op->SetCacheAccessResult( result );
00132         }
00133     } 
00134     else {
00135         CacheAccess access( op->GetMemAccess(), op, CacheAccess::OT_READ );
00136         CacheAccessResult result = m_cache->Read( access, NULL );
00137         readLatency = result.latency;
00138         
00139         if( firstAccess ){
00140             op->SetCacheAccessResult( result );
00141         }
00142 
00143         // float  Load CeV
00144         if( op->GetOpClass().IsFloat() ) {
00145             readLatency += m_floatConversionLatency;
00146         }
00147     }
00148 
00149     return readLatency;
00150 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int MemExecUnit::GetExecutedWriteLatency ( OpIterator  op  )  [protected]

MemExecUnit.cpp153 行で定義されています。

参照先 codeOnikiri::ExecLatencyInfo::GetLatency()Onikiri::ExecUnitBase::m_execLatencyInfo.

参照元 GetExecutedLatency().

00154 {
00155     // StoreBuffer  Write CeV( ISA K)
00156     int code = op->GetOpClass().GetCode();
00157     int writeLatency = m_execLatencyInfo->GetLatency(code);
00158 
00159     return writeLatency; 
00160 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int MemExecUnit::GetLatency ( const OpClass opClass,
int  index 
) [virtual]

Onikiri::ExecUnitBaseを再定義しています。

MemExecUnit.cpp176 行で定義されています。

参照先 ASSERTOnikiri::OpClass::GetCode()Onikiri::ExecLatencyInfo::GetLatency()Onikiri::Cache::GetNextCache()Onikiri::OpClass::IsFloat()Onikiri::OpClass::IsLoad()Onikiri::OpClass::IsMem()Onikiri::OpClass::IsStore()m_cacheOnikiri::ExecUnitBase::m_execLatencyInfom_floatConversionLatency.

参照元 GetExecutedReadLatency().

00177 {
00178     ASSERT( opClass.IsMem(), "not mem op");
00179     if( opClass.IsStore() ) {
00180         // store CeV ExecLatencyInfo 
00181         return m_execLatencyInfo->GetLatency(opClass.GetCode());
00182     }
00183     
00184     int latency = 0;
00185     Cache* cache = m_cache;
00186     for(int i = 0; i <= index; ++i, cache = cache->GetNextCache()) {
00187         ASSERT(cache != 0, "cache not set.(index: %d)", index);
00188         latency += cache->GetStaticLatency();
00189     }
00190     
00191     if( opClass.IsFloat() && opClass.IsLoad() ) {
00192         latency += m_floatConversionLatency;
00193     }
00194 
00195     return latency;
00196 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

int MemExecUnit::GetLatencyCount ( const OpClass opClass  )  [virtual]

Onikiri::ExecUnitBaseを再定義しています。

MemExecUnit.cpp163 行で定義されています。

参照先 ASSERTOnikiri::OpClass::IsMem()Onikiri::OpClass::IsStore()m_cacheCount.

00164 {
00165     ASSERT(opClass.IsMem(), "not mem op");
00166     if( opClass.IsStore() ) {
00167         // store CeV
00168         return 1;
00169     }
00170 
00171     // load LbV\
00172     return m_cacheCount;
00173 }

関数の呼び出しグラフ:

OpIterator MemExecUnit::GetProducerStore ( OpIterator  consumer  )  [protected]

MemExecUnit.cpp199 行で定義されています。

参照先 Onikiri::MemOrderManager::GetProducerStore().

参照元 GetExecutedReadLatency().

00200 {
00201     MemOrderManager* memOrderManager = 
00202         consumer->GetThread()->GetMemOrderManager();
00203 
00204     return
00205         memOrderManager->GetProducerStore(
00206             consumer,
00207             consumer->GetMemAccess()
00208         );
00209 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void MemExecUnit::Initialize ( InitPhase  phase  )  [virtual]

Onikiri::ExecUnitBaseを再定義しています。

MemExecUnit.cpp66 行で定義されています。

参照先 Onikiri::PhysicalResourceNode::CheckNodeInitialized()Onikiri::CacheSystem::GetFirstLevelDataCache()Onikiri::Cache::GetNextCache()Onikiri::PhysicalResourceNode::INIT_POST_CONNECTIONOnikiri::PhysicalResourceNode::INIT_PRE_CONNECTIONOnikiri::ExecUnitBase::Initialize()m_cachem_cacheCountm_cacheSystemm_memOrderManager.

00067 {
00068     if(phase == INIT_PRE_CONNECTION){
00069     }
00070     else if(phase == INIT_POST_CONNECTION){
00071         CheckNodeInitialized( "memOrderManager", m_memOrderManager );
00072         CheckNodeInitialized( "cacheSystem", m_cacheSystem );
00073 
00074         // LbV
00075         m_cache = m_cacheSystem->GetFirstLevelDataCache();
00076         m_cacheCount = 0;
00077         Cache* cache = m_cache;
00078         for(; cache != 0; cache = cache->GetNextCache(), ++m_cacheCount) {}
00079     }
00080     
00081     PipelinedExecUnit::Initialize(phase);
00082 
00083 }

関数の呼び出しグラフ:


変数

Cache* Onikiri::MemExecUnit::m_cache [protected]

MemExecUnit.h86 行で定義されています。

参照元 GetCache()GetExecutedReadLatency()GetLatency()Initialize().

int Onikiri::MemExecUnit::m_cacheCount [protected]

MemExecUnit.h89 行で定義されています。

参照元 GetLatencyCount()Initialize().

CacheSystem* Onikiri::MemExecUnit::m_cacheSystem [protected]

MemExecUnit.h85 行で定義されています。

参照元 Initialize().

int Onikiri::MemExecUnit::m_floatConversionLatency [protected]

MemExecUnit.h92 行で定義されています。

参照元 GetExecutedReadLatency()GetLatency().

PhysicalResourceArray<MemOrderManager> Onikiri::MemExecUnit::m_memOrderManager [protected]

MemExecUnit.h93 行で定義されています。

参照元 Initialize().


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 15:04:07 2013に生成されました。  doxygen 1.4.7