Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
957 Views

I am lost with all these Ethernet Protocols??

Hi, 

 

I am trying for days to get an answer about Ethernet protocols specialized for sending a text or an image to a computer from a FPGA and PHY chip with my kit. I have worked on the interface between the FPGA and the chip, so know I can send whatever sort of data bytes on the Ethernet port. Then I have decided to send a text or an image to the computer through the Ethernet, so I looked for something like this on the web and found that I need to send them through some sort of a protocol like FTP, HTTP,....etc for text files, but my problem is I can't find or perhaps understand how in the world these protocols work and how the data bytes is structured inside the frame packet for such a protocol.  

 

I know about TCP/IP or UDP/IP and how they are structured, but what I need is the application layer protocols.  

Please I need someone to help me with this as I don't have much experience with network links and protocols. 

 

Thanks,
0 Kudos
5 Replies
Altera_Forum
Honored Contributor I
27 Views

The easiest way to do this would be to use a dedicated Ethernet port on your computer. Expect to spend a lot of time finding out how networking works on your computers OS, of find someone who already knows to help you. Get a USB to Ethernet adapter. Set it up to operate with a fixed IP address. Find out what MAC address our adapter is using. Decide on a UDP port number on your computer that isn't used elsewhere. Set up the firewall on your computer to let in that port number. This will make things easier on your embedded device. 

 

On your FPGA, write your packets to be UDP/IP addressed to your computer at the port number you've prepared.  

 

Write an application on your computer to pick up the data that your FPGA sends. Set up wireshark or a similar packet monitor in promiscuous mode to view what is being sent. You might also want to test this with another computer simulating what your FPGA will send.  

 

When putting together your packet on the FPGA concentrate on one layer at a time. Ethernet first, then IP, and finally UDP. Wireshark won't display anything until the Ethernet header is mostly right. Then you can use wireshark to help get the rest of the headers right. You can use dumps of packets from your test code as well. Documentation of all these protocols are available on the web.
Altera_Forum
Honored Contributor I
27 Views

 

--- Quote Start ---  

 

... how the data bytes is structured inside the frame packet... 

I know about TCP/IP or UDP/IP and how they are structured, but what I need is the application layer protocols.  

Please I need someone to help me with this as I don't have much experience with network links and protocols. 

 

--- Quote End ---  

 

 

What you are seeking are called "The RFC's", the definitive documents for the protocols maintained by IETF. 

 

e.g.  

FTP is RFC959 https://tools.ietf.org/html/rfc959 

HTTP v1.1 is RFC2616 https://tools.ietf.org/html/rfc2616 

 

Due to the relative complexity, implementing application layer protocols such as these is not commonly done in HDL. It is much more common to use a processor and software (NIOS+InterNiche stack, for example).
Altera_Forum
Honored Contributor I
27 Views

Doing pre-computed raw Ethernet UDP packets is doable in HDL as outlined in my post above. It's not a general purpose solution for a product, but it can work as a one off to get data out of an FPGA. 

 

The project will be much easier with a NIOS or SoC processor involved. Open source alternatives to InterNiche are available. Search "open source network stack"
Altera_Forum
Honored Contributor I
27 Views

Galfonz and ted Thanks for your fast response. 

 

For clarifying some things I have fully implemented one of the simplest protocols ARP (address resolution protocol) which it purpose is to get the MAC address of a specific IP address by concentrating on one layer at a time and it worked. The confusion started when I wanted to send a text or an image. These "RFC's" document seems to be complicated, but I will try to understand whats in them. By the way and until now I didn't find any protocol for sending an image? 

 

Thanks again and have a nice day.
Altera_Forum
Honored Contributor I
27 Views

 

--- Quote Start ---  

Galfonz and ted Thanks for your fast response. 

 

For clarifying some things I have fully implemented one of the simplest protocols ARP (address resolution protocol) which it purpose is to get the MAC address of a specific IP address by concentrating on one layer at a time and it worked. The confusion started when I wanted to send a text or an image. These "RFC's" document seems to be complicated, but I will try to understand whats in them. By the way and until now I didn't find any protocol for sending an image? 

 

Thanks again and have a nice day. 

--- Quote End ---  

 

 

What is your objective? 

 

Are you doing image processing and just want to get the image out of your FPGA with least effort? Use a processor and software and standard protocol like FTP/HTTP so you don't have to also write software on PC. 

 

Are you doing video processing with bandwidth exceeding what is practical with software? Use hardware generating UDP and write your own PC software.