|
gem5
v21.1.0.2
|
Wraps a std::function object in a DmaCallback. More...
#include <dma_virt_device.hh>
Public Member Functions | |
| DmaVirtCallback (const std::function< void(const T &)> &function, T dma_buffer_value=0) | |
Public Member Functions inherited from gem5::DmaCallback | |
| 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 gem5::Drainable | |
| DrainState | drainState () const |
| Return the current drain state of an object. More... | |
| virtual void | notifyFork () |
| Notify a child process of a fork. More... | |
Public Attributes | |
| T | dmaBuffer |
Private Member Functions | |
| virtual void | process () override |
| Callback function invoked on completion of all chunks. More... | |
Private Attributes | |
| std::function< void(const T &)> | _function |
Additional Inherited Members | |
Protected Member Functions inherited from gem5::DmaCallback | |
| virtual | ~DmaCallback ()=default |
Protected Member Functions inherited from gem5::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 inherited from gem5::DmaCallback | |
| int | count = 0 |
Wraps a std::function object in a DmaCallback.
Much cleaner than defining a bunch of callback objects for each desired behavior when a DMA completes. Contains a built in templated buffer that can be used for DMA temporary storage.
Definition at line 55 of file dma_virt_device.hh.
|
inline |
Definition at line 68 of file dma_virt_device.hh.
|
inlineoverrideprivatevirtual |
Callback function invoked on completion of all chunks.
Implements gem5::DmaCallback.
Definition at line 60 of file dma_virt_device.hh.
References gem5::DmaVirtDevice::DmaVirtCallback< T >::_function, and gem5::DmaVirtDevice::DmaVirtCallback< T >::dmaBuffer.
|
private |
Definition at line 57 of file dma_virt_device.hh.
Referenced by gem5::DmaVirtDevice::DmaVirtCallback< T >::process().
| T gem5::DmaVirtDevice::DmaVirtCallback< T >::dmaBuffer |
Definition at line 66 of file dma_virt_device.hh.
Referenced by gem5::GPUCommandProcessor::initABI(), and gem5::DmaVirtDevice::DmaVirtCallback< T >::process().