Swing adjustment method and computing device

CN122963997APending Publication Date: 2026-10-23XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610813198.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]在相关技术中,PCIe设备的发送端电压摆幅通常在链路初始化阶段进行配置,配置完成后在设备运行过程中保持不变,其至少存在如下问题:当PCIe链路的运行环境发生变化时,在链路初始化阶段配置的电压摆幅可能不再适合当前的链路条件,影响链路的稳定性

Benefits of technology

[0035]要理解的是,前面的一般描述和下面的详细描述两者都是示例性的,并且意图在于提供要求保护的技术的进一步说明。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122963997A_ABST
    Figure CN122963997A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a swing adjustment method and a computing device. The swing adjustment method comprises: obtaining the number and / or frequency of correctable errors related to a sending end in a PCIe link during operation of a PCIe device; determining whether a preset trigger condition is met according to the number and / or frequency of correctable errors related to the sending end in the PCIe link; and iteratively adjusting the voltage swing of the sending end according to a swing adjustment parameter in the case where the preset trigger condition is met, wherein, in the iteration process, it is determined whether to adjust the swing adjustment parameter based on the number and / or frequency of correctable errors related to the sending end after adjustment, and the voltage swing is adjusted according to the swing adjustment parameter after adjustment in the case where it is determined to adjust, the swing adjustment parameter comprising at least one of an adjustment direction, an adjustment amplitude and a swing adjustment range. The embodiments of the present application achieve the technical effect of improving link stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing, and in particular to a swing amplitude adjustment method and computing device. Background Technology

[0002] Peripheral Component Interconnect Express (PCIe) is a high-speed serial point-to-point communication protocol widely used in computer systems to connect processors to various peripheral devices. In PCIe communication, the voltage swing at the transmitter (TX) is one of the key parameters affecting the stability of data transmission and signal integrity (SI).

[0003] In related technologies, the voltage swing at the transmitting end of a PCIe device is usually configured during the link initialization phase and remains unchanged during device operation. This has at least the following problems: when the operating environment of the PCIe link changes, the voltage swing configured during the link initialization phase may no longer be suitable for the current link conditions, affecting the stability of the link. Summary of the Invention

[0004] This application provides a swing adjustment method and a computing device to improve the stability of the link.

[0005] In a first aspect, embodiments of this application provide a swing amplitude adjustment method, including: During the operation of the PCIe device, obtain the number and / or frequency of correctable errors related to the sending end in the PCIe link; Based on the number and / or frequency of correctable errors related to the sender in the PCIe link, determine whether the preset triggering conditions are met. When the preset triggering conditions are met, the voltage swing of the transmitting end is iteratively adjusted according to the swing adjustment parameters. During the iterative adjustment of the voltage swing of the transmitting end, it is determined whether to adjust the swing adjustment parameters based on the number and / or frequency of correctable errors related to the transmitting end after adjustment. If adjustment is determined, the voltage swing is adjusted according to the adjusted swing adjustment parameters. The swing adjustment parameters include at least one of adjustment direction, adjustment amplitude, and swing adjustment range.

[0006] In this embodiment, since the need to adjust the voltage swing is determined based on the number and / or frequency of correctable errors related to the transmitter during PCIe device operation, voltage swing adjustment can be triggered according to the actual error status of the link during device operation, allowing the voltage swing to adapt to changes in the current link conditions. Because the adjustment of the swing adjustment parameters is determined based on the number and / or frequency of correctable errors related to the transmitter obtained after adjustment during iterative adjustment, the subsequent adjustment direction, adjustment magnitude, and / or swing adjustment range can be adaptively optimized based on the actual effect of each adjustment, avoiding blind and repeated adjustments. This allows the voltage swing to gradually approach a value suitable for the current link conditions, thereby improving the signal transmission quality and stability of the link.

[0007] In one embodiment of the first aspect, when the swing adjustment parameters include adjustment direction and / or adjustment amplitude, iteratively adjusting the voltage swing at the transmitting end includes: Within a preset observation period after adjusting the voltage swing, based on the comparison between the number and / or frequency of correctable errors related to the transmitter after adjustment and the corresponding number and / or frequency before adjustment, it is determined whether to adjust the adjustment direction and / or adjustment magnitude. Adjust the voltage swing according to the adjusted direction and / or adjustment range.

[0008] In this embodiment, the number and / or frequency of correctable errors after adjustment within a preset observation period can enable the data to reflect the link status under the new swing configuration. By comparing the adjusted data with the data before adjustment, it can be determined whether to adjust the adjustment direction and / or adjustment range. Therefore, subsequent adjustment strategies can be optimized in a targeted manner based on the adjustment effect (better or worse).

[0009] In one implementation, within a preset observation period after adjusting the voltage swing, if the number and / or frequency of correctable errors related to the transmitter after adjustment are greater than or equal to the corresponding number and / or frequency before adjustment, the adjustment direction is adjusted, and the voltage swing is adjusted according to the adjusted adjustment direction.

[0010] In one implementation, if the number and / or frequency of correctable errors related to the transmitter after adjustment is less than the corresponding number and / or frequency before adjustment within a preset observation period after voltage swing adjustment, the adjustment range is reduced, and the voltage swing is adjusted according to the reduced adjustment range.

[0011] In one embodiment of the first aspect, the preset triggering condition includes at least one of the following: Within a preset time window, the number of correctable errors associated with the sender exceeds a preset threshold. Within a preset time window, the frequency of correctable errors related to the sending end exceeds a preset frequency threshold. The time intervals between consecutive preset number of correctable errors related to the sender are all less than a preset interval threshold.

[0012] In this embodiment, the triggering condition can be set to the number of correctable errors exceeding a preset threshold within a preset time window. This allows for the determination of link anomalies from the perspective of the number of errors, enabling the capture of abnormal error counts, improving the accuracy of triggering determination, and reducing the possibility of false triggering and missed triggering.

[0013] In this embodiment, the triggering condition can be set to the error occurrence frequency exceeding a preset frequency threshold within a preset time window. This allows for the determination of link anomalies from the error frequency dimension, enabling the capture of abnormal error occurrence frequencies, improving the accuracy of triggering determination, and reducing the possibility of false triggering and missed triggering.

[0014] In this embodiment, the triggering condition can be set such that the time interval between a preset number of correctable errors is less than a preset interval threshold. This allows for the determination of link anomalies from the perspective of error density, identification of the trend of continuous and dense error occurrence, improvement of the accuracy of trigger determination, and reduction of the possibility of false triggering and missed triggering.

[0015] In this embodiment, the triggering condition can be set to the number of correctable errors exceeding a preset threshold within a preset time window, or the time interval between consecutive preset number of correctable errors being less than a preset interval threshold. Therefore, link anomalies can be determined from two dimensions: the number of errors and the degree of error density. This can capture both abnormal error numbers and identify the trend of continuous and dense error occurrence, thereby improving the accuracy of triggering determination and reducing the possibility of false triggering and missed triggering.

[0016] In one embodiment of the first aspect, the preset triggering condition further includes the increment of the number of correctable errors associated with the sender relative to a reference value exceeding a preset increment threshold.

[0017] In this embodiment, the triggering condition is expanded to include an increment of the number of correctable errors relative to the baseline value that exceeds a preset increment threshold. This allows for a comparison with the baseline value to determine whether the number of errors has changed significantly, thereby further distinguishing between normal fluctuations in the link and genuine abnormal conditions, and improving the accuracy of the triggering determination.

[0018] In one embodiment of the first aspect, the PCIe device has multiple voltage swing levels preset; Iterative adjustment of the voltage swing at the transmitting end includes: Adjust the voltage swing to the adjacent level; If, within a preset observation period after adjusting the voltage swing, the number and / or frequency of correctable errors related to the transmitter after the adjustment are greater than or equal to the corresponding number and / or frequency before the adjustment, the voltage swing will be restored and adjusted down to the adjacent level.

[0019] In this embodiment, multiple voltage swing levels are preset and adjusted in the order of first increasing and then decreasing. This allows for the rapid finding of a swing value that improves the link condition through a limited number of level switching. The adjustment process is simple and efficient, reducing the risk of new problems caused by excessive adjustment in a single instance.

[0020] In one embodiment of the first aspect, the method further includes: If, within a preset observation period after the voltage swing is reduced, the number and / or frequency of correctable errors related to the transmitter after the reduction are greater than or equal to the corresponding number and / or frequency before the reduction, the voltage swing will be restored.

[0021] In this embodiment, the voltage swing is restored if the number and / or frequency of correctable errors associated with the transmitter are not improved after the voltage swing is reduced. This provides a safe fallback mechanism when neither increasing nor decreasing the voltage swing can improve the link condition, thus preventing the voltage swing from remaining at an inappropriate value and ensuring the basic operational stability of the PCIe device under the default configuration.

[0022] In one embodiment of the first aspect, iteratively adjusting the voltage swing at the transmitting end includes: Adjust the voltage swing to at least two different swing values ​​within the swing adjustment range; Based on the comparison results of the number and / or frequency of correctable errors associated with the transmitter corresponding to each swing value, the swing adjustment range is narrowed; Adjust the voltage swing based on the reduced swing adjustment range.

[0023] In this embodiment, since at least two different swing values ​​are set within the swing adjustment range and the number and / or frequency of correctable errors associated with the transmitter are tested respectively, the optimal swing region can be determined by comparing the link conditions under different swing values. Because the swing adjustment range is narrowed based on the comparison results, the swing value that optimizes the number and / or frequency of correctable errors associated with the transmitter can be gradually approximated in each iteration. This is not limited by preset levels, resulting in higher adjustment accuracy and making it suitable for scenarios with high requirements for signal quality optimization accuracy.

