FPGA-based Data Burst Transmission and Control Method
By using an FPGA multi-level cache architecture and unified timing control, the problem of cross-clock domain data transmission in multi-node data processing systems is solved, achieving reliable and efficient data transmission, which is suitable for high-speed data acquisition and multi-host computer interconnection scenarios.
Patent Information
- Application Number
- CN202611475226.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-21
- Publication Date
- 2026-11-17
AI Technical Summary
In multi-node, multi-processor, and multi-host computer collaborative data processing systems, the use of independent clock sources by each processing unit leads to problems such as metastability, timing conflicts, read-write asynchrony, data loss, or data corruption during data transmission. Traditional data transmission methods are unable to meet the reliability and real-time requirements of high-speed, bursty large-volume data transmission.
A multi-level cache architecture based on FPGA is adopted, including a first-level block memory BRAM1, a first-in-first-out memory FIFO, and a second-level block memory BRAM2. The FPGA uniformly controls the transmission timing and state switching to achieve orderly forwarding of data. The FIFO is used to realize data isolation and synchronization between asynchronous clock domains to avoid data overwriting or loss.
It achieves reliable and real-time data transmission across clock domains, improves the system's ability to handle high-volume data surges, avoids data loss and read/write conflicts, and is suitable for high-speed data acquisition, multi-processor collaboration, and multi-host computer interconnection scenarios.
Smart Images

Figure CN123115002A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of FPGA data transmission technology, specifically relating to a data burst transmission and control method based on FPGA. Background Technology
[0002] In multi-node, multi-processor, and multi-host computer collaborative data processing systems, each processing unit typically uses an independent clock source and operates in different clock domains. Data transmission is characterized by burstiness, asynchrony, and rate mismatch. When high-speed data exchange occurs between systems, differences in clock frequency, data bit width, read / write timing, and processing speed between the sending and receiving ends can easily lead to problems such as data metastability, timing conflicts, read / write asynchrony, data loss, or corruption.
[0003] Traditional data transmission methods often employ direct handshake communication or single-level buffer forwarding, which are ill-suited for high-speed, bursty large-volume data transmission scenarios. On one hand, single-level buffers have limited capacity, failing to fully buffer bursty data and easily leading to data overflow and loss. On the other hand, direct data interaction between different clock domains lacks an effective asynchronous-synchronous isolation mechanism, making it difficult to guarantee transmission reliability. Furthermore, in scenarios involving parallel interaction between multiple host computers, traditional solutions cannot achieve unified timing scheduling and forwarding control, easily leading to bus contention, transmission congestion, and other issues, resulting in poor system real-time performance, low transmission efficiency, and insufficient stability.
[0004] While existing technologies employ caching or asynchronous FIFOs for data synchronization, they generally suffer from drawbacks such as simple cache structures, simplistic timing control logic, and a lack of multi-level buffering and progressive forwarding mechanisms. These limitations make it difficult to simultaneously meet the comprehensive requirements of multi-host computer interconnection, high-speed burst transmission, reliable cross-clock domain interaction, and high real-time performance. Therefore, for multi-host computer data processing systems, there is an urgent need for a data burst transmission and control method based on FPGA, employing a multi-level cache architecture, and possessing comprehensive timing control. This method aims to solve the data transmission synchronization problem between different systems and clock domains, ensuring reliable, efficient, and lossless data forwarding. Summary of the Invention
[0005] To address the data transmission synchronization issues between different systems and clock domains, and to ensure reliable, efficient, and lossless data forwarding, this invention employs an FPGA-based data burst transmission and control method. The invention proposes the following specific solutions:
[0006] In a first aspect, the present invention proposes a data burst transmission and control method based on FPGA, the method comprising:
[0007] The FPGA uses the first clock CLK1 of the first host computer to receive burst data from the first host computer and determines the type of burst data; according to the type, the FPGA writes the burst data into the corresponding first-level block memory BRAM1 for caching;
[0008] When the FPGA detects that the data writing of the first-level block memory BRAM1 is complete, it reads the burst data in the first-level block memory BRAM1 and writes it into the first-in-first-out memory FIFO using the second clock CLK2.
[0009] The FPGA detects whether the second host computer has finished reading the previous data. If it has, the burst data written to the first-in-first-out memory (FIFO) is read out and written to the second-level block memory (BRAM2) using the second clock CLK2. If it has not finished reading, the second clock CLK2 waits until the second host computer has finished reading the previous data.
[0010] The third clock CLK3 of the second host computer reads burst data from the second-level block memory BRAM2 and sends a read completion flag signal back to the FPGA after the read is completed.
[0011] The beneficial effects of this invention are as follows:
[0012] (1) The present invention adapts the read and write timing of the transmitting end and the receiving end respectively through two-level block memory, and uses FIFO to realize data isolation and synchronization between asynchronous clock domains to avoid metastability and data disorder; by detecting and scheduling states such as write completion and read preparation, orderly forwarding of data is realized to prevent read and write conflicts, data overwriting or loss.
[0013] (2) The present invention adopts a multi-level cache structure of BRAM1+FIFO+BRAM2, which can effectively cache large-capacity burst data and improve the system's ability to withstand instantaneous high-volume data; the present invention realizes cross-clock domain data transmission synchronization through FIFO, which solves the problem of data instability caused by asynchronous clocks of different host computer systems.
[0014] (3) The present invention uses FPGA to uniformly control the transmission timing and state switching, realizes the orderly forwarding mechanism of writing before forwarding and sending when ready, avoids data loss and read / write conflicts; the data forwarding latency is low and the real-time performance is strong, which is suitable for high-speed data acquisition, multi-processor collaboration, multi-host computer interconnection and other scenarios; the overall architecture is simple and reliable, the FPGA resource usage is reasonable, the portability is strong, and it is suitable for a variety of high-speed data transmission systems. Attached Figure Description
[0015] Figure 1 This is a flowchart of a data burst transmission and control method based on FPGA according to the present invention;
[0016] Figure 2 This is a schematic diagram of the data transmission mode of a data burst transmission and control method based on FPGA according to the present invention. Detailed Implementation
[0017] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0018] In some embodiments, such as Figure 1 and Figure 2 As shown, this invention proposes a data burst transmission and control method based on FPGA. The data transmission method of the FPGA-based data burst transmission and control method is as follows: Figure 2 As shown, the method includes:
[0019] The FPGA uses the first clock CLK1 of the first host computer to receive burst data from the first host computer and determines the type of burst data; according to the type, the FPGA writes the burst data into the corresponding first-level block memory BRAM1 for caching;
[0020] When the FPGA detects that the data writing of the first-level block memory BRAM1 is complete, it reads the burst data in the first-level block memory BRAM1 and writes it into the first-in-first-out memory FIFO using the second clock CLK2.
[0021] The FPGA detects whether the second host computer has finished reading the previous data. If it has, the burst data written to the first-in-first-out memory (FIFO) is read out and written to the second-level block memory (BRAM2) using the second clock CLK2. If it has not finished reading, the second clock CLK2 waits until the second host computer has finished reading the previous data.
[0022] The third clock CLK3 of the second host computer reads burst data from the second-level block memory BRAM2 and sends a read completion flag signal back to the FPGA after the read is completed.
[0023] It is understood that this invention is applied to high-speed data interaction scenarios involving at least two host computer data processing systems. The entire system consists of an FPGA, a first-level block memory (BRAM1), a first-in-first-out (FIFO) memory, a second-level block memory (BRAM), and read / write status detection logic.
[0024] For example, each host computer is first assigned an independent write channel address. The FPGA detects the write enable signal for each channel. If the signal is valid, the burst data is written to the corresponding first-level block memory (BRAM1) according to the burst data frame header information. The first-level block memory (BRAM1) is synchronized with the first host computer interface and is used to receive and buffer burst data, realizing cross-clock domain. The first-in-first-out (FIFO) memory is used for data isolation, synchronization, and temporary storage to prevent data loss due to overwriting within the first-level block memory (BRAM1). The second-level block memory (BRAM2) is synchronized with the second host computer interface and is used to store burst data to be read, realizing cross-clock domain. The FPGA completes the write completion detection of the first-level block memory (BRAM1), the read read read read read detection of the second host computer, and the data transfer and transmission timing control among the first-level block memory (BRAM1), the FIFO memory, and the second-level block memory (BRAM2). Each host computer operates in an independent clock domain, and the burst data has bursty and non-periodic transmission characteristics.
[0025] For example, when the first host computer needs to transmit burst data, it initiates a write request to the FPGA. The FPGA parses the frame header of the burst data, determines the data type and length of the burst data, and simultaneously synchronizes the write enable, write address, and burst data to the first-level block memory (BRAM1). The FPGA writes the burst data to the first-level block memory (BRAM1) sequentially until the entire burst data is written. The FPGA counts the actual amount of burst data written to the first-level block memory (BRAM1), compares it with the data length recorded in the frame header, determines the write status of the first-level block memory (BRAM1), and generates a write completion status signal. During this stage, the first-level block memory (BRAM1) buffers and performs timing buffering on the burst data output by the first host computer to avoid data loss caused by instantaneous burst traffic.
[0026] For example, when the FPGA detects a valid write completion status, it initiates the data read and write process from the first-level block memory (BRAM1) to the first-in-first-out (FIFO) memory: the FPGA generates an address and sequentially reads buffered burst data from the first-level block memory (BRAM1) in an address-incrementing manner; the read burst data is then written in parallel into the FIFO memory; after all burst data is written into the FIFO memory, the FPGA releases the first-level block memory (BRAM1) and is ready to receive the next set of burst data. The first-level block memory (BRAM1) operates in an asynchronous clock domain, completing cross-clock domain data synchronization, eliminating the metastability risk between different clocks, and achieving secure data isolation from the first host computer side to the second host computer side.
[0027] For example, when the second host computer meets the reading conditions and the empty flag bit of the FIFO (First-In-First-Out) memory is invalid, the FPGA sequentially reads burst data from the FIFO; writes the burst data into the second-level block memory (BRAM2); after the burst data is written, the FPGA outputs a data readable and valid signal to the second host computer, notifying the second host computer that the burst data can be read. The second-level block memory (BRAM2) is used to match the reading timing of the second host computer, enabling the second host computer to stably read burst data at the third clock CLK3 and its own speed.
[0028] In some embodiments, the type and bit width of the burst data are matched with the type and bit width of the first-level block memory BRAM1 and the second-level block memory BRAM2.
[0029] In some embodiments, the FPGA performs burst data stream processing, parsing the type identifier field in the frame header of the burst data to determine the data type of the burst data. The burst data forms a burst data stream by being continuous in time.
[0030] In some embodiments, the method for the FPGA to detect that the data writing of the first-level block memory BRAM1 is complete includes: the FPGA calculating the data length of the burst data based on the length field in the frame header of the received burst data; the FPGA counting the actual amount of burst data written to the first-level block memory BRAM1; when the data length of the actual amount of data is equal to the data length of the burst data, it is considered that the data writing of the first-level block memory BRAM1 is complete, and the write flag bit corresponding to the first-level block memory BRAM1 is pulled high; the write flag bit corresponding to the first-level block memory BRAM1 is generated by the FPGA.
[0031] In some embodiments, when the FPGA detects that burst data in the first-level block memory BRAM1 has started to be written into the first-in-first-out memory FIFO, it pulls the write flag bit corresponding to the first-level block memory BRAM1 low.
[0032] In some embodiments, the FPGA detects whether the second host computer has finished reading the previous data. If the data has been read, the FPGA pulls the read flag high. If the read flag is pulled high, the second clock CLK2 starts reading the burst data. The read flag is generated by the second host computer.
[0033] For example, after the second host computer detects the readable valid signal output by the FPGA: it initiates a read operation to read burst data from the second-level block memory (BRAM2); it completes the reception of all burst data according to the interface timing corresponding to the third clock (CLK3); after reading is complete, it returns a read completion flag signal to the FPGA, and the FPGA clears the current state of the second-level block memory (BRAM2) to prepare for the next data transmission. Thus, a set of burst data is forwarded from the first host computer to the second host computer via the FPGA's multi-level buffer, completing one full transmission.
[0034] In some embodiments, the first level block memory (BRAM1) is used to cache burst data written by the first host computer; the write address and the first clock (CLK1) of the first level block memory (BRAM1) are controlled by the first host computer.
[0035] In some embodiments, the second-level block memory BRAM2 is used to cache burst data read by the second host computer, and the read address of the second-level block memory BRAM2 and the third clock CLK3 are controlled by the second host computer.
[0036] In some embodiments, the read address of the first-level block memory BRAM1 and the write address of the second-level block memory BRAM2 are controlled by the FPGA.
[0037] For example, during the data forwarding process from the first-in-first-out (FIFO) memory to the second-level block memory (BRAM2), the FPGA continuously monitors the read read read status of the second host computer, including the status of the second host computer, read request signals, and receive buffer ready signals, while also detecting whether the FIFO memory is idle.
[0038] Understandably, the FPGA achieves step-by-step forwarding through strict state machine control, thereby ensuring that the first-level block memory BRAM1 is not read before it is fully written; the second host computer is not written to the second-level block memory BRAM2 until it is ready; and that the data between the first-level block memory BRAM1, the first-in-first-out memory FIFO, and the second-level block memory BRAM2 does not overlap, cover, or conflict.
[0039] To overcome the problems of cross-clock domain asynchrony, insufficient buffering capacity, imperfect timing control, easy data overwriting, and poor transmission efficiency and real-time performance in high-speed burst data transmission without response in existing multi-host computer data processing systems, this invention uses an FPGA as the core forwarding and control unit, employs different transmission protocols with different processors, and utilizes a multi-level buffering and ordered scheduling mechanism to achieve high-speed, reliable, and lossless data interaction between multiple host computers in asynchronous clock domains without response. See the following embodiments for details:
[0040] In some embodiments, when the first host computer is a CPU architecture, the FPGA and the first host computer use PCIe bus DMA transfer mode; when the first host computer writes a large data stream to the FPGA, the FPGA writes the burst data into the DDR cache at the first clock CLK1; when the FPGA detects that data has started being written to the DDR, it writes the data in the DDR into the first-level block memory BRAM1 at the first clock CLK1; when the first host computer writes a small data stream to the FPGA, the second host computer responds to the data readable valid signal output by the FPGA and reads data from the second-level block memory BRAM2 using PIO interrupt polling mode; the large data stream is a data stream greater than or equal to a first threshold; the small data stream is a data stream less than the first threshold.
[0041] In some embodiments, when the length of the burst data is greater than or equal to the second threshold, the FPGA sequentially writes the burst data into multiple consecutively allocated storage areas in the first-level block memory (BRAM1); after the burst data in one storage area is written, the FPGA switches to the next storage area to continue writing; at the same time, the FPGA reads the burst data in the previous storage area using the second clock CLK2 and writes it into the first-in-first-out (FIFO) memory; when the length of the burst data is less than the second threshold, the FPGA directly writes the burst data into a single storage area of the first-level block memory (BRAM1).
[0042] In some embodiments, before writing burst data to the second-level block memory BRAM2, the FPGA checks whether the empty flag of the first-in-first-out (FIFO) memory is valid. When the empty flag is invalid and the second host computer has finished reading the preceding data, the FPGA reads the burst data from the FIFO memory using the second clock CLK2 and writes it to the second-level block memory BRAM2. After writing, the FPGA outputs a data readable valid signal to the second host computer. In response to the data readable valid signal, the second host computer reads the burst data from the second-level block memory BRAM2.
[0043] For example, the first and second thresholds can be set by the user as needed.
[0044] It is understood that the above embodiments are applied to environments with multiple host computer data processing systems containing different processors. Large data streams between the FPGA and CPU architecture host computers use DMA transmission, such as image data, via PCIe bus DMA, without needing to consider data transmission speed or timing. Small data streams use PIO interrupt polling. FPGA and DSP transmission uses SRIO transmission, and data stream writing uses a ping-pong buffer, generating a flag signal upon completion of data read / write. GTX transmission is used between FPGAs. The FPGA handles data forwarding, buffer management, and transmission timing control between host computers, ensuring that each send and receive operation is instantaneous and free from data overwriting concerns. The method employs different protocol parsing and a three-level buffer structure: a first-level block memory (BRAM1) + a first-in-first-out (FIFO) memory + a second-level block memory (BRAM2). Through segmented buffering, status detection, and step-by-step forwarding control, stable transmission of unresponsive data between host computers is achieved.
[0045] It is also understandable that when the first host computer needs to send data to the second host computer, the first host computer writes the data to the transmission bus according to the pre-defined transmission protocol. It does not need to pay attention to whether the bus is occupied. It can write data again without waiting for the second host computer to read the data. When the FPGA and the CPU architecture host computer transmit data, large data streams are transmitted using PCIe DMA. When the CPU architecture host computer writes data, the FPGA detects the DMA input data and then writes the large data stream into the DDR buffer at the first clock CLK1 to avoid data overwriting and loss. At the same time, the FPGA detects that data has started being written to the DDR and writes the data from the DDR into the first-level block memory BRAM1 at the first clock CLK1. Subsequent transmission follows the BRAM1 + FIFO + BRAM2 sequence. When the FPGA transmits large data streams to the CPU host computer, the FPGA reads the data from the second-level block memory BRAM2 and outputs it to the PCIe bus, waiting for the host computer to read it. When transmitting small data streams with the CPU, when the CPU reads the data, the FPGA generates a data readable valid signal and transmits it to the CPU when the writing to the second-level block memory BRAM2 is complete. The CPU reads the data based on the data readable valid signal. When the FPGA and the DSP architecture processor host computer transmit data, SRIO is used. When the DSP architecture host computer writes data, the FPGA detects the DSP's input data. Due to the high data input speed of the DSP, to avoid data overwriting, the FPGA uses a ping-pong buffer. When the first ping-pong buffer space is full, the FPGA changes the data flow, and subsequent data is written to the second ping-pong buffer space. The two buffer spaces are then written to alternately. Simultaneously, the data in the full buffer space is written to the first-level block memory (BRAM1) using the first clock cycle CLK1. Subsequent transmission follows the BRAM1 + FIFO + BRAM2 protocol. When the DSP reads data, the FPGA writes the data to the second-level block memory (BRAM2), generates a data readable valid signal for the DSP, and waits for the DSP to complete reading. When transmitting data between FPGAs, the FPGA, according to the GTX protocol, changes the data signal from serial to parallel input to the BRAM1 + FIFO + BRAM2 transmission mechanism. When reading data, the FPGA reads the data from the second-level block memory (BRAM2), changes the parallel input to serial input, and then transmits the data.
[0046] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for FPGA-based data burst transmission and control, characterized in that, The method includes: The FPGA uses the first clock CLK1 of the first host computer to receive burst data from the first host computer and determines the type of burst data; according to the type, the FPGA writes the burst data into the corresponding first-level block memory BRAM1 for caching; When the FPGA detects that the data writing of the first-level block memory BRAM1 is complete, it reads the burst data in the first-level block memory BRAM1 and writes it into the first-in-first-out memory FIFO using the second clock CLK2. The FPGA detects whether the second host computer has finished reading the previous data. If it has, the second clock CLK2 will read the burst data written to the first-in-first-out memory FIFO and write it to the second-level block memory BRAM2. If it has not finished reading, the second clock CLK2 will wait until the second host computer has finished reading the previous data. The third clock CLK3 of the second host computer reads burst data from the second-level block memory BRAM2 and sends a read completion flag signal back to the FPGA after the read is completed.
2. The FPGA-based data burst transmission and control method of claim 1, wherein, The type and bit width of the burst data match the type and bit width of the first-level block memory BRAM1 and the second-level block memory BRAM2.
3. The FPGA-based data burst transmission and control method of claim 2, wherein, The FPGA performs burst data stream processing to parse the type identifier field in the frame header of the burst data to determine the data type of the burst data; the burst data forms a burst data stream in time.
4. The FPGA-based data burst transmission and control method of claim 3, wherein, The methods by which the FPGA detects that the data writing to the first-level block memory BRAM1 is complete include: The FPGA calculates the data length of the burst data based on the length field in the frame header of the received burst data; the FPGA counts the actual amount of burst data written to the first-level block memory BRAM1. When the length of the actual data is equal to the length of the burst data, it is considered that the data of the first-level block memory BRAM1 has been written, and the write flag bit corresponding to the first-level block memory BRAM1 is pulled high.
5. The FPGA-based data burst transmission and control method of claim 4, wherein, When the FPGA detects that burst data in the first-level block memory BRAM1 has started to be written into the first-in-first-out memory FIFO, it pulls the write flag bit corresponding to the first-level block memory BRAM1 low.
6. The FPGA-based data burst transmission and control method of claim 5, wherein, The FPGA detects whether the second host computer has finished reading the previous data. If it has finished reading, it pulls the read flag high. If the read flag is pulled high, the second clock CLK2 starts reading the burst data. The read flag is generated by the second host computer.
7. The FPGA-based data burst transmission and control method of claim 6, wherein, The first-level block memory (BRAM1) is used to cache burst data written by the first host computer; the write address and the first clock (CLK1) of the first-level block memory (BRAM1) are controlled by the first host computer.
8. The FPGA-based data burst transmission and control method according to claim 7, characterized in that, The second-level block memory BRAM2 is used to cache burst data read by the second host computer. The read address of the second-level block memory BRAM2 and the third clock CLK3 are controlled by the second host computer.
9. The FPGA-based data burst transmission and control method of claim 8, wherein, The read address of the first-level block memory BRAM1 and the write address of the second-level block memory BRAM2 are controlled by the FPGA.
10. The FPGA-based data burst transmission and control method of claim 9, wherein, When the first host computer is a CPU architecture, the FPGA and the first host computer use PCIe bus DMA transmission mode; When the first host computer writes a large data stream to the FPGA, the FPGA writes the burst data into the DDR buffer using the first clock CLK1; when the FPGA detects that data has started being written into the DDR, it writes the data from the DDR into the first-level block memory BRAM1 using the first clock CLK1; when the first host computer writes a small data stream to the FPGA, the second host computer, in response to the data readable valid signal output by the FPGA, reads data from the second-level block memory BRAM2 using a PIO interrupt polling method; the large data stream is a data stream greater than or equal to the first threshold; the small data stream is a data stream less than the first threshold.
11. The FPGA-based data burst transmission and control method of claim 10, wherein, When the length of the burst data is greater than or equal to the second threshold, the FPGA writes the burst data sequentially into multiple consecutively allocated storage areas in the first-level block memory BRAM1. Once the burst of data in one memory area has been written, the FPGA switches to the next memory area to continue writing; at the same time, the FPGA reads the burst of data from the previous memory area using the second clock CLK2 and writes it into the first-in-first-out (FIFO) memory. When the length of the burst data is less than the second threshold, the FPGA directly writes the burst data into a single storage area of the first-level block memory BRAM1.
12. The FPGA-based data burst transmission and control method of claim 11, wherein, Before writing burst data to the second-level block memory BRAM2, the FPGA checks whether the empty flag bit of the first-in-first-out (FIFO) memory is valid. When the null flag is invalid and the second host computer has finished reading the preceding data, the FPGA reads the burst data from the first-in-first-out (FIFO) memory using the second clock CLK2 and writes it into the second-level block memory (BRAM2). After writing, the FPGA outputs a data readable valid signal to the second host computer. In response to the data readable valid signal, the second host computer reads the burst data from the second-level block memory (BRAM2).
