summaryrefslogtreecommitdiff
path: root/src/systemc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-26 14:56:30 -0700
committerGabe Black <gabeblack@google.com>2018-09-26 00:02:35 +0000
commit1712dd596bb70ab12a0f07737b496107f91a06c5 (patch)
tree0a12cf3d7f076592bd7786d15080bb22ab6e8a79 /src/systemc
parent060303d7771015e18e69271574558d2303edf6e1 (diff)
downloadgem5-1712dd596bb70ab12a0f07737b496107f91a06c5.tar.xz
systemc: When sc_start-ing with zero time, ensure the ready event runs.
The ready event is what notices that we only wanted to run one delta cycle, or no delta cycle if there was nothing to do, and return to sc_main. If the ready event wasn't scheduled, we would advance time before the ready event ran and returned to sc_main which is incorrect. Change-Id: Ic3c10a2f1405f744e8c2bd37aa45846ee6e98e12 Reviewed-on: https://gem5-review.googlesource.com/12267 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rw-r--r--src/systemc/core/scheduler.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index 7851bac67..c84aa9a46 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -327,6 +327,7 @@ void
Scheduler::oneCycle()
{
runOnce = true;
+ scheduleReadyEvent();
start(::MaxTick, false);
}