System for realizing rainfall data hard real-time communication based on FPGA and UDP protocol

By implementing a hard real-time communication system based on UDP protocol on the FPGA platform, the data transmission delay and reliability of imaging raindrop spectrometer are solved, and real-time data transmission of 110MB/s is realized, which meets the low latency and high real-time performance of rainfall data. and high reliability requirements.

CN118945144APending Publication Date: 2024-11-12OCEANOGRAPHIC INSTR RES INST SHANDONG ACAD OF SCI
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410810507.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The prior art is difficult to achieve low latency, high real-time and high reliability transmission of rainfall data streams, and cannot meet the data interaction transmission requirements of the imaging raindrop spectrometer between the rainfall calculation unit and the PC terminal.

Method used

Using a hard real-time communication system based on FPGA and UDP protocols, the top-level module, sending module, receiving module and FIFO dual caches can realize the sending and receiving of ARP requests and UDP data packets, and the Gmii-rgmii to interface module is used for data transmission, and Data integrity is ensured through PLL clock configuration and CRC32 verification.

Benefits of technology

Real-time transmission of data streams of about 110MB/s is achieved, ensuring low latency, high real-time and high reliability of data, avoiding packet loss and interruption, and meeting the real-time transmission requirements of rainfall data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945144A_ABST
    Figure CN118945144A_ABST
Patent Text Reader

Abstract

The invention discloses a system for realizing rainfall data hard real-time communication based on an FPGA (Field Programmable Gate Array) and a UDP (User Datagram Protocol), and relates to the technical field of data transmission, and the key point of the technical scheme is the system for realizing rainfall data hard real-time communication based on the FPGA and the UDP. The system comprises a top layer module, a sending module, a receiving module, a receiving control module and FI FO double caches, the ARP and the UDP are sent and received through the modular design, the UDP / IP meets the transmission real-time requirement, the speed advantage is obtained based on an FPGA hardware platform, and data flow real-time transmission of about 110 MB / s can be achieved. The method can accurately obtain the MAC of the host and send the UDP message to the host in real time, is flexible in control, is small in resource consumption, is small in transmission time delay, is complete in verification process, does not generate a packet loss or interruption phenomenon in a test process, and can meet the transmission requirements of low delay, high real-time performance and high reliability of real-time transmission of rainfall data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to data transmission, and more specifically, to a hard real-time communication system for rainfall data based on FPGA and UDP protocol. Background Art

[0002] An imaging raindrop spectrometer is a device used to measure precipitation particles. It observes raindrops from a microscopic perspective and calculates various microscopic and macroscopic parameters of raindrops. As one of the most advanced instruments and equipment for observing precipitation particles, the imaging raindrop spectrometer is often used to study the microscopic physical process of precipitation or to carry out scientific research and production activities such as artificial precipitation. Its design uses cameras to capture continuous precipitation phenomena, so each camera will generate at least 50MB / s of rainfall data stream.

[0003] Therefore, it is necessary to build a data transmission system to provide a communication system with low data transmission delay, high data transmission reliability and high data transmission real-time performance to meet the data interaction transmission requirements between the rainfall calculation unit and the PC. Summary of the invention

