Potential fix to clock skew problem.
authorGabe Black <gblack@eecs.umich.edu>
Fri, 27 Oct 2006 10:51:28 +0000 (06:51 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Fri, 27 Oct 2006 10:51:28 +0000 (06:51 -0400)
--HG--
extra : convert_revision : 51572523190a886fd0ff64817edc88e260c5fa9d

src/cpu/simple/atomic.cc

index edba55b0da1a38b1270c04fea55abf7bdfa732e0..b4ea4b216cdc51e9694b2925582258021e16ce57 100644 (file)
@@ -234,6 +234,9 @@ AtomicSimpleCPU::activateContext(int thread_num, int delay)
     assert(!tickEvent.scheduled());
 
     notIdleFraction++;
+    //Make sure ticks are still on multiples of cycles
+    Tick nextTick = curTick + cycles(1) - 1;
+    nextTick -= (nextTick % (cycles(1)));
     tickEvent.schedule(curTick + cycles(delay));
     _status = Running;
 }