diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-09-28 13:21:52 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-09-28 13:21:52 -0400 |
commit | d325f49b70e52044fd1072afed27227ecd4b2a60 (patch) | |
tree | 9157db931a027b3fd5d14330701b7cbf19f58483 /src/cpu/simple | |
parent | 887cd6a273f8777580fc3a046090c6b5244e9cad (diff) | |
download | gem5-d325f49b70e52044fd1072afed27227ecd4b2a60.tar.xz |
Rename cycles() function to ticks()
--HG--
extra : convert_revision : 790eddb793d4f5ba35813d001037bd8601bd76a5
Diffstat (limited to 'src/cpu/simple')
-rw-r--r-- | src/cpu/simple/atomic.cc | 16 | ||||
-rw-r--r-- | src/cpu/simple/timing.cc | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 06f52e30e..9187fa7c7 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -254,7 +254,7 @@ AtomicSimpleCPU::activateContext(int thread_num, int delay) notIdleFraction++; //Make sure ticks are still on multiples of cycles - tickEvent.schedule(nextCycle(curTick + cycles(delay))); + tickEvent.schedule(nextCycle(curTick + ticks(delay))); _status = Running; } @@ -584,7 +584,7 @@ AtomicSimpleCPU::tick() { DPRINTF(SimpleCPU, "Tick\n"); - Tick latency = cycles(1); // instruction takes one cycle by default + Tick latency = ticks(1); // instruction takes one cycle by default for (int i = 0; i < width; ++i) { numCycles++; @@ -642,14 +642,14 @@ AtomicSimpleCPU::tick() if (simulate_stalls) { Tick icache_stall = - icache_access ? icache_latency - cycles(1) : 0; + icache_access ? icache_latency - ticks(1) : 0; Tick dcache_stall = - dcache_access ? dcache_latency - cycles(1) : 0; - Tick stall_cycles = (icache_stall + dcache_stall) / cycles(1); - if (cycles(stall_cycles) < (icache_stall + dcache_stall)) - latency += cycles(stall_cycles+1); + dcache_access ? dcache_latency - ticks(1) : 0; + Tick stall_cycles = (icache_stall + dcache_stall) / ticks(1); + if (ticks(stall_cycles) < (icache_stall + dcache_stall)) + latency += ticks(stall_cycles+1); else - latency += cycles(stall_cycles); + latency += ticks(stall_cycles); } } diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index eee5b8cb5..2b5577e04 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -222,7 +222,7 @@ TimingSimpleCPU::activateContext(int thread_num, int delay) _status = Running; // kick things off by initiating the fetch of the next instruction - fetchEvent = new FetchEvent(this, nextCycle(curTick + cycles(delay))); + fetchEvent = new FetchEvent(this, nextCycle(curTick + ticks(delay))); } |