3.6.1.15 Memory Interface for Pointer Argument/Global Variable
(Ask a Question)- 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
Parameter Value Optional Default Description argument/variable
string No - Argument/Variable name type
memory
No - Interface type num_elements
integer Yes - 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) ... }