diff options
Diffstat (limited to 'src/mem/physical.cc')
-rw-r--r-- | src/mem/physical.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc index 5eb89e126..f4fbd2fb1 100644 --- a/src/mem/physical.cc +++ b/src/mem/physical.cc @@ -110,7 +110,7 @@ PhysicalMemory::calculateLatency(Packet *pkt) return lat; } -Tick +void PhysicalMemory::doFunctionalAccess(Packet *pkt) { assert(pkt->getAddr() + pkt->getSize() < params()->addrRange.size()); @@ -136,7 +136,6 @@ PhysicalMemory::doFunctionalAccess(Packet *pkt) } pkt->result = Packet::Success; - return calculateLatency(pkt); } Port * @@ -197,7 +196,9 @@ PhysicalMemory::MemoryPort::recvTiming(Packet *pkt) { assert(pkt->result != Packet::Nacked); - Tick latency = memory->doFunctionalAccess(pkt); + Tick latency = memory->calculateLatency(pkt); + + memory->doFunctionalAccess(pkt); pkt->makeTimingResponse(); sendTiming(pkt, latency); @@ -208,7 +209,8 @@ PhysicalMemory::MemoryPort::recvTiming(Packet *pkt) Tick PhysicalMemory::MemoryPort::recvAtomic(Packet *pkt) { - return memory->doFunctionalAccess(pkt); + memory->doFunctionalAccess(pkt); + return memory->calculateLatency(pkt); } void |