28#ifndef __SYSTEMC_CORE_SCHEDULER_HH__
29#define __SYSTEMC_CORE_SCHEDULER_HH__
182 const std::string
name()
const {
return "systemc_scheduler"; }
260 if (delay.value() == 0) {
261 event->schedule(
deltas, tick);
269 while (it !=
timeSlots.end() && (*it)->targeted_when < tick)
271 if (it ==
timeSlots.end() || (*it)->targeted_when != tick) {
275 event->schedule((*it)->events, tick);
282 using namespace gem5;
294 (*tsit)->targeted_when <
event->when())
298 (*tsit)->targeted_when !=
event->when(),
299 "Descheduling event at time with no events.");
302 assert(
on == &events);
306 if (events.empty()) {
411 ts->targeted_when = tick;
540 void trace(
bool delta);
static const FlagsType AutoDelete
Queue of events sorted in time order.
Event(Priority p=Default_Pri, Flags f=0)
Wrap a member function inside MemberEventWrapper to use it as an event callback.
void releaseImpl() override
Scheduler * parent_scheduler
TimeSlot(Scheduler *scheduler)
const gem5::EventBase::Priority Priority
std::set< TraceFile * > traceFiles
static Priority DefaultPriority
ProcessList readyListMethods
void elaborationDone(bool b)
static Priority StarvationPriority
void releaseTimeSlot(TimeSlot *ts)
void start(gem5::Tick max_tick, bool run_to_time)
const std::string name() const
gem5::Tick delayed(const ::sc_core::sc_time &delay)
void deschedule(ScEvent *event)
void deschedule(gem5::Event *event)
void registerTraceFile(TraceFile *tf)
const ::sc_core::sc_report * _throwUp
gem5::Tick timeToPending()
std::mutex asyncListMutex
std::list< TimeSlot * > TimeSlots
void scheduleStop(bool finish_delta)
ProcessList readyListThreads
std::map< gem5::Event *, gem5::Tick > eventsToSchedule
ChannelList asyncUpdateList
void asyncRequestUpdate(Channel *c)
gem5::MemberEventWrapper<&Scheduler::timeAdvances > timeAdvancesEvent
static Priority ReadyPriority
static Priority TimeAdvancesPriority
void schedule(ScEvent *event, const ::sc_core::sc_time &delay)
void schedule(gem5::Event *event, gem5::Tick tick)
gem5::MemberEventWrapper<&Scheduler::pause > starvationEvent
std::atomic< bool > hasAsyncUpdate
static Priority StopPriority
static Priority MaxTickPriority
gem5::MemberEventWrapper<&Scheduler::maxTickFunc > maxTickEvent
gem5::MemberEventWrapper<&Scheduler::stop > stopEvent
void unregisterTraceFile(TraceFile *tf)
static Priority PausePriority
std::list< ScEvent * > ScEvents
void setEventQueue(gem5::EventQueue *_eq)
gem5::MemberEventWrapper<&Scheduler::runReady > readyEvent
void scheduleStarvationEvent()
TimeSlot * acquireTimeSlot(gem5::Tick tick)
void requestUpdate(Channel *c)
void schedule(gem5::Event *event)
void completeTimeSlot(TimeSlot *ts)
void scheduleTimeAdvancesEvent()
std::stack< TimeSlot * > freeTimeSlots
void scheduleReadyEvent()
gem5::MemberEventWrapper<&Scheduler::pause > pauseEvent
static const Priority Maximum_Pri
Maximum priority.
bool scheduled() const
Determine if the current event is scheduled.
static const Priority Default_Pri
Default is zero for historical reasons.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Tick
Tick count type.
NodeList< Process > ProcessList
const ::sc_core::sc_report reportifyException()
NodeList< Channel > ChannelList
Process * getCurrentProcess()