summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-11-06 19:52:32 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-11-06 19:52:32 -0500
commit02abca6b9e4e21d8d89eb83eabab3be8ac10c9d8 (patch)
tree6c923510076654885f31d2328c4853c5974699a8 /src/cpu/base.cc
parentdd14c86ec8afb3a98d55a58eaafd8b85dd651bd6 (diff)
parentbf3223d7ce681db8ca59dac49c6b44b672012e5d (diff)
downloadgem5-02abca6b9e4e21d8d89eb83eabab3be8ac10c9d8.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem/
into zeep.eecs.umich.edu:/home/gblack/m5/newmemmemops src/SConscript: SCCS merged --HG-- extra : convert_revision : f130c8a2d33f58d857e5d5a02bb9698c1bceb23b
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 66c5d3e11..4c243a2e9 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -254,6 +254,26 @@ BaseCPU::regStats()
#endif
}
+Tick
+BaseCPU::nextCycle()
+{
+ Tick next_tick = curTick + clock - 1;
+ next_tick -= (next_tick % clock);
+ return next_tick;
+}
+
+Tick
+BaseCPU::nextCycle(Tick begin_tick)
+{
+ Tick next_tick = begin_tick;
+
+ while (next_tick < curTick)
+ next_tick += clock;
+
+ next_tick -= (next_tick % clock);
+ assert(next_tick >= curTick);
+ return next_tick;
+}
void
BaseCPU::registerThreadContexts()