Interface for standardising the API of Hardware Devices: More...
#include <hardware.hpp>
Public Types | |
enum | Type { None = 0 , XRT } |
Type Type of runtime supported by the IHardware. More... | |
Public Member Functions | |
virtual | ~IHardware ()=default |
~IHardware destructor method Destroy the IHardware object. | |
virtual Status | Reset ()=0 |
Reset method Sets the IHardware instance to its initial state. More... | |
virtual std::shared_ptr< IDataMover > | GetDataMover (const uint64_t address)=0 |
GetDataMover method Used for accessing the IDataMover instance of IHardware inheritors for decoupling the DataMovement separating the hardware logic from the data movement logic. More... | |
virtual std::shared_ptr< IAccelerator > | GetAccelerator (const uint64_t address)=0 |
GetAccelerator method IAccelerator instance of IAccelerator inheritors separating the hardware logic from the specific logic of the accelerator. More... | |
virtual std::shared_ptr< IAccelerator > | GetAccelerator (const std::string &kernelname)=0 |
GetAccelerator method IAccelerator instance of IAccelerator inheritors separating the hardware logic from the specific logic of the accelerator. More... | |
virtual std::shared_ptr< IExecutionGraph > | GetExecutionStream (const std::string &name, const IExecutionGraph::Type type=IExecutionGraph::Type::STREAM, const std::shared_ptr< ExecutionGraphParameters > params=nullptr) |
GetExecutionStream. More... | |
virtual std::vector< float > | GetClocks () noexcept |
Get clocks from the PL. More... | |
virtual Status | SetClocks (const std::vector< float > &clocks) |
Set clocks to the PL. More... | |
Static Public Member Functions | |
static std::shared_ptr< IHardware > | Create (const HardwareArchitecture hw, const std::string &bitstream, const std::string &xclbin) |
Create method Factory method to create a hardware-specific subclasses for accelerators and data movers. More... | |
static std::shared_ptr< IHardware > | Create (const HardwareArchitecture hw, const std::string &config) |
Create method Factory method to create a hardware-specific subclasses for accelerators and data movers. More... | |
Interface for standardising the API of Hardware Devices:
Type Type of runtime supported by the IHardware.
Enumerator | |
---|---|
None | No runtime |
XRT | Xilinx runtime |
|
static |
Create method Factory method to create a hardware-specific subclasses for accelerators and data movers.
hw | One of the values in the HardwareArchitecture enum class present in the enums.hpp file that should correspond to the device being used. |
bitstream | string that represents the name of the file with the bitstream. It is used for normal Vivado flow in ZYNQ boards. In Alveo, it is neglected. |
xclbin | string that represents the name of the xclbin file. Used for Vitis and Alveo workflows |
|
static |
Create method Factory method to create a hardware-specific subclasses for accelerators and data movers.
hw | One of the values in the HardwareArchitecture enum class present in the enums.hpp file that should correspond to the device being used. |
config | string that represents the name of the file with the bitstream in the case of Ultrascale or xclbin for Vitis and Alveo workflows |
|
pure virtual |
GetAccelerator method IAccelerator instance of IAccelerator inheritors separating the hardware logic from the specific logic of the accelerator.
kernelname | string that contains the kernel name to launch. It is used by the Vitis and Alveo workflows. It is not implemented in Vivado workflows |
Implemented in cynq::UltraScale, and cynq::Alveo.
|
pure virtual |
GetAccelerator method IAccelerator instance of IAccelerator inheritors separating the hardware logic from the specific logic of the accelerator.
address | a unsigned integer of 64 bits representing an address. In the case of ZYNQ boards, it corresponds to the base address of the accelerator BAR (Bank Address Register). In the case of Alveo boards, it is preferrable to use the GetAccelerator(const std::string &) overload. |
Implemented in cynq::UltraScale, and cynq::Alveo.
|
virtualnoexcept |
Get clocks from the PL.
This allows to check the current clocks from the PL in MHz. This method is optionally implementable. If it is not implemented, the number of elements of the vector is equal to zero.
Reimplemented in cynq::UltraScale.
|
pure virtual |
GetDataMover method Used for accessing the IDataMover instance of IHardware inheritors for decoupling the DataMovement separating the hardware logic from the data movement logic.
address | a unsigned integer of 64 bits representing an address. In the case of ZYNQ boards, it corresponds to the base address of the accelerator BAR (Bank Address Register). In the case of Alveo boards, it is unused. |
Implemented in cynq::UltraScale, and cynq::Alveo.
|
virtual |
GetExecutionStream.
This method is a factory method to obtain an execution stream compatible with the hardware implementation. By default, it returns a new execution stream similar to the CUDA Stream, which is a queue-based scheduler to manage synchronism.
name | name of the stream for debugging purposes |
type | implementation for the execution graph. By default, it is STREAM |
config | configurations of the execution graph. By default, it is empty. |
|
pure virtual |
Reset method Sets the IHardware instance to its initial state.
Implemented in cynq::UltraScale, and cynq::Alveo.
|
virtual |
Set clocks to the PL.
This allows to set the current clocks from the PL in MHz. This method is optionally implementable. If it is not implemented, no changes are performed.
The vector must contain a number of clocks equivalent to the supported by the platform. If a clock must remain untouched, set it to -1.f
Reimplemented in cynq::UltraScale.