High-speed peripheral component interconnection bandwidth distribution system, method, equipment, medium and product

By integrating impedance circuits and BIOS self-test technology on the adapter card, the PCIe expansion slot bandwidth is automatically determined, solving the problem of poor universality in PCIe bandwidth allocation, reducing production costs and improving the flexibility and efficiency of server hardware configuration.

CN120729731AActive Publication Date: 2025-09-30INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511225123.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-09-30
Estimated Expiration
2045-08-29

AI Technical Summary

Technical Problem

The PCIe bandwidth allocation method has poor versatility, resulting in insufficient flexibility in server hardware configuration, high production costs, long R&D cycles, and an inability to meet the expansion needs of diverse equipment.

Method used

An impedance circuit, including a terminal resistor and an analog switch element, is integrated on the adapter card. The channel impedance value is changed by switching the state of the analog switch element. Combined with the impedance value and the preset impedance bandwidth mapping table obtained by BIOS during the power-on self-test phase, the bandwidth of the PCIe expansion slot is automatically determined.

Benefits of technology

Adaptive bandwidth allocation is achieved for adapter cards of different specifications without modifying the motherboard hardware and firmware configuration, reducing production costs and improving the flexibility and efficiency of server hardware configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729731A_ABST
    Figure CN120729731A_ABST
Patent Text Reader

Abstract

The invention discloses a high-speed peripheral component interconnection bandwidth allocation system, method and device, a medium and a product, and relates to the technical field of computers. The system comprises an adapter card, an impedance circuit and a basic input and output system. The impedance circuit is integrated on the adapter card, when adapter cards of different specifications are inserted, output of different impedance signals can be achieved through the state change of the impedance circuit on the adapter card, and in the power-on self-test stage, the impedance signal output can be achieved. And the basic input and output system determines the bandwidth of each high-speed peripheral component interconnection channel according to the impedance value and a preset impedance bandwidth mapping table. Therefore, when the adapter card is replaced, operations such as circuit redesign and impedance matching element adjustment do not need to be carried out on the mainboard, and the universality of high-speed peripheral component interconnection bandwidth allocation is improved. Besides, the basic input and output system automatically obtains the impedance value and determines the bandwidth through the power-on self-test stage, firmware configuration parameters do not need to be modified manually, and the flexibility of server hardware configuration is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a high-speed peripheral component interconnect bandwidth allocation system, method, device, medium and product. Background Art

[0002] PCIe (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard. It provides high-speed data transmission channels for various external devices, such as graphics cards, network cards, and storage controllers, and is the core link connecting various high-performance devices. With the diversification of server application scenarios, the demand for flexible configuration of PCIe devices is increasing. However, the allocation efficiency and versatility of CPU PCIe bandwidth resources have become key issues restricting system design.

[0003] The PCIe bandwidth allocation method in related technologies has poor versatility. When users need to insert adapter cards of different specifications to expand PCIe devices, they must make targeted changes to the server motherboard, such as redesigning the signal detection circuit, adjusting impedance matching components, and modifying firmware configuration parameters. This increases production costs and limits the flexibility of server hardware configuration. Summary of the Invention

[0004] The present application provides a high-speed peripheral component interconnect bandwidth allocation system, method, device, medium and product to at least solve the problem of poor versatility of PCIe bandwidth allocation methods in related technologies.

[0005] In a first aspect, the present application provides a high-speed peripheral component interconnect bandwidth allocation system, comprising:

[0006] An adapter card is plugged into the high-speed peripheral component interconnect slot of the mainboard, and the adapter card is provided with at least one high-speed peripheral component interconnect expansion slot, the high-speed peripheral component interconnect expansion slot is used to plug in a high-speed peripheral component interconnect device, and the high-speed peripheral component interconnect expansion slot is communicatively connected to the processor port through multiple channels; at least one impedance circuit, the impedance circuit is integrated on the adapter card and corresponds to the high-speed peripheral component interconnect expansion slot, the impedance circuit includes a terminal resistor and an analog switch element, and the terminal resistor is connected in series with the analog switch element; when the state of the analog switch element is switched, the terminal resistor is connected to or removed from one of the channels of the high-speed peripheral component interconnect expansion slot; a basic input and output system is used to obtain the impedance value of each channel of each high-speed peripheral component interconnect expansion slot during the power-on self-test phase, and determine the bandwidth of each high-speed peripheral component interconnect expansion slot based on the impedance value of each channel and a preset impedance bandwidth mapping table.

[0007] In a second aspect, the present application provides a high-speed peripheral component interconnect bandwidth allocation method, comprising:

[0008] During the power-on self-test phase, the impedance value of each channel of each high-speed peripheral component interconnect expansion slot is obtained; based on the impedance value of each channel and a preset impedance-bandwidth mapping table, the bandwidth of each high-speed peripheral component interconnect expansion slot is determined.

[0009] In a third aspect, the present application provides an electronic device, comprising:

[0010] A data storage device is used to store a computer program; a data processor is used to implement the steps of any one of the high-speed peripheral component interconnect bandwidth allocation methods of the second aspect when executing the computer program.

[0011] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a data processor, the steps of the high-speed peripheral component interconnect bandwidth allocation method as described in any one of the second aspects are implemented.

[0012] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a data processor, implements the steps of any of the methods for allocating bandwidth of a peripheral component interconnect high speed according to the second aspect.

[0013] The present application discloses a high-speed peripheral component interconnect (HPI) bandwidth allocation system, method, device, medium, and product. The HPI bandwidth allocation system includes an adapter card, an impedance circuit, and a basic input / output (BIOS) system. The impedance circuit is integrated into the adapter card. When adapter cards of different specifications are inserted, different impedance signal outputs are achieved by changing the state of the impedance circuit on the adapter card. During the power-on self-test (POST) phase, the BIOS determines the bandwidth of each HPI channel based on the impedance value and a preset impedance-bandwidth mapping table. Consequently, when replacing an adapter card, there is no need to redesign the motherboard circuit or adjust impedance matching components, reducing motherboard modification costs, lowering the overall production cost of the server, and improving the versatility of the HPI bandwidth allocation system. Furthermore, the BIOS automatically obtains the impedance value and determines the bandwidth during the POST phase, eliminating the need for manual firmware configuration parameter modification. This allows users to flexibly replace adapter cards and HPI devices of different specifications as needed, enhancing the flexibility of server hardware configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0015] Figure 1 A schematic diagram of the structure of a high-speed peripheral component interconnect bandwidth allocation system provided in one embodiment of the present application;

[0016] Figure 2 A schematic structural diagram of a high-speed peripheral component interconnect bandwidth allocation system provided in yet another embodiment of the present application;

[0017] Figure 3 A flowchart of a high-speed peripheral component interconnect bandwidth allocation method provided in one embodiment of the present application;