[0024] In one embodiment of the first aspect, at least two different amplitude values ​​include a first amplitude value and a second amplitude value. The first amplitude value is determined based on the difference between the upper limit of the amplitude adjustment range and a preset proportional length. The second amplitude value is determined based on the sum of the lower limit of the amplitude adjustment range and the preset proportional length. The preset proportional length is the product of a preset proportional coefficient and the length of the amplitude adjustment range.

[0025] In this embodiment, since the positions of the first and second amplitude values ​​are determined by a preset proportional coefficient and the length of the amplitude adjustment range, the relative positions of the two amplitude values ​​within the amplitude adjustment range are fixed and symmetrical. This ensures that the amplitude adjustment range is reduced by a certain proportion in each iteration, resulting in a predictable convergence speed during the iteration process. When a specific value (such as the golden ratio) is selected for the preset proportional coefficient, an amplitude value from the previous iteration can be reused as an amplitude value for the next iteration within the reduced amplitude adjustment range after each iteration. This reduces the number of measurements and improves adjustment efficiency, requiring only a new amplitude value to be measured in each iteration.

[0026] In one embodiment of the first aspect, the preset scaling factor is the golden ratio.

[0027] In this embodiment, the preset proportional coefficient is set to the golden ratio, which can reduce the swing amplitude adjustment range by a closer ratio in each iteration. Compared with methods such as equal division search, it can approach the better swing amplitude value faster in the same number of iterations, thus improving the search convergence speed.

[0028] In one embodiment of the first aspect, the preset iteration stop condition for iterative adjustment includes at least one of the following: The number and / or frequency of correctable errors associated with the sending end are lower than a preset error threshold; The length of the swing amplitude adjustment range is less than the preset length threshold.

[0029] In this embodiment, the preset iteration stop condition can be set to the length of the voltage swing adjustment range being less than a preset length threshold. Therefore, the iteration can automatically stop when the search accuracy reaches the set requirement for voltage swing adjustment, avoiding meaningless over-search and improving adjustment efficiency while maintaining adjustment accuracy. Setting the number of correctable errors to be less than a preset error threshold as the preset iteration stop condition allows the search to end early when the link signal quality has recovered to an acceptable level, eliminating the need to continue searching for a better swing value and further improving adjustment efficiency.

[0030] Secondly, embodiments of this application provide a swing amplitude adjustment device, including: The acquisition module is used to acquire the number and / or frequency of correctable errors related to the sending end in the PCIe link during the operation of the PCIe device; The judgment module is used to determine whether the preset triggering conditions are met based on the number and / or frequency of correctable errors related to the sender in the PCIe link. An adjustment module is used to iteratively adjust the voltage swing of the transmitting end according to the swing adjustment parameters when a preset trigger condition is met. During the iterative adjustment of the voltage swing of the transmitting end, the module determines whether to adjust the swing adjustment parameters based on the number and / or frequency of correctable errors related to the transmitting end after adjustment. If adjustment is determined, the voltage swing is adjusted according to the adjusted swing adjustment parameters. The swing adjustment parameters include at least one of adjustment direction, adjustment amplitude, and swing adjustment range.

[0031] In this embodiment, since the need to adjust the voltage swing is determined based on the number and / or frequency of correctable errors related to the transmitter during PCIe device operation, voltage swing adjustment can be triggered according to the actual error status of the link during device operation, allowing the voltage swing to adapt to changes in the current link conditions. Because the adjustment of the swing adjustment parameters is determined based on the number and / or frequency of correctable errors related to the transmitter obtained after adjustment during iterative adjustment, the subsequent adjustment direction, adjustment magnitude, and / or swing adjustment range can be adaptively optimized based on the actual effect of each adjustment, avoiding blind and repeated adjustments. This allows the voltage swing to gradually approach a value suitable for the current link conditions, thereby improving the signal transmission quality and stability of the link.

[0032] According to a third aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the above methods.

[0033] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods in the first aspect.

[0034] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the methods in the first aspect.

[0035] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0036] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0037] Figure 1 This is a schematic diagram of an application scenario provided in an embodiment of this application.

[0038] Figure 2 This is a flowchart of a swing amplitude adjustment method provided in an embodiment of this application.

[0039] Figure 3 This is a flowchart of a swing amplitude adjustment method provided in an embodiment of this application, which involves readjusting the swing amplitude.

[0040] Figure 4 This is a flowchart illustrating the voltage swing adjustment method provided in an embodiment of this application.

[0041] Figure 5 This is another flowchart of adjusting the voltage swing in a swing adjustment method provided in an embodiment of this application.

[0042] Figure 6 This is another flowchart of adjusting the voltage swing in a swing adjustment method provided in the embodiments of this application.

[0043] Figure 7 This is another flowchart of adjusting the voltage swing in a swing adjustment method provided in the embodiments of this application.

[0044] Figure 8 This is a schematic diagram of a PCIe device after adding a re-timer chip in a swing adjustment method provided in an embodiment of this application.

[0045] Figure 9 This is a block diagram of a swing amplitude adjustment device provided in an embodiment of this application.

[0046] Figure 10 This is a schematic diagram of a computer program product provided in an embodiment of this application.

[0047] Figure 11 This is a hardware block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0048] To make the objectives, technical solutions, and advantages of this application more apparent, exemplary embodiments according to this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0049] See Figure 1 , Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this application. For example... Figure 1 As shown, this application scenario includes a host-side device 101 and a PCIe device 102, which are connected via a PCIe link. The PCIe device 102 includes a transmitter (TX) and a receiver (RX). The transmitter of the PCIe device 102 is used to send data signals to the host-side device 101 via the PCIe link. The PCIe device 102 may include firmware (FW). Taking the swing adjustment method of this embodiment of the application executed by the PCIe device 102 as an example, the PCIe device 102 can acquire the number and / or frequency of correctable errors related to the transmitter during device operation, and adjust the voltage swing of the transmitter of the PCIe device 102 when the number and / or frequency of correctable errors related to the transmitter meet a preset trigger condition.

[0050] See Figure 2 This application provides a swing amplitude adjustment method, including: S201, During the operation of the PCIe device, obtain the number and / or frequency of correctable errors related to the sending end in the PCIe link.

[0051] Correctable errors (CE) are a type of error defined in the PCIe protocol. Correctable errors include several types, and can be categorized based on their source as correctable errors related to the sender (TX) and correctable errors related to the receiver (RX).

[0052] In this embodiment of the application, the number and / or frequency of correctable errors associated with the sending end can be the number of correctable errors associated with the sending end, the frequency of correctable errors associated with the sending end, or both. The number and / or frequency of correctable errors in the PCIe link obtained can be the number and / or frequency of errors counted by a statistical window.

[0053] In this embodiment, the firmware of the PCIe device can continuously monitor the PCIe link quality to obtain the number and / or frequency of correctable errors related to the sender in the PCIe link. Specifically, a preset time interval can be used as the monitoring period to monitor the number of correctable errors on the link. Based on the number of correctable errors obtained from the monitoring, the number and / or frequency of correctable errors related to the sender can be obtained. The duration of the preset time interval can be set according to requirements, such as 30 seconds, 1 minute, 2 minutes, etc., which is adapted to the statistical window.

[0054] In this application embodiment, the specific method for obtaining the number and / or frequency of correctable errors related to the transmitting end is not limited. Taking the acquisition of the number of correctable errors related to the transmitting end as an example, in one implementation, the firmware of the PCIe device reads the physical layer transmitting end error count (TX Error) and determines whether there is a physical layer transmitting end error within the statistical window; if a physical layer transmitting end error exists, the number of correctable errors of the transaction layer within the statistical window is taken as the number of correctable errors related to the transmitting end. The total number of correctable errors of the transaction layer can be read from the Advanced Error Reporting (AER) register by the host-side device and sent to the PCIe device so that the PCIe device obtains the total number of correctable errors of the transaction layer; the physical layer transmitting end error count can be read from the physical layer status register by the PCIe device firmware. If there is no transmitting end error at the physical layer, it is considered that the root cause of the correctable errors of the transaction layer cannot be attributed to the transmitting end, and other remedial measures can be performed instead of adjusting the transmitting end voltage swing. The frequency of occurrence can be calculated based on the number, and the frequency of occurrence is not described in detail here. It should be understood that the statistical window for the number of correctable errors can be set according to requirements, such as [current time]. [Preset duration, current time] The preset duration of the statistics window can be set according to your needs, such as 30 seconds, 1 minute, 10 minutes, 20 minutes, etc.

[0055] S202, determine whether the preset triggering conditions are met based on the number and / or frequency of correctable errors related to the sender in the PCIe link.

[0056] Preset trigger conditions refer to pre-defined conditions used to determine whether an abnormal situation has occurred in the PCIe link that requires swing adjustment. For example, when the number and / or frequency of correctable errors related to the transmitter in the PCIe link reaches a threshold defined by the preset trigger conditions, the link signal quality is considered to have deteriorated to the point where swing adjustment is necessary.

[0057] For example, the number of correctable errors related to the sender within a preset duration is greater than a preset quantity threshold; the preset duration can be the same as the duration of the statistical window. Alternatively, the frequency of correctable errors related to the sender is greater than a preset frequency threshold. Or, the intervals between consecutive preset number of correctable errors related to the sender are all less than a preset time interval threshold. The preset duration, preset quantity threshold, preset frequency threshold, preset quantity, and preset time interval threshold can all be set according to requirements. For example, preset durations can be 1 minute, 2 minutes, 5 minutes, etc.; preset quantity thresholds can be 5, 10, 20, etc.; preset frequency thresholds can be 1 / minute, 2 / minute, etc.; preset quantities can be 5, 10, 15, etc.; and preset time interval thresholds can be 30 seconds, 1 minute, 2 minutes, etc.

