diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-08-16 23:39:31 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-08-16 23:39:31 -0400 |
commit | c7bb14ac7995f550104a92cfa535cc29e0c46371 (patch) | |
tree | d6b63ca25809346a7b3a51b76d54c3582ff6e506 /src | |
parent | 76ab1c466c0b51abb6c7508d4d6ceb16a75d3a60 (diff) | |
download | gem5-c7bb14ac7995f550104a92cfa535cc29e0c46371.tar.xz |
DRAM Memory doesn't crash the simulator now.. still untested.
--HG--
extra : convert_revision : fa2d2c5ec4073383f1b2b2f466d0245f2d6a6c35
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/physical.cc | 10 | ||||
-rw-r--r-- | src/mem/physical.hh | 2 |
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); |