[0018] Figure 4 A flowchart of a high-speed peripheral component interconnect bandwidth allocation method provided in yet another embodiment of the present application;

[0019] Figure 5 A flowchart of a high-speed peripheral component interconnect bandwidth allocation method provided in yet another embodiment of the present application;

[0020] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0022] It should be noted that the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they can refer to fixed, removable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this application based on the specific circumstances.

[0023] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0024] Specifically, in server hardware architecture, PCIe, a high-speed serial computer expansion bus standard, is widely used to connect processors with various peripheral devices, such as graphics cards, network cards, and storage controllers. The way PCIe bandwidth is allocated directly affects the performance of peripheral devices and is a key step in server hardware configuration.

[0025] In the related art, the PCIe bandwidth allocation method has the problem of poor versatility. When users need to insert adapter cards of different specifications to expand PCIe devices, due to the differences in the number of PCIe channels and signal transmission requirements corresponding to different adapter cards, targeted changes must be made to the server motherboard. Specifically, it is optional to redesign the signal detection circuit to adapt to the new adapter card signal characteristics, adjust the impedance matching elements to ensure the stability of signal transmission, and modify the firmware configuration parameters to achieve correct bandwidth allocation. Therefore, the existing PCIe bandwidth allocation method not only increases the production cost of the server and extends the product R&D cycle, but also limits the flexibility of the server hardware configuration and cannot meet the diverse and dynamic device expansion needs of users.

[0026] To address the issue of poor universality in PCIe bandwidth allocation and the need for targeted modifications to server motherboards, the authors first considered that the differences in channel numbers and signal requirements of different riser cards can be reflected through electrical signal characteristics, so impedance can be used as the identification basis. Secondly, an impedance circuit containing terminal resistors and analog switches is integrated on the riser card. The channel impedance value is changed by switching the switch state, allowing different specifications of riser cards to present different impedance characteristics. Finally, the BIOS (Basic Input Output System) detects the impedance value of each channel during power-on self-test and automatically determines the bandwidth of the corresponding PCIe expansion slot based on a preset impedance-bandwidth mapping relationship. This eliminates the need to modify the motherboard hardware and firmware configuration, achieving adaptive bandwidth allocation for different riser cards, thus solving the problems of high cost, long cycle time, and lack of flexibility.

[0027] Figure 1 This is a structural diagram of a high-speed peripheral component interconnect bandwidth allocation system provided in an embodiment of the present application, with reference to Figure 1 As shown in , an embodiment of the present application provides a high-speed peripheral component interconnect bandwidth allocation system 100 , including: a riser card 101 , an impedance circuit, and a basic input and output system 106 .

[0028] Specifically, the adapter card 101 is plugged into the high-speed peripheral component interconnect slot of the mainboard, and at least one high-speed peripheral component interconnect expansion slot 102 is provided on the adapter card 101. The high-speed peripheral component interconnect expansion slot 102 is used to plug in a high-speed peripheral component interconnect device. The high-speed peripheral component interconnect expansion slot 102 is communicatively connected to the processor port through multiple channels.

[0029] Specifically, at least one impedance circuit is provided, and the impedance circuit is integrated on the adapter card 101 and corresponds to the high-speed peripheral component interconnect expansion slot 102. The impedance circuit includes a terminal resistor 105 and an analog switch element 104. The terminal resistor 105 is connected in series with the analog switch element 104. When the state of the analog switch element 104 is switched, the terminal resistor 105 is connected to or removed from one of the channels of the high-speed peripheral component interconnect expansion slot 102.

[0030] Specifically, the basic input and output system 106 is used to obtain the impedance value of each channel of each high-speed peripheral component interconnect expansion slot 102 during the power-on self-test phase, and determine the bandwidth of each high-speed peripheral component interconnect expansion slot 102 based on the impedance value of each channel and a preset impedance bandwidth mapping table.

[0031] It should be noted that, for ease of understanding, in this application, the motherboard high-speed peripheral component interconnect slot can also be called the motherboard PCIe slot; the high-speed peripheral component interconnect expansion slot 102 can also be called the PCIe expansion slot, the high-speed peripheral component interconnect device can also be called the PCIe device, and the processor port can also be called the CPU port (Central Processing Unit).

[0032] The adapter card 101 serves as a core connection component, one end of which plugs into the motherboard's PCIe slot to achieve physical and electrical connection with the motherboard. The adapter card 101 is provided with at least one PCIe expansion slot for connecting various PCIe devices, such as graphics cards and solid-state drives. Optionally, the specifications of the PCIe expansion slot can be selected according to actual needs, such as PCIe x1, PCIe x4, PCIe x8, or PCIe x16. The PCIe expansion slot establishes a communication connection with the processor port via multiple channels. These multiple channels are the physical carriers for data transmission, ensuring high-speed data exchange between PCIe devices and the processor 103.

[0033] It should be noted that riser card 101 serves as an intermediate connection between the motherboard and PCIe devices, expanding the number of PCIe interfaces. Riser card 101 converts and distributes PCIe signals from the motherboard, enabling multiple PCIe devices to be connected to the computer system simultaneously. Riser card 101 communicates with processor 103 through its internal circuit design.

[0034] The impedance circuit is integrated on the adapter card 101 and corresponds one-to-one with the PCIe expansion slot, that is, each PCIe expansion slot is configured with a corresponding impedance circuit.

[0035] Furthermore, the impedance circuit includes a terminal resistor 105 and an analog switch element 104 , wherein the terminal resistor 105 and the analog switch element 104 are connected in series.

[0036] Analog switch element 104 has a state switching function. When analog switch element 104 switches state, terminal resistor 105 is connected to or removed from one of the channels in the PCIe expansion slot. When analog switch element 104 is in the closed state, terminal resistor 105 is connected to the channel, changing the channel's impedance characteristics. When analog switch element 104 is in the open state, terminal resistor 105 is removed from the channel, restoring the channel's original impedance state. Thus, by controlling the state of analog switch element 104, the impedance value of each channel in the PCIe expansion slot can be dynamically adjusted.

[0037] Among them, the basic input and output system 106 is the control core of the high-speed peripheral component interconnect bandwidth allocation system. During the power-on self-test (POST) phase, the BIOS performs the following operations: the BIOS obtains the impedance value of each channel of each PCIe expansion slot. After obtaining the impedance value of each channel, the BIOS determines the bandwidth of each PCIe expansion slot based on a preset impedance-bandwidth mapping table.

[0038] Optionally, a pre-written power-on self-test phase code or algorithm is stored in the BIOS to implement a function of detecting the impedance value of the PCIe expansion slot channel.

[0039] Optionally, determining the impedance value of each channel of the PCIe expansion slot may be achieved by an impedance detection circuit on the mainboard or the adapter card 101 .