[0058] Taking the example of a preset trigger condition where the interval between a continuously preset number of correctable errors related to the transmitter is less than a preset time interval threshold, let's say the preset time interval threshold is 1 minute and the preset number is 10. We can then determine whether the number of correctable errors related to the transmitter per minute is greater than 1 for 10 consecutive minutes. If so, the preset trigger condition is met. Alternatively, we can determine whether the frequency of correctable errors related to the transmitter, measured in minutes, is greater than 1 per minute for 10 consecutive minutes. If so, the preset trigger condition is met.

[0059] Let's take an example where the number of correctable errors related to the sender within a preset duration exceeds a preset threshold. Assume the preset duration is 2 minutes and the threshold is 10 errors. Then, based on the number of correctable errors related to the sender, we determine whether the number of correctable errors related to the sender within the preset duration exceeds the preset threshold. It should be understood that if the number of correctable errors related to the sender is a statistical value calculated using the preset duration as the detection period, then the number of correctable errors related to the sender within that preset duration can be directly obtained. If other statistical methods are used, the number of correctable errors related to the sender within the preset duration can also be calculated. This will not be explained in detail here.

[0060] S203, under the condition of satisfying the preset triggering condition, the voltage swing of the transmitting end is iteratively adjusted according to the swing adjustment parameters. During the iterative adjustment of the voltage swing of the transmitting end, based on the adjusted number and / or frequency of correctable errors related to the transmitting end, it is determined whether to adjust the swing adjustment parameters. If adjustment is determined, the voltage swing is adjusted according to the adjusted swing adjustment parameters, which include at least one of adjustment direction, adjustment amplitude, and swing adjustment range.

[0061] In this step, voltage swing adjustment can be achieved by writing firmware into the physical layer configuration register of the PCIe device, by configuring the output swing parameters of the retimer chip, or by other methods.

[0062] The voltage swing adjustment parameters include at least one of the following: adjustment direction, adjustment amplitude, and voltage swing adjustment range. It can be one, any two, or all three. When the voltage swing adjustment parameter includes adjustment amplitude, the voltage swing is adjusted according to the adjustment amplitude. The adjustment amplitude (e.g., adjustment step size) refers to the amount of change in the voltage swing each time it is adjusted, for example, increasing or decreasing by 0.1V each time. When the voltage swing adjustment parameter includes adjustment direction, the voltage swing is adjusted according to the adjustment direction. The adjustment direction refers to the direction of change in the voltage swing, i.e., increasing the voltage swing by adjusting upwards or decreasing it by adjusting downwards. When the voltage swing adjustment parameter includes voltage swing adjustment range, the voltage swing is adjusted according to the swing value within the voltage swing adjustment range. The voltage swing adjustment range is the adjustment range of the voltage swing, and the adjusted voltage swing value of the transmitting end falls within this range. It should be understood that other parameters can also be referenced when iteratively adjusting the voltage swing of the transmitting end; this is not limited here.

[0063] During the iterative adjustment of the voltage swing at the transmitter, after each adjustment round, the number and / or frequency of correctable errors related to the transmitter after the current adjustment round can be compared with the corresponding number and / or frequency before the current adjustment round. The comparison result determines whether the swing adjustment parameters need to be adjusted. To ensure the comparability of the numbers and / or frequencies, this comparison can be based on the numbers and / or frequencies within the same statistical period. It should be understood that the corresponding number and / or frequency before the current adjustment round is the number and / or frequency of correctable errors related to the transmitter after the previous adjustment round. This is illustrated by the example of swing adjustment parameters including the swing adjustment range. The voltage swing is adjusted according to the swing value within the swing adjustment range. After each round of swing adjustment, it is determined whether to adjust the swing adjustment range based on the adjusted number and / or frequency of correctable errors related to the transmitter. The adjustment can also be based on a comparison between the number and / or frequency of correctable errors related to the transmitter after the current round of adjustment and the number and / or frequency of correctable errors related to the transmitter before the current round of adjustment. This comparison can also include other conditions, such as the number and / or frequency of correctable errors related to the transmitter after the current round of adjustment being less than a preset threshold. For example, when the number and / or frequency of correctable errors related to the transmitter after the current round of adjustment is lower than the number and / or frequency of correctable errors related to the transmitter before the current round of adjustment, the swing adjustment range is adjusted. Specifically, the adjustment can aim to reduce the swing adjustment range so that the reduced range includes the swing value of the current round. For example, if the number and / or frequency of correctable errors related to the transmitter after the current round of adjustment is lower than the number and / or frequency of correctable errors related to the transmitter before the current round of adjustment, and is lower than a preset threshold, the swing amplitude adjustment range is adjusted.

[0064] In some examples, at least two swing values ​​in the swing adjustment range can be used as candidate swing values. The number and / or frequency of correctable errors related to the transmitter after adjusting the swing according to the candidate swing values ​​are obtained. The number and / or frequency of correctable errors related to the transmitter after adjustment are compared with the number and / or frequency of correctable errors related to the transmitter before all candidate swing values ​​in the current round. Based on the comparison result, it is determined whether to adjust the swing adjustment range. For example, if the number and / or frequency of correctable errors related to the transmitter after adjusting any candidate swing value is less than the number and / or frequency of correctable errors before the swing adjustment in the current round, the swing adjustment range is adjusted. When adjusting the swing adjustment range, the target adjustment is to reduce the swing adjustment range so that the reduced adjustment protection range includes the target swing value, wherein the target swing value is the swing value with the smallest number and / or frequency after adjustment among the candidate swing values. Specifically, the adjustment range can be determined based on the number and / or frequency of correctable errors related to the transmitter after adjusting each of the multiple amplitude values ​​within the amplitude adjustment range. Taking at least two amplitude values ​​as an example (first and second amplitude values), assuming the first amplitude value corresponds to a smaller number and / or frequency of correctable errors related to the transmitter, then the second amplitude value and one of the upper and lower limits of the amplitude adjustment range can be used as the upper and lower limits for reducing the amplitude adjustment range. Specifically, if the interval between the second amplitude value and the upper limit of the original amplitude adjustment range includes the first amplitude value, then the reduced amplitude adjustment range can be from the second amplitude value to the upper limit of the original amplitude adjustment range. If the interval between the second amplitude value and the lower limit of the original amplitude adjustment range includes the first amplitude value, then the reduced amplitude adjustment range can be from the lower limit of the original amplitude adjustment range to the second amplitude value. This is illustrated by the amplitude adjustment parameters including the adjustment direction. When determining whether to adjust the adjustment direction based on the adjusted number and / or frequency of correctable errors related to the transmitter, after each round of amplitude adjustment, the adjustment direction can be determined by comparing the number and / or frequency of correctable errors related to the transmitter before and after the adjustment. If the adjusted number and / or frequency of correctable errors related to the transmitter is less than the number and / or frequency of correctable errors related to the transmitter before the adjustment, the adjustment direction is maintained; otherwise, the adjustment direction is adjusted. If the original direction was to increase the amplitude, it is adjusted to decrease the amplitude; if the original direction was to decrease the amplitude, it is adjusted to increase the amplitude.

[0065] Taking the amplitude adjustment parameter, including the adjustment range, as an example, when determining whether to adjust the adjustment range based on the number and / or frequency of correctable errors related to the transmitter after adjustment, after each round of amplitude adjustment, the comparison results of the number and / or frequency of correctable errors related to the transmitter before and after adjustment can be used to determine whether to adjust the adjustment range. If the number and / or frequency of correctable errors related to the transmitter after adjustment is less than the number and / or frequency of correctable errors related to the transmitter before adjustment, then the adjustment range is adjusted to reduce the adjustment range. The amount of reduction in the adjustment range can be set according to requirements. For example, if the reduction in the adjustment range is 0.1V, and the original adjustment range is nV, then the adjusted adjustment range is (n-0.1)V.

[0066] In the above embodiments, since the need to adjust the voltage swing is determined based on the number and / or frequency of correctable errors related to the transmitter during PCIe device operation, voltage swing adjustment can be triggered according to the actual error status of the link during device operation, allowing the voltage swing to adapt to changes in the current link conditions. Because the adjustment of the swing adjustment parameters is determined based on the number and / or frequency of correctable errors related to the transmitter obtained after adjustment during the iterative adjustment process, the subsequent adjustment direction, adjustment magnitude, and / or swing adjustment range can be adaptively optimized based on the actual effect of each round of adjustment, avoiding blind and repeated adjustments. This allows the voltage swing to gradually approach a value suitable for the current link conditions, thereby improving the signal transmission quality of the link and enhancing its stability.

[0067] In this embodiment, the iterative adjustment can stop when a preset stopping condition is met. The preset stopping condition can be set according to actual requirements.

[0068] In one implementation, the preset stop condition includes: the number and / or frequency of correctable errors related to the transmitter obtained after adjusting the voltage swing are lower than a preset error threshold, where the number corresponds to the quantity threshold and the frequency corresponds to the frequency threshold. Therefore, adjustments can be stopped when the link error condition reaches a preset acceptable level, avoiding unnecessary repeated adjustments.

[0069] In one implementation, the preset stop condition includes: the number and / or frequency of correctable errors related to the transmitter obtained after adjusting the voltage swing decreases compared to before the adjustment. Therefore, adjustments can be stopped once the link error situation has improved, avoiding unnecessary repeated adjustments. Adjustments can then be resumed only when the preset trigger condition is met again.

[0070] In one implementation, the preset stopping condition includes: the number and / or frequency of correctable errors associated with the transmitter after adjustments in both directions have not decreased. This avoids link state fluctuations caused by over-adjustment.

