summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-08-16 23:39:44 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-08-16 23:39:44 -0400
commit57db6caab1b599c1e27d98e3363bbef6ffab0945 (patch)
treec34b679f400f415315f6f553fa7d40eb3ab87875
parentc6c5cc1ad52c9b2ee69e6de278e7b7255ef2dc33 (diff)
parentc7bb14ac7995f550104a92cfa535cc29e0c46371 (diff)
downloadgem5-57db6caab1b599c1e27d98e3363bbef6ffab0945.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/tmp/m5.newmem --HG-- extra : convert_revision : b754945635cc0864fdd68ec4bee736aab9bca407
-rw-r--r--src/mem/physical.cc10
-rw-r--r--src/mem/physical.hh2
2 files changed, 7 insertions, 5 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
diff --git a/src/mem/physical.hh b/src/mem/physical.hh
index c0a5523ba..1489e6700 100644
--- a/src/mem/physical.hh
+++ b/src/mem/physical.hh
@@ -112,7 +112,7 @@ class PhysicalMemory : public MemObject
unsigned int drain(Event *de);
protected:
- Tick doFunctionalAccess(Packet *pkt);
+ void doFunctionalAccess(Packet *pkt);
virtual Tick calculateLatency(Packet *pkt);
void recvStatusChange(Port::Status status);