Communication protocol implementation method and communication system
By using multiple data channels in the communication system for data transmission and performing merge operations, the shortcomings of existing communication protocols in multi-rate, multi-channel, and multi-user interfaces are solved, and flexible transmission rate selection and system performance improvement are achieved.
Patent Information
- Application Number
- CN202211573750.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-12-08
AI Technical Summary
The existing communication protocols are difficult to meet the demand for the use of multi-rate, multi-channel, and multi-user interfaces of the rapidly developing network communication, resulting in the communication rate between system components becoming a bottleneck for improving the performance of network communication systems.
A communication protocol implementation method is provided, so that the sending end and the receiving end of the communication system enter the data state after confirming that the link verification operation is completed, and data transmission is carried out through multiple data channels. The receiving end performs a merge operation on the data of each data channel to obtain the target data stream.
The flexible transmission rate selection of point-to-point communication system based on multiple data channels is realized, which improves the flexibility and ease of use of the communication system, and provides a reliable solution for the new generation of communication and data network applications.
Smart Images

Figure CN115967752B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and more particularly, to a method for implementing a communication protocol, a communication system, and a computer-readable medium. Background Art
[0002] Currently, with the rapid development of network communication technologies, it is necessary to use communication protocols to implement information transmission between communication parties. However, the communication rate between system components and communication protocols with different rates have become bottlenecks in improving the performance of network communication systems. Summary of the Invention
[0003] This application proposes a method for implementing a communication protocol, a communication system, and a computer-readable medium to improve the above-mentioned defects.
[0004] In a first aspect, an embodiment of this application provides a method for implementing a communication protocol, which is applied to a receiving end of a communication system. The communication system further includes a sending end, and the sending end and the receiving end communicate based on the communication protocol. The receiving end is configured to be able to use multiple data channels for data transmission. The method includes: receiving, based on multiple data channels, data sent by the sending end in a data state, where the data state is a state entered by the sending end after confirming that the receiving end has completed a link check operation; and performing a merging operation on the data received by each of the data channels to obtain a target data stream.
[0005] In a second aspect, an embodiment of this application further provides a method for implementing a communication protocol, which is applied to a sending end of a communication system. The communication system further includes a receiving end, and the sending end and the receiving end communicate based on the communication protocol. The receiving end is configured to be able to use multiple data channels for data transmission. The method includes: entering a data state after confirming that the receiving end has completed a link check operation; and sending data to the receiving end through multiple data channels in the data state to instruct the receiving end to perform a merging operation on the data received by each of the data channels to obtain a target data stream.
[0006] In a third aspect, an embodiment of the present application further provides a communication system, including a sending end and a receiving end. The sending end and the receiving end communicate based on the communication protocol. The receiving end is configured to be able to perform data transmission using multiple data channels; the receiving end is used to receive data sent by the sending end in a data mode based on the multiple data channels, where the data mode is a mode entered by the sending end after confirming that the receiving end has completed a link check operation, and perform a merging operation on the data received by each data channel to obtain a target data stream; the sending end is used to enter a data state after confirming that the receiving end has completed the link check operation, and send data to the sending end through multiple data channels in the data mode to instruct the sending end to perform a merging operation on the data received by each data channel to obtain a target data stream.
[0007] In a fourth aspect, an embodiment of the present application further provides a computer-readable medium. The readable storage medium stores program code executable by a processor. When the program code is executed by the processor, the processor executes the foregoing method.
[0008] For a communication protocol implementation method, a communication system, and a computer-readable medium provided by the present application, the sending end of the communication system enters a data state after confirming that the receiving end of the communication system has completed a link check operation, and sends data to the receiving end through multiple data channels in the data state; the receiving end of the communication system performs a merging operation on the data received by each data channel based on the data sent by the sending end in the data state to obtain a target data stream. Therefore, this communication protocol implementation method enables both parties of a point-to-point communication system using this communication protocol to send and receive data based on multiple data channels, thereby achieving a selection of transmission rates within a large range, having good flexibility, being simple and easy to use, and providing a reliable solution for new-generation communication and data network applications.
[0009] Other features and advantages of the embodiments of the present application will be described in the subsequent description of the specification, and part of them will become obvious from the specification, or be understood by implementing the embodiments of the present application. The objectives and other advantages of the embodiments of the present application can be realized and obtained through the structures specifically pointed out in the written specification, claims, and drawings. Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0011] Figure 1The block diagram of a communication system provided by an embodiment of the present application is shown.
[0012] Figure 2 The flowchart of a method for implementing a communication protocol according to an embodiment of the present application is shown.
[0013] Figure 3 The flowchart of a method for implementing a communication protocol according to another embodiment of the present application is shown.
[0014] Figure 4 The flowchart of a method for implementing a communication protocol according to still another embodiment of the present application is shown.
[0015] Figure 5 The flowchart of a method for implementing a communication protocol according to yet another embodiment of the present application is shown.
[0016] Figure 6 The flowchart of a method for implementing a communication protocol according to still another embodiment of the present application is shown.
[0017] Figure 7 The flowchart of a method for implementing a communication protocol according to yet another embodiment of the present application is shown.
[0018] Figure 8 The block diagram of a communication system for executing the method for implementing a communication protocol according to an embodiment of the present application is shown.
[0019] Figure 9 The flowchart of the state transformation of a transmission direction state machine according to an embodiment of the present application is shown.
[0020] Figure 10 The flowchart of the state transformation of a reception direction state machine according to an embodiment of the present application is shown.
[0021] Figure 11 The timing diagram of a flow mode transmission interface according to an embodiment of the present application is shown.
[0022] Figure 12 The timing diagram of a flow mode reception interface according to an embodiment of the present application is shown.
[0023] Figure 13 The timing diagram of a frame mode transmission interface according to an embodiment of the present application is shown.
[0024] Figure 14 The timing diagram of a frame mode reception interface according to an embodiment of the present application is shown. Detailed implementation manners
[0025] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Usually, the components of the embodiments of this application described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents the selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative efforts belong to the scope of protection of this application.
[0026] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0027] An embedded system consists of hardware and software and is a device that can operate independently. Its software content only includes the software operating environment and its operating system, and its hardware content includes various aspects such as a signal processor, a memory, and a communication module. For an embedded system, data communication is required between all components. A communication protocol refers to a set of rules agreed upon by both (or multiple) parties communicating with each other on how to exchange information. The protocol defines the format used by data units, the information and meaning that information units should contain, the connection method, and the timing of information sending and receiving, so as to ensure that data in the communication system is smoothly transmitted to a determined place.
[0028] Taking the commonly used RapidIO protocol as an example today, it consists of a logical layer, a transport layer, and a physical layer. The logical layer defines all protocols and packet formats, which are necessary information for initializing the terminal and completing the transmission. The transport layer is the necessary information for the data packet to pass from one terminal to another terminal channel. The physical layer describes the interface protocol between devices, such as packet transmission devices, flow control, electrical characteristics, and low-level error management, etc.
[0029] However, with the rapid development of network communication technology, the inventor found in the application that the communication rate between system components and communication protocols with different rates have become bottlenecks in improving the performance of the network communication system. Existing communication protocols can basically only switch between a single communication rate or a fixed communication rate, and basically have a fixed number of underlying high-speed serial channels, and basically can only use a fixed user interface mode. That is to say, existing communication protocols are difficult to meet the usage requirements of multi-rate, multi-channel, and multi-user interfaces in the rapidly developing network communication.
[0030] Therefore, in order to overcome the above-mentioned deficiencies, the present application provides a communication protocol implementation method and a communication system. The implementation method is applied to the communication system, enabling both parties of the communication system using this communication protocol to send and receive data based on multiple data channels. The sending end of the communication system enters the data state after confirming that the receiving end of the communication system has completed the link check operation, and sends data to the receiving end through multiple data channels in the data state; the receiving end of the communication system performs a merging operation on the data received through each data channel based on the data sent by the sending end in the data state to obtain the target data stream. Therefore, this communication protocol implementation method enables both parties of the point-to-point communication system using this communication protocol to send and receive data based on multiple data channels, thereby achieving a selection of transmission rate speeds within a large range, having good flexibility, being simple and easy to use, and providing a reliable solution for the application of the new generation of communication and data networks.
[0031] Please refer to Figure 1 , Figure 1 FIG. shows an application scenario of the communication protocol implementation method provided by an embodiment of the present application. This communication protocol implementation method can be applied to a communication system 100, which includes a sending end 110 and a receiving end 120. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130, and the receiving end 120 is configured to be able to use multiple data channels for data transmission.
[0032] As an implementation manner, the communication protocol 130 is applied to point-to-point data communication. Specifically, as Figure 1 shown, the communication protocol 130 is used for communication between the sending end 110 and the receiving end 120. Further, this point-to-point communication can be in the form of half-duplex communication or full-duplex communication. Among them, half-duplex communication refers to a communication method in which data can be transmitted bidirectionally alternately but not simultaneously in both directions; full-duplex communication refers to a communication method in which data can be transmitted simultaneously in both directions. That is to say, the sending end and the receiving end of the communication protocol will change with the different positions of the target users. For example, Figure 1 in the communication protocol structure diagram shown, the sending end 110 is regarded as the sending end that sends data to the receiving end 120, and the sending end 110 is also regarded as the receiving end that receives the data sent by the receiving end 120.
[0033] Please refer to Figure 2 , Figure 2A communication protocol implementation method provided by an embodiment of the present application is shown. This method can be applied to the receiving end 120 of the communication system 100 in the foregoing embodiment. The communication system 100 further includes a sending end 110. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130. The receiving end 120 is configured to be able to use multiple data channels for data transmission.
[0034] Step S210: Receive the data sent by the sending end in the data state based on multiple data channels, where the data state is the state entered by the sending end after confirming that the receiving end has completed the link check operation.
[0035] As an implementation manner, the communication protocol followed between the sending end and the receiving end of the communication system can be implemented relying on a state machine. Specifically, the communication protocol has a sending direction state machine in the sending direction and a receiving direction state machine in the receiving direction. Among them, a state machine (Finite State Machine, FSM) is a mathematical model representing a finite number of states and behaviors such as transitions and actions between these states. Specifically, it can be a three-stage state machine including three loop-executing blocks (also called always blocks). One describes the transition of states using sequential logic circuits, one describes the state transition conditions and transition rules using combinational logic circuits, and one describes the output. Among them, the always block is a syntax used to describe combinational logic and sequential logic.
[0036] As an implementation manner, the data state of the sending direction state machine is the state in which the sending end sends data to the receiving end through multiple data channels based on the communication protocol. Specifically, the sending direction state machine completes state conversion based on determining whether the receiving direction state machine has completed the link check operation.
[0037] Further, the link check operation is used to confirm that the receiving end has completed the check operation of multiple receiving channels from the receiving end to the sending end. That is to say, before the receiving end officially receives the user data sent by the sending end, the receiving direction state machine will perform a link check on the initial received data based on the instruction sent by the sending direction state machine. Only when the link check operation of the receiving direction state machine is completed does it mean that the user data can be correctly sent to the receiving end through multiple receiving channels and received by the receiving end after further processing. At this time, the sending direction state machine switches to the data state, and the sending end begins to send user data to the receiving end.
[0038] Step S220: Perform a merging operation on the data received by each data channel to obtain a target data stream.
[0039] As an implementation manner, when transmitting user data from a sending end to a receiving end based on multiple data transmission channels, a section of user data stream with a fixed data length is intercepted from the original user data stream, and each section of user data stream is transmitted to the receiving end through a different data channel. That is to say, when the receiving direction state machine receives data, the received data is an incomplete user data stream, and a merging operation needs to be performed on the data received by each data channel to obtain the user data originally sent from the sending end to the receiving end, thereby realizing multi-channel data transmission. Further, by configuring the user to use different numbers of data channels to perform data reception operations, the speed at which the receiving direction state machine merges the operations to obtain the user data stream is also different. Obviously, if a larger number of data channels are selected for transmission, the time taken for the same length of user data to be transmitted from the sending end to the receiving end is less, that is, multi-rate data transmission is realized.
[0040] A communication protocol implementation method and a communication system provided by the present application. The implementation method is applied to the communication system, enabling both parties of a point-to-point communication system using this communication protocol to send and receive data based on multiple data channels. The sending end of the communication system enters the data state after confirming that the receiving end of the communication system has completed the link check operation, and sends data to the receiving end through multiple data channels in the data state; the receiving end of the communication system performs a merging operation on the data received by each data channel based on the data sent by the sending end in the data state to obtain the target data stream. Therefore, this communication protocol implementation method enables both parties of a point-to-point communication system using this communication protocol to send and receive data based on multiple data channels, thereby realizing a wide range of transmission rate selections, having good flexibility, being simple and easy to use, and providing a reliable solution for new-generation communication and data network applications.
[0041] Please refer to Figure 3 , Figure 3 FIG. shows a communication protocol implementation method provided by an embodiment of the present application. The communication protocol implementation method can be applied to a communication system 100. The communication system 100 includes a sending end 110 and a receiving end 120. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130. The receiving end 120 is configured to be able to use multiple data channels for data transmission. Specifically, the method includes steps S310 to S340.
[0042] S310: Receive the data sent by the sending end in the data state based on multiple data channels, where the data state is the state entered by the sending end after confirming that the receiving end has completed the link check operation.
[0043] Among them, the implementation manner of step S310 can refer to the foregoing embodiment and will not be elaborated here.
[0044] S320: In the channel alignment state, perform a channel alignment operation on the data channels based on the pre-acquired synchronization alignment code, and obtain the first data stream of each of the data channels.
[0045] In some embodiments, after the receive direction state machine confirms the completion of the verification operation of multiple receive channels between the receive end and the transmit end, it transitions to the channel alignment state. At this time, the transmit direction state machine is in the data state and can send data to the receive direction state machine through multiple data channels. As described in the foregoing embodiments, since the transmit end intercepts a section of the user data stream with a fixed data length from the original user data stream and transmits each section of the user data stream through different data channels to the receive end, then, after the receive direction state machine receives the user data transmitted through multiple data channels, it is necessary to perform a channel alignment operation on each data channel based on the pre-acquired synchronization alignment code to obtain the first data stream of each of the data channels.
[0046] Specifically, the pre-acquired synchronization alignment code may be a special code pattern with a fixed length sent from the transmit direction state machine to the receive direction state machine. Further, the receive direction state machine performs a shift adjustment operation based on the synchronization alignment code, thereby performing a binding alignment operation on multiple channels. For example, if the synchronization alignment code sent by the transmit direction state machine is the ABCD code pattern and the data code pattern received by the receive direction state machine is the BCDA code pattern, then the receive direction state machine will perform a shift according to the specified ABCD order, shift BCDA to ABCD, achieve the binding alignment between each transmit data channel and each receive data channel, and obtain the first data stream of each of the aligned data channels.
[0047] S330: Decode the first data stream to obtain a second data stream.
[0048] In some embodiments, after the receive direction state machine obtains the first data stream of each of the aligned data channels, it performs a data decoding operation on the first data stream to obtain the decoded second data stream. Specifically, the data decoding operation corresponds to the data encoding operation performed on the data stream when the transmit direction state machine sends data. Further, the data encoding operation may include a source encoding operation and a source coding operation. The source encoding process is a process of converting the original data into a binary sequence, and the channel encoding process is a process of converting the source data into a form that can minimize the bandwidth required for transmitting the data. Further, the data decoding operation is an operation that is performed in reverse to the data encoding operation.
[0049] S340: Integrate the second data streams of each data channel to obtain a target data stream.
[0050] In some embodiments, the operation of integrating the second data streams of each data channel to obtain a target data stream may be that the receive direction state machine obtains different state information indicated by different code patterns based on a pre-acquired check code, re-adjusts and integrates the second data streams of each received data channel to obtain a target data stream, and the obtained target data stream satisfies the user's data bit order, and outputs it to the receiving end user, so that the receiving end user can correctly receive the user data on the sending side. Specifically, the pre-acquired check code may be the check code obtained by the receive direction state machine from the send direction state machine during the process of performing a link check operation before officially receiving data.
[0051] Please refer to Figure 4 , Figure 4 FIG. shows a communication protocol implementation method provided by an embodiment of the present application. This communication protocol implementation method can be applied to a communication system 100. The communication system 100 includes a sending end 110 and a receiving end 120. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130. The receiving end 120 is configured to be able to perform data transmission using multiple data channels. Specifically, this method includes steps S410 to S450.
[0052] S410: Receive data sent by the sending end in the data state based on multiple data channels, where the data state is the state entered by the sending end after confirming that the receiving end has completed the link check operation.
[0053] Among them, the implementation manner of step S410 can refer to the foregoing embodiments and will not be elaborated here.
[0054] S420: Obtain the synchronization alignment code pre-sent by the sending end.
[0055] In some embodiments, the synchronization alignment code may be a special code pattern with a fixed length for performing link check, which is sent by the send direction state machine to the receiving end during the process of the receive direction state machine pre-executing the link check.
[0056] S430: Based on the pre-acquired synchronization alignment code, perform a channel alignment operation on the data channels in the channel alignment state, and obtain a first data stream for each data channel;
[0057] S440: Decode the first data stream to obtain a second data stream;
[0058] S450: Integrate the second data streams of each data channel to obtain a target data stream.
[0059] Among them, the implementation manners of steps S430 to S450 can refer to the foregoing embodiments and will not be elaborated here.
[0060] Please refer to Figure 5 , Figure 5 which shows a method for implementing a communication protocol provided by an embodiment of the present application. This communication protocol implementation method can be applied to a communication system 100, which includes a sending end 110 and a receiving end 120. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130, and the receiving end 120 is configured to be able to use multiple data channels for data transmission. Specifically, this method includes step S510 and step S520.
[0061] S510: Enter the data state after confirming that the receiving end has completed the link check operation.
[0062] As an implementation manner, the link check operation is used to confirm that the receiving end has completed the check operations of multiple receiving channels from the receiving end to the sending end. That is to say, before the sending end officially sends user data to the receiving end, the receiving end will perform a link check on the initial received data based on the instruction sent by the sending end state machine. Only when the link check operation of the receiving end state machine is completed, it means that the user data can be correctly sent to the receiving end through multiple receiving channels and then received by the receiving end after further processing. At this time, the sending end state machine switches to the data state, and the sending end begins to send user data to the receiving end.
[0063] S520: Send data to the receiving end through multiple data channels in the data state to instruct the receiving end to perform a merging operation on the data received by each data channel to obtain a target data stream.
[0064] As an implementation manner, the way for the sending end to transmit user data to the receiving end through multiple data transmission channels in the data state can be to intercept a section of user data stream with a fixed data length from the original user data stream, and transmit each section of user data stream to the receiving end through different data channels. That is to say, when the receiving end state machine receives data, the received data is an incomplete user data stream, and a merging operation needs to be performed on the data received by each data channel to obtain the user data originally sent by the sending end to the receiving end, thereby realizing multi-channel data transmission. Further, by configuring the user to use different numbers of data channels to perform data reception operations, the speed at which the receiving end state machine merges the user data stream is also different. Obviously, if more data channels are selected for transmission, the time taken for the same length of user data to be transmitted from the sending end to the receiving end is less, that is, multi-rate data transmission is achieved.
[0065] As an implementation manner, the way for the receiving end to perform a merging operation on the data received by each data channel to obtain a target data stream may refer to the foregoing embodiments and will not be elaborated here.
[0066] Please refer to Figure 6 , Figure 9 and Figure 10 , Figure 6 shows a communication protocol implementation method provided by an embodiment of the present application. This communication protocol implementation method can be applied to the sending end 110 of the communication system 100. The communication system 100 further includes a receiving end 120. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130. The receiving end 120 is configured to be able to use multiple data channels for data transmission. Specifically, this method includes step S610 to step S640; Figure 10 shows the state transition flowchart of the sending direction state machine, Figure 11 shows the state transition flowchart of the receiving direction state machine.
[0067] S610: Enter the idle state, send an idle code to the receiving end, and in response to the third feedback signal sent by the receiving end, enter the initialization state.
[0068] As an implementation manner, the idle state is the state converted after the power-on reset of the sending direction state machine. Further, the sending direction state machine continuously sends an idle code to the receiving direction state machine in the idle state, so that the receiving direction state machine uses the received idle code for byte alignment adjustment operation. When the byte alignment adjustment operation is completed, the receiving direction state machine can receive the correct idle code. At this time, the receiving direction state machine sends a third feedback signal to the sending direction state machine to indicate that the operation is completed. The sending direction state machine enters the initialization state in response to the third feedback signal sent by the receiving end. It can be obtained that the initialization state is the state converted after the sending direction state machine confirms that the receiving direction state machine has completed the byte alignment adjustment operation. Further, the receiving direction state machine performs the byte alignment adjustment operation in the byte alignment state and sends a third feedback signal to the sending direction state machine.
[0069] S620: In the initialization state, send a synchronization alignment code to the receiving end;
[0070] S630: In response to the first feedback signal sent by the receiving end based on the synchronization alignment code, enter the verification state, and send a link verification code to the receiving end. The first feedback signal is used to confirm that the receiving end has completed the channel verification operation.
[0071] As an implementation, the synchronization alignment code may be a special code pattern with a fixed length sent from the transmission direction state machine to the reception direction state machine. Further, in the initialization state, the transmission direction state machine sends the synchronization alignment code to the reception direction state machine, enabling the reception direction state machine to perform a channel verification operation using the received synchronization alignment code. After the channel verification operation is completed, the reception direction state machine can receive synchronization alignment codes with correct code patterns and correct numbers. At this time, the reception direction state machine sends a first feedback signal to the transmission direction state machine to indicate that the operation is completed. In response to the first feedback signal sent by the receiving end, the transmission direction state machine enters the verification state. It can be obtained that the verification state is the state converted after the transmission direction state machine confirms that the reception direction state machine has completed the channel verification operation. Further, the reception direction state machine performs the channel verification operation in the channel alignment state and sends a first feedback signal to the transmission direction state machine. Among them, the channel verification operation is that the reception direction state machine performs a shift adjustment operation based on the synchronization alignment code, so as to perform a binding alignment operation on multiple channels.
[0072] S640: In response to the second feedback signal sent by the receiving end based on the link verification code, enter the data state. The second feedback signal is used to confirm that the receiving end has completed the link verification operation based on the link verification code.
[0073] As an implementation, the link verification code may be a special code pattern periodically sent from the transmission direction state machine to the reception direction state machine at a fixed position. Further, in the verification state, the transmission direction state machine sends the link verification code to the reception direction state machine, enabling the reception direction state machine to perform a link verification operation using the received link verification code. After the data decoding and integration operation is completed, the initial data received by the reception direction state machine can meet the user's data bit order. At this time, the reception direction state machine sends a second feedback signal to the transmission direction state machine to indicate that the operation is completed. In response to the second feedback signal sent by the receiving end, the transmission direction state machine enters the data state. It can be obtained that the data state is the state converted after the transmission direction state machine confirms that the reception direction state machine has completed the link verification operation. Further, the reception direction state machine performs the link verification operation in the data decoding state and sends a second feedback signal to the transmission direction state machine. Further, after the reception direction state machine completes the link verification operation, it will enter the data state. It can be obtained that the data state of the reception direction state machine here is the state converted after the reception direction state machine completes the link verification operation. Among them, the link verification operation is that the reception direction state machine obtains different state information indicated by different code patterns based on the received verification code, and re-adjusts and integrates the initial data stream of each data channel to obtain the user data stream.
[0074] S650: Send data to the receiving end through multiple data channels in the data state to instruct the receiving end to perform a merging operation on the data received on each data channel to obtain a target data stream.
[0075] Among them, the implementation manner of step S650 can refer to the foregoing embodiments and will not be elaborated here.
[0076] Please refer to Figure 7 , Figure 7 shows a communication protocol implementation method provided by an embodiment of the present application. This communication protocol implementation method can be applied to a communication system 100, which includes a sending end 110 and a receiving end 120. The sending end 110 and the receiving end 120 communicate based on the communication protocol 130, and the receiving end 120 is configured to be able to use multiple data channels for data transmission. Specifically, this method includes steps S710 to S740.
[0077] S710: Enter the data state after confirming that the receiving end has completed the link check operation.
[0078] Among them, the implementation manner of step S710 can refer to the foregoing embodiments and will not be elaborated here.
[0079] S720: Determine the data interface mode selected by the user.
[0080] As an implementation manner, the data interface mode may include a stream mode interface and a frame mode interface, and the user can freely select the data interface they want to use from the provided data interface modes. Specifically, the stream mode means that data is sent when enabled, and the data has no head or tail. The frame mode means that data is sent in the form of data packets and has a packet header and a packet tail.
[0081] Please refer to Figure 11 and Figure 12 , Figure 11 shows the timing diagram of the stream mode sending interface, Figure 12 shows the timing diagram of the stream mode interface receiving. And, as can be seen from the figure, when the stream mode interface is in the sending mode, only when tx_ready and tx_valid are both valid, the sent tx_data is valid. When the stream mode interface is in the receiving mode, when rx_valid is valid, the received rx_data is valid.
[0082] Please refer to Figure 13 and Figure 14 , Figure 13 shows the timing diagram of the frame mode sending interface, Figure 14A frame mode interface receiving timing diagram is shown. Among them, sop indicates the start position of the data packet of the frame mode interface, eop indicates the end position of the data packet of the frame mode interface, byte indicates the valid byte number of the last data of the frame mode interface, and it can be seen from the figure that when the frame mode interface is in the transmit mode, only when tx_ready and tx_valid are both valid, the transmitted tx_data is valid. When the frame mode interface is in the receive mode, when rx_valid is valid, the received rx_data is valid.
[0083] S730: If the data interface mode is a frame mode interface, perform a data verification operation on the frame mode interface.
[0084] As an implementation, if the user selects to use the frame mode interface, the transmit direction state machine will perform a data verification operation. Specifically, the data verification operation can be a Cyclic Redundancy Check (CRC). The cyclic redundancy check is a data transmission error detection function that performs polynomial calculations on the data and attaches the resulting result to the end of the frame. The receiving device also performs a similar algorithm to ensure the correctness and integrity of data transmission.
[0085] S740: Send data to the receiving end through multiple data channels in the data state to instruct the receiving end to perform a merging operation on the data received by each data channel to obtain a target data stream.
[0086] Among them, the implementation of step S740 can refer to the foregoing embodiments and will not be elaborated here.
[0087] Please refer to Figure 8 , Figure 8 shows a communication system 800 provided by an embodiment of the present application. The communication system 800 includes a transmitting end 810 and a receiving end 820. The transmitting end 810 and the receiving end 820 communicate based on the communication protocol 830. The receiving end 820 is configured to be able to use multiple data channels for data transmission.
[0088] Among them, the receiving end 811 is used to receive data sent by the transmitting end 812 in the data mode based on multiple data channels. The data mode is the mode entered after the transmitting end 812 confirms that the receiving end 811 has completed the link verification operation, and performs a merging operation on the data received by each data channel to obtain a target data stream;
[0089] Among them, the sending end 812 is used to enter the data state after confirming that the receiving end 811 has completed the link check operation, and in the data mode, send data to the sending end 812 through a plurality of data channels to instruct the sending end 812 to perform a merging operation on the data received by each data channel to obtain a target data stream.
[0090] As an implementation manner, the communication protocol is a point-to-point communication protocol designed based on a high-speed serial transceiver (SerDes). Further, the communication protocol may include a Physical Coding Sublayer (PCS) and a Physical Medium Attachment (PMA).
[0091] As an implementation manner, the sending end includes a sending end physical coding sublayer and a sending end physical medium attachment sublayer. The sending end physical coding sublayer is used to enter the data state after confirming that the receiving end has completed the link check operation, and in the data mode, send data to the sending end through a plurality of data channels. The sending end physical medium attachment sublayer is used to provide the sending end with a customizable number of the data channels. Specifically, the sending end physical coding sublayer includes
[0092] As an implementation manner, the receiving end includes a receiving end physical coding sublayer and a receiving end physical medium attachment sublayer. The receiving end physical coding sublayer is used to receive the data sent by the sending end in the data mode based on a plurality of the data channels, and perform a merging operation on the data received by each data channel to obtain a target data stream. The receiving end physical medium attachment sublayer is used to provide the receiving end with a customizable number of the data channels.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features. And these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for implementing a communication protocol, characterized in that Applied to the receiving end of a communication system, the communication system further includes a sending end, the sending end and the receiving end communicate based on the communication protocol, the receiving end is configured to be able to perform data transmission using multiple data channels, and the method includes: Receiving data sent by the sending end in the data state based on multiple data channels, where the data state is the state entered by the sending end after confirming that the receiving end has completed the link check operation; Performing a merging operation on the data received by each of the data channels to obtain a target data stream; Wherein, the performing a merging operation on the data received by each of the data channels to obtain a data stream includes: In the channel alignment state, performing a channel alignment operation on the data received by each data channel based on a pre-acquired synchronization alignment code to obtain a first data stream for each of the data channels; Decoding the first data stream to obtain a second data stream; Integrating the second data streams of each data channel to obtain a target data stream; Wherein, the performing a channel alignment operation on the data received by each data channel based on a pre-acquired synchronization alignment code to obtain a first data stream for each of the data channels includes: In the channel alignment state, performing a shift operation based on a pre-acquired synchronization alignment code to bind and align each sending data channel and each receiving data channel, and obtaining a first data stream for each of the aligned data channels.
2. The method according to claim 1, wherein Before performing the channel alignment operation on the data received by each data channel based on the pre-acquired synchronization alignment code, it further includes: Obtaining the synchronization alignment code pre-sent by the sending end.
3. A method for implementing a communication protocol, characterized in that, Applied to the sending end of a communication system, the communication system further includes a receiving end, the sending end and the receiving end communicate based on the communication protocol, the receiving end is configured to be able to perform data transmission using multiple data channels, and the method includes: Entering the data state after confirming that the receiving end has completed the link check operation; Sending data to the receiving end through multiple data channels in the data state to instruct the receiving end to perform a merging operation on the data received by each of the data channels to obtain a target data stream; Wherein, the entering the data state after confirming that the receiving end has completed the link check operation includes: In the initialization state, sending a synchronization alignment code to the receiving end, and the synchronization alignment code is used to perform a shift operation to bind and align each sending data channel and each receiving data channel; In response to the first feedback signal sent by the receiving end based on the synchronization alignment code, entering the check state and sending a link check code to the receiving end, and the first feedback signal is used to confirm that the receiving end has completed the channel check operation; In response to the second feedback signal sent by the receiving end based on the link check code, entering the data state, and the second feedback signal is used to confirm that the receiving end has completed the link check operation based on the link check code.
4. The method according to claim 3, characterized in that In the in the initialization state, when sending a synchronization alignment code to the receiving end, the method further includes: Entering the idle state and sending an idle code to the receiving end; In response to the third feedback signal sent by the receiving end, entering the initialization state.
5. The method according to claim 3, characterized in that, After entering the data state after confirming that the receiving end has completed the link verification operation, the method further includes: In response to the data interface mode selected by the user, perform a data verification operation, which is used to verify the integrity of the transmitted data.
6. The method according to claim 5, wherein The performing a data verification operation in response to the data interface mode selected by the user includes: Determine the data interface mode selected by the user; If the data interface mode is a frame mode interface, perform a data verification operation on the frame mode interface.
7. A communication system, characterized in that, Including a sending end and a receiving end, the sending end and the receiving end communicate based on a communication protocol, and the receiving end is configured to be able to use multiple data channels for data transmission; The receiving end is used to receive the data sent by the sending end in the data mode based on multiple data channels, where the data mode is the mode entered after the sending end confirms that the receiving end has completed the link verification operation, and perform a merging operation on the data received by each data channel to obtain a target data stream; the performing a merging operation on the data received by each data channel to obtain a data stream includes: in the channel alignment state, perform a channel alignment operation on the data received by each data channel based on a pre-acquired synchronization alignment code to obtain a first data stream for each data channel; decode the first data stream to obtain a second data stream; integrate the second data streams of each data channel to obtain a target data stream; where the performing a channel alignment operation on the data received by each data channel based on a pre-acquired synchronization alignment code by performing a shift operation in the channel alignment state to obtain a first data stream for each data channel includes: in the channel alignment state, bind and align each sending data channel and each receiving data channel based on a pre-acquired synchronization alignment code to obtain a first data stream for each aligned data channel; The sending end is used to enter the data state after confirming that the receiving end has completed the link verification operation, and send data to the sending end through multiple data channels in the data mode to instruct the sending end to perform a merging operation on the data received by each data channel to obtain a target data stream; the entering the data state after confirming that the receiving end has completed the link verification operation includes: in the initialization state, send a synchronization alignment code to the receiving end, and the synchronization alignment code is used to perform a shift operation to implement the binding and alignment of each sending data channel and each receiving data channel; in response to the first feedback signal sent by the receiving end based on the synchronization alignment code, enter the verification state and send a link verification code to the receiving end, and the first feedback signal is used to confirm that the receiving end has completed the channel verification operation; in response to the second feedback signal sent by the receiving end based on the link verification code, enter the data state, and the second feedback signal is used to confirm that the receiving end has completed the link verification operation based on the link verification code.
8. A communication system according to claim 7, wherein: The sending end includes a sending end physical coding sublayer and a sending end physical medium attachment sublayer. The sending end physical coding sublayer is used to enter the data state after confirming that the receiving end has completed the link check operation, and send data to the sending end through multiple data channels in the data mode. The sending end physical medium attachment sublayer is used to provide the sending end with a customizable number of the data channels; The receiving end includes a receiving end physical coding sublayer and a receiving end physical medium attachment sublayer. The receiving end physical coding sublayer is used to receive the data sent by the sending end in the data mode based on multiple data channels, and perform a merging operation on the data received by each data channel to obtain a target data stream. The receiving end physical medium attachment sublayer is used to provide the receiving end with a customizable number of the data channels.
Citation Information
Patent Citations
Dynamic alignment method of FPGA multi-channel serial data based on training sequence
CN108155964A
Data transmission method and component, and display device
CN108694917A
Multi-channel communication method and system
CN113098857A