Intel® High Level Synthesis Compiler Standard Edition: Reference Manual

ID 683310
Date 12/18/2019
Public
Document Table of Contents

6.5. Loop Unrolling (unroll Pragma)

The Intel® HLS Compiler supports the unroll pragma for unrolling multiple copies of a loop.

Example code:

1  #pragma unroll <N>
2  for (int i = 0; i < M; ++i) {
3      // Some useful work
4  }

In this example, N specifies the unroll factor, that is, the number of copies of the loop that the HLS compiler generates. If you do not specify an unroll factor, the HLS compiler unrolls the loop fully. You can find the unroll status of each loop in the high level design report (report.html).