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);
555 while (!events.empty())
556 events.front()->run();
static const FlagsType AutoDelete
Queue of events sorted in time order.
void releaseImpl() override
Scheduler * parent_scheduler
TimeSlot(Scheduler *scheduler)
const gem5::EventBase::Priority Priority
std::set< TraceFile * > traceFiles
gem5::EventWrapper< Scheduler, &Scheduler::pause > pauseEvent
static Priority DefaultPriority
ProcessList readyListMethods
void elaborationDone(bool b)
gem5::EventWrapper< Scheduler, &Scheduler::stop > stopEvent
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()
gem5::EventWrapper< Scheduler, &Scheduler::runReady > readyEvent
std::mutex asyncListMutex
std::list< TimeSlot * > TimeSlots
void scheduleStop(bool finish_delta)
ProcessList readyListThreads
std::map< gem5::Event *, gem5::Tick > eventsToSchedule
gem5::EventWrapper< Scheduler, &Scheduler::pause > starvationEvent
ChannelList asyncUpdateList
void asyncRequestUpdate(Channel *c)
static Priority ReadyPriority
static Priority TimeAdvancesPriority
void schedule(ScEvent *event, const ::sc_core::sc_time &delay)
void schedule(gem5::Event *event, gem5::Tick tick)
TimeSlot * acquireTimeSlot(gem5::Tick tick)
std::atomic< bool > hasAsyncUpdate
static Priority StopPriority
static Priority MaxTickPriority
void unregisterTraceFile(TraceFile *tf)
static Priority PausePriority
std::list< ScEvent * > ScEvents
void setEventQueue(gem5::EventQueue *_eq)
void scheduleStarvationEvent()
void requestUpdate(Channel *c)
void schedule(gem5::Event *event)
void completeTimeSlot(TimeSlot *ts)
gem5::EventWrapper< Scheduler, &Scheduler::maxTickFunc > maxTickEvent
void scheduleTimeAdvancesEvent()
std::stack< TimeSlot * > freeTimeSlots
void scheduleReadyEvent()
gem5::EventWrapper< Scheduler, &Scheduler::timeAdvances > timeAdvancesEvent
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
void deschedule(Event *event)
Deschedule the specified event.
static const Priority Maximum_Pri
Maximum priority.
bool scheduled() const
Determine if the current event is scheduled.
Tick getCurTick() const
While curTick() is useful for any object assigned to this event queue, if an object that is assigned ...
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...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Tick
Tick count type.
NodeList< Process > ProcessList
const ::sc_core::sc_report reportifyException()
NodeList< Channel > ChannelList
Process * getCurrentProcess()