Main Content

USB Ethernet AXI Manager

Access on-board memory locations from MATLAB® using Ethernet over a universal serial bus (USB) interface. To run AXI manager over a USB Ethernet interface, follow these instructions.

Note

AXI manager supports the USB Ethernet interface for the Xilinx® Zynq® UltraScale+™ MPSoC ZCU102 Evaluation Kit only.

  1. Set up hardware board

    1. Copy the compatible secure digital (SD) card image files for the hardware board to an SD card drive path. You can use the Hardware Setup tool or the copyImageToHostSDCardPath or loadImageToTargetSDCardPath function to perform this step.

    2. Set the jumpers on the hardware board to configure the USB interface in peripheral mode.

    3. Connect the USB cable between the host computer and the target board.

  2. Set up host computer

    1. Windows® only — Install the USB Ethernet drivers.

    2. Configure the IP address of the USB Ethernet or RNDIS gadget in the host computer after the SD card is booted on the hardware board.

  3. Perform AXI manager read and write operations

    1. Use the loadBitstream function to load the BIT and DTB files based on your FPGA design.

    2. Create an aximanager object. Specify the Interface property as 'USBEthernet'.

    3. Perform write and read operations.

The setup steps are automated in the Hardware Setup tool. See Guided Hardware Setup.

Complete Hardware Checklist

Confirm that you have all required hardware and accessories to complete the hardware setup.

  • USB 3.0 cable (USB 3.0 Type-A to Micro-B cable for the ZCU102 board) — This connection is necessary for transmitting data, such as a programming file, from the host computer to the hardware board. It is also necessary for sending and receiving signals to and from the hardware.

    Note

    USB 2.0 is also supported but provides lesser data throughput than the USB 3.0 cable.

  • SD card reader and writable SD card with a capacity of 4 GB or larger – If the host machine does not have an integrated card reader, use an external USB SD card reader.

  • Supported hardware – You must have ZCU102 board. Do not connect or turn on the device until you are prompted at a later step.

  • Power supply adapter – This cable connects the hardware to the host.

Copy Image to SD Card in Host Computer

Copy the compatible SD card image files for the hardware board to an SD card drive path. This SD card image is included with the support package. The image includes the embedded software and the FPGA programming file necessary for using the hardware board as an I/O peripheral. If you have already copied the SD card with the required image, skip this step.

  1. Insert a 4 GB or larger SD card into the card reader on the host computer. The card must be in FAT32 format.

    Unlocked SD card and reader slot

    Note

    Unlock the SD card before downloading the firmware image to the card. Keep the card unlocked while the card is in the board card reader.

  2. Use the copyImageToHostSDCardPath function to copy the board-specific SD card image files to the specified SD card drive location in the host computer. The SD card image files contain a bootloader and supported operating system information. This function also copies the server daemon for handling the AXI manager host commands on the target hardware board.

    If you use the Hardware Setup tool to set up your hardware board, this step is automated. See Select a Drive and Load Firmware.

    This example copies a default SD card image to the G: drive location on the host computer for the ZCU102 board. Specify the IP address of the USB Ethernet gadget on the hardware board in dotted quad format followed by usb0/. This example sets the IP address of the USB Ethernet gadget on the ZCU102 board to 192.168.3.2.

    copyImageToHostSDCardPath('ZCU102','G:', ...
    'DeviceAddress','usb0/192.168.3.2');

Update SD Card Image in Hardware Board (Optional)

If you have already copied the SD card image files by using the process in Copy Image to SD Card in Host Computer, skip this step.

Use the loadImageToTargetSDCardPath function to update the SD card image onto the hardware board. Before proceeding with this step, ensure that the SD card is inserted in the target hardware board SD card location and that an Ethernet connection is established between the host computer and the target hardware board. This function uses the processing system (PS) Ethernet connection to load the SD card image files.

The loadImageToTargetSDCardPath function updates the existing board-specific SD card image files on the hardware board. You might need to wait for at least 20 seconds for the SD card to update.

This example copies a default SD card image to the target hardware board SD card location for the ZCU102 board with the default PS Ethernet IP address 192.168.0.2. Specify the IP address of the USB Ethernet gadget on the hardware board in dotted quad format followed by usb0/. This example sets the IP address of the USB Ethernet gadget on the ZCU102 board to 192.168.3.2.

loadImageToTargetSDCardPath('ZCU102', ...
'DeviceAddress','usb0/192.168.3.2');

This example copies a default SD card image to the target hardware board SD card location for the ZCU102 board with the PS Ethernet IP address 192.168.1.2. The example sets the IP address of the USB Ethernet gadget on the hardware board to 192.168.3.2.

loadImageToTargetSDCardPath('ZCU102', ...
'DeviceAddress',{'192.168.1.2','usb0/192.168.3.2'});

Set Jumper Switches

