fix bug in timing cpu. getTime() is the time the requset was created, not the time...
authorAli Saidi <saidi@eecs.umich.edu>
Mon, 18 Jun 2007 22:11:07 +0000 (18:11 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Mon, 18 Jun 2007 22:11:07 +0000 (18:11 -0400)
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

src/cpu/simple/timing.cc

index 1c79fcf6b664bfba7118a2914f689067a8d5eee2..7698a588d36ec5c81967d679b547b668600a7934 100644 (file)
@@ -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);