[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a hard real-time communication system for rainfall data based on FPGA and UDP protocol, aiming to solve the above technical problems.

[0005] To achieve the above object, the present invention provides the following technical solutions: a hard real-time communication system for rainfall data based on FPGA and UDP protocol, wherein the real-time communication system is used for data interactive transmission between a rainfall calculation unit and a PC; the system includes a top-level module, a sending module, a receiving module, a receiving control module and a FIFO double buffer;

[0006] The top-level design module is used to instantiate the sending and receiving modules and provide connections with external modules, which include PHY chips;

[0007] The sending module is used to send ARP request messages and rainfall data, and add sequence numbers to UDP data packets;

[0008] The receiving module is used to receive the UDP message of the ARP reply and the user command signal sent by the host computer;

[0009] The receiving control module is used to control the FIFO double buffer;

[0010] The FIFO double buffer is used to avoid FCS check errors and data loss when resetting the FIFO. The FIFO double buffer is also responsible for sending the MAC address in the received ARP reply message to the sending module, receiving the user command signal in the UDP message and sending it to the rainfall calculation unit.

[0011] As a further solution of the present invention: the IO of the top-level module is respectively connected to the Gmii-rgmii interface conversion module and the Rgmii-gmii interface conversion module, and the Gmii-rgmii interface conversion module and the Rgmii-gmii interface conversion module are used for the rgmii interface protocol transmission of the PHY chip.

[0012] As a further solution of the present invention: the transmitting end of the Gmii-rgmii transfer interface module uses the ODDR primitive to change the single-edge transmission data to the double-edge transmission data, the pll spread spectrum 125MHz is used as the ODDR input clock, and the SAME_EDGE mode is used internally, and the clock edge is aligned with the data center by coordinating with the PHY chip delay configuration;

[0013] The receiving end of the Gmii-rgmii interface conversion module uses the IDDR primitive to change the double-edge transmission data to single-edge transmission data. The pll is phase-adjusted as the IDDR input clock. The SAME_EDGE_PIPELINED mode is used internally to align the clock edge with the data center by coordinating with the PHY chip delay configuration.

[0014] As a further solution of the present invention: the method in which the sending module adds a sequence number to a UDP data packet comprises the following steps:

[0015] After the FPGA is reset, an ARP request message is sent to obtain the destination MAC address. The data read from the FIFO is then packaged and stored. The stored user data is encapsulated according to the UDP frame structure, and a sequence number is added to the user data part for packet sorting. Finally, a CRC32 checksum is added to complete the packaging.

[0016] As a further solution of the present invention: the method for sending a message by the sending module comprises the following steps:

[0017] Enter the IDLE state after power-on. When the start signal of sending a message is detected, enter the TX_PREAMBLE state and send the preamble and SFD in sequence.

[0018] After determining the type of frame to be sent, enter the Ethernet frame header TX_ETH_ARP_HEADER state for sending the ARP message or the Ethernet frame header TX_ETH_HEADER state for sending the UDP message, and subsequently send the respective message data;

[0019] The clock of the sending module is a phase-locked loop (PLL) clock multiplied to 125MHz. The sending start signal is controlled by the FIFO and counter synchronization timing of the sending end. The input signal is input in parallel to the checksum calculation and CRC32 check submodule to complete the encapsulation and sending of the message.

[0020] As a further solution of the present invention: the method in which the receiving module receives the UDP message of the ARP reply sent by the host computer comprises the following steps:

[0021] Enter the IDLE state after power-on. When the start signal of receiving data sent by the PHY chip is detected, it enters the RX_PREAMBLE state and parses the preamble and SFD in turn.

[0022] After the match is correct, it enters the RX_ETH_HEADER state, parses the Ethernet frame header in turn, and enters the RX_ETH_JUD state to determine the frame type;

[0023] Enter the RX_ARP state for ARP reply message parsing or the RX_IP_HEADER state for UDP message partial parsing, and subsequently parse the respective received message data. The clock of the receiving module is the output clock of the PHY chip input clock after PLL phase modulation and BUFG global buffering. The input signal is input in parallel to the checksum calculation and CRC32 check submodule. The receiving control module controls the FIFO to clear the message that fails the check, and completes the reception and parsing of the UDP message of the ARP reply.

[0024] As a further solution of the present invention: the real-time communication system is based on a real-time communication method, and the real-time communication method comprises the following steps:

[0025] After the FPGA card is reset, it sends an ARP request to the other end through the sending module;

[0026] After receiving the ARP request, the receiving end of the receiving module searches the ARP cache table and returns the MAC address of the receiving end;

[0027] After the FPGA card receives the ARP reply, the FIFO double buffer sends the MAC address in the received ARP reply message to the sending module, and starts sending UDP / IP protocol messages to the destination address. The FIFO double buffer also sends the user command signal in the UDP message to the rainfall calculation unit.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] The present invention uses modular design to send and receive ARP and UDP, and builds a UDP / IP protocol stack to complete the rainfall data test transmission. The UDP / IP protocol meets the real-time transmission requirements, obtains speed advantages based on the FPGA hardware platform, and can achieve real-time transmission of data streams of about 110MB / s. The present invention can accurately obtain the host MAC and send UDP messages to the host in real time. The present invention can be flexibly controlled, has low resource consumption, low transmission delay, and a complete verification process. There is no packet loss or interruption during the test process, and it can meet the low latency, high real-time and high reliability transmission requirements of real-time transmission of rainfall data. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0031] Figure 1 This is a schematic diagram of the structure of the hard real-time communication system for rainfall data based on FPGA and UDP protocol;

