Automatic gain control method and device for optical module, optical module and medium

Through the automatic gain control method, the gain of the optical module driver is adjusted according to the target value and the detected value, which solves the problem that the optical module is difficult to adapt to different ports, and achieves consistency and better adaptability of the output signal.

CN119995727APending Publication Date: 2025-05-13BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510110140.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

It is difficult for the same optical module to adapt to different switches or different ports of the same switch. It is mainly because the gain set by the driver is a fixed value, so it cannot be flexibly adjusted to adapt to the electrical signal performance of different link lengths.

Method used

By obtaining the target value and the detected value, the gain adjustment amount is determined, and the current gain value is updated according to the adjustment amount, the consistency of the output signal of the optical module driver is achieved.

Benefits of technology

Ensure the output signal consistency of the optical module at the corresponding link lengths of different ports, so that the optical module can better adapt to external devices such as switch boards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119995727A_ABST
    Figure CN119995727A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data centers, and discloses an automatic gain control method and device for an optical module, the optical module and a medium, and the method comprises the steps: obtaining a target value and a detection value, the detection value is a peak value of an electric signal output by a driver and detected by a peak value detector in the optical module; determining a gain adjustment amount according to the difference between the target value and the detection value; acquiring a current gain value set by a driver; and updating the current gain value according to the gain adjustment amount. According to the invention, the gain set by the driver in the optical module is flexibly adjusted based on the target value and the detection value, the consistency of the output signals of the driver under the condition of different link lengths of the optical module is ensured, and the optical module can adapt to different ports of the same switch or different types of switches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data centers, and in particular to an automatic gain control method and device for an optical module, an optical module, and a medium. Background Art

[0002] Optical modules are usually installed on the ports of devices such as switches or servers. They are optoelectronic devices that realize the functions of photoelectric conversion and electro-optical conversion during the transmission of optical signals. Linear-driver pluggable optical modules (LPO) adopt a linear drive architecture. By simplifying the components in traditional optical modules, such as removing the digital signal processor (DSP) and clock and data recovery (CDR) chips, they have the advantages of low power consumption, low cost and low latency.

[0003] At present, due to the difference in link length, the performance of the electrical signal output to the optical module (such as insertion loss and electrical signal swing, etc.) of different ports of the switch is different, resulting in differences in the output signals obtained by the drivers (Driver) in the LPO on different ports based on the electrical signals, affecting the performance of the optical signal generated by the subsequent laser (such as extinction ratio (ER), etc.). The gain (Gain) set by the driver is a fixed value, which may make it difficult for the LPO to flexibly adjust the output signal of the driver, making it difficult for the same LPO to adapt to different switches or different ports of the same switch. Summary of the invention

[0004] In view of this, the present disclosure provides an automatic gain control method, device, optical module and medium for an optical module to solve the problem that the same LPO is difficult to adapt to different switches or difficult to adapt to different ports of the same switch.

[0005] In a first aspect, the present disclosure provides an automatic gain control method for an optical module, the method comprising:

[0006] Obtaining a target value and a detection value, wherein the target value is a peak value of an electrical signal output by a driver in the desired optical module, and the detection value is a peak value of an electrical signal output by the driver detected by a peak detector in the optical module;

[0007] Determine the gain adjustment amount according to the difference between the target value and the detection value;

[0008] Get the current gain value set by the driver;

[0009] Update the current gain value according to the gain adjustment amount.

[0010] The automatic gain control method for an optical module provided in this embodiment determines the gain adjustment amount according to the difference between the target value and the detection value after obtaining the target value, the detection value and the current gain value, and then flexibly adjusts the current gain value according to the gain adjustment amount, thereby ensuring the consistency of the output signal of the driver of the optical module at different ports corresponding to the link length, so that the optical module can be better and simpler to adapt to external devices such as switch boards.

[0011] In a second aspect, the present disclosure provides an automatic gain control device for an optical module, the device comprising:

[0012] A first acquisition module is used to acquire a target value and a detection value, wherein the target value is a peak value of an electrical signal output by a driver in the desired optical module, and the detection value is a peak value of an electrical signal output by the driver detected by a peak detector in the optical module;

[0013] A determination module, used for determining a gain adjustment amount according to a difference between a target value and a detection value;

