After emulation is complete, you can look at the profiling and VCD trace data that was also generated at the same time. If profiling and VCD signal features are not used, emulation runs faster.
Using the XSIM Waveform GUI to view waveforms is powerful in allowing you to see the data path and flow of the design, as well as debug potential issues like a hang. However, this will only show the PL side of the system. To investigate the AI Engine signals, you need to use the VCD trace in the Vitis analyzer. To use the Vitis analyzer, open up a .aierun_summary
file.
Open the run summary of the design by running the following command.
vitis_analyzer sw/sim/behav_waveform/xsim/default.aierun_summary &
When the summary is open, you should see something similar to the following.
Here you can see various reports: Summary, Trace, Profile, Graph, Array. Click on Trace to open up the VCD data that was collected during hardware emulation.
You can see the inner traces of the graph through a tile hierarchy. Selecting a net, tile, function, or any object in this view will cross-select to various views. This can help with identifying specific nets and functions.
Open the Graph view, and click on the Buffers tab.
To find the RTP buffers, click on the search button (), and type in
coeffs
.You should see a window like the following.
Select the three
coeffs
buffers, and click the Trace view again. See that the lock signals are highlighted.If you scroll up, you can see that the FIR filter kernel begins to process data soon after the RTP is read.
Open up the Profile report, and see specific information about the kernel and the tile it is placed in.
Click on Total Function Time, and see the following:
This information is useful because it helps determine how long the kernel runs and can be used with the Trace to help determine if kernels are running optimally, or if there are stalls.
You can analyze the AIE status and profile in HW emulation same as that of Hardware. The AIE status can be prior analyzed during HW emulation in Vitis Analyzer for debug purposes. The
xrt.ini
on PS should have the following entries and must be packaged in v++ package flow before launching emulation.aie_profile=true aie_status=true
As a result, two files: aie_status_edge.json
and aieshim_status_edge.json
will be generated. These files can be copied back from embedded linux file system into the host machine and then loaded into Vitis Analyzer.
The AI Engine status is copied to the following files when the host program is running:
xrt.run_summary
: Run summary that contains list of files information that can be used by Vitis Analyzer.aie_status_edge.json
: Status of AI Engine and AI Engine memory.aieshim_status_edge.json
: AI Engine interface tiles status.
For more details, see Analyzing AI Engine Status in Hardware Emulation.
Close the Vitis analyzer.