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
Software Application Development zedboard ethernet udp communication
  • 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 6 replies
  • Subscribers 331 subscribers
  • Views 3021 views
  • Users 0 members are here
Related

zedboard ethernet udp communication

Former Member
Former Member over 9 years ago

Hello

I´m just playing with ethernet with zedboard. I made simple design with only PS part of Zynq and reworked SDK lwip raw tcp echo example to udp. Everything works fine but I would like to ask some questions.

Performance:

I have measured transmit output with Jperf (GUI version of iperf utility). UDP payload size was 500B with achieved circa 400Mbit/s and for 1000B payload I got around 700Mbit/s bandwidth performance. Bigger payload per datagram is irrelevant for me because of app layer protocol what I'm gonna use.

In XAPP1026 document there is the chapter about measured performance (page 23 - lwip performance). As you can see...about 900Mbit/s can be achieved with raw TCP (!!!) on the board ZC702.

Did I overlook something? ZC702 have same cpu (666MHz) like zedboard and similar PHY ethernet chip (marvell).

Here is sample of my code:

void myudp_client_init(void)
{
    ip_addr_t DestIPaddr;
    err_t err;
    upcb = udp_new();
    if (upcb!=NULL)
    {
        IP4_ADDR( &DestIPaddr, DEST_IP_ADDR0, DEST_IP_ADDR1, DEST_IP_ADDR2, DEST_IP_ADDR3 );
        err= udp_connect(upcb, &DestIPaddr, UDP_SERVER_PORT);
        if (err == ERR_OK)
        {
            /* Set a receive callback */
            udp_recv(upcb, udp_receive_callback, NULL);
        }
    }
}

static void myudp_client_send(void)
{
    struct pbuf *p;
    static int counter = 0;
    sprintf((char*)data, "counter>%d", counter++);   //for evaluation of received datagrams
     p = pbuf_alloc(PBUF_TRANSPORT,PAYLOAD_SIZE, PBUF_POOL);
    if (p != NULL)
    {
        pbuf_take(p, (char*)data, PAYLOAD_SIZE);  //PAYLOAD_SIZE tried from 200B to 1000B
        udp_send(upcb, p);
        pbuf_free(p);
    }
}

I just call myudp_client_send() while button is pushed. Received datagrams are checked in Wireshark.

 

General question about lwip raw mode:

While I was reading various documentation and example codes of RAW mode for different platforms (Atmel, NXP, STM32...) I always find necessity of calling sys_check_timeouts function in while(1) next to variation of function ethernetif_input (it's called xemacif_input in Xilinx lwip port ). Why is it not in xilinx LWIP examples? Are timers timeouts handled implicitly?

  • Sign in to reply
  • Cancel

Top Replies

  • jafoste4
    jafoste4 over 8 years ago in reply to janani.subraveti@gmail.com +1
    Hi, Have you tried the lwIP Demo Application template in SDK? Compare it to what you currently have. --Josh http://microzed.org/content/udp-frames-zedboard
Parents
  • janani.subraveti@gmail.com
    0 janani.subraveti@gmail.com over 8 years ago

    Hi,

    What is the main difference of using udp  and tcp  , in example templates of sdk , I could find only with tcp ip but not with udp . If you are using lwip with udp what kind of modifications are required in main.c and echo.c . It would be nice if you share the code here for understanding. I had already done an application using tcp available over there. Now when i select lwip echo server while creating a new application project and when i tick the udp as true in board support package for the corresponding application project, the lwip echo server project is opening only with tcp example and not with udp example. Before I start to build my own udp , would like to know what changes are to be done and what is the main difference between the both?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • janani.subraveti@gmail.com
    0 janani.subraveti@gmail.com over 8 years ago

    Hi,

    What is the main difference of using udp  and tcp  , in example templates of sdk , I could find only with tcp ip but not with udp . If you are using lwip with udp what kind of modifications are required in main.c and echo.c . It would be nice if you share the code here for understanding. I had already done an application using tcp available over there. Now when i select lwip echo server while creating a new application project and when i tick the udp as true in board support package for the corresponding application project, the lwip echo server project is opening only with tcp example and not with udp example. Before I start to build my own udp , would like to know what changes are to be done and what is the main difference between the both?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
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