10 #include <cynq/execution-graph.hpp>
13 #include "cynq/enums.hpp"
14 #include "cynq/memory.hpp"
15 #include "cynq/status.hpp"
19 struct HardwareParameters;
81 const size_t size,
const int memory_bank = 0,
82 const MemoryType type = MemoryType::Dual) = 0;
101 virtual Status Upload(
const std::shared_ptr<IMemory> mem,
const size_t size,
102 const size_t offset,
const ExecutionType exetype) = 0;
127 virtual Status Upload(std::shared_ptr<IExecutionGraph> graph,
128 const std::shared_ptr<IMemory> mem,
const size_t size,
129 const size_t offset,
const ExecutionType exetype);
147 const size_t offset,
const ExecutionType exetype) = 0;
173 const std::shared_ptr<IMemory> mem,
const size_t size,
174 const size_t offset,
const ExecutionType exetype);
198 virtual Status Sync(std::shared_ptr<IExecutionGraph> graph,
199 const SyncType type);
234 static std::shared_ptr<IDataMover>
Create(
236 std::shared_ptr<HardwareParameters> hwparams);
Interface for standardising the API of DataMover for a specific device: XRTDataMover.
Definition: datamover.hpp:40
Type
Type Type of runtime supported by the IDataMover.
Definition: datamover.hpp:53
@ XRT
Definition: datamover.hpp:59
@ DMA
Definition: datamover.hpp:57
@ None
Definition: datamover.hpp:55
virtual Status Upload(const std::shared_ptr< IMemory > mem, const size_t size, const size_t offset, const ExecutionType exetype)=0
Upload method This method moves the data from the host to the device using a DMA engine....
virtual std::shared_ptr< IMemory > GetBuffer(const size_t size, const int memory_bank=0, const MemoryType type=MemoryType::Dual)=0
GetBuffer method This method allocates a memory buffer. Depending on the MemoryType,...
static std::shared_ptr< IDataMover > Create(IDataMover::Type impl, const uint64_t addr, std::shared_ptr< HardwareParameters > hwparams)
Create method Factory method used for creating specific subclasses of IDataMover.
Definition: datamover.cpp:15
virtual Status Sync(const SyncType type)=0
Sync method Synchronizes data movements in case of asynchronous Upload/Download.
virtual DeviceStatus GetStatus()=0
GetStatus method Returns the status of the data mover in terms of transactions.
virtual ~IDataMover()=default
~IDataMover destructor method Destroy the IDataMover object.
virtual Status Download(const std::shared_ptr< IMemory > mem, const size_t size, const size_t offset, const ExecutionType exetype)=0
Download method.
Define an abstract representation of the data mover parameters with some prefilled fields.
Definition: datamover.hpp:25
std::shared_ptr< HardwareParameters > hw_params_
Definition: datamover.hpp:27
virtual ~DataMoverParameters()=default
Define an abstract representation of the hardware parameters with some prefilled fields.
Definition: hardware.hpp:26
Structure to define the return characteristics of each function.
Definition: status.hpp:19