gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dma_device.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2013, 2015, 2017, 2019 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
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2004-2005 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
41 #ifndef __DEV_DMA_DEVICE_HH__
42 #define __DEV_DMA_DEVICE_HH__
43 
44 #include <deque>
45 #include <memory>
46 
47 #include "base/addr_range_map.hh"
48 #include "base/chunk_generator.hh"
49 #include "base/circlebuf.hh"
50 #include "dev/io_device.hh"
51 #include "mem/backdoor.hh"
52 #include "params/DmaDevice.hh"
53 #include "sim/drain.hh"
54 #include "sim/system.hh"
55 
56 namespace gem5
57 {
58 
59 class ClockedObject;
60 
61 class DmaPort : public RequestPort, public Drainable
62 {
63  private:
65 
71  void trySendTimingReq();
72 
80  void sendDma();
81 
83  {
87 
90 
92  bool aborted = false;
93 
95  const Addr totBytes;
96 
99 
101  const Tick delay;
102 
105 
107  uint8_t *const data = nullptr;
108 
111 
114 
116  const uint32_t sid;
117  const uint32_t ssid;
118 
121 
123  uint8_t *_data, Request::Flags _flags, RequestorID _id,
124  uint32_t _sid, uint32_t _ssid, Event *ce, Tick _delay,
125  Event *ae=nullptr)
126  : completionEvent(ce), abortEvent(ae), totBytes(tb), delay(_delay),
127  gen(addr, tb, chunk_sz), data(_data), flags(_flags), id(_id),
128  sid(_sid), ssid(_ssid), cmd(_cmd)
129  {}
130 
132  };
133 
135  bool sendAtomicReq(DmaReqState *state);
140  bool sendAtomicBdReq(DmaReqState *state);
141 
152  void handleRespPacket(PacketPtr pkt, Tick delay=0);
153  void handleResp(DmaReqState *state, Addr addr, Addr size, Tick delay=0);
154 
155  public:
158 
161  System *const sys;
162 
165 
166  protected:
169 
172 
174  uint32_t pendingCount = 0;
175 
177  PacketPtr inRetry = nullptr;
182  bool retryPending = false;
183 
185  const uint32_t defaultSid;
186 
188  const uint32_t defaultSSid;
189 
190  const int cacheLineSize;
191 
192  protected:
193 
194  bool recvTimingResp(PacketPtr pkt) override;
195  void recvReqRetry() override;
196 
197  public:
198 
199  DmaPort(ClockedObject *dev, System *s, uint32_t sid=0, uint32_t ssid=0);
200 
201  void
202  dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
203  uint8_t *data, Tick delay, Request::Flags flag=0);
204 
205  void
206  dmaAction(Packet::Command cmd, Addr addr, int size, Event *event,
207  uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay,
208  Request::Flags flag=0);
209 
210  // Abort and remove any pending DMA transmissions.
211  void abortPending();
212 
213  bool dmaPending() const { return pendingCount > 0; }
214 
215  DrainState drain() override;
216 };
217 
218 class DmaDevice : public PioDevice
219 {
220  protected:
222 
223  public:
224  typedef DmaDeviceParams Params;
225  DmaDevice(const Params &p);
226  virtual ~DmaDevice() = default;
227 
228  void
229  dmaWrite(Addr addr, int size, Event *event, uint8_t *data,
230  uint32_t sid, uint32_t ssid, Tick delay=0)
231  {
233  sid, ssid, delay);
234  }
235 
236  void
237  dmaWrite(Addr addr, int size, Event *event, uint8_t *data, Tick delay=0)
238  {
239  dmaPort.dmaAction(MemCmd::WriteReq, addr, size, event, data, delay);
240  }
241 
242  void
243  dmaRead(Addr addr, int size, Event *event, uint8_t *data,
244  uint32_t sid, uint32_t ssid, Tick delay=0)
245  {
247  sid, ssid, delay);
248  }
249 
250  void
251  dmaRead(Addr addr, int size, Event *event, uint8_t *data, Tick delay=0)
252  {
253  dmaPort.dmaAction(MemCmd::ReadReq, addr, size, event, data, delay);
254  }
255 
256  bool dmaPending() const { return dmaPort.dmaPending(); }
257 
258  void init() override;
259 
260  unsigned int cacheBlockSize() const { return sys->cacheLineSize(); }
261 
262  Port &getPort(const std::string &if_name,
263  PortID idx=InvalidPortID) override;
264 
265 };
266 
275 class DmaCallback : public Drainable
276 {
277  public:
278  virtual const std::string name() const { return "DmaCallback"; }
279 
287  DrainState
288  drain() override
289  {
291  }
292 
293  protected:
294  int count = 0;
295 
296  virtual ~DmaCallback() = default;
297 
301  virtual void process() = 0;
302 
303  private:
309  void
311  {
312  if (--count == 0) {
313  process();
314  // Need to notify DrainManager that this object is finished
315  // draining, even though it is immediately deleted.
316  signalDrainDone();
317  delete this;
318  }
319  }
320 
321  public:
322 
327  Event *
329  {
330  ++count;
331  return new EventFunctionWrapper([this]{ chunkComplete(); }, name(),
332  true);
333  }
334 };
335 
379 class DmaReadFifo : public Drainable, public Serializable
380 {
381  public:
382  DmaReadFifo(DmaPort &port, size_t size,
383  unsigned max_req_size,
384  unsigned max_pending,
386 
387  ~DmaReadFifo();
388 
389  public: // Serializable
390  void serialize(CheckpointOut &cp) const override;
391  void unserialize(CheckpointIn &cp) override;
392 
393  public: // Drainable
394  DrainState drain() override;
395 
396  public: // FIFO access
413  bool tryGet(uint8_t *dst, size_t len);
414 
415  template<typename T>
416  bool
417  tryGet(T &value)
418  {
419  return tryGet(static_cast<T *>(&value), sizeof(T));
420  };
421 
430  void get(uint8_t *dst, size_t len);
431 
432  template<typename T>
433  T
434  get()
435  {
436  T value;
437  get(static_cast<uint8_t *>(&value), sizeof(T));
438  return value;
439  };
440 
442  size_t size() const { return buffer.size(); }
444  void flush() { buffer.flush(); }
445 
447  public: // FIFO fill control
462  void startFill(Addr start, size_t size);
463 
472  void stopFill();
473 
478  bool atEndOfBlock() const { return nextAddr == endAddr; }
479 
484  bool
485  isActive() const
486  {
487  return !(pendingRequests.empty() && atEndOfBlock());
488  }
489 
491  protected: // Callbacks
503  virtual void onEndOfBlock() {};
504 
516  virtual void onIdle() {};
517 
519  private: // Configuration
521  const Addr maxReqSize;
523  const size_t fifoSize;
526 
528 
529  const int cacheLineSize;
530 
531  private:
532  class DmaDoneEvent : public Event
533  {
534  public:
535  DmaDoneEvent(DmaReadFifo *_parent, size_t max_size);
536 
537  void kill();
538  void cancel();
539  bool canceled() const { return _canceled; }
540  void reset(size_t size);
541  void process();
542 
543  bool done() const { return _done; }
544  size_t requestSize() const { return _requestSize; }
545  const uint8_t *data() const { return _data.data(); }
546  uint8_t *data() { return _data.data(); }
547 
548  private:
550  bool _done = false;
551  bool _canceled = false;
552  size_t _requestSize;
554  };
555 
556  typedef std::unique_ptr<DmaDoneEvent> DmaDoneEventUPtr;
557 
562  void dmaDone();
563 
565  void handlePending();
566 
568  void resumeFill();
569 
571  void resumeFillTiming();
572 
574  void resumeFillBypass();
575 
576  private: // Internal state
578 
581 
584 };
585 
586 } // namespace gem5
587 
588 #endif // __DEV_DMA_DEVICE_HH__
gem5::MipsISA::ce
Bitfield< 29, 28 > ce
Definition: pra_constants.hh:180
gem5::PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:245
gem5::VegaISA::s
Bitfield< 1 > s
Definition: pagetable.hh:64
gem5::DmaReadFifo::DmaDoneEvent::data
const uint8_t * data() const
Definition: dma_device.hh:545
gem5::DmaReadFifo::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dma_device.cc:467
gem5::DmaReadFifo::DmaDoneEvent::done
bool done() const
Definition: dma_device.hh:543
gem5::DmaPort::sendEvent
EventFunctionWrapper sendEvent
Event used to schedule a future sending from the transmit list.
Definition: dma_device.hh:171
io_device.hh
gem5::DmaPort::device
ClockedObject *const device
The device that owns this port.
Definition: dma_device.hh:157
gem5::Fifo< uint8_t >
gem5::DmaReadFifo::endAddr
Addr endAddr
Definition: dma_device.hh:580
gem5::AddrRangeMap
The AddrRangeMap uses an STL map to implement an interval tree for address decoding.
Definition: addr_range_map.hh:62
system.hh
gem5::DmaPort::DmaReqState::ssid
const uint32_t ssid
Definition: dma_device.hh:117
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::DmaCallback::name
virtual const std::string name() const
Definition: dma_device.hh:278
gem5::DmaReadFifo::tryGet
bool tryGet(uint8_t *dst, size_t len)
Try to read data from the FIFO.
Definition: dma_device.cc:475
gem5::PioDevice
This device is the base class which all devices senstive to an address range inherit from.
Definition: io_device.hh:102
gem5::DmaPort::DmaReqState::abortEvent
Event * abortEvent
Event to call on the device when this transaction is aborted.
Definition: dma_device.hh:89
gem5::DmaReadFifo::startFill
void startFill(Addr start, size_t size)
Start filling the FIFO.
Definition: dma_device.cc:493
gem5::Fifo::flush
void flush()
Definition: circlebuf.hh:225
gem5::DmaDevice::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: dma_device.cc:418
gem5::DmaPort::DmaReqState::DmaReqState
DmaReqState(Packet::Command _cmd, Addr addr, Addr chunk_sz, Addr tb, uint8_t *_data, Request::Flags _flags, RequestorID _id, uint32_t _sid, uint32_t _ssid, Event *ce, Tick _delay, Event *ae=nullptr)
Definition: dma_device.hh:122
gem5::DmaPort::DmaReqState::flags
const Request::Flags flags
The flags to use for requests.
Definition: dma_device.hh:110
gem5::DmaReadFifo::DmaDoneEvent::_requestSize
size_t _requestSize
Definition: dma_device.hh:552
gem5::DmaReadFifo::port
DmaPort & port
Definition: dma_device.hh:527
circlebuf.hh
gem5::DmaReadFifo::isActive
bool isActive() const
Is the DMA engine active (i.e., are there still in-flight accesses)?
Definition: dma_device.hh:485
gem5::DmaReadFifo
Buffered DMA engine helper class.
Definition: dma_device.hh:379
gem5::DmaReadFifo::onEndOfBlock
virtual void onEndOfBlock()
End of block callback.
Definition: dma_device.hh:503
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::DmaReadFifo::DmaDoneEvent::canceled
bool canceled() const
Definition: dma_device.hh:539
gem5::MipsISA::event
Bitfield< 10, 5 > event
Definition: pra_constants.hh:300
gem5::DmaPort::abortPending
void abortPending()
Definition: dma_device.cc:218
gem5::DmaPort::dmaAction
void dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, uint8_t *data, Tick delay, Request::Flags flag=0)
Definition: dma_device.cc:210
gem5::MemCmd::Command
Command
List of all commands associated with a packet.
Definition: packet.hh:84
gem5::DmaPort::DmaReqState::delay
const Tick delay
Amount to delay completion of dma by.
Definition: dma_device.hh:101
gem5::DmaPort::inRetry
PacketPtr inRetry
The packet (if any) waiting for a retry to send.
Definition: dma_device.hh:177
gem5::DmaReadFifo::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dma_device.cc:457
gem5::DmaDevice::dmaRead
void dmaRead(Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
Definition: dma_device.hh:243
std::vector< uint8_t >
gem5::Fifo::size
size_t size() const
Definition: circlebuf.hh:222
gem5::DmaReadFifo::cacheLineSize
const int cacheLineSize
Definition: dma_device.hh:529
backdoor.hh
gem5::DmaReadFifo::DmaDoneEvent::_canceled
bool _canceled
Definition: dma_device.hh:551
gem5::DmaPort::DmaReqState::gen
ChunkGenerator gen
Object to track what chunks of bytes to send at a time.
Definition: dma_device.hh:104
gem5::InvalidPortID
const PortID InvalidPortID
Definition: types.hh:246
gem5::DmaReadFifo::DmaDoneEvent::data
uint8_t * data()
Definition: dma_device.hh:546
gem5::DmaCallback::process
virtual void process()=0
Callback function invoked on completion of all chunks.
gem5::DmaPort::DmaReqState::id
const RequestorID id
The requestor ID to use for requests.
Definition: dma_device.hh:113
gem5::DmaCallback::~DmaCallback
virtual ~DmaCallback()=default
gem5::DmaCallback::drain
DrainState drain() override
DmaPort ensures that all oustanding DMA accesses have completed before it finishes draining.
Definition: dma_device.hh:288
gem5::DmaCallback::count
int count
Definition: dma_device.hh:294
gem5::DmaPort::DmaReqState::aborted
bool aborted
Whether this request was aborted.
Definition: dma_device.hh:92
gem5::System::cacheLineSize
unsigned int cacheLineSize() const
Get the cache line size of the system.
Definition: system.hh:308
gem5::DmaCallback::getChunkEvent
Event * getChunkEvent()
Request a chunk event.
Definition: dma_device.hh:328
gem5::RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:118
gem5::DmaPort::DmaReqState
Definition: dma_device.hh:82
gem5::DmaReadFifo::DmaDoneEvent::_data
std::vector< uint8_t > _data
Definition: dma_device.hh:553
gem5::ChunkGenerator
This class takes an arbitrary memory region (address/length pair) and generates a series of appropria...
Definition: chunk_generator.hh:59
gem5::DmaReadFifo::size
size_t size() const
Get the amount of data stored in the FIFO.
Definition: dma_device.hh:442
gem5::DmaPort::DmaReqState::totBytes
const Addr totBytes
Total number of bytes that this transaction involves.
Definition: dma_device.hh:95
gem5::DmaPort::pendingCount
uint32_t pendingCount
Number of outstanding packets the dma port has.
Definition: dma_device.hh:174
gem5::Serializable
Basic support for object serialization.
Definition: serialize.hh:169
gem5::DmaDevice::dmaPort
DmaPort dmaPort
Definition: dma_device.hh:221
gem5::Flags< FlagsType >
gem5::DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:74
gem5::DmaPort::DmaReqState::numBytes
Addr numBytes
Number of bytes that have been acked for this transaction.
Definition: dma_device.hh:98
gem5::DmaReadFifo::nextAddr
Addr nextAddr
Definition: dma_device.hh:579
gem5::DmaPort::dmaPending
bool dmaPending() const
Definition: dma_device.hh:213
gem5::DmaPort::transmitList
std::deque< DmaReqState * > transmitList
Use a deque as we never do any insertion or removal in the middle.
Definition: dma_device.hh:168
gem5::DmaReadFifo::DmaDoneEvent::DmaDoneEvent
DmaDoneEvent(DmaReadFifo *_parent, size_t max_size)
Definition: dma_device.cc:621
gem5::System
Definition: system.hh:74
gem5::DmaDevice::~DmaDevice
virtual ~DmaDevice()=default
gem5::DmaReadFifo::onIdle
virtual void onIdle()
Last response received callback.
Definition: dma_device.hh:516
gem5::DmaPort::cacheLineSize
const int cacheLineSize
Definition: dma_device.hh:190
gem5::DmaReadFifo::freeRequests
std::deque< DmaDoneEventUPtr > freeRequests
Definition: dma_device.hh:583
gem5::DmaReadFifo::tryGet
bool tryGet(T &value)
Definition: dma_device.hh:417
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
addr_range_map.hh
gem5::DmaDevice::dmaWrite
void dmaWrite(Addr addr, int size, Event *event, uint8_t *data, Tick delay=0)
Definition: dma_device.hh:237
gem5::Event
Definition: eventq.hh:254
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:294
gem5::DmaPort::sendDma
void sendDma()
For timing, attempt to send the first item on the transmit list, and if it is successful and there ar...
Definition: dma_device.cc:385
gem5::DmaDevice::dmaPending
bool dmaPending() const
Definition: dma_device.hh:256
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::DmaDevice::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: dma_device.cc:162
gem5::PioDevice::sys
System * sys
Definition: io_device.hh:105
gem5::DmaDevice::dmaRead
void dmaRead(Addr addr, int size, Event *event, uint8_t *data, Tick delay=0)
Definition: dma_device.hh:251
gem5::DmaReadFifo::DmaDoneEvent::cancel
void cancel()
Definition: dma_device.cc:634
gem5::MemCmd::ReadReq
@ ReadReq
Definition: packet.hh:87
gem5::DmaPort::memBackdoors
AddrRangeMap< MemBackdoorPtr, 1 > memBackdoors
Definition: dma_device.hh:64
gem5::DmaDevice
Definition: dma_device.hh:218
gem5::DmaPort::DmaReqState::cmd
const Packet::Command cmd
Command for the request.
Definition: dma_device.hh:120
len
uint16_t len
Definition: helpers.cc:62
gem5::DmaReadFifo::DmaDoneEvent::kill
void kill()
Definition: dma_device.cc:627
gem5::DmaReadFifo::resumeFill
void resumeFill()
Try to issue new DMA requests or bypass DMA requests.
Definition: dma_device.cc:516
gem5::DmaDevice::cacheBlockSize
unsigned int cacheBlockSize() const
Definition: dma_device.hh:260
gem5::DmaPort::DmaReqState::data
uint8_t *const data
Pointer to a buffer for the data.
Definition: dma_device.hh:107
gem5::DmaReadFifo::reqFlags
const Request::Flags reqFlags
Request flags.
Definition: dma_device.hh:525
gem5::DmaDevice::Params
DmaDeviceParams Params
Definition: dma_device.hh:224
gem5::DmaReadFifo::dmaDone
void dmaDone()
DMA request done, handle incoming data and issue new request.
Definition: dma_device.cc:583
gem5::DmaDevice::dmaWrite
void dmaWrite(Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
Definition: dma_device.hh:229
flags
uint8_t flags
Definition: helpers.cc:66
gem5::DmaPort::retryPending
bool retryPending
Whether the other side expects us to wait for a retry.
Definition: dma_device.hh:182
gem5::DrainState::Drained
@ Drained
Buffers drained, ready for serialization/handover.
gem5::DmaReadFifo::get
T get()
Definition: dma_device.hh:434
gem5::Packet::SenderState
A virtual base opaque structure used to hold state associated with the packet (e.g....
Definition: packet.hh:468
gem5::DmaReadFifo::stopFill
void stopFill()
Stop the DMA engine.
Definition: dma_device.cc:503
gem5::DmaReadFifo::DmaDoneEvent
Definition: dma_device.hh:532
gem5::DmaReadFifo::resumeFillTiming
void resumeFillTiming()
Try to issue new DMA requests during normal execution.
Definition: dma_device.cc:557
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::DmaPort::handleResp
void handleResp(DmaReqState *state, Addr addr, Addr size, Tick delay=0)
Definition: dma_device.cc:83
gem5::ClockedObject
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Definition: clocked_object.hh:234
gem5::DmaReadFifo::DmaDoneEvent::reset
void reset(size_t size)
Definition: dma_device.cc:640
gem5::DmaReadFifo::maxReqSize
const Addr maxReqSize
Maximum request size in bytes.
Definition: dma_device.hh:516
gem5::DmaReadFifo::fifoSize
const size_t fifoSize
Maximum FIFO size in bytes.
Definition: dma_device.hh:523
gem5::DmaReadFifo::atEndOfBlock
bool atEndOfBlock() const
Has the DMA engine sent out the last request for the active block?
Definition: dma_device.hh:478
gem5::DmaReadFifo::DmaDoneEvent::process
void process()
Definition: dma_device.cc:649
gem5::EventFunctionWrapper
Definition: eventq.hh:1136
gem5::Drainable::signalDrainDone
void signalDrainDone() const
Signal that an object is drained.
Definition: drain.hh:305
state
atomic_var_t state
Definition: helpers.cc:188
gem5::DmaPort::sendAtomicReq
bool sendAtomicReq(DmaReqState *state)
Send the next packet from a DMA request in atomic mode.
Definition: dma_device.cc:297
gem5::Port
Ports are used to interface objects to each other.
Definition: port.hh:61
gem5::DmaReadFifo::flush
void flush()
Flush the FIFO.
Definition: dma_device.hh:444
gem5::DmaPort::handleRespPacket
void handleRespPacket(PacketPtr pkt, Tick delay=0)
Handle a response packet by updating the corresponding DMA request state to reflect the bytes receive...
Definition: dma_device.cc:67
gem5::DmaPort::recvReqRetry
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Definition: dma_device.cc:181
gem5::MipsISA::tb
Bitfield< 27 > tb
Definition: dt_constants.hh:77
std::deque
STL deque class.
Definition: stl.hh:44
gem5::DmaPort::recvTimingResp
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
Definition: dma_device.cc:146
gem5::DmaPort::requestorId
const RequestorID requestorId
Id for all requests.
Definition: dma_device.hh:164
gem5::DmaPort::trySendTimingReq
void trySendTimingReq()
Take the first request on the transmit list and attempt to send a timing packet from it.
Definition: dma_device.cc:254
gem5::Drainable
Interface for objects that might require draining before checkpointing.
Definition: drain.hh:234
gem5::MemCmd::WriteReq
@ WriteReq
Definition: packet.hh:90
gem5::DmaDevice::DmaDevice
DmaDevice(const Params &p)
Definition: dma_device.cc:157
gem5::DmaPort::DmaReqState::createPacket
PacketPtr createPacket()
Definition: dma_device.cc:128
chunk_generator.hh
gem5::DmaReadFifo::buffer
Fifo< uint8_t > buffer
Definition: dma_device.hh:577
gem5::DmaCallback
DMA callback class.
Definition: dma_device.hh:275
gem5::DmaReadFifo::DmaDoneEventUPtr
std::unique_ptr< DmaDoneEvent > DmaDoneEventUPtr
Definition: dma_device.hh:556
gem5::DmaCallback::chunkComplete
void chunkComplete()
Called by DMA engine completion event on each chunk completion.
Definition: dma_device.hh:310
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::DmaPort
Definition: dma_device.hh:61
drain.hh
gem5::DmaPort::DmaPort
DmaPort(ClockedObject *dev, System *s, uint32_t sid=0, uint32_t ssid=0)
Definition: dma_device.cc:58
gem5::DmaReadFifo::DmaReadFifo
DmaReadFifo(DmaPort &port, size_t size, unsigned max_req_size, unsigned max_pending, Request::Flags flags=0)
Definition: dma_device.cc:426
gem5::RequestorID
uint16_t RequestorID
Definition: request.hh:95
gem5::DmaPort::defaultSSid
const uint32_t defaultSSid
Default substreamId.
Definition: dma_device.hh:188
gem5::DmaPort::sendAtomicBdReq
bool sendAtomicBdReq(DmaReqState *state)
Send the next packet from a DMA request in atomic mode, and request and/or use memory backdoors if po...
Definition: dma_device.cc:312
gem5::DmaPort::DmaReqState::completionEvent
Event * completionEvent
Event to call on the device when this transaction (all packets) complete.
Definition: dma_device.hh:86
gem5::DmaReadFifo::DmaDoneEvent::_done
bool _done
Definition: dma_device.hh:550
gem5::DmaPort::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: dma_device.cc:170
gem5::DmaPort::DmaReqState::sid
const uint32_t sid
Stream IDs.
Definition: dma_device.hh:116
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::DmaPort::sys
System *const sys
The system that device/port are in.
Definition: dma_device.hh:161
gem5::DmaReadFifo::pendingRequests
std::deque< DmaDoneEventUPtr > pendingRequests
Definition: dma_device.hh:582
gem5::DmaReadFifo::handlePending
void handlePending()
Handle pending requests that have been flagged as done.
Definition: dma_device.cc:595
gem5::DmaReadFifo::DmaDoneEvent::parent
DmaReadFifo * parent
Definition: dma_device.hh:549
gem5::DmaReadFifo::~DmaReadFifo
~DmaReadFifo()
Definition: dma_device.cc:440
gem5::DmaReadFifo::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: dma_device.cc:614
gem5::DrainState::Draining
@ Draining
Draining buffers pending serialization/handover.
gem5::DmaReadFifo::resumeFillBypass
void resumeFillBypass()
Try to bypass DMA requests in non-caching mode.
Definition: dma_device.cc:535
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84
gem5::DmaPort::defaultSid
const uint32_t defaultSid
Default streamId.
Definition: dma_device.hh:185
gem5::DmaReadFifo::DmaDoneEvent::requestSize
size_t requestSize() const
Definition: dma_device.hh:544

Generated on Sun Jul 30 2023 01:56:55 for gem5 by doxygen 1.8.17