Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12073 )
Change subject: systemc: Set the scheduler's event queue earlier.
......................................................................
systemc: Set the scheduler's event queue earlier.
The kernel can set the event queue during its own construction which
will ensure that the scheduler can schedule events as early as
possible.
Change-Id: I0e47ca0a667e77d36c97860cd7c6b7577415c801
Reviewed-on: https://gem5-review.googlesource.com/12073
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/core/kernel.cc
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/core/kernel.cc b/src/systemc/core/kernel.cc
index 9eed325..3e3bdbd 100644
--- a/src/systemc/core/kernel.cc
+++ b/src/systemc/core/kernel.cc
@@ -54,7 +54,11 @@
void Kernel::status(sc_core::sc_status s) { _status = s; }
Kernel::Kernel(Params *params) :
- SimObject(params), t0Event(this, false, EventBase::Default_Pri - 1) {}
+ SimObject(params), t0Event(this, false, EventBase::Default_Pri - 1)
+{
+ // Install ourselves as the scheduler's event manager.
+ ::sc_gem5::scheduler.setEventQueue(eventQueue());
+}
void
Kernel::init()
@@ -93,8 +97,6 @@
kernel->status(::sc_core::SC_RUNNING);
schedule(t0Event, curTick());
- // Install ourselves as the scheduler's event manager.
- ::sc_gem5::scheduler.setEventQueue(eventQueue());
// Run update once before the event queue starts.
::sc_gem5::scheduler.update();
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12073
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: I0e47ca0a667e77d36c97860cd7c6b7577415c801
Gerrit-Change-Number: 12073
Gerrit-PatchSet: 9
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev