Debug using the Vitis IDE Debugger for Software Emulation - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
XD100
Release Date
2024-03-05
Version
2023.2 English

This section walks you through debugging in the software emulationflow using the Vitis IDE Debugger. Before going through this section, it is expected to complete the Debug Using the Vitis IDE Debugger section which gives quick idea on how to use the Vitis IDE debugger.

  1. After the design is built for the SW Emulation target, click on Flow Navigator -> SW Emulation -> Debug option.

  2. This gets you to the debug mode in the Vitis IDE and waits in the host.cpp file Debug View

  3. Also observe in the Breakpoints view, two other breakpoints that the tool automatically adds on to the mm2s and s2mm kernels.

  4. Click the Resume button, and now the debugger waits at the breakpoint in mm2s. Optionally, you can also try placing the breakpoint in the mm2s function.

  5. Click Resume again, and observe debugger and console output, waiting at the s2mm kernel. Continue clicking Resume until the breakpoint in s2mm.cpp hits.

Breakpoint

Also note an error message if you try to access the vector variable values. This is not fully supported in software emulation and recommended to use the `x86simulator` to inspect the variable values.
  1. You can add function breakpoint for peak_detect kernel by clicking on Breakpoints -> Add function Breakpoints Function Breakpoint

  2. After your debug, remove all breakpoints, and click Resume to complete the run and stop emulation. You should see the TEST PASSED on the Debug Console. Final

    NOTE: All the limitations from x86simulator are applicable in software emulation.