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 <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
@@ -54,7 +54,11 @@ sc_core::sc_status Kernel::status() { return _status; }
|
||||
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::startup()
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user