Link training method and apparatus, electronic device and communication system

By using the high transmission rate of the main link to send training messages in the link training between devices, the problem of long link training time in the prior art is solved, and more efficient signal transmission and lower delay are achieved.

WO2025113516A1PCT designated stage expired Publication Date: 2025-06-05HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/135044
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-01
Filing Date
2024-11-27
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

In the prior art, more time is required between devices during link training, resulting in a higher signal transmission delay.

Method used

The training message is sent through the main link, and the high transmission rate of the main link is used to increase the transmission rate of the training message, thereby reducing the time required for link training and reducing signal transmission delay.

Benefits of technology

It improves link training efficiency, reduces link training time, reduces signal transmission delay, and enhances the reliability of training channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024135044_05062025_PF_FP_ABST
    Figure CN2024135044_05062025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of communications, and disclose a link training method and apparatus, an electronic device and a communication system, solving the problem in the prior art of high signal transmission delay due to more time required for link training between devices. The specific solution is: provided is a link training method, applied to a first device, the first device communicates with a second device by means of a plurality of primary links and auxiliary links, and the transmission rate of the primary links is greater than the transmission rate of the auxiliary links. The method comprises: the first device first determines the state of the primary links, and then, if the primary links are in a service transmission state, the first device sends a training message by means of the primary links.
Need to check novelty before this filing date? Find Prior Art

Description

Link training method, device, electronic equipment and communication system

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on December 1, 2023, with application number 202311648888.5 and application name “A link training method, device, electronic device and communication system”, 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 link training method, device, electronic equipment and communication system. Background Art

[0003] To meet the needs of transmitting various signals between devices, the industry has defined multiple types of high-speed signal transmission interfaces. The high-speed signal transmission interfaces of each device can be connected by cables to achieve signal transmission between devices. The cable includes a high-speed transmission link and a low-speed transmission link. The high-speed transmission link and the low-speed transmission link each include multiple channels. The channels in the high-speed transmission link are used to transmit business information, and the channels in the low-speed transmission link are used to transmit control information. Before transmitting signals between devices, the devices can use different numbers of channels to establish links (referred to as link establishment) based on the application form and business bandwidth to obtain a stable data transmission channel. This process is also called link training.

[0004] However, in the prior art, link training between devices requires a long time, which results in a high signal transmission delay. Summary of the Invention

[0005] The embodiments of the present application provide a link training method, apparatus, electronic device, and communication system, which solve the problem in the prior art that link training between devices requires a long time, resulting in high signal transmission delay.

[0006] To achieve the above objectives, the present invention adopts the following technical solutions:

[0007] In a first aspect, embodiments of the present application provide a link training method, applied to a first device, wherein the first device communicates with a second device via a primary link and an auxiliary link, wherein the transmission rate of the primary link is greater than the transmission rate of the auxiliary link. The method includes: first, the first device determines a status of the primary link. Then, if the primary link is in a service transmission state, the first device sends a training message via the primary link.

[0008] Based on this solution, during link training, the first device first determines the status of the primary link. Then, if the primary link is in a service transmission state, the first device sends a training message via the primary link. Because the transmission rate of the primary link is greater than that of the auxiliary link, the transmission rate of training messages can be increased compared to sending auxiliary channel packets over the lower-rate auxiliary channel when the first and second devices are interconnected via DP. This reduces the time required for link training and reduces signal transmission latency.

[0009] With reference to the first aspect, in a possible implementation, if the primary link is not in a service transmission state, the first device sends a training message through the auxiliary link.

[0010] Based on this solution, if the main link is not in a service transmission state, the first device sends a training message through the auxiliary link. Since the reliability of the auxiliary link when transmitting data is higher than the reliability of the main link when transmitting data, the first device sends the training message through the auxiliary link, which can improve the reliability of link training for the training channel.

[0011] In combination with the first aspect, in one possible implementation, the main link includes multiple main link channels. If at least one main link channel among the multiple main link channels is in a service transmission state, the main link is in a service transmission state, or is called a high-speed state.

[0012] Optionally, the status of the main link channel also includes a disable state, a channel initialization (INIT) state, a high-speed channel initial training (training) state, a high-speed channel recovery (recovery) state and a high-speed channel low power (LP) state, which is not limited in the embodiments of the present application.

[0013] With reference to the first aspect, in a possible implementation, the multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

[0014] In combination with the first aspect, in one possible implementation, the method further includes: the first device obtains the historical cumulative usage counts of multiple main link channels and the number of at least one channel to be trained, and selects a main link channel with a smaller historical cumulative usage count as at least one channel to be trained based on the historical cumulative usage counts and the number of at least one channel to be trained.

[0015] Based on this solution, a main link channel with a relatively small number of historical cumulative uses is selected as at least one channel to be trained. Compared with the existing technology, the problem of channel aging is taken into consideration. By training the channel to be trained with a longer remaining life to transmit data, the reliability of signal transmission can be improved.

[0016] In combination with the first aspect, in a possible implementation manner, the method further includes: the first device obtaining the number of at least one channel to be trained according to the service bandwidth requirement information.

[0017] With reference to the first aspect, in a possible implementation, a process of performing link training on at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.

[0018] With reference to the first aspect, in one possible implementation, the training message includes at least one of a training initiation message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message, or a channel alignment feedback message. The training initiation message is used to instruct the trained channel to initiate link training; the clock lock feedback message is used to indicate a clock lock result; the equalization feedback message is used to indicate an equalization result of the trained channel; the channel lock feedback message is used to indicate a channel lock result of the trained channel; and the channel alignment feedback message is used to indicate a channel alignment result of the trained channel.

[0019] In combination with the first aspect, in a possible implementation, each channel in the to-be-trained channel independently performs channel clock recovery and locking, channel equalization, and channel locking.

[0020] In a second aspect of an embodiment of the present application, a link training method is provided, which is applied to a second device. The second device communicates with the first device through a main link and an auxiliary link. The transmission rate of the main link is greater than the transmission rate of the auxiliary link. The method includes: if the main link is in a service transmission state, the second device receives a training message through the main link.

[0021] In combination with the second aspect, in a possible implementation, the method further includes: if the primary link is not in a service transmission state, the second device receives a training message through the auxiliary link.

[0022] In combination with the second aspect, in a possible implementation, the main link includes multiple main link channels, and if at least one main link channel among the multiple main link channels is in a service transmission state, the main link is in a service transmission state.

[0023] With reference to the second aspect, in a possible implementation, the multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

[0024] In combination with the second aspect, in a possible implementation, the at least one channel to be trained is a main link channel with a smaller historical cumulative usage count selected by the first device based on the historical cumulative usage counts of the multiple main link channels and the number of the at least one channel to be trained.

[0025] In conjunction with the second aspect, in a possible implementation manner, the number of the at least one to-be-trained channel is acquired by the first device according to service bandwidth requirement information.

[0026] In conjunction with the second aspect, in a possible implementation, a process of performing link training on at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.

[0027] In conjunction with the second aspect, in one possible implementation, the training message includes at least one of a training initiation message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message, or a channel alignment feedback message. The training initiation message is used to instruct the trained channel to initiate link training, the clock lock feedback message is used to indicate a clock lock result, the equalization feedback message is used to indicate an equalization result of the trained channel, the channel lock feedback message is used to indicate a channel lock result of the trained channel, and the channel alignment feedback message is used to indicate a channel alignment result of the trained channel.

[0028] In conjunction with the second aspect, in a possible implementation, each channel in the to-be-trained channel independently performs channel clock recovery and locking, channel equalization, and channel locking.

[0029] In a third aspect, embodiments of the present application provide a link training apparatus that communicates with a second device via a primary link and an auxiliary link, wherein the transmission rate of the primary link is greater than the transmission rate of the auxiliary link. The apparatus includes a processing module and a transceiver module. The processing module is configured to determine the status of the primary link. The transceiver module is configured to send a training message via the primary link if the primary link is in a service transmission state.

[0030] In combination with the third aspect, in a possible implementation, the transceiver module is further configured to send a training message through the auxiliary link if the primary link is not in a service transmission state.

[0031] In combination with the third aspect, in a possible implementation, the main link includes multiple main link channels, and if at least one main link channel among the multiple main link channels is in a service transmission state, the main link is in a service transmission state.

[0032] In conjunction with the third aspect, in a possible implementation, the multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

[0033] In combination with the third aspect, in one possible implementation, the processing module is further used to obtain the historical cumulative usage times of multiple main link channels and the number of at least one channel to be trained, and select a main link channel with a smaller historical cumulative usage time as at least one channel to be trained based on the historical cumulative usage times and the number of at least one channel to be trained.

[0034] In conjunction with the third aspect, in a possible implementation manner, the processing module is specifically configured to obtain the number of at least one to-be-trained channel according to service bandwidth requirement information.

[0035] In conjunction with the third aspect, in a possible implementation, the process of performing link training on at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.

[0036] In conjunction with the third aspect, in one possible implementation, the training message includes at least one of a training initiation message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message, or a channel alignment feedback message. The training initiation message is used to instruct the trained channel to initiate link training, the clock lock feedback message is used to indicate a clock lock result, the equalization feedback message is used to indicate an equalization result of the trained channel, the channel lock feedback message is used to indicate a channel lock result of the trained channel, and the channel alignment feedback message is used to indicate a channel alignment result of the trained channel.

[0037] In conjunction with the third aspect, in a possible implementation, each channel in the to-be-trained channel independently performs channel clock recovery and locking, channel equalization, and channel locking.

[0038] In a fourth aspect of an embodiment of the present application, a link training apparatus is provided, wherein the apparatus communicates with a first device via a primary link and an auxiliary link, wherein the transmission rate of the primary link is greater than the transmission rate of the auxiliary link, and the apparatus includes a transceiver module. The transceiver module is configured to receive a training message via the primary link when the primary link is in a service transmission state.

