Debug Using printf with Vector Datatypes - 2023.2 English

Vitis Tutorials: AI Engine

Document ID
XD100
Release Date
2023-11-29
Version
2023.2 English

The x86simulator supports printing vector output data value via printf(). This section talks about visualizing vector values using the x86simulator.

  1. Add the following lines in the peak_detect.cc.

    int32_t* print_ptr = (int32_t*)&v_in;
    for(int pp=0;pp<16;pp++)
       printf("Iteration-%d -> Vector-%d -> value = %d\n",i,pp,print_ptr[pp]);
    
  2. Recompile the project either by hitting the build option in the Flow navigator.

  3. Run the x86simulation, and observe the following printf statements in the console. vector printf

  4. Remove the added printf statement from the peak_detect.cc file to use it for other features.