Link state adjustment method, apparatus and system, communication apparatus, and chip

By utilizing control codes in Ethernet frames to carry AN or LT information during the data transmission phase, the link state is optimized, solving the problem of poor link state adjustment in existing technologies and improving link transmission performance and the reliability and compatibility of optoelectronic interfaces.

WO2026113382A1PCT designated stage Publication Date: 2026-06-04HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-06-26
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

In the field of communication technology, existing technologies struggle to effectively adjust the link state without disrupting link establishment, thereby improving the performance of link information transmission.

Method used

By utilizing control codes in Ethernet frames to carry auto-negotiation AN information or link training LT information during the data transmission phase, the working state of the link can be optimized, including multiplexing at layers such as PCS, FEC, and MAC, to achieve online adjustment of the link state.

Benefits of technology

It improves the performance of link information transmission and enhances the reliability and compatibility of the link, especially the reliability and compatibility of optoelectronic interfaces in scenarios with multiple segments and mixed insertion of multiple types of optical modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025104105_04062026_PF_FP_ABST
    Figure CN2025104105_04062026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and discloses a link state adjustment method, apparatus and system, a communication apparatus, and a chip. The method being applied to a first device in a topology is taken as an example, the first device being connected to a second device in the topology by means of a link. The method comprises: in a data transmission stage, the first device acquires a first frame, the first frame carrying AN information or LT information; and the first device sends the first frame to the second device, the first frame being used by the second device to optimize the working state of the link on the basis of the AN information or the LT information. The data transmission stage may refer to a stage in which data is transmitted after AN or LT negotiation is completed and a link is established. AN and LT are negotiation processes for establishing a link for transmitting data. According to the present application, in a data transmission stage, the working state of a link is optimized on the basis of AN information or LT information, thereby avoiding reestablishment of a link, that is, the link is finely adjusted and optimized without damaging an original result obtained after negotiation in a link establishment stage or an AN or LT negotiation stage.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, devices, systems, communication devices, and chips for adjusting link status.

[0001] This application claims priority to Chinese Patent Application No. 202411762973.9, filed on November 30, 2024, entitled “Method, Apparatus, System, Communication Device and Chip for Adjusting Link State”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communication technology, and in particular to methods, apparatus, systems, communication devices, and chips for adjusting link status. Background Technology

[0003] In the field of communication technology, different devices can transmit information through links. These links are established by different devices performing auto-negotiation (AN) or link training (LT) processes to determine the parameters used for information transmission. After the link is established, its operational state affects the performance of information transmission. Therefore, it is necessary to adjust the link state to ensure the performance of information transmission. Summary of the Invention

[0004] This application provides a method, apparatus, system, communication device, and chip for adjusting link status, so as to realize the adjustment of link status. The technical solution provided by this application includes the following aspects.

[0005] In a first aspect, a method for adjusting the state of a link is provided. The method is applied to a first device in a topology, and the first device is connected to a second device in the topology via a link. The method includes: during a data transmission phase, the first device acquires a first frame, the first frame carrying auto-negotiation AN information or link training LT information; the first device sends the first frame to the second device, and the first frame is used by the second device to optimize the working state of the link according to the AN information or LT information.

[0006] The data transmission phase can refer to the stage after the AN or LT process is completed and the link is established, during which data is transmitted. The first frame can be a control frame or a data frame; this application does not limit the type of the first frame. Furthermore, AN and LT are negotiation processes for establishing a link for data transmission. During the data transmission phase, this application optimizes the link's operating state based on AN or LT information to avoid re-establishing the link. In other words, this application fine-tunes and optimizes the link without disrupting the original results negotiated during the link establishment phase or the AN or LT negotiation phase.

[0007] In one possible implementation, the first device includes a physical coding sublayer (PCS), where the first frame is an Ethernet frame, and the control code in the Ethernet frame carries the AN information or LT information. When the first device includes a PCS layer, by multiplexing the control code in the Ethernet frame to carry the AN information or LT information, the utilization rate of the control code is improved, enabling online adjustment of the link state.

[0008] In one possible implementation, the control code is an O code. An O code is a code used to control program flow, specifying the specific operation to be performed. By reusing existing O codes in Ethernet frames to carry AN or LT information, the utilization rate of O codes is improved.

[0009] In one possible implementation, the first device includes a forward error correction (FEC) layer, and the first frame is an Ethernet frame in the FEC layer. The control code of the Ethernet frame carries the AN information or LT information. If the first device includes an FCE layer, by multiplexing the control code in the Ethernet frame to carry the AN information or LT information, the utilization rate of the control code is improved, and online adjustment of the link state is achieved.

[0010] In one possible implementation, the control code is an alignment marker (AM) codeword. By reusing existing AM codewords in the Ethernet frame to carry AN or LT information, the utilization rate of AM codewords is improved.

[0011] In one possible implementation, the first device includes a media access control (MAC) layer and a PCS layer. The first device generates Ethernet packets at the MAC layer, and the Ethernet packets carry the AN information or LT information. The first frame is the Ethernet frame obtained when the Ethernet packet enters the PCS layer. When the first device includes both a MAC layer and a PCS layer, carrying AN information or LT information through Ethernet packets enables online adjustment of the link state.

[0012] In one possible implementation, the Ethernet packet is either a Link Layer Discovery Protocol (LLDP) packet or a Precision Time Protocol (PTP) packet. This makes the method compatible with both LLDP and PTP protocols.

[0013] In one possible implementation, the AN information or LT information is used by the second device to optimize the performance of the link. The AN information or LT information includes at least one of latency, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. This application can support multiple types of AN information or LT information, making it applicable to a wider range of scenarios.

[0014] In one possible implementation, the AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to switch from the working state to the energy-saving state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to switch from the energy-saving state to the working state. Triggering channel state switching through channel identification information offers high flexibility, finer granularity, and more precise control.

[0015] In one possible implementation, the AN information or LT information includes at least one of latency, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The first frame is used to periodically announce the link's status information, or the first frame is used to announce the link's status information based on an event. When multiple AN or LT information types are supported, periodically announcing the link's status information makes the announcement more reliable and improves the accuracy of link management. Announcing the link's status information based on an event improves the timeliness of the announcement.

[0016] Secondly, a method for adjusting the link state is provided. This method is applied to a second device in a topology, which is connected to a first device in the topology via a link. The method includes: during a data transmission phase, the second device receives a first frame sent by the first device, the first frame carrying auto-negotiation AN information or link training LT information; the second device obtains the AN information or the LT information from the first frame, and the AN information or LT information is used by the second device to optimize the working state of the link.

[0017] The second device obtains AN or LT information from the received first frame and optimizes the link's operating state based on this information. Since AN and LT are the negotiation and training processes for establishing a link for data transmission, this application optimizes the link's operating state based on the AN or LT information during the data transmission phase, avoiding the need to rebuild the link. In other words, this application fine-tunes and optimizes the link without disrupting the original results negotiated during the link establishment phase or the AN or LT negotiation phase.

[0018] In one possible implementation, the first device includes a PCS layer, the first frame being an Ethernet frame in the PCS layer, and the control code in the Ethernet frame carrying the AN information or LT information; the second device obtains the AN information or the LT information from the first frame, including: the second device obtaining the AN information or the LT information from the control code in the Ethernet frame.

[0019] In one possible implementation, the control code is a 0 code.

[0020] In one possible implementation, the first device includes an FEC layer, the first frame being an Ethernet frame in the FEC layer, and the control code of the Ethernet frame carrying the AN information or LT information; the second device obtains the AN information or the LT information from the first frame, including: the second device obtaining the AN information or the LT information from the control code in the Ethernet frame.

[0021] In one possible implementation, the control code is an alignment marker AM codeword.

[0022] In one possible implementation, the first device includes a MAC layer and a PCS layer. The first device generates an Ethernet packet at the MAC layer. The Ethernet packet carries the AN information or LT information. The first frame is an Ethernet frame obtained by the Ethernet packet entering the PCS layer. The second device obtains the AN information or the LT information from the first frame, including: the second device obtains the AN information or the LT information from the Ethernet packet.

[0023] In one possible implementation, the Ethernet message is a Link Layer Discovery Protocol (LLDP) message or a Precision Time Protocol (PTP) message.

[0024] In one possible implementation, the AN information or LT information is used by the second device to optimize the performance of the link, and the AN information or LT information includes at least one of latency, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate.

[0025] In one possible implementation, the AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to enter the power-saving state from the working state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to enter the working state from the power-saving state.

[0026] In one possible implementation, the AN information or LT information includes at least one of latency, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The first frame is used to periodically announce the status information of the link, or the first frame is used to announce the status information of the link based on event triggering.

[0027] Thirdly, a link state adjustment device is provided, which is applied to a first device in a topology, the first device being connected to a second device in the topology via a link, the device comprising:

[0028] The acquisition module is used to acquire the first frame during the data transmission phase. The first frame carries AN information or LT information.

[0029] The transmitting module is used to transmit the first frame to the second device, and the first frame is used by the second device to optimize the working state of the link according to the AN information or LT information.

[0030] The relevant limitations of the first device, the first frame, the AN information or LT information can be referred to the relevant content of the first aspect, and will not be repeated here.

[0031] Fourthly, a link state adjustment device is provided, which is applied to a second device in a topology, the second device being connected to a first device in the topology via a link, the device comprising:

[0032] The receiving module is used to receive a first frame sent by the first device during the data transmission phase, wherein the first frame carries AN information or LT information.

[0033] The acquisition module is used to acquire the AN information or the LT information from the first frame, and the AN information or LT information is used by the second device to optimize the working state of the link.

[0034] The relevant limitations of the first device, the first frame, the AN information, or the LT information can be referred to the relevant content in the second aspect, and will not be repeated here.

[0035] Fifthly, a link state adjustment system is provided, the system comprising a first device and a second device, the first device being used to execute the link state adjustment method provided by the first aspect or a corresponding possible implementation, and the second device being used to execute the link state adjustment method provided by the second aspect or a corresponding possible implementation.

[0036] In a sixth aspect, a communication device is provided, comprising a transceiver and a processor. The transceiver performs transmission and reception functions, and the processor performs other functions besides transmission and reception functions, so that the communication device implements the link state adjustment method provided in the first aspect, the second aspect, or corresponding possible implementations. Optionally, the communication device may be a chip.

[0037] In a seventh aspect, a chip is provided, the chip including an interface circuit and a control circuit, the interface circuit being used to transmit and receive data, and the control circuit being used to process the data, so that a first device on which the chip is mounted implements the link state adjustment method provided in the first aspect or a corresponding possible implementation, or so that a second device on which the chip is mounted implements the link state adjustment method provided in the second aspect or a corresponding possible implementation.

[0038] It should be understood that the apparatus mentioned in the third, fourth, and sixth aspects above can be the chip mentioned in the seventh aspect. The technical effects achieved by the technical solutions provided by the third to seventh aspects of this application and their corresponding possible implementations can be found in the above description of the technical effects achieved by the technical solutions provided by the first or second aspects and their corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0039] Figure 1 is a structural schematic diagram of an HRO optical module provided in an embodiment of this application;

[0040] Figure 2 is a schematic diagram of another HRO optical module provided in an embodiment of this application;

[0041] Figure 3 is a structural schematic diagram of an LPO optical module provided in an embodiment of this application;

[0042] Figure 4 is a schematic diagram of another LPO optical module provided in an embodiment of this application;

[0043] Figure 5 is a schematic diagram of a communication system provided in an embodiment of this application;

[0044] Figure 6 is a schematic diagram of another communication system provided in an embodiment of this application;

[0045] Figure 7 is a schematic diagram of another communication system provided in an embodiment of this application;

[0046] Figure 8 is a schematic diagram of another communication system provided in an embodiment of this application;

[0047] Figure 9 is a flowchart of a link state adjustment method provided in an embodiment of this application;

[0048] Figure 10 is a schematic diagram of an OSI model and an Ethernet model provided in an embodiment of this application;

[0049] Figure 11 is a schematic diagram of a 64 / 66B code block provided in an embodiment of this application;

[0050] Figure 12 is a schematic diagram of the structure of a first frame provided in an embodiment of this application;

[0051] Figure 13 is a schematic diagram of a basic page provided in an embodiment of this application;

[0052] Figure 14 is a schematic diagram of a next page provided in an embodiment of this application;

[0053] Figure 15 is a schematic diagram of another next page provided in an embodiment of this application;

[0054] Figure 16 is a schematic diagram of a communication system provided in an embodiment of this application;

[0055] Figure 17 is a schematic diagram of an AM structure provided in an embodiment of this application;

[0056] Figure 18 is a schematic diagram of an AM mapping to a PCS channel provided in an embodiment of this application;

[0057] Figure 19 is a schematic diagram of the structure of an LLDP message provided in an embodiment of this application;

[0058] Figure 20 is a schematic diagram of the TLV format of an LLDPDU provided in an embodiment of this application;

[0059] Figure 21 is a schematic diagram of the structure of an extended frame with embedded segment information provided in an embodiment of this application;

[0060] Figure 22 is a schematic diagram of an O-code sequence provided in an embodiment of this application;

[0061] Figure 23 is a schematic diagram of a control code provided in an embodiment of this application;

[0062] Figure 24 is a schematic diagram of segment topology discovery provided in an embodiment of this application;

[0063] Figure 25 is a link fault signal status diagram provided in an embodiment of this application;

[0064] Figure 26 is a schematic diagram of an allocation identifier provided in an embodiment of this application;

[0065] Figure 27 is a schematic diagram of an AN extended frame provided in an embodiment of this application;

[0066] Figure 28 is a schematic diagram of another AN extended frame provided in an embodiment of this application;

[0067] Figure 29 is a schematic diagram of an LT extended frame provided in an embodiment of this application;

[0068] Figure 30 is a schematic diagram of a non-loopback mode and a loopback mode provided in an embodiment of this application;

[0069] Figure 31 is a schematic diagram of the interaction between a first device and a second device provided in an embodiment of this application;

[0070] Figure 32 is a schematic diagram of a combination of an in-band scheme and an out-of-band scheme provided in an embodiment of this application;

[0071] Figure 33 is a schematic diagram of a device HostChip and optical module TWI interface topology provided in an embodiment of this application;

[0072] Figure 34 is a schematic diagram of a lane-symmetrical scene provided in an embodiment of this application;

[0073] Figure 35 is a schematic diagram of an asymmetric lane scenario provided in an embodiment of this application;

[0074] Figure 36 is a schematic diagram of establishing a message path in a lane-symmetric scenario provided by an embodiment of this application;

[0075] Figure 37 is a schematic diagram of establishing a message path in a lane asymmetric scenario provided by an embodiment of this application;

[0076] Figure 38 is a schematic diagram of another lane asymmetric scenario provided in an embodiment of this application;

[0077] Figure 39 is a schematic diagram of another lane asymmetric scenario provided in the embodiments of this application;

[0078] Figure 40 is a schematic diagram of establishing a message path on the host chip side according to an embodiment of this application;

[0079] Figure 41 is a schematic diagram of establishing a message path on the intermediate device side according to an embodiment of this application;

[0080] Figure 42 is a schematic diagram of a broadcast frame provided in an embodiment of this application;

[0081] Figure 43 is a schematic diagram of another broadcast frame provided in an embodiment of this application;

[0082] Figure 44 is a schematic diagram of another broadcast frame provided in an embodiment of this application;

[0083] Figure 45 is a schematic diagram of another broadcast frame provided in an embodiment of this application;

[0084] Figure 46 is a schematic diagram of a broadcast communication method provided in an embodiment of this application;

[0085] Figure 47 is a schematic diagram of another broadcast communication method provided in an embodiment of this application;

[0086] Figure 48 is a schematic diagram of another broadcast communication method provided in an embodiment of this application;

[0087] Figure 49 is a schematic diagram of another broadcast communication method provided in an embodiment of this application;

[0088] Figure 50 is a flowchart of a broadcast communication method provided in an embodiment of this application;

[0089] Figure 51 is a flowchart of another broadcast communication method provided in an embodiment of this application;

[0090] Figure 52 is a schematic diagram of another broadcast communication method provided in an embodiment of this application;

[0091] Figure 53 is a flowchart of another broadcast communication method provided in an embodiment of this application;

[0092] Figure 54 is a flowchart of another broadcast communication method provided in an embodiment of this application;

[0093] Figure 55 is a schematic diagram of another broadcast communication method provided in an embodiment of this application;

[0094] Figure 56 is a flowchart of another broadcast communication method provided in an embodiment of this application;

[0095] Figure 57 is a flowchart of another broadcast communication method provided in an embodiment of this application;

[0096] Figure 58 is a schematic diagram of an online management process for an optoelectronic interface provided in an embodiment of this application;

[0097] Figure 59 is a flowchart of an online management method for an optoelectronic interface provided in an embodiment of this application;

[0098] Figure 60 is a schematic diagram of a dynamic allocation and management process for a photoelectric interface segment pointer provided in an embodiment of this application;

[0099] Figure 61 is a schematic diagram of a link state adjustment device provided in an embodiment of this application;

[0100] Figure 62 is a schematic diagram of another link state adjustment device provided in an embodiment of this application. Detailed Implementation

[0101] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0102] In a communication system, links can be established between different devices to transmit information. Furthermore, after a link is established between devices, the AN (Anti-Link) or LT (Long-Link) process can be implemented in full-duplex mode. The AN and LT processes are negotiation processes for establishing a link for data transmission to determine the parameters used when communicating through the link (e.g., transmitting information) and ensure communication quality.

[0103] The LT process is a link initialization mechanism defined in the Physical Medium Dependent (PMD) layer. The LT process is used to determine link parameters between different devices, such as the link parameters associated with the transmitter (TX) connected in the device. Through the link training process, the link parameters associated with the TX are trained, thereby optimizing the TX's transmission performance and consequently affecting the link's performance.

[0104] For example, link parameters include, but are not limited to, equalizer coefficients, optical modulation amplitude (OMA), chirp / dispersion (CD), differential swing, drive current or digital pre-distortion (DPD), laser parameters, modulator parameters, bandwidth, voltage difference (Vπ, Vpi) corresponding to the π phase shift of the modulator, emission power, wavelength frequency offset, bias offset, skew, etc. Taking the LT process between device A and device B as an example, for the transmission direction from device B to device A, the LT process includes at least one link parameter setting process. In one link parameter setting process, the receiver (RX) of device A detects the signal status of the link (from the TX of device B to the RX of device A), and the TX of device A sends the link parameters associated with the TX of device B to the RX of device B, so that the TX of device B sets the link parameters associated with the TX of device B. After the setup process of a certain link procedure is completed, if the RX signal of device A detects that the link signal status meets the requirements, then the link parameters set in this link parameter setup process are the link parameters used by device B's TX when device A communicates with device B through the link, and the LT procedure ends. The principle is the same for the transmission direction from device A to device B, and will not be elaborated further.

[0105] For example, the aforementioned signal states include, but are not limited to, signal-to-noise ratio (SNR), bit error rate (BER), or eye pattern. For instance, if the signal state is BER, then meeting the requirement could mean that the detected BER value is less than the BER threshold. However, this application does not limit the use of BER as the criterion for determining whether the signal state meets the requirement.

[0106] The AN (Answer-Ask) process is used to determine the transmission parameters between different devices. For example, transmission parameters include, but are not limited to, rate parameters and forward error correction (FEC) capability parameters. Rate parameters are, for example, 10G BASE-KR, where 10G BASE represents 10 gigabit per second (Gbps) and KR represents the backplane. FEC capability parameters are, for example, 25G RS-FEC, where 25G represents 25Gbps and RS represents reed-solomon. Taking the AN process between device A and device B as an example, for the transmission direction from device A to device B, device A sends the transmission parameters it supports to device B. Device B receives the transmission parameters supported by device A and, combined with the transmission parameters supported by device B, determines the transmission parameters commonly supported by both device B and device A. These are then used as the transmission parameters for communication between device A and device B via the link. The principle is the same for the transmission direction from device B to device A, and will not be elaborated further.

[0107] This application provides a communication system comprising at least two devices, wherein different devices among the at least two devices are capable of implementing at least one of the above-described AN process or LT process. In exemplary embodiments, the devices in the communication system provided by this application include, but are not limited to, the following.

[0108] The first type of device is the host chip, also known as the host chip within a device, which is connected to other devices via telecommunications channels. For example, host chips include, but are not limited to, switch chips or physical layer (PHY) chips, such as application-specific integrated circuit (ASIC) chips.

[0109] The second type of device is the electrical interconnect device, which connects to other devices via telecommunication channels. Exemplarily, electrical interconnect devices include direct attach cables (DACs), which include, but are not limited to, active electrical cables (AEC) modules, active copper cables (ACC) modules, or passive direct attach cable DAC modules. Optionally, the electrical interconnect device can be linear (L). For example, the AEC module is an LAEC module, and the ACC module is a LAC module.

[0110] The third type of device is the optoelectronic interconnect device, which is used for optoelectronic conversion and is connected to other devices through optical channels, or to other devices through optical channels and telecommunication channels.

[0111] In some implementations, the optoelectronic interconnect device includes an optical module. Exemplarily, the types of optical modules include, but are not limited to, the following.

[0112] (1) Normal optical module.

[0113] (2) Optical digital signal processor (oDSP) module, also known as oDSP optical module.

[0114] (3) LPO module, also known as LPO optical module.

[0115] (4) Co-packaged optics (CPO) modules, also known as CPO optical modules. CPO modules are obtained by assembling optical engines (OE) and host chips together, for example, by assembling them together on a substrate to form a co-package of OE and host chips.

[0116] (5) Near package optics (NPO) modules, also known as NPO optical modules. By assembling the OE and the host chip on the same printed circuit board (PCB) respectively, a near package of OE and host chip can be formed, thus obtaining an NPO module.

[0117] (6) Half retimed optics (HRO) module, also known as HRO optical module. HRO module refers to retimed transmitter linear receiver.

[0118] (7) Linear receive optics (LRO) module, also known as LRO optical module.

[0119] (8) Transmitter retimed optics (TRO) module, also known as TRO optical module.

[0120] In other embodiments, the optoelectronic interconnect device includes active optical cables (AOCs), which are obtained by integrating optical modules and optical fibers. Optionally, the optoelectronic interconnect device in this embodiment can be linear (L). For example, the AOC is an LAOC.

[0121] The following examples, in conjunction with Figures 1 to 4, illustrate the structures of several optoelectronic interconnect devices.

[0122] The first structure is an oDSP optical module. The oDSP optical module includes an internal microcontroller unit (MCU) and an oDSP. The oDSP optical module can participate in the methods provided in the embodiments of this application through the MCU and the oDSP.

[0123] The second structure is the HRO optical module.

[0124] In some implementations, referring to Figure 1, the HRO optical module supports the inclusion of a lite digital signal processor (DSP), analog signal processor (ASP), or clock and data recovery (CDR) in any transmission direction. The HRO optical module includes, but is not limited to, a lite DSP / ASP / CDR, an MCU, a continuous time linear equalizer (CTLE), a driver (DRV), a trans-impedance amplifier (TIA), a laser, a modulator, a photodetector (PD), a multiplexer (MUX), and a demultiplexer (DEMUX). The HRO optical module can participate in the methods provided in the embodiments of this application through a lite DSP / ASP / CDR.

[0125] In other embodiments, referring to Figure 2, the HRO optical module supports a CDR equipped with a differential Manchester encoding (DME) transceiver and a MUX / DEMUX in either transmission direction. The HRO optical module includes, but is not limited to, a CDR (equipped with a DME transceiver and MUX / DEMUX), an MCU, a CTLE, a DRV, a TIA, a laser, a modulator, a PD, a MUX, and a DEMUX. The HRO optical module can participate in the methods provided in the embodiments of this application through the CDR (equipped with a DME transceiver and MUX / DEMUX).

