Tracing the application involves a different process whether you have a Linux
OS running on the board or if this is a bare-metal application. Linux OS opens the
possibility of using XRT while a baremetal application forces you to use xsdb to issue trace commands.
During tracing the system with Linux OS, special events such as XRT API commands in the host code (for example start a kernel, data transfer, kernel start, stall or lock stall in the AI Engine array) are recorded along with their timestamps to display the sequence of events. Through this, you can understand the origin of a system stall or data coherency.
Tracing the system can be done at multiple levels:
- Through the application that uses XRT API to start and monitor PL kernels and AI Engine graphs, or
- Through AI Engine array kernels, memories and interfaces.
Host application event tracing is enabled in the file xrt.ini, and can be limited within the host code using
specific API.
AI Engine event trace tools
provide an in-depth investigation into the operation and performance of a design. In
support of this, a number of settings are required to capture trace data at runtime.
In hardware, you must prepare the design when compiling the AI Engine graph application to ensure the libadf.a supports capturing trace data at runtime.
In order to trace events in hardware, use the --event
trace option when compiling the AI Engine graph. This option sets up the hardware device to
capture AI Engine runtime trace data.
The AI Engine event trace flow consists of three parts:
- Event trace build flow.
- Running the design in hardware and capturing trace data at runtime.
- Viewing and analyzing the trace data using the Vitis IDE.