[0071] In one implementation, the preset stopping condition includes: the voltage swing has reached a preset highest or lowest level. This prevents the voltage swing from exceeding the device's allowable adjustment range and limits resource consumption during the iteration process.

[0072] In one implementation, when the amplitude adjustment parameter includes the amplitude adjustment range, a preset stopping condition includes: the length of the amplitude adjustment range is less than a preset range threshold. Therefore, iteration can stop after the amplitude adjustment range has been narrowed down to a preset precision, avoiding meaningless refinement searches.

[0073] In one implementation, during PCIe device operation, the number and / or frequency of correctable errors related to the receiver in the PCIe link can be acquired. When a threshold defined by the number and / or frequency of correctable errors related to the receiver is reached, the central processing unit (CPU) is notified via a driver or message. In one example, the PCIe device firmware reads the physical layer sender error count and the physical layer receiver error count to determine if a physical layer sender error exists. If no physical layer sender error exists but a physical layer receiver error count exists, the total number of correctable errors at the transaction layer is taken as the number of correctable errors attributable to the receiver as the root cause.

[0074] In the embodiments of this application, the number and / or frequency of correctable errors used to determine whether a preset trigger condition is met, and the number and / or frequency of correctable errors used to determine whether to adjust the swing adjustment parameter, are not limited to using the same type of data. For example, both can use the number of correctable errors related to the transmitting end; both can use the frequency of correctable errors related to the transmitting end; or both can use the number and frequency of correctable errors related to the transmitting end.

[0075] For example, when determining whether a preset trigger condition is met, the number of correctable errors related to the transmitter can be used, while when determining whether to adjust the swing adjustment parameter, the frequency of occurrence of correctable errors related to the transmitter can be used; or, when determining whether a preset trigger condition is met, the frequency of occurrence of correctable errors related to the transmitter can be used, while when determining whether to adjust the swing adjustment parameter, the number of correctable errors related to the transmitter can be used.

[0076] For example, when determining whether a preset trigger condition is met, the number and frequency of correctable errors related to the transmitter can be used, while when determining whether to adjust the swing adjustment parameter, one of the following can be used: the number and frequency of correctable errors related to the transmitter. Alternatively, when determining whether a preset trigger condition is met, one of the number and frequency of correctable errors related to the transmitter can be used, while when determining whether to adjust the swing adjustment parameter, both the number and frequency of correctable errors related to the transmitter can be used.

[0077] Furthermore, the statistical periods for the quantity and / or frequency of occurrence can be the same or different. For example, the quantity and / or frequency of correctable errors used to determine whether a preset trigger condition is met can be obtained based on a 10-minute statistical period, while the quantity and / or frequency of correctable errors used to determine whether to adjust the swing adjustment parameter can be obtained based on a 24-hour statistical period. It should be understood that the statistical period for the quantity and / or frequency of occurrence is adapted to the preset trigger condition. For example, if the preset trigger condition is that the number of correctable errors related to the transmitter within T minutes is greater than N, then the statistical period for the number of correctable errors related to the transmitter can be T minutes, and the determination of whether the preset trigger condition is met is based on whether the number of correctable errors related to the transmitter within T minutes is greater than N.

[0078] In one example, the number of correctable errors associated with the transmitter is used to determine whether a preset trigger condition is met, and the frequency of occurrence of correctable errors associated with the transmitter is used to determine whether the swing adjustment parameter should be adjusted. The statistical period for the number of correctable errors used to determine whether the preset trigger condition is met is 10 minutes, and the statistical period for the number of correctable errors used to determine whether the swing adjustment parameter should be adjusted is 24 hours. The preset time window is 10 minutes, and the preset quantity threshold is 10. That is, the preset trigger condition is that the number of correctable errors associated with the transmitter is greater than 10 within 10 minutes. A voltage swing adjustment method includes: during the operation of a PCIe device, acquiring the number of correctable errors related to the transmitter in the PCIe link every 10 minutes; determining whether a preset trigger condition is met based on the number of correctable errors related to the transmitter in the PCIe link, wherein if the number of correctable errors related to the transmitter exceeds a preset threshold of 10 within 10 minutes, the preset trigger condition is determined to be met; if the preset trigger condition is met, iteratively adjusting the voltage swing of the transmitter according to a voltage swing adjustment parameter, wherein during the iteration process, determining whether to adjust the voltage swing adjustment parameter based on whether the frequency of the adjusted correctable errors related to the transmitter is less than a preset frequency threshold.

[0079] In one implementation, see Figure 3When the swing adjustment parameters include adjustment direction and / or adjustment amplitude, iterative adjustment of the voltage swing at the transmitting end includes the following steps: S301, within a preset observation period after adjusting the voltage swing, determines whether to adjust the adjustment direction and / or adjustment magnitude based on the comparison results between the adjusted number and / or frequency of correctable errors related to the transmitter and the corresponding number and / or frequency before adjustment.

[0080] In this embodiment, the adjustment direction and / or adjustment magnitude can be determined based on a comparison between the adjusted frequency of correctable errors associated with the transmitter and the corresponding frequency before adjustment. Similarly, the adjustment direction and / or adjustment magnitude can be determined based on a comparison between the adjusted number of correctable errors associated with the transmitter and the corresponding number before adjustment. It should be understood that when the number and frequency are obtained based on the same preset time window, the frequency can be determined by the number within that preset time window and the length of that preset time window. Therefore, they can be used as different expressions of the same type of trigger judgment to adapt to different devices or firmware recording methods for error data. For example, some devices directly record the number of correctable errors within the preset time window, while others directly record or report the frequency of correctable errors. The number and frequency can also be obtained based on different statistical methods; for example, the number of correctable errors can be the cumulative number within the preset time window, and the frequency can be the occurrence rate calculated based on adjacent error intervals, etc. Thus, the quantity trigger condition can be used to determine whether the cumulative error amount within the preset time window is abnormal, and the frequency trigger condition can be used to determine whether the error occurrence rate is abnormal, thereby identifying abnormal link states from different perspectives.

[0081] In this embodiment, both the frequency and quantity of errors can be used as the basis for judgment. That is, the adjustment direction and / or adjustment magnitude are determined based on a comparison between the adjusted number and frequency of correctable errors related to the transmitter and the corresponding number and frequency before adjustment. Simultaneously, adjustment can be made only if either one or both conditions are met. After completing one voltage swing adjustment, the PCIe Link Training and Status State Machine (LTSSM) enters Recovery state to renegotiate the rate, and the PCIe device continues to acquire the number and / or frequency of correctable errors related to the transmitter. To ensure that the adjusted number and / or frequency of correctable errors related to the transmitter reflects the link status under the new swing configuration, a waiting period can be set before acquiring the adjusted number and / or frequency of correctable errors related to the transmitter, allowing the link to operate under the new swing configuration for a period of time before data acquisition. In some embodiments, the adjusted swing parameters can take effect without interrupting the link.

[0082] In this step, within a preset observation period after adjusting the voltage swing, it is determined whether to adjust the adjustment direction and / or adjustment magnitude based on the adjusted number of correctable errors. If the adjustment direction and / or adjustment magnitude is determined, then the adjustment direction and / or adjustment magnitude are adjusted. For example, if the adjusted number of correctable errors is less than the original number, the adjustment magnitude can be adjusted; or, if the adjusted number of correctable errors is less than the original number and also less than a preset threshold, the adjustment magnitude can be adjusted. Specifically, adjusting the adjustment magnitude can involve decreasing it. The preset observation period can be set according to requirements, such as 12 hours, 24 hours, etc.

[0083] In this step, the number of correctable errors related to the transmitter after adjustment can be compared with the number of correctable errors related to the transmitter before adjustment. If the number of correctable errors related to the transmitter after adjustment is better than before adjustment, for example, if the number of correctable errors decreases or the occurrence frequency decreases, it indicates that the situation has improved and the current adjustment direction is effective. The adjustment direction can be maintained and adjustment can continue, the adjustment can be stopped, or the adjustment range can be reduced to improve the adjustment accuracy. If the number of correctable errors increases or the occurrence frequency increases, it indicates that the situation has not improved and the current adjustment direction may be inappropriate, requiring a change in adjustment direction. Gradually reducing the adjustment range when the adjustment improves the situation, and adjusting the direction when the adjustment does not improve the situation, can balance adjustment efficiency, adjustment accuracy, and adjustment effect.

[0084] During the iterative adjustment process, within a preset observation period after each round of voltage swing adjustment, it can be determined whether to adjust the adjustment direction and / or adjustment magnitude based on the comparison between the number and / or frequency of correctable errors related to the transmitter after the current round of adjustment and the corresponding number and / or frequency before the current round of adjustment. It should be understood that when the current round of adjustment refers to the second round or subsequent rounds of voltage swing adjustment in this iterative adjustment, the corresponding number and / or frequency before the current round of adjustment refers to the number and / or frequency of correctable errors related to the transmitter after the previous round of adjustment. For example, after the second round of swing adjustment, it is determined whether to adjust the adjustment direction and / or adjustment magnitude based on the comparison between the number and / or frequency of correctable errors related to the transmitter after the second round of swing adjustment and the corresponding number and / or frequency before the current round of adjustment.

[0085] S302, adjusts the voltage swing according to the adjusted direction and / or adjustment range.

[0086] When determining the adjustment direction and / or adjustment magnitude, the voltage swing at the transmitting end is readjusted according to the adjusted adjustment magnitude and / or adjustment direction. After each adjustment of the voltage swing according to the adjusted adjustment magnitude and / or adjustment direction, the process of S301~S302 can be repeated to form a closed-loop iteration until a preset iteration stop condition is met. The preset iteration stop condition can be set according to requirements. For example, the number and / or frequency of correctable errors related to the transmitting end are less than or equal to a preset threshold. This preset threshold can be zero or other set thresholds. For example, when the preset threshold is zero, the preset termination iteration condition includes the number and / or frequency of correctable errors related to the transmitting end being zero.

