systemc: Update signals before initing processes.
authorGabe Black <gabeblack@google.com>
Sat, 1 Dec 2018 00:57:02 +0000 (16:57 -0800)
committerGabe Black <gabeblack@google.com>
Mon, 10 Dec 2018 06:41:43 +0000 (06:41 +0000)
We were supposed to do one update phase before adding all processes
which didn't have dont_initialize() called to the run queue. We were
doing that in the opposite order.

Change-Id: I6dd4108040d455dc78029da029a2eb5e7af819cb
Reviewed-on: https://gem5-review.googlesource.com/c/14915
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/scheduler.cc

index a2e52f0cab19ca87734149980572163e155a7af0..465da552f6b6be6666812252fda41867ca443265 100644 (file)
@@ -108,6 +108,8 @@ Scheduler::clear()
 void
 Scheduler::initPhase()
 {
+    runUpdate();
+
     for (Process *p = initList.getNext(); p; p = initList.getNext()) {
         p->popListNode();
 
@@ -121,7 +123,6 @@ Scheduler::initPhase()
         }
     }
 
-    runUpdate();
     runDelta();
 
     for (auto ets: eventsToSchedule)