Let me talk about how FPGA can realize Gigabit Network UDP communication?

Message boards : Current tests : Let me talk about how FPGA can realize Gigabit Network UDP communication?

To post messages, you must log in.


Send message
Joined: 3 Sep 20
Posts: 9
Credit: 0
RAC: 0
Message 6882 - Posted: 10 Sep 2020, 2:04:43 UTC

The general steps are as follows: data to be transmitted -- "data of UDP protocol + data to be transmitted --" data of IP protocol + data of UDP protocol + data to be transmitted -- "data of preamble + data of MAC protocol + data of IP protocol + data of UDP protocol + data to be transmitted --" waveform that can be measured in RJ45 (as shown in the following picture like fpgamall)
There are several types of MII between the data link layer and PHY: MII gmii rgmii srgmii. Which one should be paid attention to in use:
In the hardware design, we need not pay attention to much.

Ethernet frame format: packets on the Ethernet link are called Ethernet frames. The Ethernet frame start part is composed of preamble and frame start character. It is followed by an Ethernet header, which indicates the destination address and the source address with the MAC address. In the middle of the frame is the packet containing the header of other protocols (such as IP Protocol). The Ethernet frame ends with a 32-bit redundancy check code. It is used to verify whether the data transmission is damaged.

A binary packet from the line is called a frame. From the frame seen on the physical line, among other information, the preamble and the frame start character can be seen. Any physical hardware will need this information.

The following table shows the full frame format for MTU transmission at 1500 octets (some Gigabit Ethernet or Altera Distributors even higher speed Ethernet supports larger frames, called Jumbo frames). An octet is data of eight bits (that is, one byte of a modern computer).

Preamble and frame start
A frame starts with a 7-byte preamble and a 1-byte frame start. Before fast Ethernet, the bit mode of this part of the frame on the line was 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011. Since the LSB is transmitted first when a byte is transmitted, its corresponding hexadecimal representation is 0x55 0x55 0x55 0x55 0x55 0x55 0x55.

The 10 / 100M network card (miiphy) transmits 4 bits (one and a half words) at a time. As a result, the leading character becomes seven sets of 0x5 + 0x5, while the frame start character becomes 0x5 + 0xd. 1000m network card (gmii) transmits 8 bits at a time, while 10Gbit / S (XGMII) PHY chip transmits 32 bits at a time. Note that when described as octet, seven 01010101 are transmitted first and then 11010101 are transmitted. Since the lower 4 bits of 8-bit data are sent first, 0101 of frame start character is sent first, and then 1101 is sent.

The header contains MAC addresses of source and destination addresses, Ethernet type fields, and optional IEEE 802.1Q VLAN tags to indicate VLAN membership and transmission priority.

Frame check code

The frame check code is a 32-bit cyclic redundancy check code to verify whether the frame data is damaged.

Frame spacing

Main entry: en: interframe game

After a frame is sent out, the sender needs to send at least 12 octet idle line status codes before sending the next frame.

UDP protocol frame format

Internet protocol set supports a connectionless transport protocol, which is called user datagram protocol. UDP provides a method for applications to send encapsulated IP datagrams without establishing a connection. RFC 768 describes UDP.
There are two main protocols in the transport layer of Internet, which complement each other. The connectionless is UDP, which does little but send packets to applications and allow them to structure their own protocols at the required level. Connection oriented is TCP, which does almost everything.

UDP protocol is used to process packets as TCP protocol. In OSI model, both of them are located in the transport layer, which is on the upper layer of IP protocol. UDP does not provide packets

The disadvantages of group, assembly and unable to sort packets, that is to say, when a message is sent, it is impossible to know whether it has arrived safely and completely. UDP is used to support

Network applications that need to transfer data between computers. Many client / server network applications including network video conference system need to be used

UDP protocol. UDP protocol has been used for many years since it came out. Although its original glory has been covered by some similar protocols, UDP is still in use even today

However, it is a very practical and feasible network transport layer protocol.

Many applications only support UDP, such as multimedia data stream, and do not generate any additional data. Even if the damaged packets are known, they will not be retransmitted. When emphasis is placed on transmission performance and

When it is not the integrity of transmission, such as audio and multimedia applications, UDP is the best choice. In the data transmission time is very short, so that the previous connection process becomes the whole

In the case of traffic subject, UDP is also a good choice.

1) Source port (2 bytes): sender port number

2) Destination port (2 bytes): receiving port slogan

3) Message length (2 bytes): the total length of UDP user datagram, in bytes.

4) Check sum (2 bytes): check whether there is any error in the transmission of UDP user datagram, and discard it if there is any error.

It is used to check the number field of UDP datagram and the "pseudo header" containing the header of UDP datagram.

It is used to check the number field of UDP datagram and the "pseudo header" containing the header of UDP datagram.

Pseudo header, also known as pseudo header, is an extended header structure composed of 12 bytes of source IP address, destination IP address, protocol field of IP packet and total length of TCP or UDP datagram in front of datagram header of TCP or UDP. This pseudo header is a temporary structure that is neither passed up nor down, just to ensure that the socket can be verified for correctness.

5) Data: if the data part of UDP is not even, it needs to be filled with 0, that is, if the data length is odd, the data length is added with "1".
ID: 6882 · Report as offensive    Reply Quote

Send message
Joined: 25 Oct 22
Posts: 7
Credit: 0
RAC: 0
Message 7382 - Posted: 8 Sep 2023, 9:05:59 UTC - in response to Message 6882.  

When the integrity of transmission is not important, such as in music and multimedia applications, UDP is the ideal solution. Because the data transmission time is so brief, the prior connecting process becomes the entire process.
doodle jump
ID: 7382 · Report as offensive    Reply Quote

Message boards : Current tests : Let me talk about how FPGA can realize Gigabit Network UDP communication?

©2024 University of Washington