Main Content

Setup for Vision Hardware

Before you can use the features in the Vision HDL Toolbox™ Support Package for Xilinx® Zynq®-Based Hardware, you must establish communication between the host and the hardware. After the installer completes the support package installation, it guides you through establishing communication with the hardware. This also page provides alternate manual setup instructions for each step.

If the support package is already installed, you can start the hardware setup by opening the Add-On Manager.

On the MATLAB tool bar, from the Add-Ons menu, select Manage Add-Ons.

In the Add-On Manager, start the hardware setup process by clicking the Gear icon .

The setup process includes these steps:

  1. Specify which Zynq development board and FMC card you are using.

  2. Configure the network interface card in the host computer.

  3. Copy programming files for the board to an SD card.

  4. Configure your board to start up from the SD card.

  5. Connect your hardware to the host computer.

  6. Verify the connection between host and hardware.

Notes

  • The host computer can be a desktop or a laptop. It must have at least one dedicated Gigabit Ethernet network interface card (NIC) for connecting to the hardware.

  • These instructions assume that you are installing the support package on only one computer and have only one NIC.

  • You can use a USB3 to Gigabit Ethernet LAN adapter instead of a NIC. The instructions are the same.

  • Do not connect or turn on the board until you are prompted.

  • Turn off antivirus, firewall, or other port-blocking software. It can interfere with communication to the Zynq hardware.

  • Because the software runs OS commands for configuring the NIC, you might require administrator privileges for the hardware setup. Start MATLAB® using Run as administrator.

  • If you are running utility software to configure the network (typically done on laptops), exit or uninstall the software. This type of software can interfere with the network configuration required to perform this setup.

Step 1. Setup Checklist

The guided setup wizard displays a checklist of the hardware to have ready. Confirm that you have the hardware required to complete the setup and configuration process.

  • Zynq development board (ZCU106, ZCU102, PicoZed™ 7030, ZC702, ZC706, or ZedBoard™)

  • HDMI I/O card (FMC-HDMI-CAM or FMC IMAGEON) or MIPI® camera card (LI-IMX274MIPI-FMC)

  • Dedicated Gigabit Ethernet network interface card or USB 3.0-Gigabit Ethernet adapter dongle

  • SD card and SD card reader

  • Ethernet cable

Note

If you do not use an Ethernet adapter that supports full Gigabit Ethernet throughput, captured video frames can be corrupted.

Do not connect or turn on the board until you are prompted at a later step.

Step 2. Select Hardware

If you are running the guided setup, choose your board and FMC card combination from the list. The MIPI FMC card is supported only with the ZCU106 board.

Step 3. Configure NIC on Host Computer

This step configures the host computer so that it can communicate with the hardware. You must have a dedicated Gigabit Ethernet NIC for the hardware, with an Ethernet cable connecting the card to your hardware. If you also want simultaneous internet access, and you do not have a wireless connection, your host computer requires a second Ethernet NIC.

Configure the NIC for your operating system by following the Guided Setup or either Manually Configure Windows Host or Manually Configure Linux Host.

Guided Setup

In the guided setup, select the NIC that you want to connect with the hardware. If you have already configured the NIC, select Skip this step if your network card is already configured for communicating with the hardware.

The list displays the connected NICs detected on your computer. The menu options note each NIC as (In Use) or (Available). The installer marks a NIC as (In Use) when the NIC is connected to a device and an IP address is assigned to it.

If you do not see your NIC listed, click Refresh to trigger the NIC detection and refresh the list. Refreshing the list is useful when, for example, you plug in a USB Ethernet adapter dongle while viewing this pane.

  • If all the NICs listed are in use, free up a NIC for use with the hardware, and then click Refresh.

  • If the NIC list is empty, it is possible that VMWare software, if present, is interfering with NIC detection. To get an accurate list of NICs on your computer, remove the VMWare.

  • Check if the missing NIC is disabled in the control panel. If it is disabled, enable it.

Optionally, specify an IP address for your board. When you click Next, the software configures the NIC.

Manually Configure Windows Host