[0040] Among them, the impedance-bandwidth mapping table is pre-set according to the PCIe protocol specification and a large amount of experimental data, and records the bandwidth parameters corresponding to different impedance values.

[0041] Optionally, the working process of this embodiment is as follows: When the computer is turned on, the system enters the power-on self-test phase of the BIOS. At this time, the BIOS first performs impedance detection on each channel of each PCIe expansion slot through the impedance detection circuit to obtain a real-time impedance value. Since the state of the analog switch element 104 in the impedance circuit directly affects the channel impedance, the detected impedance value can reflect the current electrical characteristics of the channel. Subsequently, the BIOS matches the detected impedance value with a preset impedance bandwidth mapping table. Based on the matching result, the BIOS determines the bandwidth of each PCIe expansion slot and sends the bandwidth configuration information to the processor 103. The processor 103 controls the data transmission of the PCIe channel according to the determined bandwidth parameters, thereby realizing dynamic allocation of bandwidth.

[0042] The embodiment of the present application provides a high-speed peripheral component interconnect (HPI) bandwidth allocation system, comprising: an adapter card 101, an impedance circuit, and a basic input / output (BIOS) system 106. The impedance circuit is integrated into the adapter card 101. When adapter cards 101 of different specifications are inserted, different impedance signal outputs are achieved by changing the state of the impedance circuit on the adapter card 101. During the power-on self-test (POST) phase, the BIOS 106 can determine the bandwidth of each HPI channel based on the impedance value and a preset impedance-bandwidth mapping table. Consequently, when replacing the adapter card 101, there is no need to redesign the motherboard circuit or adjust the impedance matching components, reducing the cost of modifying the motherboard, lowering the overall production cost of the server, and improving the versatility of the HPI bandwidth allocation. Furthermore, the BIOS 106 automatically obtains the impedance value and determines the bandwidth during the POST phase, eliminating the need to manually modify firmware configuration parameters. This allows users to flexibly replace adapter cards 101 and HPI devices of different specifications as needed, enhancing the flexibility of server hardware configuration.

[0043] Figure 2 A schematic diagram of a high-speed peripheral component interconnect bandwidth allocation system provided in another embodiment of the present application is shown in FIG. Figure 2 As shown in , as an optional implementation, based on any of the above embodiments, the enable terminal of the analog switch element 104 is connected to the pin presence detection terminal of the PCI Express expansion slot 102 .

[0044] When the high-speed peripheral component interconnection expansion slot 102 is not plugged into a high-speed peripheral component interconnection device, the pin presence detection terminal is at a high level, the enable terminal of the analog switch element 104 is powered on, and the terminal resistor 105 is connected to one of the channels of the high-speed peripheral component interconnection expansion slot 102; when the high-speed peripheral component interconnection expansion slot 102 is plugged into a high-speed peripheral component interconnection device, the pin presence detection terminal is at a low level, the enable terminal of the analog switch element 104 is powered off, and the terminal resistor 105 is moved out of one of the channels of the high-speed peripheral component interconnection expansion slot 102.

[0045] Specifically, PRSNT1# of the PCIe expansion slot is grounded, and PRSNT2# is pulled high by a pull-up resistor. After the PCIe device is inserted into the PCIe expansion slot, PRSNT2# is connected to PRSNT1#, so PRSNT2# is grounded and pulled low. The transition of PRSNT2# from high to low indicates that a PCIe device has been inserted.

[0046] Specifically, when no high-speed peripheral component interconnect (PCI) device is plugged into PCI Express expansion slot 102, the pin presence detection pin remains high because it is not pulled low by the device. This high-level signal is transmitted to the enable pin of analog switch element 104, turning it on. The terminal resistor 105 is connected to the signal link of the corresponding channel through the conductive path.

[0047] Specifically, when a PCI Express device is connected to PCI Express expansion slot 102, the presence detection pin on the PCI Express device's gold finger pulls the pin presence detection terminal down to a low level. This low-level signal is transmitted to the enable terminal of analog switch element 104, which then powers off and disconnects the analog switch element 104. This physically isolates the terminal resistor 105 from the channel link, restoring the channel to its original impedance state.

