systemc: Don't schedule the update phase if the event queue is null.
authorGabe Black <gabeblack@google.com>
Wed, 8 Aug 2018 09:56:00 +0000 (02:56 -0700)
committerGabe Black <gabeblack@google.com>
Thu, 20 Sep 2018 01:43:43 +0000 (01:43 +0000)
That happens when an update is requested before the initialization
phase has started. In that case, the update phase will be manually run
and no event needs to be scheduled, even if that was possible.

Change-Id: I2008e29064d282f82bd1935dbe5b94407aa925b0
Reviewed-on: https://gem5-review.googlesource.com/12078
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/scheduler.cc

index 7d2e9ef88003f31ac89eacc90591efc3c62ab16e..44c56467d8bd3016965504d8547afabb68deb314 100644 (file)
@@ -143,7 +143,8 @@ void
 Scheduler::requestUpdate(Channel *c)
 {
     updateList.pushLast(c);
-    scheduleReadyEvent();
+    if (eq)
+        scheduleReadyEvent();
 }
 
 void