Jump to content
  • 0

Digilent board in Xilinx System generator


Billel

Question

3 answers to this question

Recommended Posts

Hi @jpeyron

Thank you for your feedback. After searching i found this in the Help of Matlab by typing  xlDoc at the command line to open the Xilinx System Generator help documentation. 
 

Spoiler

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:

image.png.e6140f0f1064bb6091b0a4af08d84487.png

I try this for the Digilent Nexys A7 board and it work properly.

 

best regards,

Billel

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...