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:
- With the code open in the Code Editor, select the scope (function, loop or region) where the global variable is used in the Directive view.
- Right-click and use the Insert Directive command to open the Vitis HLS Directives Editor.
- Select and configure the required directive, and click OK to add it.
- Locate the added directive in the Directive view, and manually edit the
variable
name to assign it to the global variable.