Applying Optimization Directives to Class Objects - 2023.2 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
UG1399
Release Date
2023-12-18
Version
2023.2 English

Optimization directives can be also applied to objects or scopes defined in a class. The difference is typically that classes are defined in a header file. Use one of the following actions to open the header file:

  1. From the Vitis Component Explorer view open the Includes folder for an HLS component and double-click the header file to open it. Or, from within an open source code file, place the cursor over the #include statement for the header file, hold down the Ctrl key, and click the header file to open it in the Code Editor.
  2. With the source code, open the HLS Directive editor
  3. Select the scope (function, loop or region) where the global variable is used in the Directive editor.
  4. Select Add Directive and edit the variable name to assign it to the class or variable.
  5. Click OK to add the directive to the source code or config file.
CAUTION:
Care should be taken when applying directives as pragmas to a header file. The file might be used by other people or used in other projects. Any directives added as a pragma are applied each time the header file is included in a design.