#include <ExecUnitBase.h>
Onikiri::ExecUnitBaseに対する継承グラフ
Public メソッド | |
virtual void | Begin () |
BEGIN_PARAM_PATH (GetParamPath()) BEGIN_PARAM_PATH(GetResultPath()) RESULT_RATE_SUM_ENTRY("@UseRate" | |
m_numUsable | ExecUnitBase () |
virtual void | Execute (OpIterator op) |
virtual void | Finalize () |
ExecLatencyInfo * | GetExecLatencyInfo () |
virtual int | GetLatency (const OpClass &opClass, int index) |
virtual int | GetLatencyCount (const OpClass &opClass) |
virtual int | GetMappedCode (int index) |
virtual int | GetMappedCodeCount () |
virtual ExecUnitReserver * | GetReserver () |
virtual void | Initialize (InitPhase phase) |
virtual void | Update () |
virtual | ~ExecUnitBase () |
Public 変数 | |
m_numUsed | |
Protected メソッド | |
void | RegisterDetectEvent (OpIterator op, const int latency) |
void | RegisterEvents (OpIterator op, const int latency) |
void | RegisterFinishEvent (OpIterator op, const int latency) |
void | RegisterRescheduleEvent (OpIterator op, const int latency, IssueState *issueState) |
Protected 変数 | |
std::vector< int > | m_code |
std::vector< String > | m_codeStr |
Core * | m_core |
ExecLatencyInfo * | m_execLatencyInfo |
std::string | m_name |
int | m_numPorts |
u64 | m_numUsable |
u64 | m_numUsed |
ExecUnitReserver | m_reserver |
ExecUnitBase.h の 48 行で定義されています。
ExecUnitBase::ExecUnitBase | ( | ) |
ExecUnitBase.cpp の 52 行で定義されています。
参照先 m_core・m_execLatencyInfo・m_numPorts・m_numUsable・m_numUsed.
00053 { 00054 m_execLatencyInfo = 0; 00055 m_core = 0; 00056 m_numPorts = 0; 00057 m_numUsed = 0; 00058 m_numUsable = 0; 00059 }
ExecUnitBase::~ExecUnitBase | ( | ) | [virtual] |
void ExecUnitBase::Begin | ( | ) | [virtual] |
Onikiri::ExecUnitIFを実装しています。
ExecUnitBase.cpp の 276 行で定義されています。
参照先 Onikiri::ExecUnitReserver::Begin()・m_reserver.
00277 { 00278 m_reserver.Begin(); 00279 }
関数の呼び出しグラフ:
Onikiri::ExecUnitBase::BEGIN_PARAM_PATH | ( | GetParamPath() | ) |
Onikiri::MemExecUnitで再定義されています。
void ExecUnitBase::Execute | ( | OpIterator | op | ) | [virtual] |
Onikiri::ExecUnitIFを実装しています。
Onikiri::ExecUnit・Onikiri::MemExecUnit・Onikiri::PipelinedExecUnitで再定義されています。
ExecUnitBase.cpp の 101 行で定義されています。
参照先 Onikiri::DS_EXECUTE・Onikiri::Dumper::Dump()・Onikiri::g_dumper・Onikiri::OpStatus::OS_EXECUTING.
参照元 Onikiri::PipelinedExecUnit::Execute()・Onikiri::MemExecUnit::Execute()・Onikiri::ExecUnit::Execute().
00102 { 00103 // ExecutionBegin() G~[Vs 00104 // タss--タsXe[WiKC 00105 // \[XEIyhm-- 00106 // execution stages G~[VsD 00107 00108 // When a multi-issue mode is enabled, Execute() need to be called more than once, 00109 // because access order violation is detected from 'executed' load ops. 00110 // Re-scheduling changes the status of load ops to 'un-executed' and 00111 // cannot detect those load ops. 00112 op->ExecutionBegin(); 00113 g_dumper.Dump( DS_EXECUTE, op ); 00114 op->SetStatus( OpStatus::OS_EXECUTING ); 00115 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void ExecUnitBase::Finalize | ( | ) | [virtual] |
Onikiri::PhysicalResourceNodeを再定義しています。
ExecUnitBase.cpp の 81 行で定義されています。
参照先 Onikiri::Core::GetGlobalClock()・Onikiri::GlobalClock::GetTick()・m_core・m_numPorts・m_numUsable・Onikiri::PhysicalResourceNode::ReleaseParam().
00082 { 00083 if( m_core ){ 00084 m_numUsable = m_core->GetGlobalClock()->GetTick() * m_numPorts; 00085 } 00086 ReleaseParam(); 00087 }
関数の呼び出しグラフ:
ExecLatencyInfo* Onikiri::ExecUnitBase::GetExecLatencyInfo | ( | ) | [inline, virtual] |
Onikiri::ExecUnitIFを実装しています。
ExecUnitBase.h の 102 行で定義されています。
参照先 m_execLatencyInfo.
00103 { 00104 return m_execLatencyInfo; 00105 }
int ExecUnitBase::GetLatency | ( | const OpClass & | opClass, | |
int | index | |||
) | [virtual] |
Onikiri::ExecUnitIFを実装しています。
Onikiri::MemExecUnitで再定義されています。
ExecUnitBase.cpp の 269 行で定義されています。
参照先 Onikiri::OpClass::GetCode()・Onikiri::ExecLatencyInfo::GetLatency()・m_execLatencyInfo.
00270 { 00271 // PExecLatencyInfo 00272 return m_execLatencyInfo->GetLatency(opClass.GetCode()); 00273 }
関数の呼び出しグラフ:
int ExecUnitBase::GetLatencyCount | ( | const OpClass & | opClass | ) | [virtual] |
int ExecUnitBase::GetMappedCode | ( | int | index | ) | [virtual] |
Onikiri::ExecUnitIFを実装しています。
ExecUnitBase.cpp の 89 行で定義されています。
参照先 m_code・THROW_RUNTIME_ERROR.
00090 { 00091 if((int)m_code.size() <= i) 00092 THROW_RUNTIME_ERROR("invalid mapped code."); 00093 return m_code[i]; 00094 }
int ExecUnitBase::GetMappedCodeCount | ( | ) | [virtual] |
Onikiri::ExecUnitIFを実装しています。
ExecUnitBase.cpp の 96 行で定義されています。
参照先 m_code.
00097 { 00098 return (int)m_code.size(); 00099 }
virtual ExecUnitReserver* Onikiri::ExecUnitBase::GetReserver | ( | ) | [inline, virtual] |
Onikiri::ExecUnitIFを実装しています。
ExecUnitBase.h の 107 行で定義されています。
参照先 m_reserver.
00108 { 00109 return &m_reserver; 00110 }
void ExecUnitBase::Initialize | ( | InitPhase | phase | ) | [virtual] |
Onikiri::MemExecUnitで再定義されています。
ExecUnitBase.cpp の 65 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::CheckNodeInitialized()・Onikiri::OpClassCode::FromString()・Onikiri::Core::GetTimeWheelSize()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::ExecUnitReserver::Initialize()・Onikiri::ParamExchange::LoadParam()・m_code・m_codeStr・m_core・m_execLatencyInfo・m_numPorts・m_reserver.
参照元 Onikiri::MemExecUnit::Initialize().
00066 { 00067 if(phase == INIT_PRE_CONNECTION){ 00068 LoadParam(); 00069 for(size_t i = 0; i < m_codeStr.size(); i++){ 00070 m_code.push_back( OpClassCode::FromString( m_codeStr[i] ) ); 00071 } 00072 } 00073 else if(phase == INIT_POST_CONNECTION){ 00074 CheckNodeInitialized( "execLatencyInfo", m_execLatencyInfo ); 00075 CheckNodeInitialized( "core", m_core ); 00076 00077 m_reserver.Initialize( m_numPorts, m_core->GetTimeWheelSize() ); 00078 } 00079 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void ExecUnitBase::RegisterDetectEvent | ( | OpIterator | op, | |
const int | latency | |||
) | [protected] |
ExecUnitBase.cpp の 171 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・Onikiri::LatPredResult::Get()・Onikiri::LatPredResult::GetCount()・Onikiri::PipelineNodeBase::GetLowerPipeline().
参照元 RegisterEvents().
00172 { 00173 const LatPredResult& predResult = op->GetLatPredRsult(); 00174 00175 // Detect events 00176 Scheduler* scheduler = op->GetScheduler(); 00177 int wakeups = predResult.GetCount(); 00178 for( int i = 0; i < wakeups - 1; i++ ){ 00179 const LatPredResult::Scheduling& sched = predResult.Get( i ); 00180 if( sched.wakeup ){ 00181 00182 EventPtr detectLatPredMiss( 00183 OpDetectLatPredMissEvent::Construct( op, 0, sched.latency, latency ) 00184 ); 00185 op->AddEvent( 00186 detectLatPredMiss, 00187 scheduler->GetLowerPipeline(), 00188 sched.latency - 1 00189 ); 00190 } 00191 } 00192 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void ExecUnitBase::RegisterEvents | ( | OpIterator | op, | |
const int | latency | |||
) | [protected] |
ExecUnitBase.cpp の 118 行で定義されています。
参照先 Onikiri::IssueState::executionKicked・Onikiri::IssueState::executionKickedTime・Onikiri::IssueState::executionLatency・Onikiri::LatPredResult::Scheduling::latency・Onikiri::IssueState::multiIssue・RegisterDetectEvent()・RegisterFinishEvent()・RegisterRescheduleEvent()・THROW_RUNTIME_ERROR.
参照元 Onikiri::PipelinedExecUnit::Execute()・Onikiri::MemExecUnit::Execute()・Onikiri::ExecUnit::Execute().
00119 { 00120 IssueState issueState = op->GetIssueState(); 00121 00122 // Record a cycle time when execution is kicked initially. 00123 // 'executionKicked' is cleared when op is canceled by the other ops. 00124 if( !issueState.executionKicked ){ 00125 issueState.executionKickedTime = 00126 op->GetScheduler()->GetLowerPipeline()->GetNow(); 00127 issueState.executionLatency = latency; 00128 } 00129 00130 if( issueState.multiIssue ){ 00131 // Multi issue mode 00132 const LatPredResult::Scheduling& schd = op->GetLatPredRsult().Get(0); 00133 if( schd.latency == latency ){ 00134 RegisterFinishEvent( op, latency ); // タsICxgo^ 00135 } 00136 else{ 00137 RegisterRescheduleEvent( op, latency, &issueState ); 00138 } 00139 } 00140 else{ 00141 // Single issue mode 00142 if( issueState.executionKicked ){ 00143 THROW_RUNTIME_ERROR( "An op is executed more than once." ); 00144 } 00145 else{ 00146 RegisterFinishEvent( op, latency ); // タsICxgo^ 00147 RegisterDetectEvent( op, latency ); // \~XoCxgo^ 00148 } 00149 } 00150 00151 issueState.executionKicked = true; 00152 op->SetIssueState( issueState ); 00153 00154 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void ExecUnitBase::RegisterFinishEvent | ( | OpIterator | op, | |
const int | latency | |||
) | [protected] |
ExecUnitBase.cpp の 157 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct().
参照元 RegisterEvents().
00158 { 00159 // finish Cxgo^ 00160 EventPtr finishEvent( 00161 OpFinishEvent::Construct( op )); 00162 // RegisterFinishEvent タsJn(OpExecuteEvent) 00163 // Finish タsCeV-1 TCN 00164 op->AddEvent( 00165 finishEvent, 00166 op->GetScheduler()->GetLowerPipeline(), 00167 latency - 1 00168 ); 00169 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void ExecUnitBase::RegisterRescheduleEvent | ( | OpIterator | op, | |
const int | latency, | |||
IssueState * | issueState | |||
) | [protected] |
ExecUnitBase.cpp の 194 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・Onikiri::IssueState::currentPredIndex・Onikiri::Op::EVENT_MASK_WAKEUP_RELATED・Onikiri::IssueState::executionKicked・Onikiri::IssueState::executionKickedTime・Onikiri::LatPredResult::Get()・Onikiri::LatPredResult::GetCount()・Onikiri::LatPredResult::Scheduling::latency・Onikiri::LatPredResult::Scheduling::wakeup.
参照元 RegisterEvents().
00195 { 00196 const LatPredResult::Scheduling& schd = op->GetLatPredRsult().Get(0); 00197 int minLatency = schd.latency; 00198 00199 00200 int elpasedTime = (int)( op->GetScheduler()->GetLowerPipeline()->GetNow() - issueState->executionKickedTime ); 00201 int latencyOffset = op->GetScheduler()->GetIssueLatency() + 1 + minLatency; 00202 00203 // Search next speculatively rescheduling timing. 00204 const LatPredResult& predResult = op->GetLatPredRsult(); 00205 int wakeups = predResult.GetCount(); 00206 int rsLatency = 0; 00207 bool speculative = false; 00208 for( int i = issueState->currentPredIndex + 1; i < wakeups; i++ ){ 00209 const LatPredResult::Scheduling& sched = predResult.Get( i ); 00210 if( sched.wakeup ){ 00211 issueState->currentPredIndex = i; 00212 rsLatency = predResult.Get(i).latency - latencyOffset - elpasedTime; 00213 speculative = true; 00214 break; 00215 } 00216 } 00217 00218 // There is no speculative rescheduling timing, wait for the latency. 00219 if( !speculative ){ 00220 rsLatency = latency - latencyOffset; 00221 } 00222 00223 if( rsLatency < 1 ){ 00224 rsLatency = 1; 00225 } 00226 00227 // When ops are speculatively waken-up, detection events need to be registered. 00228 if( (!issueState->executionKicked && schd.wakeup) || 00229 issueState->executionKicked 00230 ){ 00231 // Detection events need to occur before re-scheduling events occur, 00232 // because re-scheduling events cancel all the other events. 00233 if( rsLatency < minLatency ){ 00234 rsLatency = minLatency; 00235 } 00236 00237 // An op is issued when the op is finished for 'minLatency' except the first time, 00238 // so detection events are registered after 'minLatency'. 00239 EventPtr detectLatPredMiss( 00240 OpDetectLatPredMissEvent::Construct( op, 0, minLatency, latency ) 00241 ); 00242 op->AddEvent( 00243 detectLatPredMiss, 00244 op->GetScheduler()->GetLowerPipeline(), 00245 minLatency - 1 00246 ); 00247 } 00248 00249 // Re-scheduling events need to be registered after detection events. 00250 EventPtr evnt( 00251 OpRescheduleEvent::Construct(op) 00252 ); 00253 op->AddEvent( evnt, op->GetScheduler()->GetLowerPipeline(), rsLatency, Op::EVENT_MASK_WAKEUP_RELATED ); 00254 00255 00256 00257 00258 00259 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void ExecUnitBase::Update | ( | ) | [virtual] |
Onikiri::ExecUnitIFを実装しています。
ExecUnitBase.cpp の 282 行で定義されています。
参照先 m_reserver・Onikiri::ExecUnitReserver::Update().
00283 { 00284 m_reserver.Update(); 00285 }
関数の呼び出しグラフ:
std::vector<int> Onikiri::ExecUnitBase::m_code [protected] |
std::vector<String> Onikiri::ExecUnitBase::m_codeStr [protected] |
Core* Onikiri::ExecUnitBase::m_core [protected] |
ExecLatencyInfo* Onikiri::ExecUnitBase::m_execLatencyInfo [protected] |
ExecUnitBase.h の 121 行で定義されています。
参照元 Onikiri::ExecUnit::CanReserve()・ExecUnitBase()・Onikiri::PipelinedExecUnit::Execute()・Onikiri::ExecUnit::Execute()・GetExecLatencyInfo()・Onikiri::MemExecUnit::GetExecutedWriteLatency()・Onikiri::MemExecUnit::GetLatency()・GetLatency()・Initialize()・Onikiri::ExecUnit::Reserve().
std::string Onikiri::ExecUnitBase::m_name [protected] |
ExecUnitBase.h の 113 行で定義されています。
int Onikiri::ExecUnitBase::m_numPorts [protected] |
u64 Onikiri::ExecUnitBase::m_numUsable [protected] |
u64 Onikiri::ExecUnitBase::m_numUsed [protected] |
ExecUnitBase.h の 117 行で定義されています。
ExecUnitReserver Onikiri::ExecUnitBase::m_reserver [protected] |