Specifying Board Support in Model Composer HDL Blockset - 2022.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
Release Date
2022.1 English

When Model Composer is installed on your system as part of a Vivado Design Suite installation, Model Composer will have access to any Xilinx® development boards installed with Vivado.

Additional boards from Xilinx partners are available and a Board Interface file that defines a board (board.xml) can be downloaded from a partner website and installed as part of the Vivado Design Suite. You can also create custom Board Interface files, as detailed in Appendix A of the Vivado Design Suite User Guide: System-Level Design Entry (UG895). Both Vivado and Model Composer must be configured to add partner boards and custom boards to the repository of boards available for use.

The procedure for configuring the Vivado Design Suite for use with boards is detailed in Using the Vivado Design Suite Platform Board Flow in the Vivado Design Suite User Guide: System-Level Design Entry (UG895). The Vivado Design Suite lets you create projects using Xilinx target design platform boards (TDP), or user-specified boards that have been added to a board repository. When you select a specific board, Vivado tools show information about the board, and enable additional designer assistance as part of IP customization, and for IP integrator designs.

To configure Model Composer to use a partner board or custom board, you must add commands to MATLAB® 's startup.m file (a file you create for commands to be executed when MATLAB starts up).

To make a board available to your Simulink® models in Model Compsoer:

  1. At the MATLAB command line, enter the command which startup.m to determine if your MATLAB installation already has a startup.m file.

    The which startup.m command searches through the folders in the MATLAB search path to find a startup.m file. If there is a startup.m file in the search path, which startup.m displays the full path for the file.

  2. Proceed as follows:
    • If your MATLAB installation does have a startup.m file, enter the command edit startup.m at the command line to open the startup.m file for editing.


    • If your MATLAB installation does not have a startup.m file, create a startup.m file in a folder in the MATLAB search path and open the file for editing.

    The command path prints a listing of the folders in the search path.

  3. Enter the following commands in your startup.m file:
    addpath([getenv('XILINX_VIVADO') '/scripts/sysgen/matlab']);
    xilinx.environment.setBoardFileRepos({'<path1>', '<path2>', '...'}];

    where the addpath command specifies the location of the setBoardFileRepos utility and setBoardFileRepos points MATLAB to the location of Board Interface files. <path> is the path to a folder containing a Board Interface file (board.xml) and files referenced by the board.xml file, such as part0_pins.xml and preset.xml. The <path> can also specify a folder with multiple subdirectories, each containing a separate Board Interface file.

    For example:

    addpath([[getenv('XILINX_VIVADO')] '/scripts/sysgen/matlab']);
    xilinx.environment.setBoardFileRepos({'C:/Data/userBoards', 'C:/Data/otherBoards'});
  4. Close the startup.m file (which is in a directory in the MATLAB search path) and close Model Composer.

When you open Model Composer, each of the partner or custom boards is available as a target board (and target Xilinx device) for your Model Composer design.

To determine what partner or custom boards are available in Model Composer, enter this command in the MATLAB command window:


A listing of Board Interface files will display in the command window.

>> xilinx.environment.getBoardFiles

ans = 


You can also determine what partner or custom boards are available in Model Composer by opening a Simulink® model and double-clicking the model's System Generator token. The added boards will appear in the System Generator token properties dialog box as a Board selection:

Figure 1. Board Selection

To add an additional board to your board repository, you can modify the xilinx.environment.setBoardFileRepos line in your startup.m file to point to the location of the new Board Interface file (board.xml). If you place the Board Interface file in a subdirectory under a folder already specified in the xilinx.environment.setBoardFileRepos line, the new board will be available the next time you open Model Composer, without having to make any changes to the startup.m file.