[0087] In one implementation, the preset triggering condition includes at least one of the following: Condition 1: Within a preset time window, the number of correctable errors associated with the transmitter exceeds a preset threshold. The preset time window refers to a pre-defined time interval, such as 30 seconds, 1 minute, 5 minutes, or other durations set according to actual needs. The preset threshold is the upper limit of the allowed number of correctable errors within this time window, such as 10, 20, 50, 100, or other values ​​set according to link performance requirements. When the number of correctable errors associated with the transmitter exceeds the preset threshold within a time window, it indicates that the number of errors is abnormally high during that period, and the link signal quality may have significantly deteriorated, requiring amplitude adjustment.

[0088] Condition 2: The time interval between consecutive preset number of correctable errors related to the sender is less than a preset interval threshold.

[0089] The preset quantity is, for example, 10, and the preset interval threshold is, for example, 1 minute. When the time interval between 10 consecutive correctable errors related to the transmitter is less than 1 minute, it indicates that correctable errors are occurring continuously and densely, and the link is in a state of frequent errors. This continuous and dense error pattern usually reflects a more systematic degradation of the link signal quality than occasional errors. The preset quantity and preset time interval can be set according to requirements. For example, the preset quantity can be a value in the range of 3 to 50, and the preset time interval can be a value in the range of 10 seconds to 60 minutes. Specifically, for example, the preset quantity is 20 and the preset time interval is 1 minute; for example, the preset quantity is 5 and the preset time interval is 30 seconds.

[0090] The two triggering conditions described above determine link anomalies from two dimensions: the number of errors and the density of errors. Condition one focuses on whether the total number of errors exceeds the limit within a fixed time window, which can capture situations where the number of errors is excessive in a short period of time. Condition two focuses on whether the time interval between error events is consistently short, which can identify continuous and dense occurrences of errors and whether a "CE storm" has occurred. In this embodiment, the phenomenon of a dense outbreak of errors that can be corrected in a short period of time is referred to as a "CE storm." Condition one and condition two can be used individually or in combination to improve the accuracy of trigger determination and reduce the possibility of false triggering and missed triggering. In combination, either meeting any one condition represents meeting the triggering condition, or both conditions can represent meeting the triggering condition. It should be understood that, according to actual needs, other conditions can be added to the above-mentioned conditions to preset triggering conditions.

[0091] In one implementation, the preset triggering condition further includes the increment of the number of correctable errors associated with the sender relative to a baseline value exceeding a preset increment threshold. The baseline value refers to the cumulative number of correctable errors associated with the sender recorded at a certain reference time. In one example of this application, the baseline value is the error count value on the PCIe link. In another example of this application, the baseline value can be updated periodically, for example, by setting the current error count value as a new baseline value at fixed intervals.

[0092] The preset increment threshold refers to the maximum allowable increment relative to the baseline value. The preset increment threshold can be set according to requirements, for example, to a value between 10 and 100, such as 10, 20, 50, or 100. When the increment of the cumulative number of correctable errors associated with the sender relative to the baseline value exceeds the preset increment threshold, it indicates that the number of errors has increased significantly since the baseline time, and the link condition may have changed significantly.

[0093] In the above implementation, since the number of errors is determined by comparing it with a baseline value, it is possible to distinguish between normal fluctuations and genuine abnormal conditions in the link. For example, some PCIe links may continuously generate a small number of correctable errors during normal operation, which is considered normal fluctuation; only when the number of errors increases significantly relative to the baseline value by more than a preset incremental threshold is the link considered abnormal and requires swing adjustment.

[0094] In one implementation, the PCIe device has multiple preset voltage swing levels.

[0095] See Figure 4 Iterative adjustment of the voltage swing at the transmitting end includes: S401 adjusts the voltage swing to the adjacent level.

[0096] Multiple voltage swing levels refer to a set of discrete voltage swing values ​​pre-configured in the PCIe device, such as 0.6V, 0.7V, 0.8V, 0.9V, 1.0V, 1.1V, 1.2V, 1.3V, 1.4V, 1.5V, and 1.6V (11 levels in total). The reason for prioritizing upward adjustment is that increasing the voltage swing usually improves the signal-to-noise ratio at the receiver. In most scenarios where correctable errors increase due to signal attenuation, increasing the swing is a more direct and effective improvement method. It should be understood that in practical applications, if the highest level is already reached, the swing can be directly decreased.

[0097] S402, within a preset observation period after the voltage swing is increased, if the number and / or frequency of correctable errors related to the transmitter after the increase are greater than or equal to the corresponding number and / or frequency before the increase, the voltage swing is restored and reduced to the adjacent level.

[0098] In this step, within a preset observation period after adjusting the voltage swing, if the number of correctable errors related to the transmitter after the adjustment is greater than or equal to the corresponding number before the adjustment, the voltage swing is restored and adjusted down to the adjacent level. Similarly, within a preset observation period after adjusting the voltage swing, if the occurrence frequency of correctable errors related to the transmitter after the adjustment is greater than or equal to the corresponding occurrence frequency before the adjustment, the voltage swing is restored and adjusted down to the adjacent level. Alternatively, both the number and occurrence frequency can be used as the judgment criteria. For example, if either the number of correctable errors related to the transmitter after the adjustment or the occurrence frequency is greater than or equal to the corresponding number or occurrence frequency before the adjustment, the voltage swing is restored and adjusted down to the adjacent level. It should be understood that when used together as the judgment criteria, either one or both can be satisfied.

[0099] The preset observation period can be set according to requirements, such as 12 hours or 24 hours after the voltage swing is increased. Voltage swing recovery refers to returning to the level before the increase. If the number and / or frequency of correctable errors related to the transmitter after the increase are greater than or equal to the corresponding number and / or frequency before the increase, the link condition can be considered unimproved, and the increase is ineffective. In the case of ineffective increase, the system first restores to the level before the increase and then decreases, rather than directly decreasing from the level after the increase. This is to eliminate the adverse effects of the increase and attempt to decrease from a known baseline state.

[0100] In the above embodiments, since multiple voltage swing levels are preset and adjusted in an upward-then-downward order, the swing value that improves the link condition can be quickly found with a limited number of level switching. The adjustment process is simple and efficient, suitable for scenarios with high requirements for adjustment response speed. At the same time, the span between levels is controllable, reducing the risk of new problems caused by excessive adjustment in a single instance.

[0101] S403: If, within a preset observation period after the voltage swing is reduced, the number and / or frequency of correctable errors related to the transmitter after the reduction are greater than or equal to the corresponding number and / or frequency before the reduction, the voltage swing is restored.

[0102] If, within a preset observation period after adjusting the voltage swing, the number of correctable errors related to the transmitter after the adjustment is greater than or equal to the corresponding number before the adjustment, the voltage swing can be restored. Similarly, if, within a preset observation period after adjusting the voltage swing, the frequency of occurrence of correctable errors related to the transmitter after the adjustment is greater than or equal to the corresponding frequency before the adjustment, the voltage swing can be restored. Alternatively, both the number and frequency can be used as criteria. For example, within a preset observation period after adjusting the voltage swing, if either the number or frequency of correctable errors related to the transmitter after the adjustment is greater than or equal to the corresponding number and / or frequency before the adjustment, the voltage swing can be restored.

[0103] If the number and / or frequency of correctable errors related to the transmitter after the voltage swing adjustment is greater than or equal to the corresponding number and / or frequency before the adjustment, it indicates that neither the voltage swing adjustment nor the adjustment improved the link condition, therefore the voltage swing should be restored. If neither the voltage swing adjustment nor the adjustment improved the link condition, it indicates that the current correctable errors may not be caused by improper voltage swing, but by other factors, such as receiver problems or physical layer faults in the link. In this case, maintaining the default voltage level can prevent further deterioration.

[0104] In the above embodiments, since the voltage swing is restored to the default level when neither increasing nor decreasing the voltage swing can improve the link condition, a safe rollback mechanism is provided to prevent the voltage swing from remaining at an inappropriate value and to ensure the basic operational stability of the PCIe device under the default configuration.

[0105] In some implementations, the voltage swing can be lowered to an adjacent level. Within a preset observation period after the voltage swing is lowered, if the number and / or frequency of correctable errors related to the transmitter after the lowering is greater than or equal to the corresponding number and / or frequency before the lowering, the voltage swing is restored and raised to an adjacent level. If the number and / or frequency of correctable errors related to the transmitter after the raising is greater than or equal to the corresponding number and / or frequency before the lowering, the voltage swing is restored.

[0106] In some implementations, if the number and / or frequency of correctable errors associated with the transmitter after the voltage swing is lower than the corresponding number and / or frequency before the adjustment, the adjustment can continue.

[0107] In one example, using a 24-hour preset observation period, the example shows adjusting down one gear as moving to the adjacent gear, and adjusting up one gear as moving to the adjacent gear. (See [example name]). Figure 5 Adjusting the voltage swing at the transmitting end includes: S501, determine whether the current swing amplitude is the highest swing amplitude. If yes, execute S502; otherwise, execute S506.

[0108] S502, downshift one gear, execute S503.

[0109] S503: Determine if a new CE has been added within 24 hours. If so, execute S504; otherwise, end the process.

[0110] S504, determine whether the increase in CE has decreased within 24 hours. If yes, execute S502; otherwise, execute S505.

[0111] S505, switch back to the last used gear.

