diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-23 17:16:45 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-23 17:16:45 -0400 |
commit | cf826ae296a4277bdf2ce46e4484295efde5a3c2 (patch) | |
tree | bab4ed90c6c4f71b448fcf795abd6ada66c98fdb | |
parent | 20051d41d50a717b6aa384e59039ca987c284932 (diff) | |
download | gem5-cf826ae296a4277bdf2ce46e4484295efde5a3c2.tar.xz |
Minor fixes for full-system timing memory.
Need to rewrite bus bridge to get any further.
src/dev/io_device.cc:
Set packet dest on timing responses.
src/mem/bus.cc:
Fix dest addr bounds check assertion.
Add assertion to catch infinite loopbacks.
src/mem/physical.cc:
Add comment.
--HG--
extra : convert_revision : 419b65a3a61e2d099884dbda117b338dffd80896
-rw-r--r-- | src/dev/io_device.cc | 2 | ||||
-rw-r--r-- | src/mem/bus.cc | 3 | ||||
-rw-r--r-- | src/mem/physical.cc | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc index 634b11b7e..5f7770a92 100644 --- a/src/dev/io_device.cc +++ b/src/dev/io_device.cc @@ -78,6 +78,8 @@ bool PioPort::recvTiming(Packet *pkt) { device->recvAtomic(pkt); + // turn packet around to go back to requester + pkt->dest = pkt->src; sendTiming(pkt, pkt->time - pkt->req->getTime()); return Success; } diff --git a/src/mem/bus.cc b/src/mem/bus.cc index f7c2b874a..e8dfbc2e6 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -54,7 +54,8 @@ Bus::recvTiming(Packet *pkt) if (pkt->dest == Packet::Broadcast) { port = findPort(pkt->addr, pkt->src); } else { - assert(pkt->dest > 0 && pkt->dest < interfaces.size()); + assert(pkt->dest >= 0 && pkt->dest < interfaces.size()); + assert(pkt->dest != pkt->src); // catch infinite loops port = interfaces[pkt->dest]; } return port->sendTiming(pkt); diff --git a/src/mem/physical.cc b/src/mem/physical.cc index bc2500678..75179f9e3 100644 --- a/src/mem/physical.cc +++ b/src/mem/physical.cc @@ -127,6 +127,7 @@ PhysicalMemory::doTimingAccess (Packet *pkt, MemoryPort* memoryPort) { doFunctionalAccess(pkt); + // turn packet around to go back to requester pkt->dest = pkt->src; MemResponseEvent* response = new MemResponseEvent(pkt, memoryPort); response->schedule(curTick + lat); |