Pipeline Directive - 2024.1 English

Vitis Tutorials: Getting Started

Document ID
Release Date
2024.1 English

ACTION: Back out the prior change before proceeding. Go back to the Config Editor window and hover your mouse to the left of the compile.pipeline_loops command to display and click the More Actions command. Click the Reset to Default command. Alternatively, you can just remove the command from the hls_config.cfg file.

Another possible optimization is to tell the tool that a function or loop should occur before processing another sample. The Pipeline pragma or directive defines an acceptable level of performance, and can eliminate II violations from the reports because the latency would then match your specification. The overall latency of an application could indicate that perhaps II=4 is acceptable for some loops.

This configuration might be an acceptable response to II violations when the loops are not in the critical path of the design, or they represent a small problem relative to some larger problems that must be resolved. In other words, not all violations need to be resolved, and in some cases, not all violations can be resolved. They are simply artifacts of performance.

  1. In the Settings Form of the Config File Editor go to the bottom of the categories on the left side and go to Design Directives > Pipeline. This lets you manage the hls.syn.directive.pipeline in your design.

  2. Click Add Item under Pipeline. This opens the dct.cpp source code for the HLS component, and also opens the Directive editor as decribed in Adding Pragmas and Directives.

  3. In the HLS Directive view, select the dct_2d function, and click ‘+’ to add a directive or pragma. This opens the Add Directive dialog box as shown in the following figure.

Add Directive

  1. Select the PIPELINE directive and specify an II of 4. You can select either Source File to add it as a pragma directly to your code, or Config File to add it as a directive to the HLS configuration file. Click OK to add the pragma or directive to your design.

  2. In the Flow Navigator click the Run command under C Synthesis to rerun with the new directive.

  3. Examine the updated reports to see if there is any performance improvement.