07-27-2018 05:29 AM - edited 07-27-2018 05:33 AM
I am trying to receive data from a PC through ethernet over TCP/IP into Zynq running on a baremetal OS. The data being sent from the PC is a file which is read into MATLAB, split into frames of equal size and each frame is sent one after the other in a loop. The maximum frame size that I am able to work with without issues is 1408 bytes. I am using lwIP stack in Xilinx SDK with KSZ9031 ethernet transceiver chip. The PC runs Windows 10.
The data transfer rate that I am able to achieve at max while receiving is just nearly 1Mbps, while when I send the same data back to the PC it happens ten times faster at around 10Mbps. The only relevant info that I could find on Xilinx forums or elsewhere is about using Jumbo frames. However, I doubt whether that really is the solution to my problem given the fact that 1500 bytes is the standard upper limit of frame size and data rates more than 10Mbps are quite common over ethernet. Though UDP is generally chosen for streaming data such as videos, my goal is different and I would like to strictly stick to TCP/IP.
I have checked all options in the BSP settings as well, but I suspect that I might have missed something.
07-27-2018 05:56 AM
The data transfer rate that I am able to achieve at max while receiving is just nearly 1Mbps, while when I send the same data back to the PC it happens ten times faster at around 10Mbps.
It raises a lot of doubts.
The MAC core at the Zynq can either be set at 10/100/1000Mbps. So 1Mbps is really pathetic. Can you re-check to what speed your MAC has been set and if the speed register value is remaining constant.
One other place is to look for is for the Ethernet PHY.Is it getting the proper clock frequency?
The frames sent by the PC, is it being correctly forwarded to the MAC core?
I would use any ethernet frame sending s/w, sent just sent one RAW Ethernet Frame, and see if it arrives at the MAC core properly or not.
Consider giving "Kudos" if you like my answer. Please mark my post "Accept as solution" if my answer has solved your problem