Vivado/Vitis
The Vivado and Vitis backends are intended for use with AMD/Xilinx FPGAs. The Vivado backend targets the discontinued Vivado HLS compiler, while
the Vitis backend targets the Vitis HLS compiler. Both are designed to produce IP for incorporation in Vivado designs. (See VivadoAccelerator
for generating easily-deployable models with Vivado HLS.) The Vitis accelerator flow is not directly supported, though HLS code produced with the Vitis
backend can be easily incorporated into a Vitis kernel.
Users should generally use the Vitis backend for new designs that target AMD/Xilinx FPGAs; new hls4ml developments will not necessarily be backported to
the Vivado backend.
Known issues
With
Vitis HLS2023.2, recurrent layers (SimpleRNN,LSTM,GRU) may not meet the target clock at the default clock uncertainty when they useio_streamand theLatencystrategy, or theResourcestrategy with a reuse factor of 1.Vitis HLS2024.1 is not affected. With 2023.2, raising the clock uncertainty to 35% (clock_uncertainty='35%') was enough for the models tested, at the cost of one to three extra clock cycles per time step.With
Vivado HLS2020.1,Conv1DTransposeandConv2DTransposelayers with theLatencystrategy may not meet the target clock at the default clock uncertainty. Raising the clock uncertainty to 27% (clock_uncertainty='27%') was enough for most of the models tested, though some layers required more. The same can happen withio_streamand theResourcestrategy at a small reuse factor.Vitis HLS2024.1 is not affected.With
Vitis HLS2024.1, theio_streamimplementation ofConv1DTransposeandConv2DTransposetakes one clock cycle more per input than the interval given in Transposed convolution in some layers where the first of its two processes is the slower one.The following are not supported with
Vitis HLS2025.1:Conv1DandConv2Dwithio_parallel: co-simulation does not finish when the model is a dataflow region, which is the default for models with convolutions.Densewithio_paralleland theResourcestrategy: C synthesis did not finish in six hours for most of the models tested, even small ones.Conv1DTransposeandConv2DTranspose.The
Fusedstrategy, whose interval is less predictable with this version (see Fused Strategy).
Fused strategy
The Vitis backend also provides Strategy: Fused, which computes a chain of Dense layers together so that consecutive layers run at the same
time. See Fused Strategy.
Vivado synthesis and place and route
build(vsynth=True) synthesizes the HLS design with Vivado, and build(pnr=True) also places and routes it. This works the same for the Vivado,
Vitis and VivadoAccelerator backends; for VivadoAccelerator the AXI wrapper <project_name>_axi is synthesized. The design is
synthesized alone, out of context, and only the clock is constrained. The slack therefore covers the paths between registers of the design, not the paths
from its input ports or to its output ports. After place and route, the slack includes the delay and skew of the clock from the first clock buffer site of
the device; another site changes it a little.