A method for optimizing power network decoupling capacitors based on gradient descent algorithm
By using the gradient descent algorithm to optimize the decoupling capacitor in the chip power network, the problem of low voltage drop repair efficiency in the existing technology is solved, a more reliable and intelligent capacitor selection is achieved, and the voltage drop repair efficiency of the power network is improved.
Patent Information
- Application Number
- CN202411053081.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-02
AI Technical Summary
When existing technology solves the problem of chip power network voltage drop, the size and location selection of decoupling capacitors rely on the designer's experience, resulting in low repair efficiency, and a more reliable and intelligent method is urgently needed.
A method based on the gradient descent algorithm is used to optimize the size of the decoupling capacitor. The problem area is determined through dynamic voltage drop simulation, and the decoupling capacitor is inserted in the area. A cost function is established to optimize the capacitance value to ensure that the voltage drop meets the requirements and is maximized. Possibly reduce the capacitance value.
It improves the repair efficiency of power network voltage drop problems, provides a more reliable and intelligent decoupling capacitor selection, ensures that the voltage drop meets the requirements, and reduces the value of the decoupling capacitor.
Smart Images

Figure CN118569183B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power supply network optimization, and in particular to a method for optimizing power supply network decoupling capacitors based on a gradient descent algorithm. Background Art
[0002] With the improvement of chip manufacturing technology, more and more transistor devices can be accommodated in chips of the same size. Correspondingly, the winding density increases and the winding width becomes thinner, which makes the voltage drop analysis of the power supply network an indispensable and important part of the chip design process. The voltage drop analysis tool of the power supply network generates a voltage drop problem report through simulation, and gives the devices and areas where the voltage drop problem exists. For the problem area, increasing the line width is likely to occupy the signal line winding channel, and re-arranging the device is time-consuming and labor-intensive, resulting in an extension of the design cycle. Therefore, it is usually adopted to add decoupling capacitors near the problem area to alleviate the voltage drop of the device. However, the size and location of the decoupling capacitor often depend on the designer's experience and repeated simulation verification, and there may be reliability problems. The repair efficiency of the voltage drop problem is low. There is an urgent need for a more reliable and intelligent method to provide a reasonable decoupling capacitor to repair the voltage drop problem in the power supply network. Summary of the invention
[0003] In order to solve the defects of the prior art, the purpose of the present invention is to provide a method for optimizing the decoupling capacitor of the power supply network based on the gradient descent algorithm. The voltage drop problem area is obtained through simulation, and a decoupling capacitor is inserted near the problem area. Based on the gradient descent algorithm, the size of the decoupling capacitor is optimized to meet the voltage drop requirements. At the same time, the value of the decoupling capacitor is as small as possible to repair the problem of excessive voltage drop in the power supply network.
[0004] In order to achieve the above object, the method for optimizing the power network decoupling capacitor based on the gradient descent algorithm provided by the present invention comprises the following steps:
[0005] Perform dynamic voltage drop simulation on the entire chip to identify the devices or areas where voltage drop problems occur;
[0006] Determine the location and initial value of the decoupling capacitors based on the device or area where the voltage drop problem occurs;
[0007] Taking the device operating voltage as the constraint and the capacitance value of the decoupling capacitor as the feature, a gradient optimization cost function is established, and the value of the cost weight parameter is determined;
[0008] The decoupling capacitor is optimized by using a gradient descent algorithm to obtain a value of the decoupling capacitor.
[0009] Furthermore, the step of performing dynamic voltage drop simulation on the entire chip to determine the device or area where the voltage drop problem occurs further includes: analyzing the pin voltage waveform of each device in the circuit, taking the instantaneous maximum voltage difference between the power port pin and the voltage reference base point pin as the worst operating voltage, and comparing it with the ideal voltage; if the worst operating voltage is lower than the difference between the ideal voltage and the voltage drop threshold voltage, then the device or the area where it is located has a voltage drop problem.
[0010] Furthermore, the step of determining the position and initial value of the decoupling capacitor according to the device or region where the voltage drop problem occurs also includes: classifying the devices with the voltage drop problem according to the region, and adding decoupling capacitors in the corresponding region.
[0011] Furthermore, the cost function expression of the gradient optimization is: ,
[0012] in, is the cost function, The characteristic quantity representing the optimization of the cost function is the capacitance value of the decoupling capacitor, For the The voltage drop across the device, is the maximum allowable voltage drop threshold, , is the cost weight parameter, For the The capacitance value of the decoupling capacitor.
[0013] Furthermore, the step of optimizing the decoupling capacitor by using a gradient descent algorithm to obtain a value of the decoupling capacitor further includes:
[0014] Set the initial decoupling capacitor value, initial learning rate, device current waveform, and convergence threshold;
[0015] Perform full circuit dynamic voltage drop simulation for each characteristic quantity;
[0016] According to the simulation results, obtain the corresponding cost function value and calculate the gradient;
[0017] Determine the absolute value of the gradient. If it is less than the set convergence threshold, exit successfully, otherwise proceed to the next step;
[0018] Calculate the new learning rate and update the feature quantity according to the new learning rate and gradient;
[0019] Perform the next round of iterative calculation to obtain the optimized value of the decoupling capacitor.
[0020] Furthermore, the dynamic voltage drop simulation further comprises:
[0021] Fill in the matrix equation according to the circuit netlist, fill in the resistance and capacitance in the coefficient matrix on the left side of the matrix equation, fill in the node voltage in the unknown vector on the left side of the matrix equation, and fill in the device current waveform in the vector on the right side of the matrix equation to obtain the matrix equation;
[0022] The LU decomposition method is used to solve the matrix equation to obtain the voltage value of each node in the circuit.
[0023] Furthermore, it also includes:
[0024] The coefficient matrix is divided into blocks according to whether the matrix elements change, and all matrix elements related to the decoupling capacitor are divided into the same matrix block, and the following is obtained: ,
[0025] in, is the coefficient matrix of the matrix equation, , , are all blocks with unchanged matrix elements, Filling the blocks forming the matrix element variations for all decoupling capacitors;
[0026] Keeping the changed blocks, the coefficient matrix is decomposed by LU to obtain: ,
[0027] in, is a lower triangular matrix, is an upper triangular matrix;
[0028] When the emulator is called again, , , , Will remain unchanged, decomposition matrix Get the matrix and matrix .
[0029] To achieve the above-mentioned purpose, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the computer program stored in the memory to implement the method for optimizing the power supply network decoupling capacitor based on the gradient descent algorithm as described above.
[0030] To achieve the above objectives, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the method for optimizing power network decoupling capacitors based on a gradient descent algorithm as described above.
[0031] The method for optimizing the power network decoupling capacitor based on the gradient descent algorithm provided by the present invention has the following beneficial effects compared with the prior art:
[0032] Decoupling capacitors are inserted near devices or areas with voltage drop problems, and the size of the decoupling capacitors is optimized based on the gradient descent algorithm to meet the voltage drop requirements while keeping the value of the decoupling capacitor as small as possible, thereby repairing the problem of excessive voltage drop in the power supply network. Reasonable decoupling capacitors are given more reliably and intelligently, and the efficiency of repairing the voltage drop problem is greatly improved.
[0033] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0035] Figure 1 A flow chart of a method for optimizing a power network decoupling capacitor based on a gradient descent algorithm according to an embodiment of the present invention;
[0036] Figure 2 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0038] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0039] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0040] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more". "Plurality" should be understood as two or more.
[0041] In an embodiment of the present invention, a method for optimizing a power network decoupling capacitor based on a gradient descent algorithm is provided, comprising:
[0042] Perform dynamic voltage drop simulation analysis on the chip to find the devices or areas with voltage drop problems;
[0043] For devices with voltage drop problems in the chip, select the device as the optimization constraint target to ensure that the voltage drop value of the device after optimization is lower than the maximum voltage drop allowable threshold;
[0044] Determine the position and initial value of the decoupling capacitor, and use the decoupling capacitor as an optimized feature quantity;
[0045] The optimized cost function is established, which consists of two parts: the first part is to constrain the voltage drop of the target device; the second part is to constrain the size of the decoupling capacitor;
[0046] The gradient descent algorithm is used to adjust the optimized feature quantity to obtain the value of the optimized feature quantity.
[0047] Figure 1 This is a flow chart of a method for optimizing power network decoupling capacitors based on a gradient descent algorithm according to an embodiment of the present invention. Figure 1 The specific embodiments of the present invention are described in further detail.
[0048] In step 101, the whole chip is dynamically simulated and dynamic voltage drop analysis is performed on the whole chip to find out the device or area with voltage drop problem.
[0049] Voltage drop is the difference between the actual operating voltage value and the ideal voltage value between the device and VDD (power port) and GND (voltage reference base point, such as the ground terminal). The voltage drop should generally not exceed about 5% of the ideal voltage value, otherwise it will affect the performance stability of the device, cause timing problems and other issues, and cause functional errors.
[0050] In static analysis, the voltage drop depends on the device's operating current and the resistance of the supply network:
[0051] In the above formula, is the voltage drop across the device, is the average current of the device, , are the resistances from the device to VDD and GND, respectively.
[0052] Static analysis can determine whether the line width and density of the power network meet the working requirements. However, it cannot cover the worst working scenario. In this case, dynamic analysis must be used to perform time domain simulation to simulate the real working scenario.
[0053]
[0054] In the above formula, Indicates time, Indicates the device at time The working current, It represents the sum of parasitic capacitance and decoupling capacitance in the power network. When the value is larger, the voltage drop The voltage drop violation is more likely to occur. However, the parasitic capacitance and decoupling capacitance in the power supply network will compensate the voltage and act as a local voltage source. Therefore, adding decoupling capacitance appropriately can effectively avoid the problem caused by voltage drop.
[0055] In the embodiment of the present invention, in order to obtain the voltage drop information, it is necessary to simulate the entire chip. The circuit equation is established by the node method and converted into a matrix equation for solution. . It is a very large sparse matrix, which is composed of the resistors, capacitors and other device filling matrices in the circuit. is the unknown vector containing the node voltages, is a known vector containing the current excitation source. To solve , there is no need to Taking the inverse we get , because this is computationally intensive and unnecessary. A better option is to perform LU decomposition and convert Decompose into ,in is a lower triangular matrix, is an upper triangular matrix. Then the unknown vector can be solved by the following method :
[0056]
[0057]
[0058] in, is the intermediate vector. , are all triangular matrices, so their solutions can be obtained directly by forward and backward solving. Its computational efficiency is much higher than matrix inversion. In circuit simulation problems, LU decomposition is only required for the first solution, and subsequent solutions can be directly used. , That's it.
[0059] In the embodiment of the present invention, the pin voltage waveform of each device in the circuit is analyzed, and the instantaneous maximum voltage difference between the VDD pin and the GND pin is taken as the worst working voltage, and compared with the ideal voltage. If the worst working voltage is lower than the difference between the ideal voltage and the voltage drop threshold voltage, the device has a voltage drop problem and needs to be repaired. The voltage drop threshold can be set to 5% of the ideal voltage value.
[0060] In step 102, devices or regions with voltage drop problems are extracted. For devices with voltage drop problems in the chip, the devices are selected as optimization constraint targets to ensure that the voltage drop value of the optimized device is lower than the maximum voltage drop allowable threshold.
[0061] In step 103, decoupling capacitors are placed according to requirements. For devices or regions with voltage drop problems, the placement position (near the problem region) and initial value (0 by default) of the decoupling capacitors are determined, and the decoupling capacitors are used as optimized feature quantities.
[0062] In the embodiment of the present invention, the devices with voltage drop problems are classified according to regions, and decoupling capacitors are added in the corresponding regions. The value of the decoupling capacitors needs to be optimized.
[0063] In step 104, a gradient optimization cost function is established. A cost function for gradient descent algorithm optimization is determined, and the cost function includes two parts: the voltage drop of the target device and the size of the decoupling capacitor.
[0064] In the embodiment of the present invention, the constraint quantity (device operating voltage) and the characteristic quantity (decoupling capacitor size) in the cost function are determined, and the cost weight parameter is determined. , The cost function expression is as follows:
[0065]
[0066] is the cost function, The characteristic quantity representing the optimization of the cost function is the decoupling capacitance, For the The voltage drop across the device, is the maximum allowable voltage drop threshold, , is the cost weight parameter, For the The capacitance value of the decoupling capacitor.
[0067] Cost Function The choice of is divided into two parts: the target device voltage drop and the decoupling capacitor. The cost function includes the operating voltage of the device with voltage drop problem, which is obtained by analyzing the circuit simulation results; the size of the decoupling capacitor is the characteristic quantity, which is updated by gradient descent in each iteration.
[0068] The first part constrains the device voltage drop to meet the working conditions. Device voltage drop Exceeding the maximum allowable voltage drop threshold , the cost function value increases, and its rate of increase is determined by the parameter It is determined that when the voltage drop is less than the threshold, the cost function value tends to 0:
[0069]
[0070] The second part constrains the size of the decoupling capacitor to ensure the normal operation of the device. The capacitance value of each decoupling capacitor is as small as possible, and the constraint strength is determined by the parameter Decide:
[0071] Cost Function .
[0072] In the process of gradient optimization, the optimized feature quantity is continuously updated until it stabilizes (the gradient approaches 0). The value meets the voltage drop requirement while meeting the requirement of as small a capacitance as possible.
[0073] In step 105, a gradient descent optimization calculation is performed. A gradient descent algorithm is used to repeatedly simulate the full chip circuit to obtain an optimization gradient, and the size of the decoupling capacitor is iteratively updated.
[0074] In an embodiment of the present invention, the gradient descent algorithm includes:
[0075] a) Set the initial simulation conditions, including: initial decoupling capacitance value, initial learning rate, device current waveform, convergence threshold, etc.;
[0076] b) Full circuit simulation of characteristic quantities: dynamic voltage drop simulation of the full circuit is performed for each characteristic quantity;
[0077] c) According to the simulation results, obtain the corresponding cost function value and calculate the gradient;
[0078] d) Determine whether it converges: Determine the absolute value of the gradient. If it is less than the set convergence threshold, exit successfully, otherwise proceed to the next step;
[0079] e) Calculate the learning rate and update the feature quantity: Calculate the new learning rate and update the feature quantity according to the learning rate and gradient;
[0080] f) Return to b) for the next round of iterative calculation.
[0081] When determining the device current waveform, only the current in the clock cycle where the voltage drop problem exists is intercepted, which greatly shortens the simulation time.
[0082] In the embodiment of the present invention, both steps 101 and 105 require dynamic simulation of the entire circuit, filling the circuit netlist with matrix equations, and resistors and capacitors appear in the matrix on the left side of the matrix equation. , the node voltage appears as the unknown vector on the left side of the matrix equation The device current waveform fills the vector on the right side of the matrix equation In this way, we get the matrix equation:
[0083] Combined with the characteristics of circuit simulation, the LU decomposition method will be used to solve the equation to obtain the voltage value of each node in the circuit.
[0084] In the gradient descent algorithm described in this article, in order to calculate the gradient descent, it is necessary to perform multiple dynamic voltage drop simulations on the entire circuit, and each simulation calls the coefficient matrix will change, so that LU decomposition still occupies most of the simulation time. It is observed that the only thing that causes the matrix change is the decoupling capacitor. The matrix LU decomposition, which is relatively time-consuming in circuit simulation, only needs to be performed once in the present invention, which greatly increases the speed of optimization calculation. The method adopted is to convert the coefficient matrix The matrix elements are divided into blocks according to whether they change. The matrix elements related to the decoupling capacitors often change in the simulation, while other elements remain unchanged. Therefore, the node labels corresponding to the changed matrix elements are moved to the lower right corner of the matrix. middle:
[0085] reserve , then the coefficient matrix The LU decomposition of can be written as:
[0086] in, is a lower triangular matrix, is an upper triangular matrix:
[0087]
[0088]
[0089] In each full circuit simulation, the coefficient matrix In the LU decomposition of, , , , will remain unchanged, only , when the simulator is called again, only the matrix needs to be decomposed , and we get the matrix and matrix And the decoupling capacitor is only a small part of the entire circuit network. The dimension is much smaller than the entire matrix The dimension of the decoupling capacitor increases the computational complexity caused by the change of the coefficient matrix. The decomposition of can be ignored, which greatly increases the efficiency of the gradient descent algorithm.
[0090] Through the gradient descent algorithm, the characteristic quantity of the decoupling capacitor is continuously optimized, and finally the size of the decoupling capacitor is determined so that the chip meets the voltage drop requirements.
[0091] In fact, for ultra-large-scale circuits, the gradient descent algorithm process requires multiple full-circuit dynamic voltage drop simulations and still faces time bottlenecks. The optimization performance can be further improved by adjusting the initial value of the decoupling capacitor or optimizing the learning rate, or increasing parallel computing.
[0092] In an embodiment of the present invention, an electronic device is also provided. Figure 2 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 2 As shown, the electronic device of the present invention includes a processor 201 and a memory 202, wherein:
[0093] The memory 202 stores a computer program. When the computer program is read and executed by the processor 201 , the computer program executes the steps in the above-mentioned method embodiment for optimizing the decoupling capacitor of the power supply network based on the gradient descent algorithm.
[0094] In an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps in the method embodiment for optimizing the power supply network decoupling capacitor based on the gradient descent algorithm as described above when running.
[0095] In this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: 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, and other media that can store computer programs.
[0096] Those skilled in the art can understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for optimizing power network decoupling capacitors based on a gradient descent algorithm, characterized in that: The following steps are involved: Perform dynamic voltage drop simulation on the entire chip to identify the devices or areas where voltage drop problems occur; Determine the location and initial value of the decoupling capacitors based on the device or area where the voltage drop problem occurs; Taking the device operating voltage as the constraint and the capacitance value of the decoupling capacitor as the feature, a gradient optimization cost function is established, and the value of the cost weight parameter is determined; The decoupling capacitor is optimized by using a gradient descent algorithm to obtain a value of the decoupling capacitor; The cost function expression of the gradient optimization is: , in, is the cost function, The characteristic quantity representing the optimization of the cost function is the capacitance value of the decoupling capacitor, For the The voltage drop across the device, is the maximum allowable voltage drop threshold, , is the cost weight parameter, For the The capacitance value of the decoupling capacitor; The step of optimizing the decoupling capacitor by using a gradient descent algorithm to obtain a value of the decoupling capacitor further includes: Set the initial decoupling capacitor value, initial learning rate, device current waveform, and convergence threshold; Perform full circuit dynamic voltage drop simulation for each characteristic quantity; According to the simulation results, obtain the corresponding cost function value and calculate the gradient; Determine the absolute value of the gradient. If it is less than the set convergence threshold, exit successfully, otherwise proceed to the next step; Calculate the new learning rate and update the feature quantity according to the new learning rate and gradient; Perform the next round of iterative calculation to obtain the optimized value of the decoupling capacitor; The dynamic voltage drop simulation further comprises: Fill in the matrix equation according to the circuit netlist, fill in the resistance and capacitance in the coefficient matrix on the left side of the matrix equation, fill in the node voltage in the unknown vector on the left side of the matrix equation, and fill in the device current waveform in the vector on the right side of the matrix equation to obtain the matrix equation; The LU decomposition method is used to solve the matrix equation to obtain the voltage value of each node in the circuit.
2. The method for optimizing power network decoupling capacitors based on a gradient descent algorithm according to claim 1, characterized in that: The step of performing dynamic voltage drop analysis on the entire chip to determine the device or area where the voltage drop problem occurs further includes: analyzing the pin voltage waveform of each device in the circuit, taking the instantaneous maximum voltage difference between the power port pin and the voltage reference base point pin as the worst operating voltage, and comparing it with the ideal voltage; if the worst operating voltage is lower than the difference between the ideal voltage and the voltage drop threshold voltage, then the device or the area where it is located has a voltage drop problem.
3. The method for optimizing power network decoupling capacitors based on a gradient descent algorithm according to claim 1, characterized in that: The step of determining the position and initial value of the decoupling capacitor according to the device or region where the voltage drop problem occurs also includes: classifying the devices with the voltage drop problem according to the region and adding decoupling capacitors in the corresponding region.
4. The method for optimizing power network decoupling capacitors based on a gradient descent algorithm according to claim 1, characterized in that: Also includes: The coefficient matrix is divided into blocks according to whether the matrix elements change, and all matrix elements related to the decoupling capacitor are divided into the same matrix block, and the following is obtained: , in, is the coefficient matrix of the matrix equation, , , are all blocks with unchanged matrix elements, Filling the blocks forming the matrix element variations for all decoupling capacitors; Keeping the changed blocks, the coefficient matrix is decomposed by LU to obtain: , in, is a lower triangular matrix, is an upper triangular matrix: , ; When the emulator is called again, , , , Will remain unchanged, decomposition matrix Get the matrix and matrix .
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor is used to execute the computer program stored in the memory to implement the method for optimizing the decoupling capacitor of the power network based on the gradient descent algorithm as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the method for optimizing power network decoupling capacitance based on a gradient descent algorithm as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Quick method for implementing noise optimization of integrated circuit supply network using decoupling capacitor
CN1523662A
Fast on-chip decoupling capacitance budgeting method and device for reduced power supply noise
US20080134103A1
