Data transmission method and data transmission device
By using structured control words in the communication network, including the start field, the end field and the load field, carrying multiple link information and adjusting their number, the problem of increasing complexity of the physical layer control signal is solved, and the simplified design is achieved and cost-reducing effects.
Patent Information
- Application Number
- CN202411029165.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-20
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-01-20
Smart Images

Figure CN119011081A_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202280087546.8, and the original application date is January 20, 2022. The entire contents of the original application are incorporated into this application by reference. Technical Field
[0002] The embodiments of the present application relate to the field of communication networks, and in particular, to a data transmission method and a data transmission device. Background Art
[0003] In communication network technology, each communication device usually communicates through a data link, and the physical layer in the signal transmitting end transmits the bit stream to the physical layer in the signal receiving end through the link, thereby realizing signal exchange between communication devices. In order to enable the signal receiving end to accurately decode data from the bit stream, the bit stream, in addition to the encoded data signal, usually also includes a variety of control signals indicating information such as link configuration or link status. For example, the various control signals include control signals indicating data packet frame delimitation, control signals indicating link bandwidth, etc. The various control signals are respectively independent coding segments. In addition, the multiple control signals are usually added to the specific position of the data signal for transmission.
[0004] However, with the continuous evolution of the physical layer operating rate and more precise control of links, more control signals need to be set to meet the requirements, resulting in a large number of control signals, which in turn makes the design of the physical layer in the communication device extremely complex and increases the cost of the physical layer. Therefore, how to reduce the complexity of the control signals transmitted by the physical layer has become a problem that needs to be solved. Summary of the invention
[0005] The data transmission method and data transmission device provided by the present application can reduce the complexity of the control signal transmitted by the physical layer. To achieve the above purpose, the present application adopts the following technical solution.
[0006] In a first aspect, an embodiment of the present application provides a data transmission method, which is applied to a transmitting end, and the data transmission method includes: generating a bit stream, the bit stream including data and a control word, the control word including: a first field for indicating the starting position information of the control word, a second field for indicating the ending position information of the control word, and a third field for carrying link information indicating a wired serial link; sending the wired serial link through the bit stream.
[0007] In this implementation, the sending end may be, for example, Figure 1 , Figure 4 and Figure 5 The first field used to indicate the starting position information of the control word can be, for example, Figure 2The starting field shown in FIG. 1 ; the second field used to indicate the end position information of the control word, for example, can be Figure 2 The end field shown in FIG. 1 ; the third field for carrying link information indicating a wired serial link may be, for example, Figure 2 The payload fields shown in .
[0008] In a traditional wired serial link, various link information used to transmit data between two communication devices and to achieve link alignment is usually a coding segment, and one type of information is a coding segment. For example, information indicating link power consumption is a coding segment, and information indicating the status of each circuit in the link is a coding segment, that is, the coding segments for achieving link alignment include multiple. However, with the continuous evolution of the operating rate of the physical layer and more precise control of links, etc., it is necessary to set more link information to meet the requirements, resulting in a large amount of link information, that is, a large number of coding segments, which in turn leads to extremely complex design of the physical layer in the communication device, and increases the design cost of the physical layer. The control word provided in the embodiment of the present application is configured to include a first field, a second field, and a third field. The link information is carried in the third field, so that multiple link information can be indicated in one control word, reducing the complexity of the control signal transmitted by the physical layer and simplifying the design of the physical layer. In addition, since the second field of the control word is used to indicate the end position information of the control word, that is, the second field of the control word can limit the length of the control word; further, by flexibly adjusting the end position information of the control word, the number of link information carried in the control word can be flexibly adjusted, thereby providing flexibility of the control word.
[0009] Optionally, the end position information may be the length or end position of the control word. The end position may be, for example, a preset number of bits from the beginning of the second field.
[0010] Optionally, the data is business data or training data.
[0011] In a possible implementation manner, the link information includes at least one of the following: the number of channels for transmitting the first bit stream, the power consumption status of hardware in the link, the working status of a circuit in the link, or a codec gain used in the link.
[0012] In order to reduce the power consumption of the hardware in the physical layer link, the power consumption of each hardware in the link usually includes multiple types, such as low power consumption, medium power consumption and high power consumption. For example, when the hardware included in the link, such as the scrambler, data distributor, etc., are in one of standby, sleep or power-off, the hardware in the link is in a low power consumption state; when the hardware components included in the link are in one of standby, sleep or power-off, and another part of the hardware is in a working state, the hardware in the link is medium power consumption; when all the devices in the link are working, the hardware in the link is high power consumption. For example, when the transmitted data is training data, the power consumption of each hardware in the link can be indicated as low power consumption; when the transmitted data is business data, the power consumption of each hardware in the link can be indicated as medium power consumption or high power consumption. The working state of the circuit in the link can include, for example, a power-on state or a power-off state. For example, when the transmitted data is training data, the state of the codec circuit can be made to be a power-off state; when the transmitted data is business data, the state of the codec circuit can be made to be a power-on state. Thus, the transmitting end can carry one of the multiple power consumption states, one indicating the working state of the circuit in the link, and information such as the gain of the codec in the third field and transmit it to the receiving end.
[0013] In a possible implementation manner, the first field and the second field are used to instruct the receiving end to delimit the data frame.
[0014] In this possible implementation, the data content may be after the control word; that is, the first field and the second field of the control word may serve as the frame header of the data frame. When the receiving end recognizes the first field and the second field of the control word, the starting position of the data (i.e., the frame delimiter) may be determined to read the data from the bit stream. In the embodiment of the present application, by using the first field and the second field of the control word as the frame header of the data frame, there is no need to set the frame header of the data frame additionally, thereby simplifying the design of the bit stream.
[0015] In a possible implementation, the bit stream includes multiple bit streams, the wired serial link includes multiple channels, and the multiple bit streams correspond one-to-one to the multiple channels; sending the bit stream through the wired serial link specifically includes: sending the corresponding multiple bit streams through the multiple channels.
[0016] When the wired serial link includes multiple channels, by setting a control word in each channel, the receiving end can accurately read data from the bit stream transmitted by each channel based on the control word in each channel, thereby improving the accuracy of data reading at the receiving end.
[0017] In a possible implementation manner, the control word further includes a fourth field for indicating a channel number.
[0018] The fourth field can be, for example, Figure 2 The channel identification field is shown.
[0019] In this implementation, by setting the fourth field indicating the channel number in the control word, the receiving end can adjust the order of data received from each channel based on each channel number, thereby improving the accuracy of the data received by the receiving end.
[0020] In a possible implementation, the first field includes multiple groups of identical fields, each group of fields includes multiple bits; the multiple groups of identical fields are used to compensate for the difference between the clock cycle of the sending end and the clock cycle of the receiving end.
[0021] In this implementation, the transmitting end can encode the above-mentioned first field into continuous "0" and "1" signals, and then send a bit stream to the receiving end through a wired serial link based on the local clock cycle; when the receiving end receives the bit stream, it first recovers the clock cycle of the transmitting end from the first field; then, the receiving end adds or deletes at least one group of fields among multiple groups of identical fields based on the deviation between the recovered clock cycle and the local cycle.
[0022] For example, a buffer queue may be provided in the receiving end, and the receiving end writes the data carried by the first field into the buffer queue based on the clock cycle recovered from the first field. In addition, the receiving end may also read data from the buffer queue based on the local clock cycle, and both are performed simultaneously. When the receiving end detects that the rate of data written into the buffer queue is greater than the rate of data read from the buffer queue, it means that the clock cycle of the sending end is greater than the clock cycle of the receiving end. At this time, at least one group of fields in the multiple groups of identical fields included in the first field is deleted to ensure the clock cycle synchronization between the sending end and the receiving end; when the receiving end detects that the rate of data written into the buffer queue is less than the rate of data read from the buffer queue, it means that the clock cycle of the sending end is less than the clock cycle of the receiving end. At this time, at least one group of the multiple groups of identical fields is added to the first field to achieve clock cycle synchronization between the sending end and the receiving end.
[0023] In the conventional technology, since there is no structured control word, a sequence dedicated to compensating the difference between the clock cycle of the transmitting end and the clock cycle of the receiving end is usually set in the transmitted bit stream, and the sequence does not carry any useful data. The embodiment of the present application can enable the control word to achieve more functions by setting multiple groups of identical fields in the first field of the control word, that is, there is no need to set an additional sequence dedicated to compensating the difference between the clock cycle of the transmitting end and the clock cycle of the receiving end in the bit stream; compared with the prior art, the design of the physical layer can be simplified.
[0024] In a possible implementation manner, when the data is training data, generating the bit stream includes: adding the control word after the data to generate the bit stream.
[0025] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a receiving end, and the data transmission method includes: receiving a bit stream, the bit stream including data and a control word, the control word including a first field for indicating the starting position information of the control word, a second field for indicating the ending position information of the control word, and a third field for carrying link information indicating a wired serial link; based on the first field and the second field, reading the control word from the bit stream; based on the control word, reading the data from the bit stream.
[0026] In this implementation, the receiving end may be, for example, Figure 1 , Figure 4 and Figure 5 The first field used to indicate the starting position information of the control word can be, for example, Figure 2 The starting field shown in FIG. 1 ; the second field used to indicate the end position information of the control word, for example, can be Figure 2 The end field shown in FIG. 1 ; the third field for carrying link information indicating a wired serial link may be, for example, Figure 2 The payload fields shown in .
[0027] The control word provided in the embodiment of the present application is configured to include a first field, a second field, and a third field, and the link information is carried in the third field, so that multiple link information can be indicated in one control word, simplifying the design of the physical layer. In addition, since the second field of the control word is used to indicate the end position information of the control word, that is, the second field of the control word can limit the length of the control word; further, by flexibly adjusting the end position information of the control word, the number of link information carried in the control word can be flexibly adjusted, thereby providing flexibility of the control word.
[0028] In a possible implementation, the method further includes: based on the link information, adjusting at least one of the following items of the wired serial link: a power consumption state of hardware in the link, a working state of a circuit in the link, or a codec gain used in the link.
[0029] In order to reduce the power consumption of the hardware in the physical layer link, the power consumption of each hardware in the link usually includes multiple types, such as low power consumption, medium power consumption and high power consumption. For example, when the transmitted data is training data, the power consumption of each hardware in the link can be indicated as low power consumption; when the transmitted data is business data, the power consumption of each hardware in the link can be indicated as medium power consumption or high power consumption. The working state of the circuit in the link can include, for example, a power-on state or a power-off state. For example, when the transmitted data is training data, the state of the codec circuit can be made to be a power-off state; when the transmitted data is business data, the state of the codec circuit can be made to be a power-on state. The receiving end adjusts the power consumption state of the hardware in the link to the power consumption state indicated in the third field, adjusts the working state of the circuit in the link to the working state indicated in the third field, and adjusts the gain of the codec to the gain indicated in the third field based on one of the multiple power consumption states indicated in the third field, one of the working states of the circuit in the link, and the gain of the codec.
[0030] In a possible implementation, reading the data from the bit stream based on the control word includes: determining the coding length of the control word based on the first field and the second field; identifying the frame starting position of the data from the bit stream based on the coding length of the control word, wherein the frame starting position of the data is located after the control word; and reading the data based on the frame starting position of the data.
[0031] In this possible implementation, the data content may be after the control word; that is, the first field and the second field of the control word may serve as the frame header of the data frame. When the receiving end recognizes the first field and the second field of the control word, the starting position of the data may be determined to read the data from the bit stream. In the embodiment of the present application, by using the first field and the second field of the control word as the frame header of the data frame, there is no need to set the frame header of the data frame additionally, thereby simplifying the design of the bit stream.
[0032] In a possible implementation, the bit stream includes multiple bits, the wired serial link includes multiple channels, and the multiple bit streams are received from the transmitting end through the corresponding multiple channels; the link information also includes the number of channels for transmitting the bit stream; the control word also includes a fourth field for indicating the channel number; and reading data from the bit stream based on the control word includes: reading the data from the bit stream received by the corresponding channel based on the number of channels for transmitting the bit stream and the fourth field.
[0033] The fourth field can be, for example, Figure 2 The channel identification field is shown.
[0034] In a possible implementation, the method further includes: eliminating data skew between each of the multiple channels based on a sequence of the multiple bit streams received and a fourth field in each of the multiple control words in the multiple bit streams.
[0035] In one possible implementation, the first field includes multiple groups of identical fields, each group of fields includes multiple bits; and the method also includes: based on the clock frequency deviation between the transmitting end, performing one of the following operations: deleting at least one group of the multiple groups of identical fields, or adding at least one group of the multiple groups of identical fields.
[0036] In this implementation, the transmitting end can encode the above-mentioned first field into continuous "0" and "1" signals, and then send a bit stream to the receiving end through a wired serial link based on the local clock cycle; when the receiving end receives the bit stream, it first recovers the clock cycle of the transmitting end from the first field; then, the receiving end adds or deletes at least one group of fields among multiple groups of identical fields based on the deviation between the recovered clock cycle and the local cycle.
[0037] For example, a buffer queue may be provided in the receiving end, and the receiving end writes the data carried by the first field into the buffer queue based on the clock cycle recovered from the first field. In addition, the receiving end may also read data from the buffer queue based on the local clock cycle, and both are performed simultaneously. When the receiving end detects that the rate of data written into the buffer queue is greater than the rate of data read from the buffer queue, it means that the clock cycle of the sending end is greater than the clock cycle of the receiving end. At this time, at least one group of fields in the multiple groups of identical fields included in the first field is deleted to ensure the clock cycle synchronization between the sending end and the receiving end; when the receiving end detects that the rate of data written into the buffer queue is less than the rate of data read from the buffer queue, it means that the clock cycle of the sending end is less than the clock cycle of the receiving end. At this time, at least one group of the multiple groups of identical fields is added to the first field to achieve clock cycle synchronization between the sending end and the receiving end.
[0038] In the conventional technology, since there is no structured control word, a sequence dedicated to compensating the difference between the clock cycle of the transmitting end and the clock cycle of the receiving end is usually set in the transmitted bit stream, and the sequence does not carry any useful data. The embodiment of the present application can enable the control word to achieve more functions by setting multiple groups of identical fields in the first field of the control word, that is, there is no need to set an additional sequence dedicated to compensating the difference between the clock cycle of the transmitting end and the clock cycle of the receiving end in the bit stream; compared with the prior art, the design of the physical layer can be simplified.
[0039] In a third aspect, an embodiment of the present application provides a data transmission device, comprising a processor and an interface; the processor is used to generate a bit stream, the bit stream comprising data and a control word, the control word comprising: a first field for indicating the starting position information of the control word, a second field for indicating the ending position information of the control word, and a third field for carrying link information indicating a wired serial link; the interface sends the bit stream through the wired serial link.
[0040] In a possible implementation manner, the link information includes at least one of the following: the number of channels for transmitting bit streams, the power consumption status of hardware in the link, the working status of a circuit in the link, or a codec gain used in the link.
[0041] In a possible implementation, the first field and the second field are used to instruct the receiving end to delimit the data frame.
[0042] In a possible implementation, the bit streams include multiple bit streams, the wired serial link includes multiple channels, and the multiple bit streams correspond one-to-one to the multiple channels; the interface is specifically used to send the corresponding multiple bit streams through the multiple channels.
[0043] In a possible implementation manner, the control word further includes a fourth field for indicating a channel number.
[0044] In a possible implementation, the first field includes multiple groups of identical fields, each group of fields includes multiple bits; the multiple groups of identical fields are used to compensate for the difference between the clock cycle of the sending end and the clock cycle of the receiving end.
[0045] In a fourth aspect, an embodiment of the present application provides a data transmission device, comprising a processor and an interface; the interface is used to receive a bit stream, the bit stream comprising data and a control word, the control word comprising a first field for indicating starting position information of the control word, a second field for indicating ending position information of the control word, and a third field for carrying link information indicating a wired serial link; the processor is used to read the control word from the bit stream based on the first field and the second field; and read the data from the bit stream based on the control word.
[0046] In a possible implementation, the processor is further configured to: based on the link information, adjust at least one of the following items of the wired serial link: a power consumption state of hardware in the link, a working state of a circuit in the link, or a codec gain used in the link.
[0047] In one possible implementation, the processor is specifically used to: determine the coding length of the control word based on the first field and the second field; identify the frame start position of the data from the bit stream based on the coding length of the control word, wherein the frame start position of the data is located after the control word; and read the data based on the frame start position of the data.
[0048] In a possible implementation, the bit stream includes multiple bits, the wired serial link includes multiple channels, and the multiple bit streams are received from the transmitting end through the corresponding multiple channels; the link information also includes the number of channels for transmitting the bit stream; the control word also includes a fourth field for indicating the channel number; the processor is specifically used to: read the data from the bit stream received by the corresponding channel based on the number of channels for transmitting the bit stream and the fourth field.
[0049] In a possible implementation, the processor is further used to eliminate data skew between each of the multiple channels based on the sequence of the multiple bit streams received and the fourth field in each of the multiple control words in the multiple bit streams.
[0050] In one possible implementation, the first field includes multiple groups of identical fields, each group of fields includes multiple bits; and the processor is also used to: based on the clock frequency deviation between the transmitting end, perform one of the following operations: delete at least one group of the multiple groups of identical fields, or add at least one group of the multiple groups of identical fields.
[0051] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program. When the computer program is executed by a processor, it implements the data transmission method described in the first aspect or the data transmission method described in the second aspect.
[0052] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when executed on a processor, implements the data transmission method described in the first aspect or the data transmission method described in the second aspect.
[0053] It should be understood that the second to sixth aspects of the present application are consistent with the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0055] Figure 1 is a schematic diagram of a hardware architecture of an electronic device provided in an embodiment of the present application;
[0056] Figure 2 is a schematic diagram of a frame structure of a control word provided in an embodiment of the present application;
[0057] Figure 3A is a schematic diagram of an eBCH codeword set provided in an embodiment of the present application;
[0058] Figure 3B is a schematic diagram of the coding structure of the channel identifier provided in the embodiment of the present application;
[0059] Figure 4 It is a hardware architecture diagram of the physical layer provided in an embodiment of the present application;
[0060] Figure 5 is a flow chart of a data transmission method provided in an embodiment of the present application;
[0061] Figure 6 is another flow chart of the data transmission method provided in the embodiment of the present application;
[0062] Figure 7 is a structural schematic diagram of a data transmission device provided in an embodiment of the present application;
[0063] Figure 8 This is another structural diagram of the data transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0065] The words "first", "second" and similar terms mentioned herein do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "an" do not indicate quantity limitation, but indicate the existence of at least one. Words such as "coupled" and similar terms are not limited to direct physical or mechanical connection, but may include electrical connection, whether direct or indirect, which is equivalent to communication in a broad sense.
[0066] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In the description of the embodiments of the present application, unless otherwise stated, the meaning of "multiple" refers to two or more. For example, multiple channels refer to two or more channels.
[0067] The data transmission system provided in the embodiment of the present application may include a transmitting end and a receiving end. Both the transmitting end and the receiving end may be an electronic device, and the electronic device may be, for example, a terminal device, such as a mobile phone, a PC, a tablet computer, a laptop computer, or a wearable device (such as a smart watch, an AR device, a VR device) and other types of portable devices); the electronic device may also be a switch device or a router device, etc. In an application scenario, the transmitting end may be a terminal device, and the receiving end may be a router device, and the terminal device communicates with the router device via a wired serial link to transmit a signal to the router device. In this application scenario, when the router device transmits a signal to the terminal device, the router device may also be referred to as a transmitting end, and the terminal device may also be referred to as a receiving end.
[0068] In addition, the transmitting end and the receiving end may also be a module, a chip, a chipset, a circuit board or a component equipped with a chip or a chipset arranged in an electronic device. The electronic device is, for example, the electronic device as described above. A network card may be arranged in the electronic device, so that the electronic device can access a network through the network card for communication, and the network may be, for example, Ethernet. In one application scenario, the transmitting end may be an interface controller integrated in the electronic device; the receiving end may be a network card arranged in the electronic device. The interface controller and the network card may communicate through a wired serial link. The interface controller transmits a bit stream to the network card through a wired serial link, and the network card encapsulates the received bit stream into an Ethernet frame and sends it to the Ethernet. In this application scenario, when the network card receives a bit stream from the Ethernet, it is necessary to transmit the received bit stream to the interface controller, in which case the interface controller is the transmitting end and the network card is the receiving end. The embodiment of the present application is described by taking the transmitting end as the interface controller and the receiving end as the network card as an example, but is not used to limit the scheme.
[0069] Please refer to Figure 1 , Figure 1 1 is a schematic diagram of the structure of the electronic device 100 provided in the embodiment of the present application. Figure 1 In the embodiment, the electronic device 100 includes one or more processors, such as an interface controller 10, a central processing unit (CPU) 12, etc. Optionally, the one or more processors may be integrated into one or more chips, and the one or more chips may be regarded as a chipset. In an optional implementation, the interface controller 10 and the CPU 12 may be integrated into a processor such as a processor. Figure 1 In the system on chip (SOC) shown in the figure, the SOC may also be integrated with devices or components such as a memory 13 and a direct memory access controller (DMAC) 14. Among them, the interface controller 10, the CPU 12, the memory 13 and the DMAC 14 transmit signals through a bus. The CPU 12 may run software programs or software plug-ins such as operating system software and application software, and the memory 13 may store software programs or software plug-ins required for the operation of the CPU 12. In addition, the memory 13 may also store instructions and data required for the operation of the CPU 12, and the CPU 12 obtains the instructions and data from the memory 13 through the DMAC 14.
[0070] like Figure 1 As shown, the electronic device 100 also includes a network card 11. The network card 11 can be set at Figure 1In addition to the SOC shown. The interface controller 10 includes an interface 101 and a processor 102, and the network card 11 includes an interface 111 and a processor 112. The network card 11 is coupled to the interface 101 in the interface controller 10 via the interface 111. In an optional implementation, the interface 101 and the interface 111 can be serdes (serializer / deserializer) interfaces respectively. The interface 101 and the interface 111 can be coupled via various physical media (such as twisted pairs or cables, etc.). Thus, the electronic device 100 is connected to the network through the network card 11 and communicates with other devices in the network (such as server devices or terminal devices, etc.) to exchange data. In a possible implementation, the processor 102 and the processor 112 can respectively include components such as an encoder, a decoder, a control word generator, and a link training state machine. In addition, the processor 102 and the processor 112 can also selectively include components such as a scrambler and a descrambler. Among them, the more detailed structure of the interface controller 10 and the network card 11 can be referred to. Figure 4 Related description.
[0071] In the embodiment of the present application, the communication network model of the electronic device 100 can comply with the OSI (Open System Interconnection Basic Reference Model, Open System Interconnection Reference Model) standard. OSI may specifically include an application layer, a transport layer, a data link layer, and a physical layer, and may also include more layers, which are not specifically limited in the embodiment of the present application. The application layer may include application software running in the CPU 12. For example, video playback applications, instant messaging applications, etc. The transport layer is used to describe the transport layer protocol specifications of the system, including data types, structure definitions and arrangements, routing control, bandwidth management, etc. The data link layer is used to encapsulate the data messages provided by the transport layer into data frames and provide transparent transmission. The physical layer is used to define the link state, clock reference, data encoding and circuits of the wired serial link required for data transmission and reception, and provide a standard interface to the data link layer. The physical layer encodes the data frame to generate a bit stream, and transmits the bit stream through a wired serial link. It should be noted that the interface controller 10 and the network card 11 provided in the embodiment of the present application usually work in the physical layer in the OSI standard.
[0072] During the operation of the electronic device 100, the processor 102 in the interface controller 10 can obtain the original data message (for example, the CPU 12 can trigger the processor 102 to read the data message from the memory 13); the processor 102 processes the obtained data message (for example, encapsulates it into a data frame and performs Hamming encoding), generates a bit stream and outputs it to the network card 11 through the interface 101; the interface 111 in the network card 11 receives the bit stream, and the processor 112 in the network card 11 further processes the received bit stream (for example, decodes to obtain a data frame, performs Ethernet frame encapsulation and Manchester encoding on the data frame, etc.), and then transmits it to the network. Similarly, after the network card 11 receives the data frame from the network, it can process it (for example, perform Manchester decoding, remove the Ethernet frame and Hamming encoding, etc.), and then transmit it to the interface controller 10 through the interface 111; after the interface controller 10 further processes the obtained data frame (for example, decodes and decapsulates it), it generates a data message and stores it in the memory 13 or directly provides it to the CPU 12.
[0073] In the embodiment of the present application, in order to achieve signal transmission with low bit error rate, the bit stream transmitted by the interface controller 10 (i.e., the transmitting end) to the network card 11 (i.e., the receiving end) includes, in addition to the data obtained by encoding the data frame, a control word, such as Figure 2 As shown, Figure 2 The bit stream transmitted from the interface controller 10 to the network card 11 is schematically shown. The control word is used to indicate the link status, clock reference, data frame delimitation and other information of the wired serial link. Therefore, the physical layer of the receiving end determines the frame delimitation of the data, adjusts the clock reference, adjusts the link status, etc. based on the control word. Among them, the control word includes a start field for indicating the starting position information of the control word, an end field for indicating the ending position information of the control word, and a payload field for carrying the indication information. The indication information carried by the payload field is used to indicate the link information of the wired serial link.
[0074] In a traditional wired serial link, various link information used to transmit data between two communication devices and realize link alignment is usually a coding segment, and one type of information is a coding segment. For example, the information indicating the link power consumption is a coding segment, and the information indicating the status of each circuit in the link is a coding segment, that is, the coding segments for realizing link alignment include multiple. However, with the continuous evolution of the physical layer working rate and more precise control of the link, it is necessary to set more link information to meet the requirements, resulting in a large number of link information, that is, a large number of coding segments, which in turn leads to extremely complex design of the physical layer in the communication device, and increases the design cost of the physical layer. The control word provided in the embodiment of the present application is set to include a structure including a start field, an end field and a payload field, and the link information is carried in the payload field, so that multiple link information can be indicated in one control word, simplifying the design of the physical layer. In addition, since the end field of the control word is used to indicate the end position information of the control word, that is, the end field of the control word can limit the length of the control word; and then, by flexibly adjusting the end position information of the control word, the number of link information carried in the control word can be flexibly adjusted, thereby providing flexibility of the control word.
[0075] It should be noted that if Figure 2 In the bit stream shown, the data is located on the left side of the control word. During the bit stream transmission process, the control word signal is sent first, and then the data signal. Figure 2 In the implementation shown, the data may be, for example, service data. Optionally, the data may also be located to the right of the control word. During the bit stream transmission process, the data signal is transmitted first, and then the control word signal is transmitted. In this implementation, the data may be, for example, training data. In addition, since the data and the control word are encoded as "0" and "1" signals in the physical layer, the control word may also be set at any position of the data.
[0076] Please continue to refer to Figure 2 , Figure 2 The frame structure of the control word is further schematically shown in FIG. Figure 2 In the example, the control word includes a start field U_I indicating the start position information of the control word, an end field U_END indicating the end position of the control word, and a load field payload indicating the link information of the wired serial link. Figure 2 The frame structure of the control word is shown in FIG. 5 , and the control word is described in more detail.
[0077] The start field U_I includes at least one group of bits U_ID0 to U_IDN. In other words, Figure 2In the frame structure shown, the first N+1 bits are the header of the control word, and the N+1-bit header allows the network card 11 to identify the starting field of the control word. In order to ensure that the control word has a certain fault tolerance capability, and at the same time to compensate for the difference between the clock cycle of the sending end and the clock cycle of the receiving end, in an optional implementation method of the embodiment of the present application, the length of the starting field U_I can vary within a preset range. For example, the starting field U_I may include multiple groups of repeated U_ID0~U_IDN, where the variable length of the starting field U_I can be 8 bytes, for example. Assuming N is 4, U_ID0~U_IDN are 00101, then the starting field U_I can be 001010010100101, the three groups of repeated code streams.
[0078] The interface controller 10 can encode the start field into continuous "0" and "1" signals, and then send a bit stream to the network card 11 through a wired serial link based on the local clock cycle; when the network card 11 receives the bit stream, it first recovers the clock cycle of the interface controller 10 from the start field; then, the network card 11 adds or deletes at least one group of fields in multiple groups of identical fields based on the deviation between the recovered clock cycle and the local cycle. Specifically, a buffer queue can be set in the network card 11, and the network card 11 writes the data carried by the start field into the buffer queue based on the clock cycle recovered from the start field. In addition, the network card 11 can also read data from the buffer queue based on the local clock cycle, and both are performed simultaneously. When the network card 11 detects that the rate of data written to the buffer queue is greater than the rate of data read from the buffer queue, it means that the clock cycle of the interface controller 10 is greater than the clock cycle of the network card 11. At this time, one or more groups of U_ID0~U_IDN in the starting field U_I are deleted to ensure the clock cycle synchronization between the interface controller 10 and the network card 11; when the network card 11 detects that the rate of data written to the buffer queue is less than the rate of data read from the buffer queue, it means that the clock cycle of the interface controller 10 is less than the clock cycle of the network card 11. At this time, one or more groups of U_ID0~U_IDN are added to the starting field U_I to achieve clock cycle synchronization between the interface controller 10 and the network card 11.
[0079] The end field U_END is used to indicate the end position information of the control word. The end position information may be, for example, the length or end position of the control word. The end position may be, for example, a preset number of bits starting from the end field U_END. Thus, after the network card 11 identifies the end field U_END from the control word, it counts the preset number of bits backward to determine the end of the control word code stream.
[0080] In this possible implementation, the control word may be followed by data content; that is, the start field and the end field of the control word may serve as the frame header of the data frame. When the receiving end recognizes the start field and the end field of the control word, the starting position of the data (i.e., the frame delimiter) may be determined to read the data from the bit stream. In the embodiment of the present application, by using the start field and the end field of the control word as the frame header of the data frame, there is no need to set the frame header of the data frame additionally, thereby simplifying the design of the bit stream.
[0081] The payload field payload is used to carry link information. The link information may include but is not limited to one or more of the following: the clock cycle of adding control words to the data, the power consumption state of the hardware in the link, the working state of the circuit in the link, and the output gain of the codec circuit in the link. For example, the power consumption state of the hardware in the link includes three states: low power consumption, medium power consumption, and high power consumption. When the hardware included in the link, such as the scrambler, data distributor, etc., are in one of standby, sleep, or power-off, the hardware in the link is in a low power consumption state; when the hardware of the component included in the link is in one of standby, sleep, or power-off, and another part of the hardware is in a working state, the hardware in the link is medium power consumption; when all the devices in the link are working, the hardware in the link is high power consumption. For example, when the transmitted data is training data, it can be indicated that the power consumption of each hardware in the link is low power consumption; when the transmitted data is business data, it can be indicated that the power consumption of each hardware in the link is medium power consumption or high power consumption. The working state of the circuit in the link may include, for example, a power-on state or a power-off state. For example, when the transmitted data is training data, the state of the codec circuit can be set to a power-off state; when the transmitted data is service data, the state of the codec circuit can be set to a power-on state. The gains of the codec in the link include, for example, gain 1, gain 2, and gain 3.
[0082] In an optional implementation, the payload field payload may include two parts: a type field and a detail field. The type field is used to indicate various link information, and the detail field is used to indicate specific parameters corresponding to each type of link information. For example, the link information includes three types of information: the power consumption status of the hardware in the link, the working status of the circuit in the link, or the gain of the codec in the link. The type field is used to indicate that the link information includes the power consumption status of the hardware in the link and the gain of the codec in the link; the detail field further indicates that the power consumption status of the hardware in the link is a medium power consumption status, and the gain of the codec in the link is a gain of 2. Thus, the network card 11 can determine each link information and the parameters corresponding to the various link information based on the type field and the detail field to adjust the link.
[0083] In an embodiment of the present application, the wired serial link between the interface controller 10 and the network card 11 for transmitting the bit stream may include one lane or multiple lanes based on the bandwidth of the wired serial link. In other words, the bit stream can be transmitted between the interface controller 10 and the network card 11 through one lane or multiple lanes. When the interface controller 10 transmits the bit stream to the network card 11 through multiple lanes, in an optional implementation, the bit stream transmitted by each lane includes control words in addition to data. In addition to the fields described above, each control word may also include a channel identification field Lane indicating the link number, such as Figure 2 As shown. The network card 11 can implement lane flipping based on the channel identification field Lane, and can also eliminate data skew between data transmitted by each lane. Furthermore, the interface controller 10 can transmit a bit stream to the network card 11 through a fixed number of lanes, and can also transmit a bit stream to the network card 11 through a variable number of lanes. When the interface controller 10 transmits a bit stream to the network card 11 through a variable number of lanes, in an optional implementation, the link information carried by the payload field payload may also include link bandwidth (that is, the number of lanes transmitting the bit stream). The network card 11 can receive a bit stream from the corresponding lane based on the link information.
[0084] From the above, it can be seen that the control word can indicate more information by setting the start field, the end field, the payload field and the selective channel identification field, thereby reducing the complexity of the control word transmitted by the physical layer.
[0085] Based on the frame structure of the control word as described above, in a possible implementation, in the embodiment of the present application, the control word can be encoded by an error correction coding method. The interface controller 10 sends a code that can be corrected, and the network card 11 can automatically detect errors and automatically correct errors in code word transmission. Error correction coding, for example, may include but is not limited to: forward error correction coding, Hamming code coding, eBCH (extended Bose Ray-Chaudhuri Hocquenghem) coding, etc. Among them, Hamming code coding is a linear code. For a coding block with a length of m bits, there are n redundant bits, and the rest are payload bits; each redundant bit is obtained by performing an XOR operation on part of the payload bits in a certain way. Hamming code coding can correct any single-bit error. eBCH coding is also a linear code, and eBCH coding can correct multiple bit errors in a coding block. Taking eBCH coding as an example, the coding method of the control word is described in detail through specific examples. In the embodiment of the present application, an eBCH coding set can be first constructed. The eBCH code set may include, for example, 32 codes, each of which may have a structure of BCH (16, 5, 1), where 16 (bits) is the code length, 5 (bits) is the payload length, and 1 (bit) is the check code length. The Hamming distance between any two codes in the eBCH code set is 8. In other words, the number of different bits between any two codes is 8. The eBCH code word set is as follows: Figure 3A shown.
[0086] from Figure 3A As can be seen from the figure, eBCH includes 32 codes CW0 to CW31, each of which is 16 bits long. The number of different bits between any two codes is 8. Figure 3A The constructed eBCH code, a specific example of the control word described in the embodiment of the present application is shown in Table 1.
[0087] Table 1 Control word example
[0088] Symbol Number describe 0~(4*N-1), N ranges from [1~5] Control word start field, CW21, CW28 4*N~(4*N+3) Control word end field, CW22, CW8 (4*N+4)~(4*N+11) Channel identification field, for details, refer to Figure 3B (4*N+12)~(4*N+19) Payload_type field, refer to Table 2 for details (4*N+20)~(4*N+27) Payload_detail field, please refer to Table 3 for details
[0089] It can be seen from the control word example shown in Table 1 that a control word includes 0 to (4*N+27) bytes. The number of bytes in the control word start field can be variable within 4 to 20. The coding of the control word start field is CW21, CW28; that is, the lower 16 bits of the control word start field are the coding CW28 shown in Table 1, and the upper 16 bits are the coding CW21 shown in Table 1. The coding of the control word end field is CW22, CW8; that is, the lower 16 bits of the control word end field are the coding CW22 shown in Table 1, and the upper 16 bits are the coding CW8 shown in Table 1.
[0090] The channel identification field is Figure 3B Assume that the maximum link bandwidth between the interface controller 10 and the network card 11 is 32 lanes, that is, Figure 3B The lane 0 to lane 31 shown in FIG. Then the identification of each lane can be represented by four codes, that is, 64 bits. Figure 3B Take lane2 as an example, from Figure 3B It can be seen from the figure that lane 2 is indicated by the four codes CW3, CW9, CW3 and CW9. For the specific bits of CW3 and CW9, refer to Table 1. Figure 3B It can also be seen that among the 64 bits, bits [0-15] are CW3, bits [16-31] are CW9, bits [32-47] are CW3, and bits [48-63] are CW9. For detailed encoding of the remaining lanes, refer to Figure 3A and Figure 3B , no more details.
[0091] It should be noted that Table 1, Table 2, Table 3 and Figure 3A and Figure 3B The table shown may be pre-stored in the interface controller 10 and the network card 11 respectively.
[0092] Table 2 Payload type (payload_type)
[0093] Link Information Bit [31-16] Bit [15-0] FEC Gain CW8 CW10 Link bandwidth CW10 CW22 Hardware power consumption CW8 CW13 Control word adding cycle CW10 CW15
[0094] Table 3 Payload details (payload_detail)
[0095]
[0096] As can be seen from Table 2, the link information includes four types of information: forward error correction encoder (FEC) gain, link bandwidth, hardware power consumption, and control word addition period. Each type of information is indicated by two codes (i.e., 32 bits). Table 2 shows that the encoding of FEC gain is CW8 and CW10, that is, the lower 16 bits of the 32 bits indicating FEC gain are CW10 and the upper 16 bits are CW8. FEC gain further includes four modes of bypass FEC, FEC gain 1, FEC gain 2, and FEC gain 3 shown in Table 3. Assume that the type field in the control word transmitted by the interface controller 10 to the network card 11 includes CW8 and CW10, and the detail field includes CW9 and CW10. After receiving the bit stream, the network card 11 parses the type field and detail field of the control word. Network card 11 searches Table 2 to find out that CW8 and CW10 indicate FEC gain; then, network card 11 further compares CW3 and CW9 with the codes corresponding to FEC gain in Table 3, and searches out that the FEC gain is FEC gain 1. Network card 11 can adjust the FEC gain to gain 1.
[0097] Table 2 shows that the link bandwidth is encoded as CW10 and CW22, that is, the lower 16 bits of the 32 bits indicating the link bandwidth are CW10 and the upper 16 bits are CW22. The link bandwidth further includes the seven modes of X0, X1, X2, X4, X8, X16 and X32 shown in Table 3. Assume that in the type field of the control word transmitted by the interface controller 10 to the network card 11, the first 32 bits are CW8 and CW10, and the last 32 bits are CW10 and CW22; in the detail field, the first 32 bits are CW9 and CW10, and the last 32 bits are CW9 and CW21. After receiving the bit stream, the network card 11 parses the first 32 bits of the type field of the control word to indicate the FEC gain, and the last 32 bits indicate the link bandwidth. Then, the network card 11 compares the first 32 bits in the detail field with the information corresponding to the FEC gain in Table 3, and compares the last 32 bits in the detail field with the information corresponding to the link bandwidth in Table 3, thereby finding out that the FEC gain is FEC gain 1 and the link bandwidth is X1. Then the network card 11 can adjust the FEC gain to gain 1 and obtain data from one channel. It should be noted that the physical layer of the interface controller 10 and the physical layer of the network card 11 can also pre-agree on the channels used under each link bandwidth. For example, it can be pre-agreement that when one channel is used to transmit service data, the service data is transmitted through the channel identified as lane0; it can also be pre-agreement that when four channels are used to transmit service data, the service data is transmitted through the channels identified as lane0 to lane3. It should also be noted that when the type field of the control word indicates the link bandwidth information and the detail field is coded CW3 and CW9, it means that the interface controller 10 has finished transmitting service data to the network card 11, and the data transmitted in the next cycle is training data. That is, when the information indicating the link bandwidth in the control word is X0, it indicates that the service data transmission is finished and the data to be transmitted in the next cycle is training data; when the information indicating the link bandwidth in the control word is any one other than X0, it indicates that the data transmitted by the interface controller 10 to the network card 11 is service data. Therefore, the code used to indicate the link bandwidth can also be used to indicate the switch between service data and training data.
[0098] When the control word transmitted by the interface controller 10 to the network card 11 includes information indicating the power consumption of the hardware and the adding cycle of the control word, the parsing of the control word by the network card 11 and how to determine the link information to be adjusted are similar to the FEC encoder and link bandwidth, and will not be repeated here.
[0099] based on Figure 1 The structure of the electronic device 100 shown in FIG. Figure 2 Please refer to the frame structure of the control word shown in Figure 4 , Figure 41 is a schematic diagram of the physical layer hardware structure of the interface controller 10 provided in the embodiment of the present application. It should be noted that the physical layer hardware structure of the network card 11 can be the same as the physical layer hardware structure of the interface controller 10. The embodiment of the present application takes the physical layer hardware of the interface controller 10 as an example for description. Figure 4 As shown, the physical layer of the interface controller 10 includes an encoder 101, a data distributor 102, a control word generator 103, a multiplexer 104, a link training state machine 105, a scrambler 106, a serializer-deserializer 107, a descrambler 108, a control word decoder 109, a data skew eliminator 1010, and a decoder 1011. It can be understood that the physical layer of the interface controller 10 can also include more circuits, modules, or components, which are not specifically limited in the embodiments of the present application. The components included in the physical layer of the interface controller 10 can be integrated into one or more chips, and these components can be implemented by hardware circuits, and some components can also be implemented by software-driven hardware. In one possible implementation, some components can be integrated into the same processor, and the processor executes the functions corresponding to each component or module. For example, the encoder 101 and the data distributor 102 can be integrated into the same processor, and the processor implements the functions of data encoding and distribution. In addition, the physical layer of the network card 11 can have the same or similar components as the interface controller 10, Figure 4 1 shows that the physical layer of the network card 11 includes an encoder 111, a data distributor 112, a control word generator 113, a multiplexer 114, a link training state machine 115, a scrambler 116, a serializer-deserializer 117, a descrambler 118, a control word decoder 119, a data deskew device 1110, and a decoder 1111. The following takes the example of the physical layer of the interface controller 10 transmitting a bit stream to the physical layer of the network card 11 to describe the components or functions in the physical layers of the interface controller 10 and the network card 11.
[0100] At the physical layer of the interface controller 10, the encoder 101 is used to encode the data frame sent by the data link layer to generate encoded data. The encoding can be, for example, forward error coding, error detection and retransmission coding, or hybrid error correction coding. The data distributor 102 is used to divide the encoded data into multiple data streams (hereinafter referred to as service data) and distribute them to multiple lanes, one lane corresponding to one piece of data. The link training state machine 105 is used to generate link information and provide the generated link information to the control word generator 103. The control word generator 103 generates link information based on the link information and the control word generator 103. Figure 2The control word frame structure shown generates a control word. The link information may include, for example, link power consumption status, link output gain, and link coding mode. In addition, the link training state machine 105 is also used to control the multiplexer 104 to selectively connect one of the multiple input terminals to the output terminal based on the current state (such as service data transmission state, link training state, or link reset state) and the clock cycle. Figure 4 It is shown that the multiplexer 104 includes three input terminals, one of which is coupled to the data distributor 102, one of which is used to input training data, and the other is coupled to the control word generator 103. That is to say, the multiplexer 104 outputs one of the service data, training data or control word to the scrambler 106 based on the control of the link training state machine 105. It should be noted that the service data in the embodiment of the present application, for example, can be data such as audio data and video data input by the user through the application program, which is generated after being encapsulated and encoded by the application layer, the transport layer, the data link layer and the physical layer; the training data is used to test and adjust the multiple lanes in the link training stage. The scrambler 106 adds scrambling code to the received data stream or control word, and provides a serial deserializer 107. The serial deserializer 107 converts the received multiple parallel low-speed bit streams into high-speed serial bit streams, and transmits them to the network card 11 through multiple lanes. It should also be noted that the number of lanes is the same as the number of bit streams transmitted, and each bit stream includes data and control words. Based on the control of the link training state machine 105, the control word can be added at any position of the corresponding data. Preferably, the control word can be added before the data.
[0101] At the physical layer of the network card 11, the serial deserializer 117 receives a serial bit stream signal from the lane, converts the serial bit stream into multiple parallel bit streams and provides them to the descrambler 118. The descrambler 118 descrambles the multiple parallel bit streams and outputs the descrambled bit streams to the control word decoder 119. Figure 4The control word frame structure shown in the figure, the control word decoder 119 identifies the control word from each bit stream, and parses the control word to obtain the indication information in the payload field, which is used to indicate the link information. For example, the indication information indicates that the link enters a medium power consumption state and indicates that the link coding mode is a forward error coding mode. The control word decoder 119 provides the obtained indication information to the link training state machine 115, and provides the data and the channel identifier corresponding to each data to the data skew eliminator 1110. The link training state machine 115 performs corresponding actions based on the indication information. For example, the link is set to a medium power consumption state, and the coding mode (such as the above-mentioned forward error coding) is provided to the decoder 1111. The data skew eliminator 1110 eliminates the skew between each data stream, and provides the data stream after the skew is eliminated to the decoder 1111. Based on the above-mentioned coding mode, the decoder 1111 uses the corresponding decoding mode to decode the data stream, and provides the decoded data to the data link layer of the network card 11.
[0102] based on Figure 1 The structure of the electronic device 100 shown in FIG. Figure 2 The frame structure of the control word shown and Figure 4 The hardware architecture of the physical layer of the interface controller 10 (or the network card 11) shown in FIG. 1 is a schematic diagram of a physical layer of the interface controller 10 (or the network card 11) shown in FIG. 1 . The embodiment of the present application also provides a data transmission method, which can be applied to Figure 1 The electronic device 100 shown in FIG. 1 is a diagram of a transmission method of the present invention. The transmission method and the receiving end of the data transmission method provided by the embodiment of the present invention are described below by taking the interface controller 10 as the transmitting end and the network card 11 as the receiving end. Figure 2 One or more components shown are executed. It should be noted that in the embodiment of the present application, the interface controller 10 can transmit control words to the network card 11 at any data transmission stage. For example, the control word can be added to the training data transmitted in the link training stage, or the control word can be added to the business data transmitted in the business data transmission stage, or the control word can be added to the training data transmitted in the link reset stage. It should also be noted that the control word can be set before the business data, or can be set at any position of the business data based on the clock cycle, or can be set before the training data, or can be set after the training data. The embodiment of the present application does not make specific limitations on this. Please refer to Figure 5 , Figure 5 This is a process 500 of a data transmission method provided in an embodiment of the present application. The data transmission method includes:
[0103] Step 501, the interface controller 10 generates a bit stream, the bit stream includes data and a control word, the control word includes: a start field for indicating the start position information of the control word, an end field for indicating the end position information of the control word, and a load field for carrying link information indicating a wired serial link. Step 502, the interface controller 10 sends the bit stream through the wired serial link.
[0104] Step 503, the network card 11 reads a control word from the bit stream based on the start field and the end field; Step 504, reads the data from the bit stream based on the control word.
[0105] In this implementation, the data may be, for example, service data or training data. The control word may be, for example, Figure 2 The link information may include but is not limited to one or more of the following: the clock cycle of adding control words to the data, the power consumption status of the hardware in the link, the working status of the circuit in the link, and the output gain of the codec circuit in the link.
[0106] In this implementation, the start field and the end field of the control word can indicate the length of the control word. For example, after the network card 11 reads the start field, it recognizes that the bit stream includes the control word; after reading the end field, it recognizes that the preset number of bits starting from the field is the end position of the control word. In addition, the control word can be followed by the data content of the data. In other words, the start field and the end field of the control word can serve as the frame header of the data frame. When the receiving end recognizes the start field and the end field of the control word, the starting position of the data can be determined to read the data from the bit stream.
[0107] The control word provided in the embodiment of the present application is configured to include a start field, an end field, and a payload field, and the link information is carried in the payload field, so that multiple link information can be indicated in one control word, simplifying the design of the physical layer. In addition, since the end field of the control word is used to indicate the end position information of the control word, that is, the end field of the control word can limit the length of the control word; further, by flexibly adjusting the end position information of the control word, the number of link information carried in the control word can be flexibly adjusted, thereby providing flexibility of the control word.
[0108] The following takes the bit stream including training data and control words, and the bit stream including service data and control words as an example, and takes the interface controller 10 transmitting data to the network card 11 through four lanes as an example. Figure 6 , through a more specific scenario, the data transmission method provided by the embodiment of the present application is described. Please continue to refer to Figure 6 , Figure 6 This is a process 600 of a data transmission method provided in an embodiment of the present application. The data transmission method includes:
[0109] Step 601, the interface controller 10 adds control words C0 to C3 to the training data D0 to D3 respectively to generate bit streams B0 to B3. This step is in the link training phase. The link training phase is used to align the link status of the interface controller 10 with the link status between the network card 11. In this step, the interface controller 10 can assign the pre-set training data D0 to D3 to lane0 to lane3. The interface controller 10 can also be based on the current link information (for example, the link enters medium power consumption, all hardware circuits in the physical layer are powered on, the gain of the link encoder in the physical layer is "1", and the link coding mode is forward error coding), the clock cycle of adding control words in the training data, and such Figure 2 The frame structure of the control word shown generates control words C0 to C3. Among them, the channel identification field of control word C0 is used to indicate lane0, the channel identification field of control word C1 is used to indicate lane1, the channel identification field of control word C2 is used to indicate lane2, and the channel identification field of control word C3 is used to indicate lane3. In addition, the data carried by the start field, end field and payload field in control words C0 to C3 can be the same. Then, the interface controller 10 adds control words C0 to control words C3 to the training data D0 to D3 respectively to generate bit streams B0 to B3. Step 602, the interface controller 10 transmits the bit streams B0 to B3 to the network card 11 simultaneously through lane0 to lane3 respectively.
[0110] In step 603, the network card 11 identifies control words C0 to C3 from the bit streams B0 to B3 based on the start field indicating the start position of control words C0 to C3 and the end field indicating the end position of control words C0 to C3. In step 604, the network card 11 adjusts the link docking sequence based on the channel identifier carried by the channel identifier field in control words C0 to C3. This step is used to align the link number with the sequence of data streams. For example, the interface controller 10 transmits the bit streams B0-B1-B2-B3 through lane0-lane1-lane2-lane3 respectively; and the data stream received by the network card 11 from lane0-lane1-lane2-lane3 is actually B3-B2-B1-B0, that is, the lane number in the interface controller 10 is completely opposite to the lane number in the network card 11. Based on the channel identification field in each control word, the network card 11 can re-label the lane numbers in the network card 11 to achieve alignment with the lane numbers in the interface controller 10. Step 605, the network card 11 adjusts the link state based on the link information indicated by the load field in the control words C0 to C3. For example, the link information is used to indicate that the link enters medium power consumption, all hardware circuits in the physical layer are powered on, and the gain of the link encoder in the physical layer is "1". Based on the link information, the network card 11 adjusts the power consumption state of hardware circuits such as amplifiers and encoders in the link to a medium power consumption state, adjusts the gain of the link encoder to "1", etc. Step 606, the network card 11 aligns the data transmitted by each lane based on the order in which the bit streams B0 to B3 are received.
[0111] In step 607, the interface controller 10 adds control words C4 to C7 to the training data D4 to D7, respectively, to generate bit streams B4 to B7, wherein the payload fields of control words C4 to C7 carry indication information indicating the next cycle of transmission of service data. This step is in the link training phase. After the interface controller 10 carries the link information in the payload field and provides it to the network card 11 in step 601, it can also carry the indication information indicating the next cycle of transmission of service data in the payload field of control words C4 to C7, and the payload field of control words C4 to C7 can also include the link information as described in step 601. In addition, control words C4 to C7 also include a start field, an end field, and a channel identification field. The interface controller 10 adds control words C4 to C7 to the training data D4 to D7, respectively, to generate bit streams B4 to B7. In step 608, the interface controller 10 transmits the bit streams B4 to B7 to the network card 11 simultaneously through lane0 to lane3, respectively.
[0112] Step 609, the interface controller 10 adds control words C8 to C111 to the service data D8 to D111, respectively, to generate bit streams B8 to B111. In this step, the interface controller 10 can obtain data frames from the data link layer. Based on a preset coding format (e.g., a forward error coding format), the interface controller 10 encodes the data frame to generate service data D8 to D11. Next, the interface controller 10 can allocate the service data D8 to D11 to lane0 to lane3. Then, the interface controller 10 allocates the service data D8 to D11 to lane0 to lane3 based on the current link information, the number of lanes used, the clock cycle for adding control words in the training data, and the like. Figure 2 The frame structure of the control word shown generates control words C8 to C11. Among them, the number of lanes used is carried in the payload field of control words C8 to C11. Finally, the interface controller 10 adds control words C8 to C111 to the training data D8 to D111 respectively to generate bit streams B8 to B111. In an optional implementation, control words C8 to C111 can be added to the preset positions of the business data D8 to D111 respectively. The preset position can be, for example, before the business data. Step 610, the interface controller 10 transmits the bit streams B8 to B111 to the network card 11 simultaneously through lane0 to lane3 respectively.
[0113] Step 611, the network card 11 identifies the control word C8 to the control word C111 from the bit stream B8 to B111, and reads the service data D8 to D111 from the bit stream B8 to B111, based on the start field indicating the start position of the control word C8 to the control word C111, and the end field indicating the end position of the control word C8 to the control word C111. In this step, the network card 11 can delimit the service data frame based on the position of the control word in the bit stream, that is, determine the starting position of the service data. In an optional implementation, the position of the service data in the bit stream is located at a preset position after the control word. For example, the second bit after the end bit of the control word is the starting position of the service data. After the network card 11 reads the end field of the control word, the end bit of the control word can be determined, and then the network card 11 can start reading the service data from the second bit after the end bit of the control word. Step 612 , the network card 11 decodes the read service data D8 - D111 based on the encoding format adopted by the interface controller 10 to obtain a decoded data frame.
[0114] It should be noted that the process 600 of the data transmission method described above is schematic. It is understandable that the data transmission method provided in the embodiment of the present application may include more or fewer processes than process 600. For example, before step 604 and after step 603, the network card 11 may also transmit information indicating that the link is set up to the interface controller 10. For another example, before step 604 and after step 603, the network card 11 may also send a bit stream to the interface controller 10, the bit stream including training data and a control word added to the training data, the control word being used to indicate the link state of the physical layer of the network card 11.
[0115] It is understandable that, in order to implement the above functions, the interface controller includes hardware and / or software modules corresponding to the execution of each function. In combination with the steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.
[0116] In this embodiment, the method can be used as an example to Figure 1 The components included in the interface controller 10 shown are divided into functional modules. For example, different components can be divided according to different functions, or components with two or more functions can be integrated into one processor module. The above-mentioned integrated processor module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation. In the case of using an integrated module, Figure 7 A possible schematic diagram of a data transmission device 700 is shown. Figure 7 As shown, the data transmission device 700 may include: a processing unit 701 and a sending unit 702, and the aforementioned device may be further expanded. The processing unit 701 is used to generate a bit stream, the bit stream includes data and a control word, the control word includes: a first field for indicating the start position information of the control word, a second field for indicating the end position information of the control word, and a third field for carrying link information indicating a wired serial link. The sending unit 702 is used to send the bit stream through the wired serial link.
[0117] In a possible implementation manner, the link information includes at least one of the following: the number of channels for transmitting bit streams, the power consumption status of hardware in the link, the working status of a circuit in the link, or a codec gain used in the link.
[0118] In a possible implementation, the first field and the second field are used to instruct the receiving end to delimit the data frame.
[0119] In a possible implementation, the bit stream includes multiple bit streams, the wired serial link includes multiple channels, and the multiple bit streams correspond one-to-one to the multiple channels; the sending unit 702 is specifically used to: send the corresponding multiple bit streams through the multiple channels.
[0120] In a possible implementation manner, the control word further includes a fourth field for indicating a channel number.
[0121] In a possible implementation, the first field includes multiple groups of identical fields, each group of fields includes multiple bits; the multiple groups of identical fields are used to compensate for the difference between the clock cycle of the sending end and the clock cycle of the receiving end.
[0122] The data transmission device 700 provided in this embodiment is used in the data transmission method executed by the interface controller 10, and can achieve the same effect as the above-mentioned implementation method or device. Figure 7 The corresponding modules can be implemented in software, hardware or a combination of both. For example, each module can be implemented in software, corresponding to Figure 1 The processor 102 and the interface 101 corresponding to the module are used to drive the corresponding component to work. Alternatively, each module may include two parts: the corresponding component and the corresponding driver software, that is, it is implemented in combination with software or hardware. Therefore, the data transmission device 700 can be considered to logically include Figure 1 , Figure 4 In the interface controller 10 shown, each module at least includes a driver software program of corresponding function, which is not elaborated in this embodiment.
[0123] In this embodiment, the method can be used as an example to Figure 1 The components included in the network card 11 shown are divided into functional modules. For example, different components can be divided according to different functions, or two or more functional components can be integrated into one processor module. The above integrated processor module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation. In the case of using an integrated module, Figure 8 A possible schematic diagram of a data transmission device 800 is shown. Figure 8As shown, the data transmission device 800 may include: a receiving unit 801 and a processing unit 802, which may further expand the previously mentioned device. The receiving unit 801 is used to receive a bit stream, the bit stream includes data and a control word, the control word includes a first field for indicating the starting position information of the control word, a second field for indicating the ending position information of the control word, and a payload field for carrying link information indicating a wired serial link. The processing unit 802 is used to read the control word from the bit stream based on the first field and the second field; and read the data from the bit stream based on the control word.
[0124] In a possible implementation, the processing unit 802 is further used to: based on the link information, adjust at least one of the following items of the wired serial link: the power consumption state of the hardware in the link, the working state of the circuit in the link, or the codec gain used in the link.
[0125] In a possible implementation, the processing unit 802 is specifically used to: determine the coding length of the control word based on the first field and the second field; identify the frame start position of the data from the bit stream based on the coding length of the control word, wherein the frame start position of the data is located after the control word; and read the data based on the frame start position of the data.
[0126] In a possible implementation, the bit stream includes multiple bits, the wired serial link includes multiple channels, and the multiple bit streams are received from the transmitting end through the corresponding multiple channels; the link information also includes the number of channels for transmitting the bit stream; the control word also includes a channel identification field for indicating the channel number; the processing unit 802 is specifically used to: read the data from the bit stream received by the corresponding channel based on the number of channels for transmitting the bit stream and the channel identification field.
[0127] In a possible implementation, the processing unit 802 is further used to eliminate data skew between each channel of the multiple channels based on the sequence of the multiple bit streams received and the channel identification field in each control word of the multiple control words in the multiple bit streams.
[0128] In one possible implementation, the first field includes multiple groups of identical fields, each group of fields includes multiple bits; and the processing unit 802 is also used to: based on the clock frequency deviation between the transmitting end, perform one of the following operations: delete at least one group of the multiple groups of identical fields, or add at least one group of the multiple groups of identical fields.
[0129] The data transmission device 800 provided in this embodiment, using the data transmission method executed by the network card 11, can achieve the same effect as the above-mentioned implementation method or device. Figure 8 The corresponding modules can be implemented in software, hardware or a combination of both. For example, each module can be implemented in software, corresponding to Figure 1 The interface 111 and the processor 112 corresponding to the module are used to drive the corresponding component to work. Alternatively, each module may include two parts: the corresponding component and the corresponding driver software, that is, it is implemented in combination with software or hardware. Therefore, the data transmission device 500 can be considered to logically include Figure 1 , Figure 4 In the network card 11 shown, each module at least includes a driver software program of corresponding function, which is not elaborated in this embodiment.
[0130] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0131] In the several embodiments provided in the present application, it should be understood that the disclosed systems and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0133] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0134] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium or memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data transmission method for a wired serial link, applied to a transmitting end, characterized in that: include: Generate a bit stream, the bit stream comprising data and a control word, the control word comprising: a first field for indicating starting position information of the control word, a second field for indicating ending position information of the control word, and a third field for carrying link information indicating a wired serial link; The bit stream is sent to the receiving end through the wired serial link, and the communication network model between the sending end and the receiving end complies with the requirements of the Open System Interconnection Basic Reference Model OSI.
2. The data transmission method according to claim 1, characterized in that: The link information includes at least one of the following: the number of channels for transmitting bit streams, the power consumption status of hardware in the link, the working status of circuits in the link, or the gain of a codec used in the link.
3. The data transmission method according to claim 1 or 2, characterized in that: The first field and the second field are used to instruct the receiving end to delimit the data frame.
4. The data transmission method according to any one of claims 1 to 3, characterized in that: The bit streams include a plurality of bit streams, the wired serial link includes a plurality of channels, and the plurality of bit streams correspond to the plurality of channels one by one; Then sending the bit stream to the receiving end through the wired serial link specifically includes: The corresponding multiple bit streams are sent to the receiving end through the multiple channels.
5. The data transmission method according to claim 4, characterized in that: The control word further includes a fourth field for indicating a channel number.
6. The data transmission method according to any one of claims 1 to 5, characterized in that: The first field includes a plurality of groups of identical fields, each group of fields including a plurality of bits; The multiple groups of identical fields are used to compensate for the difference between the clock cycle of the transmitting end and the clock cycle of the receiving end.
7. The data transmission method according to any one of claims 1 to 6, characterized in that: The data is business data or training data; When the data is training data, generating a bit stream includes: The control word is added after the data to generate the bit stream.
8. A data transmission method for a wired serial link, applied to a receiving end, characterized in that: include: Receiving a bit stream from a transmitting end, the bit stream comprising data and a control word, the control word comprising a first field for indicating starting position information of the control word, a second field for indicating ending position information of the control word, and a third field for carrying link information indicating a wired serial link, wherein a communication network model between the transmitting end and the receiving end complies with the requirements of the Open Systems Interconnection Basic Reference Model (OSI); Reading the control word from the bitstream based on the first field and the second field; Based on the control word, the data is read from the bit stream.
9. The data transmission method according to claim 8, characterized in that: The method further comprises: Based on the link information, at least one of the following items of the wired serial link is adjusted: a power consumption state of hardware in the link, an operating state of a circuit in the link, or a codec gain used in the link.
10. The data transmission method according to claim 8 or 9, characterized in that: The step of reading the data from the bit stream based on the control word comprises: Determining a coding length of the control word based on the first field and the second field; Based on the coding length of the control word, identifying the frame start position of the data from the bit stream; The data is read based on a frame start position of the data.
11. The data transmission method according to any one of claims 8 to 10, characterized in that: The bit streams include multiple bits, the wired serial link includes multiple channels, and the multiple bit streams are received from the transmitting end through the corresponding multiple channels; the link information also includes the number of channels for transmitting the multiple bit streams; The control word also includes a fourth field for indicating a channel number; The step of reading the data from the bit stream based on the control word comprises: The data is read from the bit stream received by the corresponding channel based on the number of channels transmitting the plurality of bit streams and the fourth field.
12. The data transmission method according to claim 11, characterized in that: The method further comprises: Based on the sequence of the received multiple bit streams and the fourth field in each of the multiple control words in the multiple bit streams, data skew between each of the multiple channels is eliminated.
13. The data transmission method according to any one of claims 8 to 12, characterized in that: The first field includes a plurality of groups of identical fields, each group of fields including a plurality of bits; as well as The method further comprises: Based on the clock frequency deviation with the transmitting end, one of the following operations is performed: deleting at least one of the multiple groups of identical fields, or adding at least one of the multiple groups of identical fields.
14. A transmitting end, characterized in that: The receiving end includes a processor and an interface controller; The processor is used to generate a bit stream, the bit stream includes data and a control word, the control word includes: a first field for indicating the starting position information of the control word, a second field for indicating the ending position information of the control word, and a third field for carrying link information indicating a wired serial link; The interface controller sends the bit stream to the receiving end through the wired serial link, and the communication network model between the sending end and the receiving end complies with the requirements of the Open System Interconnection Basic Reference Model (OSI).
15. The transmitting end according to claim 14, characterized in that: The link information includes at least one of the following: the number of channels for transmitting bit streams, the power consumption status of hardware in the link, the working status of circuits in the link, or the gain of a codec used in the link.
16. The transmitting end according to claim 14 or 15, characterized in that: The first field and the second field are used to instruct the receiving end to delimit the data frame.
17. The transmitting end according to any one of claims 14 to 16, characterized in that: The bit streams include multiple bit streams, the wired serial link includes multiple channels, and the multiple bit streams correspond to the multiple channels one by one; the interface is specifically used for: The corresponding multiple bit streams are sent through the multiple channels.
18. The transmitting end according to claim 17, characterized in that: The control word further includes a fourth field for indicating a channel number.
19. The transmitting end according to any one of claims 14 to 18, characterized in that: The first field includes a plurality of groups of identical fields, each group of fields including a plurality of bits; The multiple groups of identical fields are used to compensate for the difference between the clock cycle of the transmitting end and the clock cycle of the receiving end.
20. A receiving end, characterized in that: The data transmission device includes a processor and an interface controller; The interface controller is used to receive a bit stream, the bit stream includes data and a control word, the control word includes a first field for indicating the starting position information of the control word, a second field for indicating the ending position information of the control word, and a payload field for carrying link information indicating a wired serial link; The processor is configured to read the control word from the bit stream based on the first field and the second field; Based on the control word, the data is read from the bit stream.
21. The receiving end according to claim 20, characterized in that: The processor is further configured to: Based on the link information, at least one of the following items of the wired serial link is adjusted: a power consumption state of hardware in the link, an operating state of a circuit in the link, or a codec gain used in the link.
22. The receiving end according to claim 20 or 21, characterized in that: The processor is specifically used for: Determining a coding length of the control word based on the first field and the second field; Based on the coding length of the control word, identifying the frame start position of the data from the bit stream; The data is read based on a frame start position of the data.
23. The receiving end according to any one of claims 20 to 22, characterized in that: The bit streams include a plurality of bit streams, the wired serial link includes a plurality of channels, the plurality of bit streams are received from the transmitting end through the corresponding plurality of channels; the link information also includes the number of channels for transmitting the plurality of bit streams; the control word also includes a fourth field for indicating a channel number; the processor is specifically configured to: The data is read from the bit stream received by the corresponding channel based on the number of channels transmitting the plurality of bit streams and the fourth field.
24. The data receiving terminal according to claim 23, characterized in that: The processor is further configured to: Based on the sequence of the received multiple bit streams and the fourth field in each of the multiple control words in the multiple bit streams, data skew between each of the multiple channels is eliminated.
25. The data receiving terminal according to any one of claims 20 to 24, characterized in that: The first field includes a plurality of groups of identical fields, each group of fields includes a plurality of bits; and the processor is further configured to: Based on the clock frequency deviation with the transmitting end, one of the following operations is performed: deleting at least one of the multiple groups of identical fields, or adding at least one of the multiple groups of identical fields.
26. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 13.
27. A data transmission system of a wired serial link, characterized in that: The data transmission system includes a transmitting end and a receiving end, wherein the transmitting end is used to implement the method as described in any one of claims 1 to 7, and the receiving end is used to implement the method as described in any one of claims 8 to 13.
Citation Information
Patent Citations
Method for transmitting data via a serial communication bus, correspondingly designed bus interface, and correspondingly designed computer program
CN110999226A
Aggregated control information for wireless communication network
CN113475112A
Device of transmitting, receiving high speed data of infiniband system
KR1020030040603A
Method and apparatus for transmitting and receiving media information in communication system
US20180278970A1
Method for transmitting data via a serial communication bus, bus interface, and computer program
US20190020499A1