[0048] like Figure 2 As shown in , in this embodiment, the enable terminal a of the analog switch element 104 is directly electrically connected to the pin presence detection terminal (PRSNT2#) of the PCI Express expansion slot 102. Optionally, when a high level is input to the enable terminal a, pins a and b are connected, and the internal path of the analog switch element 104 is conductive, thereby connecting the terminal resistor 105 to the differential line pair of the channel. When a low level is input, pins a and b are disconnected, and the internal path of the analog switch element 104 is disconnected. Consequently, the terminal resistor 105 is no longer connected to the differential line of the channel.

[0049] It should be noted that Figure 2 The triangle in the analog switch element 104 represents a diode. In addition, the analog switch element 104 also includes a capacitor and other pins, which are not shown in this embodiment.

[0050] It should be noted that the analog switch element 104 is not limited to the following Figure 2 The structure shown in FIG can be used to select other structural elements according to actual needs.

[0051] In the embodiment of the present application, the pin presence detection terminal cooperates with the analog switch element 104 to achieve automatic adjustment of impedance according to the insertion status of the PCIe device, further enhancing the flexibility of bandwidth allocation.

[0052] As an optional implementation manner, based on any of the above embodiments, the method further includes:

[0053] The high-speed peripheral component interconnect controller and the high-speed peripheral component interconnect physical layer, the high-speed peripheral component interconnect controller is used to send a fixed-frequency reference signal to each channel; the high-speed peripheral component interconnect physical layer is used to receive the reflected signal; the high-speed peripheral component interconnect controller is also used to determine the impedance value to each channel based on the reflected signal.

[0054] It should be noted that, for ease of understanding, in this application, the Peripheral Component Interconnect Express controller may also be referred to as a PCIe controller, and the Peripheral Component Interconnect Express physical layer may also be referred to as a PCIe PHY.

[0055] The PCIe controller, located within the CPU, sends a fixed-frequency reference signal to each channel. During data transmission, this reference signal propagates along the channel and generates reflections when it encounters impedance variations within the channel. The PCIe controller also receives and processes the impedance values ​​calculated based on these reflections to accurately determine bandwidth allocation.

[0056] The PCIe PHY connects to the PCIe controller and channels, providing signal reception and processing capabilities. The PCIe PHY is used to receive reflected signals. When a reference signal sent by the PCIe controller propagates through the channel and reflects, the reflected signal returns and is captured by the PCIe PHY. The PCIe PHY performs preliminary processing on the received reflected signal and then transmits it to the PCIe controller for further analysis.

[0057] After receiving the reflected signal transmitted by the PCIe PHY, the PCIe controller uses a preset algorithm to analyze it. Because the characteristics of the reflected signal (such as amplitude and phase) are closely related to the channel impedance, the PCIe controller can accurately calculate the impedance value of each channel by measuring the relevant parameters of the reflected signal and combining them with the known characteristics of the reference signal.

[0058] Figure 3 A flow chart of a high-speed peripheral component interconnect bandwidth allocation method provided in an embodiment of the present application is provided. Figure 3 As shown in , an embodiment of the present application further provides a method for allocating bandwidth of a high-speed peripheral component interconnect (PCI) and a basic input and output system (BIOS) as an execution subject. The method for allocating bandwidth of a high-speed PCI includes the following steps:

[0059] S201. During a power-on self-test phase, obtain the impedance value of each channel of each high-speed peripheral component interconnect expansion slot.

[0060] Specifically, during the server startup process, when entering the BIOS power-on self-test (POST) phase, the BIOS starts the detection program. For each channel of each expansion slot, the BIOS sends a specific detection signal and measures the transmission characteristics of the signal in the channel, thereby obtaining the impedance value of each channel, providing an accurate basis for subsequent bandwidth allocation.

[0061] S202 : Determine the bandwidth of each high-speed peripheral component interconnect expansion slot based on the impedance value of each channel and a preset impedance-bandwidth mapping table.

[0062] Optionally, after obtaining the impedance values ​​for each channel, the BIOS calls a preset impedance-bandwidth mapping table. This table is pre-established based on PCIe specifications and actual application requirements, storing mappings between different impedance combinations and corresponding bandwidths (number of channels). For example, if the first channel of a PCIe expansion slot detects a 40Ω impedance value, the preset impedance-bandwidth mapping table will correspond to a x16 bandwidth; if the first channel detects a 30Ω impedance value, it will correspond to a x8 bandwidth. The specific mapping relationship can be flexibly configured based on the actual scenario.

[0063] Optionally, the BIOS compares the impedance values ​​of each channel obtained with a preset impedance bandwidth mapping table one by one. During the comparison process, the impedance value distribution of each channel of the same PCIe expansion slot is analyzed to determine the overall impedance characteristic combination of the PCIe expansion slot.

[0064] Optionally, after completing the matching, the BIOS determines the target bandwidth for each PCIe expansion slot and generates corresponding bandwidth allocation instructions. The BIOS can then interact with the PCIe controller to send the bandwidth allocation instructions to the PCIe controller. The PCIe controller configures the relevant registers of the PCIe link according to the instructions, completing the actual bandwidth allocation settings. This allows the CPU and other PCIe devices to recognize and transmit data according to the determined bandwidth.

[0065] The HSI bandwidth allocation method provided in the embodiments of this application obtains the impedance value of each channel of each HSI expansion slot during the power-on self-test phase. Based on the impedance value of each channel and a preset impedance-bandwidth mapping table, the bandwidth of each HSI expansion slot is determined. This achieves a fully automated process from impedance detection to bandwidth determination, enabling precise bandwidth allocation without manual intervention.

[0066] As an optional implementation, based on any of the above embodiments, obtaining the impedance value of each channel of each PCI Express expansion slot specifically includes the following steps:

[0067] An impedance measurement instruction is sent to the high-speed peripheral component interconnect controller and the high-speed peripheral component interconnect physical layer. After receiving the impedance measurement instruction, the high-speed peripheral component interconnect controller sends a reference signal of a fixed frequency to each channel of each high-speed peripheral component interconnect expansion slot; after receiving the impedance measurement instruction, the high-speed peripheral component interconnect physical layer collects the incident wave amplitude and the reflected wave amplitude of each channel; and obtains the impedance value of each channel determined by the high-speed peripheral component interconnect controller based on the incident wave amplitude, the reflected wave amplitude and the standard impedance of the transmission line.

[0068] Optionally, during the power-on self-test (POST) phase, when the BIOS enters the PCIe bandwidth allocation process, it first sends an impedance measurement command to the PCIe controller and PCIe PHY. This impedance measurement command can be encapsulated using a standardized internal bus protocol and include parameters such as the PCIe slot identifier and channel range to be tested. This impedance measurement command can be transmitted simultaneously to the PCIe controller and PCIe PHY via the motherboard's internal control bus, ensuring that both initiate measurement preparations simultaneously.

[0069] Optionally, upon receiving the impedance measurement command, the PCIe controller activates its internal signal generation module. This module generates a fixed-frequency reference signal that strictly adheres to the link training frequency defined in the PCIe specification (typically a sine wave between 1 GHz and 10 GHz). This reference signal is processed by the controller's internal signal conditioning circuitry and then transmitted via a high-speed signal link to the corresponding channels in each PCIe expansion slot.

[0070] Optionally, after receiving the impedance measurement command, the PCIe PHY uses its built-in directional coupler to extract the incident and reflected wave signals in the channel. The incident wave signal is the original signal of the reference signal sent by the PCIe controller after it has traveled through the channel. The reflected wave signal is the reflection of the reference signal after it encounters an impedance discontinuity in the channel (such as the insertion / removal of a terminal resistor or a device interface). The directional coupler detects the amplitude of the incident and reflected wave signals in real time, converts the detection results into digitized amplitude values, and stores them in the PCIe PHY's temporary buffer.

[0071] Optionally, the PCIe controller also establishes data exchange with the PCIe PHY via an internal synchronization interface. The PCIe PHY transmits the collected incident wave amplitude and reflected wave amplitude to the PCIe controller via a high-speed data bus. After receiving the data, the PCIe controller uses a built-in impedance calculation formula for processing.

[0072] Optionally, the impedance value is calculated as:

[0073]

[0074] Among them, Z LOAD is the actual impedance value of the channel; Z0 is the standard impedance of the transmission line (defined as 50Ω in the PCIe specification); ρ is the reflection coefficient, ρ = reflected wave amplitude / incident wave amplitude.

[0075] Optionally, after completing the impedance calculation, the PCIe controller organizes the impedance values ​​of each channel according to the channel number and PCIe expansion slot identifier to form a structured impedance measurement report and stores it in a result register. The BIOS queries the result register to obtain the measurement report, thereby obtaining the impedance value of each channel in each PCIe expansion slot.

[0076] The high-speed peripheral component interconnect bandwidth allocation method provided in the embodiment of the present application can effectively eliminate the influence of environmental noise and signal attenuation on the measurement results through an impedance measurement method based on the reference signal reflection principle, significantly improve the measurement accuracy of the impedance value, and provide a more reliable data basis for subsequent bandwidth allocation.

[0077] As an optional implementation, based on any of the above embodiments, determining the bandwidth of each high-speed peripheral component interconnect expansion slot based on the impedance value of each channel and a preset impedance-bandwidth mapping table specifically includes the following steps:

[0078] First, a target impedance value of a first channel of each high-speed peripheral component interconnect expansion slot is extracted from the impedance values ​​of each channel.

[0079] Optionally, after obtaining the impedance values ​​of each channel of each PCIe expansion slot, data filtering and extraction operations are first performed. The first channel of each PCIe expansion slot is predefined as an impedance identification channel; for example, for a PCIe expansion slot containing multiple channels, the channel numbered 1 is set as the first channel.

[0080] Optionally, the impedance value of the first channel of each PCIe expansion slot is extracted from the stored impedance measurement report and determined as the target impedance value. Based on the representativeness of the first channel in the impedance circuit layout, the impedance state of the first channel can comprehensively reflect the bandwidth requirement of the corresponding PCIe expansion slot.

[0081] Secondly, each target impedance value is matched in a preset impedance bandwidth mapping table; wherein the preset impedance bandwidth mapping table includes a mapping relationship between impedance value range and bandwidth.

[0082] Optionally, the BIOS calls a preset impedance-bandwidth mapping table. This preset impedance-bandwidth mapping table can be stored in a two-dimensional data structure, where the horizontal dimension represents the impedance value range (in Ω) and the vertical dimension represents the corresponding PCIe bandwidth level, such as x1, x2, x4, x8, and x16. The impedance value range is set based on the terminal resistor specifications, device impedance characteristics, and actual application scenarios. A certain amount of redundancy is reserved for the boundary values ​​of each range to account for measurement errors.

[0083] Optionally, the BIOS compares and matches each extracted target impedance value against the impedance value ranges in a preset impedance bandwidth mapping table. Furthermore, a range matching algorithm is employed during matching to determine whether the target impedance value falls within a preset impedance range. For example, if the target impedance value of the first channel of an expansion slot is 50Ω, which falls within the range of 45Ω-55Ω, and this range corresponds to a x16 bandwidth in the mapping table, the matching bandwidth of the expansion slot is preliminarily determined to be x16.

[0084] Finally, the bandwidth of each high-speed peripheral component interconnect expansion slot is determined according to the matching results of each target impedance value.

[0085] Optionally, according to the matching result of the target impedance value, the BIOS directly determines the bandwidth of the corresponding interval in the preset impedance-bandwidth mapping table as the allocated bandwidth of the PCIe expansion slot.

[0086] Specifically, if any target impedance value is not successfully matched in the preset impedance bandwidth mapping table, the bandwidth of the high-speed peripheral component interconnect expansion slot corresponding to the target impedance value is set to the preset bandwidth.

[0087] Optionally, if during the matching process, any target impedance value does not fall within any impedance value range interval in the preset impedance bandwidth mapping table, an exception handling solution is triggered.

[0088] Among them, the failure of matching may include impedance abnormality caused by channel failure, access of unknown type of device, or large measurement error, etc. In this case, the BIOS automatically sets the bandwidth of the PCIe expansion slot corresponding to the target impedance value to the preset bandwidth.

[0089] Optionally, the preset bandwidth is a bandwidth value pre-configured according to system requirements, usually set to x1, to ensure that the PCIe expansion slot can still maintain basic communication functions under abnormal conditions, avoiding system instability caused by bandwidth allocation errors.

[0090] Figure 4 A flowchart of a high-speed peripheral component interconnect bandwidth allocation method provided in another embodiment of the present application is shown as follows: Figure 4 As shown in , as an optional implementation manner, based on any of the above embodiments, the following steps are further included:

[0091] S301 , during a power-on self-test phase, obtaining a first-time power-on flag value written into a non-volatile memory.

[0092] Specifically, during the power-on self-test (POST) phase, after the BIOS completes initialization, it first accesses the non-volatile memory (such as EEPROM or Flash) on the server motherboard. This non-volatile memory has a pre-allocated storage area for storing system configuration parameters, including a 1-byte first-boot flag. The BIOS reads the current value of this first-boot flag through the non-volatile memory's read / write interface. The initial default value of the first-boot flag is set to a first value (e.g., 0x01), indicating that the system has not yet completed the first-boot configuration. After the system completes the first boot and stores the bandwidth results, the first-boot flag is updated to a second value (e.g., 0x00).

[0093] S302: When the first power-on flag value is the first value, execute a bandwidth determination step, and store the bandwidth determination results of each PCI Express expansion slot in a non-volatile memory.

[0094] S303: Replace the first power-on flag value with the second value.

[0095] Optionally, if the first-time boot flag value read by the BIOS is a first value, the system is determined to be in an initial state after first boot or factory reset. At this point, the BIOS performs the complete bandwidth determination process according to the steps in the above embodiment: obtaining the impedance value of each channel from the PCIe controller, extracting the target impedance value and matching it with the preset impedance-bandwidth mapping table, and ultimately determining the bandwidth of each PCIe expansion slot.

[0096] Optionally, after determining the bandwidth of each PCIe expansion slot, the BIOS writes the bandwidth results for each PCIe expansion slot to the bandwidth configuration partition of non-volatile memory. Optionally, the bandwidth configuration partition may employ a checksum mechanism to ensure data storage integrity and prevent bandwidth data corruption due to failures. After storing the bandwidth results, the BIOS updates the first boot flag value in non-volatile memory from the first value (0x01) to the second value (0x00).

[0097] Optionally, the bandwidth result is written into the bandwidth configuration partition of the non-volatile memory in the form of a key-value pair of a PCIe expansion slot number and a corresponding bandwidth level.

[0098] like Figure 4 As shown in , as an optional implementation manner, based on any of the above embodiments, the following steps are further included:

[0099] S304: When the first power-on flag value is the second value, obtain the bandwidth results of each peripheral component interconnect high-speed expansion slot stored in the non-volatile memory.

[0100] Optionally, when the BIOS reads the first boot flag value as the second value (0x00), it indicates that the system has completed the first bandwidth configuration. At this time, the BIOS accesses the bandwidth configuration partition through the read / write interface of the non-volatile memory and reads the pre-stored bandwidth results of each PCIe expansion slot.

[0101] Optionally, during the read process, a data verification mechanism is enabled to verify the integrity of the read bandwidth data. If the verification passes, the BIOS converts the bandwidth result from the storage format into recognizable structured data, which may include a mapping between the unique identifier of the PCIe expansion slot and the corresponding bandwidth level.

[0102] For example, the read bandwidth result data after parsing is: "PCIe slot 01: x4, PCIe slot 02: x8, PCIe slot 03: x4." This bandwidth result data reflects the bandwidth requirements of each PCIe expansion slot. Optionally, the BIOS temporarily stores the parsed structured data in a memory buffer.

[0103] S305: Based on the bandwidth results of each high-speed peripheral component interconnect expansion slot, configure a channel division mode corresponding to the processor port.

[0104] Optionally, the BIOS generates corresponding processor port channel division instructions based on the parsed bandwidth results of each PCIe expansion slot. Processor ports typically support flexible channel division, allocating the total number of channels to different physical ports based on the bandwidth requirements of peripheral devices. For example, a processor's integrated PCIe controller supports 48 lanes (PCIe 4.0), which can be divided into various modes such as "x16+x8+x4+x16" or "x8×6" through configuration registers.

[0105] Optionally, the BIOS sends the channel division instruction to the PCIe configuration register group of the processor via the internal bus. Optionally, the channel division instruction may include parameters such as the target port identifier, the required number of channels, and the channel mapping relationship.

[0106] Optionally, during the configuration process, the BIOS monitors the configuration status signals returned by the processor in real time to ensure that the channel division parameters of each processor port are correctly written. If the configuration of a processor port fails, the BIOS triggers the error handling mechanism, records the error log, and prompts the user to perform a hardware check through the motherboard indicator light.

[0107] Optionally, after the configuration is completed, the processor initializes each port link according to the divided channel mode and establishes a communication link with the PCIe expansion slot.

[0108] The high-speed peripheral component interconnect bandwidth allocation method provided in the embodiments of this application divides processor port channels according to actual bandwidth requirements, avoiding waste of channel resources and ensuring that each PCIe expansion slot receives the appropriate channel bandwidth. Furthermore, no manual intervention is required from reading bandwidth results to configuring channel modes, reducing human error and improving server system deployment efficiency.

[0109] As an optional implementation manner, based on any of the above embodiments, before obtaining the impedance value of each channel of each PCI Express expansion slot, the following steps are further included:

[0110] The plug-in status of each high-speed peripheral component interconnect expansion slot is obtained; when a high-speed peripheral component interconnect device is plugged into any high-speed peripheral component interconnect expansion slot, a self-test prompt signal is sent.

[0111] Optionally, during the power-on self-test (POST) phase, before the BIOS enters the PCIe bandwidth allocation process, it first performs a PCIe expansion slot insertion status check. Each PCIe expansion slot is equipped with an independent presence detection circuit, which is connected to the PCIe expansion slot's standard presence detection pin (PRSNT#). The presence detection circuit converts the pin's electrical state into a digital signal, which is transmitted to the BIOS input interface via the motherboard's internal status bus. The BIOS reads the output signal of each PCIe expansion slot's presence detection circuit through polling or interrupts. When a PCIe device is not plugged into the PCIe expansion slot, the PRSNT# pin is high, and the presence detection circuit outputs an unplugged status signal. When a PCIe device is plugged into the PCIe expansion slot, the PCIe device's gold finger pulls the PRSNT# pin low, and the presence detection circuit outputs a plugged status signal.

[0112] Optionally, the BIOS records the status signals of the PCIe expansion slots according to the slot numbers to form a plug-in status table, for example, “PCIe slot 01: plugged in, PCIe slot 02: not plugged in, PCIe slot 03: plugged in”.

[0113] Optionally, the BIOS traverses and analyzes the generated plug-in status table, and if it is detected that the status of any PCIe expansion slot is plugged in, a self-test prompt signal generation process is immediately triggered.

[0114] Optionally, the self-test prompt signal can be prompted by a hardware indicator light. The BIOS sends a command to the panel indicator light controller through the motherboard control bus to light up the status indicator light of the corresponding PCIe expansion slot, intuitively prompting the user that a PCIe device is currently connected.

[0115] Optionally, a self-test prompt can be displayed on the screen. If the server is equipped with a display output interface, the BIOS will display text prompt information in the PCIe configuration area of ​​the power-on self-test screen, for example, "PCIe device access detected: slot 01, slot 03, bandwidth detection in progress."

[0116] As an optional implementation manner, based on any of the above embodiments, the following steps are further included:

[0117] The required number of channels is determined based on the bandwidth results of each high-speed peripheral component interconnect expansion slot, and channels are allocated to each high-speed peripheral component interconnect expansion slot in the order of the physical position of the slot; after the channel allocation of any high-speed peripheral component interconnect expansion slot is completed, the corresponding slot code is generated.

[0118] Optionally, after obtaining the bandwidth results for each PCIe expansion slot, the BIOS first determines the number of channels required for each PCIe expansion slot based on the correspondence between bandwidth levels and channel numbers. The PCIe specification defines a standard correspondence between bandwidth levels and channel numbers, for example, x1 corresponds to 1 channel, x2 corresponds to 2 channels, x4 corresponds to 4 channels, x8 corresponds to 8 channels, and x16 corresponds to 16 channels. The BIOS converts the bandwidth results for each PCIe expansion slot into specific channel number requirements using a preset bandwidth-channel mapping table. The BIOS records these channel number requirements by slot number to form a channel requirement table, which provides a data basis for subsequent channel allocation.

[0119] Optionally, the BIOS allocates the required number of lanes to each PCIe expansion slot in order of physical location, from earliest to latest. The physical location order can be based on the layout of the PCIe expansion slots on the motherboard, from nearest to farthest or from left to right. For example, the PCIe expansion slot closest to the processor is defined as number 1, and the numbering is done outwards.

[0120] Optionally, channel allocation is based on the total channel resources of the processor port and adopts a continuous channel allocation principle, that is, each PCIe expansion slot occupies a continuous channel number interval.

[0121] Optionally, during lane allocation, the BIOS checks in real time whether the total lane resources meet the combined lane requirements of each PCIe expansion slot. If the total lane resources are insufficient, the BIOS prioritizes the lane requirements of the earlier slots based on their physical location, downgrading the bandwidth of subsequent slots and logging the downgrade information in the system log.

[0122] Optionally, after completing channel allocation for any PCIe expansion slot, the BIOS immediately generates a corresponding slot code for that PCIe expansion slot. Optionally, the slot code uses a structured string format that includes information such as the slot's physical location sequence, bandwidth level, and channel number range. For example, the slot code might be "SLT-01-X16-CH0-15," which indicates the slot at physical location 1, a bandwidth level of x16, and an allocated channel range of 0-15.

[0123] Optionally, after the slot code is generated, the BIOS stores it in the slot configuration partition of non-volatile memory and sends it to the processor (CPU) and baseboard management controller (BMC) via the internal bus. The processor completes the hardware configuration for the corresponding channel based on the channel range information in the slot code. The baseboard management controller uses the slot code for remote monitoring and fault diagnosis. Users can query the slot code information of each slot through management software to understand the channel allocation.

[0124] Optionally, if the server is subsequently restarted or reconfigured, the BIOS can quickly restore the channel allocation status after reading the slot code, without having to re-execute the entire allocation process, thereby improving the recovery efficiency of the server system.

[0125] Figure 5 A flowchart of a high-speed peripheral component interconnect bandwidth allocation method provided in another embodiment of the present application is shown as follows: Figure 5 As shown in , as an optional implementation, based on any of the above embodiments, after the channel allocation of any PCI Express expansion slot is completed, the following steps are further included:

[0126] S401. Determine whether the number of remaining available channels meets the number of channels required by the remaining PCI Express expansion slots; wherein the number of remaining available channels is the difference between the total number of channels of the processor port and the number of allocated channels.

[0127] Optionally, after completing channel allocation for any PCIe expansion slot, the BIOS initiates the remaining channel resource accounting process. First, the BIOS reads the total number of channels from the processor port's configuration register and adds the number of channels allocated for each PCIe expansion slot to calculate the total number of allocated channels. The remaining available channels are calculated using the formula: Remaining available channels = Total number of channels on the processor port - Allocated channels.

[0128] Optionally, the BIOS traverses the remaining PCIe expansion slots for which channel allocation has not yet been completed, and calculates the total number of channels required by the remaining PCIe expansion slots based on the channel requirements corresponding to the remaining PCIe bandwidth results. The BIOS compares the number of remaining available channels with the number of remaining required channels to determine whether channel resources are sufficient.

[0129] S402: When the number of remaining available channels meets the number of channels required by the remaining high-speed peripheral component interconnect expansion slots, allocate channels to the remaining high-speed peripheral component interconnect expansion slots.

[0130] S403: When the number of remaining available channels does not meet the number of channels required by the remaining PCI Express expansion slots, terminate the channel allocation of the remaining PCI Express expansion slots.

[0131] Optionally, if the number of remaining available channels is greater than or equal to the number of channels required by the remaining PCIe expansion slots, the BIOS determines that resources are sufficient and continues to allocate channels to the remaining PCIe expansion slots in sequence according to the physical location order in the above embodiment.

[0132] Optionally, if the number of remaining available channels is less than the number of remaining required channels, the BIOS determines that resources are insufficient and terminates the channel allocation process for the remaining PCIe expansion slots. The unallocated PCIe expansion slots will remain in the initial unconfigured state, and the unallocated PCIe expansion slots can be displayed as "unconfigured due to insufficient resources" in the server system.

[0133] S404: Generate a bandwidth resource shortage alarm signal; wherein the alarm signal includes the number of channels required by the remaining high-speed peripheral component interconnect expansion slots and the number of remaining available channels.

[0134] Specifically, when the resource shortage termination condition is triggered, the BIOS generates a bandwidth resource shortage alarm signal. Optionally, the alarm signal may be in a structured data format and may include identifiers of remaining unallocated PCIe expansion slots, the number of lanes required for each PCIe expansion slot, the number of currently available lanes remaining, the number of resource gaps, and a timestamp of the alarm occurrence.

[0135] As an optional implementation manner, based on any of the above embodiments, the method further includes:

[0136] After all channels in each high-speed peripheral component interconnect expansion slot are allocated, the number of remaining available channels is obtained.

[0137] Specifically, after all channel allocation work for all PCIe expansion slots is completed, the BIOS calculates and sorts the remaining channels.

[0138] Optionally, the BIOS reads the total number of channels from a configuration register of the processor, and then adds up the number of channels occupied by all allocated PCIe expansion slots to calculate the specific number of remaining available channels.

[0139] Bandwidth is allocated to the remaining channels based on the number of remaining available channels and the preset remaining channel allocation rules.

[0140] Specifically, the BIOS calls a preset remaining channel allocation rule to allocate bandwidth to the remaining channels. The preset remaining channel allocation rule is an allocation scheme pre-stored in the BIOS firmware program and formulated according to the application scenario of the server and the channel resource utilization strategy.

[0141] Specifically, the preset remaining channel allocation rules are as follows:

[0142] If the number of remaining available channels is greater than or equal to a first value, the first bandwidth is allocated to the remaining channels; if the number of remaining available channels is greater than or equal to a second value and less than the first value, the second bandwidth is allocated to the remaining channels; if the number of remaining available channels is greater than or equal to a third value and less than the second value, the third bandwidth is allocated to the remaining channels; if the number of remaining available channels is less than the third value, no bandwidth is allocated to the remaining channels; wherein the first bandwidth is greater than the second bandwidth, and the second bandwidth is greater than the third bandwidth.

[0143] Exemplarily, the first value is 16, and the first bandwidth is x16; the second value is 8, and the second bandwidth is x8; the third value is 4, and the third bandwidth is x4.

[0144] Optionally, the BIOS compares the obtained number of remaining available channels with a numerical threshold in a preset remaining channel allocation rule to determine a corresponding bandwidth level.

[0145] For example, if the number of remaining available channels is 12, which is greater than the second value (8) and less than the first value (16), the second bandwidth (x8 bandwidth) is allocated to the remaining channels according to the rule.

[0146] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 500 provided in an embodiment of the present application includes: a data storage 501 and a data processor 502.

[0147] The data memory 501 stores a computer program, and the data processor 502 is configured to run the computer program to execute the steps of any of the above-mentioned peripheral component interconnect high-speed bandwidth allocation method embodiments.

[0148] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned embodiments of the peripheral component interconnect high-speed bandwidth allocation method when running.

[0149] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0150] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a data processor, the steps of any of the above-mentioned peripheral component interconnect high-speed bandwidth allocation method embodiments are implemented.

