programFPGA
R2026bProgram FPGA and set corresponding device tree from processor on SoC board
Since R2022a
Description
Examples
Create a hardware processor object to connect to a Xilinx® SoC board. You can use the object to program your FPGA on-board the SoC
board at the MATLAB® command-line and to create an fpga (HDL Coder)
object that connects to the FPGA through the processor on the SoC board.
Create a Xilinx processor hardware object and connect to the processor on-board the Xilinx SoC board.
p = xilinxsoc('192.168.1.101', 'root', 'root');
Program the FPGA and set the corresponding device tree from processor on the SoC
board by using the xilinxsoc object function
programFPGA.
programFPGA(p, "myBitstream.bit", "myDeviceTree.dtb");
For more information on device trees, see Generate Device Tree for IP Core (HDL Coder).
Connect to the FPGA on-board the SoC board by using the fpga
function. Use the processor hardware object p as an input to the
fpga function.
f = fpga(p);
Create a hardware processor object to connect to AMD® RFSoC board.
To connect to the AMD RFSoC board, create a xilinxsoc (HDL Coder)
hardware object for the RFSoC target.
p = xilinxsoc('192.168.1.101','root','root');
Call programFPGA with the bitstream and device tree files and
specify the path to the RF initialization configuration file by using the
RFToolConfig name‑value argument. For example,
RF_Init.cfg is the RF initialization configuration file in your
workspace.
programFPGA(p,"myBitstream.bit","myDeviceTree.dtb",RFToolConfig="RF_Init.cfg");
When you program an RFSoC design, programFPGA detects the
presence of the RFDC IP in the design and applies the appropriate RFSoC programming
sequence. The function then copies the bitstream, device tree, and RF initialization
files to the target. The target reboots once and runs the RF initialization. The
workflow waits for RF initialization to complete and reports the programming
status.
Connect to the FPGA on the RFSoC board by using the fpga
function. Use the processor hardware object p as an input to the
fpga function.
f = fpga(p);
Input Arguments
Path to the bitstream file to use to program the FPGA, specified as a character vector or string scalar. You can specify one of these files types:
Specify a bitstream file located on either the host computer or in the
/mntSD card folder on the SoC board.Specify a bitstream file on the SoC board by using a
remoteFile(filePath)object, wherefilePathis the path to the file in the/mntSD card folder.Specify a bitstream file by either providing the file name when the current folder contains the file or by providing the full file path without changing directories.
Example: "myBitstream.bit" specifies a bitstream file in the
current directory on the host computer
Example: remoteFile("system.bit") specifies a bitstream file in
the current directory on the SoC board
Example: remoteFile("/mnt/refDesigns/system.bit") specifies a
bitstream file in the /mnt/refDesigns folder on the SoC
board
Device tree blob file to use to configure the processor, specified as a character vector or string scalar. You can specify one of these files types:
Specify a device tree file located on either the host computer or in the
/mntSD card folder on the SoC board.Specify a device tree file on the SoC board by using a
remoteFile(filePath)object, wherefilePathis the path to the file in the/mntSD card folder.Specify a device tree file by either providing the file name when the current folder contains the file or by providing the full file path without changing directories.
The device tree must contain nodes corresponding to resources in the bitstream that need to be accessed from the processor. For more information, see Generate Device Tree for IP Core (HDL Coder).
Example: "myDeviceTree.dtb" specifies a device tree file in the
current directory on the host computer
Example: remoteFile("devicetree.dtb") specifies a device tree file
in the current directory on the SoC board
Example: remoteFile("/mnt/refDesigns/devicetree.dtb") specifies a
device tree in the /mnt/refDesigns folder on the SoC
board
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: RFToolConfig="RF_Init.cfg"
Path to the RF initialization configuration file for RFSoC devices, specified as a character vector or string scalar. Use this argument when programming RFSoC devices that require RF data converter initialization after FPGA programming.
Example: "RF_Init.cfg"
Version History
Introduced in R2022a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)