set_directive_pipeline

Description

Reduces the initiation interval (II) for a function or loop by allowing the concurrent execution of operations. The default type of pipeline is defined by the config_compile -pipeline_style command, but can be overridden in the PIPELINE pragma or directive.

A pipelined function or loop can process new inputs every N clock cycles, where N is the initiation interval (II). The default initiation interval is 1, which processes a new input every clock cycle, or it can be specified by the -II option.

If Vitis HLS cannot create a design with the specified II, it:

  • Issues a warning.
  • Creates a design with the lowest possible II.

You can then analyze this design with the warning messages to determine what steps must be taken to create a design that satisfies the required initiation interval.

Syntax

set_directive_pipeline [OPTIONS] <location>

where:

  • <location> is the location (in the format function[/label]) to be pipelined.

Options

-enable_flush
Note: Applies only to function pipelining.

Optional keyword overriding the default pipeline style specified by the config_compile -pipeline_style option. This option defines the pipeline as a flushable pipeline as described in Flushing Pipelines. This type of pipeline typically consumes more resources and/or can have a larger II because resources cannot be shared among pipeline iterations.

-II <integer>
Specifies the desired initiation interval for the pipeline. Vitis HLS tries to meet this request. Based on data dependencies, the actual result might have a larger II. The default is 1.
-off
Turns off pipeline for a specific loop or function. This can be used when config_compile -pipeline_loops is used to globally pipeline loops.
-rewind
Note: Applicable only to a loop.

Enables rewinding. Rewinding enables continuous loop pipelining, with no pause between one loop iteration ending and the next starting. Rewinding is effective only if there is a single loop (or a perfect loop nest) inside the top-level function, and the code segment before the loop has the following characteristics:

  • It is considered as initialization.
  • It is executed only once in the pipeline.
  • It cannot contain any conditional operations (if-else).

Examples

Function foo is pipelined with an initiation interval of 1.

set_directive_pipeline foo

See Also