Optimization Directives

Directives, or the set_directive_* commands, can be specified as Tcl commands that are associated with a specific solution, or set of solutions. Allowing you to customize the synthesis results for the same source code across different solutions. This lets you preserve the original code while engaging in what-if analysis of the design.

Directives must be run in the interactive mode, vitis_hls -i, or can be run as a script using the -f option as described in vitis_hls Command.

Pragmas are directives that you can apply in the source code, rather than as a Tcl script, and so change the synthesis results for all implementations of your code. There are HLS pragmas for every set_directive command, so you can choose how you want to work with your Vitis HLS project. Refer to HLS Pragmas for information on the different pragmas.

Directives and pragmas are also available through the Vitis HLS GUI for assignment to specific elements of your source code, as described in Optimizing the HLS Project.

TIP: When running the commands through the GUI, the Tcl commands are added to a script of your project written to solution/constraints/script.tcl.