Loop Rewind - Multiple Loops - 2020.1 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2020-06-03
Version
2020.1 English

Description

This message is to inform the user that the code is violating loop rewind optimization rules

Explanation

Loop rewind optimization requires the function to have at most a single loop. The below code shows the violation:

decoderInput_whileloop:while(1)
        {
    #pragma HLS PIPELINE II=1 rewind
            if(!inputStream.empty())
            {
                ...
            else
            {
                ...
                break;
            }
        }
        for(auto i=0;i<50;i++)
        {
            tempData.even = i*2;
            tempData.odd = i*2+1;
            pairedData.write(tempData);
        }

Solution

Loop Rewind optimization will only apply when there is a single loop inside teh function. Move the loops into each separate function to perform loop rewind optimization.