32#ifndef __DEV_DMA_VIRT_DEVICE_HH__
33#define __DEV_DMA_VIRT_DEVICE_HH__
65 T dma_buffer_value = 0)
Wraps a std::function object in a DmaCallback.
std::function< void(const T &)> _function
DmaVirtCallback(const std::function< void(const T &)> &function, T dma_buffer_value=0)
virtual void process() override
Callback function invoked on completion of all chunks.
void(DmaDevice::* DmaFnPtr)(Addr, int, Event *, uint8_t *, Tick)
void dmaReadVirt(Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
Initiate a DMA read from virtual address host_addr.
void dmaVirt(DmaFnPtr dmaFn, Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
Initiate a call to DmaDevice using DmaFnPtr do a DMA starting from virtual address host_addr for size...
virtual TranslationGenPtr translate(Addr vaddr, Addr size)=0
Function used to translate a range of addresses from virtual to physical addresses.
DmaVirtDevice(const Params &p)
void dmaWriteVirt(Addr host_addr, unsigned size, DmaCallback *b, void *data, Tick delay=0)
Initiate a DMA write from virtual address host_addr.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
std::unique_ptr< TranslationGen > TranslationGenPtr