From: Gabe Black Date: Fri, 27 Oct 2006 10:51:28 +0000 (-0400) Subject: Potential fix to clock skew problem. X-Git-Tag: m5_2.0_beta2~70^2~20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5974eff73a3cb69e50754ba92f65a73c904c2e0;p=gem5.git Potential fix to clock skew problem. --HG-- extra : convert_revision : 51572523190a886fd0ff64817edc88e260c5fa9d --- diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index edba55b0d..b4ea4b216 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -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; }