Example 1: Creating an Implementation Target - 2022.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2022-05-26
Version
2022.1 English
  1. Open a Model Composer model, then open the System Generator token. This populates the token 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 System Generator token.

  4. Close and then re-open the System Generator token. You now see the compilation target, Impl on the token as shown in the following figure.

  5. At this point, selecting Impl does not perform any customized operations on the System Generator token. 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 System Generator token 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 System Generator token. Select Impl from the list of Compilation targets.
  10. The System Generator token appears as follows:

  11. 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.
  12. 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:

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

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

  14. Close and then re-open the System Generator token. Select Impl from the list of Compilation targets.
  15. Click Generate. Once the process is finished, you can see the implementation results by opening up the Vivado IDE project.