To run the event trace on hardware, it is required to compile the AI Engine graph with --event-trace and other appropriate flags. The flags are categorized based on the way the trace data needs to be captured.
Using the
runtimeas an argument, you can compile the AI Engine graph to be set up for event trace, and specify the type of profile data to capture at runtime.The other way is to specify one of the
functions,functions_partial_stalls, orfunctions_all_stallsas a type of profile data during compile time, and recompile the design to capture a different type of data during runtime.
For more information on different event trace options for AI Engine compilation, refer to Event Trace Options in AI Engine Tools and Flows User Guide (UG1076).
This tutorial uses the --event-trace=runtime, --event-trace-port=plio, --num-trace-streams=8, and --xlopt=0 options.
--event-trace=runtimeoption enables runtime event trace configuration.--event-trace-port=pliooption sets the AI Engine event tracing port to beplio. Default isgmio.--num-trace-streams=8option sets the number of trace streams to be 8 to collect the generated event trace data.--xlopt=0option disables the aiecompiler optimization for debug purposes.
Design with the --event-trace=runtime option in the build that enables runtime events during compile time. This only needs to build the design once and allows different event trace levels to be generated during runtime via the XSDB or XRT flow.
Navigate to the
cmd_src/directory, and open theMakefile.Search for
AIE_INCLUDE_FLAGS, and add the--event-trace=runtime --event-trace-port=plio --num-trace-streams=8 --xlopt=0options at the end. This flag is passed to theaiecompilercommand during compilationDo
make all TARGET=hw.Make sure the package step is completed by checking the
sd_card.imginside thesw/directory.