Loop Rewind - Initialization Section
Description
This message reports that the code is violating loop rewind optimization rules.
Explanation
Loop rewind optimization requires no code between the start of the function and the beginning of the loop. The following is an example of a failed optimization:
void decoderInput(hls::stream<mag_type> &inputStream, hls::stream<dataPair> &pairedData)
{
static count_type cnt;
mag_type val, val_next;
dataPair tempData;
int n=0;
decoderInput_whileloop:while(1)
{
#pragma HLS PIPELINE II=1 rewind
if(!inputStream.empty())
{
...
...
...
Solution
Non-trivial code should not exist in-between the function entry and the for loop. Move this code inside the loop.