For simplicity, all the tests can be conducted using variables defined in the command line of the Makefile. The three variables are as follows:
TARGET
:_sw_emu_
allows you to runx86simulator
._hw_emu_
allows you to runaiesimulator
orhw_emu
.
EXTIO
_false_
: the input and output files are defined in the AI Engine design. Thex86simulator
andaiesimulator
are run using these predefined test vectors.hw_emu
runs after having synthesizedmm2s
,s2mm
, andpolar_clip
in the PL._true_
: external traffic generators are hooked up to the various simulators.
TRAFFIC_GEN
_Python_
: a Python external traffic generator is used if necessary (EXTIO=true
)._Cpp_
: a C++ external traffic generator is used if necessary.
The rules defined in the Makefile are as follows:
clean
: Clean up all subdirectories.aie
: Compile the AI Engine graph (theEXTERNAL_IO
macro value is defined depending on theEXTIO
variable value).aiesim
: Simulate at the AI Engine array level (x86simulator
oraiesimulator
) and check results.kernels
: Compiles2mm
,mm2s
, andpolar_clip
into XO files, or copysim_ipc_master_32.xo
andsim_ipc_slave_32.xo
into the kernels directory.xclbin
: Create the XCLBIN files with the kernels defined by the XOs in the kernels directory.host
: Create the host application. No test is defined in this application because the verification is done on the output of the external traffic generator.package
: Prepare for thehw_emu
.traffic_gen
: Compile the C++ traffic generator if it has been selected.run_emu
: Runhw_emu
and checks results.
Some simulations you can try are shown in the following examples.
make TARGET=sw_emu EXTIO=false clean aie aiesim
--> Runs x86simulator without external TG.
make TARGET=hw_emu EXTIO=true TRAFFIC_GEN=PYTHON clean aie aiesim
--> Runs aiesimulator with a Python external TG. You have to close the two plots to finish the simulation.
make TARGET=hw_emu EXTIO=true TRAFFIC_GEN=CPP clean aie traffic_gen aiesim
--> Same but with a C++ external TG
make TARGET=hw_emu EXTIO=true TRAFFIC_GEN=PYTHON clean aie xclbin host package run_emu
--> Runs hw_emu with Python External TG. You have to get out from Qemu (CTRL A + X) and close the 2 plots to finish the simulation.
make TARGET=hw_emu EXTIO=true TRAFFIC_GEN=CPP traffic_gen run_emu
--> Runs hw_emu with C++ external TG. Here, you take advantage of the already compiled xclbin and created package.