Simulator Options - 2022.2 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
Release Date
2022.2 English

The complete set of the AI Engine simulator (aiesimulator) options are described in this section. In most cases, just pointing to pkg-dir is sufficient.

Table 1. AI Engine Simulator Options
Options Description
-h, --help Show this help message and exit.
--display-run-interval=<time in ns> Displays time stamp periodically after each time (in ns) elapse, provided by this option. For example, --display-run-interval=10.
--dump-vcd=<file> Dump VCD waveform information into <file>. Because the tool appends .vcd to the specified file name, it is not necessary to include the file suffix.
Note: To generate the XPE file from the aiesimulator generated vcd file, use the vcdanalyze tool as follows:
vcdanalyze --vcd <vcdfile> --xpe [OPTIONS]
The available options are:
  • -s=<STARTTIME>: Specifies the start time (Optional).
  • -e=<ENDTIME>: Specifies the end time (Optional).
  • --out=<RPT>: Generates the workload estimation report in ".rpt" format.
  • -v: Generates verbose output (Optional).
  • --xpe: Generates the power estimate report.
  • --xpe-dir=<XPEOutputDir>: Specifies the directory for generating XPE reports. The default is ./aiesim_xpe.

For information on using the XPE file, see Xilinx Power Estimator User Guide for Versal ACAP (UG1275).

--enable-handshake-ext-tb Enable sample by sample transaction between aiesimulator and external testbench
--enable-memory-check Enable runtime program and data memory boundary access check. Any violation access will be reported as [ERROR] message. The default is disabled.
--hang-detect-time=<time in ns> Simulation exits if all active cores at stalled state after time period (in ns), provided by this option. For example, --hang-detect-time=10.
-i Alias of --input-dir=<dir> option.
-o Alias of --output-dir=<dir> option.
--pkg-dir=<dir> Specify the package directory, for example, ./Work.
--profile Generates profiling data for all used cores. Allows generation of printf trace messages on the stdout and collects profiling statistics during simulation. This can slightly slow down the simulator.

Optionally, can specify the profile of specific cores by using "--profile=(col,row)(col,row)..." flag.

--simulation-cycle-timeout=<cycles> Run the application for a given number of cycles after it is loaded.
Tip: Specify the --simulation-cycle-timeout option to end the simulation session after the specified number of timeouts. However, when specifying simulation timeout during the debug process, be sure to specify a large number of cycles because the debug will terminate when the timeout cycle is reached.

Call vcdanalyze to parse VCD data on-the-fly, to optionally produce common trace format (CTF), or waveform database (WDB) output.

Tip: The --online option and --dump-vcd option cannot be used together. If both options are specified, only --online option takes effect.
--output-time-stamp Use --output-time-stamp=no to get output file without time values and --output-time-stamp to get uniform time value (in ns) in output file.

Hang Detection

AI Engine users can run into simulator hangs. A common cause is insufficient input data for the requested number of graph iterations, mismatch between production and consumption of stream data, cyclic dependency with stream, cascade stream or asynchronous windows, or wrong order of blocking protocol calls (acquisition of async window, read/write from streams).

Using aiesimulator option --hang-detect-time=<time_in_ns> will allow the tool to check for a hang situation on the kernels and trigger an exit of the simulation after a specified delay. It can detect lock stalls and stream stalls whether it is circuit switched or packet switched communication. Below are some examples of hang detection output:
Figure 1. Stream Stall Detection
Figure 2. Lock Stall Detection