11 #pragma GCC diagnostic push
12 #pragma GCC diagnostic ignored "-Wpedantic"
14 #include <xrt/xrt_device.h>
15 #pragma GCC diagnostic pop
18 #include <cynq/dma/datamover.hpp>
19 #include <cynq/enums.hpp>
20 #include <cynq/hardware.hpp>
21 #include <cynq/mmio/accelerator.hpp>
22 #include <cynq/status.hpp>
33 inline static constexpr
int max_clocks = 4;
37 std::array<bool, max_clocks>
pl_valid = {
false};
39 std::array<float, max_clocks>
src_freq = {0.f};
41 std::array<uint32_t, max_clocks>
pl_reg;
87 UltraScale(
const std::string &bitstream_file,
const std::string &xclbin_file);
115 std::shared_ptr<IDataMover>
GetDataMover(
const uint64_t address)
override;
127 const std::string &kernelname)
override;
141 std::shared_ptr<IAccelerator>
GetAccelerator(
const uint64_t address)
override;
168 std::vector<float>
GetClocks() noexcept override;
192 Status LoadBitstream(const std::
string &bitstream_file);
210 Status GetClocksInformation(const uint number_pl_clocks = 1);
229 Status LoadXclBin(const std::
string &xclbin_file, const
int device_idx = 0);
Interface for standardising the API of Hardware Devices:
Definition: hardware.hpp:39
UltraScale class Provides an interface to access IP Cores in Xilinx FPGAs, the compatible devices are...
Definition: hardware.hpp:73
std::shared_ptr< IAccelerator > GetAccelerator(const std::string &kernelname) override
GetAccelerator method (overload - not implemented) Do not use this method since it is not implemented...
Definition: hardware.cpp:409
Status KernelQuery()
Queries the kernels available in the design.
std::vector< float > GetClocks() noexcept override
Get clocks from the PL.
Definition: hardware.cpp:352
std::shared_ptr< IDataMover > GetDataMover(const uint64_t address) override
GetDataMover method Used for accessing the IDataMover instance of the UltraScale object.
Definition: hardware.cpp:400
Status DeviceQuery()
Queries the device looking for its characteristics.
virtual ~UltraScale()
~UltraScale destructor method Destroy the UltraScale object.
Definition: hardware.cpp:414
Status SetClocks(const std::vector< float > &clocks) override
Set clocks to the PL.
Definition: hardware.cpp:363
Status Reset() override
Reset method Sets the UltraScale instance to its initial state.
Definition: hardware.cpp:398
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
Contains the information about the registers used for the clocks.
Definition: hardware.hpp:32
std::array< float, max_clocks > src_freq
Definition: hardware.hpp:39
std::array< bool, max_clocks > pl_valid
Definition: hardware.hpp:37
std::array< uint32_t, max_clocks > src_reg
Definition: hardware.hpp:43
std::array< bool, max_clocks > pl_active
Definition: hardware.hpp:35
std::array< float, 4 > current_clocks_mhz
Definition: hardware.hpp:47
std::array< float, 4 > target_clocks_mhz
Definition: hardware.hpp:45
std::array< uint32_t, max_clocks > pl_reg
Definition: hardware.hpp:41
Specialisation of the parameters given by the UltraScale. It is based on the PYNQ and XRT.
Definition: hardware.hpp:54
xrt::device device_
Definition: hardware.hpp:56
virtual ~UltraScaleParameters()=default
UltraScaleClocks clocks_
Definition: hardware.hpp:60
xrt::xclbin xclbin_
Definition: hardware.hpp:58