DRAM Memory doesn't crash the simulator now.. still untested.

--HG--
extra : convert_revision : fa2d2c5ec4073383f1b2b2f466d0245f2d6a6c35
This commit is contained in:
Ali Saidi 2006-08-16 23:39:31 -04:00
parent 76ab1c466c
commit c7bb14ac79
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);