[0039] In combination with the fourth aspect, in a possible implementation, the transceiver module is further configured to receive a training message through the auxiliary link if the primary link is not in a service transmission state.

[0040] In conjunction with the fourth aspect, in a possible implementation, the main link includes multiple main link channels, and if at least one main link channel among the multiple main link channels is in a service transmission state, the main link is in a service transmission state.

[0041] In conjunction with the fourth aspect, in a possible implementation, the multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

[0042] In combination with the fourth aspect, in a possible implementation, the at least one channel to be trained is a main link channel with a smaller historical cumulative usage count selected by the first device based on the historical cumulative usage counts of the multiple main link channels and the number of the at least one channel to be trained.

[0043] In conjunction with the fourth aspect, in a possible implementation manner, the number of the at least one to-be-trained channel is acquired by the first device according to service bandwidth requirement information.

[0044] In conjunction with the fourth aspect, in a possible implementation, a process of performing link training on at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.

[0045] In conjunction with the fourth aspect, in one possible implementation, the training message includes at least one of a training initiation message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message, or a channel alignment feedback message. The training initiation message is used to instruct the trained channel to initiate link training, the clock lock feedback message is used to indicate a clock lock result, the equalization feedback message is used to indicate an equalization result of the trained channel, the channel lock feedback message is used to indicate a channel lock result of the trained channel, and the channel alignment feedback message is used to indicate a channel alignment result of the trained channel.

[0046] In conjunction with the fourth aspect, in a possible implementation, each channel in the to-be-trained channel independently performs channel clock recovery and locking, channel equalization, and channel locking.

[0047] In a fifth aspect of an embodiment of the present application, a chip module is provided, which includes: a chip and a packaging substrate, the chip being fixed to the packaging substrate, the chip including a link training device, the link training device being the link training device described in the third aspect or any possible implementation of the third aspect, or the link training device being the link training device described in the fourth aspect or any possible implementation of the fourth aspect.

[0048] In a sixth aspect of an embodiment of the present application, an electronic device is provided, which includes a processor, and the processor includes a link training device. The link training device is the link training device described in the third aspect or any possible implementation of the third aspect, or the link training device is the link training device described in the fourth aspect or any possible implementation of the fourth aspect.

[0049] In a seventh aspect of an embodiment of the present application, a communication system is provided, which includes a first electronic device and a second electronic device that communicates with the first electronic device. The first electronic device and the second electronic device are electronic devices as described in the sixth aspect or any possible implementation of the sixth aspect.

[0050] In an eighth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the link training method as described in the first aspect or any possible implementation of the first aspect, or the electronic device executes the link training method as described in the second aspect or any possible implementation of the second aspect.

[0051] In a ninth aspect of an embodiment of the present application, a computer program product is provided. When at least one processor of an electronic device runs the computer program product, the electronic device executes the link training method as described in the first aspect or any possible implementation of the first aspect, or the electronic device executes the link training method as described in the second aspect or any possible implementation of the second aspect.

[0052] The descriptions of the second to ninth aspects of this application can refer to the detailed description of the first aspect; and the beneficial effects described in the second to ninth aspects can refer to the analysis of the beneficial effects of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] FIG1 is a schematic diagram of the structure of a communication system provided in an embodiment of the present application;

[0054] FIG2 is a schematic diagram of the structure of another communication system provided in an embodiment of the present application;

[0055] FIG3 is a schematic structural diagram of another communication system provided in an embodiment of the present application;

[0056] FIG4 is a flow chart of a link training method according to an embodiment of the present application;

[0057] FIG5 is a schematic structural diagram of another communication system provided in an embodiment of the present application;

[0058] FIG6 is a flow chart of a link training process according to an embodiment of the present application;

[0059] FIG7 is a flow chart of another link training method provided in an embodiment of the present application;

[0060] FIG8 is a flow chart of another link training process provided in an embodiment of the present application;

[0061] FIG9 is a flow chart of another link training process provided in an embodiment of the present application;

[0062] FIG10 is a flow chart of another link training process according to an embodiment of the present application;

[0063] FIG11 is a schematic structural diagram of a link training device provided in an embodiment of the present application;

[0064] FIG12 is a schematic structural diagram of another link training device provided in an embodiment of the present application;

[0065] FIG13 is a schematic structural diagram of a chip module provided in an embodiment of the present application;

[0066] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following sections discuss the making and use of various embodiments in detail. 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 intended merely to illustrate specific ways to implement and use the present description and technology and are not intended to limit the scope of this application.

[0068] 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.

[0069] 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.

[0070] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. 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 associated objects before and after 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 or a, b and c, where a, b and c can be single or multiple. In addition, in the embodiments of the present application, words such as "first" and "second" do not limit the quantity and order.

[0071] 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 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.

[0072] Before introducing the embodiments of the present application, the technical terms and background technologies involved in the present application are first introduced.

[0073] Lane: A lane is a path for signal transmission. It 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.

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

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

[0076] Sideband Link (SL): A sideband link is used to transmit low-speed data, 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] Multi-channel alignment: When a link includes multiple channels, the transmission delay of each channel may vary during link training. To ensure that the receiver can correctly combine the data received by multiple channels after experiencing different transmission delays, it is necessary to adjust and compensate for each channel. This process of adjusting and compensating for each channel is called multi-channel alignment.

[0082] Training sequence (TS): A special character sent during link training. Training sequences include: Logic Layer Training Sequence 0 (LLCF_TS0), Logic Layer Training Sequence 1 (LLCF_TS1), and Logic Layer Training Sequence 2 (LLCF_TS2). Logic Layer Training Sequence 0 (LLCF_TS0) is used for channel clock recovery and lock during link training. Logic Layer Training Sequence 1 (LLCF_TS1) is used for channel equalization during link training. Logic Layer Training Sequence 2 (LLCF_TS2) is used for channel lock during link training.

[0083] The technical solutions provided in the embodiments of the present application can be applied to a communication system comprising multiple devices, wherein the devices in the communication system can be connected directly or through a routing device. Signals can be transmitted directly between the devices or through an interface device, and the signals can be transmitted to the processing unit within the device via a bus within the device.

[0084] For example, FIG1 is a schematic diagram of the structure of a communication system 100. The communication system 100 includes a first device 110 and a second device 120. The first device 110 and the second device 120 are directly connected via a cable to implement signal transmission between the first device 110 and the second device 120. For example, the first device 110 may be a set-top box, and the second device 120 may be a display. Audio and video data may be transmitted between the set-top box and the display via the cable. Alternatively, the first device 110 may be a display, and the second device 120 may be a game controller. Control information may be transmitted between the display and the game controller via the cable.

[0085] Optionally, the device 110 may include an interface device 111 , and the device 120 may include an interface device 121 . The interface device 111 in the device 110 and the interface device 121 in the device 120 are directly connected via a cable to achieve signal transmission between the devices 110 and 120 .

[0086] As another example, FIG2 shows a schematic diagram of the structure of another communication system 200. The communication system 200 includes multiple devices 210 and a routing device 220. Any two of the multiple devices 210 can transmit signals via the routing device 220, such as transmitting audio and video data or charging signals. For example, the multiple devices 210 may include a display, a set-top box, and an audio player (e.g., a Moving Picture Experts Group Audio Layer III (MP3) device). The set-top box can transmit audio and video data to the display via the routing device 220, and the set-top box can also transmit audio data to the audio player via the routing device 220. In addition, two devices in the multiple devices 210 may be directly connected. For example, the multiple devices 210 may also include a game controller, which can be directly connected to the display via a cable and transmit control information to the display.

[0087] Optionally, each of the multiple devices 210 may include an interface device, and the routing device 220 may include multiple interface devices. The interface device of each of the multiple devices 210 may be connected to one of the multiple interface devices of the routing device 220. For example, the multiple devices 210 may include a display, a set-top box, and an audio player. The multiple interface devices of the routing device 220 may include first to third interface devices. The interface device of the display is connected to the first interface device of the routing device 220 via a cable, the interface device of the set-top box is connected to the second interface device of the routing device 220 via a cable, and the interface device of the audio player is connected to the third interface device of the routing device 220 via a cable.

[0088] In the two aforementioned communication systems, the interconnected devices can be referred to as communication devices. When the communication devices are electronic devices, they can be deployed on land, including indoors or outdoors, and can be handheld or vehicle-mounted. They can also be deployed on water (such as ships) or in the air (such as aircraft, balloons, and satellites). 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.

[0089] When the communication device is an interface device, the interface device may be a chip. It is understood that the communication system is a chip-to-chip interconnection system, and the chip may be an interface chip on an electronic device, cable, docking station, adapter, or router. The docking station may be connected to a gigabit Ethernet port, a video graphics array (VGA) port, a high-definition multimedia interface (HDMI) port, a TF card (trans-flash card), an SD card (secure digital memory card), a charging port, and a universal serial bus (USB) port, among others.

[0090] In this application, when the communication device is a chip, the chip may include an interface module. That is, this application can be applied to the interface module that interconnects two chips. This interface module can be understood as an IP integrated within the chip. Alternatively, the interface module can be sold separately as an IP.

[0091] For example, when the chip can be a system on chip (SoC), a central processing unit (CPU), or a graphics processing unit (GPU), the present application can be applied to the interface modules of chips such as SoC, CPU, and GPU. When the chip is a small chip such as a die, the interface module can be understood as the transmitting circuit and / or receiving circuit in the die. The chip can also be an input / output (I / O) die that only includes interface functions.

