dma_device.hh (9133:82491f9ed266) dma_device.hh (9165:f9e3dac185ba)
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 73 unchanged lines hidden (view full) ---

82
83 /** Number of outstanding packets the dma port has. */
84 int pendingCount;
85
86 /** If we need to drain, keep the drain event around until we're done
87 * here.*/
88 Event *drainEvent;
89
1/*
2 * Copyright (c) 2012 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 73 unchanged lines hidden (view full) ---

82
83 /** Number of outstanding packets the dma port has. */
84 int pendingCount;
85
86 /** If we need to drain, keep the drain event around until we're done
87 * here.*/
88 Event *drainEvent;
89
90 /** time to wait between sending another packet, increases as NACKs are
91 * recived, decreases as responses are recived. */
92 Tick backoffTime;
93
94 /** Minimum time that device should back off for after failed sendTiming */
95 Tick minBackoffDelay;
96
97 /** Maximum time that device should back off for after failed sendTiming */
98 Tick maxBackoffDelay;
99
100 /** If the port is currently waiting for a retry before it can send whatever
101 * it is that it's sending. */
102 bool inRetry;
103
104 virtual bool recvTimingResp(PacketPtr pkt);
105
106 virtual void recvRetry() ;
107
108 void queueDma(PacketPtr pkt, bool front = false);
109 void sendDma();
110
90 /** If the port is currently waiting for a retry before it can send whatever
91 * it is that it's sending. */
92 bool inRetry;
93
94 virtual bool recvTimingResp(PacketPtr pkt);
95
96 virtual void recvRetry() ;
97
98 void queueDma(PacketPtr pkt, bool front = false);
99 void sendDma();
100
111 /** event to give us a kick every time we backoff time is reached. */
112 EventWrapper<DmaPort, &DmaPort::sendDma> backoffEvent;
113
114 public:
101 public:
115 DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff);
116
102
103 DmaPort(MemObject *dev, System *s);
104
117 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
118 uint8_t *data, Tick delay, Request::Flags flag = 0);
119
120 bool dmaPending() { return pendingCount > 0; }
121
122 unsigned cacheBlockSize() const { return peerBlockSize(); }
123 unsigned int drain(Event *de);
124};

--- 44 unchanged lines hidden ---
105 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
106 uint8_t *data, Tick delay, Request::Flags flag = 0);
107
108 bool dmaPending() { return pendingCount > 0; }
109
110 unsigned cacheBlockSize() const { return peerBlockSize(); }
111 unsigned int drain(Event *de);
112};

--- 44 unchanged lines hidden ---