CYNQ  0.3.0
Framework to develop FPGA applications in C++ with the easiness of PYNQ
cynq::Alveo Class Reference

Alveo class Provides an interface to access IP Cores in Xilinx FPGAs, the compatible devices are the Xilinx Alveo. More...

#include <hardware.hpp>

Inheritance diagram for cynq::Alveo:
Collaboration diagram for cynq::Alveo:

Public Member Functions

 Alveo (const std::string &bitstream_file, const std::string &xclbin_file)
 Construct a new Alveo object. More...
 
 Alveo ()=delete
 
virtual ~Alveo ()
 Alveo destructor method Destroy the Alveo object.
 
Status Reset () override
 Reset method Sets the Alveo instance to its initial state. More...
 
std::shared_ptr< IDataMoverGetDataMover (const uint64_t address) override
 GetDataMover method Used for accessing the IDataMover instance of the Alveo object. It allocates buffers into an specific memory bank inside of the Alveo card. More...
 
std::shared_ptr< IAcceleratorGetAccelerator (const std::string &kernelname) override
 GetAccelerator method. More...
 
std::shared_ptr< IAcceleratorGetAccelerator (const uint64_t address) override
 GetAccelerator method (overload - not implemented) More...
 
- Public Member Functions inherited from cynq::IHardware
virtual ~IHardware ()=default
 ~IHardware destructor method Destroy the IHardware object.
 
virtual std::shared_ptr< IExecutionGraphGetExecutionStream (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...
 

Additional Inherited Members

- Public Types inherited from cynq::IHardware
enum  Type { None = 0 , XRT }
 Type Type of runtime supported by the IHardware. More...
 
- Static Public Member Functions inherited from cynq::IHardware
static std::shared_ptr< IHardwareCreate (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< IHardwareCreate (const HardwareArchitecture hw, const std::string &config)
 Create method Factory method to create a hardware-specific subclasses for accelerators and data movers. More...
 

Detailed Description

Alveo class Provides an interface to access IP Cores in Xilinx FPGAs, the compatible devices are the Xilinx Alveo.

This class does not have support for bitstream

Constructor & Destructor Documentation

◆ Alveo() [1/2]

cynq::Alveo::Alveo ( const std::string &  bitstream_file,
const std::string &  xclbin_file 
)

Construct a new Alveo object.

Configure the FPGA with an xclbin object. The bitstream is unused and this only takes into account the xclbin file.

As future work, the XCLBIN will be embedded into the binary to avoid reading it from an external file.

Parameters
bitstream_file"unused"
xclbin_filefull path to the xclbin object.

◆ Alveo() [2/2]

cynq::Alveo::Alveo ( )
delete

No default constructor required

Member Function Documentation

◆ GetAccelerator() [1/2]

std::shared_ptr< IAccelerator > cynq::Alveo::GetAccelerator ( const std::string &  kernelname)
overridevirtual

GetAccelerator method.

Finds and wraps the XRT Kernel into an IAccelerator object to make the API uniform across platforms. There are still differences between the Alveo cards and Ultrascale that will be addressed in the future.

Parameters
kernelnamekernel name for XRT kernel
Returns
std::shared_ptr<IAccelerator> nullptr

Implements cynq::IHardware.

◆ GetAccelerator() [2/2]

std::shared_ptr< IAccelerator > cynq::Alveo::GetAccelerator ( const uint64_t  address)
overridevirtual

GetAccelerator method (overload - not implemented)

Do not use this method since it is not implemented and it will lead to a nullptr

Parameters
addressa unsigned integer of 64 bits representing an address.
Returns
std::shared_ptr<IAccelerator> nullptr

Implements cynq::IHardware.

◆ GetDataMover()

std::shared_ptr< IDataMover > cynq::Alveo::GetDataMover ( const uint64_t  address)
overridevirtual

GetDataMover method Used for accessing the IDataMover instance of the Alveo object. It allocates buffers into an specific memory bank inside of the Alveo card.

Parameters
addressit is the memory bank id. You can get the memory bank by querying the cynq::IAccelerator::GetMemoryBank.
Returns
std::shared_ptr<IDataMover> Returns an IDataMover pointer with reference counting. It is not MT-safe.

Implements cynq::IHardware.

◆ Reset()

Status cynq::Alveo::Reset ( )
overridevirtual

Reset method Sets the Alveo instance to its initial state.

Returns
Status

Implements cynq::IHardware.


The documentation for this class was generated from the following files: