Unroll Infinite Loop

Description

This message reports that the code is violating loop unrolling optimization rules.

Explanation

Unroll optimization creates a set of parallel resources on the hardware for execution. If the loop is not bounded, then the tool does not know the number of resources to create. The example shown below fails loop optimization:

decoderInput_whileloop:while(1)
        {
    #pragma HLS unroll
            if(!inputStream.empty())
            {
                if(cnt==0)
                {
                     tempData.even = inputStream.read();
                     cnt =1;
                }
                else
                {
                    tempData.odd=inputStream.read();
                    pairedData.write(tempData);
                    cnt=0;
                }
            }
            else
            {
                break;
 
            }

Solution

To completely unroll the loop, consider making the loop finite.