From: Gabe Black Date: Thu, 4 Oct 2018 02:02:53 +0000 (-0700) Subject: systemc: Increment the change stamp value before the timing phase. X-Git-Tag: v19.0.0.0~1532 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1a86fd7007dbdc6f6a5771c61ef45e72429e374;p=gem5.git 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 Maintainer: Gabe Black --- diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh index 83585dd2d..14dee2e6f 100644 --- a/src/systemc/core/scheduler.hh +++ b/src/systemc/core/scheduler.hh @@ -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 {