[0092] In the embodiments of the present application, when signals are transmitted between devices in a communication system, the interface specifications adopted may include, but are not limited to, the Universal Serial Bus (USB) interface specification, the HDMI specification, the Display Port (DP) specification, the Unified Multimedia Interconnection (UMMI) interface specification, and the Peripheral Component Interconnect Express (PCIE) interface specification. Accordingly, the high-speed signal transmission interface may be an HDMI interface, a miniHDMI interface, a micro HDMI interface, a Type-A interface, a Type-B interface, a Micro-B interface, and a Type-C interface.

[0093] For example, in the above communication system 100, when the first device 110 is a set-top box and the second device 120 is a television, the set-top box and the television can be connected via an HDMI cable, following the HDMI interface specification. When the first device 110 is a game controller and the second device 120 is a display, the game controller and the display can be connected via a USB cable, following the USB interface specification.

[0094] The embodiment of the present application also provides another interface standard that can replace the above-mentioned interface standards (such as USB interface or HDMI interface): unified media interconnecter (UMI) interface. The UMI interface also supports direct connection between devices or multi-device networking connection (for example, devices are connected through a routing device, or devices are connected through a docking station). For example, the UMI interface can be applied to the device in the above-mentioned communication system 100, or to the device in the communication system 200. The UMI interface can not only adapt data transmission, but also realize the charging function. Of course, the UMI interface can also be other interface names. When the UMI interface is replaced with other interface names, the other interface can be used to realize the function of the UMI interface in this application, and the embodiment of the present application is not limited to this.

[0095] When devices are interconnected using the above-mentioned high-speed signal transmission interface, the links between the devices include a main link and an auxiliary link. The main link is used to transmit high-speed data such as audio and video signals and third-party protocol data, and the auxiliary link is used to transmit low-speed data such as device management signals, port management signals, bandwidth management signals, and power supply management signals, as well as control messages.

[0096] For example, as shown in Figure 3, the devices in communication system 100 are interconnected via a UMI interface. The link between first device 110 and second device 120 includes a main link 130 and an auxiliary link 140. For first device 110, main link 130 includes transmit channels TX0-TXn and receive channels RX0-RXm, and auxiliary link 140 includes transmit channel SBTX and receive channel SBRX. n and m are positive integers, and the specific values ​​of n and m are not limited in this embodiment of the application. For second device 120, main link 130 includes receive channels RX0-RXn and transmit channels TX0-TXm, and auxiliary link 140 includes transmit channel SBTX and receive channel SBRX. The maximum transmission rate of the channels in main link 130 is greater than the maximum transmission rate of the channels in auxiliary link 140. For example, the maximum transmission rate of the channels in main link 130 is 8 gigabits per second (Gbps), while the maximum transmission rate of the channels in auxiliary link 140 is 12.5 megabits per second (Mbps). When the first device 110 is a display and the second device is a routing device, the display is a slave device and the routing device is a master device. The display can send signals to the routing device through the transmission channels TX0-TXn in the main link 130. The link composed of the transmission channels TX0-TXn can be called an uplink. The routing device can send signals to the display through the transmission channels TXo-TXm in the main link 130. The link composed of the transmission channels TX0-TXm can be called a downlink.

[0097] Between the first device 110 and the second device 120 in the communication system 100, before transmitting signals, the first device 110 and / or the second device 120 can use different numbers of channels to establish a link (referred to as establishing a link) based on the application form and service bandwidth to obtain a stable data transmission channel. This process is also called a link training process.

[0098] However, in the prior art, link training between devices requires a long time, which results in a high signal transmission delay.

[0099] For example, when the first device 110 and the second device 120 are interconnected via DP, first, the first device 110 and / or the second device 120 can determine the required number of channels in the main link based on the application form and service bandwidth to establish a link. Then, the first device 110 and the second device 120 can send auxiliary channel packets (sideband packets, SBP) through the auxiliary channel to provide feedback on signals such as link handshake and symbol lock to achieve channel training in the main link. However, due to the low transmission rate of the channel in the auxiliary link, link training will take more time, resulting in higher signal transmission delay.

[0100] For another example, when the first device 110 and the second device 120 are interconnected via a PCIE interface, first, the first device 110 and / or the second device 120 can determine the required number of channels in the main link based on the application form and service bandwidth to establish a link. Then, because the channels in the main link of the PCIE interface specification are bidirectional transmission channels consisting of two pairs of differential signal lines, the first device 110 and the second device 120 can simultaneously train the transmitting channel and the receiving channel in the bidirectional transmission channel. Specifically, the first device 110 can send a feedback signal to the second device 120 via the transmitting channel in the bidirectional transmission channel, and the first device 110 can also receive the feedback signal sent by the device 120 via the receiving channel in the bidirectional transmission channel. However, during the training process, one receiving channel and one transmitting channel in the main link are bound for training, and the transmitting and receiving ends are dependent on each other, which will cause the link training to take a long time and result in higher signal transmission latency. In addition, since one receiving channel and one transmitting channel in the main link are bound for training, it is impossible to train the transmitting channel or the receiving channel separately. It is also impossible to train any number of transmitting channels and receiving channels according to the application form and service bandwidth, which will lead to poor flexibility.

[0101] In summary, existing technologies require considerable time to train links between devices, resulting in high signal transmission latency. Furthermore, existing technologies suffer from the inability to train any number of transmit and receive channels based on application scenarios and service bandwidth, resulting in limited flexibility. Furthermore, link training fails to account for the aging of channels in the primary link over extended periods of use, leading to poor signal transmission reliability.

[0102] Based on this, an embodiment of the present application provides a link training method. During link training, this method sends training messages via a primary link. Because the transmission rate of the primary link is greater than the transmission rate of the secondary link, link training efficiency can be improved, the time required for link training can be reduced, and signal transmission latency can be reduced. The specific process of this method is described below. The fact that the transmission rate of the primary link is greater than the transmission rate of the secondary link means that the designed transmission rate of the primary link is greater than the designed transmission rate of the secondary link. At a specific moment, the actual transmission rate of the primary link may be less than the actual transmission rate of the secondary link. For example, in the UMI interface standard, the configurable transmission rates of each differential channel of the primary link (also referred to as a primary link channel) include: 2 Gbps, 4 Gbps, 6 Gbps, 8 Gbps, 10 Gbps, 12 Gbps, 16 Gbps, 20 Gbps, and 24 Gbps. Each single-ended channel of the secondary link (also referred to as an secondary link channel) supports a rate of 12.5 Mbps. It is understandable that in the UMI interface standard, the designed transmission rate of the primary link is greater than the designed transmission rate of the auxiliary link. However, at specific moments, such as when the primary link is not transmitting data, the actual transmission rate of the primary link may be less than the actual transmission rate of the auxiliary link.

[0103] As shown in Figure 4, a flow chart of a link training method provided in an embodiment of the present application is provided, and the method includes steps S401-S403. The method is applied to a communication system including a first device and a second device, such as the above-mentioned communication system 100 or communication system 200. The first device communicates with the second device through a main link and an auxiliary link. The main link includes multiple main link channels, and the auxiliary link includes at least one auxiliary link channel. The transmission rate of the main link channel is greater than the transmission rate of the auxiliary link channel. The embodiment of the present application does not limit the specific number of main link channels included in the main link and the specific number of auxiliary link channels included in the auxiliary link. Among them, the main link channel is used to transmit high-speed signals (data) such as video signals and / or audio signals, and the auxiliary link channel is used to transmit at least one of low-speed signals (data) such as device management signals, port management signals, bandwidth management signals and power supply management signals.

[0104] Taking the application of this method to the above-mentioned communication system 100 as an example, for the first device 110, the multiple main link channels in the main link 130 include transmission channels TX0-TXn, and at least one auxiliary link channel in the auxiliary link 140 includes a transmission channel SBTX. The following embodiments of this application are illustratively described using the application of this method to the communication system 100 as an example.

[0105] S401: The first device 110 determines the status of the main link 130.

[0106] Specifically, the first device 110 may determine the status of the main link 130 according to the status of multiple main link channels in the main link 130 .

[0107] In a possible embodiment, if at least one main link channel among the multiple main link channels is in a service transmission state, the main link 130 is in a service transmission state.

[0108] For example, as shown in FIG5 , a main link 130 between a first device 110 and a second device 120 includes eight main link channels, and an auxiliary link 140 includes two auxiliary link channels. For the first device 110, the main link 130 includes six transmit main link channels TX0-TX5 and two receive main link channels RX0-RX1, and the auxiliary link 140 includes a transmit auxiliary link channel SBTX and a receive auxiliary link channel SBRX. For the second device 120, the main link 130 includes six receive main link channels RX0-RX5 and two transmit main link channels TX0-TX1, and the auxiliary link 140 includes a receive auxiliary link channel SBRX and a transmit auxiliary link channel SBTX. It will be appreciated that for the first device 110, the multiple main link channels in the main link 130 include transmit main link channels TX0-TX5, and the auxiliary link channels in the auxiliary link 140 include a transmit auxiliary link channel SBTX. The first device 110 can determine the status of the main link 130 based on the status of the six transmit main link channels TX0-TX5. When at least one of the six sending main link channels is in the service transmission state, the main link 130 is in the service transmission state.

[0109] In a possible embodiment, before the first device 110 identifies whether at least one main link channel among the multiple main link channels is in a service transmission state, the method further includes: the first device 110 assigns a service transmission state to the at least one main link channel, so that the first device 110 can identify whether the at least one main link channel is in a service transmission state.

[0110] The above service transmission state may also be referred to as a high-speed (HS) service transmission state, or an activated state, or a high-speed state. The main link channel in this state is a successfully trained channel and can perform high-speed service transmission.

