Data Dump - 2023.2 English

Vitis Tutorials: AI Engine (XD100)

Document ID
Release Date
2023.2 English

This feature allows you to dump and inspect data traffic at kernel ports with data types. Examine how this feature is helpful.

  1. Open the src/kernels/ file in the AI Engine component, and comment out the line if(remainder == 0).

  2. Build the project, open the $(COMPONENT_NAME)/Output/x86sim/Work/options/x86sim.options file, and update the dump feature from no to yes.

  3. Select the Run option under X86SIMULATION in Flow navigator.

  4. Once the simulation is completed, you can observe the following messages in the console.

    Processing './x86simulator_output/dump/'
    File                   Port direction  Port type  Data type  Kernel or platform port
    ---------------------  --------------  ---------  ---------  -----------------------
    mygraph_in_out_0.txt   out             iobuffer     int32[0]     
    mygraph_p_d_in_0.txt   in              iobuffer     int32[0]     
    mygraph_u_s_out_0.txt  out             iobuffer     float      mygraph.u_s.out[0]    
    mygraph_out0_in_0.txt  in              iobuffer     float[0]    
    mygraph_d_s_out_0.txt  out             iobuffer     int32      mygraph.d_s.out[0]    
    mygraph_out1_in_0.txt  in              iobuffer     int32[0]    
    mygraph_p_d_out_2.txt  out             iobuffer     float      mygraph.p_d.out[2]    
    mygraph_u_s_in_0.txt   in              iobuffer     float[0]     
    mygraph_u_s_in_1.txt   in              stream       int32[1]     
    mygraph_d_s_in_1.txt   in              stream       int32[1]     
    mygraph_p_d_out_1.txt  out             stream       int32      mygraph.p_d.out[1]    
    mygraph_p_d_out_0.txt  out             iobuffer     int32      mygraph.p_d.out[0]    
    mygraph_d_s_in_0.txt   in              iobuffer     int32[0]     
    Wrote './x86simulator_output/dump/mygraph_in_out_0.txt'
    Wrote './x86simulator_output/dump/mygraph_p_d_in_0.txt'
    Wrote './x86simulator_output/dump/mygraph_u_s_out_0.txt'
    Wrote './x86simulator_output/dump/mygraph_out0_in_0.txt'
    Wrote './x86simulator_output/dump/mygraph_d_s_out_0.txt'
    Wrote './x86simulator_output/dump/mygraph_out1_in_0.txt'
    Wrote './x86simulator_output/dump/mygraph_p_d_out_2.txt'
    Wrote './x86simulator_output/dump/mygraph_u_s_in_0.txt'
    Wrote './x86simulator_output/dump/mygraph_u_s_in_1.txt'
    Wrote './x86simulator_output/dump/mygraph_d_s_in_1.txt'
    Wrote './x86simulator_output/dump/mygraph_p_d_out_1.txt'
    Wrote './x86simulator_output/dump/mygraph_p_d_out_0.txt'
    Wrote './x86simulator_output/dump/mygraph_d_s_in_0.txt'
    Simulation completed successfully returning zero

    Observe that one text file per each port of each kernel is generated using the --dump feature and the filenames are in the format of <graph-name>_<sub-graph-class-name>_<sub-graph-instance-name>_<kernel-index>_[in]/[out]_index.txt for graph input/output files.

  5. Open the $(COMPONENT_NAME)/Output/x86sim/x86simulator_output/dump/mygraph_in_out_0.txt file, and note the Iteration and snapshot values recorded in that file. This matches with the dimensions (buffer size) specified in the graph code per iteration.

  6. Similarly, you can open the input/output of all the kernels in a graph, and observe the intermediate outputs as well as the interface ports.