Main Content

xilinxsoc

Connection to processor on Xilinx SoC board

    Description

    The xilinxsoc object represents a connection from MATLAB® to the processor on a Xilinx® SoC board . Use this object to perform basic Linux® shell operations, program your FPGA at the MATLAB command-line, and create an fpga object that connects to the FPGA through the processor on the Xilinx SoC board.

    Creation

    Description

    p = xilinxsoc creates a connection to the Xilinx SoC hardware board. This connection reuses the IP address or host name, user name, and password from the most recent connection to a specified Xilinx board. When you connect MATLAB to a Xilinx board for the first time, enter the host name or IP address, user name, and password of the Xilinx board.

    example

    p = xilinxsoc(ipaddress, username, password) creates a connection to the Xilinx board by using the IP address, user name, and password that you specify.

    p = xilinxsoc(hostname, username, password) creates a connection to the Xilinx board by using the host name of the board, user name, and password that you specify.

    Input Arguments

    expand all

    IP address of the Xilinx board connected to the network, specified as a character vector or string scalar. If no IP address is specified, the most recently specified IP address is used.​

    Example: '192.168.1.101'

    User name to log into the Xilinx board over SSH, specified as a character vector or string scalar. If no user name is specified, the most recently specified user name is used. The default user name is "root".

    Example: 'root'

    Password used to log into the Xilinx board over SSH, specified as a character vector or string scalar. If no password is specified, the most recently specified password is used​. The default password is "root".

    Example: 'root'

    Host name of the Xilinx board connected to the network, specified as a character vector or string scalar.

    Example: 'myhost.mydomain.com'

    Output Arguments

    expand all

    Connection from MATLAB to the processor on a Xilinx SoC hardware board, returned as a xilinxsoc object. You can use this connection to interact with the hardware board and attached devices, such as the FPGA on-board the SoC board.

    Properties

    expand all

    IP address or host name of the Ethernet port on the Xilinx board.

    This property is read-only and cannot be changed after you create the xilinxsoc object.

    Example: '192.168.1.101'

    Data Types: char

    User name to log into the Xilinx board over SSH. If no user name is specified, the most recently specified user name is used. The default user name is 'root'.

    Example: 'root'

    Data Types: char

    Object Functions

    Use the object functions to interact with your SoC device.

    systemRun command in Linux shell on SoC board
    getFileTransfer file from SoC board to host computer
    putFileTransfer file from host computer to SoC board
    deleteFileDelete file on SoC board
    dirList directory contents on SoC board
    programFPGAProgram FPGA and set corresponding device tree from processor on SoC board

    Examples

    collapse all

    Create a hardware processor object to connect to a Xilinx SoC board. You can use the object to perform basic Linux shell operations 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');

    Run the uname command in a Linux shell on the SoC board by using the xilinxsoc object function system.

    system(p, 'uname')
    ans =
    
       'Linux'

    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);

    Version History

    Introduced in R2022a

    See Also

    |