gem5 v24.0.0.0
|
#include <scheduler.hh>
Classes | |
class | TimeSlot |
Public Types | |
enum | Status { StatusOther = 0 , StatusEvaluate , StatusUpdate , StatusDelta , StatusTiming , StatusPaused , StatusStopped } |
typedef std::list< ScEvent * > | ScEvents |
typedef std::list< TimeSlot * > | TimeSlots |
Private Types | |
typedef const gem5::EventBase::Priority | Priority |
Private Member Functions | |
void | schedule (gem5::Event *event, gem5::Tick tick) |
void | schedule (gem5::Event *event) |
void | deschedule (gem5::Event *event) |
Process * | getNextReady () |
void | runReady () |
void | scheduleReadyEvent () |
void | pause () |
void | stop () |
bool | starved () |
void | scheduleStarvationEvent () |
void | maxTickFunc () |
void | timeAdvances () |
void | scheduleTimeAdvancesEvent () |
void | trace (bool delta) |
Static Private Attributes | |
static Priority | DefaultPriority = gem5::EventBase::Default_Pri |
static Priority | StopPriority = DefaultPriority - 1 |
static Priority | PausePriority = DefaultPriority + 1 |
static Priority | MaxTickPriority = DefaultPriority + 2 |
static Priority | ReadyPriority = DefaultPriority + 3 |
static Priority | StarvationPriority = ReadyPriority |
static Priority | TimeAdvancesPriority = gem5::EventBase::Maximum_Pri |
Definition at line 147 of file scheduler.hh.
|
private |
Definition at line 423 of file scheduler.hh.
typedef std::list<ScEvent *> sc_gem5::Scheduler::ScEvents |
Definition at line 150 of file scheduler.hh.
typedef std::list<TimeSlot *> sc_gem5::Scheduler::TimeSlots |
Definition at line 175 of file scheduler.hh.
Enumerator | |
---|---|
StatusOther | |
StatusEvaluate | |
StatusUpdate | |
StatusDelta | |
StatusTiming | |
StatusPaused | |
StatusStopped |
Definition at line 367 of file scheduler.hh.
sc_gem5::Scheduler::Scheduler | ( | ) |
Definition at line 46 of file scheduler.cc.
sc_gem5::Scheduler::~Scheduler | ( | ) |
Definition at line 59 of file scheduler.cc.
References clear().
|
inline |
void sc_gem5::Scheduler::asyncRequestUpdate | ( | Channel * | c | ) |
Definition at line 258 of file scheduler.cc.
References asyncListMutex, asyncUpdateList, c, hasAsyncUpdate, and sc_gem5::NodeList< T >::pushLast().
Referenced by sc_gem5::Channel::asyncRequestUpdate().
|
inline |
Definition at line 388 of file scheduler.hh.
References _changeStamp.
Referenced by sc_gem5::getChangeStamp(), sc_gem5::Event::notify(), and sc_gem5::Event::triggered().
void sc_gem5::Scheduler::clear | ( | ) |
Definition at line 67 of file scheduler.cc.
References c, deltas, deschedule(), sc_gem5::NodeList< T >::getNext(), initList, maxTickEvent, pauseEvent, readyEvent, readyListMethods, readyListThreads, gem5::Event::scheduled(), starvationEvent, stopEvent, timeAdvancesEvent, timeSlots, and updateList.
Referenced by sc_gem5::ScMainFiber::main(), scheduleStop(), stop(), sc_gem5::Kernel::t0Handler(), and ~Scheduler().
|
inline |
Definition at line 313 of file scheduler.hh.
References runToTime, scheduleStarvationEvent(), scheduleTimeAdvancesEvent(), starved(), and timeSlots.
Referenced by sc_gem5::Scheduler::TimeSlot::process().
|
inline |
Definition at line 185 of file scheduler.hh.
References _current.
Referenced by sc_gem5::WriteChecker< sc_core::SC_MANY_WRITERS >::checkWriter(), sc_gem5::WriteChecker< sc_core::SC_ONE_WRITER >::checkWriter(), sc_core::sc_report_handler::clear_cached_report(), sc_core::sc_report_handler::default_handler(), sc_core::sc_report_handler::get_cached_report(), sc_core::sc_simcontext::get_curr_proc_info(), sc_gem5::getCurrentProcess(), sc_core::next_trigger(), sc_core::next_trigger(), sc_core::next_trigger(), sc_core::next_trigger(), sc_core::next_trigger(), sc_core::next_trigger(), sc_core::next_trigger(), sc_core::next_trigger(), sc_gem5::Sensitivity::notify(), sc_gem5::pickParentObj(), sc_core::sc_report_handler::report(), sc_core::sc_gen_unique_name(), sc_core::sc_report_compose_message(), sc_core::sc_set_location(), sc_gem5::Process::suspend(), sc_core::timed_out(), sc_core::sc_mutex::trylock(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), and sc_core::sc_signal_resolved::write().
|
inline |
Definition at line 246 of file scheduler.hh.
References getCurTick().
Referenced by sc_gem5::Event::notify(), and schedule().
|
inlineprivate |
Definition at line 448 of file scheduler.hh.
References gem5::EventQueue::deschedule(), eq, eventsToSchedule, and initDone.
|
inline |
Definition at line 280 of file scheduler.hh.
References deltas, deschedule(), panic_if, and timeSlots.
Referenced by sc_gem5::Event::cancel(), sc_gem5::Process::cancelTimeout(), clear(), deschedule(), sc_gem5::Event::notify(), sc_gem5::Event::notify(), scheduleReadyEvent(), scheduleStarvationEvent(), start(), sc_gem5::ClockTick::~ClockTick(), sc_gem5::Event::~Event(), sc_core::sc_clock::~sc_clock(), and sc_gem5::ScEvent::~ScEvent().
|
inline |
Definition at line 378 of file scheduler.hh.
References _elaborationDone.
Referenced by sc_gem5::Kernel::init().
|
inline |
Definition at line 379 of file scheduler.hh.
References _elaborationDone, and b.
|
inline |
Definition at line 243 of file scheduler.hh.
References eq, and gem5::EventQueue::getCurTick().
Referenced by delayed(), sc_gem5::VcdTraceFile::initialize(), maxTickFunc(), runReady(), sc_core::sc_start(), sc_core::sc_start(), schedule(), schedule(), start(), timeToPending(), sc_gem5::VcdTraceFile::trace(), and sc_gem5::VcdTraceFile::~VcdTraceFile().
|
inlineprivate |
Definition at line 461 of file scheduler.hh.
References sc_gem5::NodeList< T >::getNext(), readyListMethods, and readyListThreads.
Referenced by runReady(), and yield().
|
inline |
Definition at line 385 of file scheduler.hh.
References status(), and StatusDelta.
|
inline |
Definition at line 383 of file scheduler.hh.
References status(), and StatusEvaluate.
Referenced by ready(), requestUpdate(), runNext(), and schedule().
void sc_gem5::Scheduler::initPhase | ( | ) |
Definition at line 109 of file scheduler.cc.
References _started, eq, eventsToSchedule, sc_gem5::NodeList< T >::getNext(), initDone, initList, sc_gem5::kernel, runDelta(), runToTime, runUpdate(), sc_core::SC_ID_DISABLE_WILL_ORPHAN_PROCESS_, SC_REPORT_WARNING, sc_core::SC_RUNNING, gem5::EventQueue::schedule(), scheduleStarvationEvent(), scheduleTimeAdvancesEvent(), starved(), sc_gem5::Kernel::status(), status(), and StatusOther.
Referenced by sc_gem5::Kernel::t0Handler().
|
inline |
Definition at line 386 of file scheduler.hh.
References status(), and StatusTiming.
|
inline |
Definition at line 384 of file scheduler.hh.
References status(), and StatusUpdate.
Referenced by sc_gem5::Event::notify(), and schedule().
|
inlineprivate |
Definition at line 499 of file scheduler.hh.
References _changeStamp, getCurTick(), lastReadyTick, and pause().
|
inline |
Definition at line 182 of file scheduler.hh.
|
inline |
Definition at line 184 of file scheduler.hh.
References _numCycles.
Referenced by sc_core::sc_delta_count().
void sc_gem5::Scheduler::oneCycle | ( | ) |
Definition at line 442 of file scheduler.cc.
References gem5::MaxTick, runOnce, scheduleReadyEvent(), and start().
Referenced by sc_core::sc_start().
|
private |
Definition at line 363 of file scheduler.cc.
References sc_gem5::ScMainFiber::called(), gem5::exitSimLoopNow(), fatal, gem5::Fiber::finished(), sc_gem5::kernel, gem5::Fiber::run(), runOnce, sc_core::SC_PAUSED, sc_gem5::scMainFiber, sc_gem5::Kernel::status(), status(), and StatusPaused.
Referenced by maxTickFunc().
|
inline |
Definition at line 381 of file scheduler.hh.
References status(), and StatusPaused.
|
inline |
Definition at line 331 of file scheduler.hh.
References deltas, sc_gem5::NodeList< T >::empty(), readyListMethods, readyListThreads, and updateList.
Referenced by timeToPending().
|
inline |
void sc_gem5::Scheduler::ready | ( | Process * | p | ) |
Definition at line 199 of file scheduler.cc.
References _stopNow, inEvaluate(), sc_gem5::NodeList< T >::pushLast(), readyListMethods, readyListThreads, sc_core::SC_METHOD_PROC_, and scheduleReadyEvent().
Referenced by sc_gem5::Process::ready(), and resume().
void sc_gem5::Scheduler::reg | ( | Process * | p | ) |
Definition at line 146 of file scheduler.cc.
References initDone, initList, and sc_gem5::NodeList< T >::pushLast().
Referenced by sc_gem5::ClockTick::createProcess(), sc_gem5::newCThreadProcess(), sc_gem5::newMethodProcess(), sc_gem5::newThreadProcess(), and sc_gem5::spawnWork().
|
inline |
Definition at line 398 of file scheduler.hh.
References traceFiles.
Referenced by sc_gem5::TraceFile::TraceFile().
|
inline |
Definition at line 417 of file scheduler.hh.
References freeTimeSlots.
Referenced by sc_gem5::Scheduler::TimeSlot::releaseImpl().
void sc_gem5::Scheduler::requestUpdate | ( | Channel * | c | ) |
Definition at line 250 of file scheduler.cc.
References c, inEvaluate(), sc_gem5::NodeList< T >::pushLast(), scheduleReadyEvent(), and updateList.
Referenced by sc_gem5::Channel::requestUpdate().
void sc_gem5::Scheduler::resume | ( | Process * | p | ) |
Definition at line 216 of file scheduler.cc.
References initDone, initList, sc_gem5::NodeList< T >::pushLast(), and ready().
Referenced by sc_gem5::Process::resume().
void sc_gem5::Scheduler::runDelta | ( | ) |
Definition at line 350 of file scheduler.cc.
References deltas, status(), StatusDelta, and throwUp().
Referenced by initPhase(), and runReady().
|
inline |
Definition at line 230 of file scheduler.hh.
References inEvaluate(), sc_gem5::NodeList< T >::pushFirst(), readyListMethods, and scheduleReadyEvent().
Referenced by sc_gem5::Process::signalReset().
|
inline |
Definition at line 213 of file scheduler.hh.
References _current, sc_gem5::NodeList< T >::pushFirst(), readyListMethods, and yield().
Referenced by sc_gem5::Process::injectException(), and sc_gem5::Process::reset().
|
private |
Definition at line 287 of file scheduler.cc.
References _changeStamp, _current, _numCycles, _stopNow, sc_gem5::NodeList< T >::empty(), getCurTick(), getNextReady(), lastReadyTick, readyListMethods, readyListThreads, runDelta(), runOnce, runToTime, runUpdate(), schedulePause(), scheduleStarvationEvent(), scheduleTimeAdvancesEvent(), starved(), status(), StatusEvaluate, StatusOther, trace(), traceFiles, and yield().
void sc_gem5::Scheduler::runUpdate | ( | ) |
Definition at line 326 of file scheduler.cc.
References asyncListMutex, asyncUpdateList, sc_gem5::NodeList< T >::getNext(), hasAsyncUpdate, sc_gem5::ListNode::popListNode(), sc_gem5::NodeList< T >::pushLast(), status(), StatusUpdate, throwUp(), sc_gem5::Channel::update(), and updateList.
Referenced by initPhase(), and runReady().
|
inlineprivate |
Definition at line 445 of file scheduler.hh.
References getCurTick(), and schedule().
Referenced by schedule().
|
inlineprivate |
Definition at line 437 of file scheduler.hh.
References eq, eventsToSchedule, initDone, and gem5::EventQueue::schedule().
|
inline |
Definition at line 253 of file scheduler.hh.
References acquireTimeSlot(), delayed(), deltas, getCurTick(), inEvaluate(), inUpdate(), schedule(), scheduleReadyEvent(), and timeSlots.
Referenced by sc_core::sc_clock::before_end_of_elaboration(), sc_gem5::Event::notify(), sc_gem5::Scheduler::TimeSlot::process(), schedule(), schedulePause(), scheduleReadyEvent(), scheduleStarvationEvent(), scheduleStop(), scheduleTimeAdvancesEvent(), sc_gem5::Process::setTimeout(), start(), and sc_gem5::ClockTick::tick().
void sc_gem5::Scheduler::schedulePause | ( | ) |
Definition at line 450 of file scheduler.cc.
References pauseEvent, schedule(), and gem5::Event::scheduled().
Referenced by runReady(), and sc_core::sc_pause().
|
private |
Definition at line 266 of file scheduler.cc.
References deschedule(), readyEvent, schedule(), gem5::Event::scheduled(), and starvationEvent.
Referenced by oneCycle(), ready(), requestUpdate(), runNext(), and schedule().
|
private |
Definition at line 277 of file scheduler.cc.
References deschedule(), readyEvent, schedule(), gem5::Event::scheduled(), and starvationEvent.
Referenced by completeTimeSlot(), initPhase(), runReady(), and start().
void sc_gem5::Scheduler::scheduleStop | ( | bool | finish_delta | ) |
Definition at line 473 of file scheduler.cc.
References _stopNow, clear(), schedule(), gem5::Event::scheduled(), and stopEvent.
Referenced by sc_core::sc_stop(), and sc_gem5::Kernel::t0Handler().
|
inlineprivate |
Definition at line 510 of file scheduler.hh.
References schedule(), gem5::Event::scheduled(), timeAdvancesEvent, and traceFiles.
Referenced by completeTimeSlot(), initPhase(), runReady(), and start().
|
inline |
Definition at line 240 of file scheduler.hh.
References eq.
Referenced by sc_gem5::Kernel::Kernel().
void sc_gem5::Scheduler::start | ( | gem5::Tick | max_tick, |
bool | run_to_time ) |
Definition at line 404 of file scheduler.cc.
References _started, _throwUp, deschedule(), getCurTick(), initDone, sc_gem5::kernel, lastReadyTick, maxTick, maxTickEvent, pauseEvent, gem5::Fiber::primaryFiber(), gem5::Fiber::run(), runToTime, sc_core::SC_RUNNING, schedule(), gem5::Event::scheduled(), scheduleStarvationEvent(), scheduleTimeAdvancesEvent(), starvationEvent, starved(), sc_gem5::Kernel::status(), status(), StatusOther, and stopEvent.
Referenced by oneCycle(), and sc_core::sc_start().
|
inlineprivate |
Definition at line 479 of file scheduler.hh.
References deltas, sc_gem5::NodeList< T >::empty(), initList, maxTick, readyListMethods, readyListThreads, timeSlots, and updateList.
Referenced by completeTimeSlot(), initPhase(), runReady(), and start().
|
inline |
Definition at line 395 of file scheduler.hh.
References _status.
Referenced by inDelta(), inEvaluate(), initPhase(), inTiming(), inUpdate(), pause(), paused(), sc_gem5::Scheduler::TimeSlot::process(), runDelta(), runReady(), runUpdate(), start(), stop(), stopped(), and throwUp().
|
inline |
Definition at line 396 of file scheduler.hh.
References _status.
|
inline |
Definition at line 389 of file scheduler.hh.
References _changeStamp.
Referenced by sc_gem5::Scheduler::TimeSlot::process().
|
private |
Definition at line 382 of file scheduler.cc.
References sc_gem5::ScMainFiber::called(), clear(), gem5::exitSimLoopNow(), fatal, gem5::Fiber::finished(), sc_gem5::kernel, gem5::Fiber::run(), runOnce, sc_gem5::scMainFiber, status(), StatusStopped, and sc_gem5::Kernel::stop().
|
inline |
Definition at line 382 of file scheduler.hh.
References status(), and StatusStopped.
bool sc_gem5::Scheduler::suspend | ( | Process * | p | ) |
Definition at line 235 of file scheduler.cc.
References initDone.
Referenced by sc_gem5::Process::suspend().
void sc_gem5::Scheduler::throwUp | ( | ) |
Definition at line 459 of file scheduler.cc.
References _throwUp, sc_gem5::ScMainFiber::called(), gem5::Fiber::finished(), sc_core::sc_report_handler::get_catch_actions(), sc_gem5::reportHandlerProc, sc_gem5::reportifyException(), gem5::Fiber::run(), sc_gem5::scMainFiber, status(), and StatusOther.
Referenced by sc_gem5::Thread::Context::main(), sc_gem5::Scheduler::TimeSlot::process(), sc_gem5::Kernel::regStats(), runDelta(), runUpdate(), sc_gem5::Kernel::startup(), sc_gem5::Kernel::stopWork(), and yield().
|
inlineprivate |
Definition at line 507 of file scheduler.hh.
References trace().
|
inline |
Definition at line 346 of file scheduler.hh.
References getCurTick(), gem5::MaxTick, pendingCurr(), pendingFuture(), and timeSlots.
|
private |
Definition at line 488 of file scheduler.cc.
References traceFiles.
Referenced by runReady(), and timeAdvances().
|
inline |
Definition at line 399 of file scheduler.hh.
References traceFiles.
Referenced by sc_gem5::TraceFile::~TraceFile().
void sc_gem5::Scheduler::yield | ( | ) |
Definition at line 160 of file scheduler.cc.
References _current, sc_gem5::Process::excWrapper, sc_gem5::Process::fiber(), getNextReady(), sc_gem5::Process::inReset(), sc_gem5::Process::needsStart(), sc_core::sc_event::notify(), sc_gem5::ListNode::popListNode(), gem5::Fiber::primaryFiber(), sc_gem5::Process::reset(), sc_gem5::Process::resetEvent(), gem5::Fiber::run(), sc_gem5::Process::run(), sc_gem5::Process::scheduled(), sc_gem5::ExceptionWrapperBase::throw_it(), and throwUp().
Referenced by sc_gem5::Thread::Context::main(), runNow(), runReady(), sc_gem5::Process::suspend(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), sc_core::wait(), and sc_core::wait().
|
private |
Definition at line 517 of file scheduler.hh.
Referenced by changeStamp(), maxTickFunc(), runReady(), and stepChangeStamp().
|
private |
Definition at line 519 of file scheduler.hh.
Referenced by current(), runNow(), runReady(), and yield().
|
private |
Definition at line 490 of file scheduler.hh.
Referenced by elaborationDone(), and elaborationDone().
|
private |
Definition at line 516 of file scheduler.hh.
Referenced by numCycles(), and runReady().
|
private |
Definition at line 491 of file scheduler.hh.
Referenced by initPhase(), and start().
|
private |
Definition at line 494 of file scheduler.hh.
|
private |
Definition at line 492 of file scheduler.hh.
Referenced by ready(), runReady(), and scheduleStop().
|
private |
Definition at line 476 of file scheduler.hh.
|
private |
Definition at line 533 of file scheduler.hh.
Referenced by asyncRequestUpdate(), and runUpdate().
|
private |
Definition at line 532 of file scheduler.hh.
Referenced by asyncRequestUpdate(), and runUpdate().
|
staticprivate |
Definition at line 424 of file scheduler.hh.
|
private |
Definition at line 456 of file scheduler.hh.
Referenced by clear(), deschedule(), pendingCurr(), runDelta(), schedule(), and starved().
|
private |
Definition at line 433 of file scheduler.hh.
Referenced by deschedule(), getCurTick(), initPhase(), schedule(), and setEventQueue().
|
private |
Definition at line 536 of file scheduler.hh.
Referenced by deschedule(), initPhase(), and schedule().
|
private |
Definition at line 458 of file scheduler.hh.
Referenced by acquireTimeSlot(), and releaseTimeSlot().
|
private |
Definition at line 534 of file scheduler.hh.
Referenced by asyncRequestUpdate(), and runUpdate().
|
private |
Definition at line 521 of file scheduler.hh.
Referenced by deschedule(), initPhase(), reg(), resume(), schedule(), start(), and suspend().
|
private |
Definition at line 525 of file scheduler.hh.
Referenced by clear(), initPhase(), reg(), resume(), and starved().
|
private |
Definition at line 497 of file scheduler.hh.
Referenced by maxTickFunc(), runReady(), and start().
|
private |
Definition at line 496 of file scheduler.hh.
|
private |
Definition at line 505 of file scheduler.hh.
|
staticprivate |
Definition at line 428 of file scheduler.hh.
|
private |
Definition at line 473 of file scheduler.hh.
Referenced by clear(), schedulePause(), and start().
|
staticprivate |
Definition at line 427 of file scheduler.hh.
|
private |
Definition at line 468 of file scheduler.hh.
Referenced by clear(), scheduleReadyEvent(), and scheduleStarvationEvent().
|
private |
Definition at line 527 of file scheduler.hh.
Referenced by clear(), getNextReady(), pendingCurr(), ready(), runNext(), runNow(), runReady(), and starved().
|
private |
Definition at line 528 of file scheduler.hh.
Referenced by clear(), getNextReady(), pendingCurr(), ready(), runReady(), and starved().
|
staticprivate |
Definition at line 429 of file scheduler.hh.
|
private |
Definition at line 523 of file scheduler.hh.
Referenced by oneCycle(), pause(), runReady(), and stop().
|
private |
Definition at line 522 of file scheduler.hh.
Referenced by completeTimeSlot(), initPhase(), runReady(), and start().
|
private |
Definition at line 487 of file scheduler.hh.
Referenced by clear(), scheduleReadyEvent(), scheduleStarvationEvent(), and start().
|
staticprivate |
Definition at line 430 of file scheduler.hh.
|
private |
Definition at line 474 of file scheduler.hh.
Referenced by clear(), scheduleStop(), and start().
|
staticprivate |
Definition at line 426 of file scheduler.hh.
|
private |
Definition at line 508 of file scheduler.hh.
Referenced by clear(), and scheduleTimeAdvancesEvent().
|
staticprivate |
Definition at line 431 of file scheduler.hh.
|
private |
Definition at line 457 of file scheduler.hh.
Referenced by clear(), completeTimeSlot(), deschedule(), pendingFuture(), schedule(), starved(), and timeToPending().
|
private |
Definition at line 538 of file scheduler.hh.
Referenced by registerTraceFile(), runReady(), scheduleTimeAdvancesEvent(), trace(), and unregisterTraceFile().
|
private |
Definition at line 530 of file scheduler.hh.
Referenced by clear(), pendingCurr(), requestUpdate(), runUpdate(), and starved().