sim: Schedule the global sync event at curTick() + simQuantum
authorAndreas Sandberg <andreas@sandberg.pp.se>
Thu, 6 Mar 2014 14:59:53 +0000 (15:59 +0100)
committerAndreas Sandberg <andreas@sandberg.pp.se>
Thu, 6 Mar 2014 14:59:53 +0000 (15:59 +0100)
The global synchronization event used to be scheduled at
simQuantum. This prevented repeated entries into gem5 from Python as
it can be scheduled in the past. This changeset ensures that the first
global synchronization happens at curTick() + simQuantum instead.

src/sim/simulate.cc

index 407e2274e426761e56d270b3d917e7fcfbae87f4..b60b8a7834d6e60248d636dffb6efecdccebfa7a 100644 (file)
@@ -114,7 +114,7 @@ simulate(Tick num_cycles)
             fatal("Quantum for multi-eventq simulation not specified");
         }
 
-        quantum_event = new GlobalSyncEvent(simQuantum, simQuantum,
+        quantum_event = new GlobalSyncEvent(curTick() + simQuantum, simQuantum,
                             EventBase::Progress_Event_Pri, 0);
 
         inParallelMode = true;