[0126] The third structure is a standard LPO optical module, as shown in Figure 3. A standard LPO optical module includes, but is not limited to, an MCU, CTLE, DRV, TIA, laser, modulator, PD, MUX, and DEMUX. This standard LPO optical module connects to the control system via a common management interface specification (CMIS) interface and participates in the methods provided in the embodiments of this application according to the control system's control functions.

[0127] The CMIS interface is an out-of-band interface, meaning it is not part of the network interface. Besides the CMIS interface, embodiments of this application may also employ peripheral component interconnect express (PCIe), management data input / output (MDIO), or inter-integrated circuit (IIC). 2 C) and other interfaces are not limited here.

[0128] For example, the control system includes an off-chip processor (e.g., a central processing unit (CPU)) or a main control board, implemented in software, which is more flexible. Alternatively, the control system includes a host chip, such as an MCU integrated in the host chip; this application embodiment does not limit this.

[0129] The fourth structure is an improved LPO optical module, as shown in Figure 4. Based on the standard architecture shown in Figure 3, the improved LPO optical module adds firmware, such as a digital / analog signal processing chip, as a co-processor for the MCU, forming an MCU with the digital / analog signal processing chip. This MCU with the digital / analog signal processing chip participates in the methods provided in the embodiments of this application, reducing reliance on software. For example, the digital / analog signal processing chip is the lite CDR&DME transceiver shown in Figure 4.

[0130] For example, the digital / analog signal processing chip can be integrated into the MCU, or it can be located in at least one of the CTLE or laser and called by the MCU. The embodiments of this application do not limit the deployment location of the digital / analog signal processing chip in the LPO optical module.

[0131] Furthermore, the fourth structure is illustrated using an improved LPO optical module as an example. For CPO or NPO modules, the CPO or NPO module may also include an MCU equipped with a digital / analog signal processing chip, and participate in the method provided in the embodiments of this application through this MCU equipped with a digital / analog signal processing chip, which will not be elaborated further here.

[0132] The fourth type of device, other than the three types mentioned above, is also called a repeater. For example, the fourth type of device may be a retimer, repeater, redriver, or gearbox, etc. This application embodiment does not limit this; the fourth type of device can be flexibly set according to actual needs.

[0133] In a communication system, the devices described above can be located in different devices, such as switches or network interface cards (NICs). For ease of understanding, the following exemplary communication systems are illustrated using the example of a communication system including a first device and a second device.

[0134] The first communication system, as shown in Figure 5, includes a first device comprising a host chip 1 and an LPO optical module 1 connected via a telecommunication channel, and a second device comprising a host chip 2 and an LPO optical module 2 connected via a telecommunication channel. The LPO optical modules 1 and 2 are connected via an optical channel. In this embodiment, the situation shown in Figure 5 is merely an example; other situations are possible. For instance, at least one of the LPO optical modules 1 or 2 can be replaced with the aforementioned HRO optical module.

[0135] The second type of communication system, as shown in Figure 6, includes a first device consisting of a host chip 1 and an oDSP optical module connected via a telecommunication channel, and a second device consisting of a host chip 2 and an LPO optical module connected via a telecommunication channel. The oDSP optical module and the LPO optical module are connected via an optical channel. This type of system is also referred to as a mixed insertion of oDSP optical modules and LPO optical modules.

[0136] The oDSP optical module includes an oDSP. A first side of the oDSP connects to a host chip 1 and communicates with the host chip 1 via a telecommunication channel; therefore, this first side can also be called the hostside. For example, a serializer / deserializer (serdes) located on the first side of the oDSP communicates with a serdes located on the host chip 1 (serdes not shown in Figure 6) via a telecommunication channel. A second side of the oDSP connects to a transmitter optical sub-assembly (TOSA) and / or a receiver optical sub-assembly (ROSA) and communicates with the TOSA / ROSA via a telecommunication channel; therefore, this second side can be called the mediaside. This application does not limit the devices included in the hostside and mediaside. In one implementation, the TOSA / ROSA is located within the oDSP optical module. The TOSA / ROSA communicates with the LPO optical module of a second device via an optical channel. Compared to the oDSP optical module, the LPO optical module eliminates the oDSP. Because the LPO optical module eliminates the oDSP, the host chip 2 is required to perform optoelectronic channel compensation.

[0137] The third type of communication system, as shown in Figure 7, includes a first device comprising a host chip 1, a retimer, and an LPO optical module connected sequentially via telecommunication channels. The second device includes a CPO module, which comprises an OE and a host chip 2 connected via telecommunication channels. The LPO optical module and the CPO module are connected via an optical channel; this configuration is also known as mixed insertion of LPO and CPO modules. The telecommunication channel between the OE and the host chip 2 is shorter than the telecommunication channels between devices in the first device.

[0138] The fourth communication system, as shown in Figure 8, includes a first device comprising a host chip 1 and an oDSP optical module 1 connected via a telecommunication channel, and a second device comprising a host chip 2 and an oDSP optical module 2 connected via a telecommunication channel. The oDSP optical module 2 is connected to the oDSP optical module 1 via an optical channel. The structures of the oDSP optical module 1 and oDSP optical module 2 can be found in the description of the oDSP optical module in the second communication system above, and will not be repeated here.

[0139] The fifth type of communication system includes a first device comprising a host chip 1 and a second device comprising a host chip 2, wherein the host chip 2 and the host chip 1 are connected via a telecommunication channel.

[0140] Regardless of the communication system described above, segmentation (AN) or LT (Long-Terminal) processes can be implemented between different devices. Considering the similarity between segmented AN and segmented LT processes, the segmented LT process will be used as an example here. A segmented LT process refers to the sequential implementation of LT processes between adjacent devices in the link, with each adjacent device forming a segment. For example, referring to Figure 8, the link is located between host chip 1 and host chip 2. Host chip 1 first implements segmented LT process 1 with oDSP optical module 1, then oDSP optical module 1 implements segmented LT process 2 with oDSP optical module 2, and then oDSP optical module 2 implements segmented LT process 3 with host chip 2. This completes the segmented LT process between host chip 1 and host chip 2.

[0141] This application provides a link state adjustment method. Based on the execution of the AN (Answer-Alternate) or LT (Long-Terminal) process, this method avoids re-establishing the link. During the data transmission phase, it optimizes the working state of the link between devices by transmitting AN or LT information between devices. This allows for fine-tuning and optimization of the link without disrupting the original results negotiated during the link establishment phase or the AN or LT negotiation phase. This effectively improves the reliability and compatibility of optoelectronic interfaces in scenarios involving multiple segments and mixed insertion of multiple types of optical modules. For example, the method provided in this application can be applied to network scenarios supporting the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard's 400GBASE-CR / KR8, 800GBASE-CR / KR8, and 1.6T defined backplane and cable high-speed Ethernet interfaces. It can also be applied to, but is not limited to, network devices involving high-speed optoelectronic interconnect interfaces such as those from the Ultra Ethernet Consortium (UEC) / Multi-Source Agreements (MSA), and supports, but is not limited to, complex scenarios such as mixed insertion of LPO / LRO / traditional oDSP optical modules.

[0142] Furthermore, the method provided in this application does not limit the topology of segmentation, device / optical module type, or number of segment levels. As shown in Figure 9, this method can be applied to a first device in the topology, which is connected to a second device in the topology via a link. The method includes the following steps 901 and 902.

[0143] Step 901: During the data transmission phase, the first device acquires the first frame, which carries AN information or LT information.

[0144] The data transmission phase can refer to the phase after the AN or LT negotiation is completed and the link is established, during which data is transmitted. The first frame can be a control frame or a data frame; this application does not limit the type of the first frame. In the embodiments of this application, the first device and the first frame include, but are not limited to, the following situations.

[0145] In scenario one, the first device includes a PCS layer, and the first frame is an Ethernet frame in the PCS layer. The control code in the Ethernet frame carries AN information or LT information.

[0146] In this context, Figure 10 illustrates the OSI and Ethernet models. The left side shows the Open Systems Interconnection (OSI) model, also known as the OSI reference model. OSI defines a seven-layer framework for network interconnection: Physical (PHY), Data Link, Network, Transport, Session, Presentation, and Application. Each layer implements its own functions and protocols and completes interface communication with adjacent layers.

[0147] As shown in Figure 10, the right side illustrates the Ethernet model defined by the IEEE 802.3 protocol standard. In the IEEE 802.3 standard, the data link layer is divided into three sublayers from low to high (or from bottom to top): the MAC sublayer, the MAC control sublayer, and the logical link control (LLC) sublayer. The MAC sublayer, as a separate sublayer, performs functions such as encapsulation (framing, address identification, error detection) and media access (collision detection and delay procedures). The MAC control sublayer is optional. The LLC sublayer ensures that data packets can be transmitted across different types of networks by adding a destination address service finder and a source address service accesser to the data packets.

[0148] Referring again to Figure 10, the reconciliation sublayer (RS) is used for instruction translation. The PCS, physical medium attachment (PMA), and physical medium dependent (PMD) layers represent the sublayers implementing the physical layer protocol. In practical applications, the physical layer also includes sublayers such as AN and FEC. The specific operations of these physical sublayers are implemented by the physical layer (PHY) chip. Furthermore, the interface between RS and PCS includes the interface between the physical layer chip and the upper-layer protocol chip, including but not limited to medium independent interfaces (MIIs), such as gigabit media independent interface (GMII), reduced gigabit media independent interface (IRGMII), and serial gigabit media independent interface (SGMII). For example, RS is used for instruction translation, mapping the GMII path data and related control signals to the MAC interface. Figure 10 illustrates examples of 100G Ethernet Media Independent Interface (CGMII), 200GMII, 400GMII, and 800GMII, but is not limited to these. Furthermore, there is a Physical Media Dependent Interface (MDI) between the physical layer chip and the physical medium.

[0149] In this scenario, the first device includes a PCS layer, and the first frame is an Ethernet frame at the PCS layer. The PCS layer is used for 64-bit / 66-bit encoding. Taking the 64 / 66-bit code block diagram shown in Figure 11 as an example, the encoded 66-bit code block is divided into two categories: data code blocks and control code blocks. These two types of code blocks are distinguished by the first two bits of the 66 bits, which are called the synchronization (sync) field. For example, if bit 0 is 0 and bit 1 is 1, the 66-bit code block is a data code block. As another example, if bit 0 is 1 and bit 1 is 0, the 66-bit code block is a control code block. In 64-bit / 66-bit encoding, the two bits used as the sync field are called overhead, and the other 64 bits are called information, also known as payload.

[0150] As shown in Figure 11, the synchronization field (also called the synchronization header) has two values: 01 and 10. 01 indicates that the following 64 bits are all data, while 10 indicates that the following 64 bits are a mixture of data and control information. When the 66-bit code block is a control code block, bits 9 through 2 are used as the block type field. Different values ​​in this field indicate different types of control code blocks. The following 56 bits are control information, data, or a mixture of both. Specifically, D represents data encoding, with each data code being 8 bits (e.g., D0-D7 in Figure 11); C represents control code, with each control code being 7 bits (e.g., C0-C7 in Figure 11); S represents the start of the packet, appearing only in the 0th and 4th bytes of the 8-byte block (e.g., S0 in Figure 11); T represents the end of the packet, appearing in any byte (e.g., T0-T7 in Figure 11); and Z represents control code, with each control code being 7 bits (e.g., Z4-Z7 in Figure 11).

[0151] In this embodiment, the first frame can use 64B / 66B code blocks, compatible with the protocol synchronization field, block type field, and O code definition. Extended information can be embedded in D1-3 and D5-7. Therefore, this application can carry at least one of AN information or LT information through D1-D3, D5-D7, etc. Optionally, this application can also carry at least one of AN information or LT information through O code. As shown in Figure 11, at least one of AN information or LT information is carried through O0 in Figure 11. This embodiment does not limit the method of using D1-D3, D5-D7, etc., to carry AN information or LT information, or using O code to carry AN information or LT information. Since D1-D3 and D5-D7 are data code blocks that can be used to carry service data, while O code is a control code block, using O code to carry at least one of AN information or LT information will not affect the service data compared to data code blocks.

[0152] In one possible implementation, as shown in the structural diagram of the first frame in FIG12, the first frame provided in this application embodiment may include, but is not limited to, the following domain segments.

[0153] Frame header / type: The marking information of the first frame, used to distinguish and identify the first frame. Different frame markers are used to realize different types of frames (such as broadcast commands, mode switching, etc.).

[0154] Frame length: The length of the first frame.

[0155] Segment pointer select field: Used to carry marker information in the first frame to specify a specific control object (such as device, physical channel, parameter space, etc.), and supports multi-level pointers and broadcast pointers.

[0156] Segment pointer echo field: The specified object responds after parsing the first frame and completing the processing flow. The request initiator recognizes the response and completes the handshake.

[0157] Segment request control field: Used to control the parameters or modes of specified objects in the optoelectronic link, such as feed-forward equalizer (FFE), nonlinear predistortion, frequency offset, optical power, FEC coding, swing, etc., to improve the performance margin and energy efficiency of the high-speed link, or to complete specified design for X (DFX) functions (such as loopback).

[0158] Segment response status field: Used to specify information such as object control status response and link diagnostics, such as FEC BurstErr / SNR / EQ parameters, etc.