Configure the Ethernet NIC for your hardware.

  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 NIC is available, the local area connection appears as Unidentified network.

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

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

    • You can use a pluggable USB to Gigabit Ethernet LAN adapter instead of a NIC. The instructions are the same.

  7. On the Networking tab of the Properties dialog box, clear all options except Internet Protocol Version 4 (TCP/IPv4). Other services 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. Determine the correct address for your board. The default IP address of the board is 192.168.4.2. The subnet, that is, the first three octets of the host IP address must match the IP address of the board.

  11. Set the host IP address, for example, 192.168.4.1.

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

  13. Click OK.

When you finish configuring the IP address, go to Step 4. Select a Drive and Load Firmware. Before you can communicate with the hardware, you must download the FPGA image.

Manually Configure Linux Host

Set the host Ethernet NIC so that it has a static IP address. This configuration enables communication with the board.

  1. Determine the correct address for your board. The default IP address of the board is 192.168.4.2. The subnet, that is, the first three octets of the host IP address must match the IP address of the board.

  2. Set the host IP address, for example, 192.168.4.1, and set the subnet mask to 255.255.255.0. Set these values using the ifconfig command.

    % sudo ifconfig ethZ 192.168.4.1 netmask 255.255.255.0 up

    In this syntax, ethZ is the name of the host Ethernet port. This name is usually eth0, eth1, and so on.

    To use the sudo command, you might need to enter a password.

  3. To confirm the changes, enter the following command in the shell:

    %ifconfig ethZ

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

Step 4. Select a Drive and Load Firmware

Next, the installer must write an FPGA image to an SD card. This FPGA image is included with the support package. It includes the embedded software and the FPGA programming file necessary for using the hardware as an I/O peripheral.

  1. Insert a 4 GB or larger SD card into the card reader on the host computer. The card must be formatted with FAT32 format. Select the appropriate drive from the list. If you have already downloaded the FPGA image, you can skip this step.

    Unlocked SD card and reader slot

    Note

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

  2. Write the FPGA image to the SD card.

    • In the guided setup, select the location of the SD drive containing the card, then click Next. On the next screen, to copy the programming file from the host computer to the SD card, click Write. Any existing data on the card is erased during this process.

    • For manual setup, at the MATLAB command prompt, use these commands to write the card image. This example shows a Linux® path and an HDMI card. If you are using Windows®, replace the path of the drive with the letter of the card slot, such as E:. If you are using a MIPI card, replace the projName assignment with

      projName = ['visionzynq-',lower(boardType),'-imx274mipi'];

      spkgRootDir = visionzynq.internal.getSpPkgRootDir;
      boardType = 'ZC706'; 
      projName = ['visionzynq-',lower(boardType),'-hdmicam'];
      
      sdcardDir = fullfile(spkgRootDir,'bin','target','sdcard',projName);
      drive = '/dev/sda' ;  % specify the drive path
      
      copyfile(sdcardDir,drive,'f');
      

Step 5. Set Jumper Switches

Configure the jumpers on the Zynq board so that you can use it as a peripheral device. These jumper settings make it so that the board starts up from the SD card. Make sure that the board is turned off.

The jumper settings are different for each board.

Set Jumpers on ZCU106

SW6 Switch Positions

SwitchSwitch Position
1Up
2Down
3Down
4Down

SW6 switch positions on the ZCU106 board

Set Jumpers on ZCU102

SW6 Switch Positions

SwitchSwitch Position
1Up
2Down
3Down
4Down

SW6 switch positions on the ZCU102 board

Set Jumpers on PicoZed 7030

SW1 Switch Positions

SwitchSwitch Position
5Right
6Right

SW1 switch positions on the PicoZed board

Set Jumpers on ZC702

JTAG Select Jumper Positions

SwitchSwitch Position
TopLeft
BottomRight

SW10 Jumper Positions

SwitchSwitch Position
1Down
2Down
3Up
4Up
5Down

JTAG Select and SW10 switch positions on the ZC702 board

Set Jumpers on ZC706