[0032] Figure 2 ARP protocol message format diagram in the present invention;

[0033] Figure 3 This is a schematic diagram of the UDP / IP protocol message format in the present invention;

[0034] Figure 4 It is a schematic diagram of the state transition of the sending module in the present invention;

[0035] Figure 5 It is a schematic diagram of the state transition of the receiving module in the present invention;

[0036] Figure 6 This is a schematic diagram of ILA packet capture data of the ARP request message of the sending module in the present invention;

[0037] Figure 7 This is a schematic diagram of ILA packet capture data of the UDP message of the sending module in the present invention;

[0038] Figure 8 This is a schematic diagram of ILA packet capture data of the UDP message of the receiving module in the present invention;

[0039] Fig. 9 This is a schematic diagram of ILA packet capture data of the UDP message of the receiving module in the present invention;

[0040] Fig.10 It is a schematic diagram of Wi reshark in the present invention;

[0041] Fig.11 This is a schematic diagram of ARP message data captured by Wi reshark in the present invention;

[0042] Fig.12 This is a schematic diagram of UDP message data captured by Wi reshark in the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0044] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.

[0045] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0046] Reference Figures 1 to 12 The embodiment of the hard real-time communication system for rainfall data based on FPGA and UDP protocol is further described.

[0047] like Figure 1 As shown, a hard real-time communication system for rainfall data is implemented based on FPGA and UDP protocol, and the real-time communication system is used for data interactive transmission between a rainfall calculation unit and a PC end; the system includes a top-level module, a sending module, a receiving module, a receiving control module and a FIFO (first-in first-out) double buffer;

[0048] The top-level design module is used to instantiate the sending and receiving modules and provide connection with external modules, and the external modules include a PHY chip; preferably, the PHY chip is an external RTL8211 Ethernet PHY chip, which can realize the rainfall data transmission of Gigabit Ethernet.

[0049] The sending module is used to send ARP request messages and rainfall data, and add sequence numbers to UDP data packets for the host computer to sort and find packets;

[0050] The receiving module is used to receive the UDP message of the ARP reply and the user command signal sent by the host computer;

[0051] The receiving control module is used to control the FIFO double buffer to implement ping-pong operation;

[0052] The FIFO double buffer is used to avoid FCS (frame check sequence) check errors and avoid data loss when resetting the FIFO. The FIFO double buffer is also responsible for sending the MAC address in the received ARP reply message to the sending module, receiving the user command signal in the UDP message and sending it to the rainfall calculation unit.

[0053] In this embodiment, the full name of the ARP protocol is the Address Resolution Protocol, which is the simplest protocol among all media access control address MAC frame upper layer protocols and is used to obtain the MAC address of the host. The ARP protocol message format is as follows Figure 2 As shown in the figure, the ARP protocol message format includes a preamble, a delimiter, a destination address, a source address, a frame type, an ARP field, a padding field, and an FCS. The preamble consists of 7 bytes of 0x55, which is used to synchronize the physical layer input and output. The delimiter consists of 1 byte of 0xd5, which is used to mark the start of the frame. The destination address and source address consist of 6 bytes, which are used for receiving and sending by the network card. The destination address of the ARP request message is the 6-byte broadcast address 0xff. The frame type consists of 2 bytes, and the frame type of the ARP message is 0x0806, which is used to identify the upper layer protocol of the Ethernet frame. The request message of the operation code in the ARP field is 0x0001, the reply message is 0x0002, and the sender MAC is 6 bytes of 0x00. FCS uses CRC32 check.

[0054] UDP protocol stands for User Datagram Protocol, which provides a connectionless and unreliable data transmission protocol. UDP protocol is used to send rainfall data and receive user instructions. The UDP / IP protocol message format is as follows: Figure 3 As shown, the UDP protocol message format includes an Ethernet frame header, an IP message header, a UDP message header, and user message data, wherein the protocol number corresponding to UDP / IP is 0x0017, and FCS uses CRC32 check.

[0055] In this embodiment, the real-time communication system is based on a real-time communication method, and the real-time communication method includes the following steps:

[0056] After the FPGA card is reset, it sends an ARP request to the other end through the sending module;

[0057] After receiving the ARP request, the receiving end of the receiving module searches the ARP cache table and returns the MAC address of the receiving end;

[0058] After the FPGA card receives the ARP reply, the FIFO double buffer sends the MAC address in the received ARP reply message to the sending module, and starts sending UDP / IP protocol messages to the destination address. The FIFO double buffer also sends the user command signal in the UDP message to the rainfall calculation unit.

[0059] The present invention adopts Gigabit Ethernet to realize data interactive transmission between the rainfall calculation unit and the PC end, adopts UDP / IP protocol to meet the real-time transmission requirements, obtains speed advantages based on the FPGA hardware platform, and realizes real-time transmission of data streams of about 110MB / s.

[0060] Specifically, FPGA uses Xilinx's XC7A35TFGG484-2 chip as the hardware development platform.

[0061] In one case of this embodiment, the function of the sending module is to realize the packaging of UDP data packets. The sending module adopts a three-stage state machine and an independent counter counting design, wherein the method of adding a sequence number to the UDP data packet by the sending module includes the following steps:

[0062] After the FPGA is reset, an ARP request message is sent to obtain the destination MAC address. The data read from the FIFO is then packaged and stored. The stored user data is encapsulated according to the UDP frame structure, and a sequence number is added to the user data part for packet sorting. Finally, a CRC32 checksum is added to complete the packaging.

[0063] Specifically, the state transition of the sending module is as follows Figure 4 As shown, the steps are waiting (IDLE), preamble and SFD generation (TX_PREAMBLE), Ethernet frame header generation for ARP request (TX_ETH_ARP_HEADER), UDP Ethernet frame header generation (TX_ETH_HEADER), IP header generation (TX_IP_HEADER), UDP header generation (TX_UDP_HEADER), user data packaging (TX_DATA), filling content generation (TX_FILL_DATA), ARP request frame generation (TX_ARP_REQ) and CRC32 check generation (TX_CRC).

[0064] Furthermore, the method for sending a message by the sending module includes the following steps:

[0065] Enter the IDLE state after power-on. When the start signal of sending a message is detected, enter the TX_PREAMBLE state and send the preamble and SFD in sequence.

[0066] After determining the type of frame to be sent, enter the Ethernet frame header TX_ETH_ARP_HEADER state for sending the ARP message or the Ethernet frame header TX_ETH_HEADER state for sending the UDP message, and subsequently send the respective message data;

[0067] The clock of the sending module is a phase-locked loop (PLL) clock multiplied to 125MHz. The sending start signal is controlled by the FIFO and counter synchronization timing of the sending end. The input signal is input in parallel to the checksum calculation and CRC32 check submodule to complete the encapsulation and sending of the message.

[0068] In another case of this embodiment, the function of the receiving module is to implement UDP message parsing. The receiving module adopts a three-stage state machine and an independent counter counting design. After the FPGA is reset, it waits to receive the ARP reply message. After the CRC32 check, it sends the receiving end MAC address to the sending module, and then receives and parses the UDP message. The FIFO double buffer of the ping-pong operation is designed to prevent the subsequent received message data from being lost when the FIFO is cleared after the CRC32 check error. Finally, the UDP user data with correct verification is stored. The state transition of the receiving module is as follows: Figure 5 As shown, they are waiting (IDLE), preamble and SFD parsing (RX_PREAMBLE), Ethernet frame header parsing (RX_ETH_HEADER), Ethernet frame header type judgment (RX_ETH_JUD), IP header parsing (RX_IP_HEADER), UDP header parsing (RX_UDP_HEADER), user data parsing (RX_DATA), padding content parsing (RX_DRP_DATA), ARP reply parsing (RX_ARP), CRC32 check (RX_CRC), UDP check mark status (PKT_CHECK_UDP), and ARP check mark status (PKT_CHECK_ARP).

[0069] Specifically, the method for the receiving module to receive the UDP message of the ARP reply sent by the host computer includes the following steps:

[0070] Enter the IDLE state after power-on. When the start signal of receiving data sent by the PHY chip is detected, it enters the RX_PREAMBLE state and parses the preamble and SFD in turn.

[0071] After the match is correct, it enters the RX_ETH_HEADER state, parses the Ethernet frame header in turn, and enters the RX_ETH_JUD state to determine the frame type;

[0072] Enter the RX_ARP state for ARP reply message parsing or the RX_IP_HEADER state for UDP message partial parsing, and subsequently parse the respective received message data. The clock of the receiving module is the output clock of the PHY chip input clock after PLL phase modulation and BUFG global buffering. The input signal is input in parallel to the checksum calculation and CRC32 check submodule. The receiving control module controls the FIFO to clear the message that fails the check, and completes the reception and parsing of the UDP message of the ARP reply.

