Step 4: Using Vitis Analyzer - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
XD100
Release Date
2024-03-05
Version
2023.2 English

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.

  1. 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.

    VA_overview

  2. 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.

    VA_overview_1

    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.

  3. Open the Graph view, and click on the Buffers tab.

  4. To find the RTP buffers, click on the search button (search), and type in coeffs.

    You should see a window like the following.

    VA_rtp_buffers

  5. Select the three coeffs buffers, and click the Trace view again. See that the lock signals are highlighted.

    VA_trace

  6. If you scroll up, you can see that the FIR filter kernel begins to process data soon after the RTP is read.

    VA_trace_rtp

  7. Open up the Profile report, and see specific information about the kernel and the tile it is placed in.

    VA_profile

  8. Click on Total Function Time, and see the following:

    VA_func_time

    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.

  9. 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.

  1. Close the Vitis analyzer.