Contenido principal

filProgramFPGA

R2026b

Load programming file onto FPGA

    Use of this function is not recommended. Use the jtagchain object and programFPGA function instead. For more information, see Version History.

    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.sof at JTAG chain position 1.

    filProgramFPGA('Intel','/dir/mybitstream.sof',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.

    You can either navigate to the folder that contains the programming file and specify only the file name, or specify the full file path directly without changing directories.

    Example: 'arty.runs\impl_1\design_1.bit' — For an AMD non-Versal® device

    Example: 'versal.runs\impl_1\design_1.pdi' — For an AMD Versal device

    Example: 'fpgaproj\design_1.sof' — For an Intel device

    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

    expand all