Specifying Board Support in System Generator - 2020.2 English

Vivado Design Suite User Guide: Model-Based DSP Design Using System Generator (UG897)

Document ID
UG897
Release Date
2020-11-18
Version
2020.2 English

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

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, Board Interface File, in the Vivado Design Suite User Guide: System-Level Design Entry (UG895). Both the Vivado Design Suite and System Generator 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, the Vivado Design Suite tools show information about the board, and enable additional designer assistance as part of IP customization, and for IP integrator designs.

To configure System Generator for using 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 System Generator:

  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.

      OR

    • 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 System Generator.

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

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

xilinx.environment.getBoardFiles

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

>> xilinx.environment.getBoardFiles

ans = 

    'C:\Data\usrBrds\arty\C.0\board.xml'
    'C:\Data\usrBrds\basys3\C.0\board.xml'
    'C:\Data\usrBrds\cmod_a7\B.0\board.xml'
    'C:\Data\usrBrds\genesys2\H\board.xml'

You can also determine what partner or custom boards are available in System Generator 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 System Generator, without having to make any changes to the startup.m file.