Debug Using the Vitis IDE Debugger - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
Release Date
2023.2 English

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.

  1. After the design is built for the aiesimulation target, click the **Flow Navigator -> AIE Simulation -> Debug option..

  2. This gets you to the debug mode in the Vitis IDE and waits in io_buffer_main.h to acquire the lock to read the input data.

  3. Open the source file,, and place the breakpoint at line (vin = *InIter++) by clicking the empty space beside the line number in the source editor.


    1. 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_detect mapped to the tile [25,0]. So, when you select the core[25,0] in the Debug window, then the CALL STACK shows only the trace information correspoinding to the core[25,0].

    2. Not all the lines in the source code are allowed for placing the breakpoint. 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 an 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.

      breakpoint placement

    • 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 the compiler.

    • 3: Breakpoints automatically shifted to the other line which can be used to debug. Note the info message.

  4. Notice the continue,pause,step-over,step-into,step-out, restart, and terminate options in the taskbar after entering debug mode.

  5. You should be able to view the variables, breakpoints, and watchpoints to analyze the design at each iteration during the debug session.

    debug analysis view

  6. After placing the breakpoint in, 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 InIter is 0x38000. address of variable

  7. Use the Memory Inspector option to get the values at the address location, 0x38000. Click the + button, and add the address 0x38000 to the memory monitor. You should see the values equal to the input values in data/inx.txt.