Link training method and device, electronic equipment 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 is solved, and the effect of reducing signal transmission delay and improving training reliability is achieved.
Patent Information
- Application Number
- CN202311648888.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-06-03
AI Technical Summary
In the prior art, more time is required between devices during link training, resulting in a higher signal transmission delay.
Send training messages through the main link, and reduce the link training time using the high transmission rate of the main link; if the main link is not in the traffic transmission state, send training messages through the auxiliary link to improve training reliability.
The time required for link training is reduced, signal transmission delay is reduced, and the reliability of link training is improved.
Smart Images

Figure CN120090774A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a link training method, apparatus, electronic device, and communication system. Background Art
[0002] In order to meet the transmission requirements of 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 through cables to achieve signal transmission between devices. Among them, 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 service information, and the channels in the low-speed transmission link are used to transmit control information. Before transmitting signals between devices, the device can establish a link (referred to as establishing a link) using different numbers of channels based on the application form and service bandwidth to obtain a stable data transmission channel. This process is also called the link training process.
[0003] However, in the prior art, when link training is performed between devices, it takes a relatively long time, resulting in a high signal transmission delay. Summary of the Invention
[0004] Embodiments of this application provide a link training method, apparatus, electronic device, and communication system, which solve the problem in the prior art that when link training is performed between devices, it takes a relatively long time, resulting in a high signal transmission delay.
[0005] To achieve the above object, the embodiments of this application adopt the following technical solutions:
[0006] In a first aspect of the embodiments of this application, a link training method is provided, which is applied to a first device. The first device communicates with a second device through a main link and an auxiliary link, and the transmission rate of the main link is greater than that of the auxiliary link. The method includes: First, the first device determines the state of the main link. Then, if the main link is in a service transmission state, the first device sends a training message through the main link.
[0007] Based on this solution, when performing link training, first, the first device determines the state of the main link. Then, if the main link is in a service transmission state, the first device sends a training message through the main link. Since the transmission rate of the main link is greater than that of the auxiliary link, compared with the case where an auxiliary channel packet is sent through an auxiliary channel with a lower transmission rate when the first device and the second device are interconnected through DP, the transmission rate of the training message can be increased, thereby reducing the time required for link training and reducing the signal transmission delay.
[0008] In combination with 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.
[0009] Based on this solution, if the primary link is not in a service transmission state, the first device sends a training message through the auxiliary link. Since the reliability of data transmission through the auxiliary link is higher than that through the primary link, the first device sending the training message through the auxiliary link can improve the reliability of link training for the channel to be trained.
[0010] In combination with the first aspect, in a possible implementation, the primary link includes multiple primary link channels. If at least one of the multiple primary link channels is in a service transmission state, the primary link is in a service transmission state, or a high-speed state.
[0011] Optionally, the state of the primary link channel further includes a disable state, a channel initialization (initialize, INIT) state, a high-speed channel initial training (training) state, a high-speed channel recovery (recovery) state, and a high-speed channel low power (low power, LP) state. The embodiments of the present application do not limit this.
[0012] In combination with the first aspect, in a possible implementation, the multiple primary link channels include at least one channel to be trained, and the training message is used to instruct at least one channel to be trained to perform link training.
[0013] In combination with the first aspect, in a possible implementation, the method further includes: the first device obtains the historical cumulative usage times of the multiple primary link channels and the number of at least one channel to be trained, and selects, according to the historical cumulative usage times and the number of at least one channel to be trained, the primary link channel with fewer historical cumulative usage times as at least one channel to be trained.
[0014] Based on this solution, selecting the primary link channel with fewer historical cumulative usage times as at least one channel to be trained takes into account the problem of channel aging compared with the prior art. By training the channels to be trained with a longer remaining life to transmit data, the reliability of signal transmission can be improved.
[0015] In combination with the first aspect, in a possible implementation, the method further includes: the first device obtains the number of at least one channel to be trained according to the service bandwidth demand information.
[0016] In combination with the first aspect, in a possible implementation, the process of at least one channel to be trained performing link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.
[0017] In combination with the first aspect, in a possible implementation manner, 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 indicate the start of link training for the channel to be trained, 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.
[0018] In combination with the first aspect, in a possible implementation manner, each channel in the channel to be trained independently performs channel clock recovery and locking, channel equalization, and channel locking.
[0019] In the second aspect of the embodiments of the present application, a link training method is provided, which is applied to a second device. The second device communicates with a first device through a main link and an auxiliary link, and the transmission rate of the main link is greater than that 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.
[0020] In combination with the second aspect, in a possible implementation manner, the method further includes: if the main link is not in a service transmission state, the second device receives a training message through the auxiliary link.
[0021] In combination with the second aspect, in a possible implementation manner, the main link includes multiple main link channels. If at least one of the multiple main link channels is in a service transmission state, the main link is in a service transmission state.
[0022] In combination with the second aspect, in a possible implementation manner, the multiple main link channels include at least one channel to be trained, and the training message is used to instruct at least one channel to be trained to perform link training.
[0023] In combination with the second aspect, in a possible implementation manner, at least one channel to be trained is a main link channel with a relatively small historical cumulative usage times selected by the first device according to the historical cumulative usage times of the multiple main link channels and the number of at least one channel to be trained.
[0024] In combination with the second aspect, in a possible implementation manner, the number of at least one channel to be trained is obtained by the first device according to the service bandwidth demand information.
[0025] In combination with the second aspect, in a possible implementation manner, the process of at least one channel to be trained performing link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.
[0026] In combination with the second aspect, in a possible implementation, 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 indicate the start of link training for the channels to be trained, 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 channels to be trained, the channel lock feedback message is used to indicate the channel lock result of the channels to be trained, and the channel alignment feedback message is used to indicate the channel alignment result of the channels to be trained.
[0027] In combination with the second aspect, in a possible implementation, each channel in the channels to be trained independently performs channel clock recovery and locking, channel equalization, and channel locking.
[0028] In the third aspect of the embodiments of the present application, a link training device is provided. The device communicates with a second device through a main link and an auxiliary link. The transmission rate of the main link is greater than that of the auxiliary link. The device includes a processing module and a transceiver module. The processing module is used to determine the state of the main 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.
[0029] In combination with the third aspect, in a possible implementation, the transceiver module is further used to send a training message through the auxiliary link if the main link is not in a service transmission state.
[0030] In combination with the third aspect, in a possible implementation, the main link includes multiple main link channels. If at least one of the multiple main link channels is in a service transmission state, the main link is in a service transmission state.
[0031] In combination 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 at least one channel to be trained to perform link training.
[0032] In combination with the third aspect, in a possible implementation, the processing module is further used to obtain the historical cumulative usage times of the multiple main link channels and the number of at least one channel to be trained, and select the main link channel with fewer historical cumulative usage times as at least one channel to be trained according to the historical cumulative usage times and the number of at least one channel to be trained.
[0033] In combination with the third aspect, in a possible implementation, the processing module is specifically used to obtain the number of at least one channel to be trained according to the service bandwidth requirement information.
[0034] In combination with the third aspect, in a possible implementation, the process of at least one channel to be trained performing link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.
[0035] In combination with the third aspect, in a possible implementation, 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 indicate the start of link training for the channel to be trained, 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.
[0036] In combination with the third aspect, in a possible implementation, each channel in the channel to be trained independently performs channel clock recovery and locking, channel equalization, and channel locking.
[0037] In the fourth aspect of the embodiments of the present application, a link training device is provided. The device communicates with a first device through a main link and an auxiliary link, and the transmission rate of the main link is greater than that of the auxiliary link. The device 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.
[0038] In combination with the fourth aspect, in a possible implementation, the transceiver module is further used to receive a training message through the auxiliary link if the main link is not in a service transmission state.
[0039] In combination with the fourth aspect, in a possible implementation, the main link includes multiple main link channels. If at least one of the multiple main link channels is in a service transmission state, the main link is in a service transmission state.
[0040] In combination 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 at least one channel to be trained to perform link training.
[0041] In combination with the fourth aspect, in a possible implementation, at least one channel to be trained is a main link channel with a relatively small historical cumulative usage times selected by the first device according to the historical cumulative usage times of the multiple main link channels and the number of at least one channel to be trained.
[0042] In combination with the fourth aspect, in a possible implementation, the number of at least one channel to be trained is obtained by the first device according to the service bandwidth demand information.
[0043] In combination with the fourth aspect, in a possible implementation, the process of at least one channel to be trained performing link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.
[0044] In combination with the fourth aspect, in a possible implementation, 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 indicate the start of link training for the channels to be trained, 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 channels to be trained, the channel lock feedback message is used to indicate the channel lock result of the channels to be trained, and the channel alignment feedback message is used to indicate the channel alignment result of the channels to be trained.
[0045] In combination with the fourth aspect, in a possible implementation, each channel in the channels to be trained independently performs channel clock recovery and locking, channel equalization, and channel locking.
[0046] In the fifth aspect of the embodiments of the present application, a chip module is provided. The chip module includes a chip and a packaging substrate. The chip is fixed to the packaging substrate. The chip includes a link training device, and the link training device is the link training device described in the above third aspect or any possible implementation of the third aspect, or the link training device is the link training device described in the above fourth aspect or any possible implementation of the fourth aspect.
[0047] In the sixth aspect of the embodiments of the present application, an electronic device is provided. The electronic device includes a processor, and the processor includes a link training device. The link training device is the link training device described in the above third aspect or any possible implementation of the third aspect, or the link training device is the link training device described in the above fourth aspect or any possible implementation of the fourth aspect.
[0048] In the seventh aspect of the embodiments of the present application, a communication system is provided. The communication system 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 the electronic devices described in the above sixth aspect or any possible implementation of the sixth aspect.
[0049] In the eighth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. When the computer program runs on an electronic device, it causes the electronic device to execute the link training method described in the above first aspect or any possible implementation of the first aspect, or causes the electronic device to execute the link training method described in the above second aspect or any possible implementation of the second aspect.
[0050] In the ninth aspect of the embodiments of the present application, a computer program product is provided. When at least one processor of an electronic device runs this computer program product, the electronic device is caused to execute the link training method described in the first aspect or any possible implementation manner of the first aspect above, or the electronic device is caused to execute the link training method described in the second aspect or any possible implementation manner of the second aspect above.
[0051] For the descriptions of the second aspect to the ninth aspect in the present application, reference may be made to the detailed description of the first aspect; and for the beneficial effects described in the second aspect to the ninth aspect, reference may be made to the analysis of the beneficial effects of the first aspect, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic structural diagram of a communication system provided by an embodiment of the present application;
[0053] Figure 2 It is a schematic structural diagram of another communication system provided by an embodiment of the present application;
[0054] Figure 3 It is a schematic structural diagram of yet another communication system provided by an embodiment of the present application;
[0055] Figure 4 It is a schematic flowchart of a link training method provided by an embodiment of the present application;
[0056] Figure 5 It is a schematic structural diagram of yet another communication system provided by an embodiment of the present application;
[0057] Figure 6 It is a schematic flowchart of a link training process provided by an embodiment of the present application;
[0058] Figure 7 It is a schematic flowchart of another link training method provided by an embodiment of the present application;
[0059] Figure 8 It is a schematic flowchart of another link training process provided by an embodiment of the present application;
[0060] Figure 9 It is a schematic flowchart of yet another link training process provided by an embodiment of the present application;
[0061] Figure 10 It is a schematic flowchart of yet another link training process provided by an embodiment of the present application;
[0062] Figure 11 It is a schematic structural diagram of a link training device provided by an embodiment of the present application;
[0063] Figure 12Schematic structural diagram of another link training device provided by an embodiment of the present application;
[0064] Figure 13 Schematic structural diagram of a chip module provided by an embodiment of the present application;
[0065] Figure 14 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0066] The fabrication and use of the embodiments will be discussed in detail below. It should be understood that many applicable inventive concepts provided by the present application can be implemented in a variety of specific environments. The specific embodiments discussed are merely illustrative of specific ways of implementing and using this specification and this technology, and do not limit the scope of the present application.
[0067] Unless otherwise defined, all technical terms used herein have the same meaning as commonly understood by those of ordinary skill in the art.
[0068] Each circuit or other component may be described or referred to as "configured to" perform one or more tasks. In this case, "configured to" is used to imply a structure by indicating that the circuit / component includes a structure (such as circuitry) that performs one or more tasks during operation. Thus, even when the specified circuit / component is currently inoperable (e.g., not turned on), the circuit / component can still be referred to as configured to perform the task. A circuit / component used in conjunction with the phrase "configured to" includes hardware, such as circuitry that performs the operation, etc.
[0069] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. In the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects and indicates that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression below refers to any combination of these items, including any combination of a single item (item) or plural items (items). For example, at least one (item) 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. Additionally, in the embodiments of the present application, terms such as "first" and "second" do not limit the quantity and order.
[0070] In this application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or having more advantages than other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0071] Before introducing the embodiments of this application, the technical terms and background technology related to this application will be introduced first.
[0072] Lane: A lane is a path for transmitting signals. This lane can be unidirectional or bidirectional. Among them, a unidirectional lane includes a pair of differential signal lines, and a bidirectional lane includes two pairs of differential signal lines.
[0073] Link: A link is a collection of lanes or a conductor line for power supply. A link generally includes one or more lanes. When the lanes in the link are working, a transmitter and a receiver are respectively turned on at both ends of the lane, and data (signals) are transmitted from the transmitter to the receiver. Among them, the side where the transmitter of the link is located is called the sending end (or the transmitter side (Tx Side)), and the side where the receiver of the link is located is called the receiving end (or the receiver side (Rx Side)). A link can be divided into an uplink and a downlink. The uplink refers to the link when a device (such as a game controller) sends signals to the main device (such as a display), and the downlink refers to the link when the main device (such as a routing device) sends signals to the slave device (such as a display).
[0074] Main Link (ML): The main link is used for the transmission of high-speed data, such as the transmission of high-speed data such as audio-visual signals and third-party protocol data.
[0075] Sideband Link (SL): The sideband link is used for the transmission of low-speed data, such as the transmission of low-speed data such as device management signals, port management signals, bandwidth management signals, and power supply management signals, and is also used for the transmission of control messages. The reliability of data transmission on the sideband link is higher than that of data transmission on the main link.
[0076] Link Training: For a lane that has just been opened in a link, through processes such as channel clock recovery and locking, channel equalization, channel locking, and lane-to-lane de-skew, so that the lane can perform normal data exchange. This process is called link training and can also be called the link establishment process.
[0077] Channel Clock Recovery and Locking: During link training, the process of the channel receiver extracting the received clock from the received data packets is called channel clock recovery and locking, or channel clock recovery for short.
[0078] Channel Equalization: During link training, a signal is sent from the transmitter and transmitted through the channel to reach the receiver. During transmission, due to factors such as transmission rate, electromagnetic interference, and channel quality, the signal will be distorted, affecting the correct decision-making of the receiver on the signal. The more severe the signal distortion, the higher the bit error rate (BER, also known as the error rate), which will lead to poorer communication performance of the channel. To obtain a high-quality signal that is easy to judge at the receiver, the signal can be conditioned and improved at the transmitter, during the transmission link, or before signal decision-making at the receiver, thereby reducing the impact of signal distortion on communication performance. This process is called channel equalization, or signal compensation for short.
[0079] Channel Locking: During link training, the process by which the receiver determines when a bit symbol starts to be transmitted is called channel locking. This process can also be called determining the boundary of the data transmitted by the channel.
[0080] Multi-channel Alignment: When the link includes multiple channels, during link training, there are certain differences in the transmission delays of each channel. To ensure that after different transmission delays, the receiver can correctly combine the data received from multiple channels, it is necessary to adjust and compensate each channel. The process of adjusting and compensating each channel is called multi-channel alignment.
[0081] Training Sequence (TS): During link training, the special characters sent are called the training sequence. The training sequence includes: Logic Layer Control Frame Training Sequence 0 (LLCF_TS0), Logic Layer Control Frame Training Sequence 1 (LLCF_TS1), and Logic Layer Control Frame Training Sequence 2 (LLCF_TS2). Among them, Logic Layer Control Frame Training Sequence 0 (LLCF_TS0) is used for the channel clock recovery and locking process during link training. Logic Layer Control Frame Training Sequence 1 (LLCF_TS1) is used for the channel equalization process during link training. Logic Layer Control Frame Training Sequence 2 (LLCF_TS2) is used for the channel locking process during link training.
[0082] The technical solution provided by the embodiments of the present application can be applied to a communication system including multiple devices. Devices in this communication system can be directly connected to each other or can be connected through a routing device. Signals can be directly transmitted between devices, or signals can be transmitted between devices through an interface device and then transmitted to the processing unit inside the device through the bus inside the device.
[0083] For example, as Figure 1 shown is a schematic structural diagram of a communication system 100. This 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 by a cable to realize the signal transmission between the first device 110 and the second device 120. For example, the first device 110 can be a set-top box, and the second device 120 can be a display. Audio and video data can be transmitted between the set-top box and the display through a cable. Or, the first device 110 can be a display, and the second device 120 can be a game controller. Control information can be transmitted between the display and the game controller through a cable.
[0084] Optionally, the device 110 can include an interface device 111, and the device 120 can 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 by a cable to realize the signal transmission between the device 110 and the device 120.
[0085] Again, for example, as Figure 2 shown is a schematic structural diagram of another communication system 200. This communication system 200 includes multiple devices 210 and a routing device 220. Among them, any two of the multiple devices 210 can transmit signals through the routing device 220. For example, audio and video data can be transmitted or charging signals can be transmitted, etc. For example, the multiple devices 210 can include a display, a set-top box, and an audio player (for example, a Moving Picture Experts Group Audio Layer III (MP3) device). The set-top box can transmit audio and video data to the display through the routing device 220, and the set-top box can also transmit audio data to the audio player through the routing device 220, etc. In addition, there can be two directly connected devices among the multiple devices 210. For example, the multiple devices 210 can also include a game controller, and the game controller can be directly connected to the display by a cable and transmit control information to the display.
[0086] Optionally, each of the plurality of devices 210 may include interface means, the routing device 220 may include a plurality of interface means, and the interface means of each of the plurality of devices 210 may be coupled to one of the plurality of interface means of the routing device 220. For example, the plurality of devices 210 may include a display, a set-top box, and an audio player, the plurality of interface means of the routing device 220 may include a first interface means to a third interface means, the interface means of the display is coupled to the first interface means of the routing device 220 via a cable, the interface means of the set-top box is coupled to the second interface means of the routing device 220 via a cable, and the interface means of the audio player is coupled to the third interface means of the routing device 220 via a cable.
[0087] In the above two communication systems, the interconnected devices may be referred to as communication devices. When the communication device is an electronic device, the communication device may be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. The communication device may also be deployed on water (such as a ship, etc.), and may also be deployed in the air (such as an airplane, a balloon, a satellite, etc.). Exemplarily, the communication device may include, but is not limited to: a mobile phone, a tablet computer, a laptop computer, a handheld computer, 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-video player, a set-top box, a game console, a printer, a mouse, a keyboard, a vehicle-mounted device (such as a device on vehicles such as an automobile, a bicycle, an electric vehicle, an airplane, a ship, a train, and 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 electricity meter, etc.), a smart 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 wireless terminal in a smart home, a flight device (such as a smart robot, a hot air balloon, a drone, an airplane), etc. Optionally, the signals transmitted between the above communication devices may include, but are not limited to: audio-video signals, radio frequency signals, Internet of Things data, and charging signals, etc.
[0088] When the communication device is an interface device, the interface device can be a chip. Understandably, in this case, the above communication system is a system for interconnecting chips, and the chip can be an interface chip on an electronic device / cable / docking station / connector / router. Among them, the docking station can be plugged with a gigabit network port, a video graphics array (VGA) interface, a high-definition multimedia interface (HDMI), a TF card (trans-flash card), an SD card (secure digital memory card), a charging interface, a universal serial bus (USB) interface, etc.
[0089] In this application, when the communication device is a chip, the chip can include an interface module, that is, this application can be applied to the interface module for chip-to-chip interconnection. The interface module can be understood as an IP integrated inside the chip. Alternatively, the interface module can also be sold separately as an independent IP.
[0090] For example, when the chip is a system on chip (SoC), a central processing unit (CPU), a graphics processing unit (GPU), etc., this 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 transmission circuit and / or the receiving circuit in the die, and the chip can also be an input / output (I / O) die that only includes interface functions.
[0091] In the embodiments of this application, when signals are transmitted between devices in the communication system, the interface specifications adopted can include but are not limited to: universal serial bus (USB) interface specification, HDMI specification, display port (DP) specification, unified multimedia interconnection (UMMI) interface specification, and peripheral component interconnect express (PCIE) interface specification, etc. Correspondingly, the high-speed signal transmission interface can be an HDMI interface, a mini HDMI interface, a micro HDMI interface, a type-A interface, a type-B interface, a Micro-B, and a type-C interface, etc.
[0092] 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, and the interface standard followed is 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, and the USB interface specification is followed.
[0093] The embodiment of the present application further provides another interface standard that can replace the above interface standard (such as the USB interface or the HDMI interface): the unified media interconnecter (UMI) interface. The UMI interface also supports direct connection between devices or network connection of multiple devices (for example, devices are connected through a routing device or through a docking station), for example, the UMI interface can be applied to the devices in the above communication system 100, or applied to the devices in the communication system 200. The UMI interface can not only perform adaptive transmission of data, but also implement the function of charging. Of course, the UMI interface can also be other interface names. When the UMI interface is replaced with other interface names, other interfaces can be used to implement the functions of the UMI interface in the present application, and the embodiments of the present application do not limit this.
[0094] When devices are interconnected using the above high-speed signal transmission interface, the link between devices includes 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.
[0095] For example, as Figure 3As shown in the figure, take the example of devices in the communication system 100 being interconnected through the UMI interface. The link between the first device 110 and the second device 120 includes a primary link 130 and an auxiliary link 140. For the first device 110, the primary link 130 includes transmission channels TX0 - TXn and reception channels RX0 - RXm, and the auxiliary link 140 includes a transmission channel SBTX and a reception channel SBRX, where n and m are positive integers, and the embodiments of the present application do not limit the specific values of n and m. For the second device 120, the primary link 130 includes reception channels RX0 - RXn and transmission channels TX0 - TXm, and the auxiliary link 140 includes a reception channel SBRX and a reception channel SBRX. Among them, the maximum transmission rate of the channels in the primary link 130 is greater than the maximum transmission rate of the channels in the auxiliary link 140. For example, the maximum transmission rate of the channels in the primary link 130 is 8 gigabits per second (Gbps), and the maximum transmission rate of the channels in the 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 primary link 130, and 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 primary link 130, and the link composed of the transmission channels TX0 - TXm can be called a downlink.
[0096] Before transmitting signals between the first device 110 and the second device 120 in the communication system 100, the first device 110 and / or the second device 120 can establish a link (referred to as establishing a link) with different numbers of channels based on the application form and service bandwidth to obtain a stable data transmission channel, and this process is also called a link training process.
[0097] However, in the prior art, when devices are training the link with each other, it takes a relatively long time, resulting in a relatively high signal transmission delay.
[0098] For example, when the first device 110 and the second device 120 are interconnected through DP, first, the first device 110 and / or the second device 120 can determine the channels with the required number of channels in the primary 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 sideband packets (SBP) through the auxiliary channels to feedback signals such as link handshakes and symbol locking to implement the training of the channels in the primary link. However, due to the relatively low transmission rate of the channels in the auxiliary link, it will take a relatively long time for link training, resulting in a relatively high signal transmission delay.
[0099] For another example, when the first device 110 and the second device 120 are interconnected through a PCIE interface, first, the first device 110 and / or the second device 120 can determine a channel for the required number of channels in the main link based on the application form and service bandwidth to establish a link. Then, since the channels in the main link of the PCIE interface specification are bidirectional transmission channels composed of two pairs of differential signal lines, the first device 110 and the second device 120 can train the transmission channels and reception channels in the bidirectional transmission channel simultaneously. Specifically, the first device 110 can send a feedback signal to the second device 120 through the transmission channel in the bidirectional transmission channel, and the first device 110 can also receive the feedback signal sent by the device 120 through the reception channel in the bidirectional transmission channel. However, during the training process, 1 reception channel and 1 transmission channel in the main link are bound for training, and the transmitter and receiver are interdependent, which will result in a longer time required for link training and a higher signal transmission delay. Moreover, since 1 reception channel and 1 transmission channel in the main link are bound for training, the transmission channel or reception channel cannot be trained separately, and any number of transmission channels and reception channels cannot be trained according to the application form and service bandwidth, resulting in poor flexibility.
[0100] In summary, in the prior art, when devices are interconnected, a relatively long time is required for link training, which will result in a higher signal transmission delay. Secondly, in the prior art during link training, there is a problem that any number of transmission channels and reception channels cannot be trained according to the application form and service bandwidth, resulting in poor flexibility. Moreover, during the link training process, the problem of channel aging in the main link during long-term use is not considered, which will result in poor reliability of signal transmission.
[0101] Based on this, an embodiment of the present application provides a link training method. When performing link training, the method sends training messages through the primary link. Since the transmission rate of the primary link is greater than that of the secondary link, the link training efficiency can be improved, the time required for link training can be reduced, and the signal transmission delay can be decreased. The specific process of this method will be introduced below. Among them, the transmission rate of the primary link being greater than that of the secondary link means that: the designed transmission rate of the primary link is greater than that of the secondary link. At a specific moment, the actual transmission rate of the primary link may be less than that of the secondary link. For example, in the UMI interface standard, the configurable transmission rates of each differential channel (which can also be called the primary link channel) of the primary link include: 2 Gbps, 4 Gbps, 6 Gbps, 8 Gbps, 10 Gbps, 12 Gbps, 16 Gbps, 20 Gbps, and 24 Gbps. The rate supported by each single-ended channel (which can also be called the secondary link channel) of the secondary link is 12.5 Mbps. It can be understood that in the UMI interface standard, the designed transmission rate of the primary link is greater than that of the secondary link, but at a specific moment, such as when the primary link does not transmit data, the actual transmission rate of the primary link may be less than that of the secondary link.
[0102] As Figure 4 shown, it is a schematic flowchart of a link training method provided by an embodiment of the present application. The method includes steps S401 - S403. This 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 primary link and a secondary link. The primary link includes multiple primary link channels, and the secondary link includes at least one secondary link channel. The transmission rate of the primary link channel is greater than that of the secondary link channel. The embodiment of the present application does not limit the specific number of primary link channels included in the primary link and the specific number of secondary link channels included in the secondary link. Among them, the primary link channel is used to transmit high-speed signals (data) such as video signals and / or audio signals, and the secondary 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.
[0103] Taking this method applied to the above-mentioned communication system 100 as an example, for the first device 110, the multiple primary link channels in the primary link 130 include transmission channels TX0 - TXn, and at least one secondary link channel in the secondary link 140 includes a transmission channel SBTX. The following embodiments of the present application will be exemplarily described taking this method applied to the communication system 100 as an example.
[0104] S401. The first device 110 determines the state of the primary link 130.
[0105] 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.
[0106] 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.
[0107] For example, as Figure 5 shown, taking the main link 130 between the first device 110 and the second device 120 as an example, the main link 130 includes 8 main link channels, and the auxiliary link 140 includes 2 auxiliary link channels. For the first device 110, the main link 130 includes 6 transmit main link channels TX0 - TX5 and 2 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 6 receive main link channels RX0 - RX5 and 2 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 can be understood that for the first device 110, the multiple main link channels in the main link 130 include the transmit main link channels TX0 - TX5, and the auxiliary link channels in the auxiliary link 140 include the transmit auxiliary link channel SBTX. The first device 110 may determine the status of the main link 130 according to the status of the 6 transmit main link channels TX0 - TX5. When at least one of the 6 transmit main link channels is in a service transmission state, the main link 130 is in a service transmission state.
[0108] 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 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.
[0109] The above service transmission state may also be referred to as a high - speed (HS) service transmission state, or an active state, or a high - speed state. The main link channel in this state is a channel with successful training and can perform high - speed service transmission.
[0110] Optionally, the states of the primary link channel further include a disable state, a channel initialization (initialize, INIT) state, a high-speed channel initial training state, a high-speed channel recovery state (which can also be referred to as the high-speed channel retraining state), and a high-speed channel low-power (low power, LP) state. The embodiments of the present application do not limit this. Among them, the disable state refers to the state when the primary link channel is not powered on. The channel initialization state refers to the state after the primary link channel is powered on. The high-speed channel initial training state refers to the state when the primary link channel is in the process of link training. The high-speed channel recovery state refers to the state when the primary link channel is in the process of executing channel recovery. The high-speed channel low-power state refers to the state where there is no high-speed service transmission and the primary link channel is in a low-power state.
[0111] 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.
[0112] For example, as Figure 5 shown, taking the case where, for the first device 110, among the 6 transmit primary link channels of TX0 - TX5, the 2 primary link channels of TX2 and TX3 are in a service transmission state. When the first device 110 recognizes that the 2 transmit primary link channels of TX2 and TX3 are in a service transmission state, it can determine that the primary link 130 is in a service transmission state, and the first device 110 can select the primary link 130 to send a training message. Compared with the case where the first device 110 and the second device 120 are interconnected through DP and the auxiliary channel packets are sent through the auxiliary channel with a lower transmission rate, since the transmission rate of the primary link is greater than that 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.
[0113] The above-mentioned multiple primary 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. The embodiments of the present application do not limit the specific number of the at least one channel to be trained. Among them, the channel to be trained refers to: before link training, a channel that is not in a service transmission state but needs to enter the service transmission state through training.
[0114] The above training message can also be referred to as a logical layer management packet (LLMP). Among them, when sending a logical layer management packet through the main link channel (such as the transmit main link channel TX2 in the main link 130) between the first device 110 and the second device 120, this link management packet can be called a logical layer main link management packet (LLMMP). When sending a logical layer management packet through the sideband link channel (such as the transmit sideband link channel SBTX in the sideband link) between the first device 110 and the second device 120, this link management packet can be called a logical layer sideband link management packet (LLSMP).
[0115] In a possible embodiment, as Figure 6 shown, before the above-mentioned channel to be trained starts link training, it is in the channel initialization state. The process of the channel to be trained for link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment. First, the channel performs channel clock recovery and locking training. If it times out or the channel clock cannot be locked, the state of the channel enters the initialization state again. If the channel successfully completes the channel clock recovery and locking training, the channel starts channel equalization training. If it times out or the channel equalization training fails, the state of the channel enters the channel initialization state again. If the channel successfully completes the channel equalization training, the channel starts channel locking training. If it times out or the channel locking training fails, the state of the channel enters the channel initialization state again. If the channel successfully completes the channel locking 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 state of the channel enters the initialization state again.
[0116] In a possible embodiment, when each channel in the channel to be trained is being trained, it independently performs channel clock recovery and locking, channel equalization, and channel locking.
[0117] It should be noted that in the embodiments described in the present invention, each main link channel is trained independently, and the main link channel is a part of the main link. Unless otherwise specified, the channel training described in the present invention is equivalent to link training.
[0118] In a possible embodiment, the above training messages include at least one of a training start message (which may also be 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). Among them, the lane training start message is used to indicate the start of link training for the lane to be trained, 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 lane to be trained, the lane lock feedback message is used to indicate the lane lock result of the lane to be trained, and the de-skew feedback message is used to indicate the de-skew result of the lane to be trained.
[0119] For example, when performing channel clock recovery and lock training on the lane to be trained, the training message may include a lane training start message. When performing channel equalization training on the lane to be trained, the training message may include an equalization feedback message.
[0120] Optionally, the lane to be trained may be a transmit channel in the primary link 130 and / or a receive channel in the primary link 130 for the first device 110. The embodiments of the present application do not limit this. In the following embodiments, the case where the lane to be trained is a transmit channel in the primary link 130 for the first device 110 is used as an example for illustrative purposes.
[0121] In a possible embodiment, the first device 110 selecting at least one lane to be trained from multiple primary link channels may include multiple possible implementation manners, which are described in detail below.
[0122] In the first possible implementation manner, the first device 110 randomly selects a primary link channel from multiple primary link channels as at least one lane to be trained, including the following steps: First, the first device 110 obtains the number of at least one lane to be trained. Then, according to the number of at least one lane to be trained, it randomly selects a primary link channel from multiple primary link channels as at least one lane to be trained.
[0123] For example, as Figure 5As shown in the figure, taking the example where for the first device 110, among the 6 transmit main link channels of TX0 - TX5, 2 transmit main link channels of TX2 and TX3 are in the 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 at least one channel to be trained, the first device 110 can randomly select 2 main link channels from the 4 main link channels of TX0, TX1, TX4, and TX5 as at least one channel to be trained. For example, select the two main link channels of TX0 and TX4 as at least one channel to be trained.
[0124] In a second possible implementation manner, the above-mentioned multiple main link channels respectively correspond to a number. The first device 110 sequentially selects main link channels from the multiple main link channels as at least one channel to be trained according to the number sequence and the numbers 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, based on the number of at least one training channel, the first device 110 sequentially selects main link channels from the multiple main link channels as at least one channel to be trained according to the number sequence and the numbers of each main link channel.
[0125] In a possible embodiment, the numbers of each main link channel can be preset, and it is not necessary to number each main link channel before each selection of the channel to be trained. Or, the first device 110 can number each main link channel before each selection of at least one channel to be trained. The embodiments of the present application do not limit this.
[0126] In a possible embodiment, characters can be used to number each main link channel. For example, numbers can be used to number each main link channel, or letters can be used to number each main link channel. The embodiments of the present application do not limit this. In the following embodiments, taking the example of using numbers to number each main link channel, an exemplary description is given.
[0127] Optionally, when the first device 110 uses numbers to number each main link channel, the main link channels can be numbered in ascending order of numbers, or in descending order of numbers. The embodiments of the present application do not limit this. In the following embodiments, taking the example that the first device 110 numbers each main link channel in ascending order of numbers, an exemplary description is given.
[0128] For example, as Figure 5As shown, for the first device 110, the six transmit main link channels TX0 - TX5 are numbered 0 - 5 respectively. Among the six transmit main link channels TX0 - TX5, the two transmit main link channels TX2 and TX3 are in the service transmission state, and taking the number of at least one channel to be trained as 2 as an example. First, the first device 110 can obtain the number 2 of at least one channel to be trained. Then, according to the number 2 of at least one channel to be trained, in the ascending order of the numbers and the numbers 0 - 5 of the six transmit main link channels TX0 - TX5, the first device 110 can select the two main link channels, namely the main link channel TX0 corresponding to the number 0 and the main link channel TX1 corresponding to the number 1, from the four transmit main link channels TX0, TX1, TX4, and TX5 as at least one channel to be trained.
[0129] In a third possible implementation manner, the first device selects a main link channel as at least one channel to be trained based on the historical cumulative usage times 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 times of multiple main link channels, and the historical cumulative usage times of the multiple main link channels are used to indicate the lifetimes of the multiple main link channels. Finally, the first device 110 selects the main link channels with fewer historical cumulative usage times as at least one channel to be trained according to the historical cumulative usage times and the number of at least one channel to be trained. It can be understood that when the first device 110 selects a channel to be trained, it selects the main link channels with fewer historical usage times as at least one channel to be trained. The remaining lifetimes of the at least one channel to be trained are longer. Compared with the prior art, the problem of channel aging is considered. By transmitting data through the channels to be trained with longer remaining lifetimes, the reliability of signal transmission can be improved.
[0130] For example, as Figure 5 shown, for the first device 110, among the six transmit main link channels TX0 - TX5, the two transmit main link channels TX2 and TX3 are in the service transmission state, and taking the number of at least one channel to be trained as 2 as an example. 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 times of the six transmit main link channels TX0 - TX5, where the historical cumulative usage times of the four main link channels TX0, TX1, TX4, and TX5 decrease in turn. Finally, the first device 110 selects the two main link channels TX4 and TX5 with fewer historical cumulative usage times from the four main link channels TX0, TX1, TX4, and TX5 as at least one channel to be trained according to the historical cumulative usage times and the number 2 of at least one channel to be trained.
[0131] In a possible embodiment, the first device 110 may use a non-volatile memory to record the historical cumulative usage times of multiple primary link channels. For example, whenever the primary link channel training is successful and in the service transmission state, the first device 110 increments the historical cumulative usage times of the primary link channel by 1 and stores the updated historical cumulative usage times in the non-volatile memory.
[0132] In a possible embodiment, the first device 110 obtaining the number of at least one channel to be trained includes: the first device 110 obtaining the number of at least one channel to be trained according to the service bandwidth requirement information.
[0133] 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 primary link channel.
[0134] The above service bandwidth requirement information is used to indicate: when the first device 110 and the second device 120 perform service transmission, the transmission rate of the sending link requirement and / or the transmission rate of the receiving link requirement. The embodiments of the present application do not limit this. The embodiments of the present application take the service bandwidth requirement information as an example to illustrate the transmission rate of the sending link requirement when the first device 110 and the second device 120 perform service transmission.
[0135] In a possible embodiment, if at least one of the multiple primary link channels is in the service transmission state, the first device 110 obtaining the number of at least one channel to be trained according to the service bandwidth requirement information and the signal transmission rate of the primary link channel includes: the first device 110 obtaining the number of at least one channel to be trained according to the difference between the quotient of the service bandwidth requirement information and the signal transmission rate of the primary link channel and the number of channels included in at least one primary link channel.
[0136] For example, taking the above at least one primary link channel including 2 channels, the service bandwidth requirement information indicating that the transmission rate of the sending link requirement is 32 Gbps, and the transmission rate of the primary link channel is 8 Gbps as an example. The first device 110 may obtain the number of at least one channel to be trained according to the difference between the quotient 4 of the service bandwidth requirement information 32 Gbps and the signal transmission rate 8 Gbps of the primary link channel and the number of channels 2 included in at least one primary link channel, and obtain the number of at least one channel to be trained as 2 (32 / 8 - 2 = 2).
[0137] In a possible embodiment, if there is at least one main link channel not in the service transmission state among multiple main link channels, the first device 110 obtains the number of at least one channel to be trained according to 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 according to the quotient of the service bandwidth requirement information and the signal transmission rate of the main link channel.
[0138] For example, taking the case where there is at least one main link channel not in the service transmission state among multiple main link channels, the service bandwidth requirement information indicates that the transmission rate required for the sending link is 32 Gbps, and the transmission rate of the main link channel is 8 Gbps as an example. The first device 110 can obtain the number of at least one channel to be trained, which is 4, according to the quotient 4 of the service bandwidth requirement information 32 Gbps and the signal transmission rate 8 Gbps of the main link channel (32 / 8 = 4).
[0139] S403. The second device 120 receives the training message through the main link 130.
[0140] For example, as Figure 5 shown, taking the case where, for the first device 110, among the 6 sending main link channels TX0 - TX5, the 2 sending main link channels TX2 and TX3 are in the service transmission state as an example. The second device 120 can receive the training message through the 2 sending main link channels TX2 and TX3 in the main link 130.
[0141] In the link training method provided by the embodiments of the present application, when performing link training, first, the first device 110 determines the state of the main link 130. Then, if the main link 130 is in the 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. Since the transmission rate of the main link 130 is greater than that of the auxiliary link 140, compared with the case where the first device 110 and the second device 120 are interconnected through 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 improved, thereby reducing the time required for link training and reducing the signal transmission delay. And, compared with the case where the first device 110 and the second device 120 are interconnected through a PCIE interface and 1 receiving channel and 1 sending channel need to be bound for training during the training process, any number of sending channels or receiving channels can be trained separately according to the application form and service bandwidth, which can improve flexibility.
[0142] As Figure 7As shown, in a possible embodiment, the link training method provided by the embodiments of the present application, in addition to the above steps S401 - S403, further includes steps S404 - S405. When performing steps S402 - S403 and steps S404 - S405, the first device 110 and the second device 120 can determine the state of the main link 130 according to the first device 110, and determine to execute steps S402 - S403, or execute steps S404 - S405.
[0143] S404. If the main link 130 is not in the service transmission state, the first device 110 sends a training message through the auxiliary link 140.
[0144] For example, as Figure 5 shown, taking the case where, for the first device 110, the channels in the 6 transmission main link channels of TX0 - TX5 are all channels that have not been successfully trained as an example. It can be understood that at this time, the main link 130 is not in the service transmission state, and the first device 110 can send a training message through the transmission auxiliary channel SBTX of the first device 110 in the auxiliary link 140. Since the reliability of data transmission through the auxiliary link 140 is higher than that of data transmission through the main link 130, the first device 110 sending a training message through the auxiliary link 140 can improve the reliability of link training for the channels to be trained.
[0145] In a possible embodiment, when the first device 110 fails to send a training message through the main link 130, or in order to improve the reliability of link training, it can also send a training message through the auxiliary link 140.
[0146] S405. The second device 120 receives the training message through the auxiliary link 140.
[0147] For example, as Figure 5 shown, taking the case where, for the first device 110, the channels in the 6 transmission channels of TX0 - TX5 are all channels that have not been successfully trained as an example. It can be understood that at this time, the main link 130 is not in the service transmission state, and the second device 120 can receive the training message through the auxiliary link 140.
[0148] In the link training method provided by the embodiments of the present application, when performing link training, first, the first device 110 determines the state of the main link 130. Then, if the main link 130 is not in the service transmission state, the first device 110 sends a training message through the auxiliary link 140. Finally, the second device 120 receives the training message through the auxiliary link 140 to perform link training on the channels to be trained. Since the reliability of data transmission through the auxiliary link 140 is higher than that of data transmission through the main link 130, the first device 110 sending a training message through the auxiliary link 140 can improve the reliability of link training for the channels to be trained.
[0149] As shown in Figure 8 (a) of FIG. [0000331], in a possible implementation, when the link training method provided by the embodiments of the present application is applied to the communication system 100 above, 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 channels to be trained, and after the training of the channels to be trained fails, reselect the channels to be trained, or end the link training process. The channel management module 810 includes a lane state machine (LNSM), and this lane state machine is used to record the states of the channels between the first device 110 and the second device 120, so that the first device 110 and the second device 120 can identify the states of each channel. As shown in Figure 8 (b) of FIG. [0000332], taking the states of the channels including the channel initialization state, the high-speed channel initial training state, and the service transmission state as an example, when the channel is powered on and is in the channel initialization state, the lane state machine can record the state of the channel as the channel initialization state. When this channel starts link training, the state of the channel enters the high-speed channel initial training state from the channel initialization state, and the lane state machine can record the state of the channel as the high-speed channel initial training state. If the training of this channel fails, the state of this channel enters the channel initialization state, and the lane state machine can record the state of the channel as the channel initialization state. If the training of this channel is successful, the state of this channel enters the service transmission state, and the lane state machine can record the state of the channel as the service transmission state. When this channel exits the service transmission state, the state of this channel enters the channel initialization state again, and the lane state machine can record the state of the channel as the channel initialization state. The channel training module 820 is used to train the channels to be trained.
[0150] As shown in Figure 8 (a) of FIG. [0000335], the channel management module 810 is further used to control the channel training module 820 to start training the channels to be trained. The channel training module 820 is further used to return the training results of the channels to be trained to the channel management module 810.
[0151] In a possible embodiment, the channel management module 810 and the channel training module 820 can correspond to two independent chips, and the interface device 121 can include an interface circuit composed of these two chips. Or, the channel management module 810 and the channel training module 820 can correspond to the same interface chip, and the interface device 121 can include this interface chip. The embodiments of the present application do not limit this.
[0152] To facilitate understanding of the link training method provided by the embodiments of the present application, the following combines Figure 5, using the link training method provided by the embodiments of the present application in the first device 110, first determine the number of at least one channel to be trained according to the service bandwidth requirement information and the signal transmission rate of the main link channel, and then determine, taking the transmission main link channels TX3 - TX5 in the main link 130 of the first device 110 as at least one channel to be trained according to the number of at least one channel to be trained and the historical cumulative usage times of multiple main link channels, an exemplary description will be given of the specific process of the link training method provided by the embodiments of the present application when applied to link training.
[0153] In the link training method provided by the embodiments 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. Taking the transmission channel TX3 as an example below, an exemplary description will be given of the training processes of channel clock recovery and locking, channel equalization, and channel locking.
[0154] As Figure 9 shown, when performing channel clock recovery training on the above-mentioned transmission channel TX3, the following steps are included:
[0155] (1) The first device 110 continuously sends a logical layer control frame training sequence 0 (LLCF_TS0) to the second device 120 through the transmission channel TX3 (RX3 for the second device 120). For example, this logical layer control frame training sequence 0 (LLCF_TS0) can be: the payload is 0xAA of any length, and the embodiments of the present application do not limit this.
[0156] (2) The first device 110 identifies whether there is at least one transmission channel in the transmission channels TX0 - TX2 in the main link 130 that is in a service transmission state for the first device 110. For example, taking the first device 110 identifying that the transmission channel TX0 in the transmission channels TX0 - TX2 is in a service transmission state as an example, the first device 110 can send a channel training start message (LTSM) to the second device 120 through this transmission channel TX0, and this channel training start message (LTSM) is used to indicate that the transmission channel TX3 starts 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 this transmission channel TX0 can improve the transmission rate of the training message, thereby reducing the time required for link training and reducing the signal transmission delay.
[0157] In a possible embodiment, the first device 110 sends a channel training start message (LTSM) while sending a 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), so as to ensure that after receiving the channel training start message (LTSM), the second device 120 can immediately start channel clock recovery training, which can reduce the time consumed by channel clock recovery training, improve link training efficiency, and reduce signal transmission delay.
[0158] (3) The second device 120 receives the logical layer control frame training sequence 0 (LLCF_TS0) through the receiving channel RX3 (TX3 for the first device 110 as the sending channel), and receives the channel training start message (LTSM) through the receiving channel RX0 of the second device 120 (TX0 for the first device as the above-mentioned sending channel), and starts channel clock locking in the above-mentioned receiving channel RX3 according to the channel training start message (LTSM).
[0159] (4) If the second device 120 cannot lock the clock in the above-mentioned receiving channel RX3, the second device 120 can identify whether at least one sending channel in the sending channels TX0 - TX1 in the main link 120 is in a service transmission state for the second device 120. For example, taking the second device 120 identifying that the sending channel TX1 in the sending channels TX0 - TX1 is in a service transmission state as an example, the second device 120 can send a clock locking feedback message (CLFM) to the first device 110 through the sending channel TX1. The clock locking feedback message (CLFM) is used to indicate that the above-mentioned receiving channel RX3 cannot lock the clock, and is also used to indicate the first device 110 to adjust the parameters when sending signals through the sending channel TX3. It can be understood that since the transmission rate of the sending channel TX1 of the second device 120 is greater than the transmission rate of the sending channel SBTX in the auxiliary link 140, sending the channel training start message (LTSM) through the sending channel TX0 can improve the transmission rate of the training message, thereby reducing the time required for link training and reducing signal transmission delay.
[0160] Combining step (2) and step (4), it can be understood that when the link training method provided by the embodiments of the present application is applied to the communication system 100, either the first device 110 or the second device 120 can be used as the sending end and adopt the link training method provided by the embodiments of the present application. When the first device 110 or the second device 120 sends a training message (which can also be referred to as a logical layer management packet (LLMP)), the training message can be sent through the sending channel in the primary link 130, and the transmission rate of the sending channel in the primary link 130 is greater than that of the sending channel in the secondary link 140. Therefore, the transmission rate of the training message can be increased, the time required for link training can be reduced, and the signal transmission delay can be decreased.
[0161] (5) The first device 110 receives a clock lock feedback message (CLFM) through the receiving channel RX1 (TX1 for the second device 120), and adjusts the parameters when the sending channel TX3 sends a signal according to the clock lock feedback message (CLFM).
[0162] (6) After the first device 110 completes the adjustment of the parameters when the sending channel TX3 sends a signal, it continuously sends a logical layer control frame training sequence 0 (LLCF_TS0) to the second device 120 through the sending channel TX3 again, and sends a clock lock feedback message acknowledgement (CLFM_ACK) to the second device 120 through the above-mentioned sending channel TX0. The clock lock feedback message acknowledgement (CLFM_ACK) is used to indicate that the adjustment of the parameters when the sending channel TX3 sends a signal is completed.
[0163] In a possible embodiment, to avoid the problem of loss of the clock lock feedback message (CLFM) when the second device 120 sends the clock lock feedback message (CLFM) to the first device 110, the embodiment of the present application provides a logical layer management packet (LLMP) retransmission mechanism. The logical layer management packet (LLMP) retransmission mechanism includes: after the second device 120 sends the clock lock feedback message (CLFM), if it does not receive the clock lock feedback message acknowledgement (CLFM_ACK) sent by the first device 110 within the tCLFMAck time, the second device 120 continuously re-sends the clock lock feedback message (CLFM) to the first device 110 through the sending 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 embodiment of the present application also provides a handshake exception reporting mechanism, which includes: if the second device 120 does not receive the clock lock feedback message acknowledgement (CLFM_ACK) replied by the first device 110 after re-sending the clock lock feedback message acknowledgement (CLFM_ACK) LMP_MaxReSendTime times, the second device 120 sends an error report (errorreport, ERR-RPT) to the first device, and the error report is used to indicate that there is an exception in the handshake of the logical layer management packet (LLMP) between the first device 110 and the second device 120. The equalization feedback message (EQFM) and the channel lock feedback message (LLFM) in the following embodiments of the present application both follow the same logical layer management packet (LLMP) retransmission and handshake exception reporting mechanisms, and will not be elaborated in the following embodiments of the present application.
[0164] (7) After the second device 120 receives the clock lock feedback message acknowledgement (CLFM_ACK) through the receiving channel RX0 (for the first device 110, it is the sending channel TX0), it starts to re-perform channel clock locking. If it still cannot lock the clock on the receiving channel RX3 of the second device 120, the second device 120 executes the above step (4) again. If it can lock the clock at the receiving end of the sending channel TX3, the second device 120 sends the clock lock feedback message (CLFM) to the first device 110 through the sending channel TX1, and the clock lock feedback message (CLFM) is used to indicate that the clock locking on the receiving channel RX3 is completed. After that, the first device 110 can feedback the acknowledgement message corresponding to the clock lock feedback message (CLFM), and start to execute channel equalization training.
[0165] As Figure 10 shown, when performing channel equalization training on the above sending channel TX3, the following steps are included:
[0166] (1) The first device 110 continuously sends the logical layer control frame training sequence 1 (LLCF_TS1) to the second device 120 through the sending channel TX3 (which is the receiving channel RX3 for the second device 120). For example, the logical layer control frame training sequence 1 (LLCF_TS1) can be: the payload is a pseudo random binary sequence (PRBS) 11 sequence generated with the seed 0x7FF and the polynomial G(x) = x11 + x2 + 1. The embodiments of the present application do not limit this.
[0167] (2) The second device 120 receives the logical layer control frame training sequence 1 (LLCF_TS1) through the receiving channel RX3 (which is the above-mentioned sending channel TX3 for the first device 110), performs equalization training based on the logical layer control frame training sequence 1 (LLCF_TS1), and evaluates whether the equalization training of the sending channel TX3 meets the expectation. If it does not meet the expectation, the second device 120 can send an equalization feedback message (EQFM) to the first device 110 through the above-mentioned sending channel TX1 (which is the 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 when sending signals through the sending channel TX3.
[0168] (3) The first device 110 receives the equalization feedback message (EQFM) through the receiving channel RX1 (which is the sending channel TX1 for the second device 120), and adjusts the parameters when the first device 110 sends signals through the sending channel TX3 according to the equalization feedback message (EQFM).
[0169] (4) After the first device 110 finishes adjusting the parameters when sending signals through the sending channel TX3, it continuously sends the logical layer control frame training sequence 1 (LLCF_TS1) to the second device 120 through the above-mentioned sending channel TX3 again, and sends an equalization feedback message acknowledgement (EQFM_ACK) to the second device 120 through the above-mentioned sending channel TX0. The equalization feedback message acknowledgement (EQFM_ACK) is used to indicate that the parameter adjustment when sending signals through the sending channel TX3 is completed.
[0170] (5) After the second device 120 receives the equalization feedback message acknowledgement (EQFM_ACK) through the receiving channel RX0, it starts to perform equalization training again and evaluates whether the equalization training meets the expectation. If it does not meet the expectation, the second device 120 executes the above step (2) again. If it meets the expectation, the second device 120 sends an equalization feedback message (EQFM) to the first device 110 through the sending channel TX1. The equalization feedback message (EQFM) is used to indicate that the channel equalization training of the sending channel TX3 is completed.
[0171] (6) The first device 110 receives an equalization feedback message (EQFM) through the receiving channel RX1, determines that the transmission channel TX3 has completed channel equalization training according to the equalization feedback message (EQFM), can switch the pattern of the training sequence transmitted through the transmission channel TX3, and feeds back a response message corresponding to the equalization feedback message (EQFM) to the second device 120, and starts to perform channel locking training.
[0172] When performing channel locking training on the above-mentioned transmission channel TX3, the following steps are included:
[0173] (1) The first device 110 continuously sends a logical layer control frame training sequence 2 (LLCF_TS2) to the second device 120 through the transmission channel TX3. Exemplarily, the logical layer control frame training sequence 2 (LLCF_TS2) can be: a sequence with a fixed length of 8 bytes and a payload that is the bitwise inversion of the logical layer control frame training sequence 1 (LLCF_TS1). For example, the logical layer control frame training sequence 2 (LLCF_TS2) can be: the above-mentioned payload is a PRBS11 sequence generated with a seed of 0x7FF and a polynomial G(x) = x^11 + x^2 + 1, and the sequence generated by bitwise inversion.
[0174] (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 pattern of the logical layer control frame training sequence 2 (LLCF_TS2), identifies the start point and end point of the logical layer control frame training sequence 2 (LLCF_TS2), and completes channel locking training when the matching is successful.
[0175] Among them, the locking state of the receiving channel RX3 includes: out-of-lock state, alignment state, and locked state. The out-of-lock state is the default state at the start of channel locking. When the locking state of the channel receiving end is in the out-of-lock state, the receiving end of the channel continuously receives and detects the bit stream and matches it with the logical layer control frame training sequence 2 (LLCF_TS2). When the matching is successful, the data boundary alignment is completed, the current boundary alignment position is recorded, and the alignment state is entered. When the locking state of the channel receiving end is in the alignment state, the receiving end of the channel continuously receives and detects the bit stream according to the recorded boundary alignment position and matches it with the LLCF_TS2. If a continuous number (for example, 4) of logical layer control frame training sequences 2 (LLCF_TS2) are successfully matched, the locking state of the channel receiving end enters the locked state. If the continuous logical layer control frame training sequence 2 (LLCF_TS2) cannot be successfully matched, the locking state of the channel receiving end enters the out-of-lock state. When the locking state of the channel receiving end is in the locked state, the channel completes channel locking training.
[0176] In a possible embodiment, when the transmission channel TX3 of the first device 110 performs channel lock training, the time of the channel lock training can be recorded, and based on this time, it is determined whether the transmission channel has successfully completed the channel lock training. If the transmission channel TX3 completes the channel lock within the tLaneLockTimeout time, it is regarded as a successful channel lock. If the transmission channel TX3 does not complete the channel lock within the tLaneLockTimeout time, it is regarded as a failed channel lock. The tLaneLockTimeout is a preset constant, and the specific value of this preset constant is not limited in the embodiments of the present application.
[0177] (3) The second device 120 sends a channel lock feedback message (LLFM) to the first device 110 through the above-mentioned transmission channel TX1. The channel lock feedback message (LLFM) is used to indicate whether the transmission channel TX3 has successfully completed the channel lock training.
[0178] (4) The first device 110 receives the channel lock feedback message (LLFM) through the reception channel RX1, and determines whether the transmission channel TX3 has successfully completed the channel lock training according to the channel lock feedback message (LLFM). When the first device 110 confirms that the transmission channel TX3 has successfully completed the channel lock training, it performs multi-channel alignment training on the transmission channel TX3 together with other to-be-trained channels that have completed the channel lock.
[0179] For example, taking the to-be-trained channels TX3 - TX5 above as an example, where the transmission channels TX3 - TX4 have successfully completed the channel lock training and the transmission channel TX5 has not successfully completed the channel lock training. The first device 110 sets the state of the transmission channel TX5 to the channel initialization state and continues to perform multi-channel alignment training on the transmission channels TX3 - TX4.
[0180] When performing multi-channel alignment training on the transmission 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 before leaving the factory, and the normal mode refers to the multi-channel alignment training after leaving the factory. For example, it is applied to the scenario where 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 various types of logical layer control frame training sequences (LLCF). For example, a logical layer training sequence de-skew test sequence (LLCF_DST) is provided, which is used for multi-channel alignment training in the test mode, and a logical layer training sequence data start sequence (LLCF_DS) is provided, which is used for multi-channel alignment training in the normal mode.
[0181] When performing multi-channel alignment training on the transmission channels TX3 - TX4 in test mode, the following steps are included:
[0182] (1) The first device 110 simultaneously sends 1 logical layer control frame training deviation cancellation test sequence (LLCF_DST) through the transmission channel TX3 and the transmission channel TX4.
[0183] (2) The second device 120 receives the logical layer control frame training deviation cancellation test sequence (LLCF_DST) through the reception channel RX3 (which is the transmission channel TX3 for the first device 110) and the reception channel RX4 (which is the transmission channel TX4 for the first device 110), determines the current alignment mode as test mode based on these 2 logical layer control frame training deviation cancellation test sequences (LLCF_DST), and performs multi-channel alignment training based on these 2 logical layer control frame training deviation cancellation 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 transmission channel TX1, and this channel alignment feedback message (DSFM) is used to indicate whether the multi-channel alignment training of the transmission channels TX3 - TX4 is successfully completed.
[0184] (3) The first device 110 can receive the channel alignment feedback message (DSFM) through the reception channel RX1 (which is the transmission channel TX1 for the second device 120), determine the test result based on this channel alignment feedback message (DSFM), and report the test result to the test software.
[0185] When performing multi-channel alignment training on the transmission channels TX3 - TX4 in normal mode, the following steps are included:
[0186] (1) The first device 110 simultaneously sends 1 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.
[0187] (2) The second device 120 receives 2 logical layer control frame training data start sequences (LLCF_DS) through the reception channel RX3 and the reception channel RX4, determines the current alignment mode as normal mode based on these 2 logical layer control frame training data start sequences (LLCF_DS), and performs multi-channel alignment training based on these 2 logical layer control frame training data start sequences (LLCF_DS).
[0188] (3) If the second device 120 detects an abnormality in multi-channel alignment, for example, the skew of the multi-channel logical layer control frame training deviation elimination test sequence (LLCF_DST) exceeds the preset range, or some of the transmission channels cannot 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.
[0189] (4) The first device 110 may receive the abnormality report (ERR-RPT), determine that there is an abnormality in de-skewing of the transmission channels TX3-TX4 according to the abnormality report (ERR-RPT), enter the channel initialization state for the transmission channels TX3-TX4, report the abnormality report (ERR-RPT), and re-perform link training on the transmission channels TX3-TX4.
[0190] (5) If the second device 120 does not detect an abnormality in multi-channel alignment, the state of the transmission channels TX3-TX4 enters the service transmission state, and the transmission channels TX3-TX4 start to transmit high-speed data.
[0191] Combined with the above link training process, it can be understood that when the link training method provided in the embodiments of the present application is applied to the link training process, the first device 110 or the second device 120 transmits training messages through the transmission channels in the main link 130, which can improve the transmission rate of the training messages, thereby reducing the time required for link training and reducing the signal transmission delay.
[0192] Figure 11 The structural schematic diagram of a link training device 1100 is shown. The link training device 1100 may be the sending device in the above embodiments, or may be a chip in the sending device. The link training device 1100 may be used to implement the link training method in any of the above embodiments.
[0193] The link training device 1100 includes: a processing module 1101 and a transceiver module 1102. Exemplarily, the transceiver module 1102 is used to support the link training device 1100 in sending and receiving signals, or for communicating with other devices. The processing module 1101 is used to control and manage the actions of the link training device 1100, and is used to perform the processing performed by the link training device 1100 in the above embodiments. Optionally, if the link training device 1100 includes a storage unit, the processing module 1101 may also execute the programs or instructions stored in the memory, so that the link training device 1100 implements the methods and functions involved in any of the above embodiments.
[0194] In a possible embodiment, the processing module 1101 may be used to implement the functions of the above-mentioned channel management module 810, and the transceiver module 1102 may be used to implement the functions of the above-mentioned channel training module 820.
[0195] Exemplarily, the above-mentioned processing module 1101 may be used to execute, for example Figure 4 step S401 in, and / or other processes of the technologies described herein. The transceiver module 1102 may be used to execute, for example Figure 4 step S402 in, and / or other processes of the technologies described herein. Among them, all relevant contents of each step involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be elaborated herein.
[0196] Exemplarily, in terms of hardware implementation, the functions of the processing module 1101 may be executed by a processor, and the functions of the transceiver module 1102 may be executed by a transceiver (transmitter / receiver) and / or a communication interface. Among them, the processing module 1101 may be embedded in the processor of the link training device 1100 in a hardware form or be independent of the processor, or may be stored in the memory of the link training device 1100 in a software form, so as to facilitate the processor to call and execute the operations corresponding to the above respective functional units.
[0197] Figure 12 FIG. 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 also be a chip in the receiving device. The link training device 1200 may be used to implement the link training method of any of the above embodiments.
[0198] The link training device 1200 includes: a processing module 1201 and a transceiver module 1202. Exemplarily, the transceiver module 1202 is used to support the link training device 1200 to send and receive signals, or to communicate with other devices. The processing module 1201 is used to control and manage the actions of the above-mentioned link training device 1200, and is used to execute the processing performed by the link training device 1200 in the above embodiment. Optionally, if the link training device 1200 includes a storage unit, the processing module 1201 may also execute the programs or instructions stored in the memory, so that the link training device 1200 can implement the methods and functions involved in any of the above embodiments.
[0199] In a possible embodiment, the processing module 1201 may be used to implement the functions of the above-mentioned channel management module 810, and the transceiver module 1202 may be used to implement the functions of the above-mentioned channel training module 820.
[0200] Exemplarily, the above-mentioned transceiver module 1202 may be used to execute, for example Figure 4Step S403 in, and / or other processes for the technologies described herein. All relevant content of each step involved in the above method embodiments can be cited in the function descriptions of the corresponding functional modules, and will not be elaborated here.
[0201] Exemplarily, in terms of hardware implementation, the functions of the processing module 1201 can be executed by a processor, and the functions of the transceiver (transmitter / receiver) and / or communication interface can be executed by the transceiver module 1202. Among them, the processing module 1201 can be embedded in the processor of the link training device 1200 in hardware form or be independent of it, or can be stored in the memory of the link training device 1200 in software form, so as to facilitate the processor to call and execute the operations corresponding to each of the above functional units.
[0202] As Figure 13 shown, 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 Figure 11 shown, or includes a link training device 1200 as Figure 12 shown. The embodiments of the present application do not limit this.
[0203] As Figure 14 shown, 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 a link training device 1100 as Figure 11 shown, or can be a link training device 1200 as Figure 12 shown. The embodiments of the present application do not limit this.
[0204] Optionally, the processor 1410 can be a system-on-chip or a central processing unit. The embodiments of the present application do not limit this.
[0205] An embodiment of the present application also provides a communication system, 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 1400 as Figure 14 shown. The first electronic device includes a link training device 1100, and the second electronic device includes a link training device 1200. Exemplarily, the communication system can be a communication system 100 as Figure 1 shown. The first electronic device can be the first device 110, and the second electronic device can be the second device 120.
[0206] Based on this, an embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the above-mentioned processor executes the computer program code, the electronic device executes Figure 4 or Figure 7 the steps executed by the first device 110 in the link training method shown.
[0207] An embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the above-mentioned processor executes the computer program code, the electronic device executes Figure 4 or Figure 7 the steps executed by the second device 120 in the link training method shown.
[0208] An embodiment of the present application further provides a computer program product. When at least one processor of the electronic device runs the computer program product, the electronic device executes Figure 4 or Figure 7 the steps executed by the first device 110 in the link training method shown.
[0209] An embodiment of the present application further provides a computer program product. When at least one processor of the electronic device runs the computer program product, the electronic device executes Figure 4 or Figure 7 the steps executed by the second device 120 in the link training method shown.
[0210] The above detailed description of the link training method and the analysis of beneficial effects can all be correspondingly cited in 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. Embodiments of the present application will not be elaborated here.
[0211] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A link training method, characterized in that, applied to a first device, the first device communicates with a second device through a primary link and a secondary link, the transmission rate of the primary link is greater than that of the secondary link, and the method includes: the first device determines the state of the primary link; if the primary link is in a service transmission state, the first device sends a training message through the primary link.
2. The method according to claim 1, characterized in that, the method further includes: if the primary link is not in a service transmission state, the first device sends the training message through the secondary link.
3. The method according to claim 1 or 2, characterized in that, the primary link includes a plurality of primary link channels, if at least one of the plurality of primary link channels is in a service transmission state, the primary link is in a service transmission state.
4. The method according to any one of claims 1-3, characterized in that, the plurality of primary 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 includes: the first device obtains the historical cumulative usage times of the plurality of primary link channels and the number of the at least one channel to be trained, and selects, according to the historical cumulative usage times and the number of the at least one channel to be trained, a primary link channel with fewer historical cumulative usage times as the at least one channel to be trained.
6. The method according to claim 4 or 5, characterized in that, the method further includes: the first device obtains the number of the at least one channel to be trained according to service bandwidth requirement information.
7. The method according to any one of claims 4-6, characterized in that, the process of the at least one channel to be trained performing link training 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 locking feedback message, an equalization feedback message, a channel locking feedback message, or a channel alignment feedback message; wherein, the training start message is used to instruct the channel to be trained to start link training, the clock locking feedback message is used to indicate the clock locking result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel locking feedback message is used to indicate the channel locking 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 channel to be trained independently performs the channel clock recovery and locking, the channel equalization, and the channel locking.
10. A link training method, characterized in that, applied to a second device, the second device communicates with a first device through a primary link and a secondary link, the transmission rate of the primary link is greater than that of the secondary 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, wherein, the method further includes: 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, wherein, The main link includes a plurality of main link channels. If at least one of 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 - 12, wherein, The plurality of 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, wherein, The at least one channel to be trained is a main link channel with a relatively small historical cumulative usage times selected by the first device according to the historical cumulative usage times of the plurality of main link channels and the number of the at least one channel to be trained.
15. The method according to claim 13 or 14, wherein, The number of the at least one channel to be trained is obtained by the first device according to service bandwidth requirement information.
16. The method according to any one of claims 13 - 15, wherein, The process of the at least one channel to be trained performing link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi-channel alignment.
17. The method according to claim 16, wherein, The training message includes at least one of: a training start message, a clock locking feedback message, an equalization feedback message, a channel locking feedback message, or a channel alignment feedback message; wherein, the training start message is used to instruct the channel to be trained to start link training, the clock locking feedback message is used to indicate the clock locking result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel locking feedback message is used to indicate the channel locking 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, wherein, Each channel in the channel to be trained independently performs the channel clock recovery and locking, the channel equalization, and the channel locking.
19. A link training device, wherein, The device communicates with a second device through a main link and an auxiliary link. The transmission rate of the main link is greater than that of the auxiliary link. The device includes a processing module and a transceiver module; The processing module is used to determine the state of the main link; The transceiver module is used to, if the main link is in a service transmission state, send a training message through the main link.
20. The device according to claim 19, wherein, The transceiver module is further used to, if the main link is not in a service transmission state, send the training message through the auxiliary link.
21. The device according to claim 19 or 20, characterized in that, the main link includes a plurality of main link channels, and if at least one of 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-21, characterized in that, the plurality of 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 configured to obtain the historical cumulative usage times of the plurality of main link channels and the number of the at least one channel to be trained, and select, according to the historical cumulative usage times and the number of the at least one channel to be trained, a main link channel with fewer historical cumulative usage times as 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 service bandwidth requirement information.
25. The device according to any one of claims 22-24, characterized in that, the process of the at least one channel to be trained performing link training 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 locking feedback message, an equalization feedback message, a channel locking feedback message, or a channel alignment feedback message; wherein, the training start message is used to instruct the channel to be trained to start link training, the clock locking feedback message is used to indicate the clock locking result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel locking feedback message is used to indicate the channel locking 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 channel to be trained independently performs the channel clock recovery and locking, the channel equalization, and the channel locking.
28. A link training device, characterized in that, the device communicates with a 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 device includes a transceiver module; the transceiver module is configured 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 through 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, and if at least one of 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 - 30, wherein, the plurality of primary 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, wherein, the at least one channel to be trained is a primary link channel with a relatively small historical cumulative usage times selected by the first device according to the historical cumulative usage times of the plurality of primary link channels and the number of the at least one channel to be trained.
33. The device according to claim 31 or 32, wherein, the number of the at least one channel to be trained is obtained by the first device according to the service bandwidth requirement information.
34. The device according to any one of claims 31 - 33, wherein, the process of the at least one channel to be trained performing link training includes: channel clock recovery and locking, channel equalization, channel locking, and multi - channel alignment.
35. The device according to claim 34, wherein, the training message includes at least one of: a training start message, a clock locking feedback message, an equalization feedback message, a channel locking feedback message, or a channel alignment feedback message; wherein, the training start message is used to instruct the channel to be trained to start link training, the clock locking feedback message is used to indicate the clock locking result, the equalization feedback message is used to indicate the equalization result of the channel to be trained, the channel locking feedback message is used to indicate the channel locking 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, wherein, each channel in the channel to be trained independently performs the channel clock recovery and locking, the channel equalization, and the channel locking.
37. A chip module, wherein, the chip module includes: a chip and a packaging substrate, the chip is fixed on the packaging substrate, and the chip includes the link training device according to any one of claims 19 - 27, or includes the link training device according to any one of claims 28 - 36.
38. An electronic device, wherein, the electronic device includes a processor, and the processor includes a link training device, and the link training device is the link training device according to any one of claims 19 - 27, or the link training device according to any one of claims 28 - 36.
39. A communication system, wherein, 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 according to claim 38.
40. A computer - readable storage medium, wherein, The computer-readable storage medium stores a computer program, which, when running on an electronic device, causes the electronic device to execute the link training method according to any one of claims 1-9, or execute the link training method according to any one of claims 10-18.
Citation Information
Cited By
SerDes link initialization method and device
CN121070853A