Example 1: Creating an Implementation Target - 2023.2 English

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2023-11-15
Version
2023.2 English
  1. In the MATLABĀ® Command Window, enter the following command:
    xilinx.environment.addCompilationTarget('Impl', 'demo')

    This provides a template derived class in the demo folder for you to edit.

  2. Open the newly created file demo\Impl\@Impl\Impl.m in the MATLAB Editor.
  3. Populate the setup_sysgen_token() function as per the requirements. Using this approach, you can control how the Model Composer Hub block should look, including the enabled/disabled fields when the user-defined custom compilation is selected.

  4. Save Impl.m.
  5. In the MATLAB Current Folder browser, right-click on the demo folder and select Add To Path > Selected Folder and Subfolders.
  6. In the MATLAB Command Window, enter the following command:
    xilinx.environment.rehashCompilationTarget

    This ensures that the updated class definition of Impl is used.

  7. Open the Model Composer Hub block in your model.
  8. On the Code Generation pane, under Hardware Description, ensure Verilog is selected.
  9. Under Implementation Strategy, select Flow_Quick. The Model Composer Hub block displays.

  10. All the user-specified files and additional Tcl commands to be run are known before the Vivado IDE project is created. The next step is to populate the pre_project_creation() function as indicated in the following figure.

  11. In the MATLAB Command Window, enter the following command:
    xilinx.environment.rehashCompilationTarget

    This ensures that the updated class definition of Impl is used.

  12. Close and then re-open the Model Composer Hub block.
  13. Select Flow_Quick from the list of Implementation strategies.
  14. Click Generate. When the process is finished, you can see the implementation results by opening the Vivado IDE project.