x86 Functional Simulator (x86simulator) - 2020.2 English

Versal ACAP AI Engine Programming Environment User Guide (UG1076)

Document ID
UG1076
Release Date
2020-11-24
Version
2020.2 English
Note: The x86 simulator is a preliminary feature and enhancements are planned in future releases.
  1. When the application is compiled using the x86 simulation target, the x86 simulator can be invoked.
    x86simulator –-pkg-dir ./Work –-input-dir <dir> --output-dir <dir>

    The compiled binary for x86 native simulation is produced by the AI Engine compiler under the Work directory (see Compiling an AI Engine Graph Application) and is started automatically by this wrapper script. The input and the output files are picked up as specified on the command line, with the path default relative to the current directory. The complete x86simulator command help is shown here:

    $ x86simulator --help
     x86simulator [-h] [--help] [--h] [--pkg-dir=PKGDIR] [--gm-init-file=GM_INIT_FILENAME]
     optional arguments:
     -h,--help  --h show this help message and exit
    --pkg-dir=PKG_DIR     Set the package directory. ex: Work
    --gm-init-file=GM_INIT_FILENAME  set the gm-init-file image for GMIO
    --i, -i ,--input-dir=PATH  Set the input-dir to . by Default
    --o, -o ,--output-dir=PATH  Set the input-dir to . by Default
  2. The output files produced by the simulator can be compared with a golden output ignoring white-space differences.
    diff –w <data>/golden.txt <data>/output.txt
  3. In applications where run-time parameters need to be updated dynamically, you can control the application from the main program using update API as described in Run-Time Parameter Update/Read Mechanisms.
  4. The simulator will run continuously, unless you specify a number of iterations to run through the main application, as shown in the following example:
    clipgraph.init()
    clipgraph.run(3)
    clipgraph.end()