Main Content

Ethernet AXI Manager for AMD Zynq SoC Devices

Note

Ethernet AXI master has been renamed to Ethernet AXI manager. In the software and documentation, the terms "manager" and "subordinate" replace "master" and "slave," respectively.

To implement the HDL Verifier™ Support Package for AMD FPGA Boards and SoC Devices features, you must configure the host computer and the hardware for proper communication. After you install the support package, follow these steps to manually set up the hardware.

Complete Hardware Checklist

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

  • Gigabit Ethernet connection – This connection is often referred to as a network connection. You can use either an integrated network interface card (NIC) with a Gigabit Ethernet cable or a universal serial bus (USB) 3.0 Gigabit Ethernet adapter dongle. This connection is necessary for transmitting data, such as a programming file, from the host computer to the hardware. It is also necessary for sending and receiving signals to and from the hardware.

  • SD card reader and writable SD card – If the host machine does not have an integrated card reader, use an external USB SD card reader.

  • Supported hardware – This feature provides support to AMD® Zynq®-7000 ZC706 and AMD Zynq ZedBoard™ boards. Do not connect or turn on the device until you are prompted at a later step.

  • Ethernet cable – This cable connects the hardware to the host.

Configure Host Computer

To connect the hardware to the host, you must configure an available network connection for the hardware on the host. 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 local area network connection that is connected to the hardware and select Properties.

    • If an unused network connection is available, the local area connection appears as Unidentified network.

    • If you plan to repurpose your network connection, select the local area connection that you plan to use for the hardware.

    • If you have only one network connection, check if you can connect wireless to the existing local area network. You can use the network connection for the hardware.

    • You can use a pluggable USB to Gigabit Ethernet LAN adapter instead of a NIC.

  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.

  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 is 192.168.0.2. The host network connection must be on the same subnet as the hardware. To meet this requirement, make sure to assign a compatible IP address to the host network connection. Set the host network IP address to 192.168.0.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 192.168.0, then your hardware 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 Ethernet interface to have a static IP address. This configuration enables communication with the hardware. The default IP address of the hardware is 192.168.0.2. The host network connection must be on the same subnet as the hardware. To meet this requirement, you must assign a compatible IP address to the host network connection.

  1. Set the host network IP address to 192.168.0.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 ethZ 192.168.0.4 netmask 255.255.255.0 

    In this syntax, ethZ is the name of the host Ethernet port (usually eth0, eth1, 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 ethZ

    ethZ is the name of the host Ethernet port you set in the previous step.

Copy Image to SD Card in Host System

You need an SD memory card that is configured with the firmware of this support package. The firmware includes the embedded software and the FPGA programming file necessary for using the hardware 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 memory card into the memory card reader on the host computer.

  2. Use the copyImageToHostSDCardPath function to copy the board-specific SD card image files to the specified SD card drive location in the host system. 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 SoC device.

    The default SD card image is the SD card files that come with the HDL Verifier Support Package for AMD FPGA Boards and SoC Devices. A custom SD card image is a user-created SD card files.

    Examples

    To copy a default SD card image to a specified location on the host computer on a Windows platform for an AMD Zynq-7000 ZC706 board with a default IP address, enter this code at the MATLAB command prompt.

    copyImageToHostSDCardPath('ZC706','G:');

    To copy a default SD card image to a specified location on the host computer for an AMD Zynq-7000 ZC706 board with a custom IP address and specify the gateway on a Linux® platform, enter this code at the MATLAB® command prompt. Set the host NIC address to 192.168.10.x, where x must be an integer in the range [1, 3] or [5, 255].

    copyImageToHostSDCardPath('ZC706','/media/username/261D-2F2B', ...
       'DeviceAddress','192.168.10.4','Gateway','192.168.10.1');

    To copy a custom SD card image to a specified location on the host computer for an AMD Zynq-7000 ZC706 board with a default IP address on a Windows platform, enter this code at the MATLAB command prompt.

    Before running this command, if your custom SD image is in a zipped format, such as .zip, .tgz, or .gz, extract zipped format files to a specific folder or directory in your host system.

    copyImageToHostSDCardPath('ZC706','G:','SDCardImage', ...
       'C:\mywork\hdlv_prj\sdcard_image\zc706_sdcard_zynq7000');

Update SD Card Image in SoC Device (Optional)

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

Use the loadImageToTargetSDCardPath function to update the SD card image in the SoC device. Before proceeding with this step, ensure that the SD card is inserted in the target SoC device SD card location and that an Ethernet connection is established between the host system and the target SoC device.

This function updates the existing board-specific SD card image files in the SoC device. You might need to wait for at least 20 seconds for the SD card to update.

Examples

To copy a default SD card image to the target SoC device SD card location, enter this code at the MATLAB command prompt.

loadImageToTargetSDCardPath('ZC706');

To copy a custom SD card image to the target SoC device SD card location for an AMD Zynq-7000 ZC706 board with the default IP address on a Windows platform, enter this code at the MATLAB command prompt.

Before running this command, if your custom SD image is in a zipped format, such as .zip, .tgz, or .gz, extract zipped format files to a specific folder or directory in your host system.

loadImageToTargetSDCardPath('ZC706','SDCardImage', ...
   'C:\mywork\hdlv_prj\sdcard_image\zc706_sdcard_zynq7000');

To copy a default SD card image to a specified location on the host computer for an AMD Zynq-7000 ZC706 board with an IP address that is different from the default value, enter this code at the MATLAB command prompt.

loadImageToTargetSDCardPath('ZC706', ...
   'DeviceAddress','192.168.10.2','Gateway','192.168.10.1');

Generate DTB File

Generate a device tree blob (DTB) file for your SoC device by following these instructions.

  1. Log into the Linux operating system running on the target SoC device.

  2. Navigate to the /mnt path.

  3. Convert an existing DTB file into a corresponding human-readable device tree source (DTS) file by entering this command in the terminal.

    dtc -I dtb -O dts dtb_file.dtb -o devicetree.dts

    Where dtb_file is the name of your existing DTB file, for example, devicetree.dtb.

    To generate a DTB file, you need a device tree compiler (DTC) on a Linux operating system. If a DTC is not installed, get the DTC source code and cross-compile to ARM®.

  4. Open the converted DTS file by entering this command in the terminal.

    vi devicetree.dts
  5. Edit the DTS file to provide the FPGA memory information.

    Examples

    The design address mapping in these examples consists of the following separate memory-mapped regions.

    Memory-Mapped RegionBase AddressRange
    PS DDR — mw_psddr_mem00x140000000x4000000 (64 MB)
    BRAM — mw_axi_bram_ip00x400000000x80000 (512 KB)
    PL DDR — mw_plddr_mem00x600000000x1000000 (16 MB)

     Device-tree nodes for a 32-bit ARM Cortex-A9 based Zynq SoC devices

     Device-tree nodes for a 64-bit ARM Cortex-A53 based MPSoC devices

    You can also compile a DTB file and edit a DTS file on the host Linux machine, but it gives a few warnings while compilation. You can ignore such warnings.

  6. After you edit the DTS file, to generate a DTB file, enter this command in the terminal.

    dtc -I dts -O dtb devicetree.dts -o devicetree_sharedmem_iio.dtb
  7. After successful generation of a DTB, transfer the devicetree_sharedmem_iio.dtb file from the /mnt file system path on the target SoC device to the home directory path on the host machine.

You can now load this modified DTB file to the target SoC device. Use the loadBitstream function to load the custom FPGA bitstream and DTB files.

Load Bitstream File to SoC Device

Use the loadBitstream function only if you have any new FPGA design to load on the target SoC device. Otherwise, skip this step.

This function loads the custom FPGA bitstream file and its corresponding DTB file to the target SoC device. You might need to wait for at least 20 seconds to get the changes updated to the target SoC device.

Examples

To load a custom FPGA bitstream and its corresponding DTB file to the target SoC device for an AMD Zynq-7000 ZC706 board with a default IP address, enter this code at the MATLAB command prompt.

loadBitstream('ZC706','C:\mywork\hdlv_bitstreams\system.bit', ...
   'C:\mywork\hdlv_bitstreams\devicetree.dtb');

To load a custom FPGA bitstream and its corresponding DTB file to the target SoC device for an AMD Zynq-7000 ZC706 board with an IP address that is different from the default value, enter this code at the MATLAB command prompt.

loadBitstream('ZC706','C:\mywork\hdlv_bitstreams\system.bit', ...
   'C:\mywork\hdlv_bitstreams\devicetree.dtb', ...
   'DeviceAddress','192.168.10.2');

Once the program is running on your FPGA board, you can create an AXI manager object by using the aximanager object. To access the subordinate memory locations on the board, use the readmemory and writememory object functions of this object.

See Also

| | |

Related Examples

More About