[0073] In another case of this embodiment, the IO of the top-level module is respectively connected to the Gmii-rgmii interface conversion module and the Rgmii-gmii interface conversion module, and the Gmii-rgmii interface conversion module and the Rgmii-gmii interface conversion module are used for the rgmii interface protocol transmission of the PHY chip.

[0074] The function of the interface conversion module is to change the transmission of the gmii interface to the transmission of the rgmii interface. The rgmii interface is a substitute for the gmii interface, and its working clock frequency is 125MHz in the Gigabit Ethernet mode. The gmii interface uses 8 data lines and single-edge sampling to realize the Gigabit Ethernet interface transmission, and the rgmii interface uses 4 data lines and double-edge sampling to realize the Gigabit Ethernet interface transmission.

[0075] Preferably, the transmitting end of the Gmii-rgmii transfer interface module uses the ODDR primitive to change the single-edge transmission data to the double-edge transmission data, and the pll spread spectrum 125MHz is used as the ODDR input clock. The SAME_EDGE mode is used internally, and the clock edge is aligned with the data center by coordinating with the PHY chip delay configuration;

[0076] The receiving end of the Gmii-rgmii interface conversion module uses the IDDR primitive to change the double-edge transmission data to single-edge transmission data. The pll is phase-adjusted as the IDDR input clock. The SAME_EDGE_PIPELINED mode is used internally to align the clock edge with the data center by coordinating with the PHY chip delay configuration.

[0077] In one embodiment of the present invention, the scheme of the present invention is verified, and the verification is divided into integrated logic analyzer (ILA) verification and on-board networking verification. In the design phase, Xilinx's vivado2018.3 development software is used for coding design, and Xilinx's Artix-7 series development board is used for on-board verification. The FPGA card board uses the ILA core to observe the waveform results, and the PC uses wireshark software to capture packets and observe the transmission results. The verification results show that the design program of the protocol stack can correctly complete tasks such as data sending and receiving. The ILA core is an IP core in the vivado software used to capture and observe internal signal waveforms during on-board debugging. The ILA packet capture data of the sending module ARP request message is as follows Figure 6 As shown, the ILA packet capture data of the sending module UDP message is as follows Figure 7 As shown, the ILA packet capture data of the ARP reply message of the receiving module is as follows Figure 8 As shown, the ILA packet capture data of the receiving module UDP message is as follows Fig. 9 The Wireshark summary is as follows Fig.10 As shown, the ARP packet data captured by Wireshark is as follows Fig.11 As shown, wireshark captures UDP packet data as follows Fig.12 The experimental results show that the design can achieve real-time transmission of about 110MB / s data stream.

[0078] The present invention uses Xilinx's Artix-7 series FPGA development board to construct a Gigabit Ethernet communication unit, uses Gigabit Ethernet to realize data interaction and transmission between the rainfall calculation unit and the PC end, uses modular design to send and receive ARP and UDP, and builds a UDP / IP protocol stack to complete rainfall data test transmission. The UDP / IP protocol meets the real-time transmission requirements, obtains speed advantages based on the FPGA hardware platform, and can achieve real-time transmission of data streams of about 110MB / s. The experimental results show that the design can accurately obtain the host MAC and send UDP packets to the host in real time. It can be flexibly controlled, has low resource consumption, low transmission delay, and a complete verification process. There is no packet loss or interruption during the test process, which can meet the low latency, high real-time and high reliability transmission requirements of real-time transmission of rainfall data.

[0079] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A hard real-time communication system for rainfall data based on FPGA and UDP protocol, characterized in that: The real-time communication system is used for data exchange and transmission between the rainfall calculation unit and the PC end; the system includes a top-level module, a sending module, a receiving module, a receiving control module and a FIFO double buffer; The top-level design module is used to instantiate the sending and receiving modules and provide connections with external modules, which include PHY chips; The sending module is used to send ARP request messages and rainfall data, and add sequence numbers to UDP data packets; The receiving module is used to receive the UDP message of the ARP reply and the user command signal sent by the host computer; The receiving control module is used to control the FIFO double buffer; The FIFO double buffer is used to avoid FCS check errors and data loss when resetting the FIFO. The FIFO double buffer is also responsible for sending the MAC address in the received ARP reply message to the sending module, receiving the user command signal in the UDP message and sending it to the rainfall calculation unit.

