summaryrefslogtreecommitdiff
path: root/src/dev/io_device.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-08-30 16:24:26 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2006-08-30 16:24:26 -0700
commitf9ae0dcf1065454ca3d08512cd36a2dad9f08b2d (patch)
tree37e20bde0e0098eca99969f975c055d50cb65914 /src/dev/io_device.cc
parenta8a7ce2b886ca2571f9470a48a4f12302f9cc830 (diff)
downloadgem5-f9ae0dcf1065454ca3d08512cd36a2dad9f08b2d.tar.xz
Move more common functionality into SimpleTimingPort,
allowing derived classes to be simplified. --HG-- extra : convert_revision : c980d3aec5e6c044d8f41e96252726fe9a256605
Diffstat (limited to 'src/dev/io_device.cc')
-rw-r--r--src/dev/io_device.cc24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index b06e8b85d..408d8de3e 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -37,20 +37,14 @@
PioPort::PioPort(PioDevice *dev, System *s, std::string pname)
- : SimpleTimingPort(dev->name() + pname), device(dev), sys(s)
+ : SimpleTimingPort(dev->name() + pname), device(dev)
{ }
Tick
PioPort::recvAtomic(Packet *pkt)
{
- return device->recvAtomic(pkt);
-}
-
-void
-PioPort::recvFunctional(Packet *pkt)
-{
- device->recvAtomic(pkt);
+ return pkt->isRead() ? device->read(pkt) : device->write(pkt);
}
void
@@ -61,20 +55,6 @@ PioPort::getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop)
}
-bool
-PioPort::recvTiming(Packet *pkt)
-{
- if (pkt->result == Packet::Nacked) {
- resendNacked(pkt);
- } else {
- Tick latency = device->recvAtomic(pkt);
- // turn packet around to go back to requester
- pkt->makeTimingResponse();
- sendTiming(pkt, latency);
- }
- return true;
-}
-
PioDevice::~PioDevice()
{
if (pioPort)