Example 1: Creating an Implementation Target - 2022.2 English

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2023-01-13
Version
2022.2 English
  1. Open a Vitis Model Composer model, then open the Model Composer Hub block. This populates with all the available compilation targets.
  2. In the MATLAB® Command Window, modify the path as per your requirements, then enter the following command:
    xilinx.environment.addCompilationTarget('Impl', 'U:\demo')

    This provides a template derived class for you to edit.

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

    This ensures that the new compilation target is picked up by the Model Composer Hub block.

  4. Close and then re-open the Model Composer Hub block. You now see the compilation target, Impl.
  5. At this point, selecting Impl does not perform any customized operations on the Model Composer Hub block. It is equivalent to an HDL Netlist compilation target.
  6. Open U:\demo\Impl\@Impl\Impl.m in the MATLAB Editor.
  7. 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.

  8. In the MATLAB Command Window, you should enter the following command:
    xilinx.environment.rehashCompilationTarget

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

  9. Close and then re-open the Model Composer Hub block.
  10. Select Impl from the list of Compilation targets.
  11. The Model Composer Hub block displays:
  12. Observe that the Hardware description language field and the Implementation strategy field are fixed to what you set in the Impl class and are disabled for user modification.
  13. 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 below:

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

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

  15. Close and then re-open the Model Composer Hub block.
  16. Select Impl from the list of Compilation targets.
  17. Click Generate. Once the process is finished, you can see the implementation results by opening up the Vivado IDE project.