Bandwidth allocation method, device and equipment and readable storage medium
By detecting the capacitance difference between adjacent golden finger jacks in the slot, the expansion card model is identified and the bandwidth is allocated, which solves the problems of resource waste and function loss in the existing technology, and realizes bandwidth allocation and resource allocation for multiple expansion cards. save.
Patent Information
- Application Number
- CN202410853849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-03
AI Technical Summary
The existing bandwidth allocation solution cannot effectively identify and allocate different types of PCIe expansion cards, resulting in a waste of resources and loss of functionality, and cannot achieve bandwidth allocation to multiple expansion cards.
By detecting the parasitic capacitance value between adjacent golden finger jacks in the slot, calculating the capacitance difference, identifying the inserted expansion card model, and allocating bandwidth according to the corresponding relationship between the model and bandwidth, the bandwidth allocation to multiple expansion cards is realized. .
It realizes automatic identification and bandwidth allocation of expansion cards, which can effectively save PCIe resources. It supports the insertion of two or more expansion cards into one card slot, improving resource utilization.
Smart Images

Figure CN118585477A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a bandwidth allocation method, device, equipment and readable storage medium. Background Art
[0002] In the server field, with the rapid development of hardware technology, the data transmission speed and bandwidth requirements between CPU and PCIe (Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard) devices continue to rise.
[0003] The PICe interface on the server motherboard generally uses PCIe x8 slots and PCIe x16 slots, which is convenient for plugging in different types of expansion cards in the future. Even if the gold finger on the expansion card is x2 or x4, it can also be plugged into the PCIe x8 slot or PCIex16 slot. However, the bandwidth directly provided by the CPU to the PCIe x8 slot and PCIe x16 slot is the maximum bandwidth, which causes the expansion card with a small number of lanes to be inserted. However, for expansion cards of different models, the CPU also allocates the maximum bandwidth, resulting in a waste of PCIe resources and a loss of CPU function. For example, two PCIE x8 devices are plugged into two PCIEx16 slots, but it is impossible to support two PCIE x8 devices in one X16 slot. That is, the existing bandwidth allocation scheme cannot automatically allocate appropriate bandwidth for PCIe expansion cards of different models, nor can it provide bandwidth allocation for multiple expansion cards in one slot.
[0004] In summary, how to effectively solve the problem of bandwidth allocation of expansion cards is a technical problem that those skilled in the art urgently need to solve. Summary of the invention
[0005] The purpose of the present application is to provide a bandwidth allocation method, device, equipment and readable storage medium, which can automatically identify the type of expansion card and complete bandwidth allocation on demand, especially can insert two or more expansion cards into a card slot for bandwidth allocation, which can effectively save PCIe resources.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] A bandwidth allocation method, comprising:
[0008] When an expansion card is inserted, obtain the card capacitance value between adjacent gold finger sockets in the slot;
[0009] Subtract the card-inserted capacitance value from the card-free capacitance value between adjacent gold finger jacks to obtain a capacitance difference value; wherein the card-free capacitance value is the capacitance value between the adjacent gold finger jacks when no expansion card is inserted;
[0010] Compare the capacitance differences between adjacent gold finger jacks to determine whether there is a jump capacitance difference;
[0011] If yes, then the adjacent gold finger sockets corresponding to the jump capacitance difference are determined as transition positions between different inserted expansion cards;
[0012] Using the transition position, determining the model of the inserted expansion card;
[0013] Based on the correspondence between the model and the bandwidth, the corresponding bandwidth is allocated to the inserted expansion card.
[0014] Preferably, using the transition position to determine the model of the inserted expansion card includes:
[0015] Determine the number of the gold finger socket where the expansion card is plugged in;
[0016] Dividing the gold finger socket numbers according to the transition positions to obtain a plurality of gold finger socket partitions, and determining the number of gold finger sockets in the plurality of gold finger socket partitions;
[0017] In combination with the correspondence between the model and the number of gold fingers, based on the number of gold finger sockets in the gold finger socket partition, the model of the expansion card inserted in the gold finger socket partition is determined.
[0018] Preferably, comparing the capacitance differences between adjacent gold finger plug holes to determine whether there is a jump capacitance difference includes:
[0019] Determine whether the capacitance differences between adjacent gold finger jacks are equal;
[0020] If not, it is determined that there is a jump in the capacitance difference;
[0021] If not, it is determined that there is no jumping capacitance difference.
[0022] Preferably, after determining that there is no jump capacitance difference, the method further comprises:
[0023] Obtain the number of gold finger sockets plugged into the slot by the inserted expansion card;
[0024] In combination with the correspondence between the model and the number of gold fingers, based on the number of gold finger sockets, the model of the expansion card inserted in the gold finger socket partition is determined.
[0025] Preferably, obtaining the card capacitance value between adjacent gold finger sockets in the slot includes:
[0026] Using a basic input and output system, based on a port of a PCIe gold finger jack, monitoring a card capacitance value between adjacent gold finger jacks in the slot;
[0027] The card insertion capacitance value fed back by the basic input and output system is received.
[0028] Preferably, obtaining the card-free capacitance value includes:
[0029] When no expansion card is inserted into the slot, a parasitic capacitance value between adjacent gold finger jacks in the slot is collected by using a single chip microcomputer; wherein the slot has M gold finger jacks, and N pins in the single chip microcomputer are respectively connected to the lines between adjacent gold fingers in the slot, M=N+1;
[0030] Based on the numbers of adjacent gold finger sockets, the N parasitic capacitance values collected are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket;
[0031] storing the N parasitic capacitance values in a basic input-output system in order of the size of the marks;
[0032] In the case where the expansion card has been inserted, the parasitic capacitance values are sequentially read from the basic input and output system to obtain N of the no-card capacitance values;
[0033] Accordingly, the card capacitance value between adjacent gold finger sockets in the slot is obtained, including:
[0034] In the case where the slot has been inserted with an expansion card, using the single chip microcomputer to collect new parasitic capacitance values between adjacent gold finger sockets in the slot;
[0035] Based on the numbers of the adjacent gold finger sockets, the N new parasitic capacitance values collected are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket;
[0036] storing the N new parasitic capacitance values into the basic input-output system in the order of the size of the marks;
[0037] Reading the new parasitic capacitance values from the basic input and output system in sequence to obtain N card insertion capacitance values;
[0038] Accordingly, the capacitance difference is obtained by subtracting the card-inserted capacitance value and the card-free capacitance value between adjacent gold finger jacks, including:
[0039] The card-inserted capacitance value and the card-free capacitance value with the same mark are subtracted to obtain N capacitance difference values.
[0040] Preferably, the slot is a PCIe x16 slot, and the expansion card is a PCIe card;
[0041] Accordingly, based on the correspondence between the model and the bandwidth, the corresponding bandwidth is allocated to the inserted expansion card, including:
[0042] If at least two expansion cards are inserted into one of the PCIe x16 slots, the 16G bandwidth corresponding to the PCIe x16 slot is split as needed to the inserted expansion cards based on the correspondence between the model and the bandwidth.
[0043] A bandwidth allocation device, comprising:
[0044] The card capacitance value acquisition module is used to acquire the card capacitance value between adjacent gold finger sockets in the slot when the expansion card has been inserted;
[0045] A capacitance difference determination module is used to obtain a capacitance difference by subtracting the card-inserted capacitance value and the card-free capacitance value between adjacent gold finger jacks; wherein the card-free capacitance value is the capacitance value between the adjacent gold finger jacks when no expansion card is inserted;
[0046] A jump position determination module is used to compare the capacitance difference between adjacent gold finger jacks to determine whether there is a jump capacitance difference;
[0047] A model determination module, for determining adjacent gold finger sockets corresponding to the jump capacitance difference as transition positions between different inserted expansion cards if there is a jump capacitance difference; and determining the model of the inserted expansion card by using the transition position;
[0048] The bandwidth allocation module is used to allocate corresponding bandwidth to the inserted expansion card based on the corresponding relationship between the model and the bandwidth.
[0049] An electronic device, comprising:
[0050] Memory for storing computer programs;
[0051] A processor is used to implement the steps of the above-mentioned bandwidth allocation method when executing the computer program.
[0052] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the bandwidth allocation method are implemented.
[0053] A computer program product includes a computer program / instruction, which implements the steps of the above bandwidth allocation method when executed by a processor.
[0054] The method provided by the embodiment of the present application is applied, and the method includes: when an expansion card has been inserted, obtaining a card insertion capacitance value between adjacent gold finger jacks in a slot; subtracting the card insertion capacitance value between adjacent gold finger jacks from a card-free capacitance value to obtain a capacitance difference; wherein the card-free capacitance value is a capacitance value between the adjacent gold finger jacks when no expansion card is inserted; comparing the capacitance differences between adjacent gold finger jacks to determine whether there is a jump capacitance difference; if so, determining the adjacent gold finger jacks corresponding to the jump capacitance difference as transition positions between different inserted expansion cards; using the transition position, determining the model of the inserted expansion card; and allocating corresponding bandwidth to the inserted expansion card based on the correspondence between the model and the bandwidth.
[0055] In the present application, the parasitic capacitance on the line between the gold finger jacks of the slot is detected, so as to realize the expansion card identification and bandwidth allocation. The principle is: the numerical value of the capacitance value change between the two adjacent lanes before and after the expansion card is inserted is different under different card insertion conditions. Based on this difference, the expansion card identification can be realized, so that the bandwidth allocation can be realized based on the expansion card model. Specifically, when the expansion card has been inserted, the card insertion capacitance value between the adjacent gold finger jacks in the slot is obtained. Then, the card insertion capacitance value between the adjacent gold finger jacks is calculated and the card-free capacitance value is subtracted to obtain the capacitance difference before and after the card is inserted. By comparing the capacitance difference between each adjacent gold finger jack, the jump capacitance difference is found. Since the jump capacitance difference will only appear when different expansion cards are inserted, in the present application, the adjacent gold finger jacks corresponding to the jump capacitance difference can be determined as the transition position between different inserted expansion cards. Based on the transition position, the model of the inserted expansion card can be determined. According to the corresponding relationship between the model and the bandwidth, the corresponding bandwidth can be allocated to the inserted expansion card.
[0056] Technical effect: Based on the differences in parasitic capacitance before and after card insertion and at the contact positions of different expansion cards, the type of expansion card can be automatically identified and bandwidth allocation can be completed on demand. In particular, two or more expansion cards can be inserted into one card slot for bandwidth allocation, which can effectively save PCIe resources.
[0057] Accordingly, the embodiments of the present application also provide a bandwidth allocation device, an apparatus, a readable storage medium and a computer program product corresponding to the above-mentioned bandwidth allocation method, which have the above-mentioned technical effects and are not described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. 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 paying creative work.
[0059] Figure 1 This is a flow chart of an implementation method of bandwidth allocation in an embodiment of the present application;
[0060] Figure 2 This is a flowchart of a specific bandwidth allocation method in an embodiment of the present application;
[0061] Figure 3 This is a schematic diagram of parasitic capacitance detection in an embodiment of the present application;
[0062] Figure 4 This is a schematic diagram of the structure of a bandwidth allocation device in an embodiment of the present application;
[0063] Figure 5 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;
[0064] Figure 6 This is a schematic diagram of the specific structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0066] Please refer to Figure 1 , Figure 1 This is a flow chart of a bandwidth allocation method in an embodiment of the present application. The method is applied in a server and includes the following steps:
[0067] S101: When an expansion card has been inserted, obtain a card capacitance value between adjacent gold finger sockets in the slot.
[0068] The slot may specifically be a PCIe slot, such as a PCIe x16 slot.
[0069] In this embodiment, when an expansion card is inserted into the slot, the capacitance value of the card between adjacent gold finger jacks in the slot can be detected. The gold finger (connecting finger) in the embodiment of the present application is the connecting hardware, such as between a memory stick and a memory slot, between a graphics card and a graphics card slot, etc.
[0070] For example: if the slot is a PCIe x16 slot, it has 16 lanes (gold finger jacks). When an expansion card is inserted, the parasitic capacitance between every two adjacent lanes in the 16 lanes is detected, and the obtained capacitance value is used as the card capacitance value, and 15 card capacitance values can be obtained.
[0071] It should be noted that in the embodiment of the present application, when the slot has M gold finger jacks, the card inserted into the slot may be one expansion card with M gold fingers, or two or more expansion cards, and the total number of gold fingers of these expansion cards is Q. Where, (0<Q≤M).
[0072] In one embodiment of the present application, obtaining a card capacitance value between adjacent gold finger sockets in a slot includes:
[0073] Using the basic input and output system, based on the port of the PCIe gold finger jack, the capacitance value of the card between adjacent gold finger jacks in the slot is monitored;
[0074] Receive the card capacitance value fed back by the basic input and output system.
[0075] For ease of description, the above steps are combined for explanation below.
[0076] A BIOS program can be developed to use the PCIe lane port (the port of the PCIe gold finger jack) to directly monitor the capacitance change, and then the CPU runs the program so that the BIOS can obtain the recognized card capacitance value.
[0077] S102, subtract the card-inserted capacitance value from the card-free capacitance value between adjacent gold finger jacks to obtain a capacitance difference value.
[0078] The no-card capacitance value is the capacitance value between the adjacent gold finger jacks when no expansion card is inserted.
[0079] In this embodiment, the parasitic capacitance corresponding to the adjacent gold finger slots in the slot can be detected in advance when no expansion card is inserted. For the sake of distinction, the parasitic capacitance when no expansion card is inserted is called the no-card capacitance value.
[0080] After the expansion card is inserted, the capacitance difference can be obtained by subtracting the capacitance value with the card inserted and the capacitance value without the card at the same position.
[0081] It should be noted that since the expansion card may not fill the slot completely, the capacitance difference may be 0 or may not be 0.
[0082] In one embodiment of the present application, please refer to Figure 2 , get the cardless capacitance value, including:
[0083] When no expansion card is inserted into the slot, the parasitic capacitance value between adjacent gold finger jacks in the slot is collected by using a single chip microcomputer; wherein the slot has M gold finger jacks, and N pins in the single chip microcomputer are respectively connected to the lines between adjacent gold fingers in the slot, M=N+1;
[0084] Based on the numbers of adjacent gold finger sockets, the N parasitic capacitance values collected are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket;
[0085] Store N parasitic capacitance values into the basic input and output system in the order of the marked size;
[0086] When the expansion card is inserted, the parasitic capacitance values are sequentially read from the basic input and output system to obtain N card-free capacitance values;
[0087] Accordingly, the card capacitance value between adjacent gold finger sockets in the slot is obtained, including:
[0088] When the slot has been inserted with an expansion card, the single chip microcomputer is used to collect the new parasitic capacitance value between adjacent gold finger sockets in the slot;
[0089] Based on the numbers of the adjacent gold finger sockets, the N new parasitic capacitance values obtained are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket;
[0090] According to the order of the marked size, N new parasitic capacitance values are stored in the basic input and output system;
[0091] Read new parasitic capacitance values from the basic input and output system in sequence to obtain N card capacitance values;
[0092] Accordingly, the capacitance difference is obtained by subtracting the capacitance value of the card inserted between adjacent gold finger jacks from the capacitance value of the card not inserted, including:
[0093] The capacitance value of the card inserted and the capacitance value of the card not inserted with the same mark are subtracted to obtain N capacitance difference values.
[0094] For ease of description, the above steps are combined for explanation below.
[0095] Please refer to Figure 3In this embodiment, the detection port (PE1) on the server CPU can be connected to the microcontroller chip (D1), the pins of the microcontroller chip are connected to the lines between adjacent gold fingers (G) in each PCIe slot, the storage unit in the CPU numbers each PCIe slot (such as PE1, PE2, PE3), and the gold fingers of each PCIe slot are digitally numbered (such as 1, 2, 3, 4...16).
[0096] The microcontroller detects the parasitic capacitance between adjacent gold finger lines based on the principle of capacitance change caused by touching the key. When no expansion card is inserted, the parasitic capacitance value detected is the card-free capacitance value; when an expansion card (C1) is inserted, the new parasitic capacitance value detected is the card-inserted capacitance value.
[0097] In order to facilitate searching and comparison, the microcontroller collects the value of the parasitic capacitance between each group of adjacent gold finger lines and stores it in the BIOS. When storing, each parasitic capacitance value can be marked. For example, the parasitic capacitance between the gold finger cables numbered 1 and 2 in the slot can be marked as the parasitic capacitance value of 1-2.
[0098] When calculating the capacitance difference between adjacent gold finger jacks, the correspondence between each card-inserted capacitance value and each card-free capacitance value can be clarified based on the markings, so as to perform calculations.
[0099] In one embodiment of the present application, for the convenience of comparison, the capacitance value is written into a list, and the storage category includes a mark (adjacent gold finger numbers, such as 1*2, which refers to the parasitic capacitance between gold finger 1 and gold finger 2);
[0100] Among them, the categories of parasitic capacitance include non-card capacitance value and card insertion capacitance value.
[0101] As shown in Table 1:
[0102] Table 1, Table 1 is a capacitance value storage table
[0103]
[0104] Among them, pF is picofarad, a unit of capacitance.
[0105] It should be noted that in this application, when no expansion card device is inserted into the PCIe x16 slot, the capacitance value between each lane is 1pF, and the capacitance value between each lane with an expansion card device inserted becomes 2pF, while the transition capacitance value between two lanes between expansion card devices is 1.5pF. Therefore, in practical applications, the transition position between different expansion cards can also be directly found by the card capacitance value.
[0106] S103 , comparing the capacitance differences between adjacent gold finger plug holes to determine whether there is a jump capacitance difference.
[0107] There are different models of expansion cards, which can be divided into x1, x2, x4, x8 and x16 according to the number of gold fingers. After the gold finger socket is inserted into the expansion card, its parasitic capacitance will change, especially the parasitic capacitance between the two gold fingers corresponding to different expansion cards, which is different from the capacitance change of the same expansion card.
[0108] Therefore, the plug-in status of the expansion card can be determined by comparing whether there is a jump in the capacitance difference.
[0109] In this application, a jump refers to a significant change in the capacitance difference from the previous and next capacitance differences. It should be noted that in the embodiment of this application, if the capacitance difference is 0, it indicates that the corresponding position is not inserted with a gold finger of an expansion card, and its value does not participate in the judgment of whether a jump exists.
[0110] In one embodiment of the present application, comparing the capacitance difference between adjacent gold finger plug holes to determine whether there is a jump capacitance difference includes:
[0111] Determine whether the capacitance differences between adjacent gold finger jacks are equal;
[0112] If not, it is determined that there is a jump in the capacitance difference;
[0113] If not, it is determined that there is no jumping capacitance difference.
[0114] For ease of description, the above steps are combined for explanation below.
[0115] As shown in Table 2:
[0116] Table 2, Table 2 is a capacitance value storage table
[0117]
[0118] From the above table, we can see that the capacitance difference jumps at 4*5, 5*6, and 6*7.
[0119] After determining whether there is a jump, different subsequent processing operations can be performed according to the determination result. Specifically, if yes, step S104 is executed, and if not, step S107 is executed.
[0120] S104: Determine adjacent gold finger sockets corresponding to the jump capacitance difference as transition positions between different inserted expansion cards.
[0121] As shown in Table 1, 4*5 has a jump, 5*6 has a jump, and 6*7 has a jump, so 1-4 corresponds to an expansion card, 5-6 corresponds to an expansion card, and 7-14 corresponds to an expansion card. The middle 4*5, 5*6, and 6*7 are the transition positions of the expansion cards.
[0122] S105: Using the transition position, determine the model of the inserted expansion card.
[0123] Different expansion cards have different numbers of gold fingers, so based on the transition position, you can determine the model of the inserted expansion card.
[0124] In one embodiment of the present application, using the transition position to determine the model of the inserted expansion card includes:
[0125] Determine the number of the gold finger socket where the expansion card is plugged in;
[0126] Divide the gold finger socket numbers according to the transition positions to obtain a plurality of gold finger socket partitions, and determine the number of gold finger sockets in the plurality of gold finger socket partitions;
[0127] According to the correspondence between the model and the number of gold fingers, the model of the expansion card inserted in the gold finger socket partition is determined based on the number of gold finger sockets in the gold finger socket partition.
[0128] Since different expansion card models correspond to different numbers of gold fingers, the transition area determined by the parasitic capacitance based on the gold finger socket number (i.e. the gold finger number in the table) can be divided to obtain the number of gold finger sockets corresponding to each expansion card, and then determine the expansion card model.
[0129] As shown in Table 3, the inserted device is the expansion card, and x4, x2, and x8 represent specific models.
[0130] Table 3, Table 3 is the recognition result table
[0131]
[0132] S106: Allocate corresponding bandwidth to the inserted expansion card based on the correspondence between the model and the bandwidth.
[0133] That is, different expansion cards require different bandwidths based on different models, so after the expansion card model is determined, the corresponding bandwidth can be directly allocated.
[0134] In one embodiment of the present application, the slot is a PCIe x16 slot, and the expansion card is a PCIe card;
[0135] Accordingly, based on the correspondence between the model and the bandwidth, the corresponding bandwidth is allocated to the inserted expansion card, including:
[0136] If at least two expansion cards are inserted into a PCIe x16 slot, the 16G bandwidth corresponding to the PCIe x16 slot is split as needed to the inserted expansion cards based on the correspondence between the model and bandwidth.
[0137] For ease of description, the above steps are combined for explanation below.
[0138] The PCIe standard is mainly used to connect the CPU and various expansion cards, such as graphics cards, sound cards, and network adapters. The bandwidth of PCIe is closely related to its version and the number of lanes. The following are the details of different versions of PCIe and their bandwidth:
[0139] PCIe 1.0: The online bit transfer rate is 2.5Gb / s, using 8 / 10 encoding, so the bandwidth of PCIe 1.0x1 is 250MB / s.
[0140] PCIe 2.0: The online bit transfer rate is doubled to 5Gb / s, using 8 / 10 encoding, so the bandwidth of PCIe 2.0x 1 is 500MB / s.
[0141] PCIe 3.0: The online bit transfer rate is 8Gb / s, using 128 / 130 encoding, so the bandwidth of PCIe 3.0x 1 is 1GB / s.
[0142] PCIe 4.0: The online bit transfer rate is increased to 16GT / s.
[0143] PCIe 5.0: The online bit transfer rate can reach up to 32GT / s.
[0144] In addition, the bandwidth of PCIe is also related to the number of its lanes. For example, the theoretical maximum bandwidth of the PCIe x1 slot is 1GB / s, which is suitable for devices with low data transmission requirements; the theoretical maximum bandwidth of the PCIe x4 slot is 4GB / s, which is suitable for devices with medium bandwidth requirements; the theoretical maximum bandwidth of the PCIe x8 slot is 8GB / s, which is suitable for devices with higher data transmission speed requirements; the PCIe x16 slot has the highest theoretical maximum bandwidth of 16GB / s, which is widely used to connect high-performance graphics cards.
[0145] For example: as shown in Table 3, the recognition results and bandwidth allocation are as follows: the CPU recognizes the expansion card device inserted into the PCIe x16 slot, and allocates a maximum bandwidth of 4 GB / s to the gold fingers 1 to 4 in the PCIe x16 slot; a maximum bandwidth of 2 GB / s to the gold fingers 5 to 6 in the PCIex16 slot; and a maximum bandwidth of 8 GB / s to the gold fingers 7 to 14 in the PCIe x16 slot.
[0146] S107: Obtain the number of gold finger jacks plugged into the slot of the inserted expansion card.
[0147] When only one expansion card is inserted, the number of gold finger jacks plugged into the slot can be directly obtained, or the number of gold finger jacks plugged into the slot can be obtained by comparing the number of capacitance differences that are not 0.
[0148] S108. Determine the model of the expansion card inserted into the gold finger socket partition based on the number of gold finger sockets in combination with the correspondence between the model and the number of gold fingers.
[0149] The method provided by the embodiment of the present application is applied, and the method includes: when an expansion card has been inserted, obtaining a card insertion capacitance value between adjacent gold finger jacks in a slot; subtracting the card insertion capacitance value between adjacent gold finger jacks from a card-free capacitance value to obtain a capacitance difference; wherein the card-free capacitance value is a capacitance value between the adjacent gold finger jacks when no expansion card is inserted; comparing the capacitance differences between adjacent gold finger jacks to determine whether there is a jump capacitance difference; if so, determining the adjacent gold finger jacks corresponding to the jump capacitance difference as transition positions between different inserted expansion cards; using the transition position, determining the model of the inserted expansion card; and allocating corresponding bandwidth to the inserted expansion card based on the correspondence between the model and the bandwidth.
[0150] In the present application, the parasitic capacitance on the line between the gold finger jacks of the slot is detected, so as to realize the expansion card identification and bandwidth allocation. The principle is: the numerical value of the capacitance value change between the two adjacent lanes before and after the expansion card is inserted is different under different card insertion conditions. Based on this difference, the expansion card identification can be realized, so that the bandwidth allocation can be realized based on the expansion card model. Specifically, when the expansion card has been inserted, the card insertion capacitance value between the adjacent gold finger jacks in the slot is obtained. Then, the card insertion capacitance value between the adjacent gold finger jacks is calculated and the card-free capacitance value is subtracted to obtain the capacitance difference before and after the card is inserted. By comparing the capacitance difference between each adjacent gold finger jack, the jump capacitance difference is found. Since the jump capacitance difference will only appear when different expansion cards are inserted, in the present application, the adjacent gold finger jacks corresponding to the jump capacitance difference can be determined as the transition position between different inserted expansion cards. Based on the transition position, the model of the inserted expansion card can be determined. According to the corresponding relationship between the model and the bandwidth, the corresponding bandwidth can be allocated to the inserted expansion card.
[0151] Technical effect: Based on the differences in parasitic capacitance before and after card insertion and at the contact positions of different expansion cards, the type of expansion card can be automatically identified and bandwidth allocation can be completed on demand. In particular, two or more expansion cards can be inserted into one card slot for bandwidth allocation, which can effectively save PCIe resources.
[0152] Corresponding to the above method embodiment, the embodiment of the present application further provides a bandwidth allocation device. The bandwidth allocation device described below and the bandwidth allocation method described above can refer to each other.
[0153] See also Figure 4 As shown, the device includes the following modules:
[0154] The card capacitance value acquisition module 101 is used to acquire the card capacitance value between adjacent gold finger jacks in the slot when the expansion card has been inserted;
[0155] The capacitance difference determination module 102 is used to obtain a capacitance difference by subtracting a card-inserted capacitance value and a card-free capacitance value between adjacent gold finger jacks; wherein the card-free capacitance value is a capacitance value between the adjacent gold finger jacks when no expansion card is inserted;
[0156] The jump position determination module 103 is used to compare the capacitance difference between adjacent gold finger sockets to determine whether there is a jump capacitance difference;
[0157] The model determination module 104 is used to determine the adjacent gold finger sockets corresponding to the jump capacitance difference as the transition position between different inserted expansion cards if there is a jump capacitance difference; and determine the model of the inserted expansion card by using the transition position;
[0158] The bandwidth allocation module 105 is used to allocate corresponding bandwidth to the inserted expansion card based on the corresponding relationship between the model and the bandwidth.
[0159] The device provided by the embodiment of the present application is applied, and the device includes: when an expansion card has been inserted, obtaining a card insertion capacitance value between adjacent gold finger jacks in a slot; subtracting the card insertion capacitance value between adjacent gold finger jacks from a card-free capacitance value to obtain a capacitance difference; wherein the card-free capacitance value is the capacitance value between the adjacent gold finger jacks when no expansion card is inserted; comparing the capacitance differences between adjacent gold finger jacks to determine whether there is a jump capacitance difference; if so, determining the adjacent gold finger jacks corresponding to the jump capacitance difference as transition positions between different inserted expansion cards; using the transition position, determining the model of the inserted expansion card; and allocating corresponding bandwidth to the inserted expansion card based on the correspondence between the model and the bandwidth.
[0160] In the present application, the parasitic capacitance on the line between the gold finger jacks of the slot is detected, so as to realize the expansion card identification and bandwidth allocation. The principle is: the numerical value of the capacitance value change between the two adjacent lanes before and after the expansion card is inserted is different under different card insertion conditions. Based on this difference, the expansion card identification can be realized, so that the bandwidth allocation can be realized based on the expansion card model. Specifically, when the expansion card has been inserted, the card insertion capacitance value between the adjacent gold finger jacks in the slot is obtained. Then, the card insertion capacitance value between the adjacent gold finger jacks is calculated and the card-free capacitance value is subtracted to obtain the capacitance difference before and after the card is inserted. By comparing the capacitance difference between each adjacent gold finger jack, the jump capacitance difference is found. Since the jump capacitance difference will only appear when different expansion cards are inserted, in the present application, the adjacent gold finger jacks corresponding to the jump capacitance difference can be determined as the transition position between different inserted expansion cards. Based on the transition position, the model of the inserted expansion card can be determined. According to the corresponding relationship between the model and the bandwidth, the corresponding bandwidth can be allocated to the inserted expansion card.
[0161] Technical effect: Based on the differences in parasitic capacitance before and after card insertion and at the contact positions of different expansion cards, the type of expansion card can be automatically identified and bandwidth allocation can be completed on demand. In particular, two or more expansion cards can be inserted into one card slot for bandwidth allocation, which can effectively save PCIe resources.
[0162] In a specific implementation of the present application, the model determination module is specifically used to determine the number of the gold finger socket into which the expansion card has been plugged;
[0163] Divide the gold finger socket numbers according to the transition positions to obtain a plurality of gold finger socket partitions, and determine the number of gold finger sockets in the plurality of gold finger socket partitions;
[0164] According to the correspondence between the model and the number of gold fingers, the model of the expansion card inserted in the gold finger socket partition is determined based on the number of gold finger sockets in the gold finger socket partition.
[0165] In a specific implementation of the present application, the capacitance difference determination module is specifically used to compare the capacitance differences between adjacent gold finger sockets to determine whether there is a jump capacitance difference, including:
[0166] Determine whether the capacitance differences between adjacent gold finger jacks are equal;
[0167] If not, it is determined that there is a jump in the capacitance difference;
[0168] If not, it is determined that there is no jumping capacitance difference.
[0169] In a specific implementation of the present application, the model determination module is specifically used to obtain the number of gold finger jacks plugged into the slot of the inserted expansion card after determining that there is no jump capacitance difference;
[0170] According to the correspondence between the model and the number of gold fingers, the model of the expansion card inserted in the gold finger socket partition is determined based on the number of gold finger sockets.
[0171] In a specific implementation of the present application, the card capacitance value acquisition module is specifically used to monitor the card capacitance value between adjacent gold finger jacks in the slot by using the basic input and output system based on the port of the PCIe gold finger jack;
[0172] Receive the card capacitance value fed back by the basic input and output system.
[0173] In a specific implementation of the present application, a cardless capacitance value acquisition module is used to acquire a cardless capacitance value, including:
[0174] When no expansion card is inserted into the slot, the parasitic capacitance value between adjacent gold finger jacks in the slot is collected by using a single chip microcomputer; wherein the slot has M gold finger jacks, and N pins in the single chip microcomputer are respectively connected to the lines between adjacent gold fingers in the slot, M=N+1;
[0175] Based on the numbers of adjacent gold finger sockets, the N parasitic capacitance values collected are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket;
[0176] Store N parasitic capacitance values into the basic input and output system in the order of the marked size;
[0177] When the expansion card is inserted, the parasitic capacitance values are sequentially read from the basic input and output system to obtain N card-free capacitance values;
[0178] Accordingly, the card capacitance value acquisition module is specifically used to collect the new parasitic capacitance value between adjacent gold finger jacks in the slot by using the single chip microcomputer when the slot has been inserted with the expansion card;
[0179] Based on the numbers of the adjacent gold finger sockets, the N new parasitic capacitance values obtained are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket;
[0180] According to the order of the marked size, N new parasitic capacitance values are stored in the basic input and output system;
[0181] Read new parasitic capacitance values from the basic input and output system in sequence to obtain N card capacitance values;
[0182] Correspondingly, the capacitance difference determination module is specifically used to make a difference between the card-inserted capacitance value and the card-free capacitance value with the same mark to obtain N capacitance difference values.
[0183] In a specific embodiment of the present application, the slot is a PCIe x16 slot, and the expansion card is a PCIe card;
[0184] Correspondingly, the bandwidth allocation module is specifically used to split the 16G bandwidth corresponding to the PCIe x16 slot to the inserted expansion cards as needed based on the correspondence between the model and the bandwidth if at least two expansion cards are inserted into a PCIe x16 slot.
[0185] Corresponding to the above method embodiment, the embodiment of the present application further provides an electronic device. The electronic device described below and the bandwidth allocation method described above can refer to each other.
[0186] See also Figure 5 As shown, the electronic device includes:
[0187] A memory 332, for storing computer programs;
[0188] The processor 322 is configured to implement the steps of the bandwidth allocation method of the above method embodiment when executing a computer program.
[0189] For details, please refer to Figure 6 , Figure 6 A schematic diagram of the specific structure of an electronic device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include one or more processors (central processing units, CPU) (for example, one or more processors) and a memory 332, and the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 can be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 can be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the electronic device 301.
[0190] The electronic device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0191] The steps in the bandwidth allocation method described above can be implemented by the structure of an electronic device.
[0192] Corresponding to the above method embodiment, the embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the bandwidth allocation method described above can refer to each other.
[0193] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the bandwidth allocation method of the above method embodiment are implemented.
[0194] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0195] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer program product. The computer program product described below and the bandwidth allocation method described above can refer to each other.
[0196] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned bandwidth allocation method are implemented.
[0197] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0198] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0199] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0200] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms include, include or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0201] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A bandwidth allocation method, It is characterized in that include: When an expansion card is inserted, obtain the card capacitance value between adjacent gold finger sockets in the slot; Subtract the card-inserted capacitance value from the card-free capacitance value between adjacent gold finger jacks to obtain a capacitance difference value; wherein the card-free capacitance value is the capacitance value between the adjacent gold finger jacks when no expansion card is inserted; Compare the capacitance differences between adjacent gold finger jacks to determine whether there is a jump capacitance difference; If yes, then the adjacent gold finger sockets corresponding to the jump capacitance difference are determined as transition positions between different inserted expansion cards; Using the transition position, determining the model of the inserted expansion card; Based on the correspondence between the model and the bandwidth, the corresponding bandwidth is allocated to the inserted expansion card.
2. The method according to claim 1, It is characterized in that Using the transition position to determine the model of the inserted expansion card includes: Determine the number of the gold finger socket where the expansion card is plugged in; Dividing the gold finger socket numbers according to the transition positions to obtain a plurality of gold finger socket partitions, and determining the number of gold finger sockets in the plurality of gold finger socket partitions; In combination with the correspondence between the model and the number of gold fingers, based on the number of gold finger sockets in the gold finger socket partition, the model of the expansion card inserted in the gold finger socket partition is determined.
3. The method according to claim 1, It is characterized in that Compare the capacitance differences between adjacent gold finger jacks to determine whether there is a jump in capacitance difference, including: Determine whether the capacitance differences between adjacent gold finger jacks are equal; If not, it is determined that there is a jump in the capacitance difference; If not, it is determined that there is no jumping capacitance difference.
4. The method according to claim 3, It is characterized in that After determining the capacitance difference without jump, include: Obtain the number of gold finger sockets plugged into the slot by the inserted expansion card; In combination with the correspondence between the model and the number of gold fingers, based on the number of gold finger sockets, the model of the expansion card inserted in the gold finger socket partition is determined.
5. The method according to claim 1, It is characterized in that Get the card capacitance value between adjacent gold finger sockets in the slot, including: Using a basic input and output system, based on a port of a PCIe gold finger jack, monitoring a card capacitance value between adjacent gold finger jacks in the slot; The card insertion capacitance value fed back by the basic input and output system is received.
6. The method according to claim 1, It is characterized in that Obtaining the card-free capacitance value includes: When no expansion card is inserted into the slot, a parasitic capacitance value between adjacent gold finger jacks in the slot is collected by using a single chip microcomputer; wherein the slot has M gold finger jacks, and N pins in the single chip microcomputer are respectively connected to the lines between adjacent gold fingers in the slot, M=N+1; Based on the numbers of adjacent gold finger sockets, the N parasitic capacitance values collected are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket; storing the N parasitic capacitance values in a basic input-output system in order of the size of the marks; In the case where the expansion card has been inserted, the parasitic capacitance values are sequentially read from the basic input and output system to obtain N of the no-card capacitance values; Accordingly, the card capacitance value between adjacent gold finger sockets in the slot is obtained, including: In the case where the slot has been inserted with an expansion card, using the single chip microcomputer to collect new parasitic capacitance values between adjacent gold finger sockets in the slot; Based on the numbers of the adjacent gold finger sockets, the N new parasitic capacitance values collected are marked; wherein the marking format includes the number of the front gold finger socket and the number of the rear gold finger socket; storing the N new parasitic capacitance values into the basic input-output system in the order of the size of the marks; Reading the new parasitic capacitance values from the basic input and output system in sequence to obtain N card insertion capacitance values; Accordingly, the capacitance difference is obtained by subtracting the card-inserted capacitance value and the card-free capacitance value between adjacent gold finger jacks, including: The card-inserted capacitance value and the card-free capacitance value with the same mark are subtracted to obtain N capacitance difference values.
7. The method according to any one of claims 1 to 6, It is characterized in that The slot is a PCIe x16 slot, and the expansion card is a PCIe card; Accordingly, based on the correspondence between the model and the bandwidth, the corresponding bandwidth is allocated to the inserted expansion card, including: If at least two expansion cards are inserted into one of the PCIe x16 slots, the 16G bandwidth corresponding to the PCIe x16 slot is split as needed to the inserted expansion cards based on the correspondence between the model and the bandwidth.
8. A bandwidth allocation device, It is characterized in that include: The card capacitance value acquisition module is used to acquire the card capacitance value between adjacent gold finger sockets in the slot when the expansion card has been inserted; A capacitance difference determination module is used to obtain a capacitance difference by subtracting the card-inserted capacitance value and the card-free capacitance value between adjacent gold finger jacks; wherein the card-free capacitance value is the capacitance value between the adjacent gold finger jacks when no expansion card is inserted; A jump position determination module is used to compare the capacitance difference between adjacent gold finger jacks to determine whether there is a jump capacitance difference; A model determination module, for determining adjacent gold finger sockets corresponding to the jump capacitance difference as transition positions between different inserted expansion cards if there is a jump capacitance difference; and determining the model of the inserted expansion card by using the transition position; The bandwidth allocation module is used to allocate corresponding bandwidth to the inserted expansion card based on the corresponding relationship between the model and the bandwidth.
9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the bandwidth allocation method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, It is characterized in that The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the bandwidth allocation method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Server bandwidth allocation method and device, electronic equipment and storage medium
CN116260725A
A server bandwidth allocation method, apparatus, electronic device, and storage medium.
CN116260725B
Bandwidth adjustment method and apparatus, and program product, medium and server
WO2026086282A1
