Loop Rewind - Conditional Execution - 2022.2 English

Vitis HLS Messaging (UG1448)

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

Description

Warning: [200-954] Unable to perform loop rewinding: Function '%s' contains multiple loops.
This message is to inform the user that the code is violating loop rewind optimization rules

Explanation

Loop rewind optimization does not support conditional executions of a loop as shown in the below code.

func()
{
if(var)
{
  for(...)
  {
    #pragma HLS pipeline rewind
    ...
    }
}
}

Solution

Move the conditional statement either inside the loop or execute this function conditionally.