The AI Engine compilation mode provides for the development, optimization, analysis, and export of AI Engine graph applications (libadf.a). The AI Engine compilation mode uses the following command:
v++ -c --mode aie --target hw --platform vek385_base \
--work_dir ./myWork --config ./config.cfg <Input File>
-
v++ -c --mode aie --target hw: Indicates compilation of an AI Engine component for the HW target (default) indicating the generation of the libadf.a file for use in AI Engine simulation and to run on the physical device. You can also specifyx86simfor the target to build the component for x86 functional simulator. The contents of the output directory depend on the target. -
--platform vek385_base: Specifies the platform or physical device to build the component for. -
--work_dir ./myWork: Specifies the work directory to use for building the AI Engine component.Tip: By default, the compiler writes all outputs to a directory calledWorkin a sub-directory of the current directory where the tool was launched, and creates a file calledlibadf.ain the current directory. -
--config ./config.cfg: Specifies the AI Engine component config file containing a variety of options. The options are available to the AI Engine compiler, x86 Simulator, and AI Engine Simulator. The options are part of the analysis and profiling tools for the AI Engine component. -
<Input File>specifies the data flow graph code that defines themain()application for the AI Engine graph. The input flow graph uses a data flow graph language. For a description of the data flow graph, refer to Introduction to Graph Programming in the AI Engine Kernel and Graph Programming Guide (UG1079).
Refer to the v++ -c --mode aie command
options in the following sections. Add the AI Engine options to a configuration file under the [AIE]
section.
[AIE] options can be specified on the command line instead of in a config
file, although using a config file is the recommended approach. To use an [AIE] option on the command line add --aie. to the start of the command name from the
following sections. For example, to specify the constraints from the command line use
--aie.constraints
The AI Engine
component (with --target hw) can run through the
aiesimulator using the following command:
aiesimulator --pkg-dir=./Work --i=../..
--pkg-dir specifies the Work directory where
compilation occurs. --i specifies the input directory
path for the simulator.
After compilation, the AI Engine component (with --target
x86sim) can then run through the x86simulator using the following command.
x86simulator --pkg-dir=./Work --i=../../