diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-06-18 11:10:08 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-06-18 11:10:08 -0400 |
commit | 69c34554e5d621d45ce68cbd643baf9b0d049240 (patch) | |
tree | 7cf1b423fdc145e2dcb3e94945b1884dcb119098 /src/dev/io_device.cc | |
parent | 8dfc475a9d91eb17da5191e018c3991a3ff99c5a (diff) | |
download | gem5-69c34554e5d621d45ce68cbd643baf9b0d049240.tar.xz |
minor device fixups
configs/test/SysPaths.py:
remove some tabs and add /n/poolfs/z/dist/m5/system
src/dev/io_device.cc:
fix since pio timing dma packts colud be nacked too
src/dev/io_device.hh:
move DmaReqState into DmaDevie
--HG--
extra : convert_revision : 2b5300d85ab33b3753afc54bc6a04a47b6e00d20
Diffstat (limited to 'src/dev/io_device.cc')
-rw-r--r-- | src/dev/io_device.cc | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc index 485216874..e769ef037 100644 --- a/src/dev/io_device.cc +++ b/src/dev/io_device.cc @@ -62,13 +62,14 @@ PioPort::getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop) void PioPort::recvRetry() { - Packet* pkt = transmitList.front(); - if (Port::sendTiming(pkt)) { - transmitList.pop_front(); + bool result = true; + while (result && transmitList.size()) { + result = Port::sendTiming(transmitList.front()); + if (result) + transmitList.pop_front(); } } - void PioPort::SendEvent::process() { @@ -83,10 +84,20 @@ PioPort::SendEvent::process() bool PioPort::recvTiming(Packet *pkt) { - Tick latency = device->recvAtomic(pkt); - // turn packet around to go back to requester - pkt->makeTimingResponse(); - sendTiming(pkt, latency); + if (pkt->result == Packet::Nacked) { + pkt->reinitNacked(); + if (transmitList.size()) { + transmitList.push_front(pkt); + } else { + if (!Port::sendTiming(pkt)) + transmitList.push_front(pkt); + } + } else { + Tick latency = device->recvAtomic(pkt); + // turn packet around to go back to requester + pkt->makeTimingResponse(); + sendTiming(pkt, latency); + } return true; } |