The AI Engine
component uses the v++ -c --mode aie
compiler command to
build the component. The command uses a configuration file command language as described
in v++ Mode AI Engine. You can build your command line as
the Vitis IDE does, which
is presented below based on the
AI Engine PL and PS System Design
example. The example includes an AI Engine component, two HLS components, the Application
component, and the System project.
Compiling for x86simulator
To build the AI Engine component for simulation with the x86simulator, the command-line will look as follows:
v++ -c --mode aie --target x86sim --platform xilinx_vck190_base_202310_1 \
--config ./aiecompiler.cfg --work_dir ./aie_sys_design_aie/Work ./src/graph.cpp
Where:
-
--target
specifies the target for the build -
--platform
specifies the platform to build against -
--config
specifies a config file with the compiler directives for the build -
--work_dir
provides a work directory to build the component - graph.cpp specifies the source code for the AI Engine graph application
The contents of a configuration file can vary, but the example uses the following commands in the aiecompiler.cfg file:
include=./aie_sys_design_aie
include=./aie_sys_design_common/src
include=./aie_sys_design_aie/src
[aie]
Xchess=main:darts.xargs=-nb
log-level=1
stacksize=1024
heapsize=1024
After compilation the AI Engine
component can then be run through the x86simulator
using the
following command:
x86simulator --pkg-dir=./Work --i=../../
Where --pkg-dir
specifies the Work directory where compilation
occurs, and the --i
specifies the input directory path for the
simulator
Compiling for AI Engine Simulator / Hardware
To build the AI Engine component for
simulation with the aiesimulator
, the command-line will look as
follows:
v++ -c --mode aie --target hw --platform xilinx_vck190_base_202310_1
--config ./aiecompiler.cfg --work_dir ./aie_sys_design_aie/Work ./src/graph.cpp
x86simulator
and aiesimulator
builds. The AI Engine component can then be run
through the aiesimulator
using the following command:
aiesimulator --pkg-dir=./Work --i=../..
--pkg-dir
specifies the Work directory where
compilation occurs, and the --i
specifies the input
directory path for the simulator.