Configuring the Vitis IDE

From the Assistant view, use the Settings button () to configure a selected project or configuration object. For more information, refer to the following topics:

Vitis Project Settings

To edit the Vitis project settings, select the project in the Assistant view and click the Settings button () to bring up the Project Settings dialog box. This dialog box lets you specify both linking and compile options for the Vitis compiler v++ command to let you customize the project build process.

Figure 1: Project Settings
Project name
Name of the project. Click the link to open the Properties dialog box for the project.
Platform
Target platform for this project. Click the link to open the Platform Description dialog box. Click Browse to change the platform
Runtime
Displays the runtime used in this project.
Number of devices
Specify the number of OpenCL accelerator devices that can be used by the host program during emulation.
V++ compiler options
Specify compiler options for the v++ command, as described in Vitis Compiler Command.
V++ linker options
Specify linking options for the v++ command.

Vitis Build Configuration Settings

To edit the settings for any of the build configurations under the project, select the build configuration in the Assistant view and click the Settings button () to bring up the Build Configuration Settings dialog box. In this dialog box, you can enable host and kernel debug, specify the level of information to report during the build process, and specify the level of optimization for the hardware build.

Figure 2: Build Configuration Settings
Target
The build configuration target as described in Build Targets.
Host debug
Select to enable debug of the host code.
Kernel debug
Select to enable debug of the kernel code.
Report level
Specify what report level to generate as described in Controlling Report Generation.
Hardware optimization
Specify how much effort to use on optimizing the hardware. Hardware optimization is a compute intensive task. Higher levels of optimization might result in more optimal hardware but with increased build time. This option is only available in the Build Configuration System.

The Build Configuration dialog box also contains links to the Compiler and Linker Toolchain settings. These provide complete access to all the settings in the standard Eclipse environment, and can be used to configure the Vitis core development kit as described in Vitis Toolchain Settings. Vitis specific settings, such as the Vitis compiler and linker flags, which are not part of the standard C/C++ tool chain, are provided in the Miscellaneous tab.

Vitis Run Configuration Settings

To edit the settings for a run configuration, select a build configuration and use the right-click menu to navigate to Run > Run Configurations to open the Run Configurations dialog box for the selected build configuration. The Run Configuration dialog box, as shown below, lets you specify debug options, enable profiling of the running application, and specify the types of profiling data to collect.

TIP: Some of the following options are available in the hardware build, or the hardware emulation build, but are not supported in all builds.
Figure 3: Run Configuration Settings
Name
Specifies the name of the run configuration.
Project
Displays the current project, but can be changed to other open projects.
Build Configuration
Specifies the currently selected build configuration, or applies your settings to the active build configuration.
Kernel Debug
Select to enable the waveform view for kernel debugging, or enable the live waveform view as discussed in Waveform-Based Kernel Debugging.
Enable profiling
Enables the collection of profile data when the application is running as discussed in Profile Summary Report.
Generate timeline trace
Enables the production of a timeline trace report for the application as described in Application Timeline.
Collect Data Transfer Trace
Specifies the collection of data transfer data as described in Vitis Compiler General Options, and xrt.ini File.
Collect Stall Trace
Lets you indicate the capture of stall data for a variety of conditions, as describe in Vitis Compiler General Options, and xrt.ini File.

The Run Configuration dialog box has additional tabs to help configure the runtime environment when running your application. In the following example, the Argument tab is shown, with various arguments required to make the application run successfully.

Figure 4: Run Configuration Settings - Arguments
Program arguments
Specify arguments and values required by the application. Options involving paths are specified relative to the Working directory, as shown in the xclbin file in the previous example.
Automatically add binary containers to arguments
Enable this check box to have the binary container included automatically.
Working directory
Specify the location for the running application. This is defined automatically by the Vitis IDE, or can be overridden by disabling the Use default check box and specifying a path.

Vitis Binary Container Settings

To edit the settings for any of the binary containers under the project, select the binary container in the Assistant view and click the Settings button () to bring up the Binary Container Settings dialog box. This lets you specify a new name for the binary container, and to specify link options for the v++ command.

Figure 5: Binary Container Settings
Name
Specifies the binary container name.
Trace Memory
Specifies the type and amount of memory to use for storing event trace data for profiling the application. This relates to the --trace_memory option of the Vitis compiler.
V++ Linker Options
Enter link options for the selected binary container, in the specified build configuration. For more information on the available options, refer to Vitis Compiler Command.
V++ Linker Command Line
Displays the current v++ command line with any link options you have specified.
TIP: The settings specified by the Binary Container Settings dialog box are written to a configuration file used by the Vitis compiler with the --config option as described in Vitis Compiler Configuration File. The configuration file is a link; when you place your mouse over the link, it displays the contents of the configuration file.

Vitis Hardware Function Settings

You can edit the settings for the hardware functions of any build configurations in the project. In the Assistant view, select a hardware function for a specific build configuration, such as Emulation-HW, and click the Settings button () to open the Hardware Function Settings dialog box as shown in the following figure.

Figure 6: Hardware Function Settings

This dialog box lets you set options related to the hardware function in the selected build configuration, such as specifying the number of compute units for a kernel instance, or mapping the kernel ports to specific global memory banks. Specific options include:

