Vitis Compiler Configuration File - 2020.2 English

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

Document ID
UG1393
Release Date
2021-03-22
Version
2020.2 English

A configuration file can also be used to specify the Vitis compiler options. A configuration file provides an organized way of passing options to the compiler by grouping similar switches together, and minimizing the length of the v++ command line. Some of the features that can be controlled through config file entries include:

  • HLS options to configure kernel compilation
  • Connectivity directives for system linking such as the number of kernels to instantiate or the assignment of kernel ports to global memory
  • Directives for the Vivado Design Suite to manage hardware synthesis and implementation.

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 to help manage build options and strategies. The following table lists the defined sections.

Table 1. Section Tags of the Configuration File
Section Name Compiler/Linker Description
[hls] compiler HLS directives --hls Options:
  • clock
  • export_project
  • export_mode
  • max_memory_ports
  • memory_port_data_width
[clock] compiler Clock commands --clock Options:
  • defaultFreqHz
  • defaultID
  • freqHz
  • id
[connectivity] linker --connectivity Options:
  • nk
  • sp
  • stream_connect
  • slr
  • connect
[vivado] linker --vivado Options:
  • param
  • prop
[advanced] either --advanced Options:
  • param
  • prop
  • misc
Tip: Comments can be added to the configuration file by starting the line with a "#". The end of a section is specified by an empty line at the end of the section.

Because the v++ command supports multiple config files on a single v++ command line, you can partition your configuration files into related options that define compilation and linking strategies or Vivado implementation strategies, and apply multiple config files during the build process.

Configuration files are optional. There are no naming restrictions on the files and the number of configuration files can be zero or more. All v++ options can be put in a single configuration file if desired. However, grouping related switches into separate files can help you organize your build strategy. For example, group [connectivity] related switches in one file, and [Vivado] options into a separate file.

The configuration file is specified through the use of the v++ --config option as discussed in the Vitis Compiler General Options. An example of the --config option follows:

v++ --config ../src/connectivity.cfg

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

  1. Command line switches.
  2. Config files (on command line) from left-to-right.
  3. Within a config file, precedence is from top-to-bottom.