summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-16 20:59:29 -0700
committerGabe Black <gabeblack@google.com>2018-09-25 23:51:06 +0000
commitdd30c7ef763e01e52db5d6a9f9b0c9309fab9d4f (patch)
tree85304f719e05c83eae91fc2c6e4699349da71bd1 /src/systemc/core/scheduler.hh
parent0150b6fc88abd38bc8f485b0bb47a6a4ef7d3373 (diff)
downloadgem5-dd30c7ef763e01e52db5d6a9f9b0c9309fab9d4f.tar.xz
systemc: Rework the init phase for the new way delta notes are handled.
The initialization phase had been done in a somewhat adhoc way, partially because delta notifications were being handled as top level gem5 events which were ordered based on their priorities. This change makes the initialization phase happen more explicitly, and more in the order in the spec. Change-Id: I91d56b63fefcb81c845c52c97826a976a7559fad Reviewed-on: https://gem5-review.googlesource.com/12217 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/scheduler.hh')
-rw-r--r--src/systemc/core/scheduler.hh9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh
index b221e67d9..2843b6829 100644
--- a/src/systemc/core/scheduler.hh
+++ b/src/systemc/core/scheduler.hh
@@ -165,8 +165,7 @@ class Scheduler
uint64_t numCycles() { return _numCycles; }
Process *current() { return _current; }
- // Prepare for initialization.
- void prepareForInit();
+ void initPhase();
// Register a process with the scheduler.
void reg(Process *p);
@@ -226,7 +225,7 @@ class Scheduler
TimeSlot *&ts = timeSlots[tick];
if (!ts) {
ts = new TimeSlot;
- if (initReady)
+ if (initDone)
eq->schedule(ts, tick);
else
eventsToSchedule[ts] = tick;
@@ -256,7 +255,7 @@ class Scheduler
// If no more events are happening at this time slot, get rid of it.
if (events.empty()) {
- if (initReady)
+ if (initDone)
eq->deschedule(ts);
else
eventsToSchedule.erase(ts);
@@ -363,7 +362,7 @@ class Scheduler
Process *_current;
- bool initReady;
+ bool initDone;
bool runToTime;
bool runOnce;