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.
After the design is built for the SW Emulation target, click on Flow Navigator -> SW Emulation -> Debug option.
This gets you to the debug mode in the Vitis IDE and waits in the host.cpp file
Also observe in the Breakpoints view, two other breakpoints that the tool automatically adds on to the
mm2s
ands2mm
kernels.Click the Resume button, and now the debugger waits at the breakpoint in
mm2s
. Optionally, you can also try placing the breakpoint in themm2s
function.Click Resume again, and observe debugger and console output, waiting at the
s2mm
kernel. Continue clicking Resume until the breakpoint ins2mm.cpp
hits.
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.
You can add function breakpoint for peak_detect kernel by clicking on Breakpoints -> Add function Breakpoints
After your debug, remove all breakpoints, and click Resume to complete the run and stop emulation. You should see the
TEST PASSED
on theDebug Console
.NOTE: All the limitations from
x86simulator
are applicable in software emulation.