3.6.3.19 SHLS-35

Message

Error:   (SHLS-35) '{variable}' on {location} is a memory external to the dataflow (e.g. allocated in the external scope). SmartHLS does not allow more than 1 subfunction in the dataflow to access the memory.
/*****************************************************************
 *  This example is expected to result in
 *  - Code  : SHLS-35
 *  - Type  : Error
 *  - Cause : In the top-level function DUT(), external memory
 *            'in' is accessed by 2 subfunction calls that 
 *            will read from it.
 *****************************************************************/  
#define NELEM 10

void subf(int in[NELEM], int out[NELEM]) {
#pragma HLS loop pipeline
    for (int i = 0; i < NELEM; i++) {
        out[i] = in[i] + 1;
    }
}

void DUT(int in[NELEM], int out1[NELEM], int out2[NELEM]) {
#pragma HLS function top dataflow
     subf(in, out1);
     subf(in, out2);
}

Related to: Data Flow Parallelism