Vitis™ HLS can be run from the GUI, as previously discussed, interactively from the command line, or in batch mode from a Tcl script. This section discusses running the tool interactively, or in batch mode.
Running Vitis HLS Interactively
You can launch Vitis HLS using the
-i option to open the tool in interactive mode.
$ vitis_hls -i
help command to get
a list of commands that you can use in this mode, as described in Vitis HLS Command Reference.
Help for any individual command is provided by using the command name
as an option to the
help command. For example, help for the
add_files command can be returned with:
vitis_hls> help add_files
Vitis HLS also supports an auto-complete feature by pressing the tab key at any point when entering commands. The tool displays the possible matches based on typed characters to complete the command, or command option. Entering more characters improves the filtering of the possible matches.
quit command to quit Vitis HLS.
ls command and the DOS
dir command is used to list the contents of a
directory. Linux paths in a Makefile expand into minGW paths. Therefore, in all
Makefile files you must put the path name in quotes to prevent any path
substitutions, for example
FOO := ":/".
Running Vitis HLS in Batch Mode
vitis_hls -f tcl_script.tcl
Commands embedded in the specified Tcl script are executed in the
specified sequence. If the Tcl script includes the
quit command, then the tool
exits at that point, completing the batch process. If the Tcl script does not end
exit command, Vitis HLS returns to the command prompt, letting you continue
in interactive mode.
solution/script.tcl file within the
project. You can use this script as a starting point for developing your own batch
scripts. An example script is provided
add_files -tb ../dct_src/out.golden.dat -cflags "-Wno-unknown-pragmas" -csimflags "-Wno-unknown-pragmas"
add_files -tb ../dct_src/in.dat -cflags "-Wno-unknown-pragmas" -csimflags "-Wno-unknown-pragmas"
add_files -tb ../dct_src/dct_test.cpp -cflags "-Wno-unknown-pragmas" -csimflags "-Wno-unknown-pragmas"
open_solution "solution1" -flow_target vitis
create_clock -period 10 -name default
export_design -format ip_catalog
When opening a legacy
Vitis™ HLS project in Vitis HLS, you must specify the
-upgradewill perform conversion of a Vivado HLS project to a Vitis HLS project.
-resetwill restore the project to its initial state.
open_project command will return an error when
opening a Vitis HLS project unless the
-reset option is