systemc: Increment the change stamp value before the timing phase.

It appears that events which are triggered during the timing phase
are considered triggered in the following evaluation phase. The
"triggered()" function on events is non-standard and not really
explained anywhere, but this appears to work in practice.

Change-Id: I2574dc4569bf148c55fbe2a4873d458fc507f2a5
Reviewed-on: https://gem5-review.googlesource.com/c/13293
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-10-03 19:02:53 -07:00
parent d8721496c9
commit d1a86fd700

View File

@@ -287,7 +287,6 @@ class Scheduler
void
completeTimeSlot(TimeSlot *ts)
{
_changeStamp++;
assert(ts == timeSlots.begin()->second);
timeSlots.erase(timeSlots.begin());
if (!runToTime && starved())
@@ -364,6 +363,7 @@ class Scheduler
bool inTiming() { return status() == StatusTiming; }
uint64_t changeStamp() { return _changeStamp; }
void stepChangeStamp() { _changeStamp++; }
void throwToScMain();
@@ -494,6 +494,7 @@ extern Scheduler scheduler;
inline void
Scheduler::TimeSlot::process()
{
scheduler.stepChangeStamp();
scheduler.status(StatusTiming);
try {