changeset b1ac6773e83d in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=b1ac6773e83d
description:
        O3CPU: O3's tick event gets squashed when it is switched out.  When 
repeatedly
        switching between O3 and another CPU, O3's tick event might still be 
scheduled
        in the event queue (as squashed).  Therefore, check for a squashed tick 
event
        as well as a non-scheduled event when taking over from another CPU and 
deal
        with it accordingly.

diffstat:

 src/cpu/o3/cpu.cc |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r e76cc0ca16cc -r b1ac6773e83d src/cpu/o3/cpu.cc
--- a/src/cpu/o3/cpu.cc Thu Jul 22 18:47:03 2010 +0100
+++ b/src/cpu/o3/cpu.cc Thu Jul 22 18:47:43 2010 +0100
@@ -1143,7 +1143,7 @@
     iew.takeOverFrom();
     commit.takeOverFrom();
 
-    assert(!tickEvent.scheduled());
+    assert(!tickEvent.scheduled() || tickEvent.squashed());
 
     // @todo: Figure out how to properly select the tid to put onto
     // the active threads list.
@@ -1168,7 +1168,7 @@
         ThreadContext *tc = threadContexts[i];
         if (tc->status() == ThreadContext::Active && _status != Running) {
             _status = Running;
-            schedule(tickEvent, nextCycle());
+            reschedule(tickEvent, nextCycle(), true);
         }
     }
     if (!tickEvent.scheduled())
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to