#include <Scheduler.h>
Onikiri::Schedulerに対する継承グラフ
Public 型 | |
typedef fixed_sized_buffer< OpIterator, MAX_SCHEDULING_OPS, Scheduler > | SchedulingOps |
Public メソッド | |
virtual void | Begin () |
BEGIN_PARAM_MAP (GetParamPath()) PARAM_ENTRY("@Index" | |
bool | CanAllocate (int ops) |
virtual void | Cancel (OpIterator op) |
bool | CanSelect (OpIterator op) |
virtual void | Commit (OpIterator op) |
virtual void | Evaluate () |
void | EvaluateDependency (OpIterator op) |
virtual void | ExitUpperPipeline (OpIterator op) |
void | Finished (OpIterator op) |
virtual void | Flush (OpIterator op) |
ExecUnitIF * | GetExecUnit (int code) |
const std::vector< ExecUnitIF * > & | GetExecUnitList () const |
int | GetIndex () const |
const OpBuffer & | GetIssuedOps () const |
int | GetIssueLatency () const |
int | GetIssueWidth () const |
const OpList & | GetNotReadyOps () const |
const OpList & | GetReadyOps () const |
const SchedulingOps & | GetWokeUpOps () const |
void | Initialize (InitPhase phase) |
bool | IsInScheduler (OpIterator op) |
void | Issue (OpIterator op) |
PARAM_ENTRY ("@WindowCapacity", m_windowCapacity) | |
PARAM_ENTRY ("@CommunicationLatency", m_communicationLatency) | |
PARAM_ENTRY ("@WritebackLatency", m_writeBackLatency) | |
PARAM_ENTRY ("@IssueLatency", m_issueLatency) | |
PARAM_ENTRY ("@IssueWidth", m_issueWidth) | |
void | RegisterWakeUpEvent (OpIterator op, int latencyFromOp) |
bool | Reschedule (OpIterator op) |
void | ReserveSelect (OpIterator op) |
virtual void | Retire (OpIterator op) |
Scheduler () | |
void | SetExecUnit (PhysicalResourceArray< ExecUnitIF > &execUnits) |
void | SetIndex (int index) |
virtual void | Transition () |
virtual void | Update () |
void | WriteBackBegin (OpIterator op) |
void | WriteBackEnd (OpIterator op) |
virtual | ~Scheduler () |
Public 変数 | |
m_index | |
Static Public 変数 | |
static const int | MAX_SCHEDULING_OPS = 4096 |
static HookPoint< Scheduler > | s_dispatchedHook |
static HookPoint< Scheduler > | s_issueHook |
static HookPoint< Scheduler > | s_readySigHook |
static HookPoint< Scheduler, RescheduleHookParam > | s_rescheduleHook |
static HookPoint< Scheduler > | s_selectHook |
static HookPoint< Scheduler > | s_wakeUpHook |
構成 | |
struct | Cluster |
struct | Evaluated |
struct | RescheduleHookParam |
Scheduler.h の 61 行で定義されています。
typedef fixed_sized_buffer< OpIterator, MAX_SCHEDULING_OPS, Scheduler > Onikiri::Scheduler::SchedulingOps |
Scheduler.h の 67 行で定義されています。
Scheduler::Scheduler | ( | ) |
Scheduler.cpp の 79 行で定義されています。
00079 : 00080 m_index(0), 00081 m_issueWidth(0), 00082 m_issueLatency(0), 00083 m_communicationLatency(0), 00084 m_windowCapacity(0), 00085 m_loadPipelineModel( LPM_INVALID ), 00086 m_removePolicyParam( RP_FOLLOW_CORE ), 00087 m_removePolicy( RP_FOLLOW_CORE ), 00088 m_selector( NULL ) 00089 { 00090 }
Scheduler::~Scheduler | ( | ) | [virtual] |
Scheduler.cpp の 92 行で定義されています。
参照先 Onikiri::PhysicalResourceNode::ReleaseParam().
00093 { 00094 ReleaseParam(); 00095 }
関数の呼び出しグラフ:
void Scheduler::Begin | ( | ) | [virtual] |
Onikiri::ClockedResourceBaseを再定義しています。
Scheduler.cpp の 212 行で定義されています。
参照先 ASSERT・Onikiri::ClockedResourceBase::Begin()・Onikiri::PipelineNodeBase::m_latch・Onikiri::PipelineLatch::size().
00213 { 00214 ASSERT( m_latch.size() == 0, "The latch is received ops from dispatcher." ); 00215 00216 // WakeupEvent::Evaluate() is triggered before Scheduler::Evaluate(), 00217 // thus clearing evaluated context is done before an evaluation phase. 00218 ClearEvaluated(); 00219 00220 // Call Begin() handlers of execution units. 00221 typedef std::vector<ExecUnitIF*>::iterator iterator; 00222 for( iterator i = m_execUnit.begin(); i != m_execUnit.end(); ++i ){ 00223 (*i)->Begin(); 00224 } 00225 00226 BaseType::Begin(); 00227 }
関数の呼び出しグラフ:
Onikiri::Scheduler::BEGIN_PARAM_MAP | ( | GetParamPath() | ) |
bool Scheduler::CanAllocate | ( | int | ops | ) | [virtual] |
void Scheduler::Cancel | ( | OpIterator | op | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Scheduler.cpp の 325 行で定義されています。
参照元 Reschedule().
00326 { 00327 int dstDepNum = op->GetDstDepNum(); 00328 for( int i = 0; i < dstDepNum; ++i ){ 00329 Dependency* dep = op->GetDstDep( i ); 00330 for( DependencySet::iterator d = m_evaluated.deps.begin(); d != m_evaluated.deps.end(); ){ 00331 if( *d == dep ){ 00332 d = m_evaluated.deps.erase( d ); 00333 } 00334 else{ 00335 ++d; 00336 } 00337 } 00338 } 00339 for( SchedulingOps::iterator i = m_evaluated.selected.begin(); i != m_evaluated.selected.end(); ){ 00340 if( *i == op ){ 00341 i = m_evaluated.selected.erase( i ); 00342 } 00343 else{ 00344 ++i; 00345 } 00346 } 00347 for( SchedulingOps::iterator i = m_evaluated.wokeUp.begin(); i != m_evaluated.wokeUp.end(); ){ 00348 if( *i == op ){ 00349 i = m_evaluated.wokeUp.erase( i ); 00350 } 00351 else{ 00352 ++i; 00353 } 00354 } 00355 }
Here is the caller graph for this function:
bool Scheduler::CanSelect | ( | OpIterator | op | ) |
Scheduler.cpp の 787 行で定義されています。
参照先 ASSERT・Onikiri::ClockedResourceBase::GetCurrentPhase()・Onikiri::ClockedResourceBase::PHASE_EVALUATE.
参照元 Onikiri::InorderIssueSelector::EvaluateSelect()・Onikiri::AgeIssueSelector::EvaluateSelect().
00788 { 00789 ASSERT( GetCurrentPhase() == PHASE_EVALUATE ); 00790 // Check whether execution units can be reserved or not after the latency of issue. 00791 // +1 is for the first execution stage. 00792 return op->GetExecUnit()->CanReserve( op, m_issueLatency + 1 ); 00793 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Scheduler::Commit | ( | OpIterator | op | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Scheduler.cpp の 259 行で定義されています。
参照先 ASSERT・Onikiri::OpBuffer::count()・Onikiri::LPM_SINGLE_ISSUE・Onikiri::OpStatus::OS_ISSUING.
00260 { 00261 if( !op->IsDispatched() ){ 00262 return; 00263 } 00264 00265 #ifdef ONIKIRI_DEBUG 00266 ASSERT( 00267 op->GetScheduler() == this, 00268 "The op does not belong to this scheduler" 00269 ); 00270 00271 if( m_loadPipelineModel == LPM_SINGLE_ISSUE ){ 00272 ASSERT( 00273 m_issuedOp.count(op) > 0, 00274 "Attempted to commit a not issued op. %s", op->ToString(5).c_str() 00275 ); 00276 } 00277 else{ 00278 ASSERT( 00279 op->GetStatus() > OpStatus::OS_ISSUING, 00280 "Attempted to commit a not issued op. %s", op->ToString(5).c_str() 00281 ); 00282 } 00283 #endif 00284 }
関数の呼び出しグラフ:
void Scheduler::Evaluate | ( | ) | [virtual] |
Onikiri::ClockedResourceBaseを再定義しています。
Scheduler.cpp の 229 行で定義されています。
参照先 Onikiri::ClockedResourceBase::Evaluate().
00230 { 00231 EvaluateWakeUp(); // Wake up 00232 EvaluateSelect(); // Select 00233 BaseType::Evaluate(); 00234 }
関数の呼び出しグラフ:
void Scheduler::EvaluateDependency | ( | OpIterator | op | ) |
Scheduler.cpp の 376 行で定義されています。
参照先 ASSERT・Onikiri::Dumper::DumpOpDependency()・Onikiri::g_dumper・Onikiri::ClockedResourceBase::GetCurrentPhase()・Onikiri::ClockedResourceBase::PHASE_EVALUATE.
参照元 Onikiri::OpWakeUpEvent::Evaluate().
00377 { 00378 ASSERT( GetCurrentPhase() == PHASE_EVALUATE ); 00379 00380 int dstDepNum = producer->GetDstDepNum(); 00381 00382 for( int i = 0; i < dstDepNum; ++i ){ 00383 Dependency* dep = producer->GetDstDep( i ); 00384 const Dependency::ConsumerListType& consumers = dep->GetConsumers(); 00385 typedef Dependency::ConsumerListType::const_iterator ConsumerListIterator; 00386 for( ConsumerListIterator c = consumers.begin(); c != consumers.end(); ++c ){ 00387 g_dumper.DumpOpDependency( producer, *c ); 00388 } 00389 m_evaluated.deps.push_back( dep ); 00390 } 00391 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Scheduler::ExitUpperPipeline | ( | OpIterator | op | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Scheduler.cpp の 358 行で定義されています。
参照先 Onikiri::HookEntry()・s_dispatchedHook.
00359 { 00360 HookEntry( 00361 this, 00362 &Scheduler::DispatchEnd, 00363 &s_dispatchedHook, 00364 op 00365 ); 00366 00367 // Do not call the PipelineNodeBase::ExitUpperPipeline becasue 00368 // the op is pushed to a latch in the ExitUpperPipeline. 00369 // 00370 // Dispatchers dispatch ops to schedulers not depending on the 00371 // stall of the schedulers, but the free space of those. 00372 // When a scheduler is stalled, its latch cannot receive ops 00373 // and assertion fails. Thus a scheduler receives ops to m_dispatchedOp. 00374 }
関数の呼び出しグラフ:
void Scheduler::Finished | ( | OpIterator | op | ) |
Scheduler.cpp の 475 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・Onikiri::Op::EVENT_MASK_WAKEUP_RELATED・Onikiri::PipelineNodeBase::GetLowerPipeline()・RegisterWakeUpEvent().
参照元 Onikiri::OpFinishEvent::Update().
00476 { 00477 // Cancel all wake up related events and wake up consumers immediately. 00478 op->CancelEvent( Op::EVENT_MASK_WAKEUP_RELATED ); 00479 00480 #if 0 00481 RegisterWakeUpEvent( op, 1 ); 00482 #else 00483 00484 bool needWakeup = false; 00485 00486 int dstDepNum = op->GetDstDepNum(); 00487 for( int i = 0; i < dstDepNum; ++i ){ 00488 if( !op->GetDstDep(i)->IsFullyReady() ){ 00489 needWakeup = true; 00490 break; 00491 } 00492 } 00493 00494 if( needWakeup ){ 00495 RegisterWakeUpEvent( op, 1 ); 00496 } 00497 00498 #endif 00499 00500 // Register a register write back event. 00501 op->AddEvent( 00502 OpWriteBackEvent::Construct( op, this, true /*wbBegin*/ ), 00503 GetLowerPipeline(), 00504 1 // latency 00505 ); 00506 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Scheduler::Flush | ( | OpIterator | op | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Scheduler.cpp の 286 行で定義されています。
参照先 Onikiri::PipelineNodeBase::Flush().
00287 { 00288 BaseType::Flush( op ); 00289 Delete( op ); 00290 }
関数の呼び出しグラフ:
ExecUnitIF * Scheduler::GetExecUnit | ( | int | code | ) |
Scheduler.cpp の 201 行で定義されています。
参照先 ASSERT.
参照元 Onikiri::Op::GetExecUnit().
00202 { 00203 ASSERT(code >= 0 && code < static_cast<int>(m_execUnitCodeMap.size()), 00204 "unknown code %d.", code); 00205 00206 ASSERT(m_execUnitCodeMap[code] != 0, "no unit (code = %d).", code); 00207 00208 return m_execUnitCodeMap[code]; 00209 }
Here is the caller graph for this function:
const std::vector<ExecUnitIF*>& Onikiri::Scheduler::GetExecUnitList | ( | ) | const [inline] |
Scheduler.h の 158 行で定義されています。
参照元 Onikiri::OpCodeDispatchSteerer::Initialize().
Here is the caller graph for this function:
int Onikiri::Scheduler::GetIndex | ( | ) | const [inline] |
Scheduler.h の 155 行で定義されています。
参照元 Onikiri::OpWakeUpEvent::Evaluate()・Onikiri::Dispatcher::GetSchedulerInfo()・Onikiri::Op::IsSrcReady()・Reschedule()・Onikiri::OpDetectLatPredMissEvent::Update().
00155 { return m_index; }
Here is the caller graph for this function:
const OpBuffer& Onikiri::Scheduler::GetIssuedOps | ( | ) | const [inline] |
int Onikiri::Scheduler::GetIssueLatency | ( | ) | const [inline] |
int Onikiri::Scheduler::GetIssueWidth | ( | ) | const [inline] |
Scheduler.h の 160 行で定義されています。
参照元 Onikiri::InorderIssueSelector::EvaluateSelect()・Onikiri::AgeIssueSelector::EvaluateSelect().
Here is the caller graph for this function:
const OpList& Onikiri::Scheduler::GetNotReadyOps | ( | ) | const [inline] |
Scheduler.h の 163 行で定義されています。
参照元 Onikiri::InorderIssueSelector::EvaluateSelect().
Here is the caller graph for this function:
const OpList& Onikiri::Scheduler::GetReadyOps | ( | ) | const [inline] |
Scheduler.h の 162 行で定義されています。
参照元 Onikiri::InorderIssueSelector::EvaluateSelect()・Onikiri::AgeIssueSelector::EvaluateSelect().
Here is the caller graph for this function:
const SchedulingOps& Onikiri::Scheduler::GetWokeUpOps | ( | ) | const [inline] |
Scheduler.h の 165 行で定義されています。
参照元 Onikiri::InorderIssueSelector::EvaluateSelect()・Onikiri::AgeIssueSelector::EvaluateSelect().
Here is the caller graph for this function:
void Scheduler::Initialize | ( | InitPhase | phase | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Scheduler.cpp の 97 行で定義されています。
参照先 Onikiri::ClockedResourceBase::AddChild()・ASSERT・Onikiri::PhysicalResourceNode::CheckNodeInitialized()・code・Onikiri::Pipeline::EnableDumpStall()・Onikiri::PipelineNodeBase::GetCore()・GetIssueLatency()・Onikiri::Core::GetLoadPipelineModel()・Onikiri::PipelineNodeBase::GetLowerPipeline()・Onikiri::Core::GetNumScheduler()・Onikiri::Core::GetOpArray()・Onikiri::Core::GetScheduler()・Onikiri::Core::GetSchedulerRemovePolicy()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::PipelineNodeBase::Initialize()・Onikiri::ParamExchange::LoadParam()・Onikiri::OpBuffer::resize()・Onikiri::OpList::resize()・Onikiri::RP_FOLLOW_CORE・Onikiri::RP_REMOVE・Onikiri::RP_REMOVE_AFTER_FINISH・THROW_RUNTIME_ERROR.
00098 { 00099 // NX 00100 BaseType::Initialize(phase); 00101 00102 if(phase == INIT_PRE_CONNECTION){ 00103 LoadParam(); 00104 } 00105 else if(phase == INIT_POST_CONNECTION){ 00106 00107 CheckNodeInitialized( "selector", m_selector ); 00108 00109 // OpList 00110 OpArray* opArray = GetCore()->GetOpArray(); 00111 m_notReadyOp.resize( *opArray ); 00112 m_readyOp.resize( *opArray ); 00113 m_issuedOp.resize( *opArray ); 00114 00115 AddChild( &m_issuedOp ); 00116 00117 // Dumping stall is done on buffers. 00118 GetLowerPipeline()->EnableDumpStall( false ); 00119 //m_latch.EnableDumpStall( false ); 00120 00121 // Initialize code map 00122 for( size_t i = 0; i < m_execUnit.size(); i++){ 00123 int codeCount = m_execUnit[i]->GetMappedCodeCount(); 00124 00125 for(int j = 0; j < codeCount; j++){ 00126 int code = m_execUnit[i]->GetMappedCode( j ); 00127 00128 // code CfbNXg 00129 if((int)m_execUnitCodeMap.size() <= code) 00130 m_execUnitCodeMap.resize(code + 1); 00131 00132 ASSERT( m_execUnitCodeMap[code] == 0, "execUnit set twice(code:%d).", code); 00133 m_execUnitCodeMap[code] = m_execUnit[i]; 00134 } 00135 } 00136 00137 // Initialize scheduler cluster 00138 int numScheduler = GetCore()->GetNumScheduler(); 00139 m_clusters.resize( numScheduler ); 00140 for( int i = 0; i < numScheduler; i++ ){ 00141 Cluster* cluster = &m_clusters[i]; 00142 cluster->communicationLatency = m_communicationLatency[i]; 00143 cluster->scheduler = GetCore()->GetScheduler(i); 00144 cluster->issueLatency = cluster->scheduler->GetIssueLatency(); 00145 } 00146 00147 m_loadPipelineModel = GetCore()->GetLoadPipelineModel(); 00148 00149 if( m_removePolicyParam == RP_FOLLOW_CORE ){ 00150 m_removePolicy = GetCore()->GetSchedulerRemovePolicy(); 00151 } 00152 else{ 00153 m_removePolicy = m_removePolicyParam; 00154 } 00155 00156 // Push all data prediction policies. 00157 typedef vector< const DataPredMissRecovery * > Preds; 00158 Preds preds; 00159 preds.push_back( &GetCore()->GetAddrPredMissRecovery() ); 00160 preds.push_back( &GetCore()->GetLatPredMissRecovery() ); 00161 preds.push_back( &GetCore()->GetValuePredMissRecovery() ); 00162 preds.push_back( &GetCore()->GetPartialLoadRecovery() ); 00163 00164 // Check data prediction policies. 00165 if( m_removePolicy == RP_REMOVE ) { 00166 for( Preds::iterator i = preds.begin(); i != preds.end(); ++i ){ 00167 if( !(*i)->IsRefetch() ){ 00168 THROW_RUNTIME_ERROR( "'Remove' scheduler only supports 'Refetch'." ); 00169 } 00170 } 00171 } 00172 if( m_removePolicy == RP_REMOVE_AFTER_FINISH ) { 00173 for( Preds::iterator i = preds.begin(); i != preds.end(); ++i ){ 00174 if( !( (*i)->IsRefetch() || (*i)->IsReissueNotFinished() || (*i)->IsReissueSelective() ) ){ 00175 THROW_RUNTIME_ERROR( 00176 "'RemoveAfterFinish' scheduler only supports" 00177 "'Refetch' or 'ReissueNotFinished' or 'ReissueSelective'." 00178 ); 00179 } 00180 } 00181 } 00182 00183 // communication latency `FbN 00184 if( static_cast<int>(m_communicationLatency.size()) != GetCore()->GetNumScheduler() ) { 00185 THROW_RUNTIME_ERROR("communication latency count != scheduler count"); 00186 } 00187 } 00188 00189 }
関数の呼び出しグラフ:
bool Scheduler::IsInScheduler | ( | OpIterator | op | ) |
Scheduler.cpp の 822 行で定義されています。
参照先 Onikiri::OpBuffer::count()・Onikiri::OpList::count()・Onikiri::OpStatus::OS_EXECUTING・Onikiri::RP_REMOVE_AFTER_FINISH・Onikiri::RP_RETAIN.
00823 { 00824 bool isInSched = (m_notReadyOp.count(op) || m_readyOp.count(op)); 00825 if( m_removePolicy == RP_RETAIN ) { 00826 isInSched = (isInSched || m_issuedOp.count(op)); 00827 } 00828 else if( m_removePolicy == RP_REMOVE_AFTER_FINISH ){ 00829 if( op->GetStatus() <= OpStatus::OS_EXECUTING ){ 00830 isInSched = (isInSched || m_issuedOp.count(op)); 00831 } 00832 } 00833 return isInSched; 00834 }
関数の呼び出しグラフ:
void Scheduler::Issue | ( | OpIterator | op | ) |
Scheduler.cpp の 462 行で定義されています。
参照先 Onikiri::HookEntry()・s_issueHook.
00463 { 00464 HookEntry( 00465 this, 00466 &Scheduler::IssueBody, 00467 &s_issueHook, 00468 op 00469 ); 00470 }
関数の呼び出しグラフ:
Onikiri::Scheduler::PARAM_ENTRY | ( | "@WindowCapacity" | , | |
m_windowCapacity | ||||
) |
Onikiri::Scheduler::PARAM_ENTRY | ( | "@CommunicationLatency" | , | |
m_communicationLatency | ||||
) |
Onikiri::Scheduler::PARAM_ENTRY | ( | "@WritebackLatency" | , | |
m_writeBackLatency | ||||
) |
Onikiri::Scheduler::PARAM_ENTRY | ( | "@IssueLatency" | , | |
m_issueLatency | ||||
) |
Onikiri::Scheduler::PARAM_ENTRY | ( | "@IssueWidth" | , | |
m_issueWidth | ||||
) |
void Scheduler::RegisterWakeUpEvent | ( | OpIterator | op, | |
int | latencyFromOp | |||
) |
Scheduler.cpp の 396 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・Onikiri::Op::EVENT_MASK_WAKEUP_RELATED・Onikiri::PipelineNodeBase::GetLowerPipeline().
参照元 Finished().
00397 { 00398 int numScheduler = (int)m_clusters.size(); 00399 for(int i = 0; i < numScheduler; ++i) { 00400 Cluster* cluster = &m_clusters[i]; 00401 00402 // communication latency -1 wakeup 00403 int comLatency = cluster->communicationLatency; 00404 if (comLatency == -1) 00405 continue; 00406 00407 Scheduler* targetScheduler = cluster->scheduler; 00408 Pipeline* targetPipeline = targetScheduler->GetLowerPipeline(); 00409 int targetIssueLatency = cluster->issueLatency; 00410 00411 // back to back タsAScheduler issue latency l 00412 // Awakeup communication latency 00413 int wakeupLatency = latencyFromOp + m_issueLatency - targetIssueLatency; 00414 if( wakeupLatency < comLatency ){ 00415 wakeupLatency = comLatency; 00416 } 00417 00418 op->AddEvent( 00419 OpWakeUpEvent::Construct( 00420 targetScheduler, 00421 op 00422 ), 00423 targetPipeline, 00424 wakeupLatency, 00425 Op::EVENT_MASK_WAKEUP_RELATED 00426 ); 00427 } 00428 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
bool Scheduler::Reschedule | ( | OpIterator | op | ) |
Scheduler.cpp の 533 行で定義されています。
参照先 ASSERT・Cancel()・Onikiri::Scheduler::RescheduleHookParam::canceled・Onikiri::OpList::count()・Onikiri::DS_RESCHEDULE・Onikiri::Dumper::Dump()・Onikiri::OpList::erase()・Onikiri::OpBuffer::find_and_erase()・Onikiri::g_dumper・GetIndex()・HOOK_SECTION_OP_PARAM・Onikiri::LPM_SINGLE_ISSUE・Onikiri::OpStatus::OS_DISPATCHED・Onikiri::OpList::push_back()・Onikiri::OpList::push_inorder()・s_rescheduleHook.
00534 { 00535 if( !op->IsDispatched() ){ 00536 return false; 00537 } 00538 00539 00540 RescheduleHookParam param; 00541 param.canceled = false; 00542 00543 ASSERT( 00544 op->GetScheduler() == this, 00545 "rescheduled an unknown op." 00546 ); 00547 00548 HOOK_SECTION_OP_PARAM( s_rescheduleHook, op, param ) 00549 { 00550 // XPW[O|V[ 00551 00552 bool clearIssueState = m_loadPipelineModel == LPM_SINGLE_ISSUE; 00553 op->RescheduleSelf( clearIssueState ); 00554 00555 // Cancel 00556 Cancel( op ); 00557 00558 param.canceled = false; 00559 if( m_issuedOp.find_and_erase(op) ) { 00560 // sXPW[O 00561 00562 if(op->IsSrcReady(GetIndex())) { 00563 m_readyOp.push_inorder(op); 00564 } 00565 else { 00566 m_notReadyOp.push_back(op); 00567 } 00568 param.canceled = true; 00569 } 00570 else if (m_readyOp.count(op)) { 00571 // sOreadyXPW[O 00572 if( !op->IsSrcReady(GetIndex()) ) { 00573 m_readyOp.erase(op); 00574 m_notReadyOp.push_back(op); 00575 } 00576 } 00577 else { 00578 // not ready XPW[O 00579 } 00580 00581 op->SetStatus(OpStatus::OS_DISPATCHED); 00582 g_dumper.Dump(DS_RESCHEDULE, op); 00583 } 00584 return param.canceled; 00585 }
関数の呼び出しグラフ:
void Scheduler::ReserveSelect | ( | OpIterator | op | ) |
Scheduler.cpp の 797 行で定義されています。
参照先 ASSERT・Onikiri::ClockedResourceBase::GetCurrentPhase()・Onikiri::ClockedResourceBase::PHASE_EVALUATE.
参照元 Onikiri::InorderIssueSelector::EvaluateSelect()・Onikiri::AgeIssueSelector::EvaluateSelect().
00798 { 00799 ASSERT( GetCurrentPhase() == PHASE_EVALUATE ); 00800 op->GetExecUnit()->Reserve( op, m_issueLatency + 1 ); // +1 is for the first execution stage. 00801 m_evaluated.selected.push_back( op ); 00802 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Scheduler::Retire | ( | OpIterator | op | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Scheduler.cpp の 292 行で定義されています。
参照先 Onikiri::PipelineNodeBase::Retire().
00293 { 00294 BaseType::Retire( op ); 00295 Delete( op ); 00296 }
関数の呼び出しグラフ:
void Scheduler::SetExecUnit | ( | PhysicalResourceArray< ExecUnitIF > & | execUnits | ) |
Scheduler.cpp の 191 行で定義されています。
参照先 THROW_RUNTIME_ERROR.
00192 { 00193 // o^ 00194 if( find(m_execUnit.begin(), m_execUnit.end(), execUnit[0]) != m_execUnit.end() ){ 00195 THROW_RUNTIME_ERROR("Same exec unit is set twice"); 00196 } 00197 m_execUnit.push_back( execUnit[0] ); 00198 }
void Onikiri::Scheduler::SetIndex | ( | int | index | ) | [inline] |
void Scheduler::Transition | ( | ) | [virtual] |
Onikiri::ClockedResourceBaseを再定義しています。
Scheduler.cpp の 236 行で定義されています。
参照先 Onikiri::ClockedResourceBase::IsStalledThisCycle()・Onikiri::ClockedResourceBase::Transition().
00237 { 00238 BaseType::Transition(); 00239 00240 // On a stalled cycle, evaluated results must be cleared, because 00241 // the evaluated results may incorrectly set dispatched ops ready. 00242 if( IsStalledThisCycle() ){ 00243 ClearEvaluated(); 00244 } 00245 }
関数の呼び出しグラフ:
void Scheduler::Update | ( | ) | [virtual] |
Onikiri::ClockedResourceBaseを再定義しています。
Scheduler.cpp の 246 行で定義されています。
00247 { 00248 UpdateWakeUp(); // Wake up 00249 UpdateSelect(); // Select 00250 00251 // Call Update() handlers of execution units. 00252 typedef std::vector<ExecUnitIF*>::iterator iterator; 00253 for( iterator i = m_execUnit.begin(); i != m_execUnit.end(); ++i ){ 00254 (*i)->Update(); 00255 } 00256 }
void Scheduler::WriteBackBegin | ( | OpIterator | op | ) |
Scheduler.cpp の 509 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・Onikiri::DS_WRITEBACK・Onikiri::Dumper::Dump()・Onikiri::g_dumper・Onikiri::PipelineNodeBase::GetLowerPipeline()・Onikiri::OpStatus::OS_WRITING_BACK.
参照元 Onikiri::OpWriteBackEvent::Update().
00510 { 00511 op->SetStatus( OpStatus::OS_WRITING_BACK ); 00512 g_dumper.Dump( DS_WRITEBACK, op ); 00513 00514 op->AddEvent( 00515 OpWriteBackEvent::Construct( op, this, false /*wbBegin*/ ), 00516 GetLowerPipeline(), 00517 m_writeBackLatency - 1 // latency 00518 // -1 corresponds this cycle. 00519 ); 00520 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Scheduler::WriteBackEnd | ( | OpIterator | op | ) |
Scheduler.cpp の 522 行で定義されています。
参照先 Onikiri::PooledIntrusivePtrObject< T, PtrT >::Construct()・Onikiri::g_dumper・Onikiri::PipelineNodeBase::GetLowerPipeline()・Onikiri::Dumper::IsEnabled()・Onikiri::OpStatus::OS_WRITTEN_BACK.
参照元 Onikiri::OpWriteBackEvent::Update().
00523 { 00524 op->SetStatus( OpStatus::OS_WRITTEN_BACK ); 00525 if( g_dumper.IsEnabled() ){ 00526 op->AddEvent( OpDumpCommittableEvent::Construct( op ), GetLowerPipeline(), 1 ); 00527 } 00528 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
const int Onikiri::Scheduler::MAX_SCHEDULING_OPS = 4096 [static] |
Scheduler.h の 66 行で定義されています。
HookPoint< Scheduler > Onikiri::Scheduler::s_dispatchedHook [static] |
HookPoint< Scheduler > Onikiri::Scheduler::s_issueHook [static] |
HookPoint< Scheduler > Onikiri::Scheduler::s_readySigHook [static] |
Scheduler.h の 175 行で定義されています。
HookPoint< Scheduler > Onikiri::Scheduler::s_selectHook [static] |
Scheduler.h の 177 行で定義されています。
HookPoint< Scheduler > Onikiri::Scheduler::s_wakeUpHook [static] |
Scheduler.h の 176 行で定義されています。