Analyzing AI Engine Status in Vitis Analyzer - 2022.2 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2022-10-19
Version
2022.2 English

Analyzing the Automated Status Output

In Vitis Analyzer, you can analyze the AI Engine status output that is automatically generated as follows:

  1. Open the run summary file, xrt.run_summary, with the following command:
    vitis_analyzer xrt.run_summary
  2. In Vitis Analyzer, click Set AI Engine compile summary in the summary view to set the AI Engine compile summary, as shown below.

  3. In the prompted dialog box, click the ... button, and select the AI Engine compile summary, such as ./Work/graph.aiecompile_summary.

    The summary data displays in Vitis Analyzer.

  4. Click Graph or Array to display the summary data as desired. Note that all stalls are shown in red.

  5. At the bottom of the summary data, you can access the associated views related to the AI Engine status, some of which are defined as follows.
    Tile Status
    Shows AI Engine status, including stream, cascade, lock stalls. Columns are explained as follows:
    • PC: Shows the current PC value. It can be cross-probed with source code by clicking it.
    • Status: Shows AI Engine status. It can be:
      Done
      All done.
      Memory Stall - South
      AI Engine stalled on accessing memory that is located south of the AI Engine. See Array view for the physical placement of AI Engine's and buffers.
      Memory Stall - West
      AI Engine stalled on accessing memory that is located west of the AI Engine.
      Memory Stall - North
      AI Engine stalled on accessing memory that is located north of the AI Engine.
      Memory Stall - East
      AI Engine stalled on accessing memory that is located east of the AI Engine.
      Lock Stall - South
      AI Engine stalled on acquiring lock of buffer, that is located south of the AI Engine.
      Lock Stall - West
      AI Engine stalled on acquiring lock of buffer, that is located west of the AI Engine.
      Lock Stall - North
      AI Engine stalled on acquiring lock of buffer, that is located north of the AI Engine.
      Lock Stall - East
      AI Engine stalled on acquiring lock of buffer, that is located east of the AI Engine.
      Stream Stall - Input Ch 0
      AI Engine stalled on reading from stream input channel 0.
      Stream Stall - Input Ch 1
      AI Engine stalled on reading from stream input channel 1.
      Stream Stall - Output Ch 0
      AI Engine stalled on writing to stream output channel 0.
      Stream Stall - Output Ch 1
      AI Engine stalled on writing to stream output channel 1.
      Cascade Stall - Input
      AI Engine stalled on reading from cascade input stream.
      Cascade Stall - Output
      AI Engine stalled on writing to cascade output stream.
      Debug Halt
      AI Engine stalled by enabling debug mode.
      ECC Error Stall
      AI Engine stalled when ECC error happens.
      ECC Scrubbing Stall
      AI Engine stalled on ECC Scrubbing error.
      Error Halt
      AI Engine stalled on error.
      Enabled
      AI Engine is enabled.
      Reset
      In reset.
    Figure 1. Stalls and Status in the Graph View

    DMA Status
    Shows the Memory module DMA channel status in the design.
    Error Events
    Shows error events that have happened before the status was generated. Further details are available in the following tables: Table 4, Table 1, and Table 2.
    Buffers
    Shows buffer objects in the design with the current status. Something to note:
    • Lock Status: Lock status of the buffer object:
      • Acquired for read: The buffer has been acquired for read by the consumer kernel.
      • Released for read: The buffer has been released for read by the producer kernel.
      • Acquired for write: The buffer has been acquired for write by the producer kernel.
      • Released for write: The buffer has been released for write by the consumer kernel.
Figure 2. Buffers with Lock Status

Tip: Hover the mouse on objects in the Graph view. It will show more information about the object.

For information on how to analyze the stalls, see AI Engine Stall Analysis in Vitis Analyzer.

Analyzing the Manual Status Output

After manually generating the AI Engine status, as described in Generating AI Engine Status, you can analyze the data in Vitis Analyzer as follows:

  1. In Vitis Analyzer, click File > Import Xbutil/Xsdb JSON output
  2. In the prompted window, set the following options.
    • Xbutil JSON File: Select the JSON file that was manually generated with the xbutil command. For example, select the file aie_status_xbutil.json file.
    • AI Engine Compile Summary: Select the AI Engine compile summary file. For example:

      ./Work/graph.aiecompile_summary

    • Run Summary: The run summary to be written. A default name is provided. The run summary can be used to reload the analysis next time by File > Open Summary or File > Open Recent > Run Summary.
The Graph and Array views are shown in Vitis Analyzer. The following figure shows a manual AI Engine status example in Vitis Analyzer.
Note: If you load the JSON file before loading the compile workdir, the information will not be displayed because there is no graph report. An imported JSON file overrides any other JSON file previously set.
Figure 3. AI Engine Status Example in Vitis Analyzer

For details in the view in Vitis Analyzer, see Analyzing the Automated Status Output. For information on how to analyze the stalls, see AI Engine Stall Analysis in Vitis Analyzer.