programFPGA
Program FPGA and set corresponding device tree from processor on SoC board
Since R2022a
Description
Examples
Program FPGA on Xilinx SoC Board
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
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.
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);
Input Arguments
bitFile
— Bitstream file
character vector | string scalar
Path to the bitstream file used to program the FPGA. This file must be present on the host computer.
Example: "myBitstream.bit"
dtbFile
— Devicetree blob file
character vector | string scalar
Devicetree blob file used to configure the processor. If the file is present on the
host computer at the specified path, it is copied from the host computer to the SoC
board. If the file is not present on the host computer, it must be present in the SD
card folder /mnt
on the SoC board.
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.
Example: "myDeviceTree.dtb"
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)