The general v++
compilation options typically
appear on the command-line rather than a configuration file. It can include the -c
(or --compile
)
option, a --mode
when generating an AI Engine component or HLS
component, the --platform
or --part
, the build --target
, and a --config
file as shown
below:
v++ -c --mode aie --platform xilinx_vck190_base_202310_1 --target hw \
-config ./aie_config.cfg <input_files...>
Command options for v++
can be generally be used in a config
file or on the command-line. However, the following options are only available for use
on the command-line:
- -c [ --compile ]
-
Run compilation mode.
- --config <file_name>
- Specifies the config file path and name.
- --mode [ aie | hls ]
-
Specifies the compilation mode as either compile an AI Engine component, or an HLS component.
Important: The absence of--mode
puts thev++ -c
command in the traditional top-down compilation mode for the Vitis kernel flow as described in Compiling C/C++ PL Kernels. - -h [ --help ]
-
Print usage message for options. Can be combined with the
--mode
option to list the available options for the AI Engine or HLS components. - -v [ --version ]
-
Prints version information.
- --input_files <arg>
-
Specify input file(s). Input file(s) can also be specified positionally without using the
--input_files
option. - -o [ --output ] <arg>
-
Specify the output file name and path. Default: libadf.a for the AI Engine compilation mode, <kernel_name>.xo for the HLS compilation mode, a.xclbin for the
v++ --link
command. - -f [--platform]
-
This is a path to a Vitis platform file that defines the hardware and software components available for AI Engine components, HLS components, and Applications. The platform can be a platform specification (XPFM) or a hardware specification (XSA).
- --log_dir <arg>
-
Specify a directory to copy internally generated log files.
- --macro_dir <arg>
-
Specify a macro to define a base directory:
<macro_name>=<base_directory>
Macros with a $ sign can be used to specify a relative path. - --report_dir <arg>
-
Specify a directory to copy report files.
- --work_dir <arg>
-
Optionally specify a working directory for the build and output files. For
--mode aie
the work directory defaults to./Work
. For--mode hls
it defaults to the top-level function specified byhls.syn.top
. This option can only be specified on the command line. - --aie_legacy
-
Use legacy options for
aiecompiler
.
The following options can either be used in a config file or on the command-line:
[AIE]
or [HLS]
)
in the config file.- -t [ --target ] <arg>
-
The
--target
argument has different values when used with or without--mode
.- Used with
--mode
the target defines the compilation target of the AI Engine or HLS component.-
x86
: Specifies compilation for x86 simulation of an AI Engine component, or for C-simulation of the HLS component. -
hw
: Specifies compilation for use with AI Engine simulator for AI Engine components, for C/RTL Co-simulation for HLS components, or to run on the physical device for either components.
-
- Used without
--mode
: the target defines the tradition build targets (sw_emu
,hw_emu
,hw
) of the Application flow as described in Creating a System Project for Heterogeneous Computing.
Specify a target as
sw_emu
,hw_emu
, orhw
for the classicv++
compilation mode; or asx86
simulation for AI Engine compilation mode orhw
for AI Engine simulation. The default target ishw
. - Used with
- --part <arg>
-
Specify part family or part value. Note this option is mutually exclusive with
--platform
or--hls.board
. - -D [ --define ] <name=definition>
-
Predefine
<name>
as a macro with<definition>
. - -I [ --include ] <arg>
-
Include the specified directory in the list of directories to be searched for header files.