Unroll Infinite Loop - 2022.1 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2022-06-22
Version
2022.1 English

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.