Loop Unroll - Variable Trip Count

Description

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

Explanation

If the tool could not estimate the loop bound, then it's not possible for the tool to generate the number of parallel ops. The following is an example that fails the optimization:

// var is from the input which goes till estimated 128
for(int i=0;i<var;i++)
{
#pragma HLS unroll
...
...
}

Solution

Calculate the loop bound and use it for the loop unrolling optimization.