[0014] A second acquisition module is used to obtain a current gain value set by the driver;

[0015] The update module is used to update the current gain value according to the gain adjustment amount.

[0016] In a third aspect, the present disclosure provides an optical module, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the automatic gain control method for the optical module of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0017] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the automatic gain control method for an optical module of the first aspect or any corresponding embodiment thereof.

[0018] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the automatic gain control method for an optical module of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 is a flow chart of an automatic gain control method for an optical module according to an embodiment of the present disclosure;

[0021] Figure 2 is a flow chart of another automatic gain control method for an optical module according to an embodiment of the present disclosure;

[0022] Figure 3 is a flow chart of another automatic gain control method for an optical module according to an embodiment of the present disclosure;

[0023] Figure 4 is a flow chart of another automatic gain control method for an optical module according to an embodiment of the present disclosure;

[0024] Figure 5 is an ER distribution diagram before and after the 800G LPO automatic gain control method according to an embodiment of the present disclosure is turned on;

[0025] Figure 6 is a distribution diagram of the BER of 64 ports of a switch of the first type of the optical module with AGC function according to an embodiment of the present disclosure;

[0026] Figure 7 is a distribution diagram of the BER of 64 ports of a switch of a second model of an optical module with an AGC function according to an embodiment of the present disclosure;

[0027] Figure 8 is a structural block diagram of an automatic gain control device for an optical module according to an embodiment of the present disclosure;

[0028] Fig. 9 It is a schematic diagram of the hardware structure of the optical module of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. According to the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0030] With the rapid development of technologies such as artificial intelligence (AI), cloud computing, and big data, large data centers around the world are undergoing upgrades and construction, and the demand for high-speed optical modules has surged, driving the capacity of optical modules to gradually evolve to 400G, 800G, and 1.6T.

[0031] LPO uses only linear analog components on the data link, without CDR or DSP. Compared with optical modules containing DSP, it can greatly reduce the power consumption and latency of optical modules, thereby reducing the energy consumption and latency of data centers. However, at the same time, LPO has general transmission performance and poor interoperability. Among them, the related functions that need to be completed by DSP in LPO can be integrated into the switching chips of switches and other equipment. DSP is a high-speed digital processing chip that can not only provide digital clock recovery functions, but also perform dispersion compensation operations and remove noise / nonlinear interference and other factors. Optical modules containing DSP can achieve low bit error rate through DSP processing of signals.

[0032] For example, the data comparison between 800G LPO and an optical module including DSP can be shown in Table 1.

[0033] Table 1

[0034] type Power consumption Latency cost performance 800G DR8 (LPO solution) ~8.5W ~2ns Y 1E-9 800G DR8 (DSP solution) ~15.5W ~100ns 1.4Y 1E-10

[0035] As can be seen from Table 1, compared with the DSP solution, the power consumption, latency and cost of the LPO solution are all reduced.

[0036] However, the link lengths of different ports of a switch are different, and the current LPO uses a fixed value for the driver gain, which makes it difficult for the same LPO to adapt to different ports of the same switch or different types of switches. For example, the driver parameter (gain) adapted to type A switch is difficult to adapt to type B switch.

[0037] In view of this, the present disclosure provides an automatic gain control (AGC) method for an optical module, which flexibly adjusts the gain set by a driver in the optical module based on a target value and a detection value, ensures the consistency of the output signal of the driver under different link lengths of the LPO, and enables the LPO to adapt to different ports of the same switch or different types of switches.

[0038] According to an embodiment of the present disclosure, an embodiment of an automatic gain control method for an optical module is provided, and the optical module can be applied to scenarios such as data centers. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a microcontroller unit (MCU) of an optical module such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0039] In this embodiment, an automatic gain control method for an optical module is provided, which can be used for an MCU of an optical module (such as an LPO). Figure 1is a flow chart of an automatic gain control method for an optical module according to an embodiment of the present disclosure, such as Figure 1 As shown, the method comprises the following steps:

[0040] Step S101, obtaining a target value and a detection value.

[0041] The target value (Target) is the peak value of the electrical signal output by the driver in the desired optical module, and the detection value is the peak value of the electrical signal output by the driver detected by the peak detector (Peaking Detector) in the optical module.