[0112] S506, shift up one gear, execute S507.

[0113] S507: Determine if a new CE has been added within 24 hours. If so, execute S508; otherwise, end the process.

[0114] S508: Determine whether the number of CE increases has decreased within 24 hours. If yes, proceed to S506; otherwise, proceed to S509. Before S508, an additional determination can be made: whether the number and / or frequency of correctable errors related to the transmitter after adjustment meet preset trigger conditions. If the preset trigger conditions are met, then determine whether the number of CE increases has decreased within 24 hours. It should be understood that 24 hours is the preset observation period for determining whether the number of CE increases has decreased within 24 hours. If the number of correctable errors related to the transmitter after adjustment is less than the corresponding number before adjustment, it means the number of CE increases has decreased. If it has not decreased, adjust the adjustment direction. Here, S509 returns to the last used gear and S510 lowers the gear by one level to adjust the adjustment direction. If it has decreased, the adjustment amplitude can be adjusted, for example, proportionally or according to a set value, and the amplitude continues to be adjusted in the current adjustment direction. In this embodiment, S506 continues to adjust upwards.

[0115] S509, return to the last used gear, execute S510.

[0116] S510, downshift one gear.

[0117] S511: Determine if a new CE has been added within 24 hours. If so, execute S512; otherwise, end the process.

[0118] S512, determine whether the increase in CE has decreased within 24 hours. If yes, execute S510; otherwise, execute S513.

[0119] S513, return to the last used gear.

[0120] In one implementation, to improve the voltage swing adjustment accuracy, a dynamically adjusted swing range is used to adjust the voltage swing at the transmitting end, see [link to implementation details]. Figure 6 Adjusting the voltage swing at the transmitting end includes: S601, adjust the voltage swing to at least two different swing values ​​within the swing adjustment range, and obtain the number and / or frequency of correctable errors associated with the transmitter corresponding to each swing value.

[0121] In this step, at least two different swing values ​​can be extracted from the swing adjustment range as needed. The voltage swing is then adjusted to at least two different swing values ​​within the swing adjustment range to obtain the number and / or frequency of correctable errors related to the transmitter for each swing value. Based on the comparison results of the number and / or frequency of correctable errors related to the transmitter for each swing value, S602 narrows the swing adjustment range. Specifically, the voltage swing can be set to one swing value first, and after running an observation period, the number and / or frequency of correctable errors related to the transmitter can be obtained. Then, the voltage swing can be set to another swing value, and after running the same observation period, the number and / or frequency of correctable errors related to the transmitter can be obtained. This process is repeated to obtain the number and / or frequency of correctable errors related to the transmitter for each swing value.

[0122] In one example, at least two different amplitude values ​​include a first amplitude value and a second amplitude value, wherein the initial upper limit and initial lower limit of the amplitude adjustment range are preset, the first amplitude value is determined based on the difference between the upper limit of the amplitude adjustment range and a preset proportional length, and the second amplitude value is determined based on the sum of the lower limit of the amplitude adjustment range and the preset proportional length, wherein the preset proportional length is the product of a preset proportional coefficient and the length of the amplitude adjustment range.

[0123] Taking the swing amplitude adjustment range as [a, b] as an example, the length of the swing amplitude adjustment range is L=ba, and the preset proportional coefficient is r. Then the preset proportional length is r×(ba). The first swing amplitude value is x1=br×(ba), and the second swing amplitude value is x2=a+r×(ba).

[0124] The initial upper and lower limits of the swing amplitude adjustment range can be set to the upper and lower limits of a preset adjustment range. For example, the initial lower limit is 0.7V and the initial upper limit is 1.3V.

[0125] S602, based on the comparison results of the number and / or frequency of correctable errors associated with the transmitter corresponding to each swing value, narrows the swing adjustment range.

[0126] The number and / or frequency of correctable errors associated with the transmitter for each swing value refers to the number and / or frequency of correctable errors associated with the transmitter after adjusting the voltage swing at each swing value. By comparing the number and / or frequency of correctable errors associated with the transmitter for each swing value, it is determined which swing value provides the best link condition, and the swing adjustment range is narrowed to include the better swing value.

[0127] In one example, at least two different amplitude values ​​include a first amplitude value and a second amplitude value. Narrowing the amplitude adjustment range can be achieved by setting the first amplitude value or the second amplitude value to the corresponding upper or lower limit value, such that the narrowed amplitude adjustment range includes the better amplitude value among the first and second amplitude values.

[0128] S603 adjusts the voltage swing based on the reduced swing adjustment range.

[0129] Based on the reduced swing adjustment range, when adjusting the voltage swing, the swing value with the smallest quantity and / or occurrence frequency among all swing values ​​is used as the voltage swing to be adjusted. It is determined whether the preset iteration stop condition is met after adjustment. If so, the swing value is used as the target voltage swing to be adjusted and the adjustment is completed. If not, S601~S603 are continued based on the reduced swing adjustment range.

[0130] In one example, at least two distinct swing values ​​are included, namely a first swing value and a second swing value. After a preset iteration stop condition is met, a target swing value is determined based on either the first or second swing value obtained through iteration, and the voltage swing at the transmitting end is adjusted to the target swing value. The target swing value is chosen from the first or second swing value based on the number and / or frequency of correctable errors associated with the transmitting end.

[0131] It should be understood that when the preset scaling factor is greater than 0.5, the second swing value is greater than the first swing value. If the number and / or frequency of correctable errors related to the transmitter corresponding to the first swing value is better than the second swing value, then the upper limit of the swing adjustment range is updated to the second swing value, i.e., the new swing adjustment range becomes [a, second swing value]; if the number and / or frequency of correctable errors related to the transmitter corresponding to the second swing value is better than the first swing value, then the lower limit of the swing adjustment range is updated to the first swing value, i.e., the new swing adjustment range becomes [first swing value, b]. It should be understood that when the preset scaling factor is less than 0.5, the first swing value is greater than the second swing value. If the number and / or frequency of correctable errors associated with the transmitter corresponding to the first amplitude value is better than the second amplitude value, then the lower limit of the amplitude adjustment range is updated to the second amplitude value, that is, the new amplitude adjustment range becomes [second amplitude value, b]; if the number and / or frequency of correctable errors associated with the transmitter corresponding to the second amplitude value is better than the first amplitude value, then the upper limit of the amplitude adjustment range is updated to the first amplitude value, that is, the new amplitude adjustment range becomes [a, first amplitude value].

[0132] In the above embodiments, since the amplitude adjustment range is iteratively reduced within the preset adjustment range by using the first amplitude value and the second amplitude value, and the reduction direction is determined based on the comparison results of the number and / or frequency of correctable errors associated with the transmitting end, it is possible to search for an amplitude value that makes the number and / or frequency of correctable errors associated with the transmitting end more optimal. This is not limited by the preset gear, and the adjustment accuracy is higher, making it suitable for scenarios with high requirements for signal quality optimization accuracy.

[0133] In one example, the preset iteration stopping condition may include at least one of the following: Condition 1: The length of the swing adjustment range is less than the preset length threshold. The preset length threshold can be set as the adjustment granularity, which refers to the minimum step value for the preset PCIe device's transmitter voltage swing adjustment, such as 0.1V. When the length of the swing adjustment range shrinks to less than the adjustment granularity, continuing the search will no longer produce meaningful swing changes. In this case, iteration stops, which can improve adjustment efficiency while maintaining adjustment accuracy.

[0134] Condition 2: The number and / or frequency of correctable errors related to the transmitter are lower than a preset error threshold. The preset error threshold refers to an acceptable level for the number and / or frequency of correctable errors, which can be set according to requirements, for example, no more than 3 errors per minute. When the number and / or frequency of correctable errors related to the transmitter obtained in a certain iteration are lower than the preset error threshold, it indicates that the current voltage swing has restored the link signal quality to an acceptable level, and there is no need to continue searching for a better value. Therefore, iteration should be stopped in this case, which can improve adjustment efficiency while maintaining adjustment accuracy.

[0135] If adjusting the swing amplitude fails to improve the link signal quality, the swing amplitude can be restored to its default initial value, and the relevant data recorded for subsequent analysis. If the problem persists, other remedial measures can be triggered, such as notifying the user to check the physical link or external interference sources.

[0136] In one example, the default scaling factor is the golden ratio, which is approximately 0.618. When using this scaling factor to determine two trial values, in each iteration of the reduced swing adjustment range, a trial value from the previous iteration can be reused as a trial value for the next iteration. Therefore, in each iteration, only one new trial value needs to be calculated and a new measurement of the number and / or frequency of correctable errors related to the sender needs to be performed, reducing the number of measurements per iteration. Simultaneously, the golden ratio ensures that each iteration reduces the swing adjustment range to approximately 0.618 times its original size. Compared to methods such as equal-division search, this approach approaches the optimal swing value faster with the same number of iterations, improving the search convergence speed.

[0137] In one example, using the golden ratio as the preset scaling factor and the preset iteration stopping condition of the number of correctable errors related to the sender being lower than a preset error threshold, see [example code]. Figure 7 Adjusting the voltage swing at the transmitting end includes: S701, Set the swing adjustment range [a, b], Golden ratio constant. =0.618.

[0138] The initial swing adjustment range can be set according to requirements. The swing adjustment range is a search interval from which the voltage swing is searched and obtained as the adjustment swing value.

[0139] In one example, the voltage swing adjustment range is set according to the adjustable range of the voltage swing, denoted as [Vmin, Vmax]. Vmin is the minimum voltage swing value to avoid insufficient signal strength due to excessively low values, and Vmax is the maximum voltage swing value to avoid signal reflection or interference due to excessively high values. [Vmin, Vmax] can be set according to requirements, for example, [0.6V, 1.8V]. Initialize the golden ratio coefficient. =0.618. The initial swing adjustment range [a, b] is set to [Vmin, Vmax].

