- virtual Tick recvAtomic(PacketPtr pkt);
-
- virtual AddrRangeList getAddrRanges();
-
- public:
-
- PioPort(PioDevice *dev);
-};
-
-
-class DmaPort : public MasterPort
-{
- protected:
- struct DmaReqState : public Packet::SenderState, public FastAlloc
- {
- /** Event to call on the device when this transaction (all packets)
- * complete. */
- Event *completionEvent;
-
- /** Where we came from for some sanity checking. */
- Port *outPort;
-
- /** Total number of bytes that this transaction involves. */
- Addr totBytes;
-
- /** Number of bytes that have been acked for this transaction. */
- Addr numBytes;
-
- /** Amount to delay completion of dma by */
- Tick delay;
-
-
- DmaReqState(Event *ce, Port *p, Addr tb, Tick _delay)
- : completionEvent(ce), outPort(p), totBytes(tb), numBytes(0),
- delay(_delay)
- {}
- };
-
- MemObject *device;
- std::list<PacketPtr> transmitList;
-
- /** The system that device/port are in. This is used to select which mode
- * we are currently operating in. */
- System *sys;
-
- /** Id for all requests */
- MasterID masterId;
-
- /** Number of outstanding packets the dma port has. */
- int pendingCount;
-
- /** If a dmaAction is in progress. */
- int actionInProgress;
-
- /** If we need to drain, keep the drain event around until we're done
- * here.*/
- Event *drainEvent;
-
- /** time to wait between sending another packet, increases as NACKs are
- * recived, decreases as responses are recived. */
- Tick backoffTime;
-
- /** Minimum time that device should back off for after failed sendTiming */
- Tick minBackoffDelay;
-
- /** Maximum time that device should back off for after failed sendTiming */
- Tick maxBackoffDelay;
-
- /** If the port is currently waiting for a retry before it can send whatever
- * it is that it's sending. */
- bool inRetry;
-
- /** Port accesses a cache which requires snooping */
- bool recvSnoops;
-
- virtual bool recvTimingResp(PacketPtr pkt);
-
- virtual void recvTimingSnoopReq(PacketPtr pkt)
- {
- if (!recvSnoops)
- panic("%s was not expecting a snoop\n", name());
- }
-
- virtual Tick recvAtomicSnoop(PacketPtr pkt)