[0042] Specifically, in the optical module, the Driver Peaking Detector is a circuit used to detect the signal strength output by the linear driver. When the driver processes (such as amplifying, modulating, etc.) the electrical signal received from an external device (such as a switch, server, etc.), the waveform (or swing) of the received electrical signal changes to a certain extent. The peak value detected by the Driver Peaking Detector can accurately reflect the changes in the electrical signal received from the external device, providing a basis for subsequent gain adjustment.

[0043] In the driver of the optical module, gain refers to the ratio of the output signal power to the input signal power, that is, gain (Gain) = output signal power (P_out) / input signal power (P_in). Gain can reflect the driver's ability to amplify the input electrical signal. During the signal transmission process, the electrical signal input from the external device to the optical module driver may be attenuated due to line loss, impedance mismatch, etc. Through appropriate gain settings, the driver can amplify the input electrical signal to a suitable intensity to ensure that it can effectively drive the optical module laser to convert and transmit optical signals.

[0044] Exemplarily, the target value can be determined by the designer according to the type of external device connected to the optical module and pre-configured in the register of the optical module. The target value can also be determined by the MCU based on the swing upper limit of the electrical signal and the reference value of the driver output.

[0045] Step S102, determining a gain adjustment amount according to a difference between the target value and the detected value.

[0046] Specifically, the difference between the target value and the detection value can be represented by the difference between the target value and the detection value, or can be represented by the ratio between the target value and the detection value.

[0047] Exemplarily, the gain adjustment amount can be determined based on the correspondence between the difference between the target value and the detection value and the gain adjustment amount. For example, the correspondence can be a functional relationship, such as the difference between the target value and the detection value is positively correlated with the gain adjustment amount, and the greater the difference between the target value and the detection value, the greater the gain adjustment amount. For another example, the correspondence can be a correspondence table, and different differences between target values ​​and detection values ​​correspond to different gain adjustment amounts. After determining the difference between the target value and the detection value, the gain adjustment amount can be determined by looking up the table.

[0048] Step S103, obtaining the current gain value set by the driver.

[0049] Specifically, the gain value read by the MCU from the register of the optical module is the current gain value.

[0050] Step S104: updating the current gain value according to the gain adjustment amount.

[0051] Exemplarily, after determining the gain adjustment amount, the current gain value can be updated by a preset rule. For example, when the detection value is greater than the target value, the gain value set in the register can be updated to the difference between the current gain value and the gain adjustment amount, that is, the updated current gain value is the current gain value obtained - the gain adjustment amount; when the detection value is less than the target value, the gain value set in the register can be updated to the sum of the current gain value and the gain adjustment amount, that is, the updated current gain value is the current gain value obtained + the gain adjustment amount. The preset rule can be determined by the designer and configured in the optical module.

[0052] Specifically, after the current gain value is updated according to the gain adjustment amount, the updated current gain value is written into the register. At this time, the updated current gain value is the new current gain value.

[0053] The automatic gain control method for an optical module provided in this embodiment determines the gain adjustment amount according to the difference between the target value and the detection value after obtaining the target value, the detection value and the current gain value, and then flexibly adjusts the current gain value according to the gain adjustment amount, thereby ensuring the consistency of the output signal of the driver of the optical module at different ports corresponding to the link length, so that the optical module can be better and simpler to adapt to external devices such as switch boards.

[0054] In this embodiment, another automatic gain control method for an optical module is provided, which can be used for an MCU of an LPO. Figure 2 is a flow chart of another automatic gain control method for an optical module according to an embodiment of the present disclosure, such as Figure 2 As shown, the method comprises the following steps:

[0055] Step S201, obtaining a target value and a detection value.

[0056] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0057] Step S202, determining a gain adjustment amount according to a comparison result of the threshold value with the target value and the detection value.

[0058] Among them, the above step S202 is Figure 1 An implementation of step S102 of the illustrated embodiment.

[0059] Specifically, the difference between the target value and the detection value may be the difference between the target value and the detection value. The following takes the difference between the target value and the detection value as an example to describe in detail the process of determining the gain adjustment amount. For the convenience of description, the difference between the target value and the detection value is recorded as Δ, Δ=detection value-target value.

