FindVivado and FindVitis
SLASH provides two CMake find modules for locating AMD Vivado and Vitis HLS
installations. FindVivado is used internally by SlashTools.cmake.
Both modules can also be included directly.
FindVivado
Locates an AMD Vivado installation for FPGA synthesis and implementation.
Search Order
VIVADO_ROOT_DIRCMake variable.XILINX_VIVADOenvironment variable.System
PATH(searches forvivadoinbin/subdirectories).
Variables Set
Variable |
Description |
|---|---|
|
|
|
Root directory of the Vivado installation. |
|
Full path to the |
|
Path to the |
Usage
FindVivado is included automatically by SlashTools.cmake — no
manual include() is needed in most projects.
Source the Vivado environment before running CMake so that vivado is on
PATH:
source <path-to-vivado>/settings64.sh
For csh/tcsh shells, use settings64.csh instead. SLASH has been
built and tested against Vivado 2025.1; using other versions may cause
breakage.
Error Behaviour
FindVivado issues a FATAL_ERROR if the vivado binary cannot be
found.
FindVitis
Locates an AMD Vitis HLS installation for kernel compilation.
Search Order
VITIS_ROOT_DIRCMake variable.XILINX_VITISenvironment variable.VITIS_HOMEenvironment variable.VITISenvironment variable.System
PATH(searches forvitisinbin/subdirectories).
Variables Set
Variable |
Description |
|---|---|
|
|
|
Full path to the |
|
Root directory of the Vitis installation. |
|
Path to the Vitis include directory (e.g. for |
Usage
FindVitis can be included manually if your project needs the Vitis root
or include directories. BuildHLS.cmake locates the v++ and
vitis-run executables directly and does not require this module.
Source the Vitis HLS environment before running CMake so that vitis is
on PATH:
source <path-to-vitis-hls>/settings64.sh
For csh/tcsh shells, use settings64.csh instead. SLASH has been
built and tested against Vitis HLS 2025.1; using other versions may
cause breakage.
Error Behaviour
FindVitis issues a FATAL_ERROR if:
The
vitisbinary cannot be found.The include directory (
${VITIS_ROOT_DIR}/include) does not exist.