[0140] The adjustment precision (granularity) can be set; for example, the adjustment precision Vdelta = 0.1V.

[0141] S702, Set the search point. x1=b- (ba), x2=a+ (ba).

[0142] In the search points, x1 is the first amplitude value, and x2 is the second amplitude value. x1 and x2 are two midpoints in the amplitude adjustment range.

[0143] S703, set the swing amplitude values ​​to x1 and x2 respectively, and observe the CE situation.

[0144] Voltage swing values ​​were set as x1 and x2 as observation points. For each observation point, the link performance was monitored over a period of time to obtain the number and / or frequency of correctable errors related to the transmitter. The number and / or frequency of correctable errors related to the transmitter represent the CE (Corrective Error) status. The number of CEs and their changing trends over a fixed time period can be recorded; TX / RX error counts can also be recorded.

[0145] S704: Determine if the CE situation has improved. If not, restore the default settings and end. If yes, proceed to S705.

[0146] S705, if CE is less when the amplitude is x1, then let b=x2; if CE is less when the amplitude is x2, then let a=x1.

[0147] Based on the CE values ​​when adjusting to amplitudes of x1 and x2, determine whether the CE is less with amplitude x2 or x1, and adjust the upper limit b or lower limit a of the amplitude adjustment range [a, b] accordingly. It should be understood that the adjusted [a, b] includes the amplitude value when the CE is less. It should also be understood that here, comparing the number of CE values ​​can be used to determine whether to use x1 or x2 as the boundary after narrowing the amplitude adjustment range, or signal quality indicators such as CE frequency can be used to determine whether to use x1 or x2 to narrow the amplitude adjustment range.

[0148] If the CE at x1 is less, the new interval is [a, x2], and b = x2 is updated. Meanwhile, in the next iteration, the new x2 = x1 and x1 = b - (ba); If CE at x2 is less, then the new interval is [x1, b], and a = x1 is updated. In the next iteration, the new x1 = x2 and x2 = a + 1 / 2 are given. (ba).

[0149] S706, determine whether the number of CEs is 0 when the swing amplitude is x1 / x2; if yes, set the swing amplitude to x1 / x2; otherwise, execute S707. Here, x1 / x2 refers to the one with less CE between x1 and x2.

[0150] S707: Determine if the number of CEs is less than a preset error threshold when the swing amplitude is x1 / x2. If yes, set the swing amplitude to x1 / x2; otherwise, execute S702. It should be understood that S706 and S707 can be executed together.

[0151] In S707, the iteration stops when the number of CEs is less than a preset error threshold. In practical applications, the iteration stopping condition can also include the length of the swing adjustment range being less than the adjustment granularity. If it is less than the adjustment granularity, the iteration stops. The adjustment granularity is set according to requirements, such as 0.1V. After the golden section search is completed, the TX voltage swing value of x1 / x2 can be set according to the final determined value and can be used as the default configuration for the current device operation.

[0152] If the golden section search process fails to improve link signal quality (e.g., the number of CEs does not decrease), a safe fallback mechanism can be enabled: the swing is restored to its default initial value, and relevant data is recorded for subsequent analysis. If the problem persists, other remedial measures can be triggered, such as notifying the user to check the physical link or external interference sources.

[0153] In this embodiment, the optimal transmitter voltage swing value is quickly found using the golden section search algorithm. The number of CEs and / or the frequency of occurrence can be used as optimization targets, and the swing value can be iteratively adjusted to achieve better signal transmission quality.

[0154] In this application embodiment, the method for adjusting the voltage swing of the transmitting end is not limited. For example, if the swing parameters of the PCIe device chip can be modified through register definition, the output swing can be directly adjusted by controlling the chip through firmware. If the chip itself has a fixed swing, an adjustable output swing can be achieved by adding circuitry to the board. In one implementation, voltage swing adjustment can be achieved by adding a retimer chip between the PCIe device chip and the gold fingers. See also Figure 8 , Figure 8 This is a schematic diagram of a swing adjustment architecture based on a retimer chip, provided as an embodiment of this application. Figure 8 As shown, the architecture includes a PCIe device chip 801, a retimer chip 802, and a gold finger 803. The retimer chip 802 has a configurable output voltage swing parameter; adjusting this parameter changes the voltage swing of the signal sent to the host device via the gold finger 803. The PCIe device's firmware communicates with the retimer chip 802 via an I2C (Inter-Integrated Circuit) or SMBus (System Management Bus) interface. The firmware sends configuration commands to the retimer chip 802 via I2C or SMBus, writing the target voltage swing parameter value. Upon receiving the configuration command, the retimer chip 802 adjusts its output voltage swing to the target value.

[0155] In one embodiment of this application, the number and / or frequency of correctable errors associated with the transmitting end can be detected in real time to determine whether a preset trigger condition is met. If the trigger condition is met, the voltage swing of the transmitting end can be adjusted quickly to optimize signal quality and improve system stability. Furthermore, it can adapt to different device models, different link lengths, and various complex electromagnetic environments, while reducing reliance on hardware resources.

[0156] In one embodiment of this application, the dynamic adjustment mechanism can optimize the link according to the actual situation during operation, thereby improving link signal quality, reducing the number of CEs (Cost Evidence), and avoiding the impact of "CE storms" on system stability. Reducing the frequency of CE occurrence lowers the probability of data transmission errors, ensuring the integrity and reliability of data transmission.

[0157] In one embodiment of this application, the swing amplitude is dynamically adjusted without manual intervention, reducing the complexity of operation and maintenance and the complexity of manual configuration, without relying on users to make manual judgments or try one by one.

[0158] In one embodiment of this application, a rapid response is achieved by progressively increasing / decreasing the preset swing amplitude level.

[0159] In one embodiment of this application, the optimal swing amplitude value is found with fine granularity within a given range using the golden section search algorithm, further improving adjustment accuracy and efficiency. Dynamic adaptive capability enables PCIe devices to adapt to different models and environments with different physical link lengths.

[0160] In one embodiment of this application, a safety fallback mechanism is provided to restore the voltage swing to its original setting, so that the device is always in a stable and safe working state, effectively preventing the system performance from degrading or communication from being interrupted due to excessive or incorrect adjustment, and ensuring reliable system operation.

[0161] In one specific embodiment, a swing amplitude adjustment method includes: The system monitors CE events and error information on the monitoring link. The PCIe device firmware (FW) uses an error counting module to monitor CEs on its own link in real time, recording their type and quantity. CE types include, but are not limited to, bit flips in packet transmission and CRC check failures. The error counting module also needs to record error counts at both the sending end (TX) and the receiving end (RX) to distinguish the source of the problem. The monitoring cycle can be set according to actual needs, for example, counting the number of CEs every minute.

[0162] Triggering Condition Determination. Set an acceptable CE threshold within a short period. For example, if the interval between 10 consecutive CEs within one minute is less than one minute, a "CE storm" can be considered triggered. When the above conditions are met, the trigger evaluation module initiates further analysis.

[0163] Problem source analysis. After the "CE storm" occurs, the evaluation module analyzes the data provided by the error counting module: checking whether the TX Error and RX Error counts have increased significantly. If it is determined to be a TX-related problem, proceed to the next step of amplitude adjustment; otherwise, record the problem and take other possible remedial measures.

[0164] Dynamically adjust the TX voltage swing. If the evaluation indicates that the TX swing needs adjustment, the swing adjustment module is invoked to modify the voltage swing parameters of the current PCIe device: increasing or decreasing the voltage swing to improve signal quality or reduce power consumption. The adjustment range can be set to a fixed value or dynamically calculated based on historical data. It is recommended to set the initial adjustment range to a small value to avoid over-adjustment leading to performance fluctuations. After adjustment, immediately return to normal operating status and continue monitoring the signal quality on the link.

[0165] Effect verification and iterative optimization. After the swing amplitude adjustment is completed, continue to observe the changes in the number of CEs on the link and their frequency: if the number of CEs decreases or disappears completely, it means that the current swing amplitude parameter has reached the optimal state and no further adjustment is needed; if the number of CEs does not decrease or is still too high, further refine the adjustment range and repeat a new round of swing amplitude optimization.

[0166] In one specific embodiment, a swing amplitude adjustment method includes: Predefined voltage swing levels. Multiple voltage swing levels are predefined in PCIe devices, for example, n adjustable levels. The design of these levels must meet the following requirements: each level corresponds to a specific TX voltage swing value. The levels are arranged from low to high, with lower levels corresponding to smaller voltage swings and higher levels corresponding to larger voltage swings. By default, a default intermediate value can be selected as the initial swing level when a PCIe device starts up.

[0167] Monitor link signal quality. During equipment operation, monitor the number, type, and signal error rate of CEs in real time. CE number and type can include quantity, frequency, and specific type. Signal error rate can include error counts at the transmitting and receiving ends. The purpose of real-time monitoring of CE number, type, and signal error rate is to determine if the link has entered an abnormal state, thus determining whether to initiate the swing adjustment step. Set preset trigger conditions to determine if the link has entered an abnormal state. For example: the number of CEs exceeds a certain threshold within a short period; 10 consecutive CE events are detected with an interval of less than 1 minute, i.e., a "CE storm". When the above preset trigger conditions are met, the swing adjustment step is triggered; if the above preset trigger conditions are not met, monitoring of link signal quality continues.

[0168] Adjust the voltage swing at the transmitting end. Based on several predefined voltage swing levels, adjust the voltage swing at the transmitting end up or down. Determine whether to adjust the voltage swing level up or down based on whether the link signal quality improves after adjusting the voltage swing. The implementation of adjusting the voltage swing at the transmitting end can refer to the steps in the aforementioned embodiments, and will not be described in detail here.