[0151] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a data processor, the steps of any of the above-mentioned embodiments of the high-speed peripheral component interconnect bandwidth allocation method are implemented.

[0152] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0153] The above is a detailed introduction to the solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A high-speed peripheral component interconnect bandwidth allocation system, characterized in that: include: An adapter card, the adapter card being plugged into a high-speed peripheral component interconnect (PCI) slot on a mainboard, and the adapter card being provided with at least one high-speed PCI expansion slot, the high-speed PCI expansion slot being used to plug into a high-speed PCI device, the high-speed PCI expansion slot being communicatively connected to a processor port via multiple channels; at least one impedance circuit, the impedance circuit being integrated on the adapter card and corresponding to the high-speed peripheral component interconnect expansion slot, the impedance circuit comprising a terminal resistor and an analog switch element, the terminal resistor being connected in series with the analog switch element; the terminal resistor being connected to or removed from one of the channels of the high-speed peripheral component interconnect expansion slot when the analog switch element switches state; The basic input and output system is used to obtain the impedance value of each channel of each of the high-speed peripheral component interconnect expansion slots during the power-on self-test phase, and determine the bandwidth of each of the high-speed peripheral component interconnect expansion slots based on the impedance value of each channel and a preset impedance-bandwidth mapping table.

2. The system according to claim 1, wherein: The enable terminal of the analog switch element is connected to the pin presence detection terminal of the high-speed peripheral component interconnect expansion slot; When no high-speed peripheral component interconnect device is inserted into the high-speed peripheral component interconnect expansion slot, the pin presence detection terminal is at a high level, the enable terminal of the analog switch element is powered on, and the terminal resistor is connected to one of the channels of the high-speed peripheral component interconnect expansion slot; When a high-speed peripheral component interconnect device is inserted into the high-speed peripheral component interconnect expansion slot, the pin presence detection end is at a low level, the enable end of the analog switch element is powered off, and the terminal resistor is moved out of one of the channels of the high-speed peripheral component interconnect expansion slot.

