3.6.1.3 Unroll Loop

Syntax
#pragma HLS loop unroll factor(<int>)
Description
Specifies a loop to be unrolled. The factor indicates how many times to unroll the loop. If it is not specified, or specified as N (the total number of loop iterations), the loop will be fully unrolled. If it is specified as 2, the loop will be unrolled 2 times, where the number of loop iterations will be halved and the loop body will be replicated twice. If it is specified as 1, the loop will NOT be unrolled.
Parameters
ParameterValueOptionalDefaultDescription
factorIntegerYesN (fully unroll)Unroll count
Position
Before the beginning of the loop. If there is a loop label, the pragma should be placed after the label.
Examples
#pragma HLS loop unroll factor(1)
for (int i = 0; i < 10; i++) {
  ...
}