[0169] See Figure 9 This application provides a swing amplitude adjustment device, including: The acquisition module 901 is used to acquire the number and / or frequency of correctable errors related to the sending end in the PCIe link during the operation of the PCIe device.

[0170] The judgment module 902 is used to determine whether the preset triggering conditions are met based on the number and / or frequency of correctable errors related to the sender in the PCIe link.

[0171] The adjustment module 903 is used to iteratively adjust the voltage swing of the transmitting end according to the swing adjustment parameters when a preset trigger condition is met. During the iterative adjustment of the voltage swing of the transmitting end, it is determined whether to adjust the swing adjustment parameters based on the number and / or frequency of correctable errors related to the transmitting end after adjustment. If adjustment is determined, the voltage swing is adjusted according to the adjusted swing adjustment parameters. The swing adjustment parameters include at least one of adjustment direction, adjustment amplitude, and swing adjustment range.

[0172] In this embodiment, since the need to adjust the voltage swing is determined based on the number and / or frequency of correctable errors related to the transmitter during PCIe device operation, voltage swing adjustment can be triggered according to the actual error status of the link during device operation, allowing the voltage swing to adapt to changes in the current link conditions. Because the adjustment of the swing adjustment parameters is determined based on the number and / or frequency of correctable errors related to the transmitter in the adjusted PCIe link during iterative adjustment, the subsequent adjustment direction, adjustment magnitude, and / or swing adjustment range can be adaptively optimized based on the actual effect of each adjustment, avoiding blind and repeated adjustments. This allows the voltage swing to gradually approach a value suitable for the current link conditions, thereby improving the signal transmission quality and stability of the link.

[0173] In one embodiment, the adjustment module 903 includes: a determination module, configured to determine whether to adjust the adjustment direction and / or adjustment magnitude based on a comparison of the number and / or frequency of correctable errors associated with the transmitter after adjustment with the corresponding number and / or frequency before adjustment within a preset observation period after adjusting the voltage swing.

[0174] The first adjustment submodule is used to adjust the voltage swing according to the adjusted direction and / or adjustment range.

[0175] In one implementation, the preset triggering condition includes at least one of the following: within a preset time window, the number of correctable errors associated with the transmitter exceeds a preset number threshold; within a preset time window, the occurrence frequency of correctable errors associated with the transmitter exceeds a preset frequency threshold; and the time interval between consecutive preset number of correctable errors associated with the transmitter is less than a preset interval threshold.

[0176] In one implementation, the preset triggering condition also includes the increment of the number of correctable errors associated with the sender relative to a baseline value exceeding a preset increment threshold.

[0177] In one implementation, the PCIe device has multiple preset voltage swing levels.

[0178] The adjustment module includes: The up-adjustment module is used to adjust the voltage swing up to the adjacent level.

[0179] The down-adjustment module is used to restore the voltage swing and down-adjust it to the adjacent level if, within a preset observation period after the voltage swing is increased, the number and / or frequency of correctable errors related to the transmitter after the increase are greater than or equal to the corresponding number and / or frequency before the increase.

[0180] The recovery module is used to restore the voltage swing if, within a preset observation period after the voltage swing is reduced, the number and / or frequency of correctable errors related to the transmitter after the reduction is greater than or equal to the corresponding number and / or frequency before the reduction.

[0181] In one implementation, the adjustment module includes: The swing value determination module is used to adjust the voltage swing to at least two different swing values ​​within the swing adjustment range, and to obtain the number and / or frequency of correctable errors associated with the transmitting end corresponding to each swing value. In one example, the at least two different swing values ​​include a first swing value and a second swing value. The first swing value is determined based on the difference between the upper limit of the swing adjustment range and a preset proportional length, and the second swing value is determined based on the sum of the lower limit of the swing adjustment range and the preset proportional length, where the preset proportional length is the product of a preset proportional coefficient and the length of the swing adjustment range.

[0182] The range adjustment module is used to narrow the swing adjustment range based on the comparison results of the number and / or frequency of correctable errors associated with the transmitter corresponding to each swing value; The second adjustment submodule is used to adjust the voltage swing based on the reduced swing adjustment range.

[0183] In one implementation, the preset iteration stop condition for iterative adjustment includes at least one of the following: The number and / or frequency of correctable errors associated with the sending end are lower than a preset error threshold; The length of the swing amplitude adjustment range is less than the preset length threshold.

[0184] In one implementation, the preset scaling factor is the golden ratio.

[0185] An exemplary embodiment of this application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any method of the embodiments of this application.

[0186] Exemplary embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of any method of the embodiments of this application.

[0187] refer to Figure 10 An exemplary embodiment of this application also provides a computer program product 1000, including a computer program 1001, wherein the computer program, when executed by a processor, implements the steps of any method of the embodiments of this application.

[0188] refer to Figure 11 The present invention describes a structural block diagram of an electronic device 1100 that can serve as a server or client of this application, which is an example of a hardware device that can be applied to various aspects of this application. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0189] Electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1102 or a computer program loaded into random access memory (RAM) 1103 from storage unit 1108. The RAM 1103 may also store various programs and data required for device operation. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. An input / output (I / O) interface 1105 is also connected to bus 1104.

[0190] Multiple components in electronic device 1100 are connected to I / O interface 1105, including: input unit 1106, output unit 1107, storage unit 1108, and communication unit 1109. Input unit 1106 can be any type of device capable of inputting information to electronic device 1100. Input unit 1106 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 1107 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1108 may include, but is not limited to, disk and optical disk. Communication unit 1109 allows electronic device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0191] The computing unit 1101 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above. For example, in some embodiments, the methods of the embodiments of this application can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1100 via ROM 1102 and / or communication unit 1109. In some embodiments, the computing unit 1101 can be configured to perform the methods of the embodiments of this application by any other suitable means (e.g., by means of firmware).

[0192] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for adjusting swing amplitude, characterized in that, include: During the operation of the PCIe device, obtain the number and / or frequency of correctable errors related to the sending end in the PCIe link; Based on the number and / or frequency of correctable errors related to the sender in the PCIe link, determine whether the preset triggering condition is met. When the preset triggering condition is met, the voltage swing of the transmitting end is iteratively adjusted according to the swing adjustment parameter. During the iterative adjustment of the voltage swing of the transmitting end, it is determined whether to adjust the swing adjustment parameter based on the adjusted number and / or frequency of correctable errors related to the transmitting end. If adjustment is determined, the voltage swing is adjusted according to the adjusted swing adjustment parameter. The swing adjustment parameter includes at least one of adjustment direction, adjustment amplitude, and swing adjustment range.

2. The method according to claim 1, characterized in that, When the swing adjustment parameters include adjustment direction and / or adjustment amplitude, the iterative adjustment of the voltage swing at the transmitting end includes: Within a preset observation period after adjusting the voltage swing, based on a comparison of the number and / or frequency of correctable errors related to the transmitter after adjustment with the corresponding number and / or frequency before adjustment, it is determined whether to adjust the adjustment direction and / or the adjustment amplitude. The voltage swing is adjusted according to the adjusted direction and / or the adjusted magnitude.

3. The method according to claim 1, characterized in that, The preset triggering condition includes at least one of the following: Within a preset time window, the number of correctable errors associated with the sending end exceeds a preset threshold. Within a preset time window, the frequency of correctable errors associated with the transmitting end exceeds a preset frequency threshold. The time intervals between consecutive preset number of correctable errors associated with the sending end are all less than a preset interval threshold.

4. The method according to claim 3, characterized in that, The preset triggering condition also includes the increment of the number of correctable errors associated with the sending end relative to the baseline value exceeding a preset increment threshold.

5. The method according to any one of claims 1 to 4, characterized in that, The PCIe device has multiple preset voltage swing levels; The iterative adjustment of the voltage swing at the transmitting end includes: Adjust the voltage swing to an adjacent level; If, within a preset observation period after the voltage swing is increased, the number and / or frequency of correctable errors related to the transmitter after the increase are greater than or equal to the corresponding number and / or frequency before the increase, the voltage swing is restored and reduced to an adjacent level.

6. The method according to claim 5, characterized in that, The method further includes: If, within a preset observation period after the voltage swing is reduced, the number and / or frequency of correctable errors associated with the transmitter after the reduction are greater than or equal to the corresponding number and / or frequency before the reduction, the voltage swing is restored.

7. The method according to claim 1, characterized in that, The iterative adjustment of the voltage swing at the transmitting end includes: The voltage swing is adjusted to at least two different swing values ​​within the swing adjustment range, and the number and / or frequency of correctable errors associated with the transmitting end corresponding to each swing value are obtained. Based on the comparison results of the number and / or frequency of correctable errors associated with the transmitter corresponding to each swing value, the swing adjustment range is narrowed; The voltage swing is adjusted based on the reduced swing adjustment range.

8. The method according to claim 7, characterized in that, The at least two different amplitude values ​​include a first amplitude value and a second amplitude value. The first amplitude value is determined based on the difference between the upper limit of the amplitude adjustment range and a preset proportional length. The second amplitude value is determined based on the sum of the lower limit of the amplitude adjustment range and a preset proportional length. The preset proportional length is the product of a preset proportional coefficient and the length of the amplitude adjustment range.

9. The method according to claim 7, characterized in that, The preset iteration stop condition for the iterative adjustment includes at least one of the following: The number and / or frequency of correctable errors associated with the transmitting end are lower than a preset error threshold; The length of the swing amplitude adjustment range is less than a preset length threshold.

10. A computing device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.