[0060] In some implementations, the threshold value may be one, and the gain adjustment amount may be determined based on the magnitude relationship between the threshold value and Δ. For example, if Δ is greater than the threshold value, the gain adjustment amount may be a large step value; if Δ is less than or equal to the threshold value, the gain adjustment amount may be a small step value, and the small step value is smaller than the large step value. The threshold value, the small step value, and the large step value may be configured by the designer based on experience.

[0061] In other implementations, the threshold value may include multiple values. In this case, the gain adjustment amount is determined according to the magnitude relationship between the multiple threshold values ​​and Δ. Taking the number of threshold values ​​as 2 as an example, that is, the threshold value includes a first threshold value and a second threshold value, and the first threshold value is less than the second threshold value, the above step S202 may include steps a1 to a3:

[0062] Step a1: when the absolute value of the difference between the target value and the detection value is less than or equal to the first threshold value, the gain adjustment amount is determined as the first preset adjustment amount.

[0063] Step a2: when the absolute value of the difference between the target value and the detection value is greater than the first threshold value, and the absolute value of the difference between the target value and the detection value is less than the first threshold value, the gain adjustment amount is determined as the second preset adjustment amount.

[0064] Step a3: when the absolute value of the difference between the target value and the detection value is greater than or equal to the second threshold value, the gain adjustment amount is determined as a third preset adjustment amount.

[0065] That is, when |Δ|≤the first threshold value, the gain adjustment amount (Step) is the first preset adjustment amount; when the first threshold value<|Δ|<the second threshold value, the gain adjustment amount (Step) is the second preset adjustment amount; when |Δ|≥the second threshold value, the gain adjustment amount (Step) is the third preset adjustment amount.

[0066] The first threshold value, the second threshold value, the first preset adjustment amount, the second preset adjustment amount and the third preset adjustment amount can all be configured by designers based on experience.

[0067] Exemplarily, the first preset adjustment amount may be smaller than the second preset adjustment amount, and the second preset adjustment amount may be smaller than the third preset adjustment amount.

[0068] Specifically, when |Δ|≤the first threshold value, it is considered that the difference between the target value and the detection value can be ignored, and the first preset adjustment amount can be 0 to avoid Driver Gain setting jitter; when the first threshold value<|Δ|<the second threshold value, it is considered that the difference between the target value and the detection value is a small deviation, and the second preset adjustment amount can be a small step value. At this time, the small step tracks the fine-tuning gain value to improve the adjustment accuracy; when |Δ|≥the second threshold value, it is considered that the difference between the target value and the detection value is a large deviation, and the third preset adjustment amount can be a large step value. At this time, the large step tracks the coarse-tuning gain value to improve the adjustment speed.

[0069] In this embodiment, the gain adjustment amount is determined by multi-threshold locking, so that both the stability and speed of gain regulation can be taken into consideration.

[0070] Step S203, obtaining the current gain value set by the driver.

[0071] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0072] Step S204: updating the current gain value according to the gain adjustment amount.

[0073] Specifically, the above step S204 may include:

[0074] Step S2041, when the detection value is less than the target value, if the current gain value is less than the maximum gain value, the current gain value is updated to the sum of the current gain value and the gain adjustment amount.

[0075] Step S2042: when the detection value is less than the target value, if the current gain value is greater than or equal to the maximum gain value, the current gain value is updated to the maximum gain value.

[0076] Step S2043: when the detection value is greater than the target value, if the current gain value is greater than the gain adjustment amount, the current gain value is updated to the difference between the current gain value and the gain adjustment amount.

[0077] Step S2044: when the detection value is greater than the target value, if the current gain value is less than or equal to the gain adjustment amount, the current gain value is updated to 0.

[0078] Step S2045, when the detection value is equal to the target value, stop updating the current gain value.

[0079] That is to say, when the detection value is less than the target value (Δ<0), if the current gain value (G current )<Maximum gain value(G max ), namely G current <G max , the current gain value has not reached the maximum configuration and can be increased, and the current gain value G is updated to G current +Step; if G current ≥G max , the current gain value reaches the maximum configuration and is difficult to increase. The current gain value G is updated to G max .

