Debugging with VFS - 2025.2 English - UG1701

Embedded Design Development Using Vitis User Guide (UG1701)

Document ID
UG1701
Release Date
2025-11-20
Version
2025.2 English

You can debug a VFS simulation object in a standard gdb environment by stepping through the AIE or HLS kernel code. To do this, you need the process ID of the VFS object. You can obtain the process ID as follows:

  • In MATLAB: vfs.getpid()
    Note: All VFS objects in a MATLAB script share the same process ID, which is separate from the MATLAB's own process ID.
  • In Python:
    import os
    os.getpid()
    Note: All VFS objects run in the same process as the Python script.

Additionally, you can use printf for simpler debugging. For MATLAB, any printed output appears in the terminal where the application was launched.

Debugging with x86 simulation dump files

VFS simulation of AI Engine graph objects use the x86 simulator which has a feature to dump data snapshots. The snapshots allow users to inspect data traffic at kernel ports without using the debugger. This feature is enabled in VFS with <vfs_graph_object>.setPortDump("<dir_name>"). The argument <dir_name> is optional, with default value "aieGraph".

Note: The <dir_name> argument is used to separate the dump output for graph object and can only be set once.

The x86 simulator writes the dump files after simulation is finished. As VFS keeps the simulation thread running for interaction, the simulation object need to be destructed to terminate the thread. Running <vfs_graph_object>.writePortDump() automatically handles the destruction. The command also decodes the generated dump file to readable format by the VFS workspace.