2. The hard real-time communication system for rainfall data based on FPGA and UDP protocol according to claim 1 is characterized in that: The IO of the top-level module is connected to the Gmii-rgmii interface transfer module and the Rgmii-gmii interface transfer module respectively, and the Gmii-rgmii interface transfer module and the Rgmii-gmii interface transfer module are used for the rgmii interface protocol transmission of the PHY chip.

3. The hard real-time communication system for rainfall data based on FPGA and UDP protocol according to claim 2 is characterized in that: The sending end of the Gmii-rgmii interface module uses the ODDR primitive to change the single-edge transmission data to double-edge transmission data. The PLL spread spectrum 125MHz is used as the ODDR input clock. The SAME_EDGE mode is used internally to align the clock edge with the data center by coordinating with the PHY chip delay configuration. The receiving end of the Gmii-rgmii interface conversion module uses the IDDR primitive to change the double-edge transmission data to single-edge transmission data, and uses it as the IDDR input clock after phase modulation. The SAME_EDGE_PIPELINED mode is used internally, and the clock edge is aligned with the data center by coordinating with the PHY chip delay configuration.

4. The hard real-time communication system for rainfall data based on FPGA and UDP protocol according to claim 1 is characterized in that: The method for adding a sequence number to a UDP data packet by the sending module comprises the following steps: After the FPGA is reset, an ARP request message is sent to obtain the destination MAC address. The data read from the FIFO is then packaged and stored. The stored user data is encapsulated according to the UDP frame structure, and a sequence number is added to the user data part for packet sorting. Finally, a CRC32 checksum is added to complete the packaging.

5. The hard real-time communication system for rainfall data based on FPGA and UDP protocol according to claim 4 is characterized in that: The method for sending a message by the sending module comprises the following steps: Enter the IDLE state after power-on. When the start signal of sending a message is detected, enter the TX_PREAMBLE state and send the preamble and SFD in sequence. After determining the type of frame to be sent, enter the Ethernet frame header TX_ETH_ARP_HEADER state for sending the ARP message or the Ethernet frame header TX_ETH_HEADER state for sending the UDP message, and subsequently send the respective message data; The clock of the sending module is a phase-locked loop (PLL) clock multiplied to 125MHz. The sending start signal is controlled by the FIFO and counter synchronization timing of the sending end. The input signal is input in parallel to the checksum calculation and CRC32 check submodule to complete the encapsulation and sending of the message.

6. The hard real-time communication system for rainfall data based on FPGA and UDP protocol according to claim 1 is characterized in that: The method for the receiving module to receive the UDP message of the ARP reply sent by the host computer comprises the following steps: Enter the IDLE state after power-on. When the start signal of receiving data sent by the PHY chip is detected, it enters the RX_PREAMBLE state and parses the preamble and SFD in turn. After the match is correct, it enters the RX_ETH_HEADER state, parses the Ethernet frame header in turn, and enters the RX_ETH_JUD state to determine the frame type; Enter the RX_ARP state for ARP reply message parsing or the RX_IP_HEADER state for UDP message partial parsing, and subsequently parse the respective received message data. The clock of the receiving module is the output clock of the PHY chip input clock after PLL phase modulation and BUFG global buffering. The input signal is input in parallel to the checksum calculation and CRC32 check submodule. The receiving control module controls the FIFO to clear the message that fails the check, and completes the reception and parsing of the UDP message of the ARP reply.

7. The hard real-time communication system for rainfall data based on FPGA and UDP protocol according to any one of claims 1 to 6, characterized in that: The real-time communication system is based on a real-time communication method, which includes the following steps: After the FPGA card is reset, it sends an ARP request to the other end through the sending module; After receiving the ARP request, the receiving end of the receiving module searches the ARP cache table and returns the MAC address of the receiving end; After the FPGA card receives the ARP reply, the FIFO double buffer sends the MAC address in the received ARP reply message to the sending module, and starts sending UDP / IP protocol messages to the destination address. The FIFO double buffer also sends the user command signal in the UDP message to the rainfall calculation unit.

Citation Information

Cited By

  • Data transmission method based on upper computer communication protocol

    CN119652996A

  • Protocol converter and protocol conversion method

    CN121531042A