3. The system according to claim 1, wherein: Also includes: A high-speed peripheral component interconnect controller and a high-speed peripheral component interconnect physical layer, wherein the high-speed peripheral component interconnect controller is used to send a fixed-frequency reference signal to each channel; and the high-speed peripheral component interconnect physical layer is used to receive the reflected signal; The PCI Express controller is further configured to determine an impedance value toward each channel based on the reflected signal.

4. A high-speed peripheral component interconnect bandwidth allocation method, characterized in that: include: During the power-on self-test phase, the impedance value of each channel of each high-speed peripheral component interconnect expansion slot is obtained; Based on the impedance value of each channel and a preset impedance-bandwidth mapping table, the bandwidth of each of the high-speed peripheral component interconnect expansion slots is determined.

5. The method according to claim 4, characterized in that The obtaining of the impedance value of each channel of each high-speed peripheral component interconnect expansion slot includes: sending an impedance measurement instruction to the High-Speed ​​Peripheral Component Interconnect (HPI) controller and the High-Speed ​​Peripheral Component Interconnect (HPI) physical layer; after receiving the impedance measurement instruction, the High-Speed ​​Peripheral Component Interconnect (HPI) controller sends a fixed-frequency reference signal to each channel of each HPI expansion slot; after receiving the impedance measurement instruction, the High-Speed ​​Peripheral Component Interconnect (HPI) physical layer collects the incident wave amplitude and the reflected wave amplitude of each channel; The impedance value of each channel determined by the PCI Express controller based on the incident wave amplitude, the reflected wave amplitude, and the standard impedance of the transmission line is obtained.

