This section walks you through a debug methodology that uses the Vitis IDE debugger. You can learn how to invoke the debugger, add breakpoints, view intermediate values, etc.
After the design is built for the aiesimulation target, click on Flow Navigator -> AIE Simulation -> Debug option..
This gets you to the debug mode in the Vitis IDE and waits in
io_buffer_main.hwaiting to acquire the lock to read the input data.
Open the source file,
peak_detect.cc, and place the breakpoint at line (vin = *InIter++) by clicking on the empty space beside the line number in the source editor.
You should see the stack trace corresponding to the all the kernel functions mapped to a particular tile. For example, in this case, the kernel
peak_detectmapped to the tile [25,0]. So, when you select the
Debugwindow, then the CALL STACK shows only the trace information correspoinding to the
Not all the lines in the source code are allowed for placing the break-point. Sometimes when you try to place the breakpoint at a particular line (for example, line 27 as shown in below screenshot, the breakpoint is adjusted to the line-32 in the same source code with Info message at the bottom corner as highlighted below. This is because the compiler optimized the particular operation, and the breakponts can only be placed at lines that are not optimized by the compiler.
1-> Indicates the current location of the pointer during the debug (explained more in later steps).
2-> Try adding a breakpoint at a line that is optimized by compiler.
3-> Breakpoint automatically shifted to the other line which can be used to debug. Note the info message.
terminateoptions in the taskbar after entering debug mode.
You should be able to view the variables, breakpoints, watchpoints to analyze the design at each iteration during the debug session.
After placing the breakpoint in
peak_detect.cc, click the continue button. You can see the debugger stops at that particular line. From the variable view you can get the address of any particular variable at that particular instance of the run. For example, the address value of the
Use the Memory Inspector option to get the values at the address location,
0x38000. Click the + button, and add the address
0x38000to the memory monitor. You should see the values equal to the input values in