Gabe Black has uploaded this change for review. (
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
---
M src/systemc/core/kernel.cc
1 file changed, 5 insertions(+), 3 deletions(-)
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: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev