UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 65369

2015.2 - QEMU - How can I use two GEM on Zynq in QEMU

Description

My Zynq-7000 AP SoC system uses two Ethernet interfaces. Is it possible to use both interfaces in the QEMU environment?

Solution

Yes, this is possible. Follow the steps below to set this configuration up.

These steps assume that you are using PetaLinux to build your Linux system and then launch QEMU.


1) Using the Processing System7 IP configuration wizard in the Vivado IP Integrator block diagram, enable the two GEM interfaces:

2) Export the hardware definition into a new PetaLinux project.

3) Update the system-top.dts in <PLNX_PROJECT_ROOT>\subsystems\linux\configs\device-tree with the nodes below:

/dts-v1/;
/include/ "system-conf.dtsi"
/ {
};
&gem0 {
        phy-handle = <&phy0>;
        ps7_ethernet_0_mdio: mdio {
                phy0: phy@7 {
                        compatible = "marvell,88e1116r";
                        device_type = "ethernet-phy";
                        reg = <7>;
                };
        };
};
&gem1 {
        phy-handle = <&phy1>;
        ps7_ethernet_1_mdio: mdio {
                phy1: phy@7 {
                         compatible = "marvell,88e1116r";
                         device_type = "ethernet-phy";
                         reg = <7>;
                };
        };
};


Note: This device tree configuration is that it does represent the structure of actual hardware.

In real Zynq-7000 silicon, the MDIO interface is shared when both GEM interfaces are routed via MIO.

In the special case of the QEMU model, both GEM interfaces are treated separately with unique MDIO buses.


4) Build the PetaLinux image using petalinux-build and boot QEMU with the petalinux-boot --qemu command.

By default eth0 will be up. 


5) Use ifconfig eth1 up to bring up the second Ethernet interface.

AR# 65369
Date Created 09/09/2015
Last Updated 09/10/2015
Status Active
Type General Article
Devices
  • Zynq-7000
Tools
  • Vivado Design Suite - 2015.2
  • PetaLinux
  • PetaLinux - 2015.2