element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
ZedBoard Hardware Design Understanding Ethernet on Zedboard
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 8 replies
  • Subscribers 327 subscribers
  • Views 6133 views
  • Users 0 members are here
Related

Understanding Ethernet on Zedboard

Former Member
Former Member over 10 years ago

Hi Everyone!



I am  not very experienced with the Zedboard and having a ruff time understanding the infrastructure around the Ethernet functionality on the Zedboard.



I have read the related chapters in the following documents, but so far I was not able to put it all together.



1 Zedboard HW User Guide Version 1.1
2 UG585 (v1.10) February 23, 2015
3 various posts such as:
http://zedboard.org/content/redirecting-peripherals-mio-emio



So, as far as I understand there is a Marvell Ethernet PHY on the Zedboard which is directly connected to the PS's MIO Bank 1(via RGMII). Further more, there are two Ethernet MACs in the Processing System which are also connected to the MIO Bank via RGMII(over a GMII/RGMII adapter). Additionally, these two Ethernet MACs are connected to the Zedboards DDR3 RAM via a DMA Controller.



Question A:
Is that correct? Did I miss something important?



One of my goals is to get Ethernet frames/packets into the PL where I want to build some logic to analyse Headers etc.. (proof of concept / educational work)




Similar to Link 3 I redirected eth0 to EMIO(I am working with Vivado btw) and got a MDIO and a GMII Port added to my Processing System block view.




Question B:
Where exactly are these interfaces(GMII and MDIO) connected to? I think to one of the Ethernet MACs of the PS?!




Question(s) C:
What do I have to do now in order to get Ethernet packets to my custom IP?
Do I have to initialize the Ethernet MAC of the PS using DMA(from one of the arm cores) like described in 2 and get packets from RAM to my IP?
Or is there a way to get packets over the above mentioned GMII?
Or is it possible to get a direct connection to the Marvell PHY?




kind regards and a big thank you in advance!

PS:Sorry for the bad formatting.. I added blank lines but paragraphs are not recognized appropriately 

  • Sign in to reply
  • Cancel
  • Former Member
    0 Former Member over 10 years ago

    Take a look at the Avnet Zynq SW and HW Speedway workshop material, it will give you a detailed description of the Zynq internals. There are also hands on labs that target the ZedBoard.

    Developing ZynqRegistered-7000 All Programmable SoC Software (Vivado 2013.3 and 2014.4.1)

    Developing ZynqRegistered-7000 All Programmable SoC Hardware (Vivado 2013.3 and 2014.4.1)

     

    That said, here is a quick sketch of how the Zedboard utilizes the Zynq Ethernet.

     

    There are two Ethernet MACs in the PS (Processing System) portion of the Zynq device. The first of these, ETH0 is connected, via the Zynq MIO interface, directly to a Marvell Ethernet PHY on the ZedBoard using an RGMII interface. This Ethernet interface is 'free' on the Zedboard and is what most applications and Operating Systems use to connect. The second Ethernet MAC in the Zynq PS, ETH1, cannot be connected directly via the MIO pins due to their multiplexed nature and the other peripherals on the ZedBoard connected to them.

     

    To use the second Ethernet MAC you would need to route it's interface signals through the PL (Programmable Logic) portion of the Zynq device. Then you would need to connect these signals (as a GMII interface) to external Zynq pins connected to a PHY that you would have to provide on one of the external ZedBoard connectors such as the FMC connector. It is also possible to use a PHY with an RGMII interface by using a GMII to RGMII 'shim' IP within the Zynq PL. Unless you need a second Ethernet port, or have a specific interface requirement that the Marvell PHY on the ZedBoard does not support, you will not need to use the second Ethernet MAC.

     

    You can program the Ethernet MAC and DMA controller to transfer the data to any memory area available. Typically this is in the ZedBoard DDR memory but it could be a custom memory area that you have defined and created in the Zynq PL section. Most likely you will want to just move the data from the DDR to your custom IP.

     

    If you are going to implement this in a 'bare metal' fashion you may want to take a look at the code include with the LWiP example provided in the SDK. If you plan to use Linux or some other OS you will need to investigate how to move the data within the OS framework.

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    Hey,

    thank you for your time!
    I will work trough the labs in no time ;)

    But I still have a question in advance:

    You said: "You can program the Ethernet MAC and DMA controller to transfer the data to any memory area available. Typically this is in the ZedBoard DDR memory but it could be a custom memory area that you have defined and created in the Zynq PL section. Most likely you will want to just move the data from the DDR to your custom IP."


    So, in order to configure the MAC, I have to write data to it's configuration registers which are connected to the axi peripheral bus. Is there a way to access this bus from within the PL or do I have to use the arm core to initialize the MAC etc.. whether I use PL logic to process data or the arm core.

    best regards!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago

    The Zynq PS based Ethernet MAC and associated DMA controller are internal to the Processing System and not on the AXI bus.

     

    Take a look at the Zynq Technical Reference Manual, Chapter 16 for details:

     http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

     

    -Gary

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbgator
    0 bbgator over 8 years ago in reply to Former Member
    This looks exactly what he wants.   The code is already done
     
    Zynq-7000 AP SoC - Bare Metal - Redirecting Packets to PL Tech Tip

    http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+-+Performance+-+Ethernet+Packet+Inspection+-+Bare+Metal+-+Redirecting++Packets+to+PL+Tech+Tip

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbgator
    0 bbgator over 8 years ago

    Zynq-7000 AP SoC - Bare Metal - Redirecting Packets to PL Tech Tip

    http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+-+Performance+-+Ethernet+Packet+Inspection+-+Bare+Metal+-+Redirecting++Packets+to+PL+Tech+Tip

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • 100ram
    0 100ram over 7 years ago in reply to Former Member

    Hi ,,TroutChaser

    I am Ram , can you please explain the following statement in more detail , i mean , how to initialize ethernet0 while writing "C" code .

    you said-----

    You can program the Ethernet MAC and DMA controller to transfer the data to any memory area available. Typically this is in the ZedBoard DDR memory...

     

    i want to use only ps side of zynq for ethernet using mio pins ..so how to configure and initialize ethernet ...

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbhatt
    0 bbhatt over 6 years ago in reply to Former Member

    Hello Gary, 

    Could you please let me know if it is possible to use GEM1 when the interface supported by PHY is MII/RMII. I am using this module for ETH1: https://www.avnet.com/opasdata/d120001/medias/docus/13/AES-FMC-ISMNET2-G-User%20Guide-v1.0.pdf

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • bbhatt
    0 bbhatt over 6 years ago in reply to Former Member

    Hello Gary, 

    Thanks for the detailed info!

    Could you please let me know if it is possible to use GEM1 when the interface supported by PHY is MII/RMII. I am using this module for ETH1: https://www.avnet.com/opasdata/d120001/medias/docus/13/AES-FMC-ISMNET2-G-User%20Guide-v1.0.pdf

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube