Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/16443 )
Change subject: systemc: Init some values in the scheduler for running
without sc_main.
......................................................................
systemc: Init some values in the scheduler for running without sc_main.
When running without sc_main, sc_start won't be called, and therefore
runToTime and maxTick won't be initialized. To avoid the scheduler
getting confused and behaving erratically, those values should be
initialized to something that makes sense in situations where there's
no sc_main.
Change-Id: I6ddd7db9ecb36d716eb5ef75e1c38bb99a386092
Reviewed-on: https://gem5-review.googlesource.com/c/16443
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/scheduler.cc
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved
Gabe Black: Looks good to me, approved
diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index 4b566ca..da1dd2d 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -50,9 +50,11 @@
stopEvent(this, false, StopPriority), _throwUp(nullptr),
starvationEvent(this, false, StarvationPriority),
_elaborationDone(false), _started(false), _stopNow(false),
- _status(StatusOther), maxTickEvent(this, false, MaxTickPriority),
+ _status(StatusOther), maxTick(::MaxTick),
+ maxTickEvent(this, false, MaxTickPriority),
timeAdvancesEvent(this, false, TimeAdvancesPriority), _numCycles(0),
- _changeStamp(0), _current(nullptr), initDone(false), runOnce(false)
+ _changeStamp(0), _current(nullptr), initDone(false), runToTime(true),
+ runOnce(false)
{}
Scheduler::~Scheduler()
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16443
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I6ddd7db9ecb36d716eb5ef75e1c38bb99a386092
Gerrit-Change-Number: 16443
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-Reviewer: Weiping Liao <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev