diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-06-18 18:11:07 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-06-18 18:11:07 -0400 |
commit | 2d08ab0cc26fc2b03a575f054508abc035786a08 (patch) | |
tree | 06cc341a769dbeea0b89c23d0f1821653d2732a5 /src | |
parent | 7994fa94315e5f39337d073ea48718447a634410 (diff) | |
download | gem5-2d08ab0cc26fc2b03a575f054508abc035786a08.tar.xz |
fix bug in timing cpu. getTime() is the time the requset was created, not the time it was repsonded to. In timing mode the
time it was responded to is curTick. Doesn't change the results, but it does make implementation of nextCycle() more difficult
--HG--
extra : convert_revision : 67ed6261a5451d17d96d5df45992590acc353afc
Diffstat (limited to 'src')
-rw-r--r-- | src/cpu/simple/timing.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 1c79fcf6b..7698a588d 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -560,8 +560,7 @@ TimingSimpleCPU::IcachePort::recvTiming(PacketPtr pkt) { if (pkt->isResponse()) { // delay processing of returned data until next CPU clock edge - Tick mem_time = pkt->req->getTime(); - Tick next_tick = cpu->nextCycle(mem_time); + Tick next_tick = cpu->nextCycle(curTick); if (next_tick == curTick) cpu->completeIfetch(pkt); @@ -655,8 +654,7 @@ TimingSimpleCPU::DcachePort::recvTiming(PacketPtr pkt) { if (pkt->isResponse()) { // delay processing of returned data until next CPU clock edge - Tick mem_time = pkt->req->getTime(); - Tick next_tick = cpu->nextCycle(mem_time); + Tick next_tick = cpu->nextCycle(curTick); if (next_tick == curTick) cpu->completeDataAccess(pkt); |