The XSDB flow is as follows:
- Set up
xsdbas described in the following steps to connect to the device hardware.
When running the application, the trace data is stored in DDR memory by the debugging and profiling IP. To capture and evaluate this data, you must connect to the hardware device using
xsdb. This command is typically used to program the device and debug bare-metal applications. Connect your system to the hardware platform or device over JTAG, launch the
xsdbcommand in a command shell, and run the following sequence of commands:
xsdb% connect xsdb% ta xsdb% ta 1 xsdb% source $::env(XILINX_VITIS)/scripts/vitis/util/aie_trace.tcl xsdb% aietrace start -graphs mygraph -config-level functions_all_stalls -work-dir ./Work -link-summary $PROJECT/xsa.link_summary -base-address 0x900000000 -depth 0x800000 # Execute the PS host application (.elf) on Linux ## After the application completes processing. xsdb% aietrace stop
- Launches the
xsdbto the device.
- Sources the Tcl trace command to set up the
aietrace start -graphs mygraph PROJECT/xsa.link_summary -config-level functions_all_stalls -base-address 0x900000000 -depth 0x800000
- Initializes the DPA IP to begin capturing trace data. The
-graphsspecifies the graph(s) to collect event trace data. If specific tiles are preferred, specify
-tileswith list of tiles to collect event trace data. The
functions_all_stallsof event trace level to be captured. The values
-base-address 0x900000000 -depth 0x800000specify the starting address to write trace data into the AI Engine and the amount of data to store.
Important: The DDR memory address used in
-base-address 0x900000000must be a high address to limit any chance of running into memory conflicts with the OS on the xilinx_vck190_base_202210_1 platform or the application. For a custom platform, make sure you know how much DDR memory is being used and plan accordingly.
- Instructs the DPA IP to offload the trace event
data from the DDR memory. This command must wait until after the
application completes. The data is written to the event_trace<N>.txt file in the
current working directory from where
xsdbwas launched. An
aie_trace_profile.run_summaryfile is also created. It can be opened in the Vitis Analyzer as explained in Viewing the Run Summary in the Vitis Analyzer.
Tip: If you do not remove the
event_trace<N>.txtwhen running the graph again, the old files will be overwritten by the new run results.
- Run the design on hardware to trace hardware events.
- Offload the captured trace data.
- Launch the Vitis Analyzer to import
and analyze data with this