gem5
|
DMA callback class. More...
#include <dma_device.hh>
Classes | |
class | DmaChunkEvent |
Event invoked by DmaDevice on completion of each chunk. More... | |
Public Member Functions | |
virtual const std::string | name () const |
DrainState | drain () override |
DmaPort ensures that all oustanding DMA accesses have completed before it finishes draining. More... | |
Event * | getChunkEvent () |
Request a chunk event. More... | |
Public Member Functions inherited from Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
Protected Member Functions | |
DmaCallback () | |
virtual | ~DmaCallback () |
virtual void | process ()=0 |
Callback function invoked on completion of all chunks. More... | |
Protected Member Functions inherited from Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. More... | |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
Protected Attributes | |
int | count |
Private Member Functions | |
void | chunkComplete () |
Called by DMA engine completion event on each chunk completion. More... | |
DMA callback class.
Allows one to register for a callback event after a sequence of (potentially non-contiguous) DMA transfers on a DmaPort completes. Derived classes must implement the process() method and use getChunkEvent() to allocate a callback event for each participating DMA.
Definition at line 195 of file dma_device.hh.
|
inlineprotected |
Definition at line 215 of file dma_device.hh.
|
inlineprotectedvirtual |
Definition at line 219 of file dma_device.hh.
|
inlineprivate |
Called by DMA engine completion event on each chunk completion.
Since the object may delete itself here, callers should not use the object pointer after calling this function.
Definition at line 232 of file dma_device.hh.
References count, process(), and Drainable::signalDrainDone().
Referenced by DmaCallback::DmaChunkEvent::process().
|
inlineoverridevirtual |
DmaPort ensures that all oustanding DMA accesses have completed before it finishes draining.
However, DmaChunkEvents scheduled with a delay might still be sitting on the event queue. Therefore, draining is not complete until count is 0, which ensures that all outstanding DmaChunkEvents associated with this DmaCallback have fired.
Implements Drainable.
Definition at line 207 of file dma_device.hh.
|
inline |
Request a chunk event.
Chunks events should be provided to each DMA request that wishes to participate in this DmaCallback.
Definition at line 265 of file dma_device.hh.
References count.
|
inlinevirtual |
Definition at line 198 of file dma_device.hh.
|
protectedpure virtual |
Callback function invoked on completion of all chunks.
Referenced by chunkComplete().
|
protected |
Definition at line 213 of file dma_device.hh.
Referenced by chunkComplete(), drain(), and getChunkEvent().