[0111] Optionally, the status of the main link channel also includes a disable state, a channel initialization (INIT) state, a high-speed channel initial training (training) state, a high-speed channel recovery (recovery) state (also referred to as a high-speed channel retraining state) and a high-speed channel low power (low power, LP) state, which is not limited in the embodiments of the present application. Among them, the disable state refers to the state when the main link channel is not powered on. The channel initialization state refers to the state after the main link channel is powered on. The high-speed channel initial training state refers to the state in which the main link channel is in the process of link training. The high-speed channel recovery state refers to the state in which the main link channel is in the process of performing channel recovery. The high-speed channel low power state means that there is no high-speed business transmission and the main link channel is in a low power state.

[0112] S402: If the primary link 130 is in a service transmission state, the first device 110 selects the primary link 130 to send a training message.

[0113] For example, as shown in FIG5 , for the first device 110, among the six main link transmission channels TX0-TX5, the two main link channels TX2 and TX3 are in the service transmission state. When the first device 110 recognizes that the two main link transmission channels TX2 and TX3 are in the service transmission state, it can be determined that the main link 130 is in the service transmission state, and the first device 110 can select the main link 130 to send a training message. Compared with the above-mentioned situation where the auxiliary channel packet is sent through an auxiliary channel with a lower transmission rate when the first device 110 and the second device 120 are interconnected via DP, since the transmission rate of the main link is greater than the transmission rate of the auxiliary link, the transmission rate of the training message can be increased, thereby reducing the time required for link training and reducing the signal transmission delay.

[0114] The multiple primary link channels include at least one channel to be trained. The training message is used to instruct the at least one channel to be trained to perform link training. The embodiments of the present application do not limit the specific number of the at least one channel to be trained. A channel to be trained refers to a channel that is not in a service transmission state before link training but needs to enter a service transmission state through training.

[0115] The above-mentioned training message may also be referred to as a logical layer management packet (LLMP). When the logical layer management message is sent through the main link channel between the first device 110 and the second device 120 (e.g., the transmitting main link channel TX2 in the main link 130), the link management message may be referred to as a logical layer main link management packet (LLMMP); and when the logical layer management message is sent through the auxiliary link channel between the first device 110 and the second device 120 (e.g., the transmitting auxiliary link channel SBTX in the auxiliary link), the link management message may be referred to as a logical layer sideband link management packet (LLSMP).

[0116] In a possible embodiment, as shown in Figure 6, the above-mentioned channel to be trained is in a channel initialization state before starting link training. The process of link training for the channel to be trained includes: channel clock recovery and lock, channel equalization, channel lock and multi-channel alignment. First, the channel performs channel clock recovery and lock training. If it times out or the channel clock cannot be locked, the channel state enters the initialization state again. If the channel successfully completes the channel clock recovery and lock training, the channel starts channel equalization training. If it times out or the channel equalization training fails, the channel state enters the channel initialization state again. If the channel successfully completes the channel equalization training, the channel starts channel lock training. If it times out or the channel lock training fails, the channel state enters the channel initialization state again. If the channel successfully completes the channel lock training, the channel starts multi-channel alignment training. After successfully completing the multi-channel alignment training, the channel starts transmitting data. If the multi-channel alignment training fails, the channel state enters the initialization state again.

[0117] In a possible embodiment, each channel in the to-be-trained channel independently performs channel clock recovery and locking, channel equalization, and channel locking during training.

[0118] It should be noted that, in the embodiment of the present invention, each main link channel is trained independently, and the main link channel is part of the main link. Unless otherwise specified, the channel training of the present invention is equivalent to the link training.

[0119] In a possible embodiment, the training message includes at least one of a training start message (also referred to as a lane training start message (LTSM)), a clock lock feedback message (CLFM), an equalization feedback message (EQFM), a lane lock feedback message (LLFM), or a de-skew feedback message (DSFM). The lane training start message is used to instruct the to-be-trained channel to start link training, the clock lock feedback message is used to indicate a clock lock result, the equalization feedback message is used to indicate an equalization result of the to-be-trained channel, the lane lock feedback message is used to indicate a channel lock result of the to-be-trained channel, and the lane alignment feedback message is used to indicate a channel alignment result of the to-be-trained channel.

[0120] For example, when performing channel clock recovery and lock training on the channel to be trained, the training message may include a channel training start message. When performing channel equalization training on the channel to be trained, the training message may include an equalization feedback message.

[0121] Optionally, the channel to be trained may be a transmitting channel in the main link 130 and / or a receiving channel in the main link 130 for the first device 110. The embodiments of the present application are not limited to this. In the following embodiments, the channel to be trained is taken as an example of a transmitting channel in the main link 130 for the first device 110.

[0122] In a possible embodiment, the first device 110 selects at least one channel to be trained from multiple main link channels, which may include multiple possible implementations, which are described in detail below.

[0123] In a first possible implementation, the first device 110 randomly selects a primary link channel from a plurality of primary link channels as at least one channel to be trained, including the following steps: first, the first device 110 obtains the number of at least one channel to be trained. Then, based on the number of at least one channel to be trained, the first device 110 randomly selects a primary link channel from the plurality of primary link channels as at least one channel to be trained.

[0124] For example, as shown in FIG5 , for the first device 110, for example, among the six main link transmission channels TX0-TX5, two main link transmission channels TX2 and TX3 are in a service transmission state, and the number of at least one channel to be trained is 2. First, the first device 110 can obtain the number of at least one channel to be trained, which is 2. Then, based on the number of at least one channel to be trained, the first device 110 can randomly select two main link channels from the four main link channels TX0, TX1, TX4, and TX5 as the at least one channel to be trained, for example, select the two main link channels TX0 and TX4 as the at least one channel to be trained.

[0125] In a second possible implementation, each of the multiple main link channels corresponds to a number, and the first device 110 sequentially selects a main link channel from the multiple main link channels as at least one channel to be trained according to the order of the numbers and the numbers of the main link channels. The method includes the following steps: First, the first device 110 obtains the number of the at least one channel to be trained. Then, based on the number of the at least one training channel, the first device 110 sequentially selects a main link channel from the multiple main link channels as at least one channel to be trained according to the order of the numbers and the numbers of the main link channels.

[0126] In one possible embodiment, the numbers of the main link channels may be pre-set, and it is not necessary to number the main link channels before each selection of a channel to be trained. Alternatively, the first device 110 may number the main link channels before each selection of at least one channel to be trained, although this embodiment of the present application is not limited thereto.

[0127] In a possible embodiment, each main link channel can be numbered using characters, for example, each main link channel can be numbered using numbers, or each main link channel can be numbered using letters. The embodiments of the present application are not limited to this. The following embodiments use the example of numbering each main link channel as an example for illustrative explanation.

[0128] Optionally, when the first device 110 uses numbers to number each main link channel, each main link channel can be numbered in ascending order of numbers, or each main link channel can be numbered in descending order of numbers. The embodiments of the present application are not limited to this. The following embodiments take the example of the first device 110 numbering each main link channel in ascending order of numbers as an example for exemplary explanation.

[0129] For example, as shown in FIG5 , for the first device 110, the six main transmission link channels TX0-TX5 are numbered 0-5, and among the six main transmission link channels TX0-TX5, two main transmission link channels TX2 and TX3 are in a service transmission state, and the number of at least one channel to be trained is 2. First, the first device 110 can obtain the number 2 of at least one channel to be trained. Then, based on the number 2 of the at least one training channel and in ascending order of numbers and the numbers 0-5 of the six main transmission link channels TX0-TX5, the first device 110 can select the two main link channels TX0 corresponding to the number 0 and TX1 corresponding to the number 1 from the four main transmission link channels TX0, TX1, TX4, and TX5 as the at least one channel to be trained.

[0130] In a third possible implementation, the first device selects a main link channel as at least one channel to be trained based on the historical cumulative usage counts of each main link channel, including the following steps: First, the first device 110 obtains the number of at least one channel to be trained. Then, the first device 110 obtains the historical cumulative usage counts of multiple main link channels, and the historical cumulative usage counts of the multiple main link channels are used to indicate the lifespans of the multiple main link channels. Finally, the first device 110 selects a main link channel with fewer historical cumulative usage counts as at least one channel to be trained based on the historical cumulative usage counts and the number of at least one channel to be trained. It can be understood that when selecting a channel to be trained, the first device 110 selects a main link channel with fewer historical usage counts as at least one channel to be trained, and the remaining lifespan of the at least one channel to be trained is longer. Compared with the prior art, the problem of channel aging is taken into consideration. By training the channel to be trained with a longer remaining lifespan to transmit data, the reliability of signal transmission can be improved.

[0131] For example, as shown in FIG5 , for the first device 110, among the six main transmission link channels TX0-TX5, the two main transmission link channels TX2 and TX3 are in a service transmission state, and the number of at least one channel to be trained is 2. First, the first device 110 obtains the number 2 of at least one channel to be trained. Then, the first device 110 obtains the historical cumulative usage counts of the six main transmission link channels TX0-TX5, wherein the historical cumulative usage counts of the four main link channels TX0, TX1, TX4, and TX5 decrease in sequence. Finally, the first device 110 selects the two main link channels TX4 and TX5 with fewer historical cumulative usage counts from the four main link channels TX0, TX1, TX4, and TX5 as the at least one channel to be trained based on the historical cumulative usage counts and the number 2 of at least one channel to be trained.

[0132] In one possible embodiment, the first device 110 may use a non-volatile memory to record the historical cumulative usage counts of multiple primary link channels. For example, each time a primary link channel successfully trains and enters a service transmission state, the first device 110 increments the historical cumulative usage count of the primary link channel by 1 and stores the updated historical cumulative usage count in the non-volatile memory.

[0133] In a possible embodiment, the first device 110 obtaining the number of the at least one channel to be trained includes: the first device 110 obtaining the number of the at least one channel to be trained according to service bandwidth requirement information.

[0134] Specifically, the first device 110 obtains the number of channels to be trained according to the service bandwidth requirement information and the signal transmission rate of the main link channel.

[0135] The above-mentioned service bandwidth requirement information is used to indicate: the transmission rate required by the sending link and / or the transmission rate required by the receiving link when the service is transmitted between the first device 110 and the second device 120. This embodiment of the present application is not limited to this. This embodiment of the present application uses the service bandwidth requirement information as an example to indicate the transmission rate required by the sending link when the service is transmitted between the first device 110 and the second device 120.

[0136] In a possible embodiment, if at least one main link channel among multiple main link channels is in a service transmission state, the above-mentioned first device 110 obtains the number of at least one channel to be trained based on the service bandwidth requirement information and the signal transmission rate of the main link channel, including: the first device 110 obtains the number of at least one channel to be trained based on the quotient of the service bandwidth requirement information and the signal transmission rate of the main link channel, and the difference between the number of channels included in at least one main link channel.

[0137] For example, taking the case where the at least one main link channel includes two channels, the service bandwidth requirement information indicates that the required transmission rate of the sending link is 32 Gbps, and the transmission rate of the main link channel is 8 Gbps, the first device 110 can obtain the number of the at least one channel to be trained, 2 (32 / 8-2=2), based on the quotient 4 of the service bandwidth requirement information 32 Gbps and the signal transmission rate 8 Gbps of the main link channel, and the difference between the number of channels included in the at least one main link channel, 2.

[0138] In a possible embodiment, if at least one main link channel among the multiple main link channels is not in a service transmission state, the above-mentioned first device 110 obtains the number of at least one channel to be trained based on the service bandwidth requirement information and the signal transmission rate of the main link channel, including: the first device 110 obtains the number of at least one channel to be trained based on the quotient of the service bandwidth requirement information and the signal transmission rate of the main link channel.

[0139] For example, in the case where at least one of the multiple main link channels is not in a service transmission state, the service bandwidth requirement information indicates that the required transmission rate of the sending link is 32 Gbps, and the transmission rate of the main link channel is 8 Gbps, the first device 110 can obtain the number of at least one channel to be trained, 4 (32 / 8=4), based on the quotient of the service bandwidth requirement information 32 Gbps and the signal transmission rate of the main link channel 8 Gbps.

[0140] S403 : The second device 120 receives a training message through the main link 130 .

[0141] For example, as shown in FIG5 , for the first device 110 , for example, two of the six main transmission link channels TX0-TX5, namely, TX2 and TX3, are in a service transmission state. The second device 120 can receive training messages through the two main transmission link channels TX2 and TX3 in the main link 130.

[0142] In the link training method provided in an embodiment of the present application, when performing link training, first, the first device 110 determines the status of the main link 130. Then, if the main link 130 is in a service transmission state, the first device 130 sends a training message through the main link 130. Finally, the second device 120 receives the training message through the main link 130. Because the transmission rate of the main link 130 is greater than the transmission rate of the auxiliary link 140, compared with the case where the first device 110 and the second device 120 are interconnected via DP and the auxiliary channel packets are sent through the auxiliary channel with a lower transmission rate, the transmission rate of the training message can be increased, thereby reducing the time required for link training and signal transmission delay. Furthermore, compared with the case where the first device 110 and the second device 120 are interconnected via a PCIE interface and one receiving channel needs to be bound for training during the training process, any number of transmitting channels or receiving channels can be trained separately according to the application form and service bandwidth, which can improve flexibility.

[0143] As shown in Figure 7, in a possible embodiment, the link training method provided in the embodiment of the present application, in addition to the above-mentioned steps S401-S403, further includes steps S404-S405. When executing steps S402-S403 and steps S404-S405, the first device 110 and the second device 120 can determine the status of the main link 130 based on the first device 110, and determine to execute steps S402-S403, or execute steps S404-S405.

[0144] S404 : If the primary link 130 is not in a service transmission state, the first device 110 sends a training message through the auxiliary link 140 .

[0145] For example, as shown in FIG5 , for the first device 110, the six main link transmission channels TX0-TX5 are all channels that have not been successfully trained. It is understood that at this time, the main link 130 is not in a service transmission state, and the first device 110 can send training messages through the auxiliary link 140 for the auxiliary transmission channel SBTX of the first device 110. Because the reliability of the auxiliary link 140 when transmitting data is higher than the reliability of the main link 130 when transmitting data, the first device 110 sending training messages through the auxiliary link 140 can improve the reliability of link training for the training channel.

[0146] In a possible embodiment, when the first device 110 fails to send a training message through the primary link 130 , or in order to improve the reliability of link training, the first device 110 may also send a training message through the auxiliary link 140 .

[0147] S405 : The second device 120 receives a training message through the auxiliary link 140 .

[0148] For example, as shown in FIG5 , for the first device 110 , all of the six transmission channels TX0-TX5 are untrained channels. It is understood that at this time, the main link 130 is not in a service transmission state, and the second device 120 can receive training messages through the auxiliary link 140.

[0149] In the link training method provided in an embodiment of the present application, when performing link training, first, the first device 110 determines the status of the main link 130. Then, if the main link 130 is not in a service transmission state, the first device 110 sends a training message via the auxiliary link 140. Finally, the second device 120 receives the training message via the auxiliary link 140 to perform link training on the channel to be trained. Because the reliability of the auxiliary link 140 when transmitting data is higher than the reliability of the main link 130 when transmitting data, the first device 110 sending the training message via the auxiliary link 140 can improve the reliability of link training on the channel to be trained.

[0150] As shown in (a) of Figure 8, in a possible implementation, when the link training method provided in the embodiment of the present application is applied to the above-mentioned communication system 100, the interface device 111 in the first device 110 and the interface device 121 in the second device 120 both include a channel management module 810 and a channel training module 820. Among them, the channel management module 810 is used to determine the channel to be trained, and after the training of the channel to be trained fails, reselect the channel to be trained, or end the link training process. The channel management module 810 includes a lane state machine (LNSM), which is used to record the status of the channel between the first device 110 and the second device 120, so that the first device 110 and the second device 120 can identify the status of each channel. As shown in (b) of Figure 8, taking the channel status including the channel initialization state, the high-speed channel initial training state and the service transmission state as an example, when the channel is in the channel initialization state after power-on, the channel state machine can record the channel status as the channel initialization state. When the channel begins link training, the channel state changes from the channel initialization state to the high-speed channel initial training state, and the channel state machine can record the channel state as the high-speed channel initial training state. If the channel training fails, the channel state enters the channel initialization state, and the channel state machine can record the channel state as the channel initialization state. If the channel training succeeds, the channel state enters the service transmission state, and the channel state machine can record the channel state as the service transmission state. When the channel exits the service transmission state, the channel state enters the channel initialization state again, and the channel state machine can record the channel state as the channel initialization state. The channel training module 820 is used to train the channel to be trained.

[0151] As shown in (a) of FIG8 , the channel management module 810 is further configured to control the channel training module 820 to start training the channel to be trained. The channel training module 820 is further configured to return the training result of the channel to be trained to the channel management module 810 .

[0152] In a possible embodiment, the channel management module 810 and the channel training module 820 may correspond to two independent chips, and the interface device 121 may include an interface circuit composed of the two chips; alternatively, the channel management module 810 and the channel training module 820 may correspond to the same interface chip, and the interface device 121 may include the interface chip. This embodiment of the present application does not limit this.

[0153] To facilitate understanding of the link training method provided in the embodiment of the present application, in conjunction with Figure 5, the following example illustrates the specific process of the link training method provided in the embodiment of the present application when applied to link training, taking the first device 110 using the link training method provided in the embodiment of the present application as an example, first determining the number of at least one channel to be trained based on service bandwidth demand information and the signal transmission rate of the main link channel, and then determining that the transmitting main link channels TX3-TX5 in the main link 130 of the first device 110 are at least one channel to be trained based on the number of at least one channel to be trained and the historical cumulative usage times of multiple main link channels.

[0154] In the link training method provided in the embodiment of the present application, each channel in at least one channel to be trained can independently perform channel clock recovery and locking, channel equalization, and channel locking during link training. Below, taking the transmitting channel TX3 as an example, the training process of channel clock recovery and locking, channel equalization, and channel locking is exemplified.

[0155] As shown in FIG9 , when the channel clock recovery training is performed on the above-mentioned transmission channel TX3, the following steps are included:

[0156] (1) The first device 110 continuously sends a logical layer control frame training sequence 0 (LLCF_TS0) to the second device 120 via the transmission channel TX3 (the receiving channel RX3 for the second device 120). For example, the logical layer control frame training sequence 0 (LLCF_TS0) can be: a payload of 0xAA with any length, which is not limited in this embodiment of the present application.

[0157] (2) The first device 110 identifies whether, for the first device 110, at least one of the transmission channels TX0-TX2 in the main link 130 is in a service transmission state. For example, taking the example of the first device 110 identifying that the transmission channel TX0 among the transmission channels TX0-TX2 is in a service transmission state, the first device 110 may send a channel training start message (LTSM) to the second device 120 through the transmission channel TX0, and the channel training start message (LTSM) is used to instruct the transmission channel TX3 to start link training. It can be understood that since the transmission rate of the transmission channel TX0 of the first device 110 is greater than the transmission rate of the transmission channel SBTX in the auxiliary link 140, sending the channel training start message (LTSM) through the transmission channel TX0 can increase the transmission rate of the training message, thereby reducing the time required for link training and reducing the signal transmission delay.

[0158] In a possible embodiment, the first device 110 sends a channel training start message (LTSM) while sending the logical layer control frame training sequence 0 (LLCF_TS0), or sends the channel training start message (LTSM) after sending the logical layer control frame training sequence 0 (LLCF_TS0), thereby ensuring that the second device 120 can start channel clock recovery training immediately after receiving the channel training start message (LTSM), which can reduce the time consumed by channel clock recovery training, improve link training efficiency, and reduce signal transmission delay.