6. The method according to claim 4, characterized in that Determining the bandwidth of each of the high-speed peripheral component interconnect expansion slots based on the impedance value of each channel and a preset impedance-bandwidth mapping table includes: Extracting a target impedance value of a first channel of each of the high-speed peripheral component interconnect expansion slots from the impedance values ​​of each channel; Matching each of the target impedance values ​​in the preset impedance bandwidth mapping table; wherein the preset impedance bandwidth mapping table includes a mapping relationship between impedance value range and bandwidth; determining the bandwidth of each of the high-speed peripheral component interconnect expansion slots according to the matching results of each of the target impedance values; If any of the target impedance values ​​is not successfully matched in the preset impedance bandwidth mapping table, the bandwidth of the PCI Express expansion slot corresponding to the target impedance value is set to a preset bandwidth.

7. The method according to claim 4, characterized in that Also includes: During the power-on self-test phase, the first power-on flag value written into the non-volatile memory is obtained; When the first power-on flag bit value is the first value, performing a bandwidth determination step, and storing the determined bandwidth of each of the PCI Express expansion slots in the write non-volatile memory; The first power-on flag value is replaced with a second value.

8. The method according to claim 7, characterized in that Also includes: When the first power-on flag bit value is the second value, obtaining the bandwidth results of each of the PCI Express expansion slots stored in the non-volatile memory; Based on the bandwidth results of each of the high-speed peripheral component interconnect expansion slots, a channel division mode of the corresponding processor port is configured.

