Loop Unroll - Variable Trip Count - 2022.2 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2022-12-16
Version
2022.2 English

Description

Warning: [200-936] Cannot completely unroll a loop with a variable trip count.
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.