HLS Optimization Directives - 2024.1 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
Release Date
2024.1 English
Important: The following options must appear in the HLS configuration file under the [hls] header.

Directives, or the syn.directive.xxx commands allow you to customize the synthesis results for the same source code across multiple implementations. Change the directives to change the results. The syn.directive.xxx commands are intended for use in the config files associated with the new Vitis IDE as described in Building and Running an HLS Component in the Vitis High-Level Synthesis User Guide (UG1399).

Note: You can also use pragmas in your source code, rather than directives in your config file. This will have the same result, but also have the added advantage of being stored directly in your source code. Refer to the HLS Pragmas section of the Vitis High-Level Synthesis User Guide (UG1399) for more information.

Directives applied through a configuration file must include a <location> as an argument to the directive. The <location> defines what element of the source code the directive applies to, such as function, loop, region, or variable.

The example syntax for syn.directive.xxx commands include the location and the arguments for the directive. For example:
syn.directive.pipeline=dct2d II=4

Where dct2d is the location (function name) to apply the PIPELINE directive to, and II=4 is one of the possible arguments to the directive.