A Multi-Protocol Stack Cooperative Retransmission Method, Electronic Device, and Storage Medium
By introducing a collaborative retransmission mechanism in the multi-protocol stack system, the memory waterline difference caused by retransmission is solved, synchronous retransmission between protocol stacks is realized, memory capacity requirements are reduced, and bandwidth utilization is improved.
Patent Information
- Application Number
- CN202410185218.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-19
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2044-02-19
AI Technical Summary
In multi-protocol stack systems, memory waterline differences caused by retransmission require large memory capacity, which affects the system design complexity, yield and cost.
By introducing a collaborative retransmission mechanism into all bound protocol stacks, when the receiving side of at least one protocol stack detects that the data frame verification fails, all protocol stacks simultaneously retransmit data frames received at the same time, and use the collaborative computing module to calculate the collaborative verification result signal combo to trigger the retransmission controller to trigger the retransmission request.
All protocol stacks are realized synchronous retransmission when errors occur, avoiding memory alignment requirements, thus reducing memory capacity requirements, improving bandwidth utilization, and reducing system resource requirements.
Smart Images

Figure CN118054886B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a multi-protocol stack collaborative retransmission method, an electronic device, and a storage medium. Background Art
[0002] In data communication, signals transmitted in an actual channel will be distorted and non-isochronously extended, resulting in a difference between the actually received signal and the originally transmitted signal, and ultimately reflected as bit errors in the system. To reduce the influence brought by channel non-linearity factors and minimize the bit error rate as much as possible, in addition to reasonably selecting signal processing methods such as modulation and demodulation, equalization and interleaving, retransmitting error frames is a common technical means. For example, in communication protocols such as PCIe, CXL, UCIe, etc., retransmitting the received error data frames, that is, retransmission, is a common mechanism used to eliminate the influence of bit errors on the system.
[0003] With the development of technologies such as artificial intelligence, 5G, and blockchain, the demand for high-bandwidth throughput is becoming increasingly strong. To obtain higher bandwidth, generally in a system, multiple communication protocol stacks are bound and used. During the transmission process, bit errors will randomly occur at the physical layer. Therefore, there will be a situation where a certain protocol stack performs retransmission while the other channels are still working normally, which will cause data transmission asynchrony seen at the protocol stack transceiver interface. Therefore, additional memory resources are required to cache the transmission jitter brought by the retransmission of multiple channels. The retransmission process is generally relatively complex, so the waterline difference generated in the memory is relatively large, and thus a relatively large capacity of the single receiver memory and the transmitter memory is required. The more protocol stacks bound in the system, the larger the memory capacity required. Since the memory capacity in the system is a fixed capacity, therefore, there is an urgent need for a retransmission method that does not require a large-scale memory. Summary of the Invention
[0004] In view of the above technical problems, the technical solution adopted by the present invention is: a multi-protocol stack collaborative retransmission method, the method comprising the following steps:
[0005] S100, obtaining N groups of protocol stacks for collaborative transmission, each group of protocol stacks including a first protocol stack and a second protocol stack.
[0006] S200, when the data frame received by the receiving side of at least one second protocol stack fails the check at the t-th moment, the N second protocol stacks respectively request the sending side of the corresponding first protocol stack to retransmit the data frame received at the t-th moment. Wherein, the i-th group of protocol stacks Pro i , where the value range of i is from 1 to N, Pro i 's retransmission step includes:
[0007] S210, the second protocol stack Pro i of Proi2 The receiving side of [Pro] obtains the j-th data frame received at the t-th moment.
[0008] S220, Pro i2 The receiving side of [Pro] obtains the cyclic redundancy check (CRC) result signal of the j-th data frame. i2,j 。
[0009] S230, Pro i2 The receiving side of [Pro] sends CRC i2,j to the collaborative computing module outside the second protocol stack, so that the collaborative computing module feeds back the calculated collaborative check result signal combo to the retransmission controller of the second protocol stack of each group of protocol stacks; wherein, the collaborative computing module is used to obtain the CRC result signals of all the data frames received by N second protocol stacks at the t-th moment, and calculate combo according to CRC.
[0010] S240, Pro i2 The retransmission controller REC of [Pro] i2 receives combo, and when combo is a preset retransmission value, REC i2 triggers the sending side of [Pro] i2 to send a retransmission request to the receiving side of the first protocol stack Pro of [Pro] i of [Pro] i1 of [Pro].
[0011] In addition, the present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program segment is stored, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement the above method.
[0012] In addition, the present invention also provides an electronic device, including a processor and the above non-transitory computer-readable storage medium.
[0013] The present invention has at least the following beneficial effects:
[0014] The present invention provides a multi-protocol stack collaborative retransmission method, an electronic device and a storage medium. When there is an error code in one group of protocol stacks among all the bound protocol stacks, it cleverly uses combo to make all the protocol stacks retransmit all the data frames at the moment when the error code occurs simultaneously. Since all the second protocol stacks retransmit simultaneously, there is no need to use memory alignment, thus solving the technical problem in the prior art that due to retransmission, the memory waterline difference is caused and a larger memory capacity is required. Description of the Drawings
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0016] Figure 1 It is a schematic diagram of a multi-protocol stack structure in the prior art;
[0017] Figure 2 It is a flowchart of a multi-protocol stack cooperative retransmission method provided by an embodiment of the present invention;
[0018] Figure 3 It is a schematic diagram of the structure of a multi-protocol stack cooperative transmission system provided by an embodiment of the present invention;
[0019] Figure 4 It is a schematic diagram of the internal structure of each protocol stack provided by an embodiment of the present invention;
[0020] Figure 5 It is a schematic diagram of the operation of a cooperative transmission multi-protocol stack provided by an embodiment of the present invention. Detailed implementation manners
[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0022] To meet the requirements of large bandwidth, multiple protocol stacks are bound together. Each protocol stack can both send and receive data. The receiving side of each protocol stack is used to receive data frames, and the sending side of each protocol stack is used to send data frames, which will not be stated hereinafter. To align the N bound protocol stacks, normally when the system sending side needs to send data, the data will be placed in the sending memories of all protocol stacks. When all N sending memories are not empty, each protocol stack will send the data in its own sending memory from the sending side of the first protocol stack to the receiving side of the second protocol stack, and the receiving sides of each second protocol stack will store the received data in the corresponding receiving memories. When all the receiving memories of the bound receiving protocol stacks are not empty, the system receiving side reads the data from each receiving memory. The receiving memory and the sending memory are used to align the sending and receiving of the N protocol stacks, and the purpose of data alignment is achieved through the receiving memory and the sending memory. Please refer to Figure 1 When the first group of protocol stacks Pro in all the bound protocol stacks 1The first protocol stack Pro 11 On the sending side of Pro, data is read from the transmission memory Tmemory through the downstream protocol interface 11 in Pro 11 The sending side of Pro sends the data to the physical layer phy through the downstream physical interface 1 The physical layer phy 1 then sends the data to Pro through the upstream physical interface 1 On the receiving side of the second protocol stack Pro 12 a bit error occurs. When Pro 12 the receiving side of Pro can detect that the received data frame fails the checksum during verification, that is, it is determined that a bit error has occurred. At this time, Pro is required to 11 the sending side of Pro retransmit the erroneous data frame and discard the currently failed checksum data frame through the error frame indication interface cancel, that is, it is no longer sent to the receiving memory Rmemory through the upstream protocol interface 11 until a correct frame is received. Since the bandwidth is preferentially used to transmit error frames, when Pro 11 the sending side of Pro receives the command to retransmit the error frame, it will feedback to the transmission memory Tmemory 11 to stop sending data, that is, to backpressure the data stream. At this time, other protocol stacks that do not generate transmission bit errors will transmit data normally, such as the Nth group of protocol stacks Pro N . Since Pro 11 the sending side of Pro no longer retrieves data from Tmemory 11 but Pro N the sending side of the first protocol stack Pro N1 normally retrieves data from the transmission memory Tmemory N1 , so Tmemory 11 will have more stored data than Tmemory N1 , that is, the waterline is higher. Since Pro 12 the receiving side discards data, but Pro N the receiving side of the second receiving protocol stack Pro N2 normally stores the data in the receiving memory Rmemory N2 , so Rmemory N2 will have more stored data than the receiving memory Rmemory 12There is more data stored, that is, the waterline is higher. Until the retransmission is completed, the additional bandwidth can be used to equalize the amount of data in the transmit memory and the receive memory. The process of retransmission is generally complex, so the difference in the waterline generated in the memory is relatively large, so the capacity of a single receive memory and transmit memory is required to be relatively large. For example, in UCIe and PCIe, it is generally required that a single receive memory and transmit memory each need 24 Kb. The more the number of protocol stacks bound in the system, the larger the memory required. Such a large-scale memory in the chip has a huge impact on design complexity, yield, and cost.
[0023] To solve the above technical problem of high memory capacity due to the waterline difference, the present invention provides a multi-protocol stack cooperative retransmission method. When any one of the N groups of protocol stacks bound in the retransmission method undergoes retransmission, the N groups of protocol stacks retransmit the data frames received at the same moment, so that all the bound protocol stacks are always synchronized, and there is no need for the transmit memory and the receive memory to store data in alignment. The following will specifically describe the present invention with reference to the accompanying drawings.
[0024] Please refer to Figure 2 , which shows a flowchart of a multi-protocol stack cooperative retransmission method. The method includes the following steps:
[0025] S100, obtain N groups of protocol stacks for cooperative transmission. Each group of protocol stacks includes a first protocol stack and a second protocol stack.
[0026] Among them, the structures of the N groups of protocol stacks are the same. The functions of the first protocol stacks in each group are the same, and the first protocol stack has a transmit side or a receive side. The functions of the second protocol stacks in each group are the same, and the second protocol stack has a transmit side or a receive side. Data is sent through the transmit side of each protocol stack, and data is received through the receive side of each protocol stack.
[0027] It should be noted that in the embodiments of the present invention, the present invention is specifically described by sending data through the transmit side of the first protocol stack and receiving data through the receive side of the second protocol stack.
[0028] Among them, the receive side of the second protocol stack is connected to the retransmission controller, and is used to receive a data frame, parse the data frame to obtain a frame number signal, a frame type signal, and a check code, send the obtained frame number signal and frame type signal to the retransmission controller, and send the check code to the cooperative calculation module outside the protocol stack.
[0029] Optionally, the frame number signal is the frame encoding of the received data frame or the frame encoding for confirmation received by the peer. In the prior art, other frame number signal methods also fall within the protection scope of the present invention.
[0030] Optionally, the frame type signal is one of the encoding type EXP of the received data frame, the frame encoding type ACK that the peer has confirmed receipt of, and the frame encoding type NAK that the peer needs to retransmit. Each received data frame has a frame encoding. When it is EXP, the encoding of the frame can be explicitly specified. When it is ACK or NAK, the encoding of the frame can be inferred by incrementing the frame number signal corresponding to the previous EXP. In the prior art, other frame type signals also fall within the protection scope of the present invention.
[0031] Optionally, the check code is used to verify the data frame. Optionally, the check code is a Cyclic Redundancy Check (CRC). In the prior art, other check methods for detecting errors that occur during data transmission or storage also fall within the protection scope of the present invention.
[0032] Among them, the retransmission controller is used to receive the frame number signal and the frame type signal parsed by the receiving side of the second protocol stack and the cooperative verification result signal from the cooperative computing module, and determine whether the peer needs to retransmit the data frame according to the frame number signal, the frame type signal and the cooperative verification result signal, and whether to instruct the upper layer to discard the corresponding data frame. For the data frame that needs to be retransmitted, the frame number signal of the data frame retransmitted by the peer needs to be calculated, and the frame type of the data frame sent by the peer is determined by the peer.
[0033] Among them, the first protocol stack is used to receive the signal sent by the retransmission controller and send the data frame. It should be noted that the first protocol stack is also used to send the data frame that the local end needs to send. When it is necessary to request the peer protocol stack to retransmit the data frame, the data signal that needs to be retransmitted by the peer is sent to the peer together with the data frame. When the peer requests the local end to retransmit, the retransmitted data frame comes from the backup of the system sending side data frame by the sending side of the local end; when the local end does not retransmit, the sent data frame comes from the system sending side.
[0034] S200, when the data frame received by the receiving side of at least one second protocol stack at the t-th moment fails the verification, the N second protocol stacks respectively request the sending side of the corresponding first protocol stack to retransmit the data frame received at the t-th moment. Wherein, t>0. That is: at the t-th moment, each of the N protocol stacks will transmit a data frame. When a receiving side among the N protocol stacks detects that the data frame verification fails at the t-th moment, the data frames transmitted by all protocol stacks at the t-th moment need to be retransmitted. In this way, the data reading and receiving of the receiving side and the sending side in different protocol stacks are synchronized, and no additional memory is required for caching.
[0035] Further, the retransmission step of the i-th second protocol stack Pro i , where the value range of i is from 1 to N, Pro i includes:
[0036] S210, Pro i The second protocol stack Pro i2 The receiving side of Pro obtains the j-th data frame received at the t-th moment. Here, j > 0. At the t-th moment, each of the other N - 1 protocol stacks for cooperative transmission will also receive a data frame simultaneously.
[0037] S220, Pro i2 The receiving side of Pro obtains the check result signal CRC of the j-th data frame i2,j .
[0038] S230, Pro i2 The receiving side of Pro sends CRC i2,j to the cooperative computing module outside the second protocol stack, so that the cooperative computing module feeds back the calculated cooperative check result signal combo to the retransmission controller of the second protocol stack in each group of protocol stacks; wherein, the cooperative computing module is used to obtain the check result signals CRC of all data frames received by N second protocol stacks at the t-th moment, and calculate combo based on CRC.
[0039] Wherein, CRC = {CRC 1,j , CRC 2,j , …, CRC i,j , …, CRC N,j}, CRC i,j is the check result signal of the j-th data frame of the i-th protocol stack Pro i . All the check result signals in CRC are the check result signals of the data frames received by the corresponding protocol stacks at the t-th moment. Each protocol stack sends the check result signal obtained by itself to the cooperative computing module through the interface, and the cooperative computing module can also distribute the cooperative check result signal to all protocol stacks.
[0040] Optionally, the cooperative computing module is a combinational logic circuit. When the check result signal indicates check failure with 1, then the cooperative computing module calculates the OR logic among the check result signals of N protocol stacks. When the check result signal indicates check failure with 0, then the cooperative computing module calculates the AND logic among the check result signals of N protocol stacks. Other combinational logic circuits in the prior art for implementing the same function fall within the protection scope of the present invention. In the prior art, other software computing methods for implementing the same function fall within the protection scope of the present invention.
[0041] It should be noted that the role of the collaborative computing module is to collect the verification result signals in all protocol stacks. When one of the verification result signals indicates verification failure, the result of this verification failure is sent to all protocol stacks simultaneously, causing all protocol stacks to retransmit all data frames at the same moment. That is to say, it is not only the protocol stack with verification failure that is required to retransmit, but when a data frame in one protocol stack fails verification, all protocol stacks will perform synchronous retransmission.
[0042] S240, Pro i2 retransmission controller REC i2 receives combo, and when combo is the preset retransmission value, REC i2 triggers Pro i2 the sending side of Pro i the first protocol stack Pro i1 the receiving side sends a retransmission request.
[0043] Optionally, when 1 represents verification failure, the preset retransmission value is 1, and retransmission occurs when combo is 1. When 0 represents verification failure, the preset retransmission value is 0, and retransmission occurs when combo is 0. In the prior art, all algorithms for implementing the same function fall within the protection scope of the present invention.
[0044] The present invention cleverly utilizes combo. When there is an error in one protocol stack among all bound protocol stacks, it makes all protocol stacks retransmit all data frames at the moment of the error through combo. Since all sending sides retransmit simultaneously, there is no need to use memory alignment, thus solving the technical problem in the prior art that due to retransmission, there is a memory waterline difference, which further requires a large memory capacity.
[0045] In the prior art, all methods for indicating error frame signals fall within the protection scope of the present invention. On this basis, the present invention also provides a new method for indicating error frame signals. S200 further includes: S250, obtaining the error frame indication signals used to indicate whether the current frame is an error frame in the receiving sides of all second protocol stacks. Further, among them, Pro i the second protocol stack Pro i2 the receiving side of Pro i2,j obtains ec
[0046] S251, Pro i2 the receiving side of Pro i2,j obtains the frame number signal ID of the j-th data frame i2,j and the frame type signal Type
[0047] S252, Pro i2 the receiving side of Pro i2,j sends IDi2,j Sent to REC i2 。
[0048] S253, REC i2 According to combo, ID i2,j and Type i2,j Parse to obtain the expected frame indication signal ctrlc indicating whether the j-th data frame is the expected frame i2,j 。
[0049] S254, Pro i2 The receiving side of i2,j obtains the error frame indication signal ec indicating whether the j-th data frame is an error frame according to CRC i2,j and ctrlc i2,j 。
[0050] Among them, ec i2,j is used to indicate that the data frame received by the second protocol stack is an error frame.
[0051] Optionally, when CRC i2,j is represented by 1 for verification failure and ctrlc i2,j is represented by 1 for a non-expected frame, ec i2,j is equal to the logical OR operation of CRC i2,j and ctrlc i2,j . When ec i2,j is 1, it indicates that the received data frame is an error frame, otherwise it is a correct frame. Optionally, when CRC i2,j is represented by 0 for verification failure and ctrlc i2,j is represented by 0 for a non-expected frame, ec i2,j is equal to the logical AND operation of CRC i2,j and ctrlc i2,j . When ec i2,j is 0, it indicates that the received data frame is an error frame, otherwise it is a correct frame. In the prior art, other methods for obtaining whether a data frame is an error frame based on the verification result signal of the data frame and whether it is an expected frame all fall within the protection scope of the present invention.
[0052] Among them, when ec i2,j indicates that the received data frame is an error frame, the receiving side of the system discards the error frame according to ec i2,j .
[0053] As a preferred embodiment, S200 further includes: S260, obtaining an error frame indication signal in the receiving side of all the second protocol stacks, and obtaining a cooperation indication signal according to all the error frame indication signals, where the cooperation indication signal is used to indicate whether the system receiving side discards data frames of all the received protocol stacks. Optionally, the method for obtaining the cooperation indication signal is as follows: when one of all the error frame indication signals indicates that a data frame is an error frame, the cooperation indication signal indicates discarding; otherwise, it does not discard. Optionally, when 1 is used to indicate an error frame, all the error frame indication signals are combined by logical OR to obtain the cooperation indication signal; when 0 is used to indicate an error frame, all the error frame indication signals are combined by logical AND to obtain the cooperation indication signal. Other methods for obtaining the cooperation indication signal in the prior art all fall within the protection scope of the present invention. When the receiving side of one of the second protocol stacks discards a data frame, the receiving sides of all the second protocol stacks discard the data frame, which can ensure that the data reception of the receiving sides of the second protocol stacks is exactly the same, and the data frame will not be received repeatedly, ensuring the correctness of data transmission.
[0054] Please refer to Figure 3 , which shows a schematic structural diagram of a multi-protocol stack cooperative transmission system. The system includes a system sending side, a first protocol stack, a physical layer, a second protocol stack, and a system receiving side, and N groups of protocol stacks are bound together. Among them, the internal structures of all the protocol stacks are the same. Each group of protocol stacks includes a first protocol stack and a second protocol stack, and each second protocol stack includes a protocol stack check interface crc_rslt, a cooperation check result signal interface combo_crc_rslt, and an error frame indication interface cancel. Among them, crc_rslt is used to transmit a check result signal CRC i,j , combo_crc_rslt is used to transmit a cooperation check result signal combo, and cancel is used to transmit an error frame indication signal ec i,j . The error frame indication signals ec 1,j -ec N,j of all the second protocol stacks are connected to the same combinational logic circuit, and the output result of this combinational logic circuit is the cooperation indication signal combo_cancel.
[0055] Please refer to Figure 4 , Figure 4The internal structure schematic diagram of each protocol stack is shown. The internal structures of each protocol stack are the same. Each protocol stack includes a receiving side, a retransmission controller, and a sending side. Among them, the receiving side includes a receiving-side check result signal interface rx_crc_rslt, a receiving-side frame number signal interface rx_se1_num, a receiving-side frame type signal interface rx_cmd_type, and a check result signal indication interface rx_cancel. The retransmission controller includes a controller-side check result signal interface ctrl_crc_rslt, a controller-side frame number signal interface ctrl_seq_num, a controller-side frame type signal interface ctrl_cmd_type, and an expected frame indication interface ctrl_cancel. After the receiving side parses the data frame, it passes the frame number signal to the retransmission controller through rx_seq_num and ctrl_seq_num, passes the frame type signal to the retransmission controller through rx_cmd_type and ctrl_cmd_type, passes the check result signal to the collaborative computing module through rx_crc_rslt and crc_rslt to calculate the collaborative check result signal, and passes the collaborative check result signal to the retransmission controller through combo_crc_rslt and ctrl_crc_rslt. The expected frame indication interface ctrl_cancel and the check result signal indication interface rx_cancel are connected to the combinational logic circuit, and the output result of the combinational logic circuit is connected to the error frame indication interface cancel. The retransmission controller determines whether to respond to the retransmission request from the peer end and whether to instruct the receiving side of the system to discard the corresponding data frame according to the frame number signal, the frame type signal, and the collaborative check result signal. For the data frame with bit errors, since the bit errors have occurred, all the information in this data frame is untrustworthy. Therefore, it is necessary to deduce the frame number of the current data frame with bit errors according to the frame number and frame type of the previous correct data frame; the calculated frame number signal and frame type signal constitute the data signal tx_retry, and the retransmission controller sends the retransmission signal tx_retry to the sending side of this protocol stack, and the sending side of this protocol stack sends a retransmission request to the receiving side of the peer protocol stack.
[0056] Please refer to Figure 5 , which shows the working schematic diagram of the multi-protocol stack for collaborative transmission. For the receiving sides of N second protocol stacks, at the receiving end recv_data, the corresponding data is received, and the signals corresponding to rx_crc_rslt and cancel are used to indicate whether the previous data frame can be received by the receiving side of the system. At time A, in the first group of protocol stacks, the second protocol stack Pro 12When the receiving side of [[ID=]] detects a checksum error in the data frame #1-1 received by recv_data, it sets the checksum result signal of rx_crc_rslt to indicate the checksum error. At the same time, the checksum result signal of rx_cancel and the error frame indication signal of cancel caused by it are set to notify the system receiving side to discard the data frame. Since Pro 12 the rx_crc_rslt of the receiving side of [[ID=]] is set, so the combo_crc_rslt will also be set. Pro 12 -Pro N2 the checksum result signal of ctrl_crc_rslt inside the receiving side of [[ID=]] is set, and all the second protocol stacks will request the sending side of the first protocol stack to retransmit the data frame corresponding to #1-1. Pro 12 the receiving side of [[ID=]] requests the local end to retransmit the data frame #1-1. Pro N2 the receiving side of [[ID=]] requests the local end to retransmit the data frame #N-1. It should be noted that the data frame #1-1 and the data frame #N-1 appear on the interfaces of their respective protocol stacks at the same time, and the frame number signals are the same. Since Pro 12 -Pro N2 the interface ctrl_crc_rstl of the receiving side of [[ID=]] detects a checksum error, and the expected frame indication signal of ctrl_cancel of the receiving side of all the second protocol stacks will be set after each data frame, indicating that the system receiving side should discard it until the data frame #1-1 or #N-1 requested for local retransmission is received at time B. From the above process, it can be seen that when multiple protocol stacks are bound and used, when a checksum error signal is detected during the transmission process of the receiving side of a certain second protocol stack, the receiving sides of the second protocol stacks that do not detect the checksum error signal will also request the protocol stack on the opposite end to retransmit together. In this way, all the receiving sides of the second protocol stacks and the sending side of the first protocol stack are synchronized, so there is no need to use an additional memory for aligned storage.
[0057] The method provided by the present invention can synchronize the error code signal to the retransmission controller module inside the receiving side of each second protocol stack when an error code is detected on the receiving side of one of the second protocol stacks. The retransmission controller will request the sending side of the corresponding first protocol stack to perform retransmission. Among them, the receiving side of the second protocol stack that detects the error code will request the sending side of the corresponding first protocol stack to retransmit the erroneous data frame, and the receiving side of the second protocol stack that does not detect the error code will also request the sending side of the first protocol stack to retransmit the data frame received simultaneously when the error code occurs. The receiving side of each second protocol stack will continuously generate an error frame indication signal to prevent the system receiving side from obtaining the data until the retransmitted one is received. Compared with the traditional method of requesting the peer of a protocol stack to perform retransmission only when a check error is detected in a certain protocol stack, which requires a large amount of memory to align the problem of asynchronous data stream transmission between multiple protocol stacks, in the present invention, when a check error is detected in a certain second protocol stack, all second protocol stacks request their respective peers to perform retransmission. Therefore, the data stream transmission remains synchronized between multiple groups of protocol stacks, and no additional hardware alignment storage is required. The present invention effectively reduces the requirement for storage resources in the system, effectively reduces the area and power consumption in chip design. In addition, since no additional bandwidth is required to level the waterline difference of data alignment, the bandwidth utilization rate of each protocol stack is improved. The more the number of protocol stacks, the more obvious the resource saving effect.
[0058] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one segment of program related to a method for implementing a method in the method embodiment. The at least one instruction or the at least one segment of program is loaded and executed by the processor to implement the method provided in the above embodiment.
[0059] An embodiment of the present invention further provides an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0060] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps in the method according to various exemplary embodiments of the present invention described above in this specification.
[0061] Although some specific embodiments of the present invention have been described in detail by way of examples, those skilled in the art should understand that the above examples are only for illustration and not for limiting the scope of the present invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the present invention. The scope disclosed by the present invention is defined by the appended claims.
Claims
1. A multi-protocol stack coordinated retransmission method, characterized in that: The method comprises the following steps: S100, obtaining N groups of protocol stacks for collaborative transmission, each group of protocol stacks including a first protocol stack and a second protocol stack; S200, when the data frame received by the receiving side of at least one second protocol stack at time t fails to be checked, the N second protocol stacks respectively request the sending side of the corresponding first protocol stack to retransmit the data frame received at time t, wherein the i-th group of protocol stacks Pro i , the value range of i is 1 to N, Pro i The retransmission steps include: S210, Pro i Second Protocol Stack Pro i2 The receiving side obtains the j-th data frame received at the t-th time; S220, Pro i2 The receiving side obtains the check result signal CRC of the jth data frame i2,j ; S230, Pro i2 The receiving side will CRC i2,j Sending to the collaborative computing module outside the second protocol stack, so that the collaborative computing module feeds back the calculated collaborative verification result signal combo to the retransmission controller of the second protocol stack of each group of protocol stacks; wherein the collaborative computing module is used to obtain the verification result signal CRC of all data frames received at the tth moment of the N second protocol stacks, and calculate combo according to the CRC; S240, Pro i2 Retransmission controller REC i2 Receive combo, when combo is the preset retransmission value, REC i2 Trigger Pro i2 Send Sideways Pro i The first protocol stack Pro i1 The receiving side sends a retransmission request; The S200 also includes: S250, obtaining an error frame indication signal from the receiving side of all second protocol stacks for indicating whether the current frame is an error frame; wherein, Pro i2 The receiving side obtains the error frame indication signal ec whether the jth data frame is an error frame i2,j The steps include: S251, Pro i2 The receiving side obtains the frame number signal ID of the jth data frame i2,j and frame type signal Type i2,j ; S252, Pro i2 The receiving side will ID i2,j and Type i2,j Send to REC i2 ; S253, REC i2 According to combo, ID i2,j and Type i2,j Parse and obtain the expected frame indication signal ctrlc to determine whether the jth data frame is the expected frame i2,j ; S254, Pro i2 The receiving side uses CRC i2,j and ctrlc i2,j Get the error frame indication signal ec of whether the jth data frame is an error frame i2,j ; S260: Acquire error frame indication signals from the receiving side of all second protocol stacks, and acquire a coordination indication signal according to all error frame indication signals, wherein the coordination indication signal is used to indicate whether the receiving side of the system discards all data frames received by the second protocol stack.
2. The method according to claim 1, characterized in that In S254, when CRC i2,j Use 1 to indicate verification failure and ctrlc i2,j When 1 is used to indicate an unexpected frame, ec i2,j Equal to CRC i2,j and ctrlc i2,j The logical OR operation, ec i2,j When it is 1, it indicates that the received data frame is an error frame, otherwise it is a correct frame.
3. The method according to claim 1, characterized in that The method for acquiring the coordinated indication signal is as follows: when one of all the error frame indication signals indicates that the data frame is an error frame, the coordinated indication signal indicates that it is lost; otherwise, it is not lost.
4. The method according to claim 3, characterized in that When 1 is used to indicate an error frame, all error frame indication signals are combined logically or to obtain a coordinated indication signal; when 0 is used to indicate an error frame, all error frame indication signals are combined logically and to obtain a coordinated indication signal.
5. The method according to claim 3, characterized in that: In S230, when the check result signal indicates a check failure with 1, the collaborative calculation module calculates the OR logic between the check result signals of the receiving side of the N second protocol stacks; When the verification result signal uses 0 to indicate verification failure, the collaborative calculation module calculates the AND logic between the verification result signals of the receiving sides of the N second protocol stacks.
6. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the method according to any one of claims 1 to 5.
7. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 6.
Citation Information
Patent Citations
Communication method and communication device
CN109392152A
Data detection method for protocol stack communication and robot
CN116032734A