[0080] When the detected value is greater than the target value (Δ>0), if G current ≤Step, the current gain value is difficult to adjust according to the gain adjustment amount, and the current gain value is set to 0; if G current >Step, the current gain value has not reached the minimum configuration and can be further reduced, and the current gain value G is updated to G current -Step. When the detection value = the target value, the current gain value is considered to be optimal and the update of the current gain value is stopped.

[0081] The automatic gain control method for an optical module provided in this embodiment determines the gain adjustment amount according to the comparison result of the threshold value with the difference between the target value and the detection value after obtaining the target value and the detection value, and then updates the current gain value according to the comparison result of the detection value and the target value and the gain adjustment amount. The current gain value set by the driver can be quickly and accurately adjusted to the target value, ensuring that the drivers of the optical modules located at different ports can output ideal electrical signals.

[0082] In this embodiment, another automatic gain control method for an optical module is provided, which can be used for an MCU of an LPO. Figure 3 is a flow chart of another automatic gain control method according to an embodiment of the present disclosure, such as Figure 3 As shown, the method comprises the following steps:

[0083] Step S301, obtaining the target value and the detection value.

[0084] Exemplarily, before obtaining the target value and the detection value, the automatic gain control method for the optical module may further include: determining whether the working state of the optical module is normal. In this case, the above step S301 may specifically be: obtaining the target value and the detection value when the working state of the optical module is normal.

[0085] When the working state of the optical module is abnormal, the operation is terminated directly without executing the automatic gain control method for the optical module.

[0086] For example, the MCU can determine whether the working state of the optical module is normal by detecting the communication link state with the external device, whether the received and sent data frames are correct, etc. The MCU can also set a self-test program to determine whether the working state of the optical module is normal according to the test results of the self-test program (whether it can respond normally). If the working state of the optical module is normal, the target value and the test value are obtained; if the working state of the optical module is abnormal, it ends directly.

[0087] Step S302: determining a gain adjustment amount according to a difference between the target value and the detected value.

[0088] For details, please see Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0089] Step S303, obtaining the current gain value set by the driver.

[0090] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0091] Step S304: update the current gain value according to the gain adjustment amount.

[0092] For details, please see Figure 2 Step S204 of the illustrated embodiment will not be described in detail here.

[0093] Step S305, when the control mode is the continuous mode, return to the step of obtaining the target value and the detection value.

[0094] Step S306, when the control mode is the single mode, if the gain adjustment amount is not equal to the first preset adjustment amount, return to the step of obtaining the target value and the detection value until the gain adjustment amount is equal to the first preset adjustment amount.

[0095] Specifically, after the optical module is powered on, the control mode (continuous mode or single mode) of the optical module can be determined based on the user's selection operation or the configuration information sent by the host (HOST). After updating the current gain value, if the control mode is the continuous mode, return to the above step S301, continue to obtain the target value and the detection value, and adjust the current gain value; if the control mode is the single mode, determine whether the gain adjustment amount is the first preset adjustment amount. If the gain adjustment amount is not the first preset adjustment amount, return to the above step S301 until the gain adjustment amount is equal to the first preset adjustment amount.

[0096] Exemplarily, when the gain adjustment amount is the first preset adjustment amount, updating of the current gain value may be stopped.

[0097] Further, in some optional embodiments, after the gain adjustment amount is equal to the first preset adjustment amount, the automatic gain control method for the optical module further includes step b1 and step b2:

[0098] Step b1, determining whether the number of times the gain adjustment amount is the first preset adjustment amount reaches an anti-shake threshold.

[0099] Specifically, the anti-shake threshold may be configured by a designer based on experience. For example, the anti-shake threshold may be 5 or 6.

[0100] Exemplarily, a counter can be configured in the optical module. After the gain adjustment amount is equal to the first preset adjustment amount, the value (Count) of the counter is increased by 1 or decreased by 1. The MCU determines whether the value of the counter is a preset value (such as 5 or 6, etc.) or whether the value of the counter is 0, and determines whether the number of times the gain adjustment amount is the first preset adjustment amount reaches the anti-shake threshold.

[0101] Step b2: after the number of times the gain adjustment amount is the first preset adjustment amount reaches the anti-shake threshold, stop updating the current gain value.

[0102] Specifically, after the current gain value is stopped from being updated, the gain value in the driver does not change. When the number of times the gain adjustment amount is the first preset adjustment amount does not reach the anti-shake threshold, the process returns to the above step S301.

