Main Content

filProgramFPGA

Load programming file onto FPGA

    Description

    example

    filProgramFPGA(fpgaTool,programFile,chainPosition) loads a bit file onto an FPGA using the toolchain specified by fpgaTool.

    Examples

    collapse all

    Program a Xilinx® FPGA.

    First, set your system environment for accessing Xilinx tools from MATLAB® by using the hdlsetuptoolpath function.

    hdlsetuptoolpath('ToolName','Xilinx Vivado',...
                     'ToolPath','C:\Vivado\2021.1\Win\bin\vivado')

    Next, program the FPGA using the programming file /dir/mybitstream.bit at JTAG chain position 1.

    filProgramFPGA('Xilinx Vivado','/dir/mybitstream.bit',1);

    Program an Intel® FPGA.

    First, set your system environment for accessing Intel tools from MATLAB by using the hdlsetuptoolpath function.

    hdlsetuptoolpath('ToolName','Altera Quartus II',...
                     'ToolPath','C:\altera\20.1\quartus\bin\quartus.exe');

    Next, program the FPGA using the programming file /dir/mybitstream.bit at JTAG chain position 1.

    filProgramFPGA('Intel','/dir/mybitstream.bit',1);

    Input Arguments

    collapse all

    FPGA toolchain vendor, specified as 'Intel', 'Xilinx ISE','Xilinx Vivado', or 'Microsemi'.

    Data Types: char | string

    Name of the programming file to load to the FPGA, specified as a character vector or string scalar.

    Example: 'arty.runs\impl_1\design_1.bit'

    Data Types: char | string

    JTAG chain position, specified as a nonnegative integer.

    • If you specify fpgaTool as 'Xilinx ISE' or 'Xilinx Vivado', chainPosition is a required input.

    • If you specify fpgaTool as 'Intel', specifying chainPosition is optional. If you do not specify chainPosition in this case, the function assumes a value of 1.

    • If you specify fpgaTool as 'Microsemi', the function ignores chainPosition.

    Version History

    Introduced in R2011a

    See Also

    (HDL Coder)