Vitis Compiler Configuration File - 2023.1 English

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

Document ID
UG1393
Release Date
2023-07-17
Version
2023.1 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
  • Package directives to configure the --package Options.
  • 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.

Tip: While both compilation (v++ -c) and linking (v++ -l) commands can be put into a single configuration file, error checking may return errors related to linking during the compilation process. Therefore you are recommended to keep separate configuration files for compilation and linking.
Table 1. Section Tags of the Configuration File
Section Name Compiler/Linker Description
[advanced] either --advanced Options:
  • misc
  • param
  • prop
[clock] compiler --clock Options:
  • defaultFreqHz
  • defaultID
  • defaultTolerance
  • freqHz
  • id
  • tolerance
[connectivity] linker --connectivity Options:
  • nk
  • sc
  • slr
  • sp
  • connect
[debug] linker --debug Options
  • chipscope
  • list_ports
  • protocol
[hls] compiler HLS directives --hls Options:
  • clock
  • export_mode
  • export_project
  • jobs
  • lsf
  • post_tcl
  • pre_tcl
[linkhook] linker --linkhook Options
  • custom
  • do_first
  • do_last
  • list_steps
[package] packager --package Options
  • aie_debug_port
  • bl31_elf
  • boot_mode
  • defer_aie_run
  • domain
  • dtb
  • enable_aie_debug
  • image_format
  • kernel_image
  • no_image
  • out_dir
  • ps_debug_port
  • ps_elf
  • rootfs
  • sd_dir
  • sd_file
  • uboot
[profile] linker --profile Options
  • aie
  • data
  • exec
  • stall
  • trace_memory
[vivado] linker --vivado Options:
  • impl.jobs
  • impl.lsf
  • impl.strategies
  • param
  • prop
  • synth.jobs
  • synth.lsf
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 v++ General Options. An example of the --config option follows:

v++ --config ../src/system.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.