summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-27 06:51:28 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-10-27 06:51:28 -0400
commitd5974eff73a3cb69e50754ba92f65a73c904c2e0 (patch)
treeaf5a5f620b5d65bd98ff143bb63d95da4b3a3897 /src/cpu
parentf985b752d352b1f4bb253ad2372955f4caed72ea (diff)
downloadgem5-d5974eff73a3cb69e50754ba92f65a73c904c2e0.tar.xz
Potential fix to clock skew problem.
--HG-- extra : convert_revision : 51572523190a886fd0ff64817edc88e260c5fa9d
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/simple/atomic.cc3
1 files changed, 3 insertions, 0 deletions
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;
}