This section walks you through debugging the Vitis IDE for software emulation. 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.
Once the build completes, you can right-click the system project, PeakDetect_system and select Debug As -> Launch SW Emulator.
In the Launch on Emulator window, select Start Emulator and Debug.
You can observe the Linux boot and application run messages in the console. Once the boot completes and application run starts, the debugger stops after the
main()function as follows.
Also observe in the Breakpoints view, two other breakpoints that the tool automatically adds on to the
Place some breakpoints in your AI Engine source code, and try to observe the intermediate values. Open the
src/kernels/peak_detect.ccfile at line 31.
Click the Resume button, and now the debugger waits at the breakpoint in
mm2s. Optionally, you can also try placing the breakpoint in the
Click Resume again, and observe debugger and console output, waiting at the
s2mmkernel. Continue clicking Resume until the breakpoint in
peak_detect.cchits. Now, do step-over and observe values in variables view as follows.
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
x86simulatorto inspect the variable values.
After your debug, remove all breakpoints, and click Resume to complete the run and stop emulation.
NOTE: All the limitations from
x86simulatorare applicable in software emulation.