During debug, you want to see the value of data passing through the kernel. In the following figure you can trace through objects and observe data stored in the designated memory location from the Vitis IDE.
Figure 1. Tracing Data in Vitis unified
IDE
- In preceding code example, Step 1 shows the variable
cb_input
is the reference toinput_buffer
of typecint16
. - In Step 2 move to the
cb_input
variable in the Variables view. This is the pointer representation of the data access buffer port that holds the input data for the kernel. However, the kernel functions merely operate on pointers to the buffer data structures passed to them as arguments. The input buffer port holds the data. Examine the address of the variablecb_input
. It is at address0x32000
. - In Step 3, enable the Memory Inspector
window on the top right and click on the + sign to input the
address
0x32000
. - In Step 4, the Memory window displays the content at address of
0x32000
. This is the data contained in the data access buffer port defined by thecb_input0
variable. - This example has 16 elements as the margin size and each element is
cint16
type, so the actual data starts from0x32000 + 0x40 = 0x32040
. You can examine the data contents, export to a file and hover your mouse on the hexadecimal values to display it in a specific data format.
Note: You can click the Debug command and drag
it from the left side Tool Bar menu to the bottom middle and drop it inside the space
where you have the Debug console. This helps in
viewing the variables in expanded view by clicking on Arrow button as shown in the
following figure. You can drag it back to the left side at any time.
Figure 2. Rearranging Windows