diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-06-26 17:50:58 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-06-26 17:50:58 -0400 |
commit | a23f15641e44e55bbc4ff7350e5a7f812a941085 (patch) | |
tree | 4ab159a962aeb86b42bc1b0d1fbb95c4203e31a1 /src/cpu | |
parent | 63bdaeedfae71aa9eab4716a884fad9d7c4ece54 (diff) | |
parent | 60454042aaf1c5b3380536c4a1d2255d8f648d7d (diff) | |
download | gem5-a23f15641e44e55bbc4ff7350e5a7f812a941085.tar.xz |
Merge zizzer:/bk/newmem
into zeep.eecs.umich.edu:/z/saidi/work/m5.newmem
--HG--
extra : convert_revision : 39c99c8acadd43f3ec42ae7550289a5075d910e4
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/simple/atomic.cc | 11 | ||||
-rw-r--r-- | src/cpu/simple/base.cc | 4 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 071193f02..ce28ba9c8 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -410,15 +410,14 @@ AtomicSimpleCPU::tick() postExecute(); if (simulate_stalls) { - // This calculation assumes that the icache and dcache - // access latencies are always a multiple of the CPU's - // cycle time. If not, the next tick event may get - // scheduled at a non-integer multiple of the CPU - // cycle time. Tick icache_stall = icache_latency - cycles(1); Tick dcache_stall = dcache_access ? dcache_latency - cycles(1) : 0; - latency += icache_stall + dcache_stall; + Tick stall_cycles = (icache_stall + dcache_stall) / cycles(1); + if (cycles(stall_cycles) < (icache_stall + dcache_stall)) + latency += cycles(stall_cycles+1); + else + latency += cycles(stall_cycles); } } diff --git a/src/cpu/simple/base.cc b/src/cpu/simple/base.cc index b4258fce6..db5dd2acf 100644 --- a/src/cpu/simple/base.cc +++ b/src/cpu/simple/base.cc @@ -446,11 +446,7 @@ void BaseSimpleCPU::advancePC(Fault fault) { if (fault != NoFault) { -#if FULL_SYSTEM fault->invoke(tc); -#else // !FULL_SYSTEM - fatal("fault (%s) detected @ PC %08p", fault->name(), thread->readPC()); -#endif // FULL_SYSTEM } else { // go to the next instruction |