[0103] In this embodiment, when the control mode of the optical module is Single mode, if only a single configuration is performed, the optical module may be affected by the unstable signal of power-on initialization and deviate, resulting in a large gap between the set configuration and the actual optimal configuration. By adding an anti-shake threshold (cycle count value N) to the Single mode, a single configuration is performed for N cycles, which can quickly achieve high accuracy of a single configuration while ensuring the stability of the optical module state.

[0104] The automatic gain control method for the optical module provided in this embodiment supports the host configuration of Continuous mode / Single mode, allowing users to freely choose continuous adaptive adaptation or single adaptation after power-on. Moreover, the Single mode has its own anti-jitter design, which can effectively filter the unstable signal of power-on initialization and achieve high accuracy of single adaptation.

[0105] The following takes the difference between the target value and the detection value as the difference and two threshold values ​​as an example to describe in detail the process of implementing the automatic gain control method at the firmware (FW) level of the optical module. Among them, the two threshold values ​​are the first threshold value (i.e., threshold 1) and the second threshold value (threshold 2), and threshold 2 is greater than threshold 1.

[0106] like Figure 4 As shown, after the optical module is powered on, the optical module state (Module Ready) is first determined. When the optical module state is abnormal, the automatic gain control method is terminated. When the optical module state is normal, the set target value is obtained and the detection value is read. After determining the target value and the detection value, the difference Δ between the detection value and the target value is calculated.

[0107] After determining Δ, the size relationship between Δ and the two threshold values ​​is determined. If |Δ|≤threshold 1, the gain adjustment amount Step=0; if threshold 1<|Δ|<threshold 2, the gain adjustment amount Step=small step value (S1); when |Δ|≥threshold 2, the gain adjustment amount Step=large step value (S2).

[0108] After determining the gain adjustment amount, read the current gain value G set by the driver curren , and then determine the size relationship between the detection value and the target value. When the detection value is less than the target value (Δ<0), if the current gain value is less than the maximum gain value (G max ), namely G current <G max , the current gain value has not reached the maximum configuration and can be increased. The new current gain value G is G current +Step; if G current ≥G max , the current gain value reaches the maximum configuration and is difficult to increase. The new current gain value G is G max When the detected value is greater than the target value (Δ>0), if G current ≤Step, the current gain value is difficult to adjust according to the gain adjustment amount, and the new current gain value G is 0; if G current > Step, the current gain value has not reached the minimum configuration and can be reduced. The new current gain value G is G current -Step.

[0109] After determining the new current gain value, reset the gain value in the register, and then determine whether the control mode of the optical module is the continuous mode. If so, return to the step of obtaining the target value. If not, determine whether the gain adjustment amount is 0. If so, count Count+1; otherwise, return to the step of obtaining the target value.

[0110] After counting Count+1, determine whether Count is greater than the anti-shake threshold, if so, end, otherwise return to the step of obtaining the target value. When the detection value = the target value, stop updating the current gain value, directly count Count+1 or end directly.

[0111] Specifically, the ER distribution diagram of the 800G LPO module before and after the automatic gain control method is turned on can be shown as follows: Figure 5 As shown, from Figure 5 It can be seen that before the AGC function is turned on, the ER distribution is relatively discrete, and after the AGC function is turned on, the ER distribution is more convergent. Figure 5 It can be seen intuitively that after the AGC function is turned on, the output signal of the LPO Driver achieves a high degree of consistency, that is, the present disclosure can well solve the problem of the output deviation of the Driver and the optical performance deviation caused by the deviation when the electrical port characteristics of different ports of the LPO are inconsistent.

[0112] Figure 6 and Figure 7 The link performance of the optical module with AGC function on the 64 ports (Switch port) of two models of switches (VendorA and VendorB) is shown respectively. Figure 6 and Figure 7 It can be seen that the bit error rate (BER) on the 64 ports of the two models of switches is below 1e-9, and the BER consistency of different ports is good, that is, the present disclosure can well solve the problem of inconsistent electrical port characteristics of LPO at different ports, making LPO more applicable.

[0113] In this embodiment, an automatic gain control device for an optical module is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived. Among them, the above-mentioned MCU includes an automatic gain control device for an optical module, or the MCU is equivalent to an automatic gain control device for an optical module.

