Applying Optimization Directives to Global Variables - 2023.2 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
Release Date
2023.2 English

Directives can only be applied to scopes, or to objects within a scope. As such, they cannot be directly applied to global variables which are declared outside the scope of any function. Therefore, to apply a directive to a global variable you must manually assign it using the following process:

  1. With the source code, open the HLS Directive editor
  2. Select the scope (function, loop or region) where the global variable is used in the Directive editor.
  3. Select Add Directive and edit the variable name to assign it to the global variable.
  4. Click OK to add the directive to the source code or config file.