[0159] (3) The second device 120 receives the logical layer control frame training sequence 0 (LLCF_TS0) through the receiving channel RX3 (the transmitting channel TX3 for the first device 110), receives the channel training start message (LTSM) through the receiving channel RX0 of the second device 120 (the above-mentioned transmitting channel TX0 for the first device), and starts channel clock locking in the above-mentioned receiving channel RX3 according to the channel training start message (LTSM).

[0160] (4) If the second device 120 fails to lock the clock in the above-mentioned receiving channel RX3, the second device 120 can identify whether there is at least one transmitting channel in the transmitting channels TX0-TX1 in the main link 120 that is in a service transmission state. For example, taking the example of the second device 120 identifying that the transmitting channel TX1 in the transmitting channels TX0-TX1 is in a service transmission state, the second device 120 can send a clock lock feedback message (CLFM) to the first device 110 through the transmitting channel TX1. The clock lock feedback message (CLFM) is used to indicate that the above-mentioned receiving channel RX3 fails to lock the clock and is also used to instruct the first device 110 to adjust the parameters when the transmitting channel TX3 sends a signal. It can be understood that since the transmission rate of the transmitting channel TX1 of the second device 120 is greater than the transmission rate of the transmitting channel SBTX in the auxiliary link 140, sending a channel training start message (LTSM) through the transmitting channel TX0 can increase the transmission rate of the training message, thereby reducing the time required for link training and reducing the signal transmission delay.

[0161] In combination with step (2) and step (4), it can be understood that when the link training method provided in the embodiment of the present application is applied to the communication system 100, the first device 110 or the second device 120 can both serve as the sending end and adopt the link training method provided in the embodiment of the present application. When the first device 110 or the second device 120 sends a training message (also known as a logical layer management message (LLMP)), the training message can be sent through the sending channel in the main link 130, and the transmission rate of the sending channel in the main link 130 is greater than the transmission rate of the sending channel in the auxiliary link 140. Therefore, the transmission rate of the training message can be increased, thereby reducing the time required for link training and reducing the signal transmission delay.

[0162] (5) The first device 110 receives the clock lock feedback message (CLFM) through the receiving channel RX1 (the transmitting channel TX1 for the second device 120), and adjusts the parameters of the transmitting channel TX3 when sending signals according to the clock lock feedback message (CLFM).

[0163] (6) After the first device 110 completes the parameter adjustment when sending the signal through the transmission channel TX3, it continues to send the logical layer control frame training sequence 0 (LLCF_TS0) to the second device 120 through the transmission channel TX3 again, and sends a clock lock feedback message response (CLFM_ACK) to the second device 120 through the above-mentioned transmission channel TX0. The clock lock feedback message response (CLFM_ACK) is used to indicate that the parameter adjustment when sending the signal through the transmission channel TX3 is completed.

[0164] In one possible embodiment, to avoid the problem of a clock lock feedback message (CLFM) being lost when the second device 120 sends the clock lock feedback message (CLFM) to the first device 110, an embodiment of the present application provides a logical layer management message (LLMP) retransmission mechanism. The logical layer management message (LLMP) retransmission mechanism includes: after the second device 120 sends the clock lock feedback message (CLFM), if it does not receive a clock lock feedback message acknowledgment (CLFM_ACK) sent by the first device 110 within tCLFMAck time, the second device 120 continuously resends the clock lock feedback message (CLFM) to the first device 110 through the transmission channel SBTX in the auxiliary link 140 within LMP_MaxReSendTime times. tCLFMAck and LMP_MaxReSendTime are preset constants, and the embodiment of the present application does not limit the specific values ​​of these two constants. The embodiments of the present application also provide a handshake exception reporting mechanism, which includes: if the second device 120 does not receive a clock lock feedback message response (CLFM_ACK) from the first device 110 after resending the clock lock feedback message response (CLFM_ACK) for LMP_MaxReSendTime times, the second device 120 sends an error report (ERR-RPT) to the first device, and the error report is used to indicate that the logical layer management message (LLMP) handshake between the first device 110 and the second device 120 is abnormal. The equalization feedback message (EQFM) and channel lock feedback message (LLFM) in the following embodiments of the present application all follow the same logical layer management message (LLMP) retransmission and handshake exception reporting mechanism, which will not be repeated in the following embodiments of the present application.

[0165] (7) After receiving the clock lock feedback message response (CLFM_ACK) through the receiving channel RX0 (the transmitting channel TX0 for the first device 110), the second device 120 starts to re-lock the channel clock. If the clock cannot be locked at the receiving channel RX3 of the second device 120, the second device 120 performs the above step (4) again. If the clock can be locked at the receiving end of the transmitting channel TX3, the second device 120 sends a clock lock feedback message (CLFM) to the first device 110 through the transmitting channel TX1. The clock lock feedback message (CLFM) is used to indicate that the receiving channel RX3 has completed clock locking. Afterwards, the first device 110 can feed back a response message corresponding to the clock lock feedback message (CLFM) to the second device 120 and start channel equalization training.

[0166] As shown in FIG10 , when channel equalization training is performed on the above-mentioned transmission channel TX3, the following steps are included:

[0167] (1) The first device 110 continuously sends a logical layer control frame training sequence 1 (LLCF_TS1) to the second device 120 via a transmission channel TX3 (a reception channel RX3 for the second device 120). For example, the logical layer control frame training sequence 1 (LLCF_TS1) may be: a payload of a pseudo random binary sequence (PRBS) 11 sequence generated by a seed 0x7FF and a polynomial G(x)=x11+x2+1, which is not limited in this embodiment of the present application.

[0168] (2) The second device 120 receives the logical layer control frame training sequence 1 (LLCF_TS1) through the receiving channel RX3 (the above-mentioned transmitting channel TX3 for the first device 110), performs equalization training according to the logical layer control frame training sequence 1 (LLCF_TS1), and evaluates whether the equalization training of the transmitting channel TX3 meets expectations. If it does not meet expectations, the second device 120 can send an equalization feedback message (EQFM) to the first device 110 through the above-mentioned transmitting channel TX1 (the above-mentioned receiving channel RX1 for the first device 110). The equalization feedback message (EQFM) is used to instruct the first device 110 to adjust the parameters of the transmitting channel TX3 when sending signals.

[0169] (3) The first device 110 receives the equalization feedback message (EQFM) through the receiving channel RX1 (the transmitting channel TX1 for the second device 120), and adjusts the parameters of the transmitting channel TX3 of the first device 110 when sending signals according to the equalization feedback message (EQFM).

[0170] (4) After the first device 110 completes the parameter adjustment when sending the signal through the transmission channel TX3, it continues to send the logical layer control frame training sequence 1 (LLCF_TS1) to the second device 120 through the above-mentioned transmission channel TX3, and sends an equalization feedback message response (EQFM_ACK) to the second device 120 through the above-mentioned transmission channel TX0. The equalization feedback message response (EQFM_ACK) is used to indicate that the parameter adjustment when sending the signal through the transmission channel TX3 is completed.

[0171] (5) After receiving the equalization feedback message response (EQFM_ACK) through the receiving channel RX0, the second device 120 starts to re-perform equalization training and evaluates whether the equalization training meets expectations. If not, the second device 120 performs the above step (2) again. If it meets expectations, the second device 120 sends an equalization feedback message (EQFM) to the first device 110 through the transmitting channel TX1. The equalization feedback message (EQFM) is used to indicate that the transmitting channel TX3 has completed the channel equalization training.

[0172] (6) The first device 110 receives an equalization feedback message (EQFM) through the receiving channel RX1, determines that the transmitting channel TX3 has completed the channel equalization training based on the equalization feedback message (EQFM), can switch to sending the code type of the training sequence through the transmitting channel TX3, and feed back a response message corresponding to the equalization feedback message (EQFM) to the second device 120 to start performing channel lock training.

[0173] When performing channel locking training on the above-mentioned transmitting channel TX3, the following steps are included:

[0174] (1) The first device 110 continuously transmits the logical layer control frame training sequence 2 (LLCF_TS2) to the second device 120 via the transmission channel TX3. Exemplarily, the logical layer control frame training sequence 2 (LLCF_TS2) may be: a fixed length of 8 bytes, and a payload that is a bit-inverted sequence of the logical layer control frame training sequence 1 (LLCF_TS1). For example, the logical layer control frame training sequence 2 (LLCF_TS2) may be: the payload is a PRBS11 sequence generated by the seed 0x7FF and the polynomial G(x) = x11 + x2 + 1, and the sequence is generated by bit-inverting.

[0175] (2) The second device 120 receives the bit stream corresponding to the logical layer control frame training sequence 2 (LLCF_TS2) through the receiving channel RX3, matches the bit stream with the code pattern of the logical layer control frame training sequence 2 (LLCF_TS2), identifies the starting point and the ending point of the logical layer control frame training sequence 2 (LLCF_TS2), and completes the channel locking training when the match is successful.

[0176] The lock states of receive channel RX3 include: unlocked, aligned, and locked. The unlocked state is the default state at the start of channel lock. When the channel receiving end is in the unlocked state, the channel receiving end continuously receives and detects the bit stream and matches it with the Logical Layer Control Frame Training Sequence 2 (LLCF_TS2). If the match is successful, data boundary alignment is completed, the current boundary alignment position is recorded, and the channel enters the aligned state. When the channel receiving end is in the aligned state, the channel receiving end continuously receives and detects the bit stream according to the recorded boundary alignment position and matches it with the LLCF_TS2. If several (for example, four) consecutive Logical Layer Control Frame Training Sequences 2 (LLCF_TS2) are successfully matched, the channel receiving end enters the locked state. If consecutive Logical Layer Control Frame Training Sequences 2 (LLCF_TS2) cannot be successfully matched, the channel receiving end enters the unlocked state. When the channel receiving end is in the locked state, the channel completes channel lock training.

[0177] In one possible embodiment, when transmitting channel TX3 of first device 110 performs channel lock training, the time of the channel lock training may be recorded, and based on the time, whether the transmitting channel has successfully completed the channel lock training may be determined. If transmitting channel TX3 completes channel lock within tLaneLockTimeout, the channel lock is considered to be successful. If transmitting channel TX3 does not complete channel lock within tLaneLockTimeout, the channel lock is considered to have failed. tLaneLockTimeout is a preset constant, and the specific value of the preset constant is not limited in the embodiments of the present application.

[0178] (3) The second device 120 sends a channel locking feedback message (LLFM) to the first device 110 through the above-mentioned transmission channel TX1. The channel locking feedback message (LLFM) is used to indicate whether the transmission channel TX3 has successfully completed the channel locking training.

[0179] (4) First device 110 receives a channel lock feedback message (LLFM) via receiving channel RX1 and determines whether channel lock training has been successfully completed for transmitting channel TX3 based on the channel lock feedback message (LLFM). Upon confirming that channel lock training has been successfully completed for transmitting channel TX3, first device 110 performs multi-channel alignment training on transmitting channel TX3 along with other channels to be trained that have completed channel lock.

[0180] For example, in the aforementioned channels TX3-TX5 to be trained, transmitting channels TX3-TX4 successfully complete channel lock training, while transmitting channel TX5 fails to complete channel lock training. The first device 110 changes the state of transmitting channel TX5 to the channel initialization state and continues to perform multi-channel alignment training on transmitting channels TX3-TX4.

[0181] When multi-channel alignment training is performed on the transmitting channels TX3-TX4, it can be divided into a test mode and a normal mode. Among them, the test mode refers to the multi-channel alignment test training performed before leaving the factory, and the normal mode refers to the multi-channel alignment training performed after leaving the factory, for example, it is applied to the scenario in which the first device 110 and the second device 120 perform data transmission in the above-mentioned communication system 100. In order to adapt to different modes, the embodiments of the present application provide multiple types of logical layer control frame training sequences (LLCF), for example, a logic layer control frame training deviation elimination test sequence (logic layer training sequence de-skew test, LLCF_DST) is provided, which is used for multi-channel alignment training in test mode, and a logic layer control frame training data start sequence (logic layer training sequence data start, LLCF_DS) is provided, which is used for multi-channel alignment training in normal mode.

[0182] When multi-channel alignment training is performed on the transmit channels TX3-TX4 according to the test mode, the following steps are included:

[0183] (1) The first device 110 sends one logical layer control frame training deviation elimination test sequence (LLCF_DST) through the transmission channel TX3 and the transmission channel TX4 at the same time.

[0184] (2) The second device 120 receives the logical layer control frame training deviation elimination test sequence (LLCF_DST) through the receiving channel RX3 (the transmitting channel TX3 for the first device 110) and the receiving channel RX4 (the transmitting channel TX4 for the first device 110), determines that the current alignment mode is the test mode based on the two logical layer control frame training deviation elimination test sequences (LLCF_DST), and performs multi-channel alignment training based on the two logical layer control frame training deviation elimination test sequences (LLCF_DST). The second device 120 can send a channel alignment feedback message (DSFM) to the first device 110 through the above-mentioned transmitting channel TX1. The channel alignment feedback message (DSFM) is used to indicate whether the transmitting channels TX3-TX4 have successfully completed the multi-channel alignment training.

[0185] (3) The first device 110 may receive a channel alignment feedback message (DSFM) through a receiving channel RX1 (a transmitting channel TX1 for the second device 120), determine a test result based on the channel alignment feedback message (DSFM), and report the test result to the test software.

[0186] When sending channel TX3-TX4, multi-channel alignment training is performed in normal mode, including the following steps:

[0187] (1) The first device 110 simultaneously sends one logical layer control frame training data start sequence (LLCF_DS) through the transmission channel TX3 and the transmission channel TX4, and then sends service data through the transmission channel TX3 and the transmission channel TX4.

[0188] (2) The second device 120 receives two logical layer control frame training data start sequences (LLCF_DS) through the receiving channel RX3 and the receiving channel RX4, determines that the current alignment mode is the normal mode based on the two logical layer control frame training data start sequences (LLCF_DS), and performs multi-channel alignment training based on the two logical layer control frame training data start sequences (LLCF_DS).

[0189] (3) If the second device 120 detects an abnormality in the multi-channel alignment, for example, the skew of the multi-channel logical layer control frame training deviation elimination test sequence (LLCF_DST) exceeds a preset range, or some sending channels are unable to receive the multi-channel logical layer control frame training deviation elimination test sequence (LLCF_DST), the second device 120 may send an abnormality report (ERR-RPT) to the first device 110.

[0190] (4) The first device 110 may receive an exception report (ERR-RPT), determine a de-skew abnormality in the transmission channel TX3-TX4 based on the exception report (ERR-RPT), change the state of the transmission channel TX3-TX4 to a channel initialization state, report the exception report (ERR-RPT), and re-train the link of the transmission channel TX3-TX4.

[0191] (5) If the second device 120 does not detect any abnormality in the multi-channel alignment, the state of the transmission channel TX3-TX4 enters the service transmission state, and the transmission channel TX3-TX4 starts to transmit high-speed data.

[0192] In combination with the above-mentioned link training process, it can be understood that when the link training method provided in the embodiment of the present application is applied to the link training process, the first device 110 or the second device 120 transmits the training message through the sending channel in the main link 130, which can increase the transmission rate of the training message, thereby reducing the time required for link training and reducing the signal transmission delay.

[0193] FIG11 shows a schematic structural diagram of a link training device 1100 . The link training device 1100 may be the sending device in the above embodiment, or may be a chip within the sending device. The link training device 1100 may be used to implement the link training method of any of the above embodiments.

[0194] The link training device 1100 includes a processing module 1101 and a transceiver module 1102. For example, the transceiver module 1102 is used to support the link training device 1100 in transmitting and receiving signals, or for communicating with other devices. The processing module 1101 is used to control and manage the operations of the link training device 1100 and to execute the processing performed by the link training device 1100 in the above-described embodiments. Optionally, if the link training device 1100 includes a storage unit, the processing module 1101 may also execute programs or instructions stored in the storage unit to enable the link training device 1100 to implement the methods and functions involved in any of the above-described embodiments.

[0195] In a possible embodiment, the processing module 1101 may be used to implement the functions of the channel management module 810 , and the transceiver module 1102 may be used to implement the functions of the channel training module 820 .

[0196] For example, the processing module 1101 can be used to execute, for example, step S401 in FIG. 4 , and / or other processes for the technology described herein. The transceiver module 1102 can be used to execute, for example, step S402 in FIG. 4 , and / or other processes for the technology described herein. All relevant content of each step involved in the above method embodiment can be referenced to the functional description of the corresponding functional module and will not be repeated here.

[0197] Exemplarily, in hardware implementation, the functions of the processing module 1101 can be executed by a processor, and the functions of the transceiver module 1102 can be executed by a transceiver (transmitter / receiver) and / or a communication interface, wherein the processing module 1101 can be embedded in or independent of the processor of the link training device 1100 in the form of hardware, or can be stored in the memory of the link training device 1100 in the form of software, so that the processor can call and execute the operations corresponding to the above functional units.

[0198] FIG12 shows a schematic structural diagram of a link training device 1200 . The link training device 1200 may be the receiving device in the above embodiment, or may be a chip within the receiving device. The link training device 1200 may be used to implement the link training method in any of the above embodiments.

[0199] The link training device 1200 includes a processing module 1201 and a transceiver module 1202. For example, the transceiver module 1202 is used to support the link training device 1200 in transmitting and receiving signals, or for communicating with other devices. The processing module 1201 is used to control and manage the operations of the link training device 1200 and to execute the processing performed by the link training device 1200 in the above-mentioned embodiments. Optionally, if the link training device 1200 includes a storage unit, the processing module 1201 may also execute programs or instructions stored in the storage unit to enable the link training device 1200 to implement the methods and functions involved in any of the above-mentioned embodiments.

[0200] In a possible embodiment, the processing module 1201 may be used to implement the functions of the channel management module 810 , and the transceiver module 1202 may be used to implement the functions of the channel training module 820 .

[0201] For example, the transceiver module 1202 may be used to perform step S403 in FIG4 and / or other processes of the technology 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 will not be repeated here.

[0202] Exemplarily, in hardware implementation, the functions of the processing module 1201 can be executed by a processor, and the functions of the transceiver module 1202 can be executed by a transceiver (transmitter / receiver) and / or a communication interface, wherein the processing module 1201 can be embedded in or independent of the processor of the link training device 1200 in the form of hardware, or can be stored in the memory of the link training device 1200 in the form of software, so that the processor can call and execute the operations corresponding to the above functional units.

[0203] As shown in Figure 13, an embodiment of the present application also provides a chip module 1300, which includes a chip 1310 and a packaging substrate 1320. The chip 1310 is fixed to the packaging substrate 1320. The chip 1310 includes a link training device 1100 as shown in Figure 11, or includes a link training device 1200 as shown in Figure 12. The embodiment of the present application is not limited to this.

[0204] As shown in Figure 14, an embodiment of the present application also provides an electronic device 1400, which includes a processor 1410. The processor 1410 includes a link training device 1411. The link training device 1411 can be the link training device 1100 as shown in Figure 11, or can be the link training device 1200 as shown in Figure 12. The embodiment of the present application does not limit this.

[0205] Optionally, the processor 1410 may be a system-on-chip, or may be a central processing unit, which is not limited in the embodiments of the present application.

[0206] An embodiment of the present application further provides a communication system, comprising a first electronic device and a second electronic device communicating with the first electronic device, wherein the first and second electronic devices are electronic devices 1400 as shown in FIG14 , wherein the first electronic device includes a link training device 1100, and the second electronic device includes a link training device 1200. For example, the communication system may be the communication system 100 as shown in FIG1 , the first electronic device may be the first device 110, and the second electronic device may be the second device 120.

[0207] Based on this, an embodiment of the present application also provides a computer-readable storage medium, which stores computer program code. When the above-mentioned processor executes the computer program code, the electronic device executes the steps performed by the first device 110 in the link training method shown in Figure 4 or Figure 7.

[0208] An embodiment of the present application further provides a computer-readable storage medium having computer program code stored therein. When the processor executes the computer program code, the electronic device executes the steps performed by the second device 120 in the link training method shown in FIG. 4 or FIG. 7 .

[0209] An embodiment of the present application further provides a computer program product. When at least one processor of an electronic device runs the computer program product, the electronic device executes the steps performed by the first device 110 in the link training method shown in FIG. 4 or FIG. 7 .

[0210] An embodiment of the present application further provides a computer program product. When at least one processor of an electronic device runs the computer program product, the electronic device executes the steps performed by the second device 120 in the link training method shown in FIG. 4 or FIG. 7 .

[0211] The above detailed description of the link training method and the analysis of the beneficial effects can be correspondingly referred to the link training device 1100, the link training device 1200, the chip module 1300, the electronic device 1400, the communication system and the computer-readable storage medium, and the embodiments of the present application will not be repeated here.

[0212] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. 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 link training method, characterized in that: Applied in a first device, the first device communicates with a second device through a main link and an auxiliary link, the transmission rate of the main link is greater than the transmission rate of the auxiliary link, and the method includes: The first device determines a state of the primary link; If the main link is in a service transmission state, the first device sends a training message through the main link.

2. The method according to claim 1, characterized in that The method further comprises: If the primary link is not in a service transmission state, the first device sends the training message through the auxiliary link.

3. The method according to claim 1 or 2, characterized in that: The main link includes a plurality of main link channels. If at least one main link channel among the plurality of main link channels is in a service transmission state, the main link is in a service transmission state.

4. The method according to any one of claims 1 to 3, characterized in that The multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

5. The method according to claim 4, characterized in that The method further comprises: The first device obtains the historical cumulative usage times of the multiple main link channels and the number of the at least one channel to be trained, and selects a main link channel with a smaller historical cumulative usage times as the at least one channel to be trained according to the historical cumulative usage times and the number of the at least one channel to be trained.

6. The method according to claim 4 or 5, characterized in that: The method further comprises: The first device obtains the number of the at least one channel to be trained according to the service bandwidth requirement information.

7. The method according to any one of claims 4 to 6, characterized in that: The process of link training of the at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking and multi-channel alignment.

8. The method according to claim 7, characterized in that The training message includes: at least one of a training start message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message or a channel alignment feedback message; Among them, the training start message is used to instruct the channel to be trained to start link training, the clock lock feedback message is used to indicate the clock lock result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel lock feedback message is used to indicate the channel lock result of the channel to be trained, and the channel alignment feedback message is used to indicate the channel alignment result of the channel to be trained.

9. The method according to claim 7 or 8, characterized in that: Each channel in the to-be-trained channels independently performs the channel clock recovery and locking, the channel equalization and the channel locking.

10. A link training method, characterized in that: Applied in a second device, the second device communicates with the first device through a main link and an auxiliary link, the transmission rate of the main link is greater than the transmission rate of the auxiliary link, and the method includes: If the main link is in a service transmission state, the second device receives a training message through the main link.

11. The method according to claim 10, characterized in that The method further comprises: If the main link is not in a service transmission state, the second device receives the training message through the auxiliary link.

12. The method according to claim 10 or 11, characterized in that: The main link includes a plurality of main link channels. If at least one main link channel among the plurality of main link channels is in a service transmission state, the main link is in a service transmission state.

13. The method according to any one of claims 10 to 12, characterized in that: The multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

14. The method according to claim 13, characterized in that The at least one channel to be trained is a main link channel with a smaller historical cumulative usage count, selected by the first device according to the historical cumulative usage counts of the multiple main link channels and the number of the at least one channel to be trained.

15. The method according to claim 13 or 14, characterized in that The number of the at least one channel to be trained is acquired by the first device according to service bandwidth requirement information.

16. The method according to any one of claims 13 to 15, characterized in that The process of link training of the at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking and multi-channel alignment.

17. The method according to claim 16, characterized in that The training message includes: at least one of a training start message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message or a channel alignment feedback message; Among them, the training start message is used to instruct the channel to be trained to start link training, the clock lock feedback message is used to indicate the clock lock result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel lock feedback message is used to indicate the channel lock result of the channel to be trained, and the channel alignment feedback message is used to indicate the channel alignment result of the channel to be trained.

18. The method according to claim 16 or 17, characterized in that Each channel in the to-be-trained channels independently performs the channel clock recovery and locking, the channel equalization and the channel locking.

19. A link training device, characterized in that: The device communicates with the second device via a main link and an auxiliary link, the transmission rate of the main link is greater than the transmission rate of the auxiliary link, and the device includes a processing module and a transceiver module; The processing module is used to determine the state of the primary link; The transceiver module is used to send a training message through the main link if the main link is in a service transmission state.

20. The device according to claim 19, characterized in that The transceiver module is further configured to send the training message via the auxiliary link if the main link is not in a service transmission state.

21. The device according to claim 19 or 20, characterized in that The main link includes a plurality of main link channels. If at least one main link channel among the plurality of main link channels is in a service transmission state, the main link is in a service transmission state.

22. The device according to any one of claims 19 to 21, characterized in that The multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

23. The device according to claim 22, characterized in that The processing module is further used to obtain the historical cumulative usage times of the multiple main link channels and the number of the at least one channel to be trained, and select a main link channel with a smaller historical cumulative usage times as the at least one channel to be trained based on the historical cumulative usage times and the number of the at least one channel to be trained.

24. The device according to claim 22 or 23, characterized in that The processing module is specifically configured to obtain the number of the at least one channel to be trained according to the service bandwidth requirement information.

25. The device according to any one of claims 22 to 24, characterized in that The process of link training of the at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking and multi-channel alignment.

26. The device according to claim 25, characterized in that The training message includes: at least one of a training start message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message or a channel alignment feedback message; Among them, the training start message is used to instruct the channel to be trained to start link training, the clock lock feedback message is used to indicate the clock lock result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel lock feedback message is used to indicate the channel lock result of the channel to be trained, and the channel alignment feedback message is used to indicate the channel alignment result of the channel to be trained.

27. The device according to claim 25 or 26, characterized in that Each channel in the to-be-trained channels independently performs the channel clock recovery and locking, the channel equalization and the channel locking.

28. A link training device, characterized in that: The apparatus communicates with the first device via a main link and an auxiliary link, the transmission rate of the main link is greater than the transmission rate of the auxiliary link, and the apparatus includes a transceiver module; The transceiver module is used to receive a training message through the main link if the main link is in a service transmission state.

29. The device according to claim 28, characterized in that The transceiver module is further configured to receive the training message via the auxiliary link if the main link is not in a service transmission state.

30. The device according to claim 28 or 29, characterized in that The main link includes a plurality of main link channels. If at least one main link channel among the plurality of main link channels is in a service transmission state, the main link is in a service transmission state.

31. The device according to any one of claims 28 to 30, characterized in that The multiple main link channels include at least one channel to be trained, and the training message is used to instruct the at least one channel to be trained to perform link training.

32. The device according to claim 31, characterized in that The at least one channel to be trained is a main link channel with a smaller historical cumulative usage count, selected by the first device according to the historical cumulative usage counts of the multiple main link channels and the number of the at least one channel to be trained.

33. The device according to claim 31 or 32, characterized in that The number of the at least one channel to be trained is acquired by the first device according to service bandwidth requirement information.

34. The device according to any one of claims 31 to 33, characterized in that The process of link training of the at least one channel to be trained includes: channel clock recovery and locking, channel equalization, channel locking and multi-channel alignment.

35. The device according to claim 34, characterized in that The training message includes: at least one of a training start message, a clock lock feedback message, an equalization feedback message, a channel lock feedback message or a channel alignment feedback message; Among them, the training start message is used to instruct the channel to be trained to start link training, the clock lock feedback message is used to indicate the clock lock result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel lock feedback message is used to indicate the channel lock result of the channel to be trained, and the channel alignment feedback message is used to indicate the channel alignment result of the channel to be trained.

36. The device according to claim 34 or 35, characterized in that Each channel in the to-be-trained channels independently performs the channel clock recovery and locking, the channel equalization and the channel locking.

37. A chip module, characterized in that: The chip module comprises: a chip and a packaging substrate, the chip is fixed to the packaging substrate, and the chip comprises a link training device as described in any one of claims 19-27, or comprises a link training device as described in any one of claims 28-36.

38. An electronic device, characterized in that: The electronic device comprises a processor, the processor comprises a link training device, and the link training device is a link training device as described in any one of claims 19-27, or a link training device as described in any one of claims 28-36.

39. A communication system, characterized in that: The communication system includes a first electronic device and a second electronic device communicating with the first electronic device, and the first electronic device and the second electronic device are the electronic devices as described in claim 38.

40. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program runs on an electronic device, the electronic device executes the link training method according to any one of claims 1 to 9, or executes the link training method according to any one of claims 10 to 18.

Citation Information

Patent Citations

  • Using an auxilary channel for video monitor training

    US20040218627A1

  • System and method for embedded displayport link training

    US7853731B1

  • Link training method and related device

    WO2022205237A1