[0114] This embodiment provides an automatic gain control device for an optical module, such as Figure 8 As shown, including:

[0115] A first acquisition module 801 is used to acquire a target value and a detection value, wherein the target value is a peak value of an electrical signal output by a driver in an expected optical module, and the detection value is a peak value of an electrical signal output by the driver detected by a peak detector in the optical module;

[0116] A determination module 802, configured to determine a gain adjustment amount according to a difference between a target value and a detection value;

[0117] The second acquisition module 803 is used to acquire the current gain value set by the driver;

[0118] The updating module 804 is used to update the current gain value according to the gain adjustment amount.

[0119] In some optional implementations, the determining module 802 includes:

[0120] The first determining unit is used to determine the gain adjustment amount according to the comparison result of the threshold value with the target value and the detection value.

[0121] In some optional implementations, the threshold value includes a first threshold value and a second threshold value, the first threshold value is less than the second threshold value, and the first determining unit includes:

[0122] A first processing unit, configured to determine the gain adjustment amount as a first preset adjustment amount when the absolute value of the difference between the target value and the detection value is less than or equal to a first threshold value;

[0123] A second processing unit, configured to determine the gain adjustment amount as a second preset adjustment amount when the absolute value of the difference between the target value and the detection value is greater than the first threshold value and the absolute value of the difference between the target value and the detection value is less than the first threshold value;

[0124] The third processing unit is used to determine the gain adjustment amount as a third preset adjustment amount when the absolute value of the difference between the target value and the detection value is greater than or equal to the second threshold value.

[0125] In some optional implementations, the updating module 804 includes:

[0126] A first updating unit, configured to update the current gain value to the sum of the current gain value and the gain adjustment amount if the current gain value is less than the maximum gain value when the detection value is less than the target value;

[0127] A second updating unit, configured to update the current gain value to the maximum gain value if the current gain value is greater than or equal to the maximum gain value when the detection value is less than the target value;

[0128] a third updating unit, configured to update the current gain value to a difference between the current gain value and the gain adjustment amount if the current gain value is greater than the gain adjustment amount when the detection value is greater than the target value;

[0129] a fourth updating unit, configured to update the current gain value to 0 when the detection value is greater than the target value and the current gain value is less than or equal to the gain adjustment amount;

[0130] The fifth updating unit is used to stop updating the current gain value when the detection value is equal to the target value.

[0131] In some optional embodiments, the device further comprises:

[0132] A first return module, used for returning to the step of obtaining the target value and the detection value when the control mode is the continuous mode;

[0133] The second returning module is used for returning to the step of obtaining the target value and the detection value if the gain adjustment amount is not equal to the first preset adjustment amount when the control mode is the single mode, until the gain adjustment amount is equal to the first preset adjustment amount.

[0134] In some optional embodiments, the device further comprises:

[0135] A second determination module is used to determine whether the number of times the gain adjustment amount is the first preset adjustment amount reaches an anti-shake threshold;

[0136] The stop module is used to stop updating the current gain value after the number of times the gain adjustment amount is the first preset adjustment amount reaches the anti-shake threshold.

[0137] In some optional embodiments, the device further comprises:

[0138] A third determination module is used to determine whether the working state of the optical module is normal;

[0139] The first acquisition module 801 includes:

[0140] The first acquisition unit is used to acquire the target value and the detection value when the working state of the optical module is normal.

[0141] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0142] The automatic gain control device for the optical module in this embodiment is presented in the form of a functional unit, where the unit refers to an application specific integrated circuit (ASIC) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0143] The present disclosure also provides an optical module, such as Fig. 9 As shown, the optical module includes: one or more processors 910, memory 920, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process the instructions executed in the optical module. Fig. 9 A processor 910 is taken as an example.

[0144] The processor 910 may be a central processing unit, a network processor or a combination thereof. The processor 910 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0145] The memory 920 stores instructions executable by at least one processor 910, so that the at least one processor 910 executes the method shown in the above embodiment.

[0146] The memory 920 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the optical module, etc. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 920 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the optical module via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0147] The memory 920 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 920 may also include a combination of the above types of memory.

[0148] The optical module also includes a communication interface 930, which is used for the optical module to communicate with other devices or communication networks.

[0149] Exemplarily, the optical module further includes a driver, a peak detector, and a counter.

[0150] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0151] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0152] It should be understood that the various parts of the present disclosure can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0153] In the description of this specification, the description with reference to the terms "this embodiment", "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0154] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0155] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the present disclosure.

Claims

1. An automatic gain control method for an optical module, characterized in that: The method comprises: Obtaining a target value and a detection value, wherein the target value is a peak value of an electrical signal output by a driver in the desired optical module, and the detection value is a peak value of the electrical signal output by the driver detected by a peak detector in the optical module; determining a gain adjustment amount according to a difference between the target value and the detected value; Obtaining a current gain value of the driver setting; The current gain value is updated according to the gain adjustment amount.

2. The method according to claim 1, characterized in that The step of determining the gain adjustment amount according to the difference between the target value and the detection value comprises: The gain adjustment amount is determined according to a comparison result between a threshold value and a difference between the target value and the detection value.

3. The method according to claim 2, characterized in that The threshold value includes a first threshold value and a second threshold value, the first threshold value is less than the second threshold value, and the determining the gain adjustment amount according to a comparison result of the threshold value with the difference between the target value and the detection value includes: When the absolute value of the difference between the target value and the detection value is less than or equal to the first threshold value, determining the gain adjustment amount as a first preset adjustment amount; When the absolute value of the difference between the target value and the detection value is greater than the first threshold value, and the absolute value of the difference between the target value and the detection value is less than the first threshold value, determining the gain adjustment amount as a second preset adjustment amount; When the absolute value of the difference between the target value and the detection value is greater than or equal to the second threshold value, the gain adjustment amount is determined as a third preset adjustment amount.

4. The method according to claim 1, characterized in that: The updating of the current gain value according to the gain adjustment amount includes: When the detection value is less than the target value, if the current gain value is less than the maximum gain value, updating the current gain value to the sum of the current gain value and the gain adjustment amount; When the detection value is less than the target value, if the current gain value is greater than or equal to the maximum gain value, updating the current gain value to the maximum gain value; When the detection value is greater than the target value, if the current gain value is greater than the gain adjustment amount, updating the current gain value to the difference between the current gain value and the gain adjustment amount; When the detection value is greater than the target value, if the current gain value is less than or equal to the gain adjustment amount, updating the current gain value to 0; When the detected value is equal to the target value, the updating of the current gain value is stopped.

5. The method according to any one of claims 1 to 4, characterized in that After updating the current gain value according to the gain adjustment amount, the method further includes: When the control mode is the continuous mode, returning to the step of obtaining the target value and the detection value; When the control mode is the single mode, if the gain adjustment amount is not equal to the first preset adjustment amount, the process returns to the step of obtaining the target value and the detection value until the gain adjustment amount is equal to the first preset adjustment amount.

6. The method according to claim 5, characterized in that After the control mode is the single mode and the gain adjustment amount is equal to the first preset adjustment amount, the method further includes: Determining whether the number of times the gain adjustment amount is the first preset adjustment amount reaches an anti-shake threshold; After the number of times that the gain adjustment amount is the first preset adjustment amount reaches an anti-shake threshold, the updating of the current gain value is stopped.

7. The method according to any one of claims 1 to 4, characterized in that Before obtaining the target value and the detection value, the method further includes: Determine whether the working status of the optical module is normal; The obtaining of the target value and the detection value comprises: When the working state of the optical module is normal, the target value and the detection value are obtained.

8. An automatic gain control device for an optical module, characterized in that: The device comprises: A first acquisition module, used to acquire a target value and a detection value, wherein the target value is a peak value of an electrical signal output by a driver in the desired optical module, and the detection value is a peak value of the electrical signal output by the driver detected by a peak detector in the optical module; A determination module, configured to determine a gain adjustment amount according to a difference between the target value and the detection value; A second acquisition module is used to acquire a current gain value set by the driver; An updating module is used to update the current gain value according to the gain adjustment amount.

9. An optical module, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the automatic gain control method for an optical module according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the optical module to execute the automatic gain control method for an optical module according to any one of claims 1 to 7.

11. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable the optical module to execute the automatic gain control method for the optical module according to any one of claims 1 to 7.