[0159] In one possible implementation, the first frame also supports next-page expansion. As shown in Figure 12, the base page and the first next page can be expanded according to time. st nextpage), the second next page (2) st nextpage) to the Nth next page (N st This application does not limit the number of next pages, i.e., it does not limit the size of N. The structure of the base page can be seen in Figure 13. D0 to D47 are 48 valid data entries, each 2 bits in length. D0 to D4 are selector fields, and D15 is the NP field, which indicates whether a next page exists after the base page. Optionally, the next page can be of message type or unformatted type. The structure of the next page for message type can be seen in Figure 14, and the structure of the next page for unformatted type can be seen in Figure 15.

[0160] Optionally, the method provided in this application embodiment also supports inserting a remote fault (RF) (>3 frames) to force a MAC layer link down in order to avoid service disruption during the interface initialization topology negotiation process.

[0161] Furthermore, in the method provided in this application embodiment, each device in the optoelectronic link supports independent filling / parsing of the first frame. The filling method supports out-of-band methods such as the common management interface specification (CMIS) and in-band parsing and updating of the first frame by the device. For details, please refer to the following description, which will not be repeated here.

[0162] In summary, this scenario allows the first frame to carry at least one of AN or LT information, enables online self-negotiation and link training, supports specifying control objects via pointers without affecting normal link establishment at the interface, and achieves lossless service perception through the interpolation cycle of control codes such as O codes.

[0163] Scenario 2: The first device includes an FEC layer, and the first frame is an Ethernet frame at the FEC layer. The control code of the Ethernet frame carries AN or LT information. For example, the control code is an AM codeword.

[0164] In this scenario, as shown in Figure 16 of the communication system, the MAC layer generates a cyclic redundancy check (CRC) code, such as CRC32. After adding the CRC32 checksum, the data enters the PCS layer through the x GMII interface of the RS layer. At the PCS layer, encoding and scrambling are performed, followed by FEC encoding. The encoded data then enters the PMA layer. The PMA layer uses multiplexing (MUX) to convert the parallel data from the PCS layer into a serial data stream, which is then transmitted to the physical medium via the PMD layer. The PMD layer converts the serial data stream from the PMA layer into a signal suitable for transmission over a specific physical medium (such as optical fiber, twisted pair, etc.). At the transmitting end, the PMD layer uses modulators, drivers, and transmitter optical subassemblies (TOSA) to convert electrical signals into optical signals or other suitable transmission formats. At the receiving end, the PMD layer performs the reverse process. It converts the received signal back into an electrical signal using a receiver optical subassembly (ROSA), trans-impedance amplifier (TIA), and analog-to-digital converter (ADC) before sending it to the PMA layer. The PMA layer demultiplexes the serial data stream received from the PMD layer back into parallel data, decodes it through the FEC layer, and then transmits it to the PCS layer. The PCS layer decodes and descrambles the data after the FEC layer, then transmits it to the MAC layer through the RS layer, where a CRC32 check is performed.

[0165] Based on the above architecture, when the first device includes an FEC layer, the first frame is an Ethernet frame at the FEC layer. The Ethernet frame includes an AM codeword, through which AN information or LT information can be carried.

[0166] As shown in Figure 17, the AM structure includes a common marker (CM) field, a unique marker (UM) field, and a unique pad (UP) field. The CM field includes CM0 to CM5, which are the common identifiers for all virtual channels; that is, the values ​​of the CM field are the same for all virtual channels. The UM field includes UM1 to UM5, where a set of values ​​from UM0 to UM5 uniquely identifies a virtual channel. The UP field includes UP0 to UP2, where the values ​​are padding data set based on experience or actual needs. The bit positions of CM0 to CM2, UP0, CM3 to CM5, UP1, UM0 to UM2, UP2, and UM3 to UM5 are shown in Figure 17. Furthermore, CM3 to CM5 are the bit reversals of CM0 to CM2, and UM3 to UM5 are the bit reversals of UM0 to UM2.

[0167] Figure 18 is a schematic diagram of AM mapping to PCS channels provided in an embodiment of this application. In Figure 18, the AM corresponding to the i-th PCS channel is represented by AM_i, where the value of i ranges from 0 to 8 in 200G Ethernet. The symbols included in AM_i are derived from FEC codeword A and FEC codeword B, respectively, and each symbol includes 10 bits. For the acquisition and mapping methods of FEC codeword A and FEC codeword B, please refer to the relevant content of FEC encoding and PCS channel mapping in the IEEE 802.3 standard, which will not be elaborated here. Other contents in Figure 18 can be found in the relevant content of the IEEE 802.3 standard, which will not be repeated here. In addition, Figure 18 is only illustrated using 200G Ethernet as an example. This application is also applicable to scenarios containing AM codewords, such as 400G and 800G Ethernet, and this embodiment of the application is not limited thereto.

[0168] In this embodiment, the first frame uses AM codewords to carry AN or LT information, compatible with protocols CM0-5 and UM0-5. Extended information can be embedded in UP0-2 or padded with pseudo-random binary sequence (PRBS) PAD bit fields. In this second scenario, the structure of the first frame can be referred to the relevant description in scenario one, and will not be repeated here. The AM codewords in this embodiment can be used independently, or multiple AM ​​codes can be used to extend the first frame and concatenate it into a multi-frame structure. The first frame supports NextPage extension, for example, see the relevant explanation of NextPage in scenario one.

[0169] In addition, in scenario two, each device in the optoelectronic link supports independent filling / parsing of the first frame at the channel (Lane) granularity. The mapping relationship between the virtual lane and the physical lane of the device can be determined during link establishment and stored in each device of the link, thereby improving the communication efficiency of the first frame. The filling method supports out-of-band methods such as CMIS and in-band parsing and updating of control frames by the device.

[0170] In this second scenario, the first frame supports embedding AN or LT frames (e.g., multiple AM ​​control frames combined into a multiframe), supports specifying the control object through pointers, and enables independent concurrent online self-negotiation and link training at the lane granularity without affecting normal link establishment of the interface. AM codewords can be inserted according to the protocol cycle to achieve lossless service perception.

[0171] Scenario 3: The first device includes a MAC layer and a PCS layer. The first device generates Ethernet packets at the MAC layer. The Ethernet packets carry AN information or LT information. The first frame is the Ethernet frame obtained by the Ethernet packets entering the PCS layer.

[0172] In scenario three, referring to Figure 16, if the first device includes a MAC layer and a PCS layer, the first device can generate Ethernet packets at the MAC layer. These Ethernet packets carry AN or LT information. Then, the Ethernet packet is transmitted to the PCS layer, and the first frame is the Ethernet frame obtained after the Ethernet packet enters the PCS layer. For example, the Ethernet packet may be an LLDP or PTP packet.

[0173] Taking Ethernet packets as an example of LLDP packets at the data link layer, as shown in Figure 19, the structure of an LLDP packet from top to bottom includes the destination address, source address, length / type, link layer discovery protocol data unit (LLDPDU), PAD, and frame check sequence. The length of each field is shown in Figure 19. The type length value (TLV) format of the LLDPDU is shown in Figure 20, and it is compatible with the TLV format in the LLDPDU, including the TLV header, TLV organization unique identifiers (OUI), and subtype definition. AN information or LT information can be embedded in the bit fields of the TLV information string.

[0174] In this third scenario, the structure of the first frame can be referenced from the description in the first scenario, and will not be repeated here. The LLDP message described above is only an example; it can also be transmitted via Ethernet messages at the data link layer (e.g., PTP message, also known as 1588 message), network layer, etc. Compared to the implementation methods of carrying AN or LT information in O and AM codewords, this third scenario does not affect the current PCS layer design and has high versatility.

[0175] Furthermore, the first frame supports NextPage expansion, as described in Case 1. In Case 3, the HostChips on both sides of the optoelectronic link support independent filling / parsing of the first frame because they have a MAC layer. For repeater devices such as optical modules, which lack a MAC layer, the information of optical modules and repeater devices is handled by the Hostchip in out-of-band methods such as CMIS.

[0176] In this third scenario, the first frame supports embedding AN or LT frames and allows the control object to be specified via a pointer, thereby enabling online self-negotiation and link training without affecting normal link establishment of the interface. Service-aware lossless operation can be achieved through the insertion cycle of Ethernet packets.

[0177] In either case, the first frame can be used for online optoelectronic interface device management, enabling online detection and control of the entire optoelectronic link device information and parameters through pointers, thereby improving the operation and maintenance efficiency of high-speed optoelectronic interfaces.

[0178] Step 902: The first device sends a first frame to the second device. The first frame is used by the second device to optimize the working state of the link based on AN information or LT information.

[0179] In this embodiment, AN information or LT information can be used by a second device to optimize link performance. The AN information or LT information includes, but is not limited to, at least one of latency, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate.

[0180] Furthermore, embodiments of this application also support state switching at the channel level. For example, AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to enter the energy-saving state from the working state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to enter the working state from the energy-saving state.

[0181] In one possible implementation, the first frame in this embodiment is used to periodically announce the status information of the link. This embodiment does not limit the length of the announcement period; it can be set based on the application scenario or flexibly adjusted. Optionally, the first frame in this embodiment can also trigger the announcement of the link's status information based on an event. The event that triggers the announcement of the link's status information could be that the device detects that the AN information or LT information does not meet the requirements. For example, if the AN information is a delay, then the AN information not meeting the requirements means that the delay exceeds a delay threshold.

[0182] Since in this embodiment, the first device sends a first frame to the second device so that the second device can optimize the link based on the AN or LT information in the first frame, the first device needs to determine which second device in the topology to send the first frame to before sending it. This embodiment does not limit the method by which the first device determines the second device. In one possible implementation, the first device performs a topology negotiation process to determine the topology information before link state adjustment, thereby determining the second device. Taking the use of a second frame to implement the topology negotiation process as an example, this second frame can be an AN extended frame with embedded segment information.

[0183] For example, taking the segment information carried by the O code of the PCS layer as an example, this application implements an embedded segment information frame structure based on the PCS codeword format of the compatible protocol. The extended frame format can refer to the definition of AN NP Message as an example, or NP Unformatted can be used, or a portion of the AN frame can be truncated to form the extended frame, supporting NP-based extension. The extended frame formed by truncating a portion of the AN frame does not necessarily have to be a complete 48-bit AN frame; it only needs to be able to negotiate the topology of the optoelectronic link.

[0184] The O-code related content of the PCS layer can be referred to in Figure 11 above, and will not be repeated here. The structure of the extended frame with embedded segment information, i.e., the second frame, can be seen in Figure 21, including but not limited to the following.

[0185] Frame type: The frame type marker is used to identify different types of segment information frames, such as broadcast frames, test frames, etc. For example, using the Message type NextPage, the frame type marker can also be extended through the Message Code Field. This is just an example. The Type field is not limited to 4 bits (16 types) and can be extended to more Type types, compatible with the LF / RF definitions of the O code corresponding field defined by the MAC layer protocol. For example, the description of different channels and O codes can be seen in Figure 22.

[0186] Total number of cascaded components on the local equipment (TNCLOC): The local equipment refers to the device where the host chip that sends the allocation frame is located. The TNCLOC field indicates the number of device cascades in the link between the host chip (excluding) and the optical module (including) of the local equipment. Each active device in the link between the host chip and the optical module of the local equipment can be considered a first-level device. Active devices can include the aforementioned electrical interconnect devices, repeaters (also known as intermediate cascade devices), and optical modules.

[0187] Local optical type (in-band / out-of-band padding): Optical module type information (e.g., TX / RX Retimed, GearBox, etc.).

[0188] Local device information: Information such as the type of intermediate cascaded devices within the local device, including but not limited to retimers or gearboxes.

[0189] Local segment information: Segment link information within the local device (such as loss level). For example, information on each segment of the link between the host chip of the local device and the optical module of the local device, including but not limited to insertion loss level.

[0190] Segment diagnostic info: Link segment diagnostic information (such as Frame Lock / FEC Burst Error). Each device in the link topology supports independent parsing / filling of different domain segments (or different NP pages) of extended frames, or the same domain segment (or the same NP page) of extended frames.

[0191] Segment pointer: Link cascading pointer information, supporting multi-level pointers. Multi-level pointers can be used in combination. For example, a level 1 pointer can point to different devices in the link topology, a level 2 pointer can point to different lanes of the same device, and a level 3 pointer can point to different units (parameter spaces, etc.) of the same lane of the same device. Alternatively, level 2 and level 3 pointers can point to lanes of different devices (source lane and destination lane) respectively, so as to dynamically establish message path connections between lane (Y) of any specified device and host chip lane (X) in the link topology.

[0192] Sequence ordered set: This field retains the IEEE protocol PCS layer O code definition, such as the sequence ordered set in the various control codes shown in Figure 23.

[0193] In addition, the device information field filling supports out-of-band methods such as CMIS and in-band parsing and modifying the Segment Info frame (as shown in Figure 21, the in-band segment pointer method), and each device is independent.

[0194] Of course, the AN extended frame structure described above is merely an example and is not intended to limit the frame structure of the second frame. For example, when the second frame is an AN frame, the extended subframes included in the AN frame can also be DME fields, which is equivalent to embedding the DME field in the LT frame into the AN frame to obtain an improved AN frame. Optionally, the second frame can also be implemented using LT extended frames, and this application embodiment does not limit this. When the second frame is an LT extended frame, the extended subframes included in the LT extended frame can also be next pages. For example, embedding the next page in the LT frame into the LT frame to obtain an improved LT frame. Or, for example, using at least one standard LT frame A as the next page of a standard LT frame B, then at least one standard LT frame A is an extended subframe, resulting in an LT extended frame.

[0195] Based on the frame structure of the second frame described above, the second frame can specify the second device in at least two of the following ways.

[0196] In the first specification method, the second frame includes an extended subframe, which is used to specify the second device.

[0197] The link between the first device and the second device includes multiple devices, each corresponding to an extended subframe. Therefore, the second device can be specified based on the extended subframe. For example, the first specification method includes specification method one and specification method two as follows.

[0198] In the first specification method, the second frame includes multiple extended subframes, each corresponding to a specific device. For example, each device might correspond to a separate next page. If the second frame needs to specify a particular second device, the specified information is carried in the extended subframe corresponding to that device. The device corresponding to the extended subframe carrying the specified information is the second device specified in the first frame.

[0199] For example, referring to Figure 8, the first device is host chip 1, and the second device is host chip 2. The second frame includes extended subframes 0-3. Extended subframe 0 corresponds to host chip 1, extended subframe 1 corresponds to oDSP optical module 1, extended subframe 2 corresponds to oDSP optical module 2, and extended subframe 3 corresponds to host chip 2. When extended subframe 3 in the second frame carries specified information, since extended subframe 3 corresponds to host chip 2, the second device specified in the second frame is host chip 2.

[0200] Furthermore, each of the multiple devices can be configured individually, enabling each device to know the order of its corresponding extended subframe among the multiple extended subframes. Since the second device is one of multiple devices, after receiving the second frame, the second device can determine its corresponding extended subframe from the multiple extended subframes based on the order it knows. If the extended subframe corresponding to the second device carries specified information, the second device can determine that it is the second device specified in the second frame, facilitating the implementation of the AN process or LT process between the first and second devices.

[0201] In the second specification method, the second frame includes at least one extended subframe, which contains multiple extended fields (also called extended domain segments). These extended fields correspond one-to-one with multiple devices. For example, each device might correspond to an extended field in the next page. Alternatively, each device might correspond to an extended field in the PRBS domain. To specify a second device in the second frame, the specified information is carried in the extended field corresponding to that device. The device corresponding to the extended field carrying the specified information is the second device specified by the second frame. In other words, in specification method two, the extended subframe includes extended fields, which are used to specify the second device.

[0202] For example, referring to Figure 8, the first device is host chip 1, and the second device is host chip 2. The extended subframe in the second frame includes extended fields 0-3. Extended field 0 corresponds to host chip 1, extended field 1 corresponds to oDSP optical module 1, extended field 2 corresponds to oDSP optical module 2, and extended field 3 corresponds to host chip 2. When extended field 3 in the second frame carries specified information, since extended field 3 corresponds to host chip 2, the second device specified in the second frame is host chip 2.

[0203] Furthermore, each of the multiple devices can be configured individually so that each device can know the position of its corresponding extended field in the extended subframe. For example, each device can know that its corresponding extended field is the Y to Z fields in the Xth extended subframe. Since the second device is one of multiple devices, after receiving the second frame, the second device can determine its corresponding extended field from the extended subframe based on the position it knows. If the extended field of the second device carries the specified information, the second device can determine that it is the second device specified in the second frame, which facilitates the implementation of the AN process or LT process between the first device and the second device.

[0204] The first specification method mentioned above mentions that the extended subframe carries specified information, and the second specification method mentioned that the extended field carries specified information. For example, the specified information includes, but is not limited to, the following two types.

[0205] The first type of specification information is either AN parameters or LT parameters. That is, the extended subframe is also used to carry AN parameters used in the AN process or LT parameters used in the LT process. When the extended subframe carries the first type of specification information, the second frame can not only specify the second device but also enable the second device to perform the AN or LT process according to the first type of specification information (combined command and control; specifying the second device and performing the AN / LT process are both completed through the second frame). In one example, the AN parameters include optical negotiation parameters and electrical negotiation parameters, and the AN process includes an AN process for the optical channel based on the optical negotiation parameters and an AN process for the telecommunication channel based on the electrical negotiation parameters. Examples of optical channels and telecommunication channels can be found in Figures 4 to 8. Since the second frame includes the extended subframe, in this case, the second frame can at least be used for the first and second devices to perform the AN process.

[0206] The AN and LT parameters were illustrated above and will not be repeated here. For example, optical negotiation parameters include, but are not limited to, the type of optical module, the capabilities supported by the optical module's interface, and the transmission distance supported by the optical module's interface. The capabilities supported by the optical module's interface are, for example, rate parameters, such as those related to short-reach (SR, 100 meters), data center reach (DR, 500 meters), long-reach or fiber reach (FR, 2 kilometers), long-reach (LR, 10 kilometers), or extended reach (ER, 40 kilometers). Transmission distances are, for example, the aforementioned SR, DR, FR, LR, or ER. Optionally, electrical negotiation parameters include, but are not limited to, transmission parameters such as rate parameters and FEC capability parameters, where the rate parameter is, for example, a rate parameter related to backplane reach (KR, less than 1 meter) or cable reach (CR, less than 10 meters). It should be noted that even for optical modules of the same type, the optical negotiation parameters will differ if the manufacturers are different. Therefore, in one possible implementation of this application, the optical negotiation parameters also include the factory settings information of the optical module. The factory settings information includes, but is not limited to, read-only factory settings, such as the optical module's capability information, the adjustable parameters supported by the optical module, and the adjustment range of the parameters. Optionally, the factory settings information may also include manufacturer information, such as the manufacturer's identifier.

[0207] The second type of specified information is set based on experience or actual needs, and its content is not limited. Alternatively, each of the multiple devices can be configured separately, ensuring that each device is aware that the specified information represents the current device. Since the second device is one of multiple devices, it can determine that it is the second device specified by the second frame when the specified information is carried in the corresponding extended subframe (or extended field). For example, after sending the second frame to the second device, the first device can send other frames carrying AN or LT parameters, allowing the second device to perform the AN or LT procedure based on the other frames (command and control separation; the process of specifying the second device is completed through the second frame, while the implementation of the AN / LT procedure is completed through other frames).

[0208] In the second designation method, the second frame carries a first identifier, which indicates the second device.

[0209] In one example, for a link containing multiple devices, each device has its own first identifier, and each device is aware of its own first identifier. For example, the first identifier could be a device identifier, a device address, etc. In this example, the first device can be configured with the first identifiers of other devices in the link, so that the first device can determine the second device from among the other devices according to actual needs, thereby carrying the first identifier indicating the second device in the second frame.

[0210] As previously mentioned, the second frame includes an extended subframe. For example, the second frame carries a first identifier through the extended subframe. Accordingly, after receiving the second frame, if the first identifier carried in the second frame is the same as the first identifier possessed by the second device, it determines that it is the second device specified by the second frame, facilitating the first device and the second device to perform the AN procedure or LT procedure. For example, if the second frame also carries AN parameters used in the AN procedure or LT parameters used in the LT procedure, then the second frame can not only specify the second device but also enable the second device to perform the AN procedure or LT procedure based on the first type of specification information (combined command and control). For example, the second frame is used to request the first device and the second device to perform the AN procedure. The second frame also includes optical negotiation parameters and electrical negotiation parameters; the functions of the optical negotiation parameters and electrical negotiation parameters are explained in the first type of specification information above. Alternatively, if the second frame does not carry AN parameters or LT parameters, the first device can send other frames carrying AN parameters or LT parameters to the second device after sending the second frame, enabling the second device to perform the AN procedure or LT procedure based on the other frames (separated command and control).

[0211] In another example, the first identifier of each of the multiple devices is obtained through assignment. Alternatively, each device learns its own first identifier through an assignment process. This first identifier represents the position of the indicated device on the link; for example, the first identifier represents the distance (or relative positional relationship) between the indicated device and the host chip, which can be represented by the number of device levels between the device and the host chip. For example, the first identifier could be a pointer, etc. In exemplary embodiments, the first identifier is assigned in at least two ways, including the following two.

[0212] The first allocation method is the in-band (as-you-go) allocation method, in which multiple devices on the link independently determine the first identifier for allocation.

[0213] In the first allocation method, host chip 1 in the first device sends a first allocation frame to host chip 2 in the second device. The first allocation frame is used to allocate a first identifier in a first transmission direction to each device in the link. The first transmission direction is the transmission direction from host chip 1 to host chip 2, and the first identifier in the first transmission direction represents the distance between the indicated device and host chip 1. Optionally, the first identifier in the first transmission direction can be denoted as a local pointer. Host chip 2 in the second device sends a second allocation frame to host chip 1 in the first device. The second allocation frame is used to allocate a first identifier in a second transmission direction to each device in the link. The second transmission direction is the transmission direction from host chip 2 to host chip 1, and the first identifier in the second transmission direction represents the distance between the indicated device and host chip 2. Optionally, the first identifier in the second transmission direction can be denoted as a remote pointer, also known as a distant end.

[0214] For example, the first allocation frame and the second allocation frame (hereinafter referred to as the allocation frame) have the same frame structure. For instance, the allocation frame may include the next page (message type or unformatted type) of the AN frame. Or, the allocation frame may include the PRBS field of the LT frame. The allocation frame is also called a segment information frame. Taking the allocation frame including the next page of message type as an example, the structure of the allocation frame can also refer to the structure of the extended frame shown in Figure 21.

[0215] Optionally, all fields shown in Figure 21 are filled by the host chip within the local device. Alternatively, at least some fields shown in Figure 21 can be filled by other devices within the local device besides the host chip (in-band method, other devices fill in the fields themselves, without the need for the host chip to fill them). For example, the optical module within the local device can fill in the "local optical type" field, the intermediate cascade device within the local device can fill in the "local device info" field, the optical module or intermediate cascade device within the local device can fill in the "local segment info" or "segment diagnostic info" field, and so on.

[0216] In one example, when the local device includes a standard LPO optical module, the standard LPO optical module does not fill in any fields. Fields related to the standard LPO optical module are filled in by other devices in the local device besides the standard LPO optical module (such as the host chip, intermediate cascade devices, etc.) in place of the standard LPO optical module (out-of-band method, through control interfaces such as CMIS). For example, the fields filled in by the host chip or intermediate cascade devices in place of the standard LPO optical module include, but are not limited to, at least one of the following: the local optical type field, the local segment info field corresponding to the segment where the standard LPO optical module is located, or the segment diagnostic info field corresponding to the segment where the standard LPO optical module is located. Here, "info" in Figure 21 refers to "information".

[0217] On the one hand, referring to Figure 24, after the host chip 1 in the first device sends the extended frame containing embedded segment information, i.e., the second frame, to the host chip 2 in the second device, the host chip 2 can determine the topology information in the first device based on the frame type field, TNCLOC field (the number of device stages in the link from host chip 1 to optical module 1 in the first device is read by host chip 1 and filled to obtain the TNCLOC field (or domain segment)), local optical type field (filled in in-band or out-of-band), local device information field (filled in in-band or out-of-band), local segment information field, and segment diagnostic information field (auxiliary information belonging to each segment in the first device) in the extended frame containing embedded segment information. The host chip 2 can also determine the topology information in the second device on its own. Thus, the host chip 2 can determine the topology information of the entire link. The entire link refers to the link between host chip 1 and host chip 2.

[0218] Furthermore, after host chip 2 in the second device sends an extended frame containing embedded segment information to host chip 1 in the first device, host chip 1 can determine the topology information within the second device based on the frame type field, TNCLOC field (obtained by host chip 2 reading the number of device stages in the link from host chip 2 to optical module 2 within the second device), local optical type field (obtained by in-band or out-of-band filling), local device information field (obtained by in-band or out-of-band filling), local segment information field, and segment diagnostic information field (auxiliary information belonging to each segment within the second device) in the extended frame containing embedded segment information. Since host chip 1 can also determine the topology information within the first device, it can also determine the topology information of the entire link. Therefore, both host chip 1 and host chip 2 can determine the topology information of the entire link, possessing a full-link perspective (or global perspective). This process can also be called segment topology discovery.

[0219] For devices that do not support the IEEE CL73 definition of AN DME frames, link topology negotiation can be achieved through PCS layer O code extension frames as described above. To avoid MAC layer linkup during the topology negotiation phase, dual-side hostchip negotiation synchronization can be achieved by inserting RF frames. As shown in Figure 25, during the topology negotiation process, the Frame TYPE field of the inserted Segment Info extension control frame is set to Local Fault, Remote Fault, or Link Interruption according to the protocol PCS layer definition. The insertion is canceled after the link topology negotiation is completed. Before the topology negotiation, consecutive Local Fault, Remote Fault, or Link Interruption frames (>3 frames) are inserted to make the Link Fault signal state machine enter the FAULT state. Then, Segment Info extension control frames (<127 frames) are inserted. A set of Segment Info extension control frame interactions is completed before the state machine jumps back to INIT. The above process can be repeated multiple times until the link topology negotiation process is completed. The relevant content in Figure 25 can also be found in Part 6 of the Ethernet section of IEEE Standard 802.3-2018 (IEEE 802.3-2018, IEEE Standard for Ethernet SECTION SIX).

[0220] On the other hand, continuing to refer to Figure 24, after host chip 1 in the first device sends the first allocation frame to host chip 2 in the second device, since the first allocation frame needs to be transmitted to host chip 2 through intermediate devices (devices located between host chip 1 and host chip 2) in the entire link, each device in the entire link can determine the first identifier in the first transmission direction based on the segment pointer field in the first allocation frame. After host chip 2 in the second device sends an extended frame (hereinafter referred to as the second allocation frame) with embedded segment information to host chip 1 in the first device, since the second allocation frame needs to be transmitted to host chip 1 through each device in the entire link, each device in the entire link can determine the first identifier in the second transmission direction based on the segment pointer field in the second allocation frame.

[0221] In this embodiment, the segment pointer supports dynamically establishing message path connections from the host chip to any specified device on the link topology. The relay device / optical module supports setting two register fields (or tags) regarding the segment pointer: local and remote (or full-link cascade). For example, the segment pointer includes, but is not limited to, the following.

[0222] 1. Local segment pointer: Represents the positional offset (e.g., topological positional coordinates) of a device (including optical modules) from its local host chip in the entire link.

[0223] 2. Remote segment pointer: Represents the positional offset (e.g., topological positional coordinates) of a device (including optical modules) from a remote host chip in the entire link.

[0224] In this context, the remote segment pointer[x] of device x in the link is equal to the total number of cascaded connections minus the local segment pointer[x]. Therefore, only one device in the link topology of the same interface can have its remote segment pointer equal to its local segment pointer; for example, the total number of cascaded connections in Figure 26 is 4. Optionally, only one device in the link topology of the same interface can have its remote segment pointer equal to its local segment pointer. In other words, at most one device in the link topology of the same interface is allowed to have its remote segment pointer equal to its local segment pointer.

[0225] For example, in Figure 26, the remote segment pointer of the optical module 2 in the second device is equal to the local segment pointer. Of course, in the embodiments of this application, any device can also satisfy the condition that the remote segment pointer is not equal to the local segment pointer, so that the first identifier is unique in the first transmission direction and the second transmission direction, or in other words, globally unique.

[0226] Furthermore, the local segment pointer and remote segment pointer have different meanings. They can be used by devices to distinguish whether the initiator of the extended frame request is the local hostchip or the remote hostchip. After completing the request processing flow, each device can independently fill in response information in different domain segments (or different NP pages) corresponding to the extended frame based on the different initiators' requests and the device's local or remote segment pointer markers (without affecting other domain segments or NP pages). The local and remote hostchips can identify different domain segments (or different NP pages) of the extended frame based on each device's local and remote segment pointers and obtain information such as the corresponding return status of each device. The values ​​of the local segment pointer and remote segment pointer may be different or the same. For example, when their values ​​are the same (only one device may exist in the same interface link topology), it indicates that the device's offset position from both the local and remote hostchips is the same. In this case, after responding to different initiators' requests from the local and remote hostchips, the device uses different lanes (MsgBus) to return to the local and remote hostchips. The hostchip has two backfill messages, which can be located in the same domain segment (or the same NP page) of the extended frame. The local hostchip and remote hostchip can still correctly parse the backfill message of the device based on the pointer position. Of course, this situation can also be avoided during pointer enumeration by avoiding the case where the local segment pointer and remote segment pointer are the same. For example, an offset can be added to the local segment pointer and remote segment pointer to ensure that after the pointer enumeration process, the pointer values ​​of the local segment pointer and remote segment pointer of each device in the entire link are not equal, or the pointer values ​​of the local segment pointer and remote segment pointer of each device in the entire link are globally unique in an interface link topology. This enables more flexible MsgBus message communication between any devices.

[0227] 3. Local and Remote Broadcast Pointers: Supports device broadcast pointers. All devices share the same local broadcast pointer and remote broadcast pointer, but the local and remote broadcast pointers can differ. This allows each device to identify whether the broadcast request initiator is the local or remote hostchip. After completing the broadcast request processing, each device can independently fill in independent information (without affecting other segments or NP pages) in different domains (or NP pages) corresponding to the extended frame based on the different initiators' requests and the device's local and remote segment pointers. The local and remote hostchips can identify different domains (or NP pages) of the extended frame based on each device's local and remote segment pointers, and obtain information such as the device's return status. For example, if some extended frame broadcast requests only require device processing, the hostchip does not need to identify the device status or distinguish the return status of each device. In this case, the local and remote broadcast pointers are not required to be identical. The pointers can be equal. After each device completes the local broadcast request or remote broadcast request command processing flow, there is no need to fill in the status information or fill in a common status information in the same field segment (or the same NP page) of the extended frame.

[0228] Based on the above description of the segment pointer field, this application does not limit the method of determining the first identifier in the first transmission direction based on the segment pointer field in the first allocation frame, and the method of determining the first identifier in the second transmission direction based on the segment pointer field in the second allocation frame, and includes at least the following two determination methods.

[0229] In the first determination method, each device in the entire link, except for host chip 1, reads the segment pointer field from the first allocation frame as its first identifier in the first transmission direction. All devices share the same first identifier in the first transmission direction. For example, all intermediate devices share the same first identifier in the first transmission direction. Optionally, for the first determination method, the first identifier in the first transmission direction can be recorded as the local broadcast pointer. In the entire link, each device, except for host chip 2, reads the segment pointer field from the second allocation frame as its first identifier in the second transmission direction. All devices share the same first identifier in the second transmission direction. For example, all intermediate devices share the same first identifier in the second transmission direction. Optionally, for the first determination method, the first identifier in the second transmission direction can be recorded as the remote broadcast pointer.

[0230] In the second determination method, each device in the entire link, except for host chip 1, determines its own first identifier in the first transmission direction based on the segment pointer field in the first allocation frame. After updating the segment pointer field in the first allocation frame, each device sends the first allocation frame to its downstream adjacent device in the first transmission direction until host chip 2 receives the first allocation frame. The first identifiers of each device in the first transmission direction are different. For example, the first identifiers of each intermediate device in the first transmission direction are different. Optionally, for the second determination method, the first identifier in the first transmission direction can be recorded as a local segment pointer. Each device in the entire link, except for host chip 2, determines its own first identifier in the second transmission direction based on the segment pointer field in the second allocation frame. After updating the segment pointer field in the second allocation frame, each device sends the second allocation frame to its downstream adjacent device in the second transmission direction until host chip 1 receives the second allocation frame. The first identifiers of each device in the second transmission direction are different. For example, the first identifiers of each intermediate device in the second transmission direction are different. Optionally, for the second determination method, the first identifier in the second transmission direction can be recorded as a remote segment pointer.

[0231] For example, determining a first identifier for oneself in the first transmission direction based on the segment pointer field in the first allocation frame includes: reading a first value of the segment pointer field in the first allocation frame and using the first value as the first identifier for oneself in the first transmission direction. Updating the segment pointer field in the first allocation frame includes: increasing (or decreasing) the first value by a specified value to obtain a second value, and writing the second value into the segment pointer field, such that the value of the segment pointer field in the first allocation frame is replaced by the second value. Additionally, determining a first identifier for oneself in the second transmission direction based on the segment pointer field in the second allocation frame includes: reading a third value of the segment pointer field in the second allocation frame and using the third value as the first identifier for oneself in the second transmission direction. Updating the segment pointer field in the first allocation frame includes: increasing (or decreasing) the third value by a specified value to obtain a fourth value, and writing the fourth value into the segment pointer field, such that the value of the segment pointer field in the second allocation frame is replaced by the fourth value.

[0232] For example, referring to Figure 26, host chip 1 sends a first allocation frame (segment pointer field value is 1) to the repeater. The repeater determines that the local segment pointer is 1, updates the segment pointer field value in the first allocation frame to 2, and then sends a first allocation frame (segment pointer field value is 2) to optical module 1. Optical module 1 determines that the local segment pointer is 2, updates the segment pointer field value in the first allocation frame to 3, and then sends a first allocation frame (segment pointer field value is 3) to optical module 2. Optical module 2 determines that the local segment pointer is 3, updates the segment pointer field value in the first allocation frame to 4, and then sends a first allocation frame (segment pointer field value is 4) to host chip 2. Optionally, host chip 2 can determine its own local segment pointer to be 4 (not shown in Figure 26) based on the end-to-end topology information or the received first allocation frame. Alternatively, host chip 1 can determine its own local segment pointer to be 0 (not shown in Figure 26) based on the end-to-end topology information. Alternatively, host chip 1 and host chip 2 may not have their own local segment pointers. In this case, only the intermediate device between host chip 1 and host chip 2 has a local segment pointer in the entire link. In Figure 26, C2C refers to chip to chip (C2C), and C2M refers to chip to module (C2M).

[0233] For example, referring to Figure 26 again, host chip 2 sends a second allocation frame (segment pointer field value is 1) to optical module 2. Optical module 2 determines that the remote segment pointer is 1, updates the segment pointer field value in the second allocation frame to 2, and then sends a second allocation frame (segment pointer field value is 2) to optical module 1. Optical module 1 determines that the remote segment pointer is 2, updates the segment pointer field value in the second allocation frame to 3, and then sends a second allocation frame (segment pointer field value is 3) to the repeater. The repeater determines that the remote segment pointer is 3, updates the segment pointer field value in the second allocation frame to 4, and then sends a second allocation frame (segment pointer field value is 4) to host chip 1. Optionally, host chip 1 can determine its own remote segment pointer to be 4 (not shown in Figure 26) based on the end-to-end topology information or the received second allocation frame. Alternatively, host chip 2 can determine its own remote segment pointer to be 0 (not shown in Figure 26) based on the end-to-end topology information. Alternatively, host chip 1 and host chip 2 may not have their own remote segment pointers, in which case only the intermediate device between host chip 1 and host chip 2 has a remote segment pointer in the entire link.

[0234] In an exemplary embodiment, the first allocation frame and the second allocation frame may contain different fields to facilitate the intermediate device in distinguishing different transmission directions. For example, the transmitted nonce field in the base page of the first allocation frame may have a fifth value, while the transmitted nonce field in the base page of the second allocation frame may have a sixth value, which differs from the fifth value. Accordingly, each intermediate device may be configured with both the fifth and sixth values. Upon receiving an allocation frame, if the allocation frame carries the fifth value, it indicates that the allocation frame is the first allocation frame, and the intermediate device determines the first identifier for the first transmission direction based on the first allocation frame. If the allocation frame carries the sixth value, it indicates that the allocation frame is the second allocation frame, and the intermediate device determines the first identifier for the second transmission direction based on the second allocation frame.

[0235] The first allocation method has been described above. For example, before the first device acquires the second frame, the method further includes: the first device sending an allocation frame to the second device, the allocation frame being used to allocate a first identifier to the second device. For example, the allocation frame carries reference information, and the first identifier is determined based on the reference information. The reference information may be, for example, the segment pointer field in the allocation frame.

[0236] When the first device is a host chip, it sends an allocation frame to the second device after generating it. When the first device is not a host chip, it sends an allocation frame to the second device after receiving it. In both the first and second determination methods described above (where the first and second devices are adjacent), the reference information in the allocation frame received by the second device is the same as the reference information in the allocation frame sent by the first device. Alternatively, in the second determination method (where the first and second devices are not adjacent), the reference information in the allocation frame received by the second device is the updated reference information from a third device between the first and second devices.

[0237] The second allocation method employs an out-of-band (non-in-band) allocation process, where the first identifier of multiple devices on the link is assigned by the host chip. For example, the out-of-band (non-in-band) allocation process can be used regardless of whether the link includes a standard LPO optical module. Similarly, the out-of-band (non-in-band) allocation process can be used regardless of whether the second device is a standard LPO optical module.

[0238] In an exemplary embodiment, the first identifier is determined based on the link topology information, whereby the link includes a link between the first device and the second device. For example, the link is the full link described above. The link topology information has already been explained in the above allocation method and will not be repeated here.

[0239] Optionally, the first identifier of a device in both the first and second transmission directions can be assigned by the host chip in the device containing the device based on the end-to-end topology information. For example, in the first device, the local segment pointer, remote segment pointer, local broadcast pointer, and remote broadcast pointer of each device are assigned by host chip 1 based on the end-to-end topology information. Similarly, in the second device, the local segment pointer, remote segment pointer, local broadcast pointer, and remote broadcast pointer of each device are assigned by host chip 2 based on the end-to-end topology information.

[0240] For example, the host chip can store the assigned first identifier in the cache of the host chip or CPU, or it can store the assigned first identifier in the register corresponding to the device indicated by the first identifier through an out-of-band interface (including but not limited to the CMIS interface), so that the device indicated by the first identifier can read and use the first identifier from the corresponding register, including but not limited to using the first identifier when implementing the AN process or LT process. In one example, the host chip stores the first identifier of a standard LPO optical module in the cache of the host chip or CPU, and stores the first identifier of a device different from the standard LPO optical module in the register corresponding to the device.

[0241] As explained above, regardless of the allocation method, the identifiers involved include: local segment pointer, remote segment pointer, local broadcast pointer, and remote broadcast pointer. The conditions for each identifier are explained below.

[0242] In one example, the local segment pointer and the remote segment pointer also satisfy the following exemplary rules (for illustrative purposes only).

[0243] (1) Since local segment pointer and remote segment pointer have different meanings, they are carried in extended frames (including but not limited to the first frame or other frames mentioned above) used to implement AN or LT procedures. This allows the host chip or other device in the first device to select the device corresponding to the local segment pointer and establish a message bus (MsgBus). It also allows the host chip or other device in the second device to select the device corresponding to the remote segment pointer and establish a message bus. Local and remote segment pointers can also be used by devices on the link to determine whether the initiator of the extended frame is the host chip or other device in the first device and the transmission direction of the extended frame is the first transmission direction, or whether the initiator of the extended frame is the host chip or other device in the second device and the transmission direction of the extended frame is the second transmission direction. Devices on the link can then perform forward, backward, or processing operations based on the initiator and transmission direction of the extended frame. Forward, backward, and processing operations will be explained in detail below.

[0244] (2) In the link topology, each device contains at least 2 pointers, that is, 2 first identifiers, namely 1 local segment pointer and 1 remote segment pointer.

[0245] (3) In the same interface link topology, the local segment pointers of different devices are different, and the remote segment pointers of different devices are different.

[0246] (4) The same rules can be used to generate local segment pointers and remote segment pointers within the same interface link topology.

[0247] For example, local segment pointer=function 1(local topology info, remote topology info), remote segment pointer=function 2(local topology info, remote topology info).

[0248] Here, `function` refers to the processing function, `local topology info` is the local topology information, and `remote topology info` is the remote topology information. The processing function can refer to either sequentially numbered according to the device's offset from the host chip, or performing calculations based on these numbers. Optionally, the calculations include, but are not limited to, at least one of the following arithmetic or logical combinational operations: maximum value calculation (max), minimum value calculation (min), offset, or value assignment.

[0249] When the local segment pointer and remote segment pointer are globally unique, the local segment pointer and remote segment pointer can be determined sequentially (including but not limited to ascending or descending) from the local segment pointer of the host chip with the smaller transmitted nonce field value. For example, referring to Figure 26, the transmitted nonce field corresponding to host chip 1 in the first device has a value of 1, and the transmitted nonce field corresponding to host chip 2 in the second device has a value of 2, where value 2 is greater than value 1. Therefore, starting from the local segment pointer of host chip 1, the local segment pointer of the repeater is determined as 1, the local segment pointer of optical module 1 as 2, the local segment pointer of optical module 2 as 3, the remote segment pointer of optical module 2 as 4, the remote segment pointer of optical module 1 as 5, and the remote segment pointer of the repeater as 6. The protocol defines that the AN state machine can only normally transition to the ACKNOWLEDGE_DETECT state when the values ​​of the transmitted nonce field of the base page of the local end (first device) and the base page of the peer end (second device) are not equal, thus allowing the smaller value of the transmitted nonce field to exist. The above rules also apply to multi-level pointers, with each level (1st / 2nd / 3rd) pointer allocated independently.

[0250] In one example, the local broadcast pointer and the remote broadcast pointer satisfy the following exemplary rules (for illustrative purposes only).

[0251] (1) In the link topology, each device contains at least two first identifiers, namely the local broadcast pointer and the remote broadcast pointer.

[0252] (2) In the same interface link topology, the local broadcast pointers of each device are the same, and the remote broadcast pointers of each device are also the same.

[0253] (3) In the same interface link topology, the local broadcast pointer is different from the local segment pointer and remote segment pointer of each device.

[0254] (4) In the same interface link topology, the remote broadcast pointer is different from the local segment pointer and remote segment pointer of each device.

[0255] (5) The local broadcast pointer can be used by the host chip or other devices in the first device to select multiple devices corresponding to the local broadcast pointer and establish a message path. The remote broadcast pointer can be used by the host chip or other devices in the second device to select multiple devices corresponding to the remote broadcast pointer and establish a message path. The local broadcast pointer and the remote broadcast pointer can also be used by each device on the link to determine whether the initiator of the extended frame is the host chip or other device in the first device and the transmission direction of the extended frame is the first transmission direction, or whether the initiator of the extended frame is the host chip or other device in the second device and the transmission direction of the extended frame is the second transmission direction. Each device on the link can perform forward transmission, backward transmission, or processing operations according to the initiator and transmission direction of the extended frame. Forward transmission, backward transmission, and processing operations will be explained in detail below.

[0256] (6) When the sender of the extended frame does not need to identify the device status or distinguish the return status of each device, the local broadcast pointer can be equal to the remote broadcast pointer.

[0257] (7) When the sender of the extended frame needs to identify the device status or distinguish the return status of each device, the local broadcast pointer is not equal to the remote broadcast pointer.

[0258] (8) The same rules can be used to generate local broadcast pointers and remote broadcast pointers within the same interface link topology.

[0259] For example, local broadcast pointer=function 3(local topology info, remote topology info), remote broadcast pointer=function 4(local topology info, remote topology info).

[0260] For explanations of function, local topology info, and remote topology info, please refer to the above text, and they will not be repeated here.

[0261] Furthermore, the host chip can send extended frames marked with segment pointers according to its algorithm requirements. Devices at each level in the entire link detect the segment pointer field in the extended frame. When the segment pointer in the parsed frame equals the device pointer, a message path is established between that device and the corresponding host chip; otherwise, the extended frame is directly transmitted. Flexible combinations of multi-level pointers are supported, which can be used to establish message paths from the host chip to any specified device and any specified lane. Multi-level pointers support independent lane granularity. This application, through the segment pointer function, allows the host chip to flexibly complete message interaction with specific devices in the link topology from its perspective. This embeds the multi-segment message interaction process into the overall communication flow of the local and remote host chips, thereby simplifying the multi-segment segmentation control flow, avoiding mutual coupling, and enabling global parameter tuning.

[0262] As described above, the first identifier indicates the second device. Exemplarily, the second device includes multiple transmission channels (lanes), and the first identifier further indicates at least one of the multiple lanes (such as the first channel). Optionally, the second device has multiple parameter spaces (units), each unit including at least one parameter (transmission parameter, link parameter, or mode parameter, etc.), and the first identifier further indicates at least one of the multiple units. The content indicated by the first identifier can be extended based on experience or actual needs, and this application embodiment does not limit this. When the first identifier further indicates the first channel, the implemented AN process is the AN process corresponding to the first channel, and the implemented LT process is the LT process corresponding to the first channel. For example, when implementing the LT process, the trained link parameters are the link parameters of the first channel. When the first identifier further indicates the parameter space, the implemented AN process is the AN process corresponding to the parameter space, and the implemented LT process is the LT process corresponding to the parameter space. For example, when implementing the LT process, the trained link parameters are the link parameters included in the parameter space.

[0263] In the first example, the first identifier indicates a combination of the second device, lane, and unit. For example, when the first identifier is P, it indicates the second device 1, lane 2, and unit 3. When the first identifier is Q, it indicates the second device 1, lane 4, and unit 5.

[0264] In the second example, the first identifier includes multiple sub-identifiers, each indicating one or two of the second device, lane, or unit, with different sub-identifiers indicating different contents. For example, the first sub-identifier indicates the second device and lane, and the second sub-identifier indicates the unit. Another example is that the first sub-identifier indicates the second device, and the second sub-identifier indicates the lane and unit. Yet another example is that the first sub-identifier indicates the second device (first-level device identifier), the second sub-identifier indicates the lane (second-level lane identifier), and the third sub-identifier indicates the unit (third-level unit identifier).

[0265] The first identifier in both examples above can be assigned according to the rules described above. For example, it can be assigned based on the overall link topology information, following the rules described above. When the first identifier includes multiple sub-identifiers, each sub-identifier can be independently assigned according to the rules described above.

[0266] Whether the second device is specified through an extended subframe (such as an extended field) in the second frame or through a first identifier carried in the second frame, it is used to implement the AN procedure or LT procedure between the first and second devices. For example, if the second frame (or other frames after the second frame, i.e., the extended frames mentioned above) contains AN parameters used in the AN procedure, the second device can use the AN parameters to implement the AN procedure. Similarly, if the second frame (or other frames after the second frame, i.e., the extended frames mentioned above) contains LT parameters used in the LT procedure, the second device can use the LT parameters to implement the LT procedure. Considering that the way the second frame carries AN or LT parameters follows the same principle as the way other frames carry AN or LT parameters, the following explanation uses the way the second frame carries AN or LT parameters as an example to avoid redundancy.

[0267] For example, the extended subframe of the second frame includes the following three fields.

[0268] The first field, the `frame type` field, is used to identify the frame type of the current frame. For example, it can identify the frame type as a unicast, broadcast, multicast, or test frame, etc. Unicast targets a single device on the link, broadcast targets all devices on the link (such as all intermediate devices), and multicast targets some (at least two) of all devices. The value of the `frame type` field corresponds one-to-one with the identified frame type.

[0269] The second type of field is the field related to the identifier. For example, the field related to the identifier includes a first part and a second part.

[0270] The first part is filled by the sender of the second frame and includes the first identifier indicating the second device, so that the second device can identify itself as the receiver of the second frame. Optionally, the first part may also include an identifier indicating the first device (or the first device's lane, unit, etc.), so that the second device can identify the first device as the sender of the second frame. If the first part only includes the first identifier (or the first identifier and the identifier indicating the first device), then the second frame is a unicast frame. For example, the unicast frame is a device-level unicast frame, but it can be a lane-level broadcast frame.

[0271] For example, when the first identifier is a local segment pointer or a remote segment pointer, the second frame also includes a second identifier, which indicates a fifth device. The first device, the second device, and the fifth device are devices on the same link. The first device can also send the second frame to the fifth device, and the second frame is also used to request the first device to perform an AN procedure or a LT procedure with the fifth device indicated by the first identifier. In this case, the second frame is a unicast frame.

[0272] Alternatively, when the first identifier is a local broadcast pointer or a remote broadcast pointer, it indicates not only the second device but also the sixth device, and the first, second, and sixth devices are on the same link. The first device can also send a second frame to the sixth device, which is also used to request the first device to perform an AN procedure or a LT procedure with the sixth device indicated by the first identifier. In this case, the second frame is a broadcast frame.

[0273] Optionally, the second frame may also include a broadcast mask, which indicates a reference device (or its lane, unit, etc.). This reference device is located on the same link as the first and second devices, but it is an unspecified device (or a masked device). For example, when the first identifier is a local broadcast pointer or a remote broadcast pointer (not limited to this), the reference device is located on the same link as the first, second, and sixth devices, but it is an unspecified device. In other words, by using the local broadcast pointer or remote broadcast pointer in conjunction with the broadcast mask (not limited to this), it is possible to specify a portion of all devices included in the entire link (i.e., devices other than the reference device). In this case, the second frame is a multicast frame.

[0274] The second part is filled by the receiver of the second frame as a response to the second frame. The second part can be the same as the first part, so that the sender of the second frame can determine that the response comes from the receiver of the second frame. The receiver of the second frame includes the second device, and may also include the fifth device, sixth device, etc., mentioned above. Optionally, if a response from the receiver of the second frame is not required, the second field may include only the first part and not the second part, or include both the first and second parts but the second part does not need to be filled.

[0275] The third type of field is the field related to implementing the AN or LT process. For example, the fields related to implementing the AN or LT process include the third and fourth parts.

[0276] The third part is filled by the sender of the second frame and includes control information for implementing the AN or LT procedure, including but not limited to the AN or LT parameters mentioned above, for controlling the receiver of the second frame to implement the AN or LT procedure.

[0277] The fourth part is filled in by the receiver of the second frame, including but not limited to status information. The status information is obtained by the receiver of the second frame through the AN or LT process implemented according to the control information, serving as a response to the second frame. If there are multiple receivers of the second frame, each receiver can independently fill in the status information based on its own identifier. Optionally, if a response from the receiver of the second frame is not required, the third field may include only the third part and exclude the fourth part, or include both the third and fourth parts but the fourth part does not need to be filled in.

[0278] For example, both the second and third fields described above are optional. For instance, in the first specification method described above, the first frame does not need to include the second field. Or, for the second specification method described above, in the case of unified command and control, the second frame includes both the second and third fields to specify the second device through the second field and to carry the AN or LT parameters through the third field. Alternatively, in the second specification method described above, in the case of separate command and control, the second frame includes the second field to specify the second device through the second field, and other frames include the third field to carry the AN or LT parameters through the third field.

[0279] Based on the above explanation, the frame structure of the second frame is illustrated as follows.

[0280] In the first example, when the second frame has the first frame structure (AN frame), the next page of the second frame (message type or unformatted type) can carry AN parameters so that the second device can use the AN parameters to implement the AN process. The second frame is a unified AN extended frame. Taking the unformatted type next page as an example, see Figures 27 and 28. The unformatted type next page can include the following fields.

[0281] (1) The frame type field is used to mark the frame type of the current frame. The frame type field in Figures 27 and 28 occupies U0 to U2 (3 bits in total) only as examples, and the number of bits occupied by the frame type field in this application embodiment is not limited. For example, the frame type field can mark the current next page in combination with other next pages (as shown in Figure 27), or it can mark the current next page alone (as shown in Figure 28).

[0282] For example, see Figure 27, which illustrates the combination of the current next page with other next pages. The current next page includes a frame type field, and this frame type field indicates that the current frame is used in combination with other next pages. Other next pages also include a frame type field, and this frame type field indicates that the other next page is a test frame.

[0283] In an exemplary embodiment, fields other than the frame type field in the test frame are used to carry test-related information to implement design-for-X (DFX) functions, such as link measurement, timestamps, loopback control, broadcast commands, PRBS, or custom code patterns.

[0284] In one example, other fields carry specific test patterns to test DME encoding and decoding that support different oversampling ratios. These test patterns can be PRBS patterns or custom patterns. The test patterns can be used for link error rate measurement or link diagnosis. For example, the test frame can modify different oversampling ratios (affecting T1 to T4) while still maintaining the AN protocol definition for T5 to T6 (i.e., not affecting T5 and T6), and does not affect the total duration of a single page of the AN frame as defined by the protocol (i.e., T5), simplifying the encoding / decoding state machine design. The DME oversampling ratio (rate) can be dynamically adjusted sequentially during the process (e.g., from low speed to high speed, 1 / 16, 1 / 8, 1 / 4, 1 / 2, or 1, etc.) to reduce the initial state error rate requirement and achieve gradual optimization of link parameters. Exemplarily, in addition to dynamically adjusting the rate sequentially, AN frames and LT frames in this embodiment can be transmitted at the same rate. Wherein, T1 is the transition position spacing, T2 is the clock transition to clock transition, T3 is the clock transition to data transition, T4 is the transitions in a DME page, T5 is the DME page width, and T6 is the DME Manchester violation delimiter width.

[0285] In another example, other fields carry specific test patterns to measure channel characteristics such as insertion loss (IL), return loss (RL), impedance, or crosstalk of the optical and telecommunication channels on the link, thereby completing channel estimation and parameter initialization.

[0286] In yet another example, other fields carry specific test patterns to measure the incident and reflected spectra when using the test patterns, test link impedance discontinuities, and can be used in online time domain reflectometer (TDR) or optical TDR (OTDR) functions to support the diagnosis of photoelectric channel fault types and fault locations, and can adjust the device transceiver circuits or optical device impedance matching through measurement results.

[0287] In another example, under different oversampling ratios for DME encoding and decoding (1 / 4, 1 / 2, or 1, etc.), the design of the AN protocol definition T1 to T6 is still compatible with the AN frame decoding state machine design. The link performance under different frequency signals is measured and can be used to set the device initial mode and parameters.

[0288] (2) Fields related to the first identifier.

[0289] In one example, referring to Figure 27, the fields associated with the first identifier include the segment pointer select field and the segment pointer echo field. Optionally, for a standard LPO optical module, these two fields can be read / written (WR) out of band using a control interface such as CMIS.

[0290] For example, the segment pointer select field carries a first identifier, and this first identifier indicates the second device (or the lane, unit, etc. of the second device). If the first identifier carried in the segment pointer select field is the same as the first identifier of the second device itself, the second device determines that it is the second device specified in the first frame. After the second device implements the AN procedure based on the control information carried in the segment request control field, in addition to filling the segment response status field with status information, it also fills the segment pointer echo field with the first identifier, making the value of the segment pointer echo field equal to the value of the segment pointer select field. Then, it returns to the first device so that the first device knows that the responding device is the second device indicated by the first identifier carried in the segment pointer echo field. Alternatively, if the first identifier carried in the segment pointer select field is different from the first identifier of the second device itself, the second device transmits the first frame to its downstream adjacent device according to the transmission direction of the first frame.

[0291] For example, the `segment pointer select` field carries a first identifier, and the `segment pointer echo` field carries an identifier indicating the first device (or the lane, unit, etc. of the first device). For instance, the first identifier in the `segment pointer select` field indicates the second device, and the identifier in the `segment pointer echo` field indicates the first device, used to establish a message path between the first and second devices to implement AN or LT procedures. Alternatively, the first identifier in the `segment pointer select` field indicates a lane of the second device, and the identifier in the `segment pointer echo` field indicates a lane of the first device, used to establish a message path between the lanes of the first and second devices to implement AN or LT procedures.

[0292] In another example, referring to Figure 28, the fields associated with the first identifier include a segment pointer select field and an extended segment pointer field, each carrying a different sub-identifier from the first identifier. For example, the segment pointer select field carries a first sub-identifier that indicates a second device, and the extended segment pointer field carries a second sub-identifier that indicates at least one of a lane or a unit.

[0293] Optionally, if the segment pointer select field carries a first sub-identifier indicating the second device and the extended segment pointer field carries a second sub-identifier indicating the lane (as the extended segment pointer field (2nd)), the segment request control field can be used to carry a third sub-identifier indicating the unit (as the extended segment pointer field (3rd)), and the segment response status field can be used as the segment pointer echo field described above. Of course, the segment request control field can also carry control information as described above, and the segment response status field can also carry status information as described above.

[0294] (3) segment request control field and segment response status field.

[0295] For example, the segment request control field can refer to the control field of the standard LT frame (occupying 16 bytes) to carry AN parameters used in the AN process, including but not limited to control information such as rate parameters, FEC capability parameters and device mode parameters. Device mode parameters include but are not limited to retimed mode, low power mode, etc. Retimed mode is a working mode of HRO optical module.

[0296] For example, referring to Figures 27 and 28, the segment request control field may carry at least one of the following: a preset item (such as preset 4) including multiple coefficients, a test pattern (such as test pattern 2), coefficients (such as coefficient 5), a work mode (such as mode 3), a reserved field (reserve, rsv, which may carry NP or toggle.LT (toggle bit field, T) for pagination, as detailed below), an extended segment pointer field, or a command, etc. The work mode may refer to performance, energy saving, or encoding / decoding methods, etc.

[0297] For example, the segment response status field can refer to the standard LT frame status field (occupying 16 bytes) to carry status information obtained after implementing the AN procedure. The status information is, for example, a specified status returned as needed after implementing the AN procedure. The AN procedure can be implemented based on the control information such as the rate parameters, FEC capability parameters, and device mode parameters mentioned above. After the second device implements the AN procedure according to the control information carried in the segment request control field, it fills the status information into the segment response status field and returns it to the first device so that the first device can know the status information.

[0298] For example, referring to Figures 27 and 28, the segment response status field may carry at least one of the following: initial condition status (IC_status), pattern status, coefficient status (coeff_status), rsv, ready to send (RTS), complete (e.g., indicating completion of the LT process), training frame local (TFL), or segment pointer echo field, etc.

[0299] This is equivalent to embedding the DME field (including the control field and status field) of the LT frame into the AN frame, so as to facilitate the adjustment of link parameters during the implementation of AN.

[0300] Based on the unifiedAN extended frame illustrated above, implementing the AN process between the first device and the second device may include the following steps. The AN process transmits and receives unifiedAN extended frames on a single lane (e.g., lane 0).

[0301] (1) The first device and the second device establish a message path based on the second frame and implement the AN process.

[0302] (2) The AN process can be used to configure transmission parameters such as rate parameters, FEC capability parameters, and device mode parameters. This configuration can refer to the state machine defined by at least one of the AN or LT protocols to complete message interaction and parameter updates, thereby simplifying the design. This configuration can be based on the results of implementing the LT process, and it can also provide assurance for subsequent LT process implementations. For example, it can ensure that the link quality meets the requirements of DME decoding.

[0303] (3) The first device and the second device can be flexibly configured. For example, the first device is the host chip 1 in the first device, and the second device is the optical module in the second device. Or, for example, the first device is the optical module in the first device, and the second device is the optical module in the second device.

[0304] In a second example, if the second frame has a second frame structure (LT frame), the PRBS field or next page of the second frame can carry LT parameters so that the second device can use the LT parameters to perform the LT procedure. The second frame is a unifiedLT extended frame. Referring to Figure 29, the PRBS field may include the following fields.

[0305] (1) Frame header field: This field is optional and includes the frame type field, a first identifier, and a length. The first identifier and length are optional fields. The length can be, for example, the length of the segment control field and segment status field within the PRBS field, or the page number of the next page. The fields in the frame header can be functionally divided into: request or control type field, and response or status type field. Different types of the second frame can be marked using the frame header fields. The HostChip initiates a Request, establishing a message path with a specified object in the link via MsgBus based on the Pointer mechanism. The specified object can be a Device / PhysicalLane / Unit (parameter space, etc.) in the link topology. The Request can be set to different types as needed, including but not limited to the following cases.

[0306] (a) Classified by communication object: Supports unicast, broadcast or multicast types.

[0307] (b) By function: mode configuration (e.g., device mode parameters as described above, which is equivalent to embedding AN frames into LT frames, or loopback mode as described below), link parameter configuration (presets for coarse tuning, including multiple coefficients, single coefficients for fine tuning, or convergence thresholds corresponding to the LT algorithm required for implementing the LT process, etc. Coarse tuning can be performed before the device state machine defined by the LT protocol enters the TRAIN_LOCAL state to avoid timeouts and restarts in the LT process), status information query (frame locking status, segment diagnostic results, SNR, BER, TX equalizer coefficients or RX equalizer coefficients, etc., RX equalizer coefficients are, for example, feed-forward equalizer (FFE) coefficients or decision-feedback equalizer (DFE) coefficients, etc.), DFX test (see description above), etc.

[0308] (c) By communication method: No need to identify the device return status, but need to identify the common status information returned by each device (each device can use the same field segment or next page for parsing and filling), and need to identify and distinguish the different status information returned by each device (each device can use different field segments or next page for parsing and filling).

[0309] (2) The segment control field and segment status field can be defined with reference to the LT frame DME field segment format or the AN frame format shown in Figures 27 and 28, which simplifies the design of the encoder-decoder state machine. For example, different meanings of the segment control field and segment status field are defined according to different frame types.

[0310] The segment control field carries control information, including but not limited to LT parameters. If the first identifier carried in the frame header is the same as the first identifier of the second device itself, the second device determines that it is the second device specified in the first frame.

[0311] In one example, after the second device performs the LT procedure based on the control information carried in the segment control field, it fills the segment status field with status information (see the explanation above, which will not be repeated here), and then returns it to the first device so that the first device can know the status information of the second device. Alternatively, if the first identifier carried in the segment control field is different from the first identifier of the second device itself, the second device will transmit the second frame to the downstream adjacent device according to the transmission direction of the second frame.

[0312] In another example, after the second device performs the LT procedure, it obtains the link parameters (such as the RX parameters of the second device), fills the link parameters into the segment status field, and then returns the RX parameters of the second device to the first device. This allows the first device to configure the TX link parameters of the first device in one go based on the link parameters carried in the segment status field, thereby improving the efficiency of link parameter configuration.

[0313] Based on the unified LT extended frame illustrated above, implementing the LT process between the first device and the second device may include the following steps.

[0314] (1) The first device determines the second device based on the signal state of the first device's RX. The LT process needs to be implemented to train and obtain the link parameters of the second device's TX.

[0315] (2) The first device can select the device that is closer to itself (such as the device that is located in the same device) as the second device by the first identifier, or it can select the device that is farther away from itself (such as the device that is located in a different device) as the second device, or it can select the second device according to the quality of each segment included in the link.

[0316] For example, the first device first queries the frame locking status of each segment. Different devices can respond to the frame locking status of the segments they are connected to based on their own identifiers. If a segment is not locked, the device connected to that segment is selected as the second device.

[0317] For example, the first device can be configured with a loopback mode for the second device for segmented diagnostics and parameter tuning. The first device can also preferentially select a device located within the same device (such as an optical module) as the second device, configure a loopback mode for the second device to tune the segment within the device where the first device is located, then cancel the loopback mode of the second device, and then select a device located in a different device as the second device to tune the segment between different devices. Referring to Figure 30, the device operation supports loopback modes (including but not limited to dual-transmission mode loopback or non-dual-transmission mode loopback). Any device (or lane, unit, etc.) in the link can be selected as the second device via a first identifier, and the loopback mode at the loopback point can be configured to achieve data path switching. This application does not limit the location of the loopback point in the device; for example, the loopback point of an optical module can be located on the HostSide side or the MediaSide side.

[0318] (3) The second device parses the first frame. If the first identifier in the first frame is different from the first identifier of the second device itself, the first frame is transmitted transparently. If the first identifier in the first frame is the same as the first identifier of the second device itself, a message path is established between the second device and the first device based on the first identifier in the first frame. The second device can distinguish the transmission direction of the first frame by the first identifier (or whether the initiator of the first frame is a device within the first device or a device within the second device). The second device can also distinguish the transmission direction of the first frame by the RX identifier (identification, ID) of the lane received in the first frame. The RXID is used to uniquely identify the RX. The reason is that the first transmission direction and the second transmission direction in the second device correspond to different RXIDs. If the second device does not involve changes in the number of lanes in the link, each lane within the interface of the second device can be used independently as a MsgBus, and each MsgBus supports independent parallel operation at the lane granularity.

[0319] (4) If the second device receives the first frame in different transmission directions simultaneously, it can respond sequentially in a time-division manner (without order restrictions) to avoid failure caused by simultaneous bidirectional responses. Taking the optical module in the first device as an example, if the HostSide side of the optical module detects that the RX of lane (x) is not locked, while the MediaSide side detects that the RX of lane (y) is normally locked, then the second device can respond to the first frame in the second transmission direction first. This first frame is sent by the device in the second device (such as host chip 2). Alternatively, if both the HostSide and MediaSide sides of the optical module are normally locked, but the host chip in the first device where the optical module is located is not locked, then the second device can respond to the first frame in the first transmission direction first. This first frame is sent by the device in the first device (such as host chip 1).

[0320] (5) The first and second devices can set the lane swap mapping relationship of intermediate devices according to the topology information of the entire link. Lane swap includes the mapping relationship between RX and TX of the same lane on the intermediate device. For example, the CPU or host chip can pre-store the lane swap mapping relationship of intermediate devices according to the hardware design of the device, or obtain the lane swap mapping relationship according to the segment topology mechanism mentioned above.

[0321] (6) The LT process implemented between host chip 1 in the first device and host chip 2 in the second device is the local host chip LT process, the LT process implemented between host chip 2 and host chip 1 is the remote host chip LT process, and the LT process between different devices is the segment LT process. The embodiments of this application can integrate the segment LT process into the local host chip LT process (or the remote host chip LT process). Each lane supports independent parallel training and supports full-duplex training in the first transmission direction and the second transmission direction.

[0322] For example, referring to Figure 31, in the first transmission direction, the first device can be host chip 1, and the second device can be optical module 2. Host chip 1 sends a request (such as the second frame). The second frame carries the local segment pointer of optical module 2 as 3. After passing through the repeater and optical module 1, the second frame reaches optical module 2. Optical module 2 performs the AN procedure or LT procedure according to the first frame and then returns a response to host chip 1. In the second transmission direction, the first device can be host chip 2, and the second device can be a repeater. Host chip 2 sends a request (such as the second frame). The second frame carries the remote segment pointer of the repeater as 3. After passing through the optical module 2 and optical module 1, the second frame reaches the repeater. The repeater performs the AN procedure or LT procedure according to the second frame and then returns a response to host chip 2.

[0323] The above describes the methods for implementing the AN process and the LT process. In exemplary embodiments, this application also supports using the Protocol Physical Coding Sublayer (PCS) or FEC layer to reserve codewords, and dynamically and losslessly fine-tuning any specified device (or lane, unit, etc.) in the link topology during service traffic gaps based on the RX side signal quality in the device, the order of extended subframes, the order of extended fields in the extended subframes, or identifiers, etc.

[0324] In this embodiment, the implementation of the AN process and the implementation of the LT process can be achieved collaboratively through out-of-band (control interfaces such as CMIS) and in-band (MsgBus).

[0325] (a) In-band scheme: If devices such as repeaters and optical modules in the link support in-band parsing and padding of unifiedAN / LT extended frames, then these devices can implement the AN process or the LT process in-band based on a first identifier and a state machine defined by at least one of the AN or LT protocols. Optionally, these devices can also respond, such as padding the first frame with state information to obtain a response frame, or returning a response frame to the first device to respond.

[0326] (b) Out-of-band solution (devices within the same device): If the first device and the second device are within the same device, and the second device does not support in-band parsing and padding of unified AN / LT extended frames, then the control system such as the host chip or CPU within the device can use the out-of-band control interface such as CMIS within the device to perform the AN process or the LT process on behalf of the second device (such as directly setting the transmission parameters or link parameters of the second device).

[0327] (c) Combination of out-of-band and in-band solutions (devices in different devices): The first device and the second device are in different devices, and the second device does not support in-band parsing and padding of the unifiedAN / LT extended frame. After the first device sends the first frame to the second device, the second device transparently transmits the first frame, enabling the host chip or CPU control system of the device where the second device is located to receive the first frame (sending the first frame to the host chip of the device where the second device is located via in-band method). Subsequently, the host chip or CPU control system of the device where the second device is located parses the first frame, identifies the second device based on the first identifier in the first frame, and performs the AN process or LT process on behalf of the second device through the out-of-band control interface such as CMIS within the device (e.g., directly setting the parameters of the second device). Optionally, the host chip or CPU control system of the device where the second device is located can also respond, for example, the host chip or CPU control system of the device where the second device is located fills the status information in the first frame to obtain a response frame, sends the response frame to the second device, and the second device transparently transmits the response frame to the first device to respond.

[0328] Since the host chip can obtain the topology information of the entire link (including the types of each device on the link), when the host chip is used as the first device, it can determine whether the second device supports in-band parsing and padding of unifiedAN / LT extended frames based on the type of the second device, so as to select from (a) to (c) above according to actual needs. Optionally, other devices besides the host chip can also obtain the topology information of the entire link, so as to select from (a) to (c) above according to actual needs.

[0329] Next, referring to Figure 32, and taking the host chip 1 in the first device as an example, we will continue to illustrate the in-band and out-of-band methods.

[0330] (1) When the host chip 1 knows the topology information of the entire link and the first identifier indicating the second device, it selects the in-band, out-of-band or a combination of in-band and out-of-band modes according to the position of the second device in the link and the type of the second device.

[0331] (2) Corresponding to (b) above, if the second device is the optical module 1 in the first device, the host chip 1 or the CPU in the first device and other control systems (or the two can work together, such as the host chip 1 reporting an interrupt to the CPU and the CPU responding to the interrupt) establish a message path with the optical module 1 through the out-of-band CMIS and other control interfaces, and implement the LT process (e.g., configure link parameters and obtain response information).

[0332] For example, the host chip 1 or CPU may have X control interfaces for interfacing with Y optical modules (each optical module needs to have an independent control interface). When the values ​​of X and Y are different, there is a map from X to Y. When the second device is one of the Y optical modules, the ModSelL signal of the second device can be controlled to select the second device according to the map from X to Y. The ModSelL signal is, for example, the chip select signal of the CMIS control interface of the optical module defined by the QSFPDD-800 protocol.

[0333] (3) Corresponding to (c) above, if the second device is optical module 2 (standard LPO optical module) within the second device, then the host chip 1 fills the first identifier of optical module 2 in the first transmission direction, i.e., local segment pointer = 3, embeds the unified AN / LT extended frame for transmission, and transmits it to the host chip 2 via the repeater, optical module 1, and optical module 2. Specifically, for the repeater (whose own local segment pointer = 1), since the local segment pointer carried by the unified AN / LT extended frame is different from its own local segment pointer, it transmits the unified AN / LT extended frame to optical module 1 without parsing. For optical module 1 (whose own local segment pointer = 2), since the local segment pointer carried by the unified AN / LT extended frame is different from its own local segment pointer, it transmits the unified AN / LT extended frame to optical module 2 without parsing. For optical module 2, since it is a standard LPO optical module and does not have the ability to parse the unified AN / LT extended frame in-band (i.e., it does not support DME encoding / decoding), it transmits the unified AN / LT extended frame to the host chip 2.

[0334] (4) The host chip 2 receives the unified AN / LT extended frame and parses the local segment pointer field in the unified AN / LT extended frame to obtain the first identifier, i.e., local segment pointer = 3. The host chip 2 determines that the second device is the optical module 2 in the second device, i.e. the standard LPO optical module, which does not have the ability to parse the unified AN / LT extended frame in-band.

[0335] (5) The control system such as the CPU in the host chip 2 or the second device (or both can be used together, see the description in (2)) establishes a message path connection with the optical module 2 through the control interface such as CMIS, configures the link parameters corresponding to the optical module 2 according to the control information carried in the control field and other fields in the UnifiedAN / LT extension received by the host chip 2, and reads the status information of the optical module 2.

[0336] (6) Host chip 2 fills the segment pointer echo field in the unifiedAN / LT extended frame with the value of the local segment pointer field, resulting in segment pointer echo = 3. Host chip 2 also fills the status field in the unifiedAN / LT extended frame with the read status information, resulting in a response frame (also a unifiedAN / LT extended frame). After host chip 2 sends the response frame, the response frame is sequentially transmitted to host chip 1 through optical module 2, optical module 1, and repeater. The reason for the transmission of optical module 2, optical module 1, and repeater is explained in (3), and will not be repeated here.

[0337] (7) After receiving the response frame, the host chip 1 parses the segment pointer echo field and status field in the response frame to obtain the response information carried by segment pointer echo=3 and status field. Then the host chip 1 can determine that the optical module 2 implements this LT process. Then the host chip 1 can enter the next LT process according to the actual needs. For example, the host chip 1 can jump to (1).

[0338] Through the technical solution of this application, the host chip 1 of the first device communicates with the optical module of the second device via AN or LT in a specified manner, thereby enabling the host chip 1 of the first device to control or adjust the optical module of the second device.

[0339] When the optical module of the second device lacks in-band capability (e.g., an LPO optical module), the host chip of the first device establishes an AN or LT procedure with the optical module of the second device by specifying the optical module. However, since the optical module of the second device lacks in-band capability, the specification request frame sent by the host chip of the first device is received by the host chip of the second device. The host chip of the second device parses the specification request frame and adjusts the TX parameters of the optical module of the second device based on CMIS through the management interface. The management interface is, for example, I... 2The second device uses a C interface. In this way, the optical module of the second device is treated as a "dumb terminal" device during the AN or LT process, while the host chip of the second device becomes a proxy device for the host chip of the first device, performing adjustments to the TX parameters of the optical module of the second device, thereby enabling the host chip of the first device to control the TX of the optical module of the second device.

[0340] For example, when the optical module of the second device is a standard LPO optical module, when the host chip 1 specifies AN or LT with the standard LPO optical module, the host chip 2 of the second device can perform AN or LT on behalf of the standard LPO optical module as described above. The host chip 2 can also return a response to the host chip 1 on behalf of the standard LPO optical module, thereby realizing that the host chip 1 of the first device controls or adjusts the standard LPO optical module of the second device.

[0341] When the optical module of the second device has in-band capability (e.g., oDSP optical module), the host chip of the first device can directly establish AN or LT process with the optical module of the second device by specifying the optical module of the second device, thereby completing the TX parameters of the optical module of the second device.

[0342] For example, if the optical module of the second device is an ODSP optical module, then the host chip 2 of the second device does not need to perform the work. The optical module of the second device can complete the AN or LT on its own and return a response to the host chip 1, thereby realizing that the host chip 1 of the first device can directly control or adjust the optical module of the second device.

[0343] In the above implementation, in-band capability refers to the ability to resolve DME frames. Having in-band capability refers to a retiming operating mode; conversely, lacking in-band capability refers to linear operating mode. Some optical modules determine their in-band capability based on the transmission direction of the optical signal, such as linear receive optics (LRO) modules. Optionally, in-band capability can also refer to the ability to resolve online frames. Online frames can be similar to the first or second frame. It should be noted that the DME-related content mentioned in this application, such as resolving DME frames or supporting DME decoding, refers to the in-band capability of resolving DME frames as an example, but is not intended to limit in-band capability. In-band capability can also refer to whether online frame decoding is supported. For example, Figures 4, 40, and 41, which involve DME, are examples and can also refer to online frames.

[0344] In the above implementation, the in-band capability of the optical module of the second device is configurable. That is, the optical module of the second device can be configured to have in-band capability or not. In this case, the host chip of the first device is unaware of the current operating mode of the optical module of the second device. In this scenario, the host chip of the first device requests (or desires) to establish an AN or LT procedure with the optical module of the second device by specifying it. If the optical module of the second device currently has in-band capability, then, according to the aforementioned implementation, the host chip of the first device and the optical module of the second device directly implement the AN or LT procedure. If the optical module of the second device currently does not have in-band capability, then, according to the aforementioned implementation, the host chip of the first device controls the TX parameters of the optical module of the second device through a proxy of the host chip of the second device.

[0345] In the above implementation, the host chip of the first device does not need to know the operating mode of the optical module of the second device. The host chip of the first device requests to establish an AN or LT procedure with the optical module of the second device by specifying the optical module of the second device. Furthermore, the specified request frame (such as the second frame) sent by the host chip of the first device also includes request proxy information, which requests the host chip of the second device to act as an agent for the host chip of the first device in controlling the optical module of the second device. Based on the specified request frame, the host chip of the second device determines the operating mode of the optical module of the second device, and then performs TX parameter control of the optical module of the second device according to the operating mode of the optical module.

[0346] In related technologies, the TX of the optical module of the second device is optimized by performing LT or AN between the host chip of the second device and the optical module of the second device. However, the transmission quality of the TX of the optical module of the second device may be affected by the host chip of the first device. Therefore, simply performing LT or AN between the host chip of the second device and the optical module of the second device can only achieve limited performance optimization for the TX of the optical module of the second device.

[0347] In this embodiment, the host chip of the first device establishes a message path with the optical module of the second device in a specified manner and implements the LT or AN process. In this way, the TX parameters of the specified optical module of the second device are adjusted through the message path, thereby realizing the control of the TX of the optical module of the second device by the host chip of the first device. This control process takes into account the influence of the host chip of the first device on the TX parameters of the optical module of the second device, ensures the accuracy of the TX parameters of the optical module of the second device, improves the transmission quality of the TX of the optical module of the second device, and achieves a large degree of performance optimization.

[0348] Figure 33 shows a schematic diagram of the TWI interface topology between the device host chip and the optical module. After completing segment topology negotiation and segment pointer enumeration, the local host chip selects either in-band or out-of-band Msgbus message path establishment based on the location and type of the parameter tuning object. For example, if the parameter tuning object is LocalOpt, the host chip or the CPU within the first device (or both can work together, such as the host chip reporting an interrupt to the CPU, and the CPU responding to the interrupt) establishes a message path with LocalOpt through an out-of-band CMIS or other control interface, and completes parameter configuration and status reading. Alternatively, only status reading can be performed without parameter configuration, such as during broadcast reading where only the status is read, without parameter configuration.

[0349] Furthermore, it's important to note that the host chip of a device may have multiple interfaces, each capable of connecting to different optical modules. These different optical modules may be mounted on the same TWI bus, and their TWI bus device addresses may be identical. In such cases, the corresponding optical module's ModSelL (QSFPDD-800 e.g.) signal can be controlled to select the appropriate optical module based on the pointer and the mapping relationship between the host chip and the optical module interface within the device. Alternatively, the OSFP optical module can be dynamically assigned an address based on the I3C protocol (this dynamic address can also be used to generate the optical module's Segment Pointer). The I3C dynamically assigned addresses of the optical modules on the local and remote ends may be the same, but the segment pointers will differ. The pointer represents the device in the optoelectronic link, supports dynamic allocation during link establishment, and is used to control the frame to point to a specific device. The I3C address is the optical module device address defined by CMIS, used by the device's internal controllers, such as the CPU, to access the optical module through the CMIS interface.

[0350] Furthermore, in the method provided in this application embodiment, the mapping relationship between the CMIS address and interface number of the optical module of each interface in the device can be stored in advance in devices such as CPU and FLASH, improving the addressing efficiency of control frame communication. If the parameter tuning object is RemoteOpt, the localhost chip fills the RemoteOpt pointer information (Local Segment Pointer=3) and embeds the extended control frame for transmission. After passing through Local Retimer / LocalOpt / RemoteOpt (if the control frame Segment Pointer does not point to itself, it is passed through without processing, or it does not support control frame parsing and is directly passed through).

[0351] The remote hostchip receives the second frame and parses the segment pointer information (local segment pointer = 3) in the second frame. Based on the pointer information, the remote hostchip determines that its parameter tuning interface is located within the local device, the topology location is RemoteOpt, and the device does not support in-band control frame processing. Subsequently, the remote host chip or the CPU or other control devices in the second device (or both can work together, as above) look up the table to obtain the CMIS address of the optical module corresponding to the interface, and establish a message path connection with RemoteOpt through the CMIS or other out-of-band interfaces. According to the REQUEST parameter tuning and other control commands in the control field segment of the second frame received by the hostchip, the remote hostchip completes the specified control procedures such as parameter configuration and status reading of RemoteOpt.

[0352] Next, the remotehost chip fills in the Preset / Segment Status and pointer response (segment pointer echo = 3) information and embeds it into the control extended frame for transmission. After passing through the local retimer / LocalOpt / RemoteOpt (which parses the control frame Segment Pointer and passes it through without processing if it does not point to itself, or does not support control frame parsing and passes it through directly), the local host chip receives the control frame and parses the Segment Pointer information in the extended frame (segment pointer echo = 3). It recognizes that the RemoteOpt has completed the current command and responded, and can start the next parameter tuning and other control processes (jump to step 1).

[0353] The above text mentions the message path MsgBus. This application embodiment can obtain the MsgBus based on the first identifier described above to transmit the aforementioned unified AN / LT extended frame, thereby realizing unicast, broadcast, or multicast mechanisms. These mechanisms are applicable to lane-symmetric scenarios (see Figure 34) and also to lane-asymmetric scenarios (see Figure 35). For example, in the case where the repeater is a gearbox, the lanes on both sides of the gearbox are asymmetrical. Alternatively, the lanes on both sides of an optical module (including but not limited to an oDSP optical module) may also be asymmetrical. Lane asymmetry means that the total number of lanes on both sides of a device is different; one side of a device is closer to host chip 1, and the other side is closer to host chip 2. In lane asymmetry scenarios, the number of lanes changes throughout the entire link. The upstream and downstream lanes in a certain transmission direction are not a one-to-one mapping relationship, and there may be multiple mutual influence relationships between upstream and downstream lanes in a certain transmission direction under different types of devices and link topologies.

[0354] In a lane-symmetrical scenario, there is a MsgBus between corresponding lanes. For example, referring to Figure 34, there is a MsgBus between lane 0 of the first device (interface A) and lane 0 of the second device (interface B), and there is a MsgBus between lane 1 of the first device (interface A) and lane 1 of the second device (interface B). Referring to Figure 36, in a lane-symmetrical scenario, all lanes are treated as MsgBus (message path, also known as message bus). The system receives and checks whether the extended frame satisfies the following conditions: the segment identifier selection (semgent pointer select field) is equivalent to (==) the remote segment pointer or (||) the local segment point. If not, reception and detection continue. If satisfied, the system matches the lane receive channel number (RXID) M, queries the channel mapping relationship (laneswap), and finds the lane transmit channel number (TXID) N corresponding to M. This allows for the formation of a MsgBus between the lane (e.g., the lane receiving the extended frame, with its receive channel number M and transmit channel number N) and the host chip, and communication via MsgBus, including but not limited to transparent transmission of extended frames.

[0355] In scenarios with asymmetric lanes, lanes are not in a one-to-one correspondence. Referring to Figure 37, a lane is selected as the MsgBus for the lane group. The MsgBus receives and checks whether the extended frame satisfies the following: the segment identifier selection (semgent pointer select field, for example, carrying the 1st device identifier) ​​is equivalent to (==) the remote segment pointer or (||) the local segment point. If not, it can continue to receive and check. If it is satisfied, it obtains the 2nd lane identifier from the extended frame, matches the lane receive channel number (RXID) M, queries the channel mapping relationship (laneswap), and finds the lane transmit channel number (TXID) N corresponding to M. Thus, an MsgBus can be formed between the lane (such as the lane indicated by the 2nd lane identifier, the receive channel number M, and the transmit channel number N of this lane) and the host chip, and communication can be carried out using the MsgBus, including but not limited to extended frame termination and regeneration.

[0356] For example, embodiments of this application may obtain MsgBus based on a first identifier. For example, the methods for obtaining MsgBus include, but are not limited to, the following three.

[0357] The first acquisition method is the banding scheme. For devices with asymmetrical lanes (including but not limited to gearboxes), all lanes within the device's interface are grouped together. One lane in the lane group is selected as the MsgBus. The MsgBus (which lane is used to transmit the unified AN / LT extended frame) and the control mechanism (which lane the AN / LT procedure is implemented on, or in other words, the control object targeted by the unified AN / LT extended frame) are separated and independent. Therefore, devices with asymmetrical lanes can be simplified to single-lane devices, and the AN or LT procedure can be implemented directly as described above.

[0358] For example, as shown in Figure 35, in a 2:1 mapping (2 lanes become 1 lane), two lanes can be grouped into one lane group, which appears as one lane group from the system's perspective. Any lane in the lane group (such as lane 0) can be used as the MsgBus, while the other lane (such as lane 1) is not represented by the MsgBus, i.e., it is not used as the MsgBus. From the system's perspective, the MsgBus on both sides of the interface still maintain a one-to-one mapping relationship. The MsgBus and the control mechanism are separated. Any lane in the lane group is used to transmit the unified AN / LT extended frame, while each lane in the lane group (which can be either lane 0 or lane 1, separate and independent from lane 0 which is used as the MsgBus) can use the unified AN / LT extended frame to implement the AN procedure or the LT procedure.

[0359] For example, each lane within a lane group can meet certain design requirements (such as equal-length design, where the AN and LT processes of all lanes within the lane group can be bound together for control), effectively improving the training efficiency of initial parameters (coarse tuning). For instance, all lanes within a lane group can use the same parameter tuning results (such as the same link parameters).

[0360] For example, if the link loss relationship of each lane within a lane group is fixed, then each lane within the lane group can be differentiated by adjusting its parameters based on this link loss relationship. This link loss relationship can be pre-stored in the device according to the hardware design or configured by the CPU. For instance, after performing the AN or LT process on lane0, the parameter adjustment result of lane1 (such as the link parameters corresponding to lane0) can be calculated based on the parameter adjustment result of lane0 (such as the link parameters corresponding to lane0) according to the link loss relationship.

[0361] The first device selects one lane from the lanegroup within its interface as the MsgBus for transmitting unified AN / LT extended frames. The MsgBus selection can be based on a static principle, such as fixing it to lane 0 (both the first and second devices can be configured to determine which lane is used). In this case, a MsgBus exists between the first and second devices by default, eliminating the need for a separate MsgBus establishment. Alternatively, the MsgBus selection can be based on a dynamic principle, such as selecting lane X with a better link signal. In this case, a separate MsgBus needs to be established between the first and second devices before transmitting the first frame. Another option is to first design the MsgBus selection based on a static principle and then on a dynamic principle. For example, first designing based on a static principle, selecting lane 0 as the MsgBus, and then designing based on a dynamic principle, selecting lane X with a better link signal as the MsgBus. When laneX is different from lane0, it is equivalent to updating MsgBus from lane0 to laneX. When laneX is the same as lane0, it is equivalent to verifying that the MsgBus link signal selected based on the static principle is better.

[0362] For example, before the first device sends the first frame to the second device, the method further includes: the first device acquiring the second frame, the second frame carrying a first identifier, the first identifier indicating the first channel of the second device and the second device, the frame type of the second frame being different from the frame type of the first frame; the first device sending the second frame to the second device, the second frame being used to request the first device to establish a message path with the first channel of the second device, the message path being used to transmit the first frame.

[0363] In this design, the second frame is used to request the establishment of a message path and to specify the second device. Therefore, the frame type of the second frame differs from that of the first frame; for example, the value of the frame type in the second frame differs from that in the first frame. Furthermore, after receiving the second frame, the second device, since the first identifier indicates itself and its first channel, determines to establish a message path with the first device using its first channel to transmit the first frame. For example, the second frame may also carry an identifier indicating the second channel of the first device, such that the message path is located between the second channel and the first channel of the first device. The frame structure of the second frame is similar to that of the first frame described above, and the method of carrying the identifier in the second frame is also similar to that described above, and will not be repeated here.

[0364] The second acquisition method is the code division scheme. According to the code division multiplexing principle, one lane is regarded as two sublanes. Different sublanes can be indicated by different identifiers. For example, the 2nd lane identifier included in the first identifier in the above description can further indicate the sublane. Thus, the first identifier indicates the sublane in the first channel of the second device and the second device, thereby enabling the establishment of MsgBus between the lane and the sublane based on the first identifier.

[0365] For example, as shown in Figure 35, in the 2:1 mapping, lane0 of the second device (interface B) is regarded as sublane0 and sublane1. The first identifier carried in the second frame indicates the device and interface B.lane0.sublane0 where interface B is located. The second frame can then establish a MsgBus between interface A.lane0 and interface B.lane0.sublane0 of the first device (interface A), and between interface A.lane1 and interface B.lane0.sublane1 of the first device. From the system perspective, two independent MsgBus based on sublane are established on one lane, and the MsgBus of both sides (interface A and interface B) still maintain a one-to-one mapping relationship.

[0366] For example, code division schemes and clustering schemes can be used in combination. For instance, a lane group can be used to designate a lane as the MsgBus. The 1st device identifier in the first identifier indicates the second device, and the 2nd lane identifier indicates different sublanes within the same lane group. This allows MsgBus to be established between any lane and sublane (belonging to the same lane) of different devices based on the MsgBus and the first identifier (including the 1st device identifier and the 2nd lane identifier). Furthermore, the MsgBus and the control mechanism are separate and independent.

[0367] The third acquisition method is a time-division multiplexing scheme. Following the time-division multiplexing principle, a MsgBus is established in time-division between interface A.lane0 and interface B.lane0, and between interface A.lane1 and interface B.lane0. From a system perspective, this allows for two time-division MsgBus on a single lane, maintaining a one-to-one mapping between the MsgBus on both sides of the interface. Furthermore, the MsgBus and control mechanism are separate and independent.

[0368] The AN protocol itself is based on a single lane. Therefore, in lane asymmetry scenarios, simplifying multiple lanes into one lane has no impact on the implementation of the AN process. However, in lane symmetry scenarios, the LT process can be implemented in parallel and independently across multiple lanes. In lane asymmetry scenarios, however, the LT process can only be implemented on a single lane (i.e., the lane serving as the MsgBus), reducing efficiency. Therefore, embodiments of this application provide a broadcast / multicast mechanism to achieve the effect of parallel and independent implementation across multiple lanes even when the LT process is implemented on a single lane, thus avoiding the impact of lane asymmetry on efficiency.

[0369] In lane asymmetry scenarios, a single interface of a device can contain multiple lanes, which are physical lanes. For example, taking optical module 1 in Figure 38 as an example, the HostSide side has 2 lanes, and the MediaSide side has 1 lane. The number of lanes on both sides of optical module 1 is not equal (optical module 1 performs 2:1 rate and lane conversion). The link may include devices with multiple lane asymmetry. In addition, repeater 1 performs 4:2 rate and lane conversion, optical module 2 performs 1:2 rate and lane conversion, and repeater 2 performs 2:1 rate and lane conversion.

[0370] For example, in a unified AN or unified LT process, the lane rates on both sides of the device differ in a lane asymmetry scenario. In one example, when the device terminates and regenerates a unified AN extended frame or a unified LT extended frame, if the frame format defined by the AN or LT protocol is the same, both sides of the device can still follow the same frame format parsing and padding rules and are unaware of the lane rate change. In another example, the link between the first and second devices includes at least one third device, and the lanes on both sides of the third device are asymmetric. The method provided in this application embodiment further includes: the third device receiving a first frame; the third device converting the first frame into a fourth frame; the fourth frame being used to request the first device and the second device to implement an AN or LT process; and the third device sending the fourth frame to the second device.

[0371] In one example, the first frame is in non-return-to-zero (NRZ) format, and the fourth frame is in pulse amplitude modulation (PAM) format, such as PAM4. In another example, the first frame is in PAM format, and the fourth frame is in NRZ format. During the transmission of the unifiedLT extended frame, when the NRZ and PAM4 rates change on both sides of the device (e.g., from 2x25G to 1x50G), because the LT frame formats defined by NRZ and PAM are different, the device needs to parse and fill the unified LT extended frame according to both NRZ and PAM formats respectively.

[0372] For MsgBus, referring to Figure 39, based on a single lane (e.g., lane 0), MsgBus can be numbered according to each segment in the link (e.g., MsgBus1 to MsgBus5). On the host chip side, MsgBus transmit / receive markers are Yt (receive) and Xt (transmit). On the middle device side (including optical modules), MsgBus transmit / receive markers are Xi (receive) and Yi (transmit), while on the other side, they are Zj (transmit) and Kj (receive). The {Xi, Yi, Zj, Kj} of MsgBus are used in a bound manner. For example, based on the laneswap and frame (e.g., unified LT extended frame) transmission direction described above, determining one of Xi, Yi, Zj, or Kj will yield the other three. The host chip terminates frames, while intermediate devices either transmit frames transparently (if DME encoding / decoding is not supported) or terminate and regenerate frames (if DME encoding / decoding is supported). Intermediate devices can be categorized as upstream and downstream based on the frame transmission direction. For example, taking Xi of optical module 1 as an example, for the first transmission direction, the upstream could be Zj and Xi of repeater 1, or Xt of host chip 1, while the downstream could be Xi and Zj of optical module 2, etc.

[0373] After receiving the extended frame, Xi of optical module 1 sends the extended frame to Zj, which can be considered as a forward transmission. Forward transmission means that the transmission direction of sending the extended frame is the same as the transmission direction of receiving the extended frame. After receiving the extended frame, Xi of optical module 1 sends the extended frame to Yi, which can be considered as a backward transmission. Backward transmission means that the transmission direction of sending the extended frame is opposite to the transmission direction of receiving the extended frame.

[0374] For the host chip side, the MsgBus communication method is shown in Figure 40. Based on the end-to-end topology information, the host chip can use different MsgBus acquisition methods to establish MsgBus connections with specified objects (second devices, second device lanes, or second device units, etc.) in the end-to-end connection, according to actual needs. As mentioned earlier, MsgBus can be used to transmit the first frame, which can be unicast (unicast frame or unicast request), broadcast (broadcast frame or broadcast request), or multicast (multicast frame or multicast request), with each interface independent of the others. A unicast request refers to the host chip communicating with a single specified object via MsgBus, while a broadcast request refers to the host chip communicating with multiple specified objects via MsgBus.

[0375] The host chip can select different types of requests based on actual needs. For example, it can first use broadcast requests to coarsely adjust and improve the efficiency of initial parameter configuration (the parameters of multiple objects can be configured at once during the coarse adjustment phase, saving time), and then use unicast requests to fine-tune and improve link performance (the parameters of a single object can be adjusted at a time during the fine adjustment phase, avoiding link oscillations). Alternatively, it can use broadcast requests to quickly recover when a fault occurs. When there are devices with asymmetric lane numbers in the link topology of this interface, the entire link can be uniformly built based on a single lane to construct a single MsgBus, simplifying the entire link message path topology. When there are no devices with asymmetric lane numbers in the link topology of the interface, the entire link can be built based on multiple lanes to obtain multiple MsgBus, which can communicate independently and in parallel at the lane granularity.

[0376] For example, referring to Figure 40, the host chip can determine whether a specified object (such as a device) supports DME decoding, whether a gearbox exists in the entire link (in non-lane symmetric scenarios), and whether a broadcast request should be sent based on the segment topology discovery process described above. If the device supports DME decoding, a MsgBus is established in-band. If the device does not support DME decoding, a MsgBus can be established out-of-band through control interfaces such as CMIS. If a gearbox does not exist in the entire link, a MsgBus can be established as shown in Figure 36 (different lanes are arranged side-by-side). If a gearbox exists in the entire link, a MsgBus can be established as shown in Figure 37 (a single lane in the lane group is used as the MsgBus). If a broadcast request is sent, the broadcast request carries a broadcast pointer (and may also carry a broadcast mask) to indicate multiple devices (or lanes, parameter spaces, etc.) to facilitate obtaining responses from multiple devices. If no broadcast request is sent (i.e., a unicast request is sent), the unicast request carries a segment pointer to indicate a single device (or lane, parameter space, etc.) to facilitate obtaining responses from a single device.

[0377] For the intermediate device side, the communication method of MsgBus can be seen in Figure 41. The intermediate device can determine whether it supports DME decoding. If it does not support DME decoding, it will pass through the request (such as the second frame). If it supports DME decoding, it will establish MsgBus using the in-band method. If there is no gearbox, the method shown in Figure 36 is used to establish MsgBus. If there is a gearbox, the method shown in Figure 37 is used to establish MsgBus. The intermediate device can choose different MsgBus construction methods (in-band / out-of-band, single MsgBus / multiple MsgBus) according to different device types.

[0378] Intermediate devices can perform frame detection to facilitate frame termination and regeneration. Specifically, the intermediate device determines the initiator (either the first device or a device within the second device) and the designated object for different types of second frames based on its own first identifier. For example, if the first identifier carried by the second frame is an identifier in the first transmission direction, the initiator is a device within the first device (e.g., host chip 1); if the requested first identifier is an identifier in the second transmission direction, the initiator is a device within the second device (e.g., host chip 2).

[0379] If the initiator is a device within the first device, the intermediate device determines the current MsgBus RX to be Xi based on the initiator. If the initiator is a device within the second device, the intermediate device determines the current MsgBus RX to be Kj based on the initiator. The intermediate device can obtain the following information based on the RX of the lane corresponding to the current MsgBus RX and the laneswap relationship.

[0380] The TX of the lane on the same side (backhaul) as the initiator. If the initiator is a device within the first device, the TX corresponding to MsgBus is Yi; if the initiator is a device within the second device, the TX corresponding to MsgBus is Zj.

[0381] The TX of the lane on the opposite side (fronthaul) of the initiator. If the initiator is a device in the first device, the TX corresponding to MsgBus is Zj; if the initiator is a device in the second device, the TX corresponding to MsgBus is Yi.

[0382] The RX of the lane opposite to the initiator. If the initiator is a device within the first device, its corresponding MsgBus RX is Kj; if the initiator is a device within the second device, its corresponding MsgBus RX is Xi. A lane includes TX and RX. In Figure 31 above, N1 and N2 refer to the TXID of the lane whose RX corresponds to the current MsgBus RX and is on the same side (backhaul). M1 and M2 refer to the RXID of the lane whose RX corresponds to the current MsgBus RX and is on the opposite side (forwardhaul).

[0383] M (M1 and M2) and N (N1 and N2) can represent the RXID and TXID of different lanes on both sides of the intermediate device, respectively. The link parameters of RXID and TXID both affect the signal quality received by the host chip's RX. In one example, M and N are scalars representing the RXID and TXID of a single lane. In another example, M and N can be multi-element arrays, where each element indicates at least one lane or unit. After the intermediate device performs the AN / LT procedure for the specified object, it can fill the status information into the second frame according to the first identifier of the intermediate device to obtain a response frame, and then transmit or forward the response frame. The transmission and forward transmission are full-duplex and do not affect each other. For example, when it is necessary to fill the status information and then transmit the response frame, it will not affect the forward transmission process. Similarly, when it is necessary to fill the status information and then transmit the response frame, it will not affect the transmission process.

[0384] The response frame is designated as the third frame. If the first device sends the second frame and requests the second device to send it back, the first device receives the third frame sent by the second device. The third frame carries a first identifier and response information. Alternatively, if the first device sends the second frame and requests the second device to forward, the third frame sent by the second device is received by a device opposite to the first device (e.g., a device located in a different device than the first device). The first identifier is used to indicate the second device (or its lane, unit, etc.) and is used by the first device to determine that the response information corresponds to the second device (or its lane, unit, etc.). The response information includes, but is not limited to: negotiation results (such as the results obtained from implementing the AN process), status information (such as frame locking status or LT training complete status), or segment diagnostic information (such as the segment's SNR or BER).

[0385] Regarding this response information, embodiments of this application can distinguish the response information either by using a first identifier (e.g., different second devices also fill in the first identifier of the second device when filling the response information in the third frame), or by using the following methods:

[0386] The response information is distinguished by the page order of different next pages, such as different second devices filling response information into different next pages;

[0387] The response information is distinguished by the domain segment order of different domain segments, such as different second devices filling response information into different domain segments in the same next page;

[0388] The response information is distinguished by the bit order of different bits in the same domain segment, such as different second devices filling different bits in the same domain segment with response information.

[0389] For example, embodiments of this application can achieve segmented diagnosis.

[0390] In related technologies, the notification during the LT or AN process is implemented segment by segment. For example, host chip 1 in the first device notifies optical module 1 in the first device, optical module 1 notifies optical module 2 in the second device, and optical module 2 then notifies host chip 2 in the second device. If any segment fails in LT or AN, host chip 2 can only determine that there is an LT or AN fault in the entire link, but cannot determine which specific segment of the entire link has the LT or AN fault.

[0391] In this embodiment of the application, since different second devices can fill in response information (such as status information, segment diagnostic information, etc.), the first device can understand the LT or AN status of each segment in the entire link in real time. Thus, when a segment has an LT or AN fault, the first device can locate the fault in a timely manner.

[0392] Furthermore, in related technologies, the notification during the LT or AN process is implemented using only one bit. The response information in this application embodiment can include multiple bits (such as multiple domain segments, multiple next pages, etc.), thereby expanding the carried response information and enabling the carrying of LT or AN response information from multiple segments throughout the entire link.

[0393] As described above, this application provides a broadcast / multicast mechanism to enable parallel and independent operation across multiple lanes even when implementing the LT process on a single lane, thus avoiding the impact of lane asymmetry on efficiency. In the broadcast mechanism, the first frame is a broadcast frame (or broadcast request), which may include extended subframes. Taking an extended subframe including an unformatted type next page as an example, the broadcast frame will be explained in conjunction with Figures 42 to 45.

[0394] Referring to Figure 42, device-level broadcast configuration (1st broadcast configure). The host chip carries the local broadcast pointer or remote broadcast pointer in the broadcast pointer select field (similar to the segment pointer select field mentioned above) in the broadcast frame, thereby configuring multiple devices at once. The host chip also indicates the devices to be masked through the broadcast mask in the broadcast frame. The masked devices can be those that do not support DME encoding / decoding, or those that support DME encoding / decoding but do not require configuration during the unified AN / LT process. The broadcast mask can be used to mask any specified device in the entire link according to actual needs, such as supporting the masking of devices whose local segment pointer or remote segment pointer is greater than or less than the broadcast mask. The broadcast mask of different broadcast frames can be the same or different.

[0395] After a blocked device identifies the broadcast mask in a broadcast frame, it indicates that it will not respond to the broadcast frame. The host chip ignores the response of the blocked device. The broadcast mask supports indicating the blocked device using a one-hot value, meaning that each device corresponds to an independent bit in the broadcast mask. For example, if there are 5 devices in the link, the broadcast mask consists of 5 bits, and each of the 5 bits corresponds one-to-one with one of the 5 devices.

[0396] The broadcast pointer select field and broadcast mask support multi-level extensions, such as 2nd lane level or 3rd unit level broadcast pointer select field and broadcast mask. The settings for each level of broadcast pointer select field and broadcast mask can follow the above rules and are independent of each other, supporting flexible specification of objects at each level (device level, lane level, or unit level). Each device can independently fill in response information based on its own local segment pointer or remote segment pointer and the type of broadcast request (such as type 3 broadcast request below). Device-level broadcast configuration can be applied to the unified AN / LT process to achieve rapid initial parameter configuration or rapid fault recovery, improving configuration efficiency.

[0397] In one example, the broadcast frame shown in Figure 42 includes a frame type field, a broadcast pointer select field (indicating multiple devices), a broadcast mask field (masking at least one device), a segment request control field (carrying extended broadcast mask (masking lane or unit), command or rsv, etc.), and a segment response status field (carrying segment device echo, status or rsv, etc. for device filling response information).

[0398] Referring to Figure 43, lane-level / unit-level broadcast configuration (2nd / 3rd broadcast configure). The host chip specifies an individual device in the link topology through the segment pointer select field (sender-side padding for broadcast frames) and the segment pointer echo field (receiver-side padding for broadcast frames). Broadcast frames can carry extended broadcast pointer select and extended broadcast mask fields, thereby configuring multiple objects (lanes or units) within a single device at once.

[0399] A single device identifies multiple objects by recognizing the extended broadcast pointer select field and identifies objects masked by the extended broadcast mask field. Masked objects do not respond to broadcast frames, and the host chip ignores their responses. Each device can independently populate response information based on the type of broadcast frame (such as broadcast requests of type 2 below). Lane-level / unit-level broadcast configuration can be applied to the unified AN / LT process to flexibly specify the initial parameters of multiple objects on a single device for rapid configuration or rapid fault recovery, improving configuration efficiency while avoiding impact on other devices.

[0400] In one example, the broadcast frame shown in Figure 43 includes a frame type field, a segment pointer select field (indicating a single device), a segment pointer echo field (for single device filling), a segment request control field (carrying extended broadcast pointer select (indicating lane or unit), extended broadcast mask (masking lane or unit), command or rsv, etc.), and a segment response status field (carrying segment device echo, status, or rsv, etc., for device filling response information).

[0401] Referring to Figure 44, the first broadcast query is performed. The host chip uses the broadcast pointer select field (similar to the segment pointer select field mentioned above) in the broadcast frame to carry the local broadcast pointer or remote broadcast pointer, thereby querying multiple devices at once. The host chip also indicates the masked devices through the broadcast mask in the broadcast frame. After recognizing the broadcast mask in the broadcast frame, the masked device indicates that it will not respond to the broadcast frame, and the host chip ignores the response of the masked device.

[0402] Unlike device-level, lane-level, or unit-level broadcast configurations, broadcast queries require devices to fill in more response information. Therefore, each device can fill in response information into a group of next pages consisting of one next page (or multiple next pages).

[0403] The broadcast pointer select field and broadcast mask support multi-level extensions, such as 2nd lane level or 3rd unit level broadcast pointer select field and broadcast mask. The settings for each level of broadcast pointer select field and broadcast mask can follow the above rules and are independent of each other, supporting flexible specification of objects at each level (device level, lane level, or unit level). Each device can independently fill in response information based on its own local segment pointer or remote segment pointer and the type of broadcast request (such as type 5 broadcast request below). Device-level broadcast queries can be applied to the unified AN / LT process for quick querying of status information of multiple devices. The host chip can determine subsequent control strategies based on the response information returned by each device (such as SNR, BER, or equalizer parameters), such as the purpose of the next broadcast frame to be sent (e.g., parameter adjustment, mode switching, or DFX fault diagnosis).

[0404] In one example, the broadcast frame shown in Figure 44 includes a frame type field, a broadcast pointer select field (indicating multiple devices), a broadcast mask field (masking at least one device), a segment request control field (carrying extended broadcast mask (masking lane or unit), command or rsv, etc.), and a segment response status field (carrying segment device echo, status or rsv, etc. for device filling response information).

[0405] Referring to Figure 45, lane-level / unit-level broadcast query (2nd / 3rd broadcast query). The host chip specifies a single device in the link topology through the segment pointer select field (sender-side padding for broadcast frames) and the segment pointer echo field (receiver-side padding for broadcast frames). Broadcast frames can carry extended broadcast pointer select and extended broadcast mask fields, thereby querying multiple objects (lanes or units) within a single device at once.

[0406] A single device identifies multiple objects by recognizing the extended broadcast pointer select field and identifies objects masked by the extended broadcast mask field. Masked objects do not respond to broadcast frames, and the host chip ignores their responses. Each device can independently fill in response information based on the type of broadcast frame (such as a broadcast request of type 4 below). Therefore, each device can fill in response information into one next page (or a group of next pages).

[0407] Different devices can use the same or different next pages. For example, in Figure 39, when host chip 2 queries the status information of the repeater, the repeater can fill the four next pages with the status information corresponding to lanes 0 to 3 of the repeater. When host chip 2 queries the status information of optical module 1, optical module 1 can fill the two next pages with the status information corresponding to lanes 0 and 1 of optical module 1. When filling the status information, the device can also fill in the object identifier (such as lane-level identifier or unit-level identifier) ​​to distinguish the status information corresponding to different objects. Lane-level / unit-level broadcast queries can be applied to the unified AN / LT process to flexibly specify the status information of multiple objects of a single device for fast querying, improve query efficiency, and query the status information of different objects for different devices.

[0408] In one example, the broadcast frame shown in Figure 45 includes a frame type field, a segment pointer select field (indicating a single device), a segment pointer echo field (for single device filling), a segment request control field (carrying extended broadcast pointer select (indicating lane or unit), extended broadcast mask (masking lane or unit), command or rsv, etc.), and a segment response status field (carrying segment device echo, status, or rsv, etc., for device filling response information).

[0409] In exemplary embodiments, the types of request frames (e.g., broadcast requests) include, but are not limited to, the following nine types, and different types of request frames may have different requirements for the device response. For example, a request frame can be a broadcast frame or a non-broadcast frame. Exemplarily, there are multiple response messages. Multiple response messages are located in the same field segment of the same extended subframe included in the third frame. Alternatively, multiple response messages are located in different field segments of the same extended subframe included in the third frame. Alternatively, multiple response messages are located in different extended subframes included in the third frame.

[0410] The first type, TYPE1 Requests, specifies that the designated object's status updated information is not postbacked or transmitted forward. After processing a TYPE1 Request, the designated object (such as a device, physical channel lane, or parameter space unit, which will not be elaborated upon below) does not need to post back (or transmit forward) response information. The host chip initiating the TYPE1 Request (or the remote host chip initiating the TYPE1 Request) does not need to recognize the response information posted back (or transmitted forward) by the designated object, as in some DFX test commands.

[0411] The second type, TYPE2 Requests, includes status-updated information in the same common field (same page) postback. After a specified object completes the TYPE2 Requests processing, it posts back the updated status information in the agreed-upon common field. For example, each device can support updating the status information in the same common field using unified logical operation rules such as "wired-AND," "wired-OR," or "read + 1 write-back." If one device updates status to 0, the common status bit field equals 0; if one device updates status to 1, the common status bit field equals 1. Alternatively, each level of device can sequentially perform a read + 1 write-back operation on the common field according to the data flow. The host chip of the TYPE2 Request initiator identifies the final returned common status field information.

[0412] The third type, TYPE3 Requests, includes status-updated information returned in different fields (same page) postbacks. After a specified object completes the TYPE3 Request processing, it returns updated status information in different fields. For example, after each device determines the initiator of the TYPE3 Request (such as a device in the first device or a device in the second device, or a host chip), it fills its own status information in different fields corresponding to the extended frame and returns it back using its own local segment pointer (for devices initiating the first device) or remote segment pointer (for devices initiating the second device). The TYPE3 Request initiator identifies different fields and obtains the status information returned by each device.

[0413] The fourth type, TYPE4 Requests, includes status updates returned on different next pages (single device). Multiple objects (lanes or units) within a single device complete TYPE4 Request processing and then return status updates on different next pages (or groups of next pages). The TYPE4 Request initiator distinguishes the status updates returned by each object by identifying the page order or identifier within the next page.

[0414] The fifth type, TYPE5 Requests, involves different next pages (multiple devices) postbacking updated status information. After multiple devices complete the TYPE5 Request processing, they post back updated status information on different next pages (or groups of next pages). The TYPE5 Request initiator distinguishes the updated status information returned by each object by identifying the page order or identifier within the next page.

[0415] The sixth type, TYPE6 Requests, includes forwarded status updates within the same common field (same page). After a specified object completes TYPE6 Request processing, it forwards updated status information within the agreed-upon common field. For example, each device can support updating the status information of the same common field using unified logical operation rules such as "wired-AND," "wired-OR," or "read + 1 write-back." If one device updates status to 0, the common status bit field equals 0; if one device updates status to 1, the common status bit field equals 1. Alternatively, devices at each level can sequentially perform read + 1 write-back operations on the common field according to the data flow. The remote end (e.g., the host chip) of the TYPE6 Request initiator identifies the final forwarded common field information.

[0416] For example, each device can parse and fill the segment pointer common domain in a "read + 1 write back" manner. The remote host chip of the TYPE6 Requests initiator identifies the final forward common domain information to determine the number of device levels in the link topology.

[0417] The seventh type, TYPE7 Requests, includes forwarded status updates in different fields (same page). After a specified object completes the TYPE7 Requests processing, it forwards the updated status information in different fields. For example, after each device determines the initiator of the TYPE7 Requests (such as a device of the first device or a device of the second device, the device is, for example, the host chip), it forwards its own status information by filling in the different fields corresponding to the extended frame through its own local segment pointer (for devices initiating the first device) or remote segment pointer (for devices initiating the second device). The remote end of the TYPE7 Requests initiator identifies the different fields and obtains the forwarded updated status information of each device.

[0418] For example, each level of device updates its own frame locking status and other status information, and fills this status information into different domains of the extended frame according to its own local segment pointer or remote segment pointer for forward transmission level by level. The remote end of the TYPE7 Requests initiator identifies the different domains of the forward transmission to obtain the frame locking status of each level of device in the link topology, or the diagnostic information of each segment in the link topology. For example, the diagnostic information of different segments can be distinguished by different identifiers (such as local segment pointer or remote segment pointer).

[0419] The eighth type, TYPE8 Requests, involves transmitting updated status information (with status updated information in the different next pages (multiple devices)) forward. After multiple devices complete the TYPE8 Request processing, they transmit updated status information forward on different next pages (or groups of next pages). The remote end (such as the host chip) that initiated the TYPE8 Request distinguishes the transmitted updated status information by identifying the page order or identifiers within the next page. For example, host chip 1 can push status information from multiple intermediate devices (or intermediate devices) to host chip 2.

[0420] Of course, the eighth type also applies to the forward transmission of status updated information across different next pages (single devices). This involves multiple objects (lanes or units) within a single device completing TYPE8 Requests processing and then transmitting their updated status information forward across different next pages (or next page groups). The remote end initiating the TYPE8 Requests distinguishes the updated status information returned by each object by identifying the page order or identifier within the next page.

[0421] The ninth type is collection communication. See Figure 46, which includes the following four subtypes.

[0422] Subtype 1, Broadcast, involves a data sender to multiple data receivers, and can be used to broadcast and replicate information from one device to other devices. For example, a host chip can broadcast end-to-end topology information, AN process negotiation results, or LT process negotiation results to devices at each level, enabling each device to obtain end-to-end information and thus improving the efficiency of parameter training for each device. For instance, host chip 1 sends a broadcast frame, and repeater 1, optical module 1, optical module 2, repeater 2, and host chip 2 receive the broadcast frame.

[0423] Subtype two, scattering, involves a data sender to multiple data receivers. This can be used to slice information from one device and distribute it to other devices. For example, a host chip issues identifiers to devices at various levels to allocate identifiers. For instance, host chip 1 sends "domain segment or NP1" to "domain segment or NP5", repeater 1 receives "domain segment or NP1", optical module 1 receives "domain segment or NP2", optical module 2 receives "domain segment or NP3", repeater 2 receives "domain segment or NP4", and host chip 2 receives "domain segment or NP5".

[0424] Subtype 3, Gather, involves multiple data senders to a single data receiver. This can be used to collect information from multiple devices into a single device, and is the inverse of scattering. For example, devices at different levels return different status information to the host chip, which then performs segmented diagnostics on each device. For instance, host chip 1 receives data from "domain segment or NP1" to "domain segment or NP5," where "domain segment or NP1" is sent by repeater 1, "domain segment or NP2" by optical module 1, "domain segment or NP3" by optical module 2, "domain segment or NP4" by repeater 2, and "domain segment or NP5" by host chip 2.

[0425] Subtype four, reduction, involves multiple data senders to a single data receiver. It can be used to process information from multiple devices and aggregate it into a single reduction protocol for a single device. The processing supports arithmetic, logical, statistical, and combinational operations. For example, devices at each level send the information after reduction processing in the common domain segment or next page to the host chip, which then uses this information to determine the link or device status. For instance, host chip 2, repeater 2, optical module 2, optical module 1, and repeater 1 perform reduction processing, fill in and update the common domain segment or NP, and then send the information. Host chip 1 receives the common domain segment or NP (next page) and obtains the information after reduction processing.

[0426] In the unified AN / LT process, Local and Remote HostChip can independently use TYPE1 to 9 Requests, and different types of Requests can be flexibly combined as needed. For example, unicast requests support indications of types 1 to 3, and broadcast requests support types 1 to 9.

[0427] Different Request types support independent object granularity. For example, unicast or multicast requests allow the host chip to independently select different Request types (TYPE 1 to 9) when communicating with various objects (devices, physical channels, or parameter space units, etc.), thus independently controlling different operating modes for different objects. The Respond mode for each device level supports selecting one or more combinations of the above based on commands and processing needs.

[0428] For example, the broadcast requests of the second to ninth types above can be a null command (or idle command). The next page in the broadcast request can be a null-message so that the device receiving the broadcast request can fill the null frame, for example, by filling the null frame with the update status information mentioned above.

[0429] Next, taking the scenario shown in Figure 39 as an example, we will explain the communication process corresponding to the above 9 types of Requests.

[0430] The first type, as mentioned before, is relatively simple and does not require forward or backward transmission, so it will not be elaborated further.

[0431] The second type, as shown in Figure 47, uses steps B0 to B4 as an example. Host chip 2 initiates a Type 2 Request, intermediate devices transmit forward the request, and the process terminates at host chip 1. The specified object (e.g., device) completes the processing flow corresponding to the Type 2 Request and fills in the information according to the processing rules (functions) corresponding to the common status field (also called the general domain). The processing rules for different common domains are independent of each other (they can be different or the same). The shielded object transmits the request but does not respond to the Type 2 Request. For example, repeater 2, optical module 1, repeater 1, and host chip 1 update the general domain respectively. Optical module 2 is a shielded device; it transmits the request but does not update the general domain. Host chip 2 detects the finally returned common domain information.

[0432] The third type, taking steps A0 to A4 in Figure 47 as an example, involves host chip 1 initiating a Type 3 Request, intermediate devices transmitting the request forward, and the process terminating at host chip 2. The specified object (e.g., a device) completes the processing flow corresponding to the Type 3 Request and independently fills in information in different domain segments based on its local segment pointer, transmitting back the information. Blocked objects transmit the information forward but do not respond to the Type 3 Request. For example, repeater 1 updates domain segment 1, optical module 2 updates domain segment 3, repeater 2 updates domain segment 4, host chip 2 updates domain segment 5, and optical module 1, being a blocked device, transmits the information forward but does not update domain segment 2. Host chip 1 detects the returned information in different domain segments, identifies the domain segment location or identifier within the domain segment (e.g., local segment pointer), and distinguishes the returned information from different devices.

[0433] The sixth type, taking steps B0 to B4 in Figure 48 as an example, involves host chip 1 initiating a Type 6 Request, intermediate devices transmitting the request forward, and the process terminating at host chip 2. The specified object (e.g., a device) completes the processing flow corresponding to the Type 6 Request and forwards information according to the processing rules corresponding to the common domain segment (e.g., common status field). The processing rules for different common domain segments are independent (they can be different or the same). Blocked objects transmit the information forward but do not respond to the Type 6 Request. For example, repeater 1, optical module 1, and repeater 2 update the common domain segment respectively. Optical module 2 is a blocked device, so it transmits the information forward but does not update the common domain segment. Host chip 2 detects the final forwarded common domain segment information.

[0434] The seventh type, taking steps A0 to A4 in Figure 48 as an example, involves host chip 2 initiating a Type 7 Request, intermediate devices transmitting forward, and the process terminating at host chip 1. The specified object (e.g., a device) completes the processing flow corresponding to the Type 7 Request and independently transmits information in different domain segments based on its own local segment pointer or remote segment pointer. The shielded object (e.g., optical module 1) transmits forward but does not respond to the Type 7 Request. Host chip 1 detects the forwarded information in different domain segments, identifies the domain segment location or identifier within the domain segment (e.g., local segment pointer or remote segment pointer), and distinguishes the forwarded information from different devices.

[0435] The fourth type, taking steps B0 to B4 in Figure 49 as an example, involves the host chip 2 initiating a Type 4 Request, the intermediate device transmitting the request forward, and the process terminating at the host chip 1. The specified object (such as a lane within the device) completes the processing flow corresponding to the Type 4 Request and independently fills in information and sends it back to different next pages (or next page groups) based on its own remote segment pointer. Objects that are blocked transmit the information forward but do not respond to the Type 4 Request. The host chip 2 detects the different returned next pages (or next page groups) and identifies the next page order or identifier within the next page (such as the remote segment pointer) to distinguish the returned information of different objects. For example, the host chip 2 sends next page 1 to next page 4 to the repeater 1. The repeater 1 fills in lane 1 information to next page 1, lane 2 information to next page 2, lane 3 information to next page 3, and lane 4 information to next page 4.

[0436] For example, the host chip (such as host chip 1 or host chip 2) knows the status of each device (such as the number of lanes included in the device) based on the topology negotiation results, and can query the status information of multiple lanes of any specified single device in the link topology through TYPE4 Request.

[0437] In one example, the host chip can send multiple next pages to a designated device as needed. (The host chip can determine the number of response frames returned by the designated device. The number of next pages sent by the host chip can be equal to the total number of lanes in the device minus the number of masked lanes, or the number of next pages sent can be equal to the total number of lanes in the device, but the return information of masked lanes is ignored.) The host chip can implement page turning through the NP and Toggle bit fields. The designated device can distinguish the information return of different lanes through different next page page orders or embedded identifiers (such as the 2nd lane identifier). The host chip can distinguish the return information of different lanes through different next page page orders or embedded identifiers (such as the 2nd lane identifier).

[0438] In another example, after sending the first frame, the host chip fills in null-message frames according to the protocol and sends them to the designated device (the host chip does not need to determine the number of response frames returned by the designated device). If the host chip receives a response frame from the designated device, and the NP or Toggle bit field in the response frame indicates that a next page is still needed, the host chip continues to fill in null-message frames according to the protocol and send them to the designated device until the host chip receives a response frame from the designated device, and the NP or Toggle bit field in the response frame indicates that a next page is no longer needed. At this point, the host chip stops filling in null-message frames according to the protocol and sending them to the designated device.

[0439] The method by which the host chip determines the number of response frames, or the method that does not require determining the number of response frames, is not limited to a single type, but can be applied to all types that require pagination, depending on actual needs. For example, in Figure 50 (not limited to a single type), when the host chip does not need to determine the number of response frames returned by the device, the host chip determines whether there is still a next page according to the above description. If not, it completes the broadcast request; if so, it continues to send the next page (next pages other than the base page can be filled with empty frames according to the protocol) until all next pages have been sent. As another example, in Figure 51, the downstream device checks whether it is blocked. If blocked, it does not respond (e.g., no filling, pass-through); if not blocked, it checks whether it is an intermediate device. If not an intermediate device, it latches the information and sends an updated next page, until there are no new next pages. If it is an intermediate device, the return buffer is initialized and cleared. The return buffer is used to store the updated response information of the device that needs to be returned. In this embodiment, the cache depth of the return buffer is not limited. A cache depth of 1 represents a single next page, and a cache depth of W (greater than 1) represents multiple next pages (next page group). If all pages of the return buffer have been sent, the response to the broadcast request is completed. If all pages of the return buffer have not been sent, the system continues to receive new broadcast request next pages from upstream, send return broadcast request next pages (transparent transmission) downstream, send the updated device X information next page in the return buffer upstream (only the response field is updated, other fields are not affected), receive and latch the updated device X information next page from downstream into the return buffer, until all pages of the return buffer have been sent.

[0440] The fifth type, taking steps B0 to B4 as shown in Figure 52 as an example, involves the host chip 2 initiating a Type 5 Request, the intermediate device transmitting the request forward, and the process terminating at the host chip 1. The specified object (such as a device) completes the processing flow corresponding to the Type 5 Request and independently fills in information and sends it back in different next pages (or next page groups) based on its own remote segment pointer. The blocked object transmits the request forward but does not respond to the Type 5 Request. The host chip 2 detects the information in the different next pages (or next page groups) returned and identifies the next page order or the identifier within the next page (such as the remote segment pointer) to distinguish the returned information of different objects.

[0441] For example, the host chip knows the status of each device based on the topology negotiation result. It can obtain (e.g., pull) the status information of any specified multiple devices in the link topology through Type 5 Request. The host chip can send multiple next pages to downstream devices as needed. (The host chip can determine the number of response frames returned by the specified device. The number of next pages sent by the host chip can be equal to the total number of lanes in the device minus the number of masked lanes, or the number of next pages sent can be equal to the total number of lanes in the device, but ignore the return information of masked lanes.) The host chip can implement page turning through NP and Toggle bit fields. The control and status fields of the extended frame can support independent selection of the extension method (e.g., extension of different fields or extension of different next pages). Each specified device embeds information back in different next pages (or next page groups) according to its own local segment pointer or remote segment pointer. The host chip distinguishes the back information of different devices through different next page order or identifiers (e.g., local segment pointer or remote segment pointer).

[0442] Figures 53 and 54, using a Type 5 Request as an example, illustrate the communication process between the initiating host chip and its downstream devices based on next page extension. This embodiment does not limit the order in which each device sequentially sends back its next page (or next page group). After receiving a broadcast request, a device may first send its own next page (or next page group) information, and then determine the page turning information and sequentially send the cached next page (or next page group) information of its downstream devices. Alternatively, it may first send the cached next page (or next page group) information of its downstream devices, and then send its own next page (or next page group) information.

[0443] Referring to Figure 53, when the host chip sends a Type 5 Request, it can calculate the total number of next pages N. N equals the number of pages corresponding to downstream devices (the number of pages that downstream devices need to fill) minus the number of pages corresponding to the blocked devices (the number of pages that the blocked devices need to fill). The host chip records the number of next pages M that have been sent. If M is equal to N, the Type 5 Request is sent. If M is not equal to N, the host chip sends a next page, receives and latches the next page of the upstream device X, and increments the number of next pages M that have been sent by one until M is equal to N.

[0444] Referring to Figure 54, for a Type 5 Request, the downstream device checks whether it is blocked. If blocked, it does not respond (e.g., no padding, pass-through). If not blocked, it checks whether it is an intermediate device. If not, it latches the information and sends an updated next page. If it is an intermediate device, it checks whether it is a broadcast request for local use and determines the transmission direction (first transmission direction: local or second transmission direction: remote). The intermediate device parses the mask field of the Type 5 Request, obtains the level of the blocked downstream device in the transmission direction, calculates the number of pages of the transparent broadcast request as PR (PR is the level of the downstream device minus the level of the blocked downstream device), and records the number of pages sent, PRN. The return buffer is initialized and cleared. The return buffer is used to store the updated response information of the devices that need to be returned. In this embodiment, the cache depth of the return buffer is not limited. A cache depth of 1 represents a single next page, and a cache depth of W (greater than 1) represents multiple next pages (next page group). If PRN is equal to PR, the response to the broadcast request is completed. If PRN is not equal to PR, then continue to receive new broadcast requests next page from upstream, send back broadcast requests next page (transparent transmission) to downstream, send updated device X information next page from the backhaul buffer to upstream (only update the response field segment, other fields are not affected), receive and latch the updated device X information next page from downstream to the backhaul buffer, increment the number of pages sent PRN by one, until PRN is equal to PR.

[0445] The eighth type, taking steps B0 to B5 in Figure 55 as an example, involves the host chip 1 initiating a Type 8 Request (B2 in Figure 55), the intermediate device transmitting the request forward, and the process terminating at the host chip 2. The specified object (such as a device) completes the processing flow corresponding to the Type 8 Request and independently transmits information forward in different next pages (or next page groups) based on its own local segment pointer or remote segment pointer. The blocked object transmits the request forward but does not respond to the Type 8 Request. The host chip 2 detects the forwarded information of different next pages (or next page groups) and identifies the next page order or the identifier within the next page (such as local segment pointer or remote segment pointer) to distinguish the forwarded information of different objects.

[0446] For example, the host chip (e.g., host chip 1) knows the status of each device based on the topology negotiation result. It can push the status information of any number of devices in the link topology to the remote host chip (e.g., host chip 2) through TYPE8 Request. The host chip can send multiple next pages to downstream devices as needed. The host chip can realize page turning through NP and Toggle bit fields. The control and status fields of the extended frame can support independent selection of the extension method (e.g., extension of different fields or extension of different next pages). Each designated device embeds information forwarding in different next pages (or next page groups) according to its own local segment pointer or remote segment pointer. There is no restriction on the order in which each device forwards the next page (or next page group) level by level. The host chip distinguishes the forwarding information of different devices through different next page order or identifiers (e.g., local segment pointer or remote segment pointer). Steps B0 to B5 shown in Figure 55 are just examples. The Type 8 Request can be initiated by the host chip 1 (B2), or the host chip 2 can send a Type 8 Request pull (tow) first, and the intermediate device will transmit the Type 8 Request pull to the host chip 1 (B0 to B1), thereby triggering the host chip 1 to initiate the Type 8 Request.

[0447] In addition, Figures 56 and 57, using Type 8 Request as an example, illustrate the communication process between the initiating host chip and its downstream devices based on the next page extension.

[0448] Referring to Figure 56, when the host chip sends a Type 8 Request, it can initialize and clear the forward buffer. The forward buffer is used to store the update response information of the devices that need to be forwarded. This embodiment does not limit the cache depth of the forward buffer; a cache depth of 1 represents a single next page, and a cache depth of W (greater than 1) represents multiple next pages (a group of next pages). If the host chip has sent all pages of the forward buffer, the Type 8 Request is completed. If the host chip has not sent all pages of the forward buffer, it continues to send the remaining pages in the forward buffer to downstream devices (i.e., continues sending the Type 8 Request).

[0449] Referring to Figure 57, for a Type 8 Request, the downstream device checks whether it is blocked. If blocked, it does not respond (e.g., no padding, pass-through). If not blocked, it checks whether it is an intermediate device. If not an intermediate device, it receives and latches the updated next page until there are no new next pages. If it is an intermediate device, it initializes and clears the forward buffer. The forward buffer is used to store the updated response information of devices that need to be forwarded. In this embodiment, the cache depth of the forward buffer is not limited. A cache depth of 1 represents a single next page, and a cache depth of W (greater than 1) represents multiple next pages (next page group). If the intermediate device receives a new next page, it sends a forward broadcast request to the downstream, carrying the updated device X information next page (NP bit field = 1) in the forward buffer, and receives and latches the updated device X information next page from the upstream into the forward buffer. If the intermediate device does not receive the new next page, it completes the response to the broadcast request after sending all pages of the forward buffer. If it does not send all pages of the forward buffer, it continues to send forward broadcast requests downstream, carrying the updated device X information next page in the forward buffer, until all pages of the forward buffer have been sent.

[0450] The ninth type is aggregated communication. Each device is treated as an independent network element, allowing aggregated communication. Here, Gather is equivalent to TYPE 3 or TYPE 7, Scatter and Gather are inverse processes, and Reduce is equivalent to TYPE 2 or TYPE 6, which will not be elaborated further here. In Broadcast, the host chip can carry the identifiers described above to replicate information to each device in the link.

[0451] In an exemplary embodiment, the method provided in this application further includes: a first device sending first status information to a second device, the first status information indicating the completion status of the LT process or the AN process.

[0452] For example, a first device sends a command (such as a second frame) to a second device. After the second device performs an AN (Answer-Alternate) or LT (Long-Terminal) procedure based on the second frame, it returns status information to the first device using the method described above. Then, the first device performs the AN or LT procedure locally based on the status information returned by the second device, obtaining first status information indicating the completion status of the LT or AN procedure. The first device can then send the first status information to the second device, allowing the second device to determine that the first device has completed the LT or AN procedure. In one example, the second device can return status information to the first device multiple times. Each time the second device returns status information, the first device performs the AN or LT procedure locally based on the returned status information and sends the first status information to the second device. In another example, the second device returns status information to the first device, and the first device performs one or more AN or LT procedures locally based on the returned status information. Each time the first device performs the AN or LT procedure locally, it sends the first status information to the second device.

[0453] In an exemplary embodiment, the method provided in this application further includes: a first device sending second status information to a second device, the second status information indicating the frame-locking state of the first device.

[0454] For example, when the LT process is implemented between the first device and the second device, if the first device completes frame locking, it can send second status information to the second device. Since the second status information indicates the frame locking status of the first device, the second device can determine that the first device has locked the frame.

[0455] This application also provides a method for processing information. In this method, a first device sends two frames to a second device. The second frame is an AN frame or an LT frame. The second frame includes a first domain segment corresponding to the first device. The first domain segment includes status information, which indicates whether the first device is performing an AN or LT state. Exemplarily, the status information includes at least one of the first or second status information described above, which will not be elaborated here.

[0456] In one example, the first field segment also includes identification information that identifies the first device, such as the identifier of the first device described above. The second device determines, based on the identification information, that the status information included in the first field segment is the status information of the first device, and thus determines the state of the first device executing the AN process or the LT process based on the status information.

[0457] In another example, the second frame includes multiple domain segments, each corresponding to a specific device. These devices include the first device and other devices between the first and second devices. The second device determines the correspondence between the domain segments and the devices, identifies the first domain segment corresponding to the first device based on this correspondence, and determines that the status information included in the first domain segment is the status information of the first device. Based on this status information, the state of the first device executing the AN or LT process is determined. For example, the second frame includes control fields and status fields for each device. The status fields may include status information (or can be expanded to include negotiation results, diagnostic information, etc.). The corresponding device is determined based on the positions of the control fields and status fields, with each device corresponding to one control field and one status field. For example, the second device identifies the first device through control field 1 and status field 1.

[0458] In another example, the first domain segment includes multiple bits, with multiple devices each corresponding to at least one bit from these multiple bits. Different devices correspond to different bits. The multiple devices include the first device and other devices between the first and second devices. The second device determines the correspondence between the bits and devices, and based on this correspondence, determines the corresponding bit of the first device in the first domain segment. The bit corresponding to the first device carries status information (indicating the state of the first device performing AN or LT, which can also be extended to negotiation results, diagnostic information, etc.). The second device determines the state of the first device performing the AN or LT process based on the status information carried by the bit corresponding to the first device. For example, the second frame includes a control field and a status field shared by all devices. The position of the bits in the status field is used to indicate the corresponding device. For example, the second device identifies the first device by a bit 1 in the status field.

[0459] In one possible implementation, this application embodiment also provides an independent message sequence and training sequence. The first frame provided by this application embodiment supports online and offline modes and is flexibly grouped and constructed through messages and training sequences. Based on the first frame, a method for online management of optoelectronic interfaces is designed to support online status monitoring, fault diagnosis, retraining, and recovery of the interface.

[0460] Among them, the message sequence in online mode uses the standard defined PCS controlBlock (such as O code) / AM word / Ethernet message to extend the online real-time transmission of device, link and parameter configuration information, supports reading and writing optical module status and configuration information through CMIS interface, and can achieve lossless service perception by controlling the message sequence insertion period.

[0461] In offline mode, message sequences can be used to communicate between fault-isolated lanes in the interface using AN or LT frames defined by the protocol, or online mode message sequences can be used to transmit control and status messages for offline lanes (fault isolation) based on normally operating lanes.

[0462] The online training sequence uses standard-defined PCS control blocks (such as O codes) / AM words / Ethernet messages for extended carrying. It supports embedding PRBS or custom test codes, or directly using normal service messages and PCS data blocks as training sequences. Based on the training sequence, optoelectronic devices measure link status information such as OMA, SNR, and BER online in real time and continuously monitor hardware environment information such as voltage, temperature, and power consumption. It supports reading optical module status information through the CMIS interface. By controlling the insertion period of the training sequence, lossless service perception can be achieved.

[0463] The offline training sequence supports parameter training using LT frames defined by the current protocol standard, such as high-speed code patterns, supporting NRZ / PAM4 / PreCoding; it also supports embedding PRBS (which can reduce or increase the transmission and reception speed by x times) or specific custom code patterns to evaluate end-to-end link bit error rate, insertion loss, return loss, impedance discontinuity location and other indicators, and supports link fault diagnosis; it also supports embedding LF / RF or other PCS control code blocks to evaluate end-to-end link bit error rate before and after FEC correction (Burst Error Distribution, FEC Gain) and other indicators.

[0464] Furthermore, the method provided in this application embodiment is based on training sequences. The optoelectronic device can measure link status information such as OMA, SNR, and BER online in real time and continuously monitor hardware environment information such as voltage, temperature, and energy consumption. It supports reading optical module status information through the CMIS interface, and offline lanes can also use online mode to train sequences.

[0465] Furthermore, the aforementioned message sequence and online sequence are independent, supporting NextPage expansion. The interface supports online and offline modes, flexibly grouping control frames (x*message sequence + y*training sequence) to achieve a flexible online interface management process (real-time online detection and control of specified objects across the entire optoelectronic link). In this embodiment, the values ​​of x and y are not limited and can be flexibly set based on the scenario.

[0466] This application also provides a method for online management of optoelectronic interfaces based on the first frame, as shown in the communication system diagram in Figure 58. The first device (local) is connected to the remote optical module of the second device (remote) via optical fiber, and the wavelength can be λ1, λ2, λ3, or λ4. The local host chip of the first device is connected to the local optical module via lane0-lane3, and the remote optical module is connected to the remote host chip via lane0-lane3. As shown in Figure 59, it supports online interface status monitoring, fault isolation diagnosis, retraining, and recovery; it not only supports online real-time optoelectronic full-link and segmented status detection, but also supports obtaining optical module information based on the Segment Pointer in-band and out-of-band coordination mechanism. In addition, after fault lane isolation, the impact on services is reduced through flow control and retransmission mechanisms. Based on the Segment Pointer mechanism, the offline lane transmit and receive training sequence (or switch to loopback or other working modes) can be controlled through in-band and out-of-band message sequences (which can use the above-mentioned online or offline message sequences), and fault lane information is recorded to realize online fault hierarchical and segmented diagnosis.

[0467] In this embodiment of the application, after fault diagnosis, the Segment Pointer mechanism can be used to control the offline lane to re-execute link training (photoelectric parameter ReTraining) through in-band and out-of-band message sequences. For example, the above-mentioned online or offline message sequences can be used. By setting the retraining completion conditions, the online fault lane can be retrained in a hierarchical and segmented manner and resources can be recycled, which can effectively improve the lane fault recovery efficiency and photoelectric interface reliability.

[0468] In one possible implementation, it supports flexible combination of online and offline training sequences and message sequences, and achieves flexible process control based on compatibility with existing protocols; it supports active resource management based on energy efficiency (dynamic lane online / offline energy saving), and also supports passive triggering based on faults (status monitoring, fault lane isolation diagnosis, retraining and fault recovery), to achieve online lane resource pooling management of optoelectronic interfaces.

[0469] The frame and communication method based on the Segment Pointer mechanism provided in this application can be used for online management of high-speed optoelectronic interfaces. It enables online real-time detection and control of the entire optoelectronic link status information and parameter configuration of the interface through pointers, thereby improving the operation and maintenance efficiency and network-level reliability of high-speed optoelectronic interfaces.

[0470] Figure 60 shows a schematic diagram of the dynamic allocation and management process of the Segment Pointer of the optoelectronic interface. The Segment Pointer of each interface of the device is dynamically allocated through topology negotiation during link establishment. The pointers of each interface are independent, and the device supports the dynamic allocation of pointers of each device in each interface in a globally (or within a set area) unique manner. For example, the pointer can be made unique in a specified domain by associating the interface MAC or IP address. The CPU or HostChip can use the pointer to distinguish different devices and communication objects in different interfaces.

[0471] In principle, the pointers of each device within the interface should not be equal. The HostChip can detect whether there is a conflict in the pointer allocation within the interface through the control frame. For example, during the link initialization, after topology negotiation and pointer allocation, the device information and the mapping relationship of the allocated pointers are checked. If multiple devices have the same pointer, the conflict is identified and can be restored by renegotiation and pointer allocation.

[0472] In addition, as shown in Figure 60, for scenarios where multiple interfaces are bound to one interface, or multiple physical lanes are within one interface, it supports the isolation of faulty interfaces or physical lanes, or the active energy efficiency management to shut down some interfaces or physical lanes. In this case, after the interface or physical lane is taken offline, the corresponding Segment Pointer can be reclaimed, or the pointer can still be retained to prevent the interface or physical lane from coming back online. For bound interfaces using a single MAC address, different sub-interfaces and devices within the sub-interfaces can be specified through pointers.

[0473] In one possible implementation, segment pointers can be allocated by lane. For example, in an interface breakout application scenario, as shown in Figure 60, the first device's local optical module 2 has physical channel lane0 connected to the second device's remote optical module 2, and physical channel lane1 connected to the third device's remote optical module 3. In this case, the lane0 remote segment pointer of the first device's local optical module 2 is 2, while the lane1 remote segment pointer of the first device's local optical module 2 is 3.

[0474] Therefore, Segment Pointer supports dynamic allocation through control frames, making it suitable for scenarios such as dynamic changes in the topology of optoelectronic interface links.

[0475] This application embodiment also provides a link state adjustment device, which is applied to a first device in the topology. The first device and a second device in the topology are connected via a link. Referring to FIG61, the device includes:

[0476] The acquisition module 6101 is used to acquire the first frame during the data transmission phase. The first frame carries AN information or LT information.

[0477] The transmitting module 6102 is used to transmit a first frame to the second device, and the first frame is used by the second device to optimize the working state of the link according to AN information or LT information.

[0478] In one possible implementation, the first device includes a PCS layer, and the first frame at the PCS layer is an Ethernet frame. The control code in the Ethernet frame carries AN information or LT information. For example, the control code is an O code.

[0479] In one possible implementation, the first device includes an FEC layer, and the first frame at the FEC layer is an Ethernet frame, the control code of which carries AN information or LT information. For example, the control code is an AM codeword.

[0480] In one possible implementation, the first device includes a MAC layer and a PCS layer. The first device generates Ethernet packets at the MAC layer. The Ethernet packets carry AN information or LT information. The first frame is the Ethernet frame obtained when the Ethernet packets enter the PCS layer.

[0481] In one possible implementation, the Ethernet packet is an LLDP packet or a PTP packet.

[0482] In one possible implementation, AN information or LT information is used by a second device to optimize the performance of the link. The AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate.

[0483] In one possible implementation, the AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to enter the power-saving state from the working state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to enter the working state from the power-saving state.

[0484] In one possible implementation, the AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The first frame is used to periodically announce the status information of the link.

[0485] This application embodiment also provides a link state adjustment device, which is applied to a second device in the topology. The second device is connected to the first device in the topology via a link. Referring to FIG62, the device includes:

[0486] The receiving module 6201 is used to receive a first frame sent by the first device during the data transmission phase. The first frame carries AN information or LT information.

[0487] The acquisition module 6202 is used to acquire AN information or LT information from the first frame. The AN information or LT information is used by the second device to optimize the working status of the link.

[0488] In one possible implementation, the first device includes a PCS layer, and the first frame is an Ethernet frame at the PCS layer. The control code in the Ethernet frame carries AN information or LT information. The second device obtains the AN information or LT information from the first frame, including: the second device obtains the AN information or LT information from the control code in the Ethernet frame. For example, the control code is an O code.

[0489] In one possible implementation, the first device includes an FEC layer, and the first frame is an Ethernet frame at the FEC layer. The control code of the Ethernet frame carries AN information or LT information. The second device obtains the AN information or LT information from the first frame, including: the second device obtains the AN information or LT information from the control code in the Ethernet frame. For example, the control code is an AM codeword.

[0490] In one possible implementation, the first device includes a MAC layer and a PCS layer. The first device generates Ethernet packets at the MAC layer. The Ethernet packets carry AN information or LT information. The first frame is an Ethernet frame obtained by the Ethernet packets entering the PCS layer. The second device obtains AN information or LT information from the first frame, including: the second device obtains AN information or LT information from the Ethernet packets.

[0491] In one possible implementation, the Ethernet packet is an LLDP packet or a PTP packet.

[0492] In one possible implementation, AN information or LT information is used by a second device to optimize the performance of the link. The AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate.

[0493] In one possible implementation, the AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to enter the power-saving state from the working state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to enter the working state from the power-saving state.

[0494] In one possible implementation, the AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The first frame is used to periodically announce the status information of the link, or the first frame is used to announce the status information of the link based on an event trigger.

[0495] This application embodiment also provides a link state adjustment system, which includes a first device and a second device. The first device is used to execute any of the exemplary link state adjustment methods executed by the first device above, and the second device is used to execute any of the exemplary link state adjustment methods executed by the second device above.

[0496] This application also provides a communication device, which includes a transceiver and a processor. The transceiver is used to perform transmission and reception functions, and the processor is used to perform other functions besides transmission and reception functions, so that the communication device can implement any of the exemplary link state adjustment methods described above.

[0497] This application embodiment also provides a chip, which includes an interface circuit and a control circuit. The interface circuit is used to transmit and receive data, and the control circuit is used to process the data so that a first device with the chip installed can implement the link state adjustment method performed by the first device in any of the above-described examples, or so that a second device with the chip installed can implement the link state adjustment method performed by the second device in any of the above-described examples.

[0498] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to this application are generated, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk).

[0499] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with substantially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another.

[0500] In this application, the term "at least one" means one or more, and the term "multiple" means two or more; for example, multiple devices means two or more devices. The terms "system" and "network" are often used interchangeably herein.

[0501] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing the particular examples only and is not intended to be limiting. As used in the description of the various examples and in the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0502] The above description is merely an embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

A method for adjusting link status, characterized in that, The method is applied to a first device in a topology, the first device being connected to a second device in the topology via a link, the method comprising: During the data transmission phase, the first device acquires the first frame, which carries either auto-negotiation AN information or link training LT information. The first device sends the first frame to the second device, and the first frame is used by the second device to optimize the working state of the link based on the AN information or LT information. The method according to claim 1, characterized in that, The first device includes a Physical Coding Sublayer (PCS), and the first frame is an Ethernet frame in the PCS layer. The control code in the Ethernet frame carries the AN information or LT information. The method according to claim 2, characterized in that, The control code is 0. The method according to claim 1, characterized in that, The first device includes a forward error correction (FEC) layer, and the first frame is an Ethernet frame in the FEC layer. The control code of the Ethernet frame carries the AN information or LT information. The method according to claim 4, characterized in that, The control code is an alignment marker AM codeword. The method according to claim 1, characterized in that, The first device includes a Media Access Control (MAC) layer and a Physical Coding Sublayer (PCS) layer. The first device generates Ethernet packets at the MAC layer. The Ethernet packets carry the AN information or LT information. The first frame is the Ethernet frame obtained when the Ethernet packets enter the PCS layer. The method according to claim 6, characterized in that, The Ethernet message is either a Link Layer Discovery Protocol (LLDP) message or a Precision Time Protocol (PTP) message. The method according to any one of claims 1-7, characterized in that, The AN information or LT information is used by the second device to optimize the performance of the link. The AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The method according to any one of claims 1-7, characterized in that, The AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to enter the energy-saving state from the working state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to enter the working state from the energy-saving state. The method according to any one of claims 1-7, characterized in that, The AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The first frame is used to periodically announce the status information of the link, or the first frame is used to announce the status information of the link based on event triggering. A method for adjusting link status, characterized in that, The method is applied to a second device in the topology, the second device being connected to the first device in the topology via a link, the method comprising: During the data transmission phase, the second device receives the first frame sent by the first device, the first frame carrying auto-negotiation AN information or link training LT information. The second device obtains the AN information or the LT information from the first frame, and the AN information or LT information is used by the second device to optimize the working state of the link. The method according to claim 11, characterized in that, The first device includes a Physical Coding Sublayer (PCS) layer, and the first frame is an Ethernet frame in the PCS layer. The control code in the Ethernet frame carries the AN information or LT information. The second device acquires the AN information or the LT information from the first frame, including: The second device obtains the AN information or the LT information from the control code in the Ethernet frame. The method according to claim 12, characterized in that, The control code is 0. The method according to claim 11, characterized in that, The first device includes a forward error correction (FEC) layer, and the first frame is an Ethernet frame in the FEC layer. The control code of the Ethernet frame carries the AN information or LT information. The second device acquires the AN information or the LT information from the first frame, including: The second device obtains the AN information or the LT information from the control code in the Ethernet frame. The method according to claim 14, characterized in that, The control code is an alignment marker AM codeword. The method according to claim 11, characterized in that, The first device includes a Media Access Control (MAC) layer and a Physical Coding Sublayer (PCS) layer. The first device generates Ethernet packets in the MAC layer. The Ethernet packets carry the AN information or LT information. The first frame is the Ethernet frame obtained when the Ethernet packets enter the PCS layer. The second device acquires the AN information or the LT information from the first frame, including: The second device obtains the AN information or the LT information from the Ethernet message. The method according to claim 16, characterized in that, The Ethernet message is either a Link Layer Discovery Protocol (LLDP) message or a Precision Time Protocol (PTP) message. The method according to any one of claims 11-17 is characterized in that, The AN information or LT information is used by the second device to optimize the performance of the link. The AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The method according to any one of claims 11-17 is characterized in that, The AN information or LT information includes channel identification information, which is used to trigger the channel corresponding to the channel identification information to enter the energy-saving state from the working state, or the channel identification information is used to trigger the channel corresponding to the channel identification information to enter the working state from the energy-saving state. The method according to any one of claims 11-17 is characterized in that, The AN information or LT information includes at least one of the following: delay, packet loss rate, signal-to-noise ratio, bit error rate, energy efficiency ratio, or retransmission rate. The first frame is used to periodically announce the status information of the link, or the first frame is used to announce the status information of the link based on event triggering. A link status adjustment device, characterized in that, The device is applied to a first device in the topology, the first device being connected to a second device in the topology via a link, the device comprising: The acquisition module is used to acquire the first frame during the data transmission phase. The first frame carries auto-negotiation AN information or link training LT information. The transmitting module is used to transmit the first frame to the second device, and the first frame is used by the second device to optimize the working state of the link according to the AN information or LT information. A link status adjustment device, characterized in that, The device is applied to a second device in the topology, the second device being connected to a first device in the topology via a link, the device comprising: The receiving module is used to receive the first frame sent by the first device during the data transmission phase. The first frame carries auto-negotiation AN information or link training LT information. The acquisition module is used to acquire the AN information or the LT information from the first frame, and the AN information or LT information is used by the second device to optimize the working state of the link. A link state adjustment system, characterized in that, The system includes a first device and a second device, wherein the first device is used to perform the link state adjustment method according to any one of claims 1-10, or the second device is used to perform the link state adjustment method according to any one of claims 11-20. A communication device, characterized in that, The communication device includes a transceiver and a processor. The transceiver is used to perform a transmitting and receiving function, and the processor is used to perform other functions besides the transmitting and receiving function, so that the communication device implements the link state adjustment method according to any one of claims 1-20. A chip characterized in that, The chip includes an interface circuit and a control circuit. The interface circuit is used to transmit and receive data, and the control circuit is used to process the data so that a first device with the chip installed can implement the link state adjustment method according to any one of claims 1-10, or so that a second device with the chip installed can implement the link state adjustment method according to any one of claims 11-20.