Main Content

filProgramFPGA

Load programming file onto FPGA

    Description

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

    example

    Examples

    collapse all

    Program an AMD® FPGA.

    First, set your system environment for accessing AMD 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('AMD 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', 'AMD ISE','AMD Vivado', or 'Microchip'.

    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 'AMD ISE' or 'AMD 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 'Microchip', the function ignores chainPosition.

    Version History

    Introduced in R2011a