Vitis Compiler Configuration File - 2023.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
Release Date
2023.2 English

Configuration files are the recommended way of working with either the Vitis Unified IDE, or the common command-line supported by v++. A configuration file provides an organized way of passing options to the tools by grouping similar commands together, creating reusable configuration files to perform specific tasks like connectivity or profiling, and minimizing and simplifying the v++ command line. Some of the features that can be controlled through config file entries include:

  • AI Engine commands to configure component creation using v++ -c --mode aie
  • HLS commands to configure interface definition, configure synthesis and simulation, and control packaging when using v++ -c --mode hls
    Tip: Almost all HLS commands must be specified in a configuration file. The exceptions are --platform and --freqhz, which are permitted on the command line or in a config file.
  • Connectivity directives for system linking specifying the number of kernels to instantiate, or assigning AI Engine streaming ports to PL kernel ports when using v++ --link
  • Package directives to configure the creation of boot files, the genration of the .xclbin file from a .xsa, and the creation of an SD card when using v++ --package
  • Directives for the Vivado Design Suite to manage hardware synthesis and implementation.
  • Comments can be added to the configuration file by starting the line with a "#":
    # This is a comment line

The Vitis Unified IDE use configuration files to drive component build and simulation processes. The configuration file can be created by the tool at the time of component creation, can be imported from an existing component, or can be custom created and added to the component separately. For the command-line flow the configuration file is specified through the use of the v++ --config option as discussed in the v++ General Options. An example of the --config option follows:

v++ --link --config ../src/system.cfg

Config file commands can be non-composing, which means they are only permitted once such as --platform. In this case the commands are read from the config file in the order they are encountered. The first command read is used. Config file commands can also be composing, which means that multiple values can be specified to apply to specific ports or CUs in the design. In this case the commands are cumulative, with any later conflicting commands either ignored or resulting in an error.

Commands are read in the order they are encountered. If the same switch is repeated with conflicting information, the first switch read is used or an error is returned. The order of precedence for switches is as follows, where item one takes highest precedence:

  1. Command line switches.
  2. Config files as specified on the command line from left-to-right.
  3. Within a single config file, precedence is as encountered from top-to-bottom.

In general, any v++ command option can be specified in a configuration file. However, the configuration file supports defining sections containing groups of related commands under command headers to help manage build options and strategies. The following table lists the defined section headers.

Tip: Multiple processes can be defined in a single configuration file. However, it is recommended to keep separate configuration files for separate processes, such as HLS component creation, system linking, and system packaging.
Table 1. Section Tags of the Configuration File
Section Name Description
Unlabeled Generally, an unlabelled section can be placed at the top of a configuration file to contain commands that are not specific to one of the following section heads. Examples of these command can include --part or --platform, --freqhz, and --debug.
[advanced] --advanced Options:
[aie] Used for AI Engine compilation with the v++ -c --mode aie command
[clock] --clock Options:
[connectivity] --connectivity Options:
[debug] --debug Options
[hls] Used for HLS component compilation using the v++ -c --mode hls command. These commands are described in v++ Mode HLS
Note: There are [hls] commands intended for use with the v++ -c -k mode for compiling the PL kernel for software emulation. These commands are described in --hls Options
[linkhook] --linkhook Options
[package] --package Options
[profile] --profile Options
[vivado] --vivado Options: