Deadlock Detection - 2023.1 English

AI Engine Tools and Flows User Guide (UG1076)

Document ID
UG1076
Release Date
2023-06-23
Version
2023.1 English

AI Engine users can run into simulator hangs. A common cause is insufficient input data for the requested number of graph iterations, mismatch between production and consumption of stream data, cyclic dependency with stream, cascade stream or asynchronous windows, or wrong order of blocking protocol calls (acquisition of async window, read/write from streams).

The x86 simulator will automatically detect deadlock, unless the --disable-stop-on-deadlock option is specified. If a deadlock is detected, simulation is stopped, and a deadlock diagnosis report is printed.

Additionally, a graph is generated in x86simulator_output/simulator_state_post_analysis.dot. This is a .dot file that encodes a description of the graph in terms of a block diagram where the agents involved in the deadlock are highlighted in red. To get this file transformed into a .png file, you must use the dot program as follows.

dot -Tpng x86simulator_output/simulator_state_post_analysis.dot > simulator_state_post_analysis.png
Important: Absence of deadlock for x86 simulation does not mean absence of deadlock in SystemC simulation. x86 simulation does not model timing and resource constraints and thus there are fewer causes of deadlock. On the other hand, if x86 simulation deadlocks, SystemC simulation deadlocks as well, so it is beneficial to fix the deadlock in x86 simulation before proceeding with SystemC simulation.
Note: The --disable-stop-on-deadlock option is not supported for software emulation or use cases with an external test bench.
The textual description of the deadlock can be visualized in vitis_analyzer:
Figure 1. Vitis Analyzer Deadlock Analysis View