gem5  v20.1.0.0
scheduler.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Google, Inc.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are
6  * met: redistributions of source code must retain the above copyright
7  * notice, this list of conditions and the following disclaimer;
8  * redistributions in binary form must reproduce the above copyright
9  * notice, this list of conditions and the following disclaimer in the
10  * documentation and/or other materials provided with the distribution;
11  * neither the name of the copyright holders nor the names of its
12  * contributors may be used to endorse or promote products derived from
13  * this software without specific prior written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #ifndef __SYSTEMC_CORE_SCHEDULER_HH__
29 #define __SYSTEMC_CORE_SCHEDULER_HH__
30 
31 #include <functional>
32 #include <map>
33 #include <mutex>
34 #include <set>
35 #include <vector>
36 
37 #include "base/logging.hh"
38 #include "sim/core.hh"
39 #include "sim/eventq.hh"
40 #include "systemc/core/channel.hh"
41 #include "systemc/core/list.hh"
42 #include "systemc/core/process.hh"
44 
45 class Fiber;
46 
47 namespace sc_gem5
48 {
49 
50 class TraceFile;
51 
54 
55 /*
56  * The scheduler supports three different mechanisms, the initialization phase,
57  * delta cycles, and timed notifications.
58  *
59  * INITIALIZATION PHASE
60  *
61  * The initialization phase has three parts:
62  * 1. Run requested channel updates.
63  * 2. Make processes which need to initialize runnable (methods and threads
64  * which didn't have dont_initialize called on them).
65  * 3. Process delta notifications.
66  *
67  * First, the Kernel SimObject calls the update() method during its startup()
68  * callback which handles the requested channel updates. The Kernel also
69  * schedules an event to be run at time 0 with a slightly elevated priority
70  * so that it happens before any "normal" event.
71  *
72  * When that t0 event happens, it calls the schedulers prepareForInit method
73  * which performs step 2 above. That indirectly causes the scheduler's
74  * readyEvent to be scheduled with slightly lowered priority, ensuring it
75  * happens after any "normal" event.
76  *
77  * Because delta notifications are scheduled at the standard priority, all
78  * of those events will happen next, performing step 3 above. Once they finish,
79  * if the readyEvent was scheduled above, there shouldn't be any higher
80  * priority events in front of it. When it runs, it will start the first
81  * evaluate phase of the first delta cycle.
82  *
83  * DELTA CYCLE
84  *
85  * A delta cycle has three phases within it.
86  * 1. The evaluate phase where runnable processes are allowed to run.
87  * 2. The update phase where requested channel updates hapen.
88  * 3. The delta notification phase where delta notifications happen.
89  *
90  * The readyEvent runs all three steps of the delta cycle. It first goes
91  * through the list of runnable processes and executes them until the set is
92  * empty, and then immediately runs the update phase. Since these are all part
93  * of the same event, there's no chance for other events to intervene and
94  * break the required order above.
95  *
96  * During the update phase above, the spec forbids any action which would make
97  * a process runnable. That means that once the update phase finishes, the set
98  * of runnable processes will be empty. There may, however, have been some
99  * delta notifications/timeouts which will have been scheduled during either
100  * the evaluate or update phase above. Those will have been accumulated in the
101  * scheduler, and are now all executed.
102  *
103  * If any processes became runnable during the delta notification phase, the
104  * readyEvent will have been scheduled and will be waiting and ready to run
105  * again, effectively starting the next delta cycle.
106  *
107  * TIMED NOTIFICATION PHASE
108  *
109  * If no processes became runnable, the event queue will continue to process
110  * events until it comes across an event which represents all the timed
111  * notifications which are supposed to happen at a particular time. The object
112  * which tracks them will execute all those notifications, and then destroy
113  * itself. If the readyEvent is now ready to run, the next delta cycle will
114  * start.
115  *
116  * PAUSE/STOP
117  *
118  * To inject a pause from sc_pause which should happen after the current delta
119  * cycle's delta notification phase, an event is scheduled with a lower than
120  * normal priority, but higher than the readyEvent. That ensures that any
121  * delta notifications which are scheduled with normal priority will happen
122  * first, since those are part of the current delta cycle. Then the pause
123  * event will happen before the next readyEvent which would start the next
124  * delta cycle. All of these events are scheduled for the current time, and so
125  * would happen before any timed notifications went off.
126  *
127  * To inject a stop from sc_stop, the delta cycles should stop before even the
128  * delta notifications have happened, but after the evaluate and update phases.
129  * For that, a stop event with slightly higher than normal priority will be
130  * scheduled so that it happens before any of the delta notification events
131  * which are at normal priority.
132  *
133  * MAX RUN TIME
134  *
135  * When sc_start is called, it's possible to pass in a maximum time the
136  * simulation should run to, at which point sc_pause is implicitly called. The
137  * simulation is supposed to run up to the latest timed notification phase
138  * which is less than or equal to the maximum time. In other words it should
139  * run timed notifications at the maximum time, but not the subsequent evaluate
140  * phase. That's implemented by scheduling an event at the max time with a
141  * priority which is lower than all the others except the ready event. Timed
142  * notifications will happen before it fires, but it will override any ready
143  * event and prevent the evaluate phase from starting.
144  */
145 
147 {
148  public:
150 
151  class TimeSlot : public ::Event
152  {
153  public:
155 
157  void process();
158  };
159 
160  typedef std::map<Tick, TimeSlot *> TimeSlots;
161 
162  Scheduler();
163  ~Scheduler();
164 
165  void clear();
166 
167  const std::string name() const { return "systemc_scheduler"; }
168 
169  uint64_t numCycles() { return _numCycles; }
170  Process *current() { return _current; }
171 
172  void initPhase();
173 
174  // Register a process with the scheduler.
175  void reg(Process *p);
176 
177  // Run the next process, if there is one.
178  void yield();
179 
180  // Put a process on the ready list.
181  void ready(Process *p);
182 
183  // Mark a process as ready if init is finished, or put it on the list of
184  // processes to be initialized.
185  void resume(Process *p);
186 
187  // Remove a process from the ready/init list if it was on one of them, and
188  // return if it was.
189  bool suspend(Process *p);
190 
191  // Schedule an update for a given channel.
192  void requestUpdate(Channel *c);
193  // Same as above, but may be called from a different thread.
195 
196  // Run the given process immediately, preempting whatever may be running.
197  void
199  {
200  // This function may put a process on the wrong list, ie a thread
201  // the method list. That's fine since that's just a performance
202  // optimization, and the important thing here is how the processes are
203  // ordered.
204 
205  // If a process is running, schedule it/us to run again.
206  if (_current)
208  // Schedule p to run first.
210  yield();
211  }
212 
213  // Run this process at the next opportunity.
214  void
216  {
217  // Like above, it's ok if this isn't a method. Putting it on this list
218  // just gives it priority.
220  if (!inEvaluate())
222  }
223 
224  // Set an event queue for scheduling events.
225  void setEventQueue(EventQueue *_eq) { eq = _eq; }
226 
227  // Get the current time according to gem5.
228  Tick getCurTick() { return eq ? eq->getCurTick() : 0; }
229 
230  Tick
231  delayed(const ::sc_core::sc_time &delay)
232  {
233  return getCurTick() + delay.value();
234  }
235 
236  // For scheduling delayed/timed notifications/timeouts.
237  void
238  schedule(ScEvent *event, const ::sc_core::sc_time &delay)
239  {
240  Tick tick = delayed(delay);
241  if (tick < getCurTick())
242  tick = getCurTick();
243 
244  // Delta notification/timeout.
245  if (delay.value() == 0) {
246  event->schedule(deltas, tick);
247  if (!inEvaluate() && !inUpdate())
249  return;
250  }
251 
252  // Timed notification/timeout.
253  TimeSlot *&ts = timeSlots[tick];
254  if (!ts) {
255  ts = new TimeSlot;
256  schedule(ts, tick);
257  }
258  event->schedule(ts->events, tick);
259  }
260 
261  // For descheduling delayed/timed notifications/timeouts.
262  void
264  {
265  ScEvents *on = event->scheduledOn();
266 
267  if (on == &deltas) {
268  event->deschedule();
269  return;
270  }
271 
272  // Timed notification/timeout.
273  auto tsit = timeSlots.find(event->when());
274  panic_if(tsit == timeSlots.end(),
275  "Descheduling event at time with no events.");
276  TimeSlot *ts = tsit->second;
277  ScEvents &events = ts->events;
278  assert(on == &events);
279  event->deschedule();
280 
281  // If no more events are happening at this time slot, get rid of it.
282  if (events.empty()) {
283  deschedule(ts);
284  timeSlots.erase(tsit);
285  }
286  }
287 
288  void
290  {
291  assert(ts == timeSlots.begin()->second);
292  timeSlots.erase(timeSlots.begin());
293  if (!runToTime && starved())
296  }
297 
298  // Pending activity ignores gem5 activity, much like how a systemc
299  // simulation wouldn't know about asynchronous external events (socket IO
300  // for instance) that might happen before time advances in a pure
301  // systemc simulation. Also the spec lists what specific types of pending
302  // activity needs to be counted, which obviously doesn't include gem5
303  // events.
304 
305  // Return whether there's pending systemc activity at this time.
306  bool
308  {
309  return !readyListMethods.empty() || !readyListThreads.empty() ||
310  !updateList.empty() || !deltas.empty();
311  }
312 
313  // Return whether there are pending timed notifications or timeouts.
314  bool
316  {
317  return !timeSlots.empty();
318  }
319 
320  // Return how many ticks there are until the first pending event, if any.
321  Tick
323  {
324  if (pendingCurr())
325  return 0;
326  if (pendingFuture())
327  return timeSlots.begin()->first - getCurTick();
328  return MaxTick - getCurTick();
329  }
330 
331  // Run scheduled channel updates.
332  void runUpdate();
333 
334  // Run delta events.
335  void runDelta();
336 
337  void start(Tick max_tick, bool run_to_time);
338  void oneCycle();
339 
340  void schedulePause();
341  void scheduleStop(bool finish_delta);
342 
343  enum Status
344  {
352  };
353 
356 
357  bool paused() { return status() == StatusPaused; }
358  bool stopped() { return status() == StatusStopped; }
359  bool inEvaluate() { return status() == StatusEvaluate; }
360  bool inUpdate() { return status() == StatusUpdate; }
361  bool inDelta() { return status() == StatusDelta; }
362  bool inTiming() { return status() == StatusTiming; }
363 
364  uint64_t changeStamp() { return _changeStamp; }
366 
367  // Throw upwards, either to sc_main or to the report handler if sc_main
368  // isn't running.
369  void throwUp();
370 
371  Status status() { return _status; }
372  void status(Status s) { _status = s; }
373 
376 
377  private:
380 
387 
389 
390  // For gem5 style events.
391  void
393  {
394  if (initDone)
395  eq->schedule(event, tick);
396  else
397  eventsToSchedule[event] = tick;
398  }
399 
401 
402  void
404  {
405  if (initDone)
406  eq->deschedule(event);
407  else
408  eventsToSchedule.erase(event);
409  }
410 
413 
414  Process *
416  {
418  return p ? p : readyListThreads.getNext();
419  }
420 
421  void runReady();
423  void scheduleReadyEvent();
424 
425  void pause();
426  void stop();
429 
430  const ::sc_core::sc_report *_throwUp;
431 
432  bool
434  {
435  return (readyListMethods.empty() && readyListThreads.empty() &&
436  updateList.empty() && deltas.empty() &&
437  (timeSlots.empty() || timeSlots.begin()->first > maxTick) &&
438  initList.empty());
439  }
442 
444  bool _started;
445  bool _stopNow;
446 
448 
451  void
453  {
454  if (lastReadyTick != getCurTick())
455  _changeStamp++;
456  pause();
457  }
459 
460  void timeAdvances() { trace(false); }
462  void
464  {
465  if (!traceFiles.empty() && !timeAdvancesEvent.scheduled())
467  }
468 
469  uint64_t _numCycles;
470  uint64_t _changeStamp;
471 
473 
474  bool initDone;
475  bool runToTime;
476  bool runOnce;
477 
479 
482 
484 
486  std::mutex asyncListMutex;
487 
488  std::map<::Event *, Tick> eventsToSchedule;
489 
490  std::set<TraceFile *> traceFiles;
491 
492  void trace(bool delta);
493 };
494 
495 extern Scheduler scheduler;
496 
497 // A proxy function to avoid having to expose the scheduler in header files.
499 
500 inline void
502 {
505 
506  try {
507  while (!events.empty())
508  events.front()->run();
509  } catch (...) {
510  if (events.empty())
512  else
513  scheduler.schedule(this);
514  scheduler.throwUp();
515  }
516 
519 }
520 
521 const ::sc_core::sc_report reportifyException();
522 
523 } // namespace sc_gem5
524 
525 #endif // __SYSTEMC_CORE_SCHEDULER_H__
sc_gem5::Scheduler::reg
void reg(Process *p)
Definition: scheduler.cc:147
sc_gem5::Scheduler::readyEvent
EventWrapper< Scheduler, &Scheduler::runReady > readyEvent
Definition: scheduler.hh:422
sc_gem5::reportifyException
const ::sc_core::sc_report reportifyException()
Definition: scheduler.cc:504
EventBase::AutoDelete
static const FlagsType AutoDelete
Definition: eventq.hh:102
sc_gem5::Scheduler::StatusStopped
@ StatusStopped
Definition: scheduler.hh:351
sc_gem5::Scheduler::TimeSlot::TimeSlot
TimeSlot()
Definition: scheduler.hh:154
sc_gem5::Scheduler::delayed
Tick delayed(const ::sc_core::sc_time &delay)
Definition: scheduler.hh:231
sc_gem5::Scheduler::resume
void resume(Process *p)
Definition: scheduler.cc:217
sc_gem5::Scheduler::initList
ProcessList initList
Definition: scheduler.hh:478
sc_gem5::Scheduler::DefaultPriority
static Priority DefaultPriority
Definition: scheduler.hh:379
sc_gem5::Scheduler::maxTickFunc
void maxTickFunc()
Definition: scheduler.hh:452
sc_gem5::Scheduler::scheduleTimeAdvancesEvent
void scheduleTimeAdvancesEvent()
Definition: scheduler.hh:463
sc_gem5::Scheduler::scheduleStop
void scheduleStop(bool finish_delta)
Definition: scheduler.cc:468
sc_gem5::Scheduler::inTiming
bool inTiming()
Definition: scheduler.hh:362
sc_gem5::Scheduler::deschedule
void deschedule(ScEvent *event)
Definition: scheduler.hh:263
sc_gem5::Scheduler::ReadyPriority
static Priority ReadyPriority
Definition: scheduler.hh:384
sc_gem5::Scheduler::_numCycles
uint64_t _numCycles
Definition: scheduler.hh:469
sc_gem5::Scheduler::MaxTickPriority
static Priority MaxTickPriority
Definition: scheduler.hh:383
sc_gem5::Scheduler::pendingCurr
bool pendingCurr()
Definition: scheduler.hh:307
sc_gem5::Scheduler::StatusPaused
@ StatusPaused
Definition: scheduler.hh:350
sc_gem5::Scheduler::asyncRequestUpdate
void asyncRequestUpdate(Channel *c)
Definition: scheduler.cc:259
sc_gem5::Scheduler::updateList
ChannelList updateList
Definition: scheduler.hh:483
sc_gem5::Event
Definition: event.hh:58
sc_gem5::Scheduler::StatusDelta
@ StatusDelta
Definition: scheduler.hh:348
sc_gem5::Scheduler::elaborationDone
void elaborationDone(bool b)
Definition: scheduler.hh:355
EventWrapper
Definition: eventq.hh:1070
sc_gem5::Scheduler::Scheduler
Scheduler()
Definition: scheduler.cc:46
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
sc_gem5::Scheduler::getCurTick
Tick getCurTick()
Definition: scheduler.hh:228
sc_gem5::Scheduler::Status
Status
Definition: scheduler.hh:343
sc_gem5::Scheduler::Priority
const typedef EventBase::Priority Priority
Definition: scheduler.hh:378
sc_gem5::Scheduler::timeSlots
TimeSlots timeSlots
Definition: scheduler.hh:412
sc_gem5::Scheduler::TimeSlot::process
void process()
Definition: scheduler.hh:501
X86ISA::tf
Bitfield< 8 > tf
Definition: misc.hh:569
sc_gem5::Scheduler::stopped
bool stopped()
Definition: scheduler.hh:358
sc_gem5::Scheduler::inUpdate
bool inUpdate()
Definition: scheduler.hh:360
sc_gem5::Scheduler
Definition: scheduler.hh:146
sc_gem5::Scheduler::_throwUp
const ::sc_core::sc_report * _throwUp
Definition: scheduler.hh:430
sc_gem5::Scheduler::deltas
ScEvents deltas
Definition: scheduler.hh:411
sc_gem5::Scheduler::asyncListMutex
std::mutex asyncListMutex
Definition: scheduler.hh:486
sc_gem5::Scheduler::runOnce
bool runOnce
Definition: scheduler.hh:476
sc_gem5::Scheduler::StarvationPriority
static Priority StarvationPriority
Definition: scheduler.hh:385
sc_gem5::Scheduler::changeStamp
uint64_t changeStamp()
Definition: scheduler.hh:364
EventQueue::getCurTick
Tick getCurTick() const
While curTick() is useful for any object assigned to this event queue, if an object that is assigned ...
Definition: eventq.hh:850
sc_gem5::Scheduler::maxTickEvent
EventWrapper< Scheduler, &Scheduler::maxTickFunc > maxTickEvent
Definition: scheduler.hh:458
sc_gem5::Scheduler::timeAdvances
void timeAdvances()
Definition: scheduler.hh:460
sc_gem5::Scheduler::ready
void ready(Process *p)
Definition: scheduler.cc:200
sc_gem5::Scheduler::ScEvents
std::list< ScEvent * > ScEvents
Definition: scheduler.hh:149
sc_gem5::Scheduler::scheduleReadyEvent
void scheduleReadyEvent()
Definition: scheduler.cc:266
sc_gem5::Scheduler::numCycles
uint64_t numCycles()
Definition: scheduler.hh:169
ArmISA::ts
Bitfield< 55, 52 > ts
Definition: miscregs_types.hh:89
sc_gem5::Scheduler::deschedule
void deschedule(::Event *event)
Definition: scheduler.hh:403
sc_gem5::Scheduler::pause
void pause()
Definition: scheduler.cc:362
sc_gem5::NodeList::pushFirst
void pushFirst(T *t)
Definition: list.hh:72
sc_gem5::Scheduler::status
Status status()
Definition: scheduler.hh:371
sc_gem5::Scheduler::pauseEvent
EventWrapper< Scheduler, &Scheduler::pause > pauseEvent
Definition: scheduler.hh:427
Fiber
This class represents a fiber, which is a light weight sort of thread which is cooperatively schedule...
Definition: fiber.hh:62
sc_gem5::Scheduler::throwUp
void throwUp()
Definition: scheduler.cc:454
sc_gem5::Scheduler::lastReadyTick
Tick lastReadyTick
Definition: scheduler.hh:450
sc_gem5::Scheduler::~Scheduler
~Scheduler()
Definition: scheduler.cc:59
sc_gem5::Scheduler::TimeSlots
std::map< Tick, TimeSlot * > TimeSlots
Definition: scheduler.hh:160
MipsISA::event
Bitfield< 10, 5 > event
Definition: pra_constants.hh:297
sc_gem5::Scheduler::StatusEvaluate
@ StatusEvaluate
Definition: scheduler.hh:346
sc_gem5::Scheduler::runNow
void runNow(Process *p)
Definition: scheduler.hh:198
sc_gem5::Scheduler::yield
void yield()
Definition: scheduler.cc:161
sched_event.hh
sc_gem5::Scheduler::_stopNow
bool _stopNow
Definition: scheduler.hh:445
sc_gem5::getCurrentProcess
Process * getCurrentProcess()
Definition: scheduler.cc:490
sc_gem5::Scheduler::_status
Status _status
Definition: scheduler.hh:447
sc_gem5::TraceFile
Definition: tracefile.hh:190
sc_gem5::NodeList::empty
bool empty()
Definition: list.hh:106
sc_gem5::Scheduler::unregisterTraceFile
void unregisterTraceFile(TraceFile *tf)
Definition: scheduler.hh:375
sc_gem5::Scheduler::runReady
void runReady()
Definition: scheduler.cc:287
sc_gem5::Scheduler::clear
void clear()
Definition: scheduler.cc:67
sc_gem5::Scheduler::initPhase
void initPhase()
Definition: scheduler.cc:110
sc_gem5::Scheduler::StatusTiming
@ StatusTiming
Definition: scheduler.hh:349
EventBase::Maximum_Pri
static const Priority Maximum_Pri
Maximum priority.
Definition: eventq.hh:236
sc_gem5::Scheduler::StopPriority
static Priority StopPriority
Definition: scheduler.hh:381
sc_gem5::Scheduler::readyListMethods
ProcessList readyListMethods
Definition: scheduler.hh:480
sc_gem5::Scheduler::schedulePause
void schedulePause()
Definition: scheduler.cc:445
sc_gem5::Scheduler::_elaborationDone
bool _elaborationDone
Definition: scheduler.hh:443
sc_gem5::Scheduler::suspend
bool suspend(Process *p)
Definition: scheduler.cc:236
sc_gem5::Scheduler::initDone
bool initDone
Definition: scheduler.hh:474
channel.hh
core.hh
sc_gem5::Process
Definition: process.hh:62
sc_gem5::Scheduler::schedule
void schedule(::Event *event)
Definition: scheduler.hh:400
sc_gem5::Scheduler::scheduleStarvationEvent
void scheduleStarvationEvent()
Definition: scheduler.cc:277
sc_gem5::Scheduler::schedule
void schedule(::Event *event, Tick tick)
Definition: scheduler.hh:392
sc_gem5::Scheduler::stopEvent
EventWrapper< Scheduler, &Scheduler::stop > stopEvent
Definition: scheduler.hh:428
sc_gem5::Scheduler::elaborationDone
bool elaborationDone()
Definition: scheduler.hh:354
sc_gem5::Scheduler::_changeStamp
uint64_t _changeStamp
Definition: scheduler.hh:470
process.hh
sc_gem5::Scheduler::starved
bool starved()
Definition: scheduler.hh:433
sc_gem5::Scheduler::eventsToSchedule
std::map<::Event *, Tick > eventsToSchedule
Definition: scheduler.hh:488
sc_gem5::NodeList::getNext
T * getNext()
Definition: list.hh:105
sc_gem5::Scheduler::stop
void stop()
Definition: scheduler.cc:379
EventQueue::schedule
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
Definition: eventq.hh:757
sc_gem5::Scheduler::name
const std::string name() const
Definition: scheduler.hh:167
panic_if
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:197
sc_gem5::Scheduler::requestUpdate
void requestUpdate(Channel *c)
Definition: scheduler.cc:251
sc_gem5::Scheduler::stepChangeStamp
void stepChangeStamp()
Definition: scheduler.hh:365
sc_gem5::Scheduler::current
Process * current()
Definition: scheduler.hh:170
sc_gem5::Scheduler::_current
Process * _current
Definition: scheduler.hh:472
ArmISA::b
Bitfield< 7 > b
Definition: miscregs_types.hh:376
sc_gem5::ChannelList
NodeList< Channel > ChannelList
Definition: scheduler.hh:53
sc_gem5::Scheduler::status
void status(Status s)
Definition: scheduler.hh:372
sc_gem5::Scheduler::_started
bool _started
Definition: scheduler.hh:444
sc_gem5::Scheduler::oneCycle
void oneCycle()
Definition: scheduler.cc:437
sc_gem5::Scheduler::StatusUpdate
@ StatusUpdate
Definition: scheduler.hh:347
sc_gem5::Scheduler::runNext
void runNext(Process *p)
Definition: scheduler.hh:215
sc_gem5::Scheduler::runDelta
void runDelta()
Definition: scheduler.cc:349
sc_gem5::Scheduler::TimeAdvancesPriority
static Priority TimeAdvancesPriority
Definition: scheduler.hh:386
list.hh
EventQueue::deschedule
void deschedule(Event *event)
Deschedule the specified event.
Definition: eventq.hh:790
EventBase::Default_Pri
static const Priority Default_Pri
Default is zero for historical reasons.
Definition: eventq.hh:174
sc_gem5::Scheduler::TimeSlot::events
ScEvents events
Definition: scheduler.hh:156
sc_gem5::Scheduler::setEventQueue
void setEventQueue(EventQueue *_eq)
Definition: scheduler.hh:225
sc_gem5::Scheduler::timeAdvancesEvent
EventWrapper< Scheduler, &Scheduler::timeAdvances > timeAdvancesEvent
Definition: scheduler.hh:461
sc_gem5::Scheduler::inEvaluate
bool inEvaluate()
Definition: scheduler.hh:359
sc_gem5::Scheduler::start
void start(Tick max_tick, bool run_to_time)
Definition: scheduler.cc:399
logging.hh
sc_gem5::Scheduler::completeTimeSlot
void completeTimeSlot(TimeSlot *ts)
Definition: scheduler.hh:289
sc_gem5::Scheduler::eq
EventQueue * eq
Definition: scheduler.hh:388
sc_gem5::Scheduler::trace
void trace(bool delta)
Definition: scheduler.cc:483
sc_gem5::Scheduler::timeToPending
Tick timeToPending()
Definition: scheduler.hh:322
sc_gem5::Scheduler::PausePriority
static Priority PausePriority
Definition: scheduler.hh:382
ArmISA::c
Bitfield< 29 > c
Definition: miscregs_types.hh:50
sc_gem5::Scheduler::schedule
void schedule(ScEvent *event, const ::sc_core::sc_time &delay)
Definition: scheduler.hh:238
sc_gem5::Scheduler::paused
bool paused()
Definition: scheduler.hh:357
sc_gem5
Definition: sc_clock.cc:42
sc_gem5::Scheduler::inDelta
bool inDelta()
Definition: scheduler.hh:361
sc_gem5::Scheduler::asyncUpdateList
ChannelList asyncUpdateList
Definition: scheduler.hh:485
sc_gem5::NodeList< Process >
EventBase::Priority
int8_t Priority
Definition: eventq.hh:118
EventQueue
Queue of events sorted in time order.
Definition: eventq.hh:617
sc_gem5::Scheduler::runUpdate
void runUpdate()
Definition: scheduler.cc:326
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< ScEvent * >
sc_gem5::Scheduler::pendingFuture
bool pendingFuture()
Definition: scheduler.hh:315
sc_gem5::Scheduler::registerTraceFile
void registerTraceFile(TraceFile *tf)
Definition: scheduler.hh:374
sc_gem5::scheduler
Scheduler scheduler
Definition: scheduler.cc:489
ArmISA::s
Bitfield< 4 > s
Definition: miscregs_types.hh:556
sc_gem5::Channel
Definition: channel.hh:39
sc_gem5::Scheduler::readyListThreads
ProcessList readyListThreads
Definition: scheduler.hh:481
MipsISA::on
Bitfield< 0 > on
Definition: dt_constants.hh:87
sc_gem5::Scheduler::starvationEvent
EventWrapper< Scheduler, &Scheduler::pause > starvationEvent
Definition: scheduler.hh:440
sc_gem5::Scheduler::runToTime
bool runToTime
Definition: scheduler.hh:475
sc_gem5::Scheduler::StatusOther
@ StatusOther
Definition: scheduler.hh:345
sc_gem5::Scheduler::traceFiles
std::set< TraceFile * > traceFiles
Definition: scheduler.hh:490
MaxTick
const Tick MaxTick
Definition: types.hh:65
sc_gem5::ScEvent
Definition: sched_event.hh:43
sc_gem5::Scheduler::getNextReady
Process * getNextReady()
Definition: scheduler.hh:415
sc_gem5::Scheduler::TimeSlot
Definition: scheduler.hh:151
sc_gem5::Scheduler::maxTick
Tick maxTick
Definition: scheduler.hh:449
sc_gem5::ProcessList
NodeList< Process > ProcessList
Definition: scheduler.hh:50
eventq.hh

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17