Viewing Data from Stream Interfaces - 2023.2 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2023-12-04
Version
2023.2 English

Data flows into and out of an AI Engine kernel through access windows, or a stream interface. During debug you might want to see the value of these data access windows as data is passing through the kernels. In the case of data windows, the Vitis IDE debug environment provides methods to view and access the data as described in Viewing Data from Buffer Port Interfaces. In the case of stream interface connections, it is recommended to add printf() statements to your code to let you examine the data passing through the kernel.

Important: Adding printf() statements to the code suppresses compiler optimizations, and results in a larger kernel executable program that might not fit into the available memory of the AI Engine processor.

When adding the printf() statement in your kernel code you must select Enable Profile in the launch configuration for Debug as shown in the following figure. You can also select the cores for which profiling should be enabled. By default, all cores are selected.

When adding the printf() statement in your kernel code you must also add the --profile option in the Run Configurations or Debug Configurations dialog box in the Vitis IDE. Add --profile to the Arguments tab of the Debug Configuration, along with whatever other options are already specified, as shown in the following figure.

Figure 1. Enable Profiling

Adding the printf() statements to your source code, results in the output of streaming data as it is processed by the kernel. The following figure shows an example of such output in the console window. This provides visibility to capture and debug the dataflow through streaming interfaces.

Figure 2. Printing Data from Stream Interfaces