3.6.3.6 SHLS-7

Message

Warning: (SHLS-7) Loop unrolling failed on {location}.
                  This loop nest is contained inside the loop '{loop}', which is specified to be pipelined.

When an outer loop is specified to be pipelined, SmartHLS will automatically attempt to unroll all inner loops. If this process fails, an SHLS-7 message will be generated to notify users of the loop unrolling failure.

/*****************************************************************
 *  This example is expected to result in
 *  - Code  : SHLS-7
 *  - Type  : Warning
 *  - Cause : Failed to unroll loop inside a loop that is
 *            specified to be pipelined.
 *****************************************************************/
int DUT(int A[100], int B[100], int nelem) {
    #pragma HLS function top
    int tmp = 0;

    #pragma HLS loop pipeline
    for (int i = 0; i < 100; i++) {
        for (int j = 0; j < nelem; j++) {
            tmp += A[j] + B[j];
        }
    }
    return tmp;
}

Related to: Loop Pipelining, Loop Unrolling, Pipeline Loop