summaryrefslogtreecommitdiff
path: root/src/systemc/core/scheduler.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-22 04:51:29 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 00:25:40 +0000
commita503a24d97b29ef246330e95dab77669a0a4256c (patch)
tree83c629f8048bff01b51eb20103a2e8d83c758c86 /src/systemc/core/scheduler.hh
parent1e17aca38ea0c9cdcc4445404bf8b789a360ce13 (diff)
downloadgem5-a503a24d97b29ef246330e95dab77669a0a4256c.tar.xz
systemc: Don't schedule the ready event unnecessarily.
If we're already going to process the thing we'd be scheduling it to process, just let the existing invocation get to it. Change-Id: Ifeebc80903065567fc0eed02beefec6156b22ff7 Reviewed-on: https://gem5-review.googlesource.com/c/12964 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, 6 insertions, 3 deletions
diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh
index ad1467ea1..8015260a3 100644
--- a/src/systemc/core/scheduler.hh
+++ b/src/systemc/core/scheduler.hh
@@ -231,7 +231,8 @@ class Scheduler
// Delta notification/timeout.
if (delay.value() == 0) {
event->schedule(deltas, tick);
- scheduleReadyEvent();
+ if (!inEvaluate() && !inUpdate())
+ scheduleReadyEvent();
return;
}
@@ -331,8 +332,9 @@ class Scheduler
enum Status
{
StatusOther = 0,
- StatusDelta,
+ StatusEvaluate,
StatusUpdate,
+ StatusDelta,
StatusTiming,
StatusPaused,
StatusStopped
@@ -343,8 +345,9 @@ class Scheduler
bool paused() { return status() == StatusPaused; }
bool stopped() { return status() == StatusStopped; }
- bool inDelta() { return status() == StatusDelta; }
+ bool inEvaluate() { return status() == StatusEvaluate; }
bool inUpdate() { return status() == StatusUpdate; }
+ bool inDelta() { return status() == StatusDelta; }
bool inTiming() { return status() == StatusTiming; }
uint64_t changeStamp() { return _changeStamp; }