hls4ml.backends.vivado_accelerator package
Subpackages
Submodules
hls4ml.backends.vivado_accelerator.vivado_accelerator_backend module
- class hls4ml.backends.vivado_accelerator.vivado_accelerator_backend.VivadoAcceleratorBackend
Bases:
VivadoBackend
- build(model, reset=False, csim=True, synth=True, cosim=False, validation=False, export=False, vsynth=False, fifo_opt=False, bitfile=False)
- create_initial_config(board='pynq-z2', part=None, clock_period=5, clock_uncertainty='12.5%', io_type='io_parallel', interface='axi_stream', driver='python', input_type='float', output_type='float', platform='xilinx_u250_xdma_201830_2')
Create initial accelerator config with default parameters
- Parameters:
board – one of the keys defined in supported_boards.json
clock_period – clock period passed to hls project
io_type – io_parallel or io_stream
interface – axi_stream: generate hardware designs and drivers which exploit axi stream channels. axi_master: generate hardware designs and drivers which exploit axi master channels. axi_lite : generate hardware designs and drivers which exploit axi lite channels. (Don’t use it to exchange large amount of data)
driver – python: generates the python driver to use the accelerator in the PYNQ stack. c: generates the c driver to use the accelerator bare-metal.
input_type – the wrapper input precision. Can be float or an ap_type. Note: VivadoAcceleratorBackend will round the number of bits used to the next power-of-2 value.
output_type – the wrapper output precision. Can be float or an ap_type. Note: VivadoAcceleratorBackend will round the number of bits used to the next power-of-2 value.
platform – development target platform
- Returns:
populated config
- get_default_flow()
The name of the default flow of the backend.
Default flow is used as the conversion target if the target flow has not been specified.
- get_writer_flow()
- make_xclbin(model, platform='xilinx_u250_xdma_201830_2')
Create the xclbin for the given model and target platform.
- Parameters:
model (ModelGraph) – Compiled and build model.
platform (str, optional) – Development/Deployment target platform, must be installed first. The host machine only requires the deployment target platform. Refer to the Getting Started section of the Alveo guide. Defaults to ‘xilinx_u250_xdma_201830_2’.
hls4ml.backends.vivado_accelerator.vivado_accelerator_config module
- class hls4ml.backends.vivado_accelerator.vivado_accelerator_config.VivadoAcceleratorConfig(config, model_inputs, model_outputs)
Bases:
object
- get_board()
- get_board_info(board=None)
- get_clock_period()
- get_corrected_types()
- get_driver()
- get_driver_file()
- get_driver_path()
- get_input_type()
- get_interface()
- get_io_bitwidth()
- get_krnl_rtl_src_dir()
- get_output_type()
- get_part()
- get_platform()
- get_tcl_file_path()