syn.directive.alias - 2025.2 English - UG1702

Vitis Reference Guide (UG1702)

Document ID
UG1702
Release Date
2025-11-20
Version
2025.2 English

Description

Specifies that two or more M_AXI pointer arguments point to the same underlying buffer in memory (DDR or HBM). Indicates aliasing between the pointers by setting the distance or offset between them.

Important: syn.directive.alias applies to top-level function arguments mapped to M_AXI interfaces.

Vitis HLS considers different pointers to be independent channels and generally does not provide any dependency analysis. However, in cases where the host allocates a single buffer for multiple pointers, this relationship can be communicated through syn.directive.alias. Communicating this way maintains dependency analysis. Communicating through syn.directive.alias also enables data dependence analysis in Vitis HLS by defining the distance between pointers in the buffer.

Requirements for syn.directive.alias:

  • You must assign all ports to M_AXI interfaces and also assign them to different bundles. See example below for details.
  • You can only use each port one time in a syn.directive.alias command.
  • All ports assigned to syn.directive.alias must have the same depth.
  • Each port can have one offset if you specify the offset.
  • You must specify the offset for the M_AXI port as slave or direct. offset=off is not supported.

Syntax

syn.directive.alias=[OPTIONS] <location> <ports>
  • <location> is the location string in the format function[/label] that the ALIAS pragma applies to.
  • <ports> specifies the ports to alias.

Options

distance=<integer>
Specifies the difference between the pointer values passed to the ports in the list.
offset=<string>
Specifies the offset of the pointer passed to each port in the ports list with respect to the origin of the array.

Example

For the following function top:

void top(int *arr0, int *arr1, int *arr2, int *arr3, ...) {
  #pragma HLS interface M_AXI port=arr0 bundle=hbm0 depth=0x40000000
  #pragma HLS interface M_AXI port=arr1 bundle=hbm1 depth=0x40000000
  #pragma HLS interface M_AXI port=arr2 bundle=hbm2 depth=0x40000000
  #pragma HLS interface M_AXI port=arr3 bundle=hbm3 depth=0x40000000
The following command defines aliasing for the specified array pointers, and defines the distance between them:
syn.directive.alias=top arr0,arr1,arr2,arr3 distance=10000000
Alternatively, the following command specifies the offset between pointers, to accomplish the same effect:
syn.directive.alias=top arr0,arr1,arr2,arr3 offset=00000000,10000000,20000000,30000000