HLS General Options - HLS General Options - 2026.1 English - UG1702

Vitis Reference Guide (UG1702)

Document ID
UG1702
Release Date
2026-06-23
Version
2026.1 English
Important: The following options must appear in the HLS configuration file under the [hls] header.
clock

Specifies the clock period in ns or MHz (ns is default). If you don't provide a period, the system uses a default period of 10 ns.

clock=8ns
Important: If your HLS configuration file uses platform= instead of part= then you must also specify freqhz= instead of clock= as shown here to change the default clock frequency of the platform.
clock_uncertainty

Specifies the clock period as a margin of uncertainty by HLS. The system subtracts the margin of uncertainty from the clock period to create an effective clock period. The clock uncertainty is in units of ns, or as a percentage of the clock period. The clock uncertainty defaults to 27% of the clock period.

When you specify a value, use ns by default, or specify % or MHz.

clock_uncertainty=15%
relative_roots

Specifies an ordered list of one or more absolute paths. Searches the list to resolve relative source file paths and CFLAGS include paths, similar to the PATH environment variable.

Use the list’s first entry as the root for any relative output file paths.

Ensure each relative_roots entry is an absolute path or starts with one of the special prefixes:

  • file: directory that contains the config file where the relative_root is specified
  • cwd: current working directory of the v++/vitis-run process

The list of relative_roots can be specified via multiple entries in a config file. Each successive value appends to the list of entries. Within each entry, specify multiple paths separated by semicolons.

Strip whitespace before and after the semicolon.

[hls]
relative_roots=/tmp/aaa ; /tmp/bbb ; file/../ccc ; cwd
syn.file=top.cpp
Note: If you specify relative_roots on the v++/vitis-run command, the tool ignores them and issues a warning message.

C-Synthesis Sources

syn.cflags
Defines compilation flags applying to all syn.file defined source files for use during synthesis.
syn.cflags=-I../../src/
syn.csimflags

Defines compilation flags to be applied to all syn.file source files for use during C-simulation or RTL/Co-simulation.

syn.file

Specifies the file path and name of a source file to be used during synthesis of the HLS component. Multiple files require multiple syn.file statements.

Specify the file paths as either absolute or relative. Relative paths are relative to the location of the config file, whether inside the HLS component or outside the component.
syn.file=../../src/dct.cpp
syn.file_cflags
Applies a compilation flag for synthesis to the specified source file. Specify the file path and name first, followed by a comma, followed by the cflags:
syn.file_cflags=../../src/dct.cpp,-I../../src/
syn.file_csimflags
Applies a compilation flag for simulation to the specified source file. Specify the file path and name first, followed by a comma, followed by the csimflags.
syn.file_csimflags=../../src/dct.cpp,-Wno-unknown-pragmas
syn.blackbox.file
Specifies the JSON file for an RTL blackbox. The HLS compiler uses this file during synthesis and when running RTL/Co-simulation.
syn.blackbox.file=../../RTL/fft.json
syn.top
Specifies the name of the function synthesized as the top-level function for the HLS component. Helps identify the top function in source code that defines multiple functions.
syn.top=dct
Important: Functions that the top-level function calls also become part of the HLS component.

Test Bench Sources

tb.cflags arg
Defines compilation flags for all source files defined in tb.file for simulation or co-simulation.
tb.cflags=-Wno-unknown-pragmas
tb.file arg

Specifies the file path and name of a test bench source file for HLS component simulation or co-simulation. Multiple files require multiple tb.file statements.

The file paths can be either absolute or relative. Relative paths are relative to the location of the config file, whether inside the HLS component or outside the component.
tb.file=../../src/dct_test.cpp
tb.file_cflags arg
Applies a compilation flag for simulation or co-simulation to the specified test bench source file. Specify the file path and name first, followed by a comma, followed by the cflags:
syn.file_cflags=../../src/dct.cpp,-Wno-unknown-pragmas