In order to simplify system level debug when running applications on the board, the System Level Trace provides a single view for all the events from AI Engine, Programmable Logic, and Processing System. Vitis Analyzer provides such a view with all the tools available to navigate across all events.
Event trace must be enabled for AI Engine and PL so that all events can be captured and displayed on the same time line. PS trace is also enabled at when running the application on hardware.
AI Engine
As in the previous sections, event trace must be set to runtime
during compilation. This can be done using a
configuration file enabled in the v++ command line:
v++ -c --mode aie --include "./src" --include "./src/kernels" --aie.workdir ./Work ${GRAPH} --platform $(PLATFORM) --config aiecompiler_trace_options.cfg
aiecompiler_trace_options.cfg
contains the options that will allow
event trace through PLIOs or GMIOs
(default):[aie]
event-trace=runtime
broadcast-enable-core=true
# For PLIO runtime Trace
event-trace-port=plio
num-trace-streams=16
trace-plio-width=128
xlopt=0
[aie]
event-trace=runtime
broadcast-enable-core=true
# For GMIO runtime Trace
event-trace-port=gmio
xlopt=0
broadcast-enable-core
is true by
default. Options can be set to start tracing at some event or at a specific
iteration.
Programmable Logic
PL trace is enable during system linking. This is done in the command line
adding the--profile.data
option:
v++ -g -l --platform ${PLATFORM} ${XOS} ${LIBADF} -t hw --save-temps --verbose --config ${VPP_SPEC} --profile.data all:all:all -o XCLBIN_File
The --profile
option can be used to profile
many different activities. For more information, see
--profile
Options
.
--profile.data all:all:all
will
monitor data on all kernels and compute units.
Runtime Trace
xrt.ini
file
specification,.
# Debug group for the aie, ps and pl
[Debug]
aie_trace = true
device_trace=fine
host_trace=true
# PL Trace buffer
trace_buffer_size = 32M
trace_buffer_offload_interval_ms = 5
[AIE_trace_settings]
# PLIO
tile_based_aie_tile_metrics = all:all:functions_all_stalls
# Global system timeline
enable_system_timeline = true
[Runtime]
verbosity = 10
enable_system_timeline
is true by
default.
More details on the xrt.ini file for PL and PS Trace, see xrt.ini File .
Vitis Unified IDE
device_trace_0.csv
2-device_trace_0.csv
3-device_trace_0.csv
aie_event_runtime_config.json
aie_event_timestamps.bin
aie_trace_0_0.txt
aie_trace_0_1.txt
aie_trace_0_2.txt
...
aie_trace_0_13.txt
aie_trace_0_14.txt
aie_trace_0_15.txt
native_trace.csv
summary.csv
xrt.run_summary
Vitis Analyzer must be run with xrt.run_summary
as a parameter to visualize the entire
system in the Timeline
view:
On the left side of the Timeline view there is the list of all traces that have been captured during application execution in hardware:
To view the details in this timeline view zooming is required:
Zooming in the XRT API rows will allow you to view the PL kernel launch and AI Engine RTP update:
The Graph Run and End can be seen on the graph, as well as, how the API correlates with effective AI Engine graph execution: