Dual-path redundant data exchange method and system based on Aurora protocol
Through the dual-channel redundant data exchange system based on the Aurora protocol, dual-channel independent reception and de-redundant processing technology is used to solve the problem of reduced data transmission certainty in high-speed communication systems and achieve improved data accuracy and stability.
Patent Information
- Application Number
- CN202111080467.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-15
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-09-15
AI Technical Summary
In high-speed communication systems, with the increase of clock rate and circuit wiring and clock delay factors, the certainty of data transmission decreases. It is difficult for existing technology to achieve high-speed data exchange while ensuring data stability, resulting in transmission accuracy. decline.
Adopting a dual-channel redundant data exchange system based on the Aurora protocol, the first and second Aurora protocol modules independently receive external data, perform redundant processing and transmit it through DMA technology, combined with data caching and sorting and sending modules to ensure the accuracy of the data. sex and stability.
It improves the accuracy and stability of data in the link, controls data throughput, avoids data loss, and improves data transmission performance at high rates through de-redundancy operations.
Smart Images

Figure CN113722250B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of high-speed communication equipment, and in particular to a dual-path redundant data exchange method and system based on the Aurora protocol. Background Art
[0002] With the popularization of communication technologies such as 5G, communication equipment has gradually increased its demands for real-time data processing, transmission speed, and high bandwidth. The low-speed transmission bus traditionally used in embedded systems has the advantages of strong stability and simple operation, but it can easily become a bottleneck in data transmission due to the limitation of transmission bandwidth. The high-speed protocol traditionally used between devices has the advantages of high bandwidth and low latency, but due to the poor interface universality, complex transmission protocols, and the increasing number of data transmission channels, the difficulty and cost of development are increased.
[0003] In order to cope with the trend of rapid development of communication equipment, the communication system has higher modularity and integration, and high-speed data exchange between devices is carried out while ensuring data stability in the transmission link, which has become a hot topic in the communication industry. As the most widely used computer bus, the PCIE bus has the advantages of improving bus bandwidth and transmission rate, using DMA to alleviate the conflict between bus bandwidth and high-speed processors, and having dual-channel transmission technology and expansion flexibility.
[0004] At present, with the increase of clock rate, circuit routing and clock delay and other factors, the certainty of data transmission decreases accordingly. In order to improve the accuracy of data in the link, a dual-path redundant data exchange method and system based on the Aurora protocol is urgently needed. Summary of the invention
[0005] Based on this, it is necessary to provide a dual-path redundant data exchange system and system based on the Aurora protocol that can improve data processing efficiency in response to the above technical problems.
[0006] To this end, the first aspect of the present invention provides a dual-path redundant data exchange system based on the Aurora protocol, the system comprising a first Aurora protocol module Aurora_0, a second Aurora protocol module Aurora_1, a receiving side module Rx_top, a redundancy removal module Rd_arbiter, a data cache module dma_ctrl, a data sorting and sending module Tx_engine, a data parsing and receiving module Rx_engine, a data splitting and sending module Wr_arbiter and a sending side module Tx_top, the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 The Aurora protocol module Aurora_1 is used to independently receive external data respectively, the receiving side module Rx_top is connected to the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, the redundancy removal module Rd_arbiter is connected to the receiving side module Rx_top, the data cache module dma_ctrl is connected to the redundancy removal module Rd_arbiter, the data sorting and sending module Tx_engine and the data parsing and receiving module Rx_engine are both connected to the data cache module dma_ctrl, the data The data sorting sending module Tx_engine and the data parsing receiving module Rx_engine are also connected to PCIE, the data shunt sending module Wr_arbiter is connected to the data cache module dma_ctrl, and the sending side module Tx_top is connected to the data shunt sending module Wr_arbiter, the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1; when data transmission is performed, based on the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 1 respectively and independently receive external data, and input the external data that has completed verification first into the de-redundancy module Rd_arbiter, and then initiate a DMA through the data of the de-redundancy module Rd_arbiter, and sequentially pass through the data cache module dma_ctrl and the data sorting and sending module Tx_engine to PICE; the data parsing and receiving module Rx_engine receives the data returned by PICE until a DMA is completed; the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clearing module Rdclr, sends the clear signal to the PC end connected to the PCIE through PCIE.
[0007] In a possible preferred implementation, the data cache module dma_ctrl includes a first data segmentation module Status, a second data segmentation module Internal, a sequential cache module Read_req and a sorting output module Order, the first data segmentation module Status is connected to the de-redundancy module Rd_arbiter, the second data segmentation module Internal is connected to the first data segmentation module Status, the sequential cache module Read_req, the data parsing receiving module Rx_engine and the sequential cache module Read_req, the sequential cache module Read_req is connected to the data parsing receiving module Rx_engine, and the sorting output module Order is connected to the data parsing receiving module Rx_engine and the de-redundancy module Rd_arbiter.
[0008] In a possible preferred implementation, the data sorting and sending module Tx_engine includes a data packaging module Pkt_gen, a data clearing module Rdclr and a data reading and sending module Tx_trn, the data packaging module Pkt_gen is connected to the data parsing and receiving module Rx_engine, the data clearing module Rdclr is connected to the de-redundancy module Rd_arbiter, the data reading and sending module Tx_trn is connected to both the data packaging module Pkt_gen and the data clearing module Rdclr, and the data reading and sending module Tx_trn is also connected to PCIE.
[0009] In a possible preferred implementation, the data cache module dma_ctrl includes a first data segmentation module Status and a second data segmentation module Internal; the first data segmentation module Status is connected to both the data branching and sending module Wr_arbiter and the sorting and sending module Tx_engine, and the second data segmentation module Internal is connected to both the first data segmentation module Status and the sorting and sending module Tx_engine.
[0010] In a possible preferred implementation, the data sorting and sending module Tx_engine includes a data packaging module Pkt_gen, a reset data module Dma_rst and a data reading and sending module Tx_trn, the data packaging module Pkt_gen is connected to the data parsing and receiving module Rx_engine, the reset data module Dma_rst is connected to the de-redundancy module Rd_arbiter, the data reading and sending module Tx_trn is connected to both the data packaging module Pkt_gen and the reset data module Dma_rst, and the data reading and sending module Tx_trn is also connected to PCIE.
[0011] In a possible preferred implementation, the system further includes a data transport module Egress, and the data transport module Egress is connected to both the data arbitrating and sending module Wr_arbiter and the data reading and sending module Tx_trn.
[0012] In a possible preferred implementation, the system further includes a register Register, and the register Register is connected to both the data branching and sending module Wr_arbiter and the de-redundancy module Rd_arbiter.
[0013] The second aspect of the present invention further provides a dual-path redundant data exchange method based on the Aurora protocol, the method is based on the dual-path redundant data exchange system based on the Aurora protocol, and the method comprises the following steps:
[0014] Step S100: receiving external data independently based on the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, and inputting a channel of external data that has been checked first to the de-redundancy module Rd_arbiter;
[0015] Step S200: the data from the de-redundancy module Rd_arbiter initiates a DMA, and then passes through the data buffer module dma_ctrl and the data arrangement and transmission module Tx_engine to the PICE in sequence;
[0016] Step S300: the data parsing receiving module Rx_engine receives the data returned by PICE until a DMA is completed;
[0017] Step S400: the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clear module Rdclr, sends the clear signal to the PC end connected to the PCIE via the PCIE.
[0018] In a possible preferred embodiment, the method further comprises:
[0019] A first timestamp is generated based on that the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 receive external data independently respectively and input a channel of external data that has been checked first into the de-redundancy module Rd_arbiter.
[0020] In a possible preferred implementation, the method also includes: when the de-redundancy module Rd_arbiter detects that there is data in the cache of the receiving side module Rx_top, and when there is data in the index in the register Register at this time, it reads the index and the physical address, and splits the actual transmission length into 8K each, and initiates a DMA, wherein the actual transmission length is 64KB.
[0021] The system and method of the present invention achieve the following technical effects:
[0022] The above-mentioned dual-path redundant data exchange method and system based on the Aurora protocol sequentially sets the first Aurora protocol module Aurora_0, the second Aurora protocol module Aurora_1, the receiving side module Rx_top, the redundancy removal module Rd_arbiter, the data cache module dma_ctrl, the data sorting and sending module Tx_engine, the data parsing and receiving module Rx_engine, the data splitting and sending module Wr_arbiter and the sending side module Tx_top. Two independent working interfaces are used, namely the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, to improve the accuracy of the data in the link.
[0023] During data transmission, the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 receive external data independently, and input the external data that has completed verification first into the de-redundancy module Rd_arbiter, and then initiate a DMA through the data of the de-redundancy module Rd_arbiter, and then send it to PICE through the data cache module dma_ctrl and the data sorting and sending module Tx_engine in turn.
[0024] Next, the data parsing receiving module Rx_engine receives the data returned by PICE until a DMA ends. Finally, the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clearing module Rdclr, sends the clear signal to the PC end connected to the PCIE via PCIE, thereby realizing data caching, being able to control data throughput, and not causing data loss. The dual-path redundant data in the cache is judged according to the judgment conditions to realize de-redundancy operation. This transmission method improves data stability at high speeds. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0026] Figure 1 A block diagram of a device application environment for a dual-path redundant data exchange method based on the Aurora protocol in one embodiment;
[0027] Figure 2 is a structural block diagram of a dual-path redundant data exchange system based on the Aurora protocol in one embodiment;
[0028] Figure 3 It is a flow structure block diagram of DMA in the sending direction in a dual-path redundant data exchange method based on the Aurora protocol in one embodiment;
[0029] Figure 4 It is a flow structure block diagram of DMA in the receiving direction in a dual-path redundant data exchange method based on the Aurora protocol in one embodiment;
[0030] Figure 5 The figure is a flow chart of a dual-path redundant data exchange method based on the Aurora protocol in one embodiment;
[0031] Figure 6 A flowchart of read / write request priority arbitration in one embodiment;
[0032] Figure 7 FIG. 1 is a flowchart of reading a BD in an embodiment. DETAILED DESCRIPTION
[0033] The specific embodiments of the present invention are described in detail below. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present invention, some variations and improvements can also be made. These all belong to the protection scope of the present invention. In addition, the embodiments in this application and the features in the embodiments can be combined with each other without conflict.
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment 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 the field without creative work should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0036] In one embodiment, Figure 1 As shown, an application scenario diagram of a dual-path redundant data exchange system based on the Aurora protocol and a dual-path redundant data exchange method based on the Aurora protocol is provided.
[0037] In one embodiment, Figure 2 As shown, a dual-path redundant data exchange system based on the Aurora protocol is provided, the system comprising a first Aurora protocol module Aurora_0, a second Aurora protocol module Aurora_1, a receiving side module Rx_top, a de-redundancy module Rd_arbiter, a data cache module dma_ctrl, a data sorting and sending module Tx_engine, a data parsing and receiving module Rx_engine, a data branching and sending module Wr_arbiter and a sending side module Tx_top.
[0038] The first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 are data transmissions that comply with the Aurora protocol. The data converted by this module complies with the AXI port protocol, and the data is passed to the internal logic of the FPGA for use.
[0039] The first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 are used to independently receive external data respectively, the receiving side module Rx_top is connected to the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, the de-redundancy module Rd_arbiter is connected to the receiving side module Rx_top, the data cache module dma_ctrl is connected to the de-redundancy module Rd_arbiter, the data sorting and sending module Tx_engine and the data parsing and receiving module Rx_engine are both connected to the data cache module dma_ctrl, the data sorting and sending module Tx_engine and the data parsing and receiving module Rx_engine are also connected to PCIE, the data branch sending module Wr_arbiter is connected to the data cache module dma_ctrl, and the sending side module Tx_top is connected to the data branch sending module Wr_arbiter, the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1.
[0040] It should be noted that the description parts in the subsequent embodiments, such as the first Aurora protocol module Aurora_0, the second Aurora protocol module Aurora_1, the receiving side module Rx_top, the redundancy removal module Rd_arbiter, the data caching module dma_ctrl, the data sorting and sending module Tx_engine, the data parsing and receiving module Rx_engine, the data branch sending module Wr_arbiter and the sending side module Tx_top may be replaced by subsequent letter labels. For example, the first Aurora protocol module Aurora_0 is called Aurora_0, or the Aurora_0 module, and others such as the second Aurora protocol module Aurora_1, the receiving side module Rx_top, the redundancy removal module Rd_arbiter, the data caching module dma_ctrl, the data sorting and sending module Tx_engine, the data parsing and receiving module Rx_engine, the data branch sending module Wr_arbiter and the sending side module Tx_top are represented similarly.
[0041] Furthermore, Rx_top is the receiving module on the Aurora side, and its functions include parsing data, caching, comparing, verifying, and controlling data flow rate of two-way Aurora data. The corresponding Tx_top is the sending module on the Aurora side, which verifies the two-way data, and converts the verified data into AXI bus mode for sending; the main function of the Rd_arbiter module is to perform redundancy operations on the two-way data received, and control the data length and channel of a sending request, etc. The corresponding Wr_arbit module sends the data from two independent interfaces respectively, and controls the length of a receiving request, etc.; the dma_ctrl module caches and slices the data and initiates dma operations; the Tx_engine module organizes the data packets to be sent into the format of the PCIE standard packet for sending, and the corresponding Rx_engine module parses the received PCIE data.
[0042] In one embodiment, Figure 2-Figure 4 As shown, the data cache module dma_ctrl includes a first data segmentation module Status, a second data segmentation module Internal, a sequential cache module Read_req and a sorting output module Order. The first data segmentation module Status is connected to the de-redundancy module Rd_arbiter, the second data segmentation module Internal is connected to the first data segmentation module Status, the sequential cache module Read_req, the data parsing receiving module Rx_engine and the sequential cache module Read_req, the sequential cache module Read_req is connected to the data parsing receiving module Rx_engine, and the sorting output module Order is connected to the data parsing receiving module Rx_engine and the de-redundancy module Rd_arbiter.
[0043] In one embodiment, Figure 3 As shown, the data sorting and sending module Tx_engine includes a data packaging module Pkt_gen, a data clearing module Rdclr and a data reading and sending module Tx_trn, the data packaging module Pkt_gen is connected to the data parsing and receiving module Rx_engine, the data clearing module Rdclr is connected to the de-redundancy module Rd_arbiter, the data reading and sending module Tx_trn is connected to both the data packaging module Pkt_gen and the data clearing module Rdclr, and the data reading and sending module Tx_trn is also connected to PCIE.
[0044] In one embodiment, Figure 2-Figure 3As shown, the data cache module dma_ctrl includes a first data segmentation module Status and a second data segmentation module Internal; the first data segmentation module Status is connected to the data arbitrating and sending module Wr_arbiter and the sorting and sending module Tx_engine, and the second data segmentation module Internal is connected to the first data segmentation module Status and the sorting and sending module Tx_engine.
[0045] In one embodiment, Figure 4 As shown, the data sorting and sending module Tx_engine includes a data packaging module Pkt_gen, a reset data module Dma_rst and a data reading and sending module Tx_trn, the data packaging module Pkt_gen is connected to the data parsing and receiving module Rx_engine, the reset data module Dma_rst is connected to the de-redundancy module Rd_arbiter, the data reading and sending module Tx_trn is connected to both the data packaging module Pkt_gen and the reset data module Dma_rst, and the data reading and sending module Tx_trn is also connected to PCIE.
[0046] Furthermore, Figure 4 The functions of the Status module, Internal module, and Tx_trn module are equivalent to Figure 3 The function of the Dma_rst module is to initiate a reset when a 64K data transmission is completed. This module performs a cache processing on the reset request.
[0047] Furthermore, the Pkt_gen module packages the data and forms a frame header and data that conforms to the protocol; the Tx_trn module controls the reading of data and sends it to PCIE; the Read_req module caches the sequence information of the data packet; the Order module sorts the received data and outputs it; the Rx_engine module parses and caches the received data; and the Rdclr module caches the clear data signal.
[0048] In one embodiment, Figure 4 As shown, the dual-path redundant data exchange system based on the Aurora protocol also includes a data transport module Egress, which is connected to both the data arbitrating and sending module Wr_arbiter and the data reading and sending module Tx_trn. The Egress module reads the data and sends the read data to the Tx_trn module.
[0049] In one embodiment, Figure 3 and Figure 4 As shown, the dual-path redundant data exchange system based on the Aurora protocol further includes a register Register, and the register Register is connected to both the data branch sending module Wr_arbiter and the de-redundancy module Rd_arbiter.
[0050] Register is a register module that stores some instruction information for reading or writing operation information; the Status module and the Internal module split and slice the data twice respectively and initiate DMA operations.
[0051] In summary, the dual-path redundant data exchange method and system based on the Aurora protocol of the present invention sequentially sets the first Aurora protocol module Aurora_0, the second Aurora protocol module Aurora_1, the receiving side module Rx_top, the redundancy removal module Rd_arbiter, the data cache module dma_ctrl, the data sorting and sending module Tx_engine, the data parsing and receiving module Rx_engine, the data branching and sending module Wr_arbiter and the sending side module Tx_top. Two-path independent working interfaces are used, namely the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, to improve the accuracy of the data in the link, and when performing data transmission, the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 are used to independently receive external data respectively.
[0052] And the external data that has completed the verification first is input into the de-redundancy module Rd_arbiter, and then a DMA is initiated through the data of the de-redundancy module Rd_arbiter, and then it is sent to PICE through the data cache module dma_ctrl and the data sorting and sending module Tx_engine in turn. Then, the data parsing and receiving module Rx_engine receives the data returned by PICE until a DMA is completed. Finally, the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clearing module Rdclr, the clear signal is sent to the PC end connected to the PCIE through PCIE, thereby realizing data caching, being able to control data throughput, and not causing data loss. The dual-path redundant data in the cache is judged according to the judgment conditions to realize the de-redundancy operation. This transmission method improves the data stability at high speed.
[0053] In one embodiment, Figure 5As shown, the present invention also provides a dual-path redundant data exchange method based on the Aurora protocol, the method is based on the dual-path redundant data exchange system based on the Aurora protocol, and the method includes the following steps:
[0054] Step S100: receiving external data independently based on the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, and inputting a channel of external data that has been checked first to the de-redundancy module Rd_arbiter;
[0055] Step S200: the data from the de-redundancy module Rd_arbiter initiates a DMA, and then passes through the data buffer module dma_ctrl and the data arrangement and transmission module Tx_engine to the PICE in sequence;
[0056] Step S300: the data parsing receiving module Rx_engine receives the data returned by PICE until a DMA is completed;
[0057] Step S400: the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clear module Rdclr, sends the clear signal to the PC end connected to the PCIE via the PCIE.
[0058] Specifically, the method further includes:
[0059] A first timestamp is generated based on that the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 receive external data independently respectively and input a channel of external data that has been checked first into the de-redundancy module Rd_arbiter.
[0060] Specifically, the method also includes: when the de-redundancy module Rd_arbiter detects that there is data in the cache of the receiving side module Rx_top, and when there is data in the index in the register Register at this time, it reads the index and the physical address, and splits the actual transmission length into 8K each, and initiates a DMA, wherein the actual transmission length is 64KB.
[0061] In one embodiment, Figure 2-Figure 4As shown, external data enters the cache of the Rx_top module from two independent data paths, Aurora_0 and Aurora_1. When the cache processing in this module is not timely, the flow control operation will be triggered to control the data flow rate. When there is data in the cache, this module starts to read data from the two caches to check the data header, tail, data length and CRC. Whichever of the two data paths completes the check first will be transmitted to the next level, and the corresponding other data path will be discarded. In this case, the two redundant data paths are converted into one data path.
[0062] In order to ensure the normal operation of the link, the timestamp function is added. By calculating the difference of the timestamps, the transmission time of the link can be obtained. If the time is too long, a timeout report will be made. When the data is output from this module, the first timestamp is added.
[0063] like Figure 3 As shown, first, according to Figure 3 In the first step, when the Rd_arbiter module detects that there is data in the Rx_top cache and the index in the register (Register) at this time has data, it reads the index and physical address; ② splits the actual transmission length (64KB) into 8KB each and initiates a DMA; ③ Status splits the 8KB DMA into 4KB each and initiates a DMA; ④ Internal initiates a 4KB DMA; ⑤ Pkt_gen sends the tag information used by the framing header to the Read_req cache; ⑥ Pkt_gen splits the 4KB into 4KB according to the maximum request length of PCIE The frame headers that meet the protocol are divided and put into the cache for Tx_trn to read. Tx_trn_sm reads the frame header and sends it to the PCIE core; then, ⑦Rx_engin receives the data returned by the PCIE read request, and sends the tag sequence information of the received frame to Read_req to determine whether there is a response timeout; ⑧Rx_engin sends the received data to the Order module for sorting; ⑨The Order module sorts the data in the order of the request frame and sends it to the Rx_top module; ⑩The data is sent to Rd_arbiterr to count the DMA length; ⑪Rx_engin generates a 4KB DMA done signal based on the actual received length and DMA length; ⑫Repeat steps ②~⑫ to complete the DMA of all 8K data. In this step, a second timestamp is added to the data; ⑬After completing the DMA of the data, a clear signal is initiated; ⑭The clear signal is sent to the PC end; Finally, jump to the waiting state and wait for the next DMA to be initiated.
[0064] Furthermore, if Figure 2 and Figure 4 As shown, the data in the receiving direction is Figure 4The serial number sequence is as follows: ①Wr_arbiter detects that there is data in the front end and an index is available, and reads the physical address; ②Wr_arbiter initiates DMA (64KB); ③Status splits the 64KB DMA into a DMA of 4KB each; ④Internal initiates a 4KB DMA; ⑤Pkt_gen splits the 4KB according to the size of the PCIE frame and forms a frame header that complies with the protocol and puts it into the fifo for Tx_trn to read; ⑥, ⑦, ⑧, ⑨, tx_trn_sm reads the data; ⑩tx_trn_sm reads the frame header and data and sends it to the PCIE core, and generates a 4KB DMA done signal based on the DMA length and the actual length sent; ⑪Status repeats ③~⑩ until all 4KB DMAs are completed and a 64KB DMAdone signal is generated. In this step, the data is timestamped for the third time. ; ⑫Wr_arbiter detects the 64KB DMA done signal, and writes information frames such as frame length and frame check result into Dma_Wrset; ⑬Tx_trn reads the data cached in Dma_Wrset and sends it to the PCIE core; finally, it jumps to the waiting state and waits for the next DMA to be initiated.
[0065] Finally, the data is sent to the cache of Tx_top, and the single-channel data is verified and copied into two identical data channels. A fourth timestamp is added here, and the time consumed in the link can be calculated by the difference in timestamps. A threshold is set in this module. When the difference in timestamps exceeds the set threshold, the data is discarded until the next frame header is detected, and then the data is judged and verified again.
[0066] In one embodiment, Figure 6 As shown, when a DMA read-write conflict occurs, the read and write requests are cached. When the read or write request reaches half of the cache depth 2n, whichever request is executed first, during the execution process, the cache continues to receive requests. Assuming that the read request now satisfies the cache depth n, n read requests are executed first, and then it is determined whether the write request at this time also satisfies the depth n. If so, n read requests are executed. If not, it returns to the initial state and waits for which read or write request first satisfies the depth n condition, and so on.
[0067] The flowchart of the adopted solution for reading BD is as follows Figure 7 As shown in the figure, any data interaction between FPGA and PC first reads / writes data to the register module of FPGA through PC, and FPGA performs the next operation according to the value in the register.
[0068] Here, the concept of BD is introduced, that is, before PCIE DMA reads and writes data, the PC will write the BD value into the register. By reading the BD value of the register, the index number can be extracted, and the index number can be used to read the physical address in the corresponding RAM. The corresponding physical address is the (PC buffer) address of the FPGA for DMA operation. Data transmission will be performed based on this address.
[0069] In summary, the dual-path redundant data exchange method and system based on the Aurora protocol provided by the present invention can solve the problem of reduced data transmission certainty caused by factors such as increased clock rate, circuit routing and clock delay in the prior art in high-speed communication systems, thereby improving the accuracy of data in the link. For this purpose, the system adopts a dual-path independent working interface. After receiving the data transmitted by the bus, it can cache the data to control the data throughput, thereby avoiding data loss, and judging the dual-path redundant data in the cache according to the judgment conditions, realizing de-redundancy operation, thereby effectively improving the data stability at high speed.
[0070] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is only limited by the claims and their full scope and equivalents. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
[0071] Those skilled in the art can understand that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be regarded as structures within the hardware component; the modules for implementing various functions can also be regarded as both software programs for implementing the method and structures within the hardware component.
[0072] In addition, all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.
[0073] In addition, various implementation modes of the embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed by the embodiments of the present invention.
Claims
1. A dual-path redundant data exchange system based on the Aurora protocol, characterized in that: The system includes a first Aurora protocol module Aurora_0, a second Aurora protocol module Aurora_1, a receiving side module Rx_top, a redundancy removal module Rd_arbiter, a data cache module dma_ctrl, a data sorting and sending module Tx_engine, a data parsing and receiving module Rx_engine, a data branching and sending module Wr_arbiter and a sending side module Tx_top. The first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 are used to independently receive external data respectively. The receiving side module Rx_top is connected to the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1. The redundancy removal module Rd_arbiter is connected to the receiving side module Rx_top. The data cache module dma_ctrl is connected to the redundancy removal module Rd_arbiter. The data sorting and sending module Tx_engine and the data parsing and receiving module Rx_engine are both connected to the data cache module dma_ctrl. The data sorting and sending module Tx_engine and the second Aurora protocol module Aurora_1 are connected to the data cache module dma_ctrl. The data analysis receiving module Rx_engine is also connected to PCIE, the data branch sending module Wr_arbiter is connected to the data cache module dma_ctrl, and the sending side module Tx_top is connected to the data branch sending module Wr_arbiter, the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1; when data transmission is performed, external data is received independently based on the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, and the external data with priority to complete the verification is input to the de-redundancy module Rd_arbiter, and then a DMA is initiated through the data of the de-redundancy module Rd_arbiter, and then the data is sent to PICE through the data cache module dma_ctrl and the data sorting and sending module Tx_engine in turn; the data analysis receiving module Rx_engine receives the data returned by PICE until a DMA is completed; the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clearing module Rdclr, the clear signal is sent to the PC end connected to the PCIE through PCIE.
2. The dual-path redundant data exchange system based on the Aurora protocol according to claim 1, characterized in that: The data cache module dma_ctrl includes a first data segmentation module Status, a second data segmentation module Internal, a sequential cache module Read_req and a sorting output module Order. The first data segmentation module Status is connected to the de-redundancy module Rd_arbiter, the second data segmentation module Internal is connected to the first data segmentation module Status, the sequential cache module Read_req, the data parsing receiving module Rx_engine and the sequential cache module Read_req, the sequential cache module Read_req is connected to the data parsing receiving module Rx_engine, and the sorting output module Order is connected to the data parsing receiving module Rx_engine and the de-redundancy module Rd_arbiter.
3. The dual-path redundant data exchange system based on the Aurora protocol according to claim 2, characterized in that: The data sorting and sending module Tx_engine includes a data packaging module Pkt_gen, a data clearing module Rdclr and a data reading and sending module Tx_trn. The data packaging module Pkt_gen is connected to the data parsing and receiving module Rx_engine, the data clearing module Rdclr is connected to the de-redundancy module Rd_arbiter, the data reading and sending module Tx_trn is connected to both the data packaging module Pkt_gen and the data clearing module Rdclr, and the data reading and sending module Tx_trn is also connected to PCIE.
4. The dual-path redundant data exchange system based on the Aurora protocol according to claim 1, characterized in that: The data cache module dma_ctrl includes a first data segmentation module Status and a second data segmentation module Internal; the first data segmentation module Status is connected to the data arbitrating and sending module Wr_arbiter and the sorting and sending module Tx_engine, and the second data segmentation module Internal is connected to the first data segmentation module Status and the sorting and sending module Tx_engine.
5. The dual-path redundant data exchange system based on the Aurora protocol according to claim 4, characterized in that: The data sorting and sending module Tx_engine includes a data packaging module Pkt_gen, a reset data module Dma_rst and a data reading and sending module Tx_trn. The data packaging module Pkt_gen is connected to the data parsing and receiving module Rx_engine, the reset data module Dma_rst is connected to the de-redundancy module Rd_arbiter, the data reading and sending module Tx_trn is connected to both the data packaging module Pkt_gen and the reset data module Dma_rst, and the data reading and sending module Tx_trn is also connected to PCIE.
6. The dual-path redundant data exchange system based on the Aurora protocol according to claim 5, characterized in that: It also includes a data transport module Egress, and the data transport module Egress is connected to both the data arbitrating and sending module Wr_arbiter and the data reading and sending module Tx_trn.
7. The dual-path redundant data exchange system based on the Aurora protocol according to any one of claims 1 to 6, characterized in that: It also includes a register Register, and the register Register is connected to both the data branching and sending module Wr_arbiter and the de-redundancy module Rd_arbiter.
8. A dual-path redundant data exchange method based on the Aurora protocol, characterized in that: The method is based on the dual-path redundant data exchange system based on the Aurora protocol according to claim 7, and the method comprises the following steps: Step S100: receiving external data independently based on the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1, and inputting a channel of external data that has been checked first to the de-redundancy module Rd_arbiter; Step S200: the data from the de-redundancy module Rd_arbiter initiates a DMA, and then passes through the data buffer module dma_ctrl and the data arrangement and transmission module Tx_engine to the PICE in sequence; Step S300: the data parsing receiving module Rx_engine receives the data returned by PICE until a DMA is completed; Step S400: the de-redundancy module Rd_arbiter initiates a clear signal, and based on the data clear module Rdclr, sends the clear signal to the PC end connected to the PCIE via the PCIE.
9. The dual-path redundant data exchange method based on the Aurora protocol according to claim 8, characterized in that: The method further comprises: A first timestamp is generated based on that the first Aurora protocol module Aurora_0 and the second Aurora protocol module Aurora_1 receive external data independently respectively and input a channel of external data that has been checked first into the de-redundancy module Rd_arbiter.
10. The dual-path redundant data exchange method based on the Aurora protocol according to claim 8, characterized in that: The method also includes: when the de-redundancy module Rd_arbiter detects that there is data in the cache of the receiving side module Rx_top, and when there is data in the index in the register Register at this time, it reads the index and the physical address, and splits the actual transmission length into 8K each, and initiates a DMA, wherein the actual transmission length is 64KB.
