3.6.1.15 Memory Interface for Pointer Argument/Global Variable

Syntax
#pragma HLS interface argument(<arg_name>) type(memory) num_elements(<int>)
#pragma HLS interface variable(<var_name>) type(memory) num_elements(<int>)
Description
This pragma specifies the memory interface type for a pointer (including array, struct, class types) argument or shared global variable. For more details, see the Memory Interface section. This pragma is ignored if the enclosing function is not specified as the top-level.
Parameters
ParameterValueOptionalDefaultDescription
argument/variablestringNo-Argument/Variable name
typememoryNo-Interface type
num_elementsintegerYes-Specifies the number of elements of the argument array. Can override the array size in the argument.
Position

Argument - At the beginning of the function definition block.

Variable - Before the global variable declaration.

Examples
#pragma HLS interface variable(c) type(memory) num_elements(100)
int c[100];

int fun(int a[], int b[]) {
#pragma HLS function top
#pragma HLS interface argument(a) type(memory) num_elements(100)
#pragma HLS interface argument(b) type(memory)
  ...
}