Register a Custom Board
To register a custom board, you must:
Define a board.
Create a board plugin.
Define a board registration function, or add the new board plugin to an existing board registration function.
Define a Board
Before you begin, have the board documentation at hand so you can refer to the details of the board.
Requirements
A board definition must be:
A MATLAB® function that returns an
hdlcoder.Board
object.The board definition function can have any name.
In its board plugin folder.
How To Define A Board
Create a new file that defines a MATLAB function with any name.
In the MATLAB function, create an
hdlcoder.Board
object and specify its properties and interfaces according the characteristics of your custom board.Optionally, to check that the definition is complete, run the
validateBoard
method.
For example, the following code defines a board:
function hB = plugin_board() % Board definition % Construct board object hB = hdlcoder.Board; hB.BoardName = 'Digilent Zynq ZyBo'; % FPGA device information hB.FPGAVendor = 'Xilinx'; hB.FPGAFamily = 'Zynq'; hB.FPGADevice = 'xc7z010'; hB.FPGAPackage = 'clg400'; hB.FPGASpeed = '-2'; % Tool information hB.SupportedTool = {'Xilinx Vivado'}; % FPGA JTAG chain position hB.JTAGChainPosition = 2; %% Add interfaces % Standard "External Port" interface hB.addExternalPortInterface( ... 'IOPadConstraint', {'IOSTANDARD = LVCMOS33'});
Create a Board Plugin
Requirements
A board plugin:
Must be a package folder that contains the board definition file.
A package folder has a
+
prefix before the folder name. For example, the board plugin can be a folder named+ZedBoard
.Must be on the MATLAB path.
Can contain one or more reference design plugins.
How To Create a Board Plugin
Create a folder that has a name with a
+
prefix.Save your board definition file to the folder.
Add the folder to your MATLAB path.
Define a Board Registration Function
Requirements
A board registration function:
Must be named
hdlcoder_board_customization.m
.Returns a list of board plugins, specified as a cell array of character vectors.
Must be on the MATLAB path.
How To Define a Board Registration Function
Create a file named
hdlcoder_board_customization.m
and save it anywhere on the MATLAB path.In
hdlcoder_board_customization.m
, define a function that returns a list of board plugins as a cell array of character vectors.For example, the following code defines a board registration function.
function r = hdlcoder_board_customization % Board plugin registration files % Format: % board_folder.board_definition_function r = {'ZyboRegistration.plugin_board'}; end
See Also
hdlcoder.Board
| hdlcoder.ReferenceDesign
Related Examples
- Register a Custom Reference Design
- Define Custom Board and Reference Design for AMD Workflow
- Define Custom Board and Reference Design for Intel Workflow
- Define Custom Board and Reference Design for Microchip Workflow