Compute Units
Number of compute units to create for the kernel, as described in Creating Multiple Instances of a Kernel.
Max memory ports
For OpenCL kernels, when enabled, generates a separate physical memory interface (m_axi) for every global memory buffer declared in the kernel function signature. If not enabled, a single physical memory interface is created for the memory mapped kernel ports.
Port data width
For OpenCL kernels, specify the width of the data port.
Extra source files
Define any additional source files required by this hardware function, such as input data files.
V++ compiler options
Specify Vitis compiler options for the selected hardware function.
Compute Unit Settings
The options presented in this table change when you are working in the Emulation-SW build, the Emulation-HW build, or the Hardware build:
Memory
Specify global memory assignments for each port of a compute unit as discussed in Mapping Kernel Ports to Global Memory.
SLR
Define the SLR placement for each compute unit of the kernel as discussed in Assigning Compute Units to SLRs.
ChipScope Debug
Add monitors to capture hardware trace debug information. This specifies the --dk chipscope option discussed in Vitis Compiler General Options.
Protocol Checker
Add AXI Protocol Checker to your design. This option relates to --dk protocol.
Data Transfer
Add performance monitors to capture the data transferred between compute unit and global memory. Captured data includes counters, trace, or both. This relates to the --profile_kernel data option as discussed in Vitis Compiler General Options.
Execute Profiling
Add an accelerator monitor to capture the start and end of compute unit executions. This relates to the --profile_kernel exec option.
Stall Profiling
Add an accelerator monitor with functionality to capture stalls in the flow of data inside a kernel, between two kernels, or between the kernel and external memory. This relates to the --profile_kernel stall option.
V++ Compiler Command Line
This displays the current v++ command line with any compilation options you have specified.
TIP: The settings specified by the Hardware Function Settings dialog box are written to a configuration file used by the Vitis compiler with the --config option as described in Vitis Compiler Configuration File. The configuration file is a link; when you place your mouse over the link, it displays the contents of the configuration file.

Vitis Toolchain Settings

The toolchain settings provide a standard Eclipse-based view of the project, providing all options for the C/C++ build in the Vitis IDE.

From the Build Configuration Settings dialog box, click Edit Toolchain Compiler Settings or Edit Toolchain Linker Settings from the bottom of the Build Configuration window to bring up the compiler and linker Settings dialog box containing all of the C/C++ build settings. This dialog box lets you set standard C++ paths, include paths, libraries, project wide defines, and host defines.

Figure 7: Toolchain Settings

When working in a Vitis IDE project, the five main settings under the Tool Settings tab are:

V++ Kernel Compiler
Specify the v++command and any additional options that must be passed when calling the v++ command for the kernel compilation process. See Vitis Kernel Compiler and Linker Options.
V++ Kernel Linker
Specify the v++ command and any additional options to be passed when calling the v++ command for the kernel linking process. See Vitis Kernel Compiler and Linker Options,
emconfigutil
Specify the command line options for emconfigutil Utility. See emconfigutil Settings.
GCC Host Compiler (x86_64)
Specify g++ linker arguments that must be passed during the host compilation process. See G++ Host Compiler and Linker Settings.
GCC Host Linker (x86_64)
Specify g++ linker arguments that must be passed during the host linking process. See G++ Host Compiler and Linker Settings.

Vitis Kernel Compiler and Linker Options

Vitis Kernel Compiler Options

The V++ Kernel Compiler section shows the v++ command and any additional options that must be passed when calling the v++ command for the kernel compilation process. The v++ command options can be symbols, include paths, or miscellaneous valid options, which include any of the v++ command line options you want to add.

Figure 8: Vitis Compiler Options
Symbols
Click Symbols under Vitis compiler to define any symbols that are passed with the –D option when calling the v++ command.
Includes
To add include paths to the Vitis compiler, select Includes and click the Add () button.
Miscellaneous
Any additional compile options that must be passed to the Vitis compiler can be added as flags in the Miscellaneous section. For more information on the available compiler options, refer to Vitis Compiler Command.

Vitis Kernel Linker Options

The Vitis kernel linker settings shows the v++ command and any additional options to be passed when calling the v++ command for the kernel linking process.

Any additional options that need to be passed to the Vitis compiler can be added as flags in the Miscellaneous section. For more information, refer to Vitis Compiler Command for the available options in the linking process.

emconfigutil Settings

The emconfigutil command options can be entered in the Command field to create an emulation configuration file as described in emconfigutil Utility. The Vitis IDE creates the emconfig.json file by running the specified emconfigutil command before launching the run configuration.

Figure 9: emconfigutil Settings

G++ Host Compiler and Linker Settings

G++ Compiler Options

The arguments for the g++ compiler used by the Vitis core development kit can be accessed under the G++ Host Compiler section of the Toolchain Settings.

Figure 10: G++ Host Compiler Settings
Dialect
Specify the command options that select the C++ language standard to use. Standard dialect options include C++ 98, C++ 2011, and C++ 2014 (1Y).
Preprocessor
Specify preprocessor arguments to the host compiler such as symbol definitions. The default symbols already defined include the platform so that the host code can check for the specific platform.
Includes
Specify the include paths and include files.
Optimization
Specify the compiler optimization flags and other Optimization settings.
Debugging
Specify the debug level and other debugging flags.
Warnings
Specify options related to compiler warnings.
Miscellaneous
Specify any other flags that are passed to the g++ compiler.

G++ Linker Options

The linker arguments for the Vitis technology G++ Host Linker are provided through the options available here. Specific sections include general options, libraries and library paths, miscellaneous linker options, and shared libraries.