9. The method according to claim 4, characterized in that Before obtaining the impedance value of each channel of each high-speed peripheral component interconnect expansion slot, the following is also included: Obtaining the plugging status of each of the high-speed peripheral component interconnect expansion slots; When a high-speed peripheral component interconnect device is plugged into any of the high-speed peripheral component interconnect expansion slots, a self-test prompt signal is sent.

10. The method according to any one of claims 4 to 9, characterized in that: Also includes: Determining the required number of channels based on the bandwidth results of each of the high-speed peripheral component interconnect expansion slots, and allocating channels to each of the high-speed peripheral component interconnect expansion slots in order of the physical positions of the slots; After the channel allocation of any of the above-mentioned PCI Express expansion slots is completed, a corresponding slot code is generated.

11. The method according to claim 10, characterized in that After the channel allocation of any of the above-mentioned peripheral component interconnect high-speed expansion slots is completed, the method further includes: Determining whether the number of remaining available channels meets the number of channels required by the remaining peripheral component interconnect express expansion slots; wherein the number of remaining available channels is the difference between the total number of channels of the processor port and the number of allocated channels; When the number of remaining available channels meets the number of channels required by the remaining peripheral component interconnect high-speed expansion slots, allocating channels to the remaining peripheral component interconnect high-speed expansion slots; When the number of remaining available channels does not meet the number of channels required by the remaining PCI Express expansion slots, terminating the channel allocation of the remaining PCI Express expansion slots; Generate a bandwidth resource shortage alarm signal; wherein, the alarm signal includes the number of channels required by the remaining peripheral component interconnect high-speed expansion slot and the number of remaining available channels.

12. The method according to claim 10, characterized in that Also includes: After all channels of the high-speed peripheral component interconnect expansion slots are allocated, obtaining the number of remaining available channels; Allocating bandwidth to the remaining channels according to the number of remaining available channels and a preset remaining channel allocation rule; The preset remaining channel allocation rules include: If the number of remaining available channels is greater than or equal to a first value, allocating a first bandwidth to the remaining channels; If the number of remaining available channels is greater than or equal to a second value and less than the first value, allocating a second bandwidth to the remaining channels; If the number of remaining available channels is greater than or equal to a third value and less than the second value, allocating a third bandwidth to the remaining channels; If the number of remaining available channels is less than a third value, no bandwidth is allocated to the remaining channels; wherein the first bandwidth is greater than the second bandwidth, and the second bandwidth is greater than the third bandwidth.

13. An electronic device, characterized in that: include: Data storage for storing computer programs; A data processor is configured to implement the steps of the PCI Express bandwidth allocation method according to any one of claims 4 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a data processor, the steps of the peripheral component interconnect express bandwidth allocation method according to any one of claims 4 to 12 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a data processor, the steps of the PCI Express bandwidth allocation method according to any one of claims 4 to 12 are implemented.

Citation Information

Patent Citations

  • Automatic PCIe bandwidth allocation system and method

    CN112398684A

  • Method and system for distributing PCIE channel bandwidth and medium

    CN113220619A

  • Server bandwidth self-adaption device and method

    CN113867811A

  • Impedance matching circuit based on coupled transmission line and application

    CN117559936A

  • Port bandwidth allocation circuit and method of PCIe equipment

    CN120045504A

Cited By

  • Impedance detection circuit and link contact state detection method

    CN120948886A