Simulator Options for Hardware Emulation - 2021.1 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
Release Date
2021-07-19
Version
2021.1 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, using the AI Engine simulator, 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. 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.
AIE_PKG_DIR /path_to_work_dir/Work This is a mandatory option that sets the path to the Work directory generated by the AI Engine compiler. If you do not specify this option, the generated sim/behav_waveform/xsim/default.aierun_summary file will not have the correct Work directory setting, which will impact the display of the summary file in the Vitis analyzer.

The following command brings up the XSIM 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 Accelerated Software Development Flow Documentation in the Application Acceleration Development flow of the Vitis Unified Software Platform Documentation (UG1416) and for Tcl commands see Vivado Design Suite User Guide: Logic Simulation (UG900).