io_device.hh (8975:7f36d4436074) io_device.hh (9015:7f4d25789dc4)
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

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

138
139 /** Maximum time that device should back off for after failed sendTiming */
140 Tick maxBackoffDelay;
141
142 /** If the port is currently waiting for a retry before it can send whatever
143 * it is that it's sending. */
144 bool inRetry;
145
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

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

138
139 /** Maximum time that device should back off for after failed sendTiming */
140 Tick maxBackoffDelay;
141
142 /** If the port is currently waiting for a retry before it can send whatever
143 * it is that it's sending. */
144 bool inRetry;
145
146 /** Port accesses a cache which requires snooping */
147 bool recvSnoops;
148
149 virtual bool recvTimingResp(PacketPtr pkt);
150
146 virtual bool recvTimingResp(PacketPtr pkt);
147
151 virtual void recvTimingSnoopReq(PacketPtr pkt)
152 {
153 if (!recvSnoops)
154 panic("%s was not expecting a snoop\n", name());
155 }
156
157 virtual Tick recvAtomicSnoop(PacketPtr pkt)
158 {
159 if (!recvSnoops)
160 panic("%s was not expecting a snoop\n", name());
161 return 0;
162 }
163
164 virtual void recvFunctionalSnoop(PacketPtr pkt)
165 {
166 if (!recvSnoops)
167 panic("%s was not expecting a snoop\n", name());
168 }
169
170 virtual void recvRetry() ;
171
148 virtual void recvRetry() ;
149
172 virtual bool isSnooping() const { return recvSnoops; }
173
174 void queueDma(PacketPtr pkt, bool front = false);
175 void sendDma();
176
177 /** event to give us a kick every time we backoff time is reached. */
178 EventWrapper<DmaPort, &DmaPort::sendDma> backoffEvent;
179
180 public:
150 void queueDma(PacketPtr pkt, bool front = false);
151 void sendDma();
152
153 /** event to give us a kick every time we backoff time is reached. */
154 EventWrapper<DmaPort, &DmaPort::sendDma> backoffEvent;
155
156 public:
181 DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff,
182 bool recv_snoops = false);
157 DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff);
183
184 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
185 uint8_t *data, Tick delay, Request::Flags flag = 0);
186
187 bool dmaPending() { return pendingCount > 0; }
188
189 unsigned cacheBlockSize() const { return peerBlockSize(); }
190 unsigned int drain(Event *de);

--- 136 unchanged lines hidden ---
158
159 void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
160 uint8_t *data, Tick delay, Request::Flags flag = 0);
161
162 bool dmaPending() { return pendingCount > 0; }
163
164 unsigned cacheBlockSize() const { return peerBlockSize(); }
165 unsigned int drain(Event *de);

--- 136 unchanged lines hidden ---