Set the jumpers on the hardware board to configure the USB cable in peripheral mode. Make sure that the board is turned off. The jumper settings are different for each board. To learn more about the settings, see the board documentation.

Set Jumpers on ZCU102

Set SW6 and other jumpers to the values in this table. The SW6 jumper settings make it so that the board starts up from the SD card.

SW6 SwitchSW6 Switch Position
1Up
2Down
3Down
4Down

SW6 switch positions on the ZCU102 board

Set the J7, J113, J110, and J109 jumpers to the values in this table. These settings set up the hardware board so that it can communicate with the host computer over a USB Ethernet interface.

JumperJumper Position
J7Off
J1131-2
J1101-2
J109No jumper

Jumper positions on the ZCU102 board to configure the USB in peripheral mode

Connect Hardware

Follow these instructions for connecting the hardware. The Hardware Setup tool provides labeled pictures of the steps for the board.

  1. Remove the SD card from the host computer and insert it into the hardware board.

  2. Connect a USB cable to the board. Connect the other end of the USB cable to the host computer.

  3. Connect the power cable.

  4. Turn the power on.

ZCU102 hardware board connections for the USB Ethernet interface

Install USB Ethernet Drivers

This step is required only for the Windows operating system.

You must install the USB Ethernet drivers before you use AXI manager with a USB Ethernet connection. To install the drivers, in the Hardware Setup tool, on the Install Drivers screen, click Install Driver. The installation process might require system administrator privileges.

Configure USB on Host Computer

You must configure the host computer so that it can communicate with the hardware board. After you boot the SD card on the target hardware board, the board appears as the bat365® USB Ethernet or RNDIS gadget on the host computer.

If you use the Hardware Setup tool, select the USB Ethernet or RNDIS gadget that you want to connect with the hardware board. See Configure USB on Host Computer. If you have already configured the USB Ethernet gadget, skip this step.

Note

The guided setup supports the USB configuration on the Windows operating system only. For the Linux® operating system, you must configure the USB Ethernet gadget manually.

To manually configure the host computer, follow the steps for your specific operating system.

Configure Windows

Follow these instructions for Windows 7 or later.

  1. From the Start menu, click Control Panel.

  2. Set View by to Category.

  3. Click Network and Internet.

  4. Click Network and Sharing Center.

  5. On the left pane, click Change adapter settings.

  6. Right-click the USB Ethernet connection that is connected to the hardware board and select Properties.

  7. On the Networking tab of the Properties dialog box, clear all options except Internet Protocol Version 4 (TCP/IPv4). Other services, particularly antivirus software, can cause intermittent connection problems with the hardware board.

  8. Double-click Internet Protocol Version 4 (TCP/IPv4).

  9. On the General tab, select Use the following IP address.

  10. The default IP address of the hardware board is 10.10.10.2. The host network connection must be on the same subnet as the hardware board. To meet this requirement, a compatible IP address must be assigned to the host network connection. Set the host network IP address to 10.10.10.x, where x is either 1 or an integer in the range [3, 255].

    If the first three octets of the IP address field are not 10.10.10, then your hardware board is on another subnet. Enter the same subnet number in the IP address.

  11. Leave the subnet mask set to the default value of 255.255.255.0.

  12. Click OK.

Configure Linux

Set the host USB Ethernet interface to have a static IP address. This configuration enables communication with the hardware board. The default IP address of the hardware board is 10.10.10.2. The host network connection must be on the same subnet as the hardware board. To meet this requirement, you must assign a compatible IP address to the host network connection.

  1. Set the host network IP address to 10.10.10.x, where x is either 1 or an integer in the range [3, 255]. Set this value by using the ifconfig command. For example, enter this command in the shell.

    % sudo ifconfig usbZ 10.10.10.4 netmask 255.255.255.0 

    In this syntax, usbZ is the name of the host USB port (usually usb0, usb1, and so on). To use the sudo command, you might have to enter a password.

  2. Confirm the changes by entering this command in the shell.

    % ifconfig usbZ

    usbZ is the name of the host USB port you set in the previous step.

Load Bitstream File to Hardware Board

Use the loadBitstream function only if you have a new FPGA design to load on the target hardware board. Otherwise, skip this step.

This function loads the custom FPGA bitstream file and its corresponding device tree blob (DTB) file to the target hardware board. You might need to wait for at least 20 seconds for the target hardware board to reflect your changes.

This example loads a custom FPGA bitstream and its corresponding DTB file to the ZCU102 board with a USB Ethernet IP address that is different from the default value.

loadBitstream('ZCU102','design.bit', ...
'devicetree.dtb', ...
'DeviceAddress','192.168.3.2');

When the program is running on your hardware board, you can communicate with the board by creating an aximanager object. To access the subordinate memory locations on the board, use the readmemory and writememory object functions.

See Also

Objects

Functions

Related Topics