30 #ifndef __SYSTEMC_CORE_SCHEDULER_HH__ 31 #define __SYSTEMC_CORE_SCHEDULER_HH__ 169 const std::string
name()
const {
return "systemc_scheduler"; }
247 if (delay.value() == 0) {
248 event->schedule(
deltas, tick);
260 event->schedule(ts->
events, tick);
267 ScEvents *
on =
event->scheduledOn();
277 "Descheduling event at time with no events.");
279 ScEvents &
events = ts->events;
280 assert(on == &events);
284 if (events.empty()) {
339 void start(
Tick max_tick,
bool run_to_time);
439 (timeSlots.empty() || timeSlots.begin()->first >
maxTick) &&
494 void trace(
bool delta);
527 #endif // __SYSTEMC_CORE_SCHEDULER_H__ void scheduleReadyEvent()
Process * getCurrentProcess()
void schedule(::Event *event)
const std::string name() const
EventWrapper< Scheduler, &Scheduler::pause > pauseEvent
void asyncRequestUpdate(Channel *c)
void deschedule(Event *event)
Deschedule the specified event.
static Priority DefaultPriority
ProcessList readyListMethods
void start(Tick max_tick, bool run_to_time)
void scheduleStarvationEvent()
std::set< TraceFile * > traceFiles
void registerTraceFile(TraceFile *tf)
void scheduleTimeAdvancesEvent()
void completeTimeSlot(TimeSlot *ts)
static const FlagsType AutoDelete
void scheduleStop(bool finish_delta)
NodeList< Channel > ChannelList
std::map<::Event *, Tick > eventsToSchedule
static Priority MaxTickPriority
bool scheduled() const
Determine if the current event is scheduled.
Queue of events sorted in time order.
uint64_t Tick
Tick count type.
void deschedule(ScEvent *event)
void elaborationDone(bool b)
ProcessList readyListThreads
EventWrapper< Scheduler, &Scheduler::pause > starvationEvent
EventWrapper< Scheduler, &Scheduler::timeAdvances > timeAdvancesEvent
void unregisterTraceFile(TraceFile *tf)
const EventBase::Priority Priority
ChannelList asyncUpdateList
void setEventQueue(EventQueue *_eq)
void deschedule(::Event *event)
static Priority PausePriority
const ::sc_core::sc_report reportifyException()
Tick delayed(const ::sc_core::sc_time &delay)
void requestUpdate(Channel *c)
EventWrapper< Scheduler, &Scheduler::runReady > readyEvent
This class represents a fiber, which is a light weight sort of thread which is cooperatively schedule...
const ::sc_core::sc_report * _throwUp
virtual void trace(const char *action)
trace event activity
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
EventWrapper< Scheduler, &Scheduler::stop > stopEvent
static Priority StopPriority
std::mutex asyncListMutex
static const Priority Default_Pri
Default is zero for historical reasons.
std::list< ScEvent * > ScEvents
NodeList< Process > ProcessList
static Priority ReadyPriority
EventWrapper< Scheduler, &Scheduler::maxTickFunc > maxTickEvent
static Priority StarvationPriority
std::map< Tick, TimeSlot * > TimeSlots
void schedule(ScEvent *event, const ::sc_core::sc_time &delay)
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
static Priority TimeAdvancesPriority
void schedule(::Event *event, Tick tick)
static const Priority Maximum_Pri
Maximum priority.