diff -r 3c42be107634 -r 99c7e989a52e src/cpu/simple/timing.cc --- a/src/cpu/simple/timing.cc Sun Jan 25 07:22:56 2015 -0500 +++ b/src/cpu/simple/timing.cc Thu Jan 29 15:19:21 2015 +0000 @@ -718,14 +718,12 @@ bool TimingSimpleCPU::IcachePort::recvTimingResp(PacketPtr pkt) { - DPRINTF(SimpleCPU, "Received timing response %#x\n", pkt->getAddr()); + DPRINTF(SimpleCPU, "Received fetch response %#x\n", pkt->getAddr()); + // we should only ever see one response per cycle since we only + // issue a new request once this response is sunk + assert(!tickEvent.scheduled()); // delay processing of returned data until next CPU clock edge - Tick next_tick = cpu->clockEdge(); - - if (next_tick == curTick()) - cpu->completeIfetch(pkt); - else - tickEvent.schedule(pkt, next_tick); + tickEvent.schedule(pkt, cpu->clockEdge()); return true; } @@ -836,25 +834,20 @@ bool TimingSimpleCPU::DcachePort::recvTimingResp(PacketPtr pkt) { - // delay processing of returned data until next CPU clock edge - Tick next_tick = cpu->clockEdge(); + DPRINTF(SimpleCPU, "Received load/store response %#x\n", pkt->getAddr()); - if (next_tick == curTick()) { - cpu->completeDataAccess(pkt); + if (!tickEvent.scheduled()) { + // Delay processing of returned data until next CPU clock edge + tickEvent.schedule(pkt, cpu->clockEdge()); + return true; } else { - if (!tickEvent.scheduled()) { - tickEvent.schedule(pkt, next_tick); - } else { - // In the case of a split transaction and a cache that is - // faster than a CPU we could get two responses before - // next_tick expires - if (!retryEvent.scheduled()) - cpu->schedule(retryEvent, next_tick); - return false; - } + // In the case of a split transaction and a cache that is + // faster than a CPU we could get two responses in the + // same tick, delay the second one + if (!retryEvent.scheduled()) + cpu->schedule(retryEvent, cpu->clockEdge()); + return false; } - - return true; } void