Channel direction switching method, apparatus, and system

By dynamically switching channel direction in a high-speed interconnection interface, and adjusting message and logic layer control frames using channel direction, the problems of low channel bandwidth utilization and link management complexity in asymmetric service scenarios are solved, and more efficient data transmission is achieved.

WO2025156695A1PCT designated stage Publication Date: 2025-07-31HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/122788
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-26
Filing Date
2024-09-30
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

In high-speed interconnection interfaces, in asymmetric service scenarios, channel bandwidth utilization is low and link management is high.

Method used

By dynamically switching the channel direction between the first device and the second device, adjusting the message and reply message using the channel direction, adjusting the direction of at least one channel, for example, adjusting the transmit channel to a receive channel, to adapt to asymmetric service needs, and performing channel training and data transmission through logical layer control frames such as LLCF_EI, LLCF_PAD, LLCF_DS, etc.

Benefits of technology

This improves the utilization rate of channel bandwidth, reduces the complexity of link management, and realizes smooth switching and data transmission in asymmetric service scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024122788_31072025_PF_FP_ABST
    Figure CN2024122788_31072025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of communications, and provide a channel direction switching method, an apparatus, and a system, for use in improving the utilization rate of channel bandwidths. The method comprises: a first device sends a channel direction adjustment message to a second device, the channel direction adjustment message being used for indicating a channel serial number of at least one first channel to be switched, and the at least one first channel being a transmission channel of the first device; and the first device receives a response message of the second device, the response message being used for confirming that the second device supports switching of the channel direction of the at least one first channel. In this way, the first device and the second device can switch the channel direction of the at least one first channel, thereby meeting transmission requirements of asymmetric services, and improving the utilization rate of channel bandwidths.
Need to check novelty before this filing date? Find Prior Art

Description

A method, device and system for switching channel direction

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 26, 2024, with application number 202410122294.9 and application name “A method, device and system for switching channel direction”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method, device, and system for switching channel direction. Background Art

[0003] A high-speed interconnect interface typically includes a primary link for transmitting service information and an auxiliary link for transmitting control information. The primary link, also known as a high-speed link, can include multiple channels supporting high-speed data transmission. For example, the channels on the primary link can support transmission rates of 2 Gbps, 4 Gbps, or 8 Gbps. The auxiliary link, also known as a low-speed link, can include multiple channels supporting low-speed transmission. For example, the channels on the auxiliary link can support transmission rates of 12.5 Mbps.

[0004] Currently, high-speed interconnect interfaces include paired transmit and receive channels, used to send and receive service data at the same or similar data rates. For asymmetric services, such as those with an uplink transmission rate of 4 Gbps and a downlink transmission rate of 200 Mbps, both the transmit and receive channels must use a 4 Gbps transmission rate, resulting in low channel bandwidth utilization.

[0005] Summary of the Invention

[0006] The present application provides a method, device, and system for switching channel direction, which can be used to meet the transmission requirements of asymmetric services and improve channel bandwidth utilization.

[0007] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0008] In a first aspect, a method for switching channel direction is provided, the method comprising: a first device sending a channel direction adjustment message to a second device, for example, when the first device determines that the channel direction needs to be switched according to the service transmission situation, the channel direction adjustment message is sent to the second device, the channel direction adjustment message is used to indicate the channel sequence number of at least one first channel that needs to be switched, the at least one first channel is the transmission channel of the first device, and the at least one first device is determined by the first device; the first device receives a response message from the second device, the response message is used to confirm that the second device supports switching the channel direction of the at least one first channel, that is, the second device can feedback the response message to the first device when supporting switching the channel direction.

[0009] In the above technical solution, when the first device needs to switch the channel direction and the second device supports switching the channel direction, the first device and the second device can dynamically switch the channel direction of at least one first channel through channel direction adjustment messages and response messages. For example, at least one transmitting channel of the first device is adjusted to a receiving channel. In this way, when the first device and the second device are in an asymmetric service transmission scenario, the transmission of asymmetric services can be met by switching the channel directions of some channels, thereby improving the utilization rate of the channel bandwidth; in addition, the channel direction adjustment message is initiated by the transmitting end of the at least one first channel, and can also reduce the link management complexity caused by the transceiver coupling, that is, reduce the link management complexity.

[0010] In a possible implementation of the first aspect, the channel direction adjustment message includes multiple direction adjustment request parameters corresponding to multiple transmission channels, respectively. At least one direction adjustment request parameter corresponding to at least one first channel is used to indicate a channel direction adjustment request, and at least one direction adjustment request parameter corresponding to at least one second channel is used to indicate that the channel direction is not to be adjusted. The multiple transmission channels include the at least one first channel and the at least one second channel. In this possible implementation, the channel direction of the multiple first channels can be simultaneously adjusted between the first device and the second device through the channel direction adjustment message, thereby improving the efficiency of channel direction switching.

[0011] In a possible implementation of the first aspect, the method further includes: the first device sends LLCF_EI on the at least one first channel, and the LLCF_EI is used to mark the end of data transmission; the first device switches the at least one first channel to a receiving channel after a first preset time period, and performs channel training on the at least one first channel. In the above possible implementation, the first device notifies the second device of the end of data transmission by sending LLCF_EI on the at least one first channel, thereby ensuring that the second device can correctly receive the service data in the at least one first channel; in addition, the first device switches the at least one first channel to a receiving channel and performs channel training after the first preset time period, which can avoid bidirectional driving of the at least one first channel and ensure that the first device and the second device have sufficient time to switch the channel direction of the at least one channel.

[0012] In a possible implementation of the first aspect, the method further includes: the first device sending one or more of a channel lock feedback message LLFM, a clock lock feedback message CLFM, and an equalization feedback message EQFM to the second device. In this possible implementation, the first device can perform flexible channel training based on the channel condition of the at least one first channel, thereby improving the flexibility of channel training.

[0013] In a possible implementation of the first aspect, the method further includes: the first device receiving at least one first LLCF_PAD on the at least one first channel, and aligning multiple receiving channels based on the at least one first LLCF_PAD, where the multiple receiving channels include the at least one first channel and at least one third channel, where the at least one third channel is a receiving channel of the first device. In this possible implementation, by aligning the multiple receiving channels, the first device can reduce delay variation between channels, thereby ensuring correct reception of data in the multiple receiving channels.

[0014] In a possible implementation of the first aspect, the method further includes: the first device receiving a second LLCF_PAD on multiple receiving channels, the second LLCF_PADs of different channels in the multiple receiving channels having the same length, and the multiple receiving channels including the at least one first channel and the at least one third channel. In this possible implementation, by receiving the second LLCF_PADs of the same length on the multiple receiving channels, the first device can ensure smooth switching of data between the first device and the second device across the multiple receiving channels.

[0015] In a possible implementation of the first aspect, the method further includes: the first device receiving a first LLCF_DS on multiple receiving channels, where the multiple receiving channels include the at least one first channel and the at least one third channel. In this possible implementation, the first device may determine a location of service data transmitted in the multiple receiving channels based on the first LLCF_DS received by the multiple receiving channels, thereby correctly receiving the service data.

[0016] In a possible implementation of the first aspect, the method further includes: the first device simultaneously sending a third LLCF_PAD on at least one second channel, where the third LLCF_PADs of different channels in the at least one second channel have the same length. In this possible implementation, by simultaneously sending the third LLCF_PADs of the same length on the at least one second channel, the first device can ensure smooth switching of data between the first device and the second device on the at least one second channel.

[0017] In a possible implementation of the first aspect, the method further includes: the first device simultaneously sending a second LLCF_DS on the at least one second transmit channel. In the above possible implementation, by simultaneously sending the second LLCF_DS on the at least one second transmit channel, the first device can enable the second device to determine the location of service data transmitted on the at least one second transmit channel based on the received second LLCF_DS, thereby correctly receiving the service data.

[0018] In a possible implementation of the first aspect, the method further includes: if the response message is lost or abnormal, the first device retransmits the channel direction adjustment message. In this possible implementation, retransmitting the channel direction adjustment message can improve the success rate of switching the channel direction and enhance the robustness of the channel direction switching process.

[0019] In a possible implementation of the first aspect, the method further includes: when the number of retransmissions of the channel direction adjustment message exceeds a preset threshold, the first device sending a first error report, where the first error report is used to initiate link retraining. In this possible implementation, sending the error report can improve the robustness of the channel direction switching process.

[0020] In a possible implementation of the first aspect, the method further includes: a second device receiving a second error report, where the second error report is triggered by LLCF_EI loss or anomaly, or LLCF_DS detection failure, and the second error report is used to initiate link retraining or link recovery. In the above possible implementation, sending the error report can improve the robustness of the channel direction switching process.

[0021] In a possible implementation of the first aspect, the first device sending a channel direction adjustment message to the second device includes: the first device sending the channel direction adjustment message to the second device via a primary link; or the first device sending the channel direction adjustment message to the second device via an auxiliary link. These possible implementations can increase flexibility in sending the channel direction adjustment message, while also improving transmission efficiency when sending the channel direction adjustment message via the primary link.

[0022] In a second aspect, a method for switching channel direction is provided, the method comprising: a second device receives a channel direction adjustment message from a first device, the channel direction adjustment message being used to indicate the channel number of at least one first channel that needs to be switched, the at least one first channel being a receiving channel of the second device; the second device sends a response message to the first device, the response message being used to confirm that the second device supports switching the channel direction of the at least one first channel.

[0023] In a possible implementation of the second aspect, the channel direction adjustment message includes multiple direction adjustment request parameters corresponding to multiple receiving channels, at least one direction adjustment request parameter corresponding to the at least one first channel is used to indicate a channel direction adjustment request, and at least one direction adjustment request parameter corresponding to the at least one second channel is used to indicate that the channel direction is not adjusted, and the multiple receiving channels include the at least one first channel and the at least one second channel.

[0024] In a possible implementation of the second aspect, the method further includes: the second device receives LLCF_EI on the at least one first channel; after a second preset time length, the second device switches the at least one first channel to a transmission channel and performs channel training on the at least one first channel.

[0025] In a possible implementation manner of the second aspect, the method further includes: the second device receiving one or more of a channel lock feedback message LLFM, a clock lock feedback message CLFM, and an equalization feedback message EQFM from the first device.

[0026] In a possible implementation of the second aspect, the method further includes: the second device sends at least one first padding logical layer control frame LLCF_PAD on the at least one first channel, and the at least one first LLCF_PAD is used to align multiple transmission channels, and the multiple transmission channels include the at least one first channel and at least one third channel.

[0027] In a possible implementation of the second aspect, the method further includes: the second device simultaneously sends the second LLCF_PAD on multiple transmission channels, the lengths of the second LLCF_PADs of different channels in the multiple transmission channels are the same, and the multiple transmission channels include the at least one first channel and the at least one third channel.

[0028] In a possible implementation manner of the second aspect, the method further includes: the second device simultaneously sending the first data start logical layer control frame LLCF_DS on multiple transmission channels, where the multiple transmission channels include the at least one first channel and the at least one third channel.

[0029] In a possible implementation manner of the second aspect, the method further includes: the second device receiving a third LLCF_PAD on at least one second channel, wherein lengths of the third LLCF_PADs of different channels in the at least one second channel are the same.

[0030] In a possible implementation manner of the second aspect, the method further includes: the second device receiving a second LLCF_DS on the at least one second channel.

[0031] In a possible implementation manner of the second aspect, the method further includes: the second device receiving the channel direction adjustment message retransmitted by the first device, where the retransmission of the channel direction adjustment message is triggered by the loss or abnormality of the response message.

[0032] In a possible implementation manner of the second aspect, the method further includes: when the number of retransmissions of the channel direction adjustment message is greater than a preset threshold, the second device receives a first error report from the first device, where the first error report is used to initiate link retraining.

[0033] In a possible implementation manner of the second aspect, the method further includes: if LLCF_EI is lost or abnormal, or LLCF_DS detection fails, the second device sends a second error report, and the second error report is used to initiate link retraining or link recovery.

[0034] In a possible implementation of the second aspect, the second device receives the channel direction adjustment message from the first device, including: the second device receives the channel direction adjustment message from the first device through a main link; or the second device receives the channel direction adjustment message from the first device through an auxiliary link.

[0035] In a third aspect, a device for switching channel direction is provided. The device can implement the function performed by the first device in the above method. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0036] In a possible implementation of the third aspect, the device includes a sending unit, a receiving unit, and a processing unit; the processing unit is configured to support the device in performing the corresponding functions in the above-mentioned method for switching the channel direction; the sending unit and the receiving unit are used to support the device in communicating with the second device.

[0037] In another possible implementation of the third aspect, the apparatus includes a processor and a transmitter; the processor is configured to support the apparatus in performing corresponding functions in the above method; and the transmitter is configured to support the apparatus in communicating with a second device. Optionally, the apparatus also includes a memory, coupled to the processor, that stores program instructions and data necessary for the apparatus.

[0038] In a fourth aspect, a device for switching channel direction is provided. The device can implement the function performed by the second device in the above method. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0039] In a possible implementation of the fourth aspect, the device includes a receiving unit, a sending unit, and a processing unit; the processing unit is configured to support the device to perform the corresponding functions in the above-mentioned method of switching channel direction; the receiving unit and the sending unit are used to support the device to communicate with the first device.

[0040] In another possible implementation of the fourth aspect, the apparatus includes a processor and a receiver; the processor is configured to support the apparatus in performing corresponding functions in the above method; and the receiver is configured to support the apparatus in communicating with a first device. Optionally, the apparatus further includes a memory, coupled to the processor, that stores program instructions and data necessary for the apparatus.

[0041] In another aspect of the present application, a chip is provided, comprising: a processing circuit and a transmitter, wherein the processing circuit and the transmitter are used to support the chip in executing the method for switching channel direction as provided in the first aspect or any possible implementation of the first aspect; or the chip comprises: a processing circuit and a receiver, wherein the processing circuit and the receiver are used to support the chip in executing the method for switching channel direction as provided in the second aspect or any possible implementation of the second aspect.

[0042] In another aspect of the present application, a data transmission system is provided, which includes a first device and a second device, the first device being used to execute the method for switching channel direction provided by the first aspect or any possible implementation of the first aspect, and the second device being used to execute the method for switching channel direction provided by the second aspect or any possible implementation of the second aspect.

[0043] In another aspect of the present application, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method for switching channel direction provided by the first aspect or any possible implementation of the first aspect is implemented.

[0044] In another aspect of the present application, a computer-readable storage medium is provided, in which a computer program or instruction is stored. When the computer program or instruction is executed, the method for switching channel direction provided by the second aspect or any possible implementation of the second aspect is implemented.

[0045] In another aspect of the present application, a computer program product is provided, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute the method for switching channel direction as provided in the first aspect or any possible implementation of the first aspect.

[0046] In another aspect of the present application, a computer program product is provided, which includes: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute the method for switching channel direction as provided in the second aspect or any possible implementation of the second aspect.

[0047] It can be understood that the beneficial effects of the method, device, data transmission system, computer-readable storage medium and computer program product of the second aspect provided above can all refer to the beneficial effects of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG1 is a schematic structural diagram of a data transmission system provided in an embodiment of the present application;

[0049] FIG2 is a schematic diagram of the structure of another data transmission system provided in an embodiment of the present application;

[0050] FIG3 is a schematic diagram of basic components of an electronic device provided in an embodiment of the present application;

[0051] FIG4 is a schematic diagram of inter-interface transmission provided in an embodiment of the present application;

[0052] FIG5 is a flow chart of a method for switching channel directions provided in an embodiment of the present application;

[0053] FIG6 is a schematic diagram of switching the channel direction of a certain channel provided by an embodiment of the present application;

[0054] FIG7 is a schematic flow chart of another method for switching channel directions provided in an embodiment of the present application;

[0055] FIG8 is a schematic flow chart of another method for switching channel directions provided in an embodiment of the present application;

[0056] FIG9 is a flow chart of another method for switching channel directions provided in an embodiment of the present application;

[0057] FIG10 is a schematic structural diagram of a first device provided in an embodiment of the present application;

[0058] FIG11 is a schematic structural diagram of another first device provided in an embodiment of the present application;

[0059] FIG12 is a schematic structural diagram of a second device provided in an embodiment of the present application;

[0060] FIG13 is a schematic structural diagram of another second device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The following will discuss in detail the making and use of various embodiments. However, it should be understood that many applicable inventive concepts provided herein can be implemented in a variety of specific contexts. The specific embodiments discussed are merely illustrative of specific ways to implement and use the present application and technology and do not limit the scope of this application.

[0062] Unless defined otherwise, all technical and scientific terms used herein have the same meanings as commonly understood by one of ordinary skill in the art.

[0063] Various circuits or other components may be described or referred to as being "configured to" perform one or more tasks. In this case, "configured to" is used to imply structure by indicating that the circuit / component includes structure (e.g., circuitry) that performs the one or more tasks during operation. Thus, even when a specified circuit / component is not currently operational (e.g., not turned on), the circuit / component may be referred to as being configured to perform the task. Circuits / components used with the phrase "configured to" include hardware, such as circuitry that performs an operation, etc.

[0064] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c; where a, b and c can be single or multiple.

[0065] The embodiments of this application use terms such as "first" and "second" to distinguish objects with similar names, functions, or effects. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or order of execution. The term "coupled" is used to indicate an electrical connection, including direct connection via wires or connectors or indirect connection via other devices. Therefore, "coupling" should be considered a broadly defined electronic communication connection.

[0066] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0067] Before introducing the embodiments of the present application, the relevant terms involved in the present application are first introduced and explained.

[0068] Lane: A path used to transmit signals. A lane can be unidirectional or bidirectional. A unidirectional lane consists of a pair of differential signal lines, while a bidirectional lane consists of two pairs of differential signal lines.

[0069] Link: It is a collection of channels or a conductor line used for power supply. A link generally includes one channel or multiple channels. When the channel is working, a transmitter and a receiver are turned on at both ends, and data (or signals) are transmitted only from the transmitter to the receiver. For a link, the side where the transmitter is located is called the transmitter side or the transmitting side (transmitter side, Tx side), and the side where the receiver is located is called the receiving side or the receiving side (receiver side, Rx side). Links can be divided into downlinks and uplinks. The uplink refers to the link when the slave device (for example, a game controller) sends a signal to the master device (for example, a display), and the downlink refers to the link when the master device (for example, a routing device) sends a signal to the slave device (for example, a display).

[0070] Main link (ML): used for high-speed data transmission, such as audio and video signals, third-party protocol data, and other high-speed data transmission.

[0071] Sideband link (SL): Used for low-speed data transmission, such as device management signals, port management signals, bandwidth management signals, and power management signals. It is also used to transmit control messages. The reliability of data transmission on the sideband link is higher than that on the main link.

[0072] Link training: For newly opened channels in a link, a process such as channel clock recovery and locking, channel equalization, channel locking, and lane-to-lane de-skew is performed to enable the channel to exchange data normally. This process is called link training, or link establishment.

[0073] Channel clock recovery and lock: During link training, the process by which the channel receiver extracts the receive clock from the received data packets is called channel clock recovery and lock, or simply channel clock recovery.

[0074] Channel equalization: During link training, a signal is transmitted from the transmitter through a channel to the receiver. During transmission, factors such as transmission rate, electromagnetic interference, and channel quality can cause signal distortion, affecting the receiver's ability to accurately interpret the signal. The greater the signal distortion, the higher the bit error rate (BER), resulting in poorer channel performance. To ensure a high-quality signal that is easily interpreted by the receiver, signal conditioning can be performed at the transmitter, during transmission, or before the receiver makes a decision. This process is called channel equalization, or signal compensation.

[0075] Channel locking: During link training, the process by which the receiver determines when to begin transmitting bit symbols is called channel locking. This process can also be called determining the boundaries of the channel for transmitting data.

[0076] Multi-channel alignment: During multi-channel data transmission, transmission delays across different channels can vary. This means that data arrival times on each channel may differ, introducing skew (or phase offset). To ensure that the receiving end of each channel can simultaneously and correctly process the received data, each channel must be adjusted and compensated. This process is called deskew (or delay skew elimination), also known as channel alignment.

[0077] Logical layer control frame (LLCF): Data used to implement link management functions such as link training and status updates. Logical layer block (LLB): The basic unit of data transmission.

[0078] Exemplarily, as shown in Table 1 and Table 2 below, the frame format of the LLCF includes a frame header, the frame header includes a frame type and a checksum, the frame type is used to indicate the frame type, and the checksum is a check digit for the frame type. Optionally, the frame format of the LLCF may also include a payload, which is information carried by a control frame of the corresponding type. Among them, the LLCF may include one or more frame headers, and the frame type and checksum in each frame header may each occupy one byte (byte, B), that is, the length of the frame type and checksum may both be 1B; the payload in the LLCF may occupy one or more bytes, that is, the length of the payload is variable. Exemplarily, the LLCF includes multiple frame headers and payloads, frame header 1 occupies bytes B0 and B1, frame header 2 occupies bytes B2 and B3, frame header 3 occupies bytes B4 and B5, and payload occupies byte B6. The contents of frame header 1, frame header 2, and frame header 3 in the above frame structure are the same, constituting a repetition code.

[0079] Table 1

[0080] Table 2

[0081] The frame type, checksum, payload length, and description of the control frame involved in this application may be shown in Table 3 below, and may include:

[0082] Logic layer control frame training sequence 0 (LLCF_TS0) is used for clock locking during the training phase.

[0083] Logic layer control frame training sequence 1 (LLCF_TS1) is used for channel parameter tuning calculations during the training phase.

[0084] Logic layer control frame training sequence 2 (LLCF_TS2) is used to send and receive confirmation of synchronization status.

[0085] The logic layer control frame electrical idle (LLCF_EI) is used to mark the end of transmission on a lane and the subsequent data should be discarded. LLCF_EI is also known as the electrical idle logic layer control frame.

[0086] The Logic Layer Control Frame Data Start (LLCF_DS) marks the start of a new logic block. Logic block data is transmitted immediately following the LLCF_DS. LLCF_DS is also known as the Data Start Logic Layer Control Frame.

[0087] LLCF_PAD (Logic Layer Pad Logical Layer Control Frame) is used for padding. LLCF_PAD is also called a logical layer pad control frame.

[0088] Table 3

[0089] The technical solution provided in this application can be applied to a data transmission system including multiple data transmission devices, which can be devices, chips applied to devices, or interface devices, etc. In this data transmission system, a data transmission device (for example, a data sending device) and a data transmission device (for example, a data receiving device) can be directly connected, or indirectly connected through a switching device such as a router, that is, the multiple data transmission devices can all be connected to the switching device. In this application, data transmission can be performed between the multiple data transmission devices in a wired manner or in a wireless manner. In addition, when data transmission is performed between the multiple data transmission devices, signals can be transmitted directly or through an interface device.

[0090] When the data transmission device is a chip in a device, the chips in the data transmission system can be interconnected via wired or wireless means. The chip can be a chip in the device, a chip in a docking station, or a chip in an adapter, etc. The docking station can be connected to a Gigabit Ethernet port, a video graphics array (VGA), an HDMI port, a flash memory (TF) card, a secure digital (SD) card, a charging port, and a USB port, etc.

[0091] Optionally, when the data transmission device is a chip, the chip may further include an interface module, that is, the present application may be applied to an interface module for interconnecting chips. The interface module may be understood as an intellectual property (IP) module integrated inside the chip. Alternatively, the interface module may also be sold separately as an IP module. For example, the chip may be a system on chip (SoC), a central processing unit (CPU), or a graphics processing unit (GPU), etc., and the above-mentioned interface module may be an interface module in the SoC, CPU, or GPU, etc. Optionally, the interface module may be a transmitting circuit and / or a receiving circuit.

[0092] The following uses the data transmission system including multiple devices as an example to illustrate the structure of the data transmission device.

[0093] Figure 1 is a structural diagram of a data transmission system provided by an embodiment of the present application. The data transmission system includes a first device 110 and a second device 120, and the first device 110 and the second device 120 are connected by wired or wireless means, for example, by a cable. Among them, signals can be transmitted between the first device 110 and the second device 120, for example, audio and video data can be transmitted or charging signals can be transmitted. In one example, the first device 110 can be a set-top box, and the second device 120 can be a TV. The set-top box and the TV can be connected by a cable, and the set-top box can transmit audio and video data to the TV via a cable. In another example, the first device 110 is a display, and the second device 120 is a game controller. The display and the game controller can be connected by a cable, and the game controller can transmit control information to the display via a cable.

[0094] Optionally, the first device 110 may include interface A, and the second device 120 may include interface B. The connection between the first device 110 and the second device 120 can be specifically a connection between interface A of the first device 110 and interface B of the second device 120. For example, interface A of the first device 110 and interface B of the second device 120 are connected via a cable.

[0095] FIG2 is a structural diagram of another data transmission system provided in an embodiment of the present application. The data transmission system includes a plurality of devices 210 and a router 220. The plurality of devices 210 can be connected to the router 220 by wired or wireless means. For example, the plurality of devices 210 can all be connected to the router 220 by cables. Among them, any two devices in the plurality of devices 210 can transmit signals through the router 220, for example, transmitting audio and video data or transmitting charging signals. In one example, the plurality of devices 210 can include a display 211, a set-top box 212 and an audio player (e.g., MP3) 213. The set-top box 212 can transmit audio and video data to the display 211 through the router 220. The set-top box 212 can also transmit audio data to the audio player 213 through the router 220. In addition, there can also be two interconnected devices in the plurality of devices 210. For example, the plurality of devices 210 can also include a game controller 214. The game controller 214 can be connected to the display 211 and transmit control information to the display 211.

[0096] Optionally, each of the multiple devices 210 may include an interface, and the router 220 may include multiple interfaces, and the interface of each of the multiple devices 210 may be connected to one of the multiple interfaces of the router 220. For example, the multiple devices 210 include a display, a set-top box, a game controller, and an audio player, and the multiple interfaces of the router 220 include a first interface to a fourth interface, the interface of the display is connected to the first interface of the router 220 via a cable, the interface of the set-top box is connected to the second interface of the router 220 via a cable, the interface of the game controller is connected to the third interface of the router 220 via a cable, and the interface of the audio player is connected to the fourth interface of the router 220 via a cable.

[0097] The devices in the above-mentioned system with data transmission capabilities can be referred to as communication devices. The communication devices can be deployed on land, including indoors or outdoors, and can be handheld or vehicle-mounted. The communication devices can also be deployed on water (such as ships) or in the air (such as aircraft, balloons, and satellites). The communication devices can be applied in different scenarios. Exemplarily, the communication device may include, but is not limited to: a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a camera, a wearable device (such as a smart watch, a smart bracelet, a pedometer, etc.), an audio device, an audio and video player, a set-top box, a game console, a printer, a mouse, a keyboard, an in-vehicle device (such as a car, a bicycle, an electric car, an airplane, a ship, a train, a high-speed train, etc.), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a smart home device (such as a refrigerator, a television, an air conditioner, an electric meter, etc.), an intelligent robot, a workshop device, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, or a smart home. Wireless terminals in homes, flying devices (e.g., smart robots, hot air balloons, drones, airplanes), etc. Optionally, the signals transmitted between the above communication devices may include, but are not limited to: audio and video signals, radio frequency signals, IoT data, and charging signals.

[0098] In the present application, the interface specifications used for signal transmission between devices in a data transmission system may include, but are not limited to: universal serial bus (USB) interface specifications, high definition multimedia interface (HDMI) interface specifications, display port (DP) interface specifications, unified multimedia interconnection (UMI) interface specifications, and peripheral component interconnect express (PCI-Express) interface specifications, etc. Accordingly, the interface may be HDMI, miniHDMI, micro HDMI, type-A interface, type-B interface, Micro-B, and type-C interface, etc.

[0099] For example, in the above examples, the interface connection method between the set-top box and the TV, or the interface connection method between the game console and the monitor can be connected through a USB cable, and the interface standard followed is the USB interface specification, or the connection method can be connected through an HDMI cable, and the interface standard followed is the HDMI interface specification.

[0100] It will be understood that the interface specifications used for signal transmission between the above-mentioned devices are merely exemplary. In actual applications, the interface specifications may also include other or any interface specifications that may appear in the future, such as a unified media interconnection (UMI) interface, etc., and the embodiments of the present application are not specifically limited to this.

[0101] In this application, when the device is an electronic device, FIG3 shows a schematic diagram of the basic components of such an electronic device. The electronic device includes an interface chip 300 (e.g., a UMI interface), which includes one or more adapters 301, one or more management and control adapters 302, and one or more ports 303. Alternatively, when the electronic device is a routing device, the interface chip 300 includes only one or more ports 303. Each of the one or more adapters 301 can be coupled to an external component of the interface chip 300. One or more management and control adapters 302 can be coupled to a component external to the interface chip 300 for management and control. Port 303 can be coupled to a connector 304 of the electronic device, which is used to couple to external devices of the electronic device. One or more adapters 301 can be a transmit / receive adapter. For example, when the adapter 301 is used to adapt audio and video formats, the adapter 301 can be an audio and video transmit / receive adapter. When the adapter 301 is used to adapt a third-party protocol, the adapter 301 can be a third-party protocol adapter.

[0102] For example, when port 303 is a downlink port, the transmission adapter can be used to adapt the service information to be sent into service information that can be transmitted on port 303 of the interface chip, and then send the service information out through port 303. When port 303 is an uplink port, the reception adapter 301 can be used to adapt the service information received from port 303 into service information to be processed internally by the electronic device. The management and control adapter 302 can be used to adapt control information.

[0103] The basic components of different electronic devices can be combined to form a variety of different device types. For example, an electronic device may include a source device comprising at least one downstream port and at least one audio and video transmitter adapter, or a source device comprising at least one upstream port and an audio and video receiver adapter, or a docking station device comprising at least one upstream port, at least one audio and video receiver adapter, and at least one traditional audio and video interface, or a routing device comprising at least one downstream port and at least one upstream port without an audio and video transmitter adapter or an audio and video receiver adapter, or a composite device having both an upstream port and a downstream port.

[0104] Figure 4 shows a schematic diagram of inter-interface transmission provided by an embodiment of the present application. A main link ML and a secondary link SL can be included between the uplink and downlink ports of devices. The main link can be used for high-speed data transmission, such as audio and video signals. The secondary link can be used for inter-device management and control, such as device discovery, capability query, device configuration, and device control. It can also be used for low-speed data transmission and control message transmission.

[0105] In one possible embodiment, the main link may include multiple channels, each of which supports unidirectional transmission; the auxiliary link may include two unidirectional channels in different directions. In other possible embodiments, the main link may include multiple channels, some of which are unidirectional channels and others are bidirectional channels; and the auxiliary link may include one bidirectional channel. Exemplarily, a main link may include multiple channels, for example, 2, 5, or 9. The greater the number of channels included in the main link, the faster the data transmission speed. Exemplarily, as shown in FIG4 , for an uplink port, the main link may include n transmit channels TX1-TXn (i.e., channels 1 to n) and m receive channels RX1-RXm (i.e., channels n+1 to n+m). The auxiliary link includes a transmit channel SBTX and a receive channel SBRX, where n and m are positive integers. For a downlink port, the main link may include n receive channels RX1-RXn and m transmit channels TX1-TXm. The auxiliary link includes a receive channel SBRX and a transmit channel SBTX.

[0106] Furthermore, a power-bus link (PL) and a cable-information link (CL) may be included between the upstream and downstream ports of the devices. The cable-information link can be used to transmit cable information, such as the cable model and cable capability information. FIG4 does not show the power-bus link and the cable-information link.

[0107] It can be understood that for ports between devices, whether they are uplink ports or downlink ports, they can include multiple pins, such as pins connected to ground wires, pins connected to power lines, pins connected to channels of the main link, and pins connected to channels of the auxiliary link.

[0108] In the high-speed interconnection interface, the above-mentioned main link can also be called a high-speed link, which can specifically include multiple channels supporting high-speed data transmission. For example, the transmission rate supported by the channel of the main link can be 2Gbps, 4Gbps or 8Gbps, etc.; the above-mentioned auxiliary link can also be called a low-speed link, which can specifically include multiple channels supporting low-speed transmission. For example, the transmission rate supported by the channel of the auxiliary link can be 12.5Mbps.

[0109] Currently, high-speed interconnect interfaces include paired transmit and receive channels (also known as transmit and receive channels) for sending and receiving service data at the same or similar data rates. For asymmetric services, such as those with an uplink transmission rate of 4 Gbps and a downlink transmission rate of 200 Mbps, both the transmit and receive channels must use a 4 Gbps transmission rate, resulting in low channel bandwidth utilization.

[0110] Based on this, an embodiment of the present application provides a method for switching channel direction, in which the first device and the second device can dynamically switch the channel direction of at least one first channel through a channel direction adjustment message (lane direction adjust message, LDAM) and a response message, for example, adjusting at least one transmitting channel of the first device to at least one receiving channel. In this way, when the first device and the second device are in an asymmetric service transmission scenario, the channel direction of some channels can be switched, for example, when the uplink transmission rate is 4Gbps and the downlink transmission rate is 200Mbps, some downlink transmission channels are switched to uplink transmission channels to meet the transmission of asymmetric services and improve the utilization of channel bandwidth; in addition, the channel direction adjustment message is initiated by the first device (that is, the transmitting end of the at least one first channel), which can also reduce the link management complexity caused by the transceiver coupling, that is, reduce the link management complexity.

[0111] The two words "switch" and "adjust" involved in the embodiments of the present application can be replaced with each other, or the meanings expressed by the two are equivalent. For example, the switching channel direction in the present application can be replaced with adjusting the channel direction.

[0112] Figure 5 is a flow chart of a method for switching channel direction provided in an embodiment of the present application. The method can be applied to the data transmission system provided above. For example, the data transmission system includes a first device and a second device. The method includes the following steps.

[0113] S401a: The first device sends a channel direction adjustment message to the second device, where the channel direction adjustment message indicates the channel sequence number of at least one first channel that needs to be switched. Correspondingly, S401b: The second device receives the channel direction adjustment message.

[0114] The at least one first channel may be a transmit channel (or TX channel) of the first device, or a channel of the first device in the transmit direction. Accordingly, the at least one first channel may also be a receive channel (or RX channel) of the second device, or a channel of the second device in the receive direction. Optionally, the at least one channel is a channel in a primary link.

[0115] Taking the first device as an example, the at least one first channel can be part or all of the multiple transmission channels of the first device. Optionally, when the first device determines that channel direction switching is required, the first device can determine the at least one first channel from the multiple transmission channels of the first device. For example, the first device can determine the at least one first channel based on the service transmission conditions on the transmission channel and the receiving channel. Exemplarily, as shown in FIG6 , the first device communicates with the second device through three transmission channels (represented as channels 0 to 2) and one receiving channel (represented as channel 3). When the amount of business to be sent by the first device decreases and the amount of business to be received increases, the first device can determine to switch the channel direction of channel 2, that is, the first device can initiate a channel direction switch to switch channel 2 to a receiving channel. TX and RX in FIG6 represent channel directions.

[0116] Optionally, the channel direction adjustment message includes multiple direction adjustment request parameters corresponding to multiple transmission channels, wherein at least one direction adjustment request parameter corresponding to at least one first channel is used to indicate a channel direction adjustment request, and at least one direction adjustment request parameter corresponding to at least one second channel is used to indicate that the channel direction is not adjusted, and the multiple transmission channels include the at least one first channel and the at least one second channel. In other words, the channel direction adjustment message can be used to indicate switching the channel directions of some transmission channels of the first device.

[0117] In one possible embodiment, the first device sends the channel direction adjustment message to the second device via a primary link, and the second device receives the channel direction adjustment message via the primary link. In another possible embodiment, the first device sends the channel direction adjustment message to the second device via an auxiliary link, and the second device receives the channel direction adjustment message via the auxiliary link.

[0118] In one example, when the first device sends the channel direction adjustment message through the primary link, the channel direction adjustment message may be carried in a logical layer main link management packet (LLMMP). For example, the arrangement format of the channel direction adjustment message LDAM in the LLMMP may be as shown in Table 4 below.

[0119] Table 4 LDAM arrangement format in LLMMP

[0120] In another example, when the first device sends the channel direction adjustment message through the auxiliary link, the channel direction adjustment message may be carried in a logical layer sideband link management packet (LLSMP). For example, the arrangement format of the channel direction adjustment message LDAM in the LLSMP may be as shown in Table 5 below.

[0121] Table 5 LDAM arrangement format in LLSMP

[0122] S402a: The second device sends a response message to the first device, where the response message is used to confirm that the second device supports switching the channel direction of the at least one first channel. Correspondingly, S402b: The first device receives the response message.

[0123] In one possible embodiment, when the port corresponding to the second device supports switching the channel direction, the second device sends a response message to the first device on the primary link or the auxiliary link. For example, the response message may be an acknowledgment (ACK) message. When the first device receives the response message on the primary link or the auxiliary link, the first device may confirm, based on the response message, that the second device supports switching the channel direction of the at least one first channel. Optionally, before receiving the response message, the first device may still send service data normally through the at least one first channel.

[0124] Optionally, when the port corresponding to the second device does not support switching the channel direction, the second device sends a negative acknowledgment message to the first device. For example, the negative acknowledgment message may be a negative acknowledgement (NACK) message. When the first device receives the negative acknowledgment message, the first device may confirm, based on the negative acknowledgment message, that the second device does not support switching the channel direction of the at least one first channel. If the second device sends a negative acknowledgment message to the first device, the process ends, and the first and second devices receive and send services based on the original channel direction (or channel state).

[0125] Furthermore, after the first device receives the response message fed back by the second device, the first device and the second device may manage the at least one first channel and use the at least one first channel for data transmission, as illustrated below with reference to FIG7 .

[0126] In conjunction with FIG5 , as shown in FIG7 , after S402a-S402b, the method further includes: one or more pairs of steps S403a-S403b to S407a-S407b. FIG7 illustrates the method by taking the method further including S403a-S403b to S407a-S407b as an example. This embodiment of the application does not specifically limit the order of the multiple pairs of steps described above. The order shown in FIG7 is merely exemplary and does not limit this embodiment of the application.

[0127] S403a: The first device sends LLCF_EI on the at least one first channel. Correspondingly, S403b: The second device receives LLCF_EI on the at least one first channel.

[0128] In one possible embodiment, when the first device receives a response message from the second device, the first device may send an LLCF_EI on the at least one first channel. For example, each channel in the at least one first channel sends an LLCF_EI. The LLCF_EI of each channel can be used to mark the end of data transmission on that channel. In this way, when the second device receives the LLCF_EI on each channel in the at least one first channel, it can determine the end of data transmission on that channel based on the LLCF_EI of each channel. Optionally, after the first device sends the LLCF_EI on the at least one first channel, the at least one first channel may enter a low-power state.

[0129] S404a: After a first preset time duration, the first device switches the at least one first channel to a receiving channel and performs channel training on the at least one first channel. Correspondingly, S404b: After a second preset time duration, the second device switches the at least one first channel to a transmitting channel and performs channel training on the at least one first channel.

[0130] Optionally, the first device executes S404a after receiving the above-mentioned response message or after S403a, and the second device may execute S404b after sending the response message or after S403b. This embodiment of the present application does not impose any specific restrictions on this.

[0131] Among them, the first preset time length and the second preset time length may be equal to or different. In one example, the first preset time length and the second preset time length are equal. In another example, the first preset time length and the second preset time length are different, for example, the first preset time length is equal to the sum of the second preset time length and the transmission delay of the LLCF_EI of the at least one first channel. In an embodiment of the present application, the first device and the second device switch the channel direction of the at least one channel after the first preset time length and the second preset time length, respectively, that is, the first device and the second device can wait for a period of time before switching the channel direction of the at least one channel, which can avoid bidirectional driving of the at least one channel and ensure the switching time of the first device and the second device.

[0132] In addition, the first device switching the at least one first channel to a receive channel may also be referred to as: the first device switching the at least one first channel from a TX mode to an RX mode, or the first device switching the channel direction of the at least one first channel from a transmit direction to a receive direction. After the first device switches the at least one first channel to a receive channel, the at least one first channel may be referred to as a newly added receive channel of the first device.

[0133] Similarly, the second device switching the at least one first channel to a transmit channel can also be referred to as: the second device switching the at least one first channel from RX mode to TX mode, or the second device switching the channel direction of the at least one first channel from a receive direction to a transmit direction. After the second device switches the at least one first channel to a transmit channel, the at least one first channel can be referred to as a newly added transmit channel of the second device.

[0134] In one possible embodiment, for the at least one first channel, if the channel supports fast link establishment, a channel locking process is entered, and the second device continuously sends LLCF_TS2 on the channel to initiate channel locking. If the channel does not support fast link establishment, the channel enters a channel clock recovery and locking process, and the second device needs to send a link training start message (TSM) to instruct the corresponding channel to start initial training. At the same time, the second device sends LLCF_TS0 on the channel and then waits for the first device to send a channel clock lock feedback message (CLFM). After the channel clock is locked, the second device sends LLCF_TS1 and receives an equilibrium feedback message (EQFM) indicating that channel equalization is successful. After the channel equalization is successful, the second device sends LLCF_TS2 and enters the channel locking process. The second device then waits for the first device to send a lane lock feedback message (LLFM) indicating that the channel is locked.

[0135] Furthermore, after the at least one first channel of the first device is switched to a receiving channel, at least one or more of LLCF_TS0, LLCF_TS1, and LLCF_TS2 from the second device are received on the at least one first channel, depending on whether the fast link establishment process is supported, to perform channel training (also known as link training). During the training process, the first device sends one or more channel training messages, including a clock lock feedback message CLFM, an equalization feedback message EQFM, and a channel lock feedback message LLFM, to the second device according to the specific process of the training; in this way, the second device can receive the one or more channel training messages fed back by the first device. Optionally, the first device can send the one or more channel training messages via the main link or the auxiliary link.

[0136] In one possible embodiment, for the at least one first channel, if the channel supports fast link establishment, the first device sends LLFM to the second device. If the channel does not support fast link establishment, the first device sends CLFM to the second device to indicate the channel clock recovery and lock result, EQFM to indicate the channel equalization result, and LLFM to indicate the channel lock result of the at least one first channel. If the CLFM indicates a channel clock lock failure, or the EQFM indicates a channel equalization failure, or the LLFM indicates that any channel has not been successfully locked, the process ends. The first and second devices receive and transmit services based on the number of channels currently transmitting. At this point, the number of transmit channels on the first device has been reduced.

[0137] It can be understood that the detailed description of the channel clock recovery and locking process, channel equalization process, channel locking process, and channel alignment process involved in the above-mentioned channel training can refer to the description in the relevant technology, and the embodiment of the present application will not be described in detail here.

[0138] S405a: The second device sends at least one first LLCF_PAD on the at least one first channel. Correspondingly, S405b: When the first device receives the at least one first LLCF_PAD on the at least one first channel, the first device aligns a plurality of receiving channels according to the at least one first LLCF_PAD, the plurality of receiving channels including the at least one first channel and at least one third channel, the at least one third channel being the receiving channel of the first device.

[0139] The at least one first channel may be a newly added receiving channel of the first device. The at least one third channel may be an original receiving channel of the first device that was in a high-speed state before the channel direction of the at least one first channel was switched (hereinafter referred to as the original receiving channel). The multiple receiving channels include the newly added receiving channels of the first device and the original receiving channels of the first device, that is, the multiple receiving channels are all receiving channels of the first device that are currently in a high-speed state.

[0140] In a possible embodiment, the second device sends at least one first LLCF_PAD on the at least one first channel, and each channel in the at least one first channel can correspondingly send at least one first LLCF_PAD; the first device receives at least one first LLCF_PAD on each channel in the at least one first channel, and aligns the multiple receiving channels according to the at least one first LLCF_PAD received in the at least one first channel. Exemplarily, during the channel switching process, the communication in the at least one third channel of the first device is still not interrupted, and the at least one third channel is still transmitting data packets. The first device can align the position of the logical layer control frame LLCF sent in the at least one first channel and the at least one third channel by sending the at least one first LLCF_PAD, that is, the first device aligns the position of the LLCF sent on the newly added receiving channel and the original receiving channel.

[0141] S406a: The second device simultaneously transmits a second LLCF_PAD on multiple transmit channels. The second LLCF_PADs on different channels in the multiple transmit channels have the same length. The multiple transmit channels include the at least one first channel and the at least one third channel, and the at least one third channel is a transmit channel of the second device. Accordingly, S406b: The first device receives the second LLCF_PAD on the multiple receive channels.

[0142] The multiple transmission channels of the second device are consistent with the multiple receiving channels of the first device described above. Similarly, the at least one first channel may be a newly added transmission channel of the second device; the at least one third channel may be an original transmission channel of the second device in a high-speed state before the channel direction of the at least one first channel is switched (hereinafter referred to as the original transmission channel); the multiple transmission channels include the newly added transmission channel of the second device and the original transmission channel of the second device, that is, the multiple transmission channels are all transmission channels of the second device currently in a high-speed state.

[0143] In addition, the lengths of the second LLCF_PADs of different channels in the multiple transmission channels are the same, that is, the lengths of the second LLCF_PADs sent by the second device in the multiple transmission channels are all the same. For example, the length can be expressed as cf_pad_length, and the corresponding maximum value can be 128 bytes and the minimum value can be 32 bytes.

[0144] In a possible embodiment, the second device simultaneously sends a second LLCF_PAD on all transmission channels (i.e., the multiple transmission channels) in a high-speed state, so that the first device can receive a second LLCF_PAD on each of the corresponding multiple receiving channels, so as to realize smooth switching of data between the second device and the first device in the multiple transmission channels through the second LLCF_PAD.

[0145] Optionally, after the first device receives the second LLCF_PAD on the multiple receiving channels, the first device may reset the scrambling code seeds corresponding to the multiple receiving channels.

[0146] S407a: The second device simultaneously sends the first LLCF_DS on the multiple transmission channels. Correspondingly, S407b: The first device receives the first LLCF_DS on the multiple reception channels.

[0147] In one possible embodiment, the second device simultaneously transmits a first LLCF_DS on all high-speed transmit channels (i.e., the multiple transmit channels), and then transmits service data on the multiple transmit channels. The first device can receive the first LLCF_DS on the multiple receive channels, and then receive service data on the multiple receive channels. In this way, the second device can transmit service data to the first device via the multiple transmit channels after switching, thereby meeting the transmission requirements in asymmetric service scenarios and improving channel bandwidth utilization.

[0148] Furthermore, after the first device receives the response message fed back by the second device, the first device and the second device may manage the at least one second channel and use the at least one second channel for data transmission, which is illustrated below with reference to FIG8 .

[0149] In conjunction with FIG5 , as shown in FIG8 , after S402a-S402b, the method further includes: one or more pairs of steps S408a-S408b to S409a-S409b. FIG8 illustrates the method by taking the method further including S408a-S408b to S409a-S409b as an example. The present embodiment does not impose any specific restrictions on the order of the multiple pairs of steps described above. The order illustrated in FIG8 is merely exemplary and does not limit the present embodiment.

[0150] S408a: The first device simultaneously sends a third LLCF_PAD on at least one second channel, and the lengths of the third LLCF_PADs of different channels in the at least one second channel are the same. Correspondingly, S408b: The second device receives the third LLCF_PAD on the at least one second channel.

[0151] The at least one second channel may be a remaining transmit channel of the first device in a high-speed state. For the second device, the at least one second channel may be a remaining receive channel of the second device in a high-speed state. The at least one second channel may include one or more channels.

[0152] In addition, when the number of the at least one second channel is multiple, the lengths of the third LLCF_PADs of different channels in the at least one second channel are the same, that is, the lengths of the third LLCF_PADs sent by the first device in the at least one second channel are all the same. For example, the length can be expressed as cf_pad_length, and the corresponding maximum value can be 128 bytes and the minimum value can be 32 bytes. Optionally, the lengths of any two LLCF_PADs in the first, second and third LLCF_PADs in the embodiment of the present application can be the same or different, and the embodiment of the present application does not impose specific restrictions on this. In a possible embodiment, the first device simultaneously sends a third LLCF_PAD in the remaining transmission channels (that is, the at least one second channel) in a high-speed state, so that the second device can receive a third LLCF_PAD in each channel of the at least one second channel, so as to realize smooth switching of the data of the first device and the second device in the at least one second channel through the third LLCF_PAD. Optionally, after the second device receives the third LLCF_PAD from the first device in the at least one second channel, the second device can reset the scrambling code seeds corresponding to the multiple receiving channels.

[0153] S409a: The first device simultaneously sends the second LLCF_DS on the at least one second transmission channel. Correspondingly, S409b: The second device receives the second LLCF_DS on the at least one second channel.

[0154] Optionally, the lengths of the first LLCF_DS and the second LLCF_DS in the embodiment of the present application may be the same or different, and the embodiment of the present application does not impose any specific limitation on this.

[0155] In one possible embodiment, the first device simultaneously transmits a second LLCF_DS on the remaining transmit channel (i.e., the at least one second channel) in a high-speed state, and then transmits service data on the at least one second channel; the second device may receive the second LLCF_DS on the at least one second channel, and then receive service data on the at least one second channel. In this way, the first device can transmit service data to the second device via the remaining transmit channel after the switch, thereby meeting transmission requirements in asymmetric service scenarios and improving channel bandwidth utilization.

[0156] For ease of understanding, the following takes the first device as device A and the second device as device B to illustrate the solution for switching channel directions provided in the embodiment of the present application.

[0157] As shown in FIG9 , the method includes: ①. Device A sends an LDAM indicating channel direction switching, which is limited to indicating the TX channel switching direction of device A. For example, the LDAM is used to indicate that the channel direction of at least one TX channel of device A needs to be switched; ②. Device B feeds back an ACK corresponding to the LDAM to confirm that it supports switching the channel direction; ③. Device A sends an LLCF_EI on the TX channel that needs to switch direction and an LLCF_PAD on the remaining TX channels. After receiving the LLCF_EI on the channel to be switched, device B executes the following: 1. Waiting for the tDirChange time to avoid dual driving of the high-speed channel line; 2. Switching from RX to TX, and then continuously sending LLCF_TS2 (i.e., adding a new TX ④. Device A sends an LLCF_DS on the remaining TX channels; ⑤. Device A sends normal business data on the remaining TX channels; ⑥. Device A sends an LLFM to indicate that all newly added channels (i.e., at least one of the above-mentioned TX channels) have been successfully locked; ⑦. Device B sends several LLCF_PADs on the newly added TX channels; ⑧. Device B sends an LLCF_PAD on all TX channels; ⑨. Device B sends an LLCF_DS on all TX channels, including the newly added TX channels and the original TX channels; ⑩. Device B sends normal business data on all TX channels.

[0158] Furthermore, during the process of switching the channel direction provided above, if an abnormal situation occurs, the first device and the second device may further handle the abnormal situation through some processing mechanisms to improve the robustness of the process of switching the channel direction. In some embodiments, if the abnormal situation includes the abnormal phenomena of the above-mentioned response message loss or abnormality, LLCF_EI loss or abnormality, and LLCF_DS detection failure, the corresponding processing mechanism may be as shown in Table 6 below.

[0159] Table 6

[0160] In one example, if the response message fed back by the second device is lost or abnormal, such as the first device does not receive the response message within a certain period of time, or the received response message is incorrect, the first device can retransmit the channel direction adjustment message to the second device; in this way, when the second device receives the retransmitted channel direction adjustment message, the second device can resend the response message to the first device.

[0161] Optionally, when the number of retransmissions of the channel direction adjustment message is greater than a preset threshold, the first device sends a first error report to the second device, and the first error report is used to initiate link retraining; in this way, when the second device receives the first error report, the first device and the second device can initiate link retraining for all transmission channels of the first device.

[0162] In another example, if the LLCF_EI sent by the first device on the at least one first channel is lost or abnormal, such as the second device does not receive the LLCF_EI within a certain period of time, or the received LLCF_EI is incorrect, the second device will detect a link error abnormality. The second device can send a second error report to the first device, and the second error report is used to initiate link retraining or link recovery; in this way, when the first device receives the second error report, the first device and the second device can initiate link retraining or link recovery for all transmission channels of the first device.

[0163] In another example, if the LLCF_DS detection described above fails, for example, if the second device does not detect the second LLCF_DS, the second device sends a second error report to the first device, and the second error report is used to initiate link retraining; thus, when the first device receives the second error report, the first device and the second device can initiate link retraining for all transmit channels of the first device. If the first LLCF_DS detection described above fails, the first device sends a second error report to the second device, and the second error report is used to initiate link retraining; thus, when the second device receives the second error report, the first device and the second device can initiate link retraining for all receive channels of the second device.

[0164] In an embodiment of the present application, the first device and the second device can dynamically switch the channel direction of at least one first channel through channel direction adjustment messages and response messages. For example, at least one transmit channel of the first device can be adjusted to a receive channel. In this way, when the first device and the second device are in an asymmetric service transmission scenario, the channel direction of some channels can be switched to meet the transmission of asymmetric services, thereby improving the utilization of the channel bandwidth. In addition, during the process of switching the channel direction, if an abnormal situation occurs, the first device and the second device can also handle the abnormal situation through some processing mechanisms to improve the robustness of the channel direction switching process.

[0165] In a possible embodiment of the present application, after link training is completed, if the local sending link bandwidth is in excess but the receiving link bandwidth is insufficient, and the TX channel supports dynamic switching of channel direction, the upper layer can control the channel direction of the switching part TX to compensate for the bandwidth of the receiving link.

[0166] The process of dynamically switching channel direction is shown in Figure 9:

[0167] 1. Device port A sends an LDAM to device B via the high-speed link, informing the peer device B of the channel number to which it needs to dynamically switch.

[0168] a) Note: The channel that needs to be dynamically switched in the LDAW must be the TX channel of device A.

[0169] 2. After receiving the LDAM, the RX of device port B sends back the ACK / Nack corresponding to the LDAM.

[0170] If the port corresponding to device B supports dynamic channel direction switching, device B will feedback NACK, otherwise device B should feedback ACK.

[0171] If device B returns a NACK response message, the process ends. Device A and device B send and receive services based on the original channel status.

[0172] 3. After receiving the ACK from the corresponding LDAM, device A's channel to be shut down sends an LLCF_EI and enters a low-power state. All remaining high-speed TX lanes simultaneously send an LLCF_PAD (the length of the PAD sent by all TX lanes is cf_pad_length), facilitating smooth switching of local and peer data during multi-lane switching.

[0173] Note: Before device A receives the ACK from LDAM, device A still sends normal service flows through the port.

[0174] After receiving LLCF_EI on the channel to be switched, the following process is executed:

[0175] Waiting for tDirChange time to avoid double driving of the high-speed channel line and ensure the switching time at both ends;

[0176] The RX channel to be switched switches from RX mode to TX mode, and then continuously sends LLCF_TS2 (Note: The wake-up channel in this example supports fast link establishment. If this channel does not support fast link establishment, you need to send LLCF_TS0 here, and then wait for the channel clock lock handshake to complete before sending LLCF_TS1 and LLCF_TS2). At the same time, device B also needs to send TSM to indicate that the corresponding channel has started initial training. Then wait for the other end device A to feedback LLFM (or CLFM, EQFM).

[0177] 4. Device A port sends one LLCF_DS to all remaining TX Lanes in high-speed state simultaneously.

[0178] 5. The TX port of device A sends normal services at the new link width.

[0179] 6. After device A detects that all channels switched from TX to RX have completed training, it sends LLFM (Note: the wake-up channel in this example supports fast link establishment. If this channel does not support fast link establishment, CLFM and EQFM need to be sent here for clock lock handshake) to indicate that all newly added channels have successfully locked.

[0180] If the LLFM indicates that any newly added channels have failed to lock, the process ends. Device A and Device B transmit and receive services based on the number of channels currently transmitting (i.e., the number of TX channels of Device A has been reduced).

[0181] 7. After device B receives the LLFM indicating that all newly added channels have successfully locked, device B sends several LLCF_PADs on the newly added TX channel to align the position of the CF sent by the newly added channel with the original channel in the high-speed state.

[0182] 8. Device B then sends one LLCF_PAD (PAD length is cf_pad_length) to all remaining TX Lanes in high-speed state simultaneously, facilitating smooth switching of local and peer data during multi-Lane switching.

[0183] a) Note that the RX channel of device B needs to reset the scrambling seed after receiving LLCF_PAD.

[0184] 9. Device B sends one LLCF_DS to all TX Lanes in high-speed state simultaneously.

[0185] 10. The port of device B sends normal services at the new link width.

[0186] The lane direction adjust message (LDAM) is a set of lane direction adjustment request parameters, including the specific lane number for which the lane direction adjustment is required.

[0187] LDAM is used when a link is transmitting services. It is initiated when link bandwidth requirements need to be adjusted and link width adjustment cannot meet the requirements. It negotiates with the peer end to adjust the direction of a specific channel between ports.

[0188] The LDAM needs to respond. If the receiving end agrees to the channel direction adjustment request, it must respond with an Ack. Otherwise, it must respond with a Nack. For more information about responses, see Response Information.

[0189] Each channel message parameter is independent. If a channel is not enabled or does not exist, the corresponding message parameter is fixed to 0.

[0190] LDAM supports both ML and SL transmission. The LLMMP format for ML transmission is shown in Table 4. The LLSMP format for SL transmission is shown in Table 5.

[0191] The clock lock feedback message (CLFM) is a combination of a clock lock result flag and a Swing update request message, containing the clock lock results and Swing update requests for all receive channels on the current port. CLFM_ACK is the CLFM response message, using the same management message type as CLFM.

[0192] CLFM is used during the clock lock phase. It provides feedback on the current clock lock result from the receiving end and initiates a Swing parameter update request for channels that failed clock lock. Each channel can independently use a different CLFM to report clock lock information, or they can combine and use the same CLFM to report clock lock information.

[0193] CLFM requires a response. The transmitter switches the code pattern for the clock-locked channel and completes the Swing update for the channel that needs to adjust the Swing parameters. The channel that completes the above operations responds with Ack, otherwise it responds with Nack. The CLFM_ACK usage rules are similar to CLFM. Each channel responds independently and can use different CLFM_ACKs for response, or they can be combined and responded with the same CLFM_ACK. For example:

[0194] (1) CLFM0 feeds back multiple channel clock lock information, and CLFM_ACK0 and CLFM_ACK1 can be used to respond to part or all of the channel clock lock information fed back by CLFM0.

[0195] (2) CLFM0 feeds back part of the channel clock lock information, and CLFM1 feeds back part of the channel clock lock information. CLFM_ACK0 can be used to simultaneously respond to part or all of the channel clock lock information fed back by CLFM0 and CLFM1.

[0196] Each channel message parameter is independent. If a channel is not enabled or does not exist, the corresponding message parameter is fixed to 0.

[0197] CLFM supports transmission via ML and SL. CLFM_ACK supports transmission via ML and SL.

[0198] The above-mentioned Equilibrium Feedback Message (EQFM) is a collection of the equalization result flag and the FFE parameter update request message, which contains the equalization results and FFE parameter update requests of all receiving channels of the current port. EQFM_Ack is the EQFM response message and uses the same management message type as EQFM.

[0199] EQFM is used during the equalization phase. It provides feedback on the current equalization result to the receiver and initiates FFE parameter update requests for channels that failed equalization. Each channel can use different EQFM feedback equalization information independently or combine them into a single EQFM feedback equalization message.

[0200] EQFM requires a response. The transmitter switches the code pattern for channels that have successfully been equalized and completes the FFE update for channels that require FFE parameter adjustment. Channels that have completed these operations respond with an Ack; otherwise, they respond with a Nack. For the usage rules of EQFM_Ack, refer to CLFM_ACK. Each channel can respond independently or in a combined response.

[0201] Each channel message parameter is independent. If a channel is not enabled or does not exist, the corresponding message parameter is fixed to 0.

[0202] EQFM supports transmission via ML and SL. EQFM_Ack supports transmission via ML and SL.

[0203] The lane lock feedback message (LLFM) is a collection of lane lock result flags, and includes the lane lock results of all receiving channels of the current port.

[0204] LLFM is used during the channel lock phase. It allows the receiver to report the channel lock results for all current receiving channels. All channels must report their channel lock results simultaneously and use the same LLFM. The channel that confirms the channel lock result first must wait for other channels to confirm their channel lock results (i.e., whether the channel lock succeeds or fails) before reporting back to the LLFM.

[0205] LLFM does not need to respond, and the transmitter switches the code type for the channel that is successfully locked.

[0206] Each channel message parameter is independent. If a channel is not enabled or does not exist, the corresponding message parameter is fixed to 0.

[0207] LLFM supports transmission via ML and SL.

[0208] The link training start message (TSM) is a collection of link training start flags, including the training start flags of all transmission channels of the current port.

[0209] TSM is used to initiate link training. Application scenarios include: sending a TSM to initiate link training after port initialization in the initial link establishment scenario; sending a TSM to initiate link retraining in the event of an abnormal retraining scenario; and sending a TSM to initiate link recovery when exiting LP3 low-power scenarios. TSM is sent when initiating training or recovery; upon receiving a TSM, the receiver initiates training on the channel specified by the TSM.

[0210] Each channel message parameter is independent. If a channel is not enabled or does not exist, the corresponding message parameter is fixed to 0.

[0211] The TSM does not need to respond, but requires the other end to feed back a clock lock feedback message in tTSMResponse.

[0212] TSM supports transmission via ML and SL.

[0213] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the interaction between the first device and the second device. It is understandable that, in order to realize the above functions, the first device and the second device include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm 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. 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.

[0214] In the embodiment of the present application, the functional modules of the first device and the second device can be divided according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module according to each function.

[0215] In the case of adopting an integrated unit, Figure 10 shows a possible structural diagram of the device for switching channel direction involved in the above embodiment. The device can be a first device, or a chip applied to the first device, and the device includes: a sending unit 501, a receiving unit 502 and a processing unit 503. Among them, the sending unit 501 can be used to support the device to perform one or more steps of S401a, S403a, S408a or S409a in the above method embodiment; the receiving unit 502 can be used to support the device to perform the step of receiving the first LLCF_PAD in S402b and S405b, one or more steps of S406b or S407b in the above method embodiment; the processing unit 503 can be used to support the device to perform the step of determining at least one first channel in the above method embodiment, the step of aligning multiple receiving channels in S404a and S405b, and / or other technical processes described herein. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and the embodiments of this application will not be repeated here.

[0216] Based on the hardware implementation, the processing unit 503 in this application can be the processor of the device, the sending unit 501 can be the transmitter of the device (which can be called a sending port), and the receiving unit 502 can be the receiver of the device (which can be called a receiving port). Optionally, the transmitter and receiver can generally be integrated together to form a transceiver, and the specific transceiver can also be called a communication interface.

[0217] As shown in Figure 11, a schematic diagram of the structure of a device for switching channel direction provided in an embodiment of the present application is provided. The device can be a first device, or a chip applied to a first device, and the device includes: a processor 511, a transmitter 512, and a receiver 513. The processor 511 is used to support the device in executing the step of determining at least one first channel in the above-mentioned method embodiment, the step of aligning multiple receiving channels in S405b, and / or other technical processes described herein. In addition, the transmitter 512 and the receiver 513 can be used to support the device in communicating, for example, supporting the device in communicating with a second device.

[0218] It can be understood that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and the embodiment of the present application will not be repeated here.

[0219] In the case of adopting an integrated unit, Figure 12 shows a possible structural diagram of the device for switching channel direction involved in the above embodiment. The device can be a second device, or a chip applied to a second device, and the device includes: a receiving unit 601, a sending unit 602 and a processing unit 603. Among them, the receiving unit 601 can be used to support the device to perform one or more steps S401b, S403b, S405a, S408b or S409a of the above method embodiment; the sending unit 602 can be used to support the device to perform one or more steps S402a, S406a or S407a in the above method embodiment; the processing unit 603 can be used to support the device to perform S404b in the above method embodiment, and / or other technical processes described herein. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and the embodiments of this application will not be repeated here.

[0220] Based on the hardware implementation, the processing unit 603 in this application can be the processor of the device, the receiving unit 601 can be the receiver of the device, and the sending unit 602 can be the transmitter of the device. Optionally, the receiver and transmitter can generally be integrated together to form a transceiver, and the specific transceiver can also be called a communication interface.

[0221] Figure 13 shows a schematic diagram of the structure of an apparatus for switching channel direction provided in an embodiment of the present application. The apparatus can be a second device, or a chip used in a second device, and includes a processor 611, a transmitter 612, and a receiver 613. The processor 611 is configured to support the apparatus in executing step S404b of the above-described method embodiment and / or other technical processes described herein. In addition, the transmitter 612 and the receiver 613 are configured to support the apparatus in communicating, for example, with a first device.

[0222] It can be understood that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and the embodiment of the present application will not be repeated here.

[0223] In another embodiment of the present application, a data transmission system is provided, which includes a first device and a second device; the first device can be the apparatus provided in Figure 10 or Figure 11, specifically used to execute the steps of the first device in the method embodiment provided above; the second device can be the apparatus provided in Figure 12 or Figure 13, specifically used to execute the steps of the second device in the method embodiment provided above.

[0224] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another device, or ignoring or not implementing certain features.

[0225] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0226] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. The readable storage medium may include: a USB flash drive, a mobile hard drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc., which can store program code. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product.

[0227] In another embodiment of the present application, a readable storage medium is also provided, which stores computer execution instructions. When a device (which can be a single-chip microcomputer, chip, etc.) or a processor executes the steps of the first device in the above method embodiment.

[0228] In another embodiment of the present application, a readable storage medium is also provided, which stores computer execution instructions. When a device (which can be a single-chip microcomputer, chip, etc.) or a processor executes the steps of the second device in the above method embodiment.

[0229] In another embodiment of the present application, a computer program product is also provided, which includes computer instructions stored in a readable storage medium; at least one processor of the device can read the computer instructions from the readable storage medium, and at least one processor executes the computer instructions so that the device performs the steps of the first device in the above method embodiment.

[0230] In another embodiment of the present application, a computer program product is also provided, which includes computer instructions stored in a readable storage medium; at least one processor of the device can read the computer instructions from the readable storage medium, and at least one processor executes the computer instructions so that the device performs the steps of the second device in the above method embodiment.

[0231] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for switching the channel direction, characterized in that, The method includes: The first device sends a channel direction adjustment message to the second device, where the channel direction adjustment message is used to indicate the channel numbers of at least one first channel that needs to be switched, and the at least one first channel is a transmission channel of the first device; The first device receives an acknowledgment message from the second device, where the acknowledgment message is used to confirm that the second device supports switching the channel direction of the at least one first channel.

2. The method according to claim 1, characterized in that, The channel direction adjustment message includes a plurality of direction adjustment request parameters corresponding to a plurality of transmission channels respectively. The at least one direction adjustment request parameter corresponding to the at least one first channel is used to indicate a channel direction adjustment request, and the at least one direction adjustment request parameter corresponding to at least one second channel is used to indicate that the channel direction is not adjusted. The plurality of transmission channels include the at least one first channel and the at least one second channel.

3. The method according to claim 1 or 2, characterized in that The method further includes: The first device sends an electrical idle logical link control frame LLCF_EI on the at least one first channel; After a first preset duration, the first device switches the at least one first channel to a receiving channel and performs channel training on the at least one first channel.

4. The method according to any one of claims 1 to 3, characterized in that The method further includes: The first device sends one or more of a channel lock feedback message LLFM, a clock lock feedback message CLFM, and an equalization feedback message EQFM to the second device.

5. The method according to any one of claims 1 to 4, characterized in that The method further includes: The first device receives at least one first padding logical link control frame LLCF_PAD on the at least one first channel and aligns a plurality of receiving channels according to the at least one first LLCF_PAD. The plurality of receiving channels include the at least one first channel and at least one third channel, and the at least one third channel is a receiving channel of the first device.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: The first device receives a second LLCF_PAD on a plurality of receiving channels, where the lengths of the second LLCF_PADs of different channels in the plurality of receiving channels are the same. The plurality of receiving channels include the at least one first channel and at least one third channel.

7. The method according to any one of claims 1-6, characterized in that The method further includes: The first device receives a first data start logical link control frame LLCF_DS on a plurality of receiving channels. The plurality of receiving channels include the at least one first channel and at least one third channel.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The first device simultaneously sends a third LLCF_PAD on at least one second channel, where the lengths of the third LLCF_PADs of different channels in the at least one second channel are the same.

9. The method according to claim 8, wherein The method further includes: The first device simultaneously sends a second LLCF_DS on the at least one second transmission channel.

10. The method according to claim 1, wherein The method further includes: If the acknowledgment message is lost or abnormal, the first device retransmits the channel direction adjustment message.

11. The method according to claim 10, wherein The method further includes: When the number of retransmissions of the channel direction adjustment message is greater than a preset threshold, the first device sends a first error report, where the first error report is used to initiate link retraining.

12. The method according to claim 3 or 7, characterized in that, The method further includes: The second device receives a second error report, which is triggered by the loss or abnormality of LLCF_EI or the failure of LLCF_DS detection, and the second error report is used to initiate link retraining or link recovery.

13. The method according to any one of claims 1 to 12, characterized in that, The first device sends a channel direction adjustment message to the second device, including: The first device sends the channel direction adjustment message to the second device through the primary link.

14. The method according to any one of claims 1-12, characterized in that, The first device sends a channel direction adjustment message to the second device, including: The first device sends the channel direction adjustment message to the second device through the auxiliary link.

15. A method for switching the channel direction, characterized in that, The method includes: The second device receives a channel direction adjustment message from the first device, and the channel direction adjustment message is used to indicate the channel numbers of at least one first channel that needs to be switched, and the at least one first channel is the receiving channel of the second device; The second device sends a response message to the first device, and the response message is used to confirm that the second device supports switching the channel directions of the at least one first channel.

16. The method according to claim 15, wherein The channel direction adjustment message includes a plurality of direction adjustment request parameters corresponding to the plurality of receiving channels respectively. The at least one direction adjustment request parameter corresponding to the at least one first channel is used to indicate a channel direction adjustment request, and the at least one direction adjustment request parameter corresponding to at least one second channel is used to indicate that the channel direction is not adjusted. The plurality of receiving channels include the at least one first channel and the at least one second channel.

17. The method according to claim 15 or 16, characterized in that, The method further includes: The second device receives an electrical idle logical link control frame LLCF_EI on the at least one first channel; After a second preset time period, the second device switches the at least one first channel to a transmitting channel and performs channel training on the at least one first channel.

18. The method according to any one of claims 15-17, characterized in that The method further includes: The second device receives one or more of the channel lock feedback message LLFM, clock lock feedback message CLFM, and equalization feedback message EQFM from the first device.

19. The method according to any one of claims 15 - 18, characterized in that, The method further includes:

20. The method according to any one of claims 15 - 19, characterized in that, The second device sends at least one first padding logical link control frame LLCF_PAD on the at least one first channel, and the at least one LLCF_PAD is used to align a plurality of transmitting channels, and the plurality of transmitting channels include the at least one first channel and at least one third channel. The method further includes:

21. The method according to any one of claims 15-20, characterized in that, The second device simultaneously sends second LLCF_PAD on a plurality of transmitting channels, and the lengths of the second LLCF_PAD on different channels in the plurality of transmitting channels are the same. The plurality of transmitting channels include the at least one first channel and at least one third channel. The method further includes:

22. The method according to any one of claims 15 - 21, characterized in that, The second device simultaneously sends a first data start logical link control frame LLCF_DS on a plurality of transmitting channels, and the plurality of transmitting channels include the at least one first channel and at least one third channel. The method further includes:

23. The method according to claim 22, wherein The second device receives third LLCF_PAD on at least one second channel, and the lengths of the third LLCF_PAD on different channels in the at least one second channel are the same. The method further includes: The second device receives a second LLCF_DS on the at least one second channel.

24. The method according to claim 15, wherein The method further includes: The second device receives the channel direction adjustment message retransmitted by the first device, and the retransmission of the channel direction adjustment message is triggered by the loss or abnormality of the acknowledgment message.

25. The method according to claim 24, wherein The method further includes: When the number of retransmissions of the channel direction adjustment message is greater than a preset threshold, the second device receives a first error report from the first device, and the first error report is used to initiate link retraining.

26. The method according to claim 17 or 21, characterized in that, The method further includes: If LLCF_EI is lost or abnormal, or the detection of LLCF_DS fails, the second device sends a second error report, and the second error report is used to initiate link retraining or link recovery.

27. The method according to any one of claims 15-26, characterized in that, The second device receiving the channel direction adjustment message from the first device includes: The second device receives the channel direction adjustment message from the first device through the primary link.

28. The method according to any one of claims 15-27, characterized in that, The second device receiving the channel direction adjustment message from the first device includes: The second device receives the channel direction adjustment message from the first device through the secondary link.

29. A device for switching the channel direction, characterized in that, The apparatus includes: A sending unit, configured to send a channel direction adjustment message to a second device, where the channel direction adjustment message is used to indicate the channel numbers of at least one first channel that needs to be switched, and the at least one first channel is a transmission channel of the apparatus; A receiving unit, configured to receive an acknowledgment message from the second device, where the acknowledgment message is used to confirm that the second device supports switching the Channel direction of at least one first channel.

30. The device according to claim 29, wherein, The channel direction adjustment message includes a plurality of direction adjustment request parameters corresponding to a plurality of transmission channels respectively. At least one direction adjustment request parameter corresponding to the at least one first channel is used to indicate a channel direction adjustment request, and at least one direction adjustment request parameter corresponding to at least one second channel is used to indicate that the channel direction is not adjusted. The plurality of transmission channels include the at least one first channel and the at least one second channel.

31. The device according to claim 29 or 30, characterized in that, The apparatus further includes a processing unit; The sending unit is further configured to send an electrical idle logical link control frame LLCF_EI on the at least one first channel; The processing unit is configured to, after a first preset duration, switch the at least one first channel to a receiving channel and perform channel training on the at least one first channel.

32. The apparatus according to any one of claims 29-31, wherein The sending unit is further configured to send one or more of a channel lock feedback message LLFM, a clock lock feedback message CLFM, and an equalization feedback message EQFM to the second device.

33. The device according to any one of claims 29 to 32, characterized in that, The apparatus further includes a processing unit; The receiving unit is further configured to receive at least one first padding logical link control frame LLCF_PAD on the at least one first channel; The processing unit is further configured to align a plurality of receiving channels according to the at least one first LLCF_PAD, where the plurality of receiving channels include the at least one first channel and at least one third channel, and the at least one third channel is a receiving channel of the apparatus.

34. The device according to any one of claims 29-33, wherein the receiving unit is further configured to receive a second LLCF_PAD on a plurality of receiving channels, the lengths of the second LLCF_PADs on different channels in the plurality of receiving channels being the same, and the plurality of receiving channels including the at least one first channel and at least one third channel.

35. The device according to any one of claims 29-34, wherein the receiving unit is further configured to receive a first data start logic layer control frame LLCF_DS on a plurality of receiving channels, the plurality of receiving channels including the at least one first channel and at least one third channel.

36. The device according to any one of claims 29-35, wherein the sending unit is further configured to simultaneously send a third LLCF_PAD on at least one second channel, the lengths of the third LLCF_PADs on different channels in the at least one second channel being the same.

37. The device according to claim 36, wherein the sending unit is further configured to simultaneously send a second LLCF_DS on the at least one second transmitting channel.

38. The device according to claim 29, wherein the sending unit is further configured to retransmit the channel direction adjustment message if the response message is lost or abnormal.

39. The device according to claim 38, wherein the sending unit is further configured to send a first error report when the number of retransmissions of the channel direction adjustment message is greater than a preset threshold, the first error report being used to initiate link retraining.

40. The device according to claim 31 or 35, wherein the receiving unit is further configured to receive a second error report triggered by the loss or abnormality of LLCF_EI or the failure of LLCF_DS detection, the second error report being used to initiate link retraining or link recovery.

41. The device according to any one of claims 29-40, wherein the sending unit is further configured to send the channel direction adjustment message to the second device through the primary link.

42. The device according to any one of claims 29-40, wherein the sending unit is further configured to send the channel direction adjustment message to the second device through the secondary link.

43. A device for switching the channel direction, characterized in that, The device comprises: a receiving unit, configured to receive a channel direction adjustment message from a first device, the channel direction adjustment message being used to indicate the channel numbers of at least one first channel to be switched, the at least one first channel being a receiving channel of the device; a sending unit, configured to send a response message to the first device, the response message being used to confirm that the second device supports switching the channel direction of the at least one first channel.

44. The device according to claim 43, wherein The channel direction adjustment message includes a plurality of direction adjustment request parameters corresponding to the plurality of receiving channels respectively. The at least one direction adjustment request parameter corresponding to the at least one first channel is used to indicate a channel direction adjustment request, and the at least one direction adjustment request parameter corresponding to the at least one second channel is used to indicate that the channel direction is not adjusted. The plurality of receiving channels include the at least one first channel and the at least one second channel.

45. The device according to claim 43 or 44, characterized in that, The device further includes a processing unit; The receiving unit is further configured to receive an electrical idle logical link control frame LLCF_EI on the at least one first channel; The processing unit is configured to, after a second preset duration, switch the at least one first channel to a transmitting channel and perform channel training on the at least one first channel.

46. The device according to any one of claims 43-45, wherein The receiving unit is further configured to receive one or more of a channel lock feedback message LLFM, a clock lock feedback message CLFM, and an equalization feedback message EQFM from the first device.

47. The device according to any one of claims 43-46, wherein The transmitting unit is further configured to transmit at least one first padding logical link control frame LLCF_PAD on the at least one first channel. The at least one LLCF_PAD is used to align a plurality of transmitting channels, and the plurality of transmitting channels include the at least one first channel and at least one third channel.

48. The device according to any one of claims 43-47, wherein The transmitting unit is further configured to simultaneously transmit a second LLCF_PAD on a plurality of transmitting channels. The lengths of the second LLCF_PADs of different channels in the plurality of transmitting channels are the same. The plurality of transmitting channels include the at least one first channel and at least one third channel.

49. The device according to any one of claims 43-48, wherein The transmitting unit is further configured to simultaneously transmit a first data start logical link control frame LLCF_DS on a plurality of transmitting channels. The plurality of transmitting channels include the at least one first channel and at least one third channel.

50. The device according to any one of claims 43-49, wherein The receiving unit is further configured to receive a third LLCF_PAD on at least one second channel. The lengths of the third LLCF_PADs of different channels in the at least one second channel are the same.

51. The device according to claim 50, wherein The receiving unit is further configured to receive a second LLCF_DS on the at least one second channel.

52. The device according to claim 43, wherein The receiving unit is further configured to receive the channel direction adjustment message retransmitted by the first device. The retransmission of the channel direction adjustment message is triggered by the loss or abnormality of the response message.

53. The device according to claim 52, wherein The receiving unit is further configured to receive a first error report from the first device when the number of retransmissions of the channel direction adjustment message is greater than a preset threshold, where the first error report is used to initiate link retraining.

54. The apparatus according to claim 45 or 49, wherein: The sending unit is further configured to send a second error report if LLCF_EI is lost or abnormal, or if LLCF_DS detection fails, where the second error report is used to initiate link retraining or link recovery.

55. The apparatus according to any one of claims 43-54, wherein: The receiving unit is further configured to receive the channel direction adjustment message from the first device through the primary link.

56. The apparatus according to any one of claims 43-54, wherein: The receiving unit is further configured to receive the channel direction adjustment message from the first device through the secondary link.

57. A chip, characterized in that, The chip includes a processing circuit and a transmitter, where the processing circuit and the transmitter are configured to support the chip to execute the method according to any one of claims 1-14.

58. A chip, characterized in that, The chip includes a processing circuit and a receiver, where the processing circuit and the receiver are configured to support the chip to execute the method according to any one of claims 15-28.

59. A data transmission system, characterized in that, The data transmission system includes a first device and a second device, where the first device includes the apparatus according to any one of claims 29-42 or the chip according to claim 57, and the second device includes the apparatus according to any one of claims 43-56 or the chip according to claim 58.

60. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when run on a device, cause the device to execute the method according to any one of claims 1-14.

61. A readable storage medium, characterized in that, The readable storage medium stores instructions that, when run on a device, cause the device to execute the method according to any one of claims 15-28.

Citation Information

Patent Citations

  • Systems, methods, and devices for dynamic high speed lane direction switching for asymmetrical interfaces

    CN110633241A

  • Configuration method of data transmission bandwidth and related equipment

    CN114978916A

  • Switchable channel direction between host system and memory system

    CN115248660A

  • Method and protocol for high-speed data channel detection control

    US20140101357A1