SW11 Jumper Positions

SwitchSwitch Position
1Down
2Down
3Up
4Up
5Down

Pins

Set pins 1, 2, and 5 low, and pins 3 and 4 high. The pins are located near the Ethernet LEDs.

SW11 switch and pin positions on the ZCU106 board

Set Jumpers on ZedBoard

Jumper Positions

SwitchSwitch Position
1Down
2Up
3Up
4Down
5Down

Jumper positions on the ZedBoard

Step 6. Connect Hardware

Follow the instructions for connecting the hardware. These steps are labeled in the pictures of each board.

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

  2. Plug the HDMI FMC card or the MIPI FMC card into the FMC connector on the Zynq board.

  3. Connect an Ethernet cable to the board. Connect the other end of the Ethernet cable to the NIC selected previously.

  4. Connect the power cable.

  5. If using an HDMI card, connect an HDMI cable between the HDMI-Out port on the Zynq board and a monitor.

  6. If using an HDMI card, connect an HDMI cable between the HDMI-In port on the Zynq board and an HD camera.

  7. Turn on the power.

  8. Wait until you see the LEDs indicating the readiness of the hardware. Then, wait an additional 20 seconds for the board to boot its operating system and set up communication with the host machine.

    BoardReady Lights
    ZCU106DONE (DS32) (Green, steady)
    ZCU102 (near push buttons)DONE (Green, steady)

    PicoZed 7030 (on carrier board, near JA1 PMOD connector)

    FPGA DONE (Blue, steady)

    ZC702 (near cell battery)DONE (DS3) (Green, steady)
    ZC706 (near power switch)DONE (Green, steady)

    ZedBoard (near DIP switches)

    DONE (LD12) (Blue, steady)

    If the LEDs do not light up as indicated after one minute, press the reset switch and restart the board.

Connect ZCU106 Hardware and HDMI Card

ZCU106 and HDMI card hardware connections

Connect ZCU106 Hardware and MIPI Card

ZCU106 and MIPI card hardware connections

Connect ZCU102 Hardware

ZCU102 hardware connections

Connect PicoZed 7030 Hardware

PicoZed hardware connections

Connect ZC702 Hardware

ZC702 hardware connections

Connect ZC706 Hardware

ZC706 hardware connections

Connect ZedBoard Hardware

Step 7. Verify Setup

The guided setup runs a small example to test the hardware connection. Before running the example, ensure that the board is turned on and indicating that it is ready for traffic (see the previous step).

If you have installed the Embedded Coder® Support Package for Xilinx Zynq Platform, the setup tool also registers the root folder for cross-compilation at this step.

If you have not installed the Embedded Coder Support Package for Xilinx Zynq Platform, and you plan to target the ARM processor, you must perform an additional setup step after you install the Embedded Coder support package.

To test the hardware connection after manual setup, create a visionzynq object. Specify the board you have installed as an input argument. You can optionally specify an IP address that the object assigns to the board. By default, the board is assigned '192.168.4.2'. If the object cannot connect to the board, it returns an error.

visionzynq('ZC706 FMC-HDMI-CAM')

If the configuration is correct and the connection is successful, you see a status message for the visionzynq object.

ans = 


visionzynq

   Device Information:
       DeviceName: 'ZC706 FMC-HDMI-CAM'
    DeviceAddress: '192.168.4.2'
         Username: 'root'
         Password: 'root'
             Port: 22

If the connection is not successful, the most common reasons are that the board is not connected properly or it is not turned on. Check the cable connections and power switch and try again.

To confirm that you can capture video data into Simulink®, run the Getting Started with Vision Zynq Hardware example or the Getting Started with MIPI Sensor example. Observe the video display in Simulink. If you have the HDMI FMC card, you can optionally observe the video result on an HDMI output connected to the board.

Step 8. Setup for ARM Targeting

If you plan to generate embedded code for the processor on the Zynq board, you must register the root folder for cross-compilation and create a connection to the Zynq board. Follow the additional steps in Setup for ARM Targeting.

Related Examples

More About