Stealing Debug Pretty Print from Vitis HLS
2 days ago
- #Vitis HLS
- #Debugging
- #GDB
- C-simulation in Vitis HLS is used for checking functional correctness of C++ HLS code with a testbench.
- C-simulation has limitations as it misses hardware-specific issues that RTL cosimulation would catch.
- Compile times can be slow due to Vitis HLS-specific header libraries.
- Debugging can be done outside the Vitis HLS GUI using csim_design and GDB in VS Code.
- Custom GDB pretty printing scripts can be written to display human-readable values for ap_fixed types.
- Vitis GUI has built-in pretty printing for HLS vendor types like ap_fixed, ap_int, etc.
- The author found and utilized Vitis's built-in pretty print logic for better debugging.
- The complete pretty print script from Vitis can be copied and used independently of the GUI.