gem5 v24.0.0.0
|
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. | |
Event * | getChunkEvent () |
Request a chunk event. | |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Attributes | |
T | dmaBuffer |
Private Member Functions | |
virtual void | process () override |
Callback function invoked on completion of all chunks. | |
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. | |
void | signalDrainDone () const |
Signal that an object is drained. | |
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 51 of file dma_virt_device.hh.
|
inline |
Definition at line 64 of file dma_virt_device.hh.
|
inlineoverrideprivatevirtual |
Callback function invoked on completion of all chunks.
Implements gem5::DmaCallback.
Definition at line 56 of file dma_virt_device.hh.
References gem5::DmaVirtDevice::DmaVirtCallback< T >::_function, and gem5::DmaVirtDevice::DmaVirtCallback< T >::dmaBuffer.
|
private |
Definition at line 53 of file dma_virt_device.hh.
Referenced by gem5::DmaVirtDevice::DmaVirtCallback< T >::process().
T gem5::DmaVirtDevice::DmaVirtCallback< T >::dmaBuffer |
Definition at line 62 of file dma_virt_device.hh.
Referenced by gem5::GPUCommandProcessor::initABI(), and gem5::DmaVirtDevice::DmaVirtCallback< T >::process().