61a62
> template <class Device>
66c67
< PioDevice *device;
---
> Device *device;
68c69,75
< virtual Tick recvAtomic(PacketPtr pkt);
---
> Tick
> recvAtomic(PacketPtr pkt) override
> {
> // Technically the packet only reaches us after the header delay,
> // and typically we also need to deserialise any payload.
> Tick receive_delay = pkt->headerDelay + pkt->payloadDelay;
> pkt->headerDelay = pkt->payloadDelay = 0;
70c77,81
< virtual AddrRangeList getAddrRanges() const;
---
> const Tick delay =
> pkt->isRead() ? device->read(pkt) : device->write(pkt);
> assert(pkt->isResponse() || pkt->isError());
> return delay + receive_delay;
> }
72c83,87
< public:
---
> AddrRangeList
> getAddrRanges() const override
> {
> return device->getAddrRanges();
> }
74c89,92
< PioPort(PioDevice *dev);
---
> public:
> PioPort(Device *dev) :
> SimpleTimingPort(dev->name() + ".pio", dev), device(dev)
> {}
91c109
< PioPort pioPort;
---
> PioPort<PioDevice> pioPort;
131c149
< friend class PioPort;
---
> friend class PioPort<PioDevice>;
162,163c180
< virtual AddrRangeList getAddrRanges() const;
<
---
> AddrRangeList getAddrRanges() const override;