Control Flow
Conditional control flow is supported by converting all if statements into a predicated format. If statements that consist of an assignment to a single variable in both the “if” and “else” portion are converted into a hardware boolean select that is implemented with a single multiplexor.
If statements that are arbitrarily complex, such as nested if statements or if statements that are unbalanced, are transformed into predicated statements. Certain assumptions may be made when converting this code as there may be control flow paths in the C that leave variables unassigned when converted into hardware. For these paths we default the value to 0.

System code allows a limited version of the for loop. The for loop must contain only one index, must have a positive step, and must have a less than comparison to an upper bound. Infinite loops are also supported as long as the comparison is a constant true (i == i). Multiple nested loops are supported and the upper bound may be constant or variable, but only the outermost loop can be an infinite loop.
| << Bit Width Specification | Tutorials Home | Intrinsic Usage and Management >> |