Merge zizzer:/bk/newmem

into  zeep.pool:/z/saidi/tmp/m5.newmem

--HG--
extra : convert_revision : b754945635cc0864fdd68ec4bee736aab9bca407
This commit is contained in:
Ali Saidi 2006-08-16 23:39:44 -04:00
commit 57db6caab1
2 changed files with 7 additions and 5 deletions

View file

@ -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

View file

@ -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);