Reusing AI Engine Simulator Options - 2021.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
ft:locale
English (United States)
Release Date
2021-12-17
Version
2021.2 English

The AI Engine simulator generates an options file that lists the options used for simulating the AI Engine graph application. The options file is automatically generated when the AI Engine simulator is run. You can reuse the AI Engine simulator options used in the initial graph-level simulation run later in the system-level hardware emulation. You can also manually edit the options file to specify other options as required. The following table lists the options that can be specified in the aiesim_options.txt file. This file is located in the aiesimulator_output directory and is created if either option, --dump-vcd or --profile is used with the aiesimulator command. This file can be specified as part of the command line option to launch the hardware emulator using the launch_hw_emu.sh script as described in Running the System in Hardware. An example command line is as follows.

./launch_hw_emu.sh \
-add-env VITIS_LAUNCH_WAVEFORM_BATCH=1 \
-aie-sim-options ${FULL_PATH}/aiesimulator_output/aiesim_options.txt

where ${FULL_PATH} must be the full path to the file or directory.

Table 1. AI Engine Options for Hardware Emulation
Command Arguments Description
AIE_DUMP_VCD <filename> When AIE_DUMP_VCD is specified, the simulation generates VCD data and writes it to the specified <filename>.vcd.
AIE_PROFILE All | (1,2)(3,4)... This option profiles either all the used AI Engines or selected AI Engines listed. Hardware Emulation generates profile data files in the sim/behav_waveform/xsim directory and can be viewed in the Vitis analyzer by opening the file default.aierun_summary. This option also logs the ADF kernel printf data to sim/behav_waveform/xsim/simulate.log file.
Important: You must set the AI Engine compiler workdir environment variable to the Work directory generated by the AI Engine compiler using one of the following methods:
  • Use -add-env in the command line of launch_hw_emu.sh. In the Makefile for example, ./launch_hw_emu.sh -aie-sim-options ./sim_options.txt -add-env AIE_COMPILER_WORKDIR=/yourdesigndirectory/Work.
  • Before launching Xilinx® simulator, type setenv AIE_COMPILER_WORKDIR /yourdesigndirectory/Work in the shell window.
Note: Any command that has path to a file needs to be an absolute path.

When creating a simulation option file manually it needs to follow the format of COMMAND=ARGUMENT, with each command being on a separate line. The following example shows best practice.


AIE_PROFILE=All
AIE_VCD=foo

The following command brings up the Xilinx simulator waveform GUI during hardware emulation.

./launch_hw_emu.sh -g

Additionally, you can add more advanced options to log waveform data without having to launch emulation with the Vivado logic simulator GUI. An example command line is as follows.

./launch_hw_emu.sh \
-user-pre-sim-script pre-sim.tcl

The pre-sim.tcl contains Tcl commands to add waveforms or log design waveforms. For an example, see the Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393) and for Tcl commands see Vivado Design Suite User Guide: Logic Simulation (UG900).