Trace Report in the File - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
Release Date
2023.2 English

Trace capability is used for debugging simulation hangs without the need for instrumenting kernel code or using the GDB.

Consider Scenario 1 in the Deadlock Detection section, where the stream data from the producer kernel does not match with the consumer kernel. Now see how to visualize the information using the trace feature of the x86simulator.

  1. Make the changes to the source code as mentioned in the Deadlock Detection section, Scenario 1, and build the project.

  2. Open the launch configuration settings and select the Enable trace option.

  3. Run x86simulation by selecting the Run option under X86SIMULATION in Flow navigator.

  4. Once the run completes, you can see the following information in the console.

    Processing './x86simulator_output/trace/'
    10% complete
    50% complete
    70% complete
    80% complete
    100% complete
    Wrote './x86simulator_output/trace/'
    Wrote ./x86simulator_output/
    Simulation completed successfully returning zero
  5. Open the $(COMPONENT_NAME)/Output/x86sim/x86simulator_output/trace/ file, and observe the trace events.

  6. Observe the events corresponding to all the kernels. Say, for mygraph.d_s. Go to the last but one timestamp on that kernel, and locate the stream stall begin in[1] followed by thread terminated, as the deadlock happened.

  7. You can also add –dump to the simulator options, open the .txt files, and observe the snapshot and iteration values to understand how many samples of data got processed.

For more details on the kind of events that are recorded, refer to the Trace Report section in the AI Engine Tools and Flows User Guide (UG1076).