How to Generate a Vitis HLS IP Core
Goal: Build an HLS IP core from C/C++ sources and export it for use in a Vivado project.
Note
Two HLS backends are available. Use the Legacy Vitis HLS backend
(system_vitis_hls.mk) if your project calls the vitis_hls binary (Vivado
2020.x and earlier workflows). Use the Vitis Unified HLS backend
(system_vitis_unified_hls.mk) if your project uses the vitis binary
(Vivado 2022.x and later unified toolchain).
Legacy Vitis HLS
Prerequisites
vitis_hlsbinary on PATHA
sources.tclfile at$(PROJ_DIR)/sources.tcldefining HLS source filesMakefile includes
system_vitis_hls.mk
Makefile include line:
include $(TOP_DIR)/submodules/ruckus/system_vitis_hls.mk
Steps
Create the project and set up sources:
make sourcesRun the full HLS build (includes C-simulation by default):
make buildTo skip C-simulation for faster iteration:
SKIP_CSIM=1 make build
To skip co-simulation as well:
SKIP_CSIM=1 SKIP_COSIM=1 make build
Open the Vitis HLS GUI to inspect results:
make gui
Output: IP core placed in $(PROJ_DIR)/ip/
Available Targets
Target |
Action |
|---|---|
|
Create project and run source setup (skips C-sim: |
|
Full HLS build including C-simulation (unless |
|
Open |
|
Open Vitis HLS GUI ( |
|
Delete the build directory |
Key Variables
Variable |
Default |
Description |
|---|---|---|
|
|
Set to |
|
|
Set to |
|
|
DCP generation skipped by default; set to |
|
|
Output HDL: |
|
|
Co-simulation tool: |
|
|
Set to |
|
|
IP vendor name in |
|
|
IP version string. |
See the Makefile Reference for additional variable details.
Vitis Unified HLS
Prerequisites
vitisbinary on PATH (Vivado 2022.x or later unified toolchain)An
hls_config.cfgfile at$(PROJ_DIR)/hls_config.cfgMakefile includes
system_vitis_unified_hls.mk
Makefile include line:
include $(TOP_DIR)/submodules/ruckus/system_vitis_unified_hls.mk
Steps
Create the project:
make projRun the full build:
make buildIf
vivado.syn_dcp=1is set inhls_config.cfg, the build also generates and renames a DCP file automatically.Run C-simulation only (faster iteration):
make csimOpen the Vitis IDE to inspect results:
make gui
Available Targets
Target |
Action |
|---|---|
|
Create the project ( |
|
Full build; if |
|
C-simulation only ( |
|
Open |
|
Open Vitis IDE ( |
|
Delete the build directory |
Key Variables
Variable |
Default |
Description |
|---|---|---|
|
|
Set to |
|
|
Set to |
|
|
All Xilinx FPGA families targeted by default (differs from legacy default of |
|
|
Build output directory (project-scoped; differs from legacy). |
Note
OUT_DIR in the Unified backend defaults to $(PROJ_DIR)/build — the output
is scoped to each project directory. In the legacy backend, the output directory is
within $(TOP_DIR)/build at the repository root. Keep this in mind when looking
for generated artifacts.
Troubleshooting
- “vitis_hls: command not found”
Source your Vivado or Vitis settings script:
source /path/to/Vivado/settings64.sh # or for the unified toolchain: source /path/to/Vitis/settings64.sh
- “vitis: command not found”
The Unified backend requires the Vitis unified toolchain (2022.x or later). Source the Vitis settings script and verify with:
vitis --version- C-simulation fails with compilation errors
Set
CFLAGSfor additional compiler flags:CFLAGS="-I/path/to/include" make build
- DCP not generated by legacy backend
SKIP_DCPdefaults to1. Enable DCP output with:SKIP_DCP=0 make build