3.6.3.26 SHLS-56

Message

Error:   (SHLS-56) Cannot determine the memory size for the top-level pointer argument '{argument}' in function '{function}'.
                   Please specify full array dimensions in the function argument or set the depth using the interface pragma: #pragma HLS interface argument.
/*****************************************************************
 *  This example is expected to result in
 *  - Code  : SHLS-56
 *  - Type  : Error
 *  - Cause : Unable to determine the memory size associated
 *            with a top-level pointer argument.
 *****************************************************************/
int DUT(int *array, int i) {
    #pragma HLS function top
    return array[i];
}

Suggested Solutions

// Solution 1
int DUT_sol1(int array[32], int i) {
    #pragma HLS function top
    return array[i];
}

// Solution 2
int DUT_sol2(int *array, int i) {
    #pragma HLS interface argument(array) type(memory) num_elements(32)
    #pragma HLS function top
    return array[i];
}

Related to: Pointer Argument and Shared Global Variable, Memory Interface for Pointer Argument/Global Variable