Defining the HLS Config File - 2023.2 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
Release Date
2023.2 English

The HLS component configuration file contains commands and settings used for the synthesis, simulation, and export of the component. To access the config file select the Config File hyperlink on the vitis-comp.json tab for the HLS component, or select hls_config.cfg in the Vitis Component Explorer view, under Settings of the HLS component. This will open the Config File Editor in the central editor window as displayed below.

Figure 1. HLS Component Configuration File

For the HLS component the config file includes the following sections:

  • General: Provides general options for the design, such as target part, clock frequency, and flow target. These options are described at HLS General Options.
  • C Synthesis sources: Specify C/C++ source files for the HLS design. These are also described in Running C Synthesis.
  • Testbench sources: Specify C/C++ test bench files and associated files used during C simulation and C/RTL Co-simulation.
  • C Simulation: Specify compilation options for running C simulation as described in Running C Simulation .
  • C Synthesis Settings: Specify global synthesis controls for the following categories: Array Partition, Array Stencil, Compile, Dataflow, Debug, Interface, RTL, Schedule, Unroll, Op, Storage, IP. These configuration settings are related to the config file commands described in HLS Config File Commands.
  • C/RTL Cosimulation: Provide compilation options for running C/RTL Co-simulation as described in Running C/RTL Co-Simulation.
  • Package: Specify options to control the export format of the RTL generated during C synthesis as described in Packaging the RTL Design.
  • Implementation: Specify options to control Vivado synthesis and implementation as described in Running Implementation.
  • Design Directives: Directives can be added as HLS Pragmas directly to the source code, or as HLS Optimization Directives to the configuration file for use in an HLS component. In the Config File editor you will see the various directives listed, and you can select Add Item to open the Directive editor as described in Adding Pragmas and Directives.

The Config File Editor offers both a form-based view of the config file options, and a text-based editor that can be enabled to edit the config file directly. You can switch between the two by using the icons at the top of the editor window.

Figure 2. Form-Based and Text-Based Editing

There is a Search bar at the top of the Config File Editor which lets you quickly search through the options using a keyword or phrase. You can also choose to display only the Settings with Values to limit the displayed options.

Tip: Remember to enable the File > AutoSave feature or select the File > Save command, or Ctrl-S to save your changes after editing the config file.