Step 1: Set Up the Example to Debug the Import Function - 2022.1 English

Vitis Model Composer Tutorial (UG1498)

Document ID
Release Date
2022.1 English
  1. Type the following at the MATLAB command prompt:
  2. Press Enter. A window opens to specify the folder location to download the examples from GitHub.

  3. Click Open after choosing the location. Once the download completes, the HTML page opens.
  4. Click HLS Examples under heading Table of Contents. This redirects you to the list of HLS Examples as shown.

  5. Click the Optical Flow. A description of the example displays.

  6. Click Open Design at the top left corner. This opens the example design.
  7. In the Vitis Model Composer examples dialog box, select optical flow and click Open example. This opens the example design.

  8. Click on the Lucas_Kanade subsystem and press Ctrl+U to look under the mask.
  9. Right-click on the Lucas-Kanade subsystem and select Mask > Look Under Mask to observe the calculating-roots block.

    Note: This block has been generated using the xmcImportFunction feature. Its function declaration can be seen by double-clicking on the block.

  10. To view the function definition of calculating_roots, navigate to the current folder in the MATLAB window and double-click on calculating_roots.h.

The setup is now ready for you to debug your C/C++ code. In the next step, you will see how to debug the code using GDB tool debugger.