Hang Detection - 2023.2 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2023-12-04
Version
2023.2 English

AI Engine designs might experience simulator hangs. Some common causes include:

  • Insufficient input data for the specified number of iterations.
  • Mismatched production and consumption rates in stream data.
  • Cyclic dependencies with streams.
  • Cascade streams or asynchronous buffers.
  • Incorrect order of blocking protocol calls, such as, acquisition of asynchronous buffers or read/write from streams.

Using the aiesimulator option --hang-detect-time=<time_in_ns> will allow the tool to check for a hang situation on the kernels and trigger an exit of the simulation after a specified delay. It can detect lock stalls and stream stalls, whether it is circuit switched or packet switched communication. By default, aiesimulator runs with –hang-detect-time=100us. To turn off the hang detection, set –hang-detect-time=-1.

Below are some examples of hang detection output.

Figure 1. Stream Stall Detection
Figure 2. Lock Stall Detection
Note: For larger designs, run aiesimulator with a hang detection value suitable for the design.