A method and system for optimizing integrated circuits based on rule-guided genetic algorithms

By introducing circuit design rules into the genetic algorithm, replacing random mutations, and combining SPICE simulation and parallel technology, the problem of low search efficiency in the optimization of complex analog integrated circuits is solved, and efficient and accurate circuit parameter optimization is achieved, which is suitable for complex circuits. Automation design.

CN114841106BActive Publication Date: 2024-09-27SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210358992.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-06
Publication Date
2024-09-27
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

When existing technologies optimize complex analog integrated circuits, the search efficiency is too low and difficult to meet practical application requirements. Especially for circuits with complex topological structures and relatively narrow solution spaces and parameter search spaces, the efficiency and accuracy of traditional optimization algorithms are insufficient.

Method used

Adopt a rule-guided genetic algorithm to embed circuit design rules into the traditional genetic algorithm, replace random mutations with rule-guided genetic mutations, improve the efficiency and accuracy of the optimization process, and combine SPICE simulation and parallel technology to achieve efficient circuit parameter optimization .

Benefits of technology

It significantly improves the efficiency and accuracy of analog integrated circuit optimization, reduces the consumption of computing resources, can find the global optimal solution on limited sampling points, and is suitable for circuit optimization with multiple design parameters and multiple design objectives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114841106B
    Figure CN114841106B
Patent Text Reader

Abstract

The present invention relates to an integrated circuit optimization method and system based on a rule-guided genetic algorithm. The present invention embeds analog circuit design rules into a traditional genetic algorithm, and uses experience-based design rules to guide random gene mutations in the traditional genetic algorithm to accelerate the optimization process. The present invention follows the selection and crossover operations of the traditional genetic algorithm, introduces design rules in the mutation stage, and traces back the father and mother of the current individual, performs a design rule-guided gene mutation on the father and mother, generates new fathers and mothers, and the new fathers and mothers re-cross to generate new individuals, which are added to the next generation population. This method has high optimization accuracy like the traditional genetic algorithm, and has faster convergence speed and higher optimization efficiency than the traditional genetic algorithm. For complex circuits such as a four-stage operational amplifier, it is difficult for traditional algorithms to search for solutions that meet the design indicators under limited sampling points, while the present invention can efficiently find solutions that meet the design indicators under the guidance of design rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an integrated circuit optimization method and system based on a rule-guided genetic algorithm, belonging to the technical field of analog integrated circuits. Background Art

[0002] Integrated circuit design is currently in a stage of rapid development. The continuous emergence of new devices and new processes has put forward higher requirements for integrated circuit design methods and design tools. According to the design category, the types of integrated circuits are mainly divided into two parts: digital integrated circuits and analog integrated circuits. Among them, digital integrated circuits have relatively mature electronic design automation (EDA) tools to assist in design, and have higher design efficiency. The development of analog integrated circuit EDA tools is relatively lagging, and the design of most analog integrated circuits mainly relies on manual debugging. For the selected circuit topology, due to the large number of analog integrated circuit design parameters, large design space, and numerous circuit performance indicators that are mutually restricted, designers often need to repeatedly weigh multiple interrelated circuit indicators. Therefore, analog integrated circuit parameter design is a process of multiple iterations and repeated trials, and manual debugging occupies most of the time of circuit design. In order to change the current situation of time-consuming and laborious manual debugging of analog integrated circuits, an automated parameter design tool is urgently needed.

[0003] In recent years, the rise of optimization algorithms and artificial intelligence algorithms has promoted the development of automatic design of analog integrated circuit parameters. Commonly used automatic design methods for analog integrated circuit parameters can be classified into two categories: model-based and simulation-based optimization methods. The model-based analog circuit parameter optimization design method first models the relationship between circuit performance and circuit parameters, and analyzes and adjusts circuit parameters based on the model. This method has high design efficiency, but approximations are often used in the model construction process, which is more suitable for qualitative analysis of circuit problems.

[0004] With the development of artificial intelligence, people have applied machine learning models to analog circuit parameter optimization, improving model accuracy. However, as the dimension and nonlinearity of the circuit parameter design search space increase, it is becoming increasingly difficult to build a proxy model that can accurately replace the entire design space. The simulation-based analog circuit parameter optimization design method does not directly derive the explicit equation between circuit performance and circuit parameters, but evaluates circuit performance through SPICE simulation to optimize circuit indicators. This method has high accuracy, but the optimization iteration requires a large number of SPICE simulations, which consumes more computing resources and longer running time.

[0005] The above optimization algorithms have been applied to the automatic optimization of small and medium-scale analog circuit netlists, such as two-stage operational amplifiers, charge pumps, voltage-controlled oscillators, complex filters, etc., and have achieved good optimization results. However, for analog circuits with complex topological structures and very narrow solution spaces compared to parameter search spaces, such as four-stage operational amplifiers, the search efficiency of these methods is too low to meet the requirements of practical applications. For the automatic optimization design of such complex analog circuits with very narrow solution spaces, there is an urgent need for an accelerated search method in multivariable space to design analog integrated circuits with excellent performance with higher efficiency. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides an integrated circuit optimization method and system based on a rule-guided genetic algorithm. The present invention embeds analog circuit design rules into traditional genetic algorithms, uses experience-based design rules to guide random gene mutations in traditional genetic algorithms to accelerate the optimization process, and takes into account both the efficiency and accuracy of analog circuit optimization. It is an analog circuit optimization method that can achieve both high optimization accuracy and optimization efficiency.

[0007] Terminology explanation:

[0008] 1. Cost value: It is a parameter to measure the performance of a circuit. It is calculated based on the circuit performance value obtained by SPICE simulation and the preset design index value. The smaller the cost value, the better the circuit performance. The circuit performance index used for cost value calculation can be one or more, that is, this method can achieve single-objective optimization or multi-objective optimization.

[0009] 2. Orthogonal Latin square: Latin square is a special square matrix, that is, each element appears only once in each row and column. If there is no repeated tuple in a composite square matrix composed of multiple Latin squares, the composite square matrix is ​​called an orthogonal Latin square.

[0010] 3. SPICE simulator: SPICE (Simulation program with integrated circuit simulation) is a powerful analog circuit simulator.

[0011] 4. Parallel simulation: Use multiple CPU cores to perform multiple SPICE simulations simultaneously.

[0012] 5. Circuit design variables: refers to the circuit design parameter values ​​that need to be changed in the circuit, such as resistance, capacitance, MOS tube width, etc.

[0013] 6. Circuit performance parameters: also known as circuit design indicators or circuit performance values. For example, the gain, bandwidth, phase margin, slew rate, power consumption, etc. of an operational amplifier.

[0014] 7. Crossover operator: refers to the operation of replacing the partial structures of two parents to generate a new individual in gene crossover or gene recombination. The operation of real number coding is usually called recombination, and the operation of binary coding is called crossover. The algorithms for direct coding (Normal) and Gray coding of binary coding of genes are both crossover operators.

[0015] The technical solution of the present invention is:

[0016] An integrated circuit optimization method based on rule-guided genetic algorithm is implemented by embedding circuit design rules into traditional genetic algorithms, and replacing traditional random mutations with mutations with a certain direction guided by design rules. This method can find the global optimal solution that meets the circuit performance parameters with higher efficiency using limited-scale sampling points. The steps are as follows:

[0017] Step 1: Get the initial population and set the initial population as the current population;

[0018] Step 2: Population evaluation, that is, by performing parallel SPICE simulation on each individual in the current population, the circuit performance parameters of each individual in the population are obtained;

[0019] Step 3: Calculate the cost value of each individual in the current population, and select the individual with the smallest cost value as the optimal individual in the population;

[0020] Step 4: Determine whether the optimal individual in the population meets the optimization termination condition. If so, the optimization ends and the individual with the smallest cost value in the current population is output, including its corresponding circuit design variables and circuit performance parameters. Otherwise, go to step 5.

[0021] Step 5: Population selection, that is, selecting excellent individuals from the initial population according to the cost value. The selected individuals are directly inherited to the next generation or are generated through the crossover and mutation operations in steps 6 and 7, and then inherited to the next generation. The individuals with smaller cost values ​​have a greater probability of being selected.

[0022] Step 6: Population crossover, i.e. randomly selecting a pair of individuals from the excellent individuals in the population as the father and mother, using the crossover operator to generate new individuals, and saving the position information of the individuals after the crossover and their parents in the population;

[0023] Step 7: By judging the random mutation probability of each individual, the population mutation method is selected. If the random mutation probability of the individual is greater than the preset total mutation rate, the individual is not mutated and is directly placed in the next generation population, and the process proceeds to step 9; if the random mutation probability of the individual is less than the preset total mutation rate and greater than the preset rule mutation rate, the individual is subjected to a traditional random mutation operation to generate a new individual, which is added to the next generation population, and the process proceeds to step 9; if the random mutation probability of the individual is less than the preset rule mutation rate, the individual is subjected to a rule-guided mutation operation, and the process proceeds to step 8;

[0024] Step 8: Rule-guided gene mutation, that is, by replacing individuals that do not meet the design index requirements according to the circuit design rules and the importance of the design goals for the individuals that are about to undergo rule-guided mutation operations, and adding them to the next generation population;

[0025] Step 9: Repeat steps 2 to 7;

[0026] Step 10: Get the optimization result.

[0027] Furthermore, in the step 1, obtaining the initial population specifically includes: sampling in the design space by an orthogonal Latin square method to obtain the initial population for the genetic algorithm.

[0028] Furthermore, in step 3, the circuit performance parameters and cost function F of each individual are used to calculate the circuit performance parameters and cost function F of each individual individual. cost , get the cost value of each individual in the population, that is, the cost value.

[0029] Furthermore, the cost function F cost for:

[0030]

[0031] Where N is the number of performance indicators to be optimized, n = 1, 2, ... N; P n is the difference between the SPICE simulation result and the circuit performance parameter for the nth circuit performance parameter; f(P n ) is a specific function of the cost function, including but not limited to linear, exponential, and Gaussian functions; W n is the weight, representing the importance of the nth circuit performance parameter, W n The value of is set by the user as required and is a real number.

[0032] Furthermore, the optimization termination condition in step 4 includes whether the number of iterations is greater than a preset maximum number of iterations and whether the current population minimum cost value is less than a preset cost value.

[0033] Furthermore, the total mutation rate in step 7 refers to the ratio of individuals that undergo mutation operations in the population. Regular mutation is the main component of mutation operations, and the regular mutation rate is always smaller than the total mutation rate.

[0034] Furthermore, the circuit design rules in step 8 specifically refer to parameter adjustment rules used when designing analog circuits, including but not limited to adjustment based on experience or adjustment based on circuit performance analytical expressions.

[0035] Furthermore, step 8 also includes tracing back to the father and mother before the crossover for the individual that is about to undergo the rule-guided mutation operation according to the position information of the current individual and its parents in the population recorded in step 6, and checking in turn whether all design indicators meet the design requirements. If the most important design goal currently does not meet the design indicator requirements, the circuit design variables related to the design indicator are changed according to the circuit design rules to obtain a new father and a new mother; otherwise, check whether the next design indicator meets the design requirements, and repeat the above rule-driven gene mutation process.

[0036] An integrated circuit optimization system based on a rule-guided genetic algorithm, comprising:

[0037] The population acquisition module is configured to obtain an initial population for the genetic algorithm by sampling in the design space through an orthogonal Latin square method;

[0038] The evaluation and judgment module is configured to obtain the circuit performance parameters of each individual in the population by performing parallel SPICE simulation on each individual in the initial population; calculate the cost value of each individual in the initial population, and select the individual with the smallest cost value as the optimal individual in the initial population; and judge whether the optimal individual meets the optimization termination condition;

[0039] The selection module is configured to select a population mutation mode by determining the random mutation probability of each individual;

[0040] The rule-guided module is configured to replace individuals that do not meet the design index requirements for individuals that are about to undergo rule-guided mutation operations according to circuit design rules and the importance of design goals, and add them to the next generation population.

[0041] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device, for a method for optimizing an integrated circuit based on a rule-guided genetic algorithm.

[0042] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the integrated circuit optimization method based on a rule-guided genetic algorithm.

[0043] The beneficial effects of the present invention are:

[0044] 1. The present invention proposes an integrated circuit optimization method and system based on a rule-guided genetic algorithm, which embeds design rules into the mutation process of a traditional genetic algorithm, replaces traditional random mutations with rule-guided mutations in a certain direction, and guides the optimization design of analog integrated circuits in a more direct and efficient manner, thereby improving the optimization efficiency.

[0045] 2. The present invention proposes an integrated circuit optimization method and system based on a rule-guided genetic algorithm, which combines the optimization algorithm, SPICE simulation and parallel technology to improve the optimization efficiency while ensuring the optimization accuracy.

[0046] 3. The present invention proposes an integrated circuit optimization method and system based on a rule-guided genetic algorithm. When the sampling points are restricted by computing resources, the parameter optimization design can be achieved without a large number of simulations or too many iterations, which saves a lot of computing resources and improves the efficiency of circuit design.

[0047] 4. The present invention proposes an integrated circuit optimization method and system based on rule-guided genetic algorithm, which supports the automated simulation of circuits optimized with multiple design parameters and multiple design objectives. For complex circuits whose solution space is very narrow compared to the entire design space, the improvement of optimization efficiency is more obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 The present invention is a schematic flow chart of an integrated circuit optimization method and system based on a rule-guided genetic algorithm.

[0049] Figure 2 The present invention provides a rule-guided genetic algorithm-based integrated circuit optimization method and system, which is a key step of the rule-guided gene mutation flow chart.

[0050] Figure 3 This is a structural diagram of a two-stage rail-to-rail operational amplifier circuit of Example 1 of an integrated circuit optimization method and system based on a rule-guided genetic algorithm of the present invention.

[0051] Figure 4 The cost value variation curve of the optimization process of the two-stage rail-to-rail operational amplifier circuit of Example 1 of the integrated circuit optimization method and system based on rule-guided genetic algorithm of the present invention is shown.

[0052] Figure 5 This is a structural diagram of a four-stage operational amplifier circuit of Example 2 of an integrated circuit optimization method and system based on a rule-guided genetic algorithm of the present invention.

[0053] Figure 6 The cost value variation curve of the optimization process of the four-stage operational amplifier circuit of Example 2 of the integrated circuit optimization method and system based on rule-guided genetic algorithm of the present invention. DETAILED DESCRIPTION

[0054] The present invention will be further defined below in conjunction with the accompanying drawings and embodiments, but is not limited thereto.

[0055] Example 1

[0056] Embodiment 1 of the present invention uses a rule-guided genetic algorithm to optimize the design of a two-stage rail-to-rail operational amplifier. Figure 3 The circuit diagram of the two-stage rail-to-rail operational amplifier described in this embodiment is implemented using a 65nm CMOS process. Table 1 lists the preset design goals of the two-stage rail-to-rail operational amplifier, namely, the circuit gain Gain, unit gain bandwidth UGB, phase margin PM are as large as possible, and the DC current Itot is as small as possible.

[0057] Table 1

[0058]

[0059] For this optimization goal, 13 circuit design variables to be optimized are selected, including the widths of 12 transistors W1, W3, W5, W9, W 13 ,W 16 ,W 19 ,W 20 ,W 21 ,W 22 ,W 47 ,W 48 And the compensation capacitor C m According to the current source replication and circuit symmetry, the sizes of other devices are as follows: the width of M2 is equal to that of M1, that is, W2 = W1; the width of M4 is equal to that of M3, that is, W4 = W3; M6-M8 and M 25 -M 29The width of M5 is equal to that of M5. In the current replication process, the multipliers of each MOS tube are different. For example, the width of M5 is W5, and the multiplier is set to 4, and its equivalent width is 4×W5. The width of M7 is also W5, but the multiplier is set to 4, and its equivalent width is 2×W5, which means that the current flowing through M5 is twice the current flowing through M7. In the embodiment, the multiplier is not used as a design variable, that is, it is considered that W6-W8=W 25 -W 29 =W5;M 10 -M 12 and M 30 -M 35 The width is the same as M9, but the multiplier is different; 14 ,M 15 and M 36 -M 39 Width and M 13 Equal, different multipliers; M 17 ,M 18 and M 40 -M 46 Width and M 16 Equal, different multipliers; W 23 =W 21 ; W 24 =W 22 .

[0060] The specific implementation steps are as follows:

[0061] Step 1: Generate an initial population. In order to reduce the number of individuals in the required population and make the individuals as evenly distributed as possible in the design space, uniformly sample each dimensional variable, form a Latin square matrix according to the Latin square construction principle, select multiple Latin squares according to the size of the parameter space to construct an orthogonal Latin square composite matrix, and obtain the initial population for the genetic algorithm. The design space refers to the range of values ​​of the circuit design variables, which is determined by the user; sampling refers to selecting multiple sets of variable values ​​in the design space. The sampled data (i.e., the initial population) includes multiple sets of circuit design variable values ​​(multiple individuals), and each set of design variable values ​​includes the values ​​of each design variable.

[0062] Step 2: Population evaluation: Using the SPICE simulator and combining parallel technology, parallel SPICE simulation is performed on each individual in the population to obtain the circuit performance parameters of each individual in the population.

[0063] Step 3: Calculate the cost value of each individual. The cost value calculation formula is shown in formula (II). The individual with the smallest cost value in the population is selected as the optimal individual.

[0064]

[0065] In formula (II), n = 1, 2, 3, 4 correspond to the four circuit performance parameters in Table 1; P n is the square of the difference between the SPICE simulation result and the circuit performance parameter for the nth circuit performance parameter; f(P n ) is the specific function of the cost function, and this example uses an exponential type; W n is the weight, representing the importance of the nth circuit performance parameter, W n The value of is set by the user as required and is a real number.

[0066] Step 4: Determine whether the optimal individual meets the optimization termination condition. That is, if the preset number of iterations is reached, or the minimum cost value of the current population is less than the predetermined minimum cost value, the optimization ends and the individual with the smallest cost value in the current population is output, including its corresponding circuit design variables and circuit performance parameters. If the optimization termination condition is not met, go to step 5.

[0067] Step 5: Population selection. Select the best individuals in the population according to the cost value. The selected individuals are directly inherited to the next generation or are inherited to the next generation after generating new individuals through the crossover and mutation operations in steps 6 and 7. The selection of the best individuals is based on the fact that the individuals with smaller cost values ​​have a greater probability of being selected.

[0068] Step 6: Population crossover. According to the pre-set probability, a pair of individuals are randomly selected from the excellent individuals in the population as the father and mother, and the crossover operator is used to cross over to generate new individuals, and the position information of the individuals after the crossover and their parents in the population is saved.

[0069] Step 7: Select the population mutation method. There are two types of mutation methods: random mutation and rule mutation. The rule mutation rate is always lower than the total mutation rate. A mutation probability is randomly generated for each individual in the population, and the total mutation rate is preset. If the mutation probability of the individual is higher than the preset total mutation rate, the individual will not be mutated and will be directly inherited to the next generation of population and become one of the individuals in the next generation of population, and then proceed to step 9; if the mutation probability of the individual is lower than the preset total mutation rate and higher than the preset rule mutation rate, the individual will be subjected to traditional random mutation operation to generate a new individual and add it to the next generation of population, and then proceed to step 9; if the mutation probability of the individual is lower than the preset rule mutation rate, the individual will be subjected to rule-guided mutation operation, and then proceed to step 8.

[0070] Step 8: Rule-guided gene mutation. For the individuals that are about to undergo rule-guided mutation operations, first trace back to the father and mother before the crossover according to the position information of the current individual and its parents in the population recorded in step 6, and then check all the design performance indicators of the father and mother individuals in turn according to the importance of the design goal to see if they meet the design requirements. The importance of the design goal is determined by the engineer according to the circuit design rules, and its implementation strategy is not unique. If the most important design goal does not meet the design indicator requirements, change the circuit design variables related to the design indicator according to the circuit design rules to obtain a new father and a new mother; otherwise, check whether the next design indicator meets the design requirements, and repeat the above rule-driven gene mutation process. Finally, the new father and the new mother use the crossover operator to re-cross to generate a new individual, replace the current individual, and join the next generation population.

[0071] Step 9: Repeat Step 2 to Step 7.

[0072] Step 10: Get the optimization result and output the circuit design parameters and circuit performance indicators corresponding to the individual with the smallest cost value in the current population.

[0073] As a further embodiment,

[0074] The design rules described in step 8 are defined by the user, and their implementation strategies are not unique. For Example 1, the design rules are as follows:

[0075] Rule 1: When the gain does not meet the design specifications, that is, the gain is too small, according to the circuit gain expression Gain = G m1 R O1 G m2 R o2 , where G m1 and G m2 is the equivalent transconductance of the first and second stages, R O1 and R o2 is the equivalent output resistance of the first and second stages. The parameter adjustment strategy adopted in this embodiment is to increase the transconductance of the first and second stages, that is, to increase W1, W3, W 19 ,W 20 .

[0076] Rule 2: When the unit gain bandwidth does not meet the design specifications, that is, the unit gain bandwidth is too small, according to the circuit unit gain bandwidth expression UGB = G m1 / C m The parameter adjustment strategy adopted in this embodiment is to reduce the compensation capacitor C m The value of .

[0077] Rule 3: When the phase margin does not meet the design specifications, that is, the phase margin is less than 60 degrees, according to design experience, the zero point ω of the right half plane z =G m2 / C m should be moved to a farther position. The parameter adjustment strategy adopted in this embodiment is to increase the transconductance of the second stage, that is, to increase W 19 ,W 20 .

[0078] Rule 4: When the DC current does not meet the design specification, that is, the DC current is greater than 180 μA, according to design experience, the second stage consumes a lot of current. The parameter adjustment strategy adopted in this embodiment is to reduce the second stage current, that is, reduce W 19 ,W 20 .

[0079] Each time the mutation guided by the design rules is executed, the first performance parameter is checked. Only one rule is executed for each mutation, and a new sire and a new mother are generated. That is, if the first performance parameter does not meet the design index, rule one is entered. After the parameter adjustment is completed according to rule one, a new sire and a new mother are generated, and subsequent performance parameters are no longer checked.

[0080] In this embodiment, a second-order rail-to-rail operational amplifier is optimized and designed using a conventional genetic algorithm (GA) and a rule-guided genetic algorithm (RG-GA), respectively. Both optimization methods are run in a server environment with 80 Intel Xeon 1.9-GHz CPU cores and 128-GB memory. Figure 4 The trend of the cost value of the two simulation circuit optimization methods is shown. The horizontal axis Iteration represents the number of iterations. The smaller the cost value, the better the circuit performance. Table 2 lists the optimization results of the two optimization methods.

[0081] Combination Figure 3 As can be seen from Table 2, both the traditional genetic algorithm (GA) and the rule-guided genetic algorithm (RG-GA) can find the optimal solution, but the rule-guided genetic algorithm (RG-GA) converges faster and has higher search efficiency. The optimal solution found by the traditional genetic algorithm (GA) has a higher unit gain bandwidth and a larger current, while the optimal solution of the rule-guided genetic algorithm (RG-GA) has a lower current, and the power consumption performance of the entire circuit has a significant advantage.

[0082] Table 2

[0083]

[0084] Example 2

[0085] Embodiment 2 of the present invention uses a rule-guided genetic algorithm to optimize the design of a four-stage operational amplifier with a more complex topology. Figure 5 The circuit diagram of the four-stage operational amplifier described in this embodiment includes a four-stage amplifier circuit, a bias circuit and a slew rate boost circuit (SRH). The typical application of the four-stage operational amplifier is to drive LCD, so the load capacitance required to be driven is relatively large. This embodiment is implemented using a 180nm CMOS process, with a power supply voltage VDD of 1.8V and a load capacitance of 12nF. Table 3 lists the design goals of the two-stage rail-to-rail operational amplifier, namely, the circuit gain Gain, unit gain bandwidth UGB, phase margin PM, gain margin GM, slew rate SRr and SRf are as large as possible, the DC current Itot is as small as possible, and the output node DC voltage Vout is close to VDD / 2, that is, 0.9V.

[0086] Table 3

[0087]

[0088] For this optimization goal, 18 circuit design variables to be optimized are selected, including the width W of 15 transistors. b1 ,W b3 ,W b6 ,W b7 ,W1,W3,W9,W 10 ,W 12 ,W 13 ,W 14 ,W 17 ,W 18 ,W 23 ,W 25 And the resistor R z , capacitor C m ,C z Based on current source replication and circuit symmetry, the sizes of other components are as follows: W b3 =W b4 =W b1 , W b5 =W5=W6=W b6 ,W b8 =W7=W8=W 21 =W 22 =W b7 , W b9 =W 11 =W 15 =W b2 ,W2=W 19 =W 20 =W1,W4=W3,W 16 =W 14 , W 24 =W 23 ,W26 =W 25 .

[0089] The specific implementation steps are as follows:

[0090] Step 1: Generate an initial population. In order to reduce the number of individuals in the required population and make the individuals as evenly distributed as possible in the design space, uniformly sample each dimensional variable, form a Latin square matrix according to the Latin square construction principle, select multiple Latin squares according to the size of the parameter space to construct an orthogonal Latin square composite matrix, and obtain the initial population for the genetic algorithm. The design space refers to the range of values ​​of the circuit design variables, which is determined by the user; sampling refers to selecting multiple groups of variable values ​​in the design space. The sampled data (i.e., the initial population) includes multiple groups of circuit design variable values ​​(multiple individuals), and each group of design variable values ​​includes the values ​​of each design variable.

[0091] Step 2: Population evaluation: Using the SPICE simulator and combining parallel technology, parallel SPICE simulation is performed on each individual in the population to obtain the circuit performance parameters of each individual in the population.

[0092] Step 3: Calculate the cost value of each individual. The cost value calculation formula is shown in formula (III), and the individual with the smallest cost value in the population is selected as the optimal individual.

[0093]

[0094] In formula (III), n = 1, 2, ..., 8 corresponds to the eight circuit performance parameters in Table 1; P n is the square of the difference between the SPICE simulation result and the circuit performance parameter for the nth circuit performance parameter; f(P n ) is the specific function of the cost function, and this example uses an exponential type; W n is the weight, representing the importance of the nth circuit performance parameter, W n The value of is set by the user as required and is a real number.

[0095] Step 4: Determine whether the optimal individual meets the optimization termination condition. That is, if the preset number of iterations is reached, or the minimum cost value of the current population is less than the predetermined minimum cost value, the optimization ends and the individual with the smallest cost value in the current population is output, including its corresponding circuit design variables and circuit performance parameters. If the optimization termination condition is not met, go to step 5.

[0096] Step 5: Population selection. Select the best individuals in the population according to the cost value. The selected individuals are directly inherited to the next generation or are inherited to the next generation after generating new individuals through the crossover and mutation operations in steps 6 and 7. The selection of the best individuals is based on the fact that the individuals with smaller cost values ​​have a greater probability of being selected.

[0097] Step 6: Population crossover. According to the pre-set probability, a pair of individuals are randomly selected from the excellent individuals in the population as the father and mother, and the crossover operator is used to cross over to generate new individuals, and the position information of the individuals after the crossover and their parents in the population is saved.

[0098] Step 7: There are two types of mutation: random mutation and rule mutation. The rule mutation rate is always lower than the total mutation rate. A mutation probability is randomly generated for each individual in the population, and the total mutation rate is preset. If the mutation probability of the individual is higher than the total mutation rate, the individual is not mutated and is directly inherited to the next generation of the population, becoming one of the individuals in the next generation of the population, and proceeding to step 9; if the mutation probability of the individual is lower than the total mutation rate and higher than the rule mutation rate, the individual is subjected to a traditional random mutation operation to generate a new individual, which is added to the next generation of the population, and proceeding to step 9; if the mutation probability of the individual is lower than the rule mutation rate, the individual is subjected to a rule-guided mutation operation, and proceeding to step 8.

[0099] Step 8: Rule-guided gene mutation. For the individuals that are about to undergo rule-guided mutation operations, first trace back to the father and mother before the crossover according to the position information of the current individual and its parents in the population recorded in step 6, and then check all the design performance indicators of the father and mother individuals in turn according to the importance of the design goal to see if they meet the design requirements. The importance of the design goal is determined by the engineer according to the circuit design rules, and its implementation strategy is not unique. If the most important design goal does not meet the design indicator requirements, change the circuit design variables related to the design indicator according to the circuit design rules to obtain a new father and a new mother; otherwise, check whether the next design indicator meets the design requirements, and repeat the above rule-driven gene mutation process. Finally, the new father and the new mother use the crossover operator to re-cross to generate a new individual, replace the current individual, and join the next generation population.

[0100] Step 9: Repeat Step 2 to Step 7.

[0101] Step 10: Get the optimization result and output the circuit design parameters and circuit performance indicators corresponding to the individual with the smallest cost value in the current population.

[0102] The design rules described in step 8 are defined by the user, and their implementation strategies are not unique. For Example 2, the design rules are as follows:

[0103] Rule 1: When the gain is much smaller than the design index, that is, the gain is less than 80% of the design index, it is considered that the circuit DC operating point has deviated. The strategy adopted in this example is to adjust the DC operating point step by step based on the designer's experience so that the amplifier and load tubes of each stage are in the saturation zone.

[0104] Rule 2: When the gain is slightly less than the design index, that is, the gain is greater than 80% of the design index but does not meet the design index, according to the circuit gain expression Gain = G m1 R O1 G m2 R o2 G m3 R O3 G m4 R O4 , where G mi (i=1,2,3,4) and R Oi (i=1,2,3,4) are the equivalent transconductance and equivalent output resistance of the i-th stage respectively. The parameter adjustment strategy adopted in this embodiment is to increase the transconductance of the first to fourth stages, that is, to increase W1, W 12 ,W 13 ,W 18 ,Due to the complex topology of the four-stage operational amplifier, the DC operating point of the ,latter stage is easily affected by the previous stage, and the adjustment step size ,takes the minimum step size.

[0105] Rule 3: When the unit gain bandwidth does not meet the design specifications, that is, the unit gain bandwidth is too small, according to the circuit unit gain bandwidth expression UGB = G m1 / C m The parameter adjustment strategy adopted in this embodiment is to reduce the compensation capacitor C m The value of .

[0106] Rule 4: When the phase margin does not meet the design specifications, that is, the phase margin is less than 60 degrees, according to design experience, the compensation zero point ω z =1 / R z C z The parameter adjustment strategy adopted in this embodiment is to increase R z and C z .

[0107] Rule 5: When the gain margin does not meet the design specifications, that is, the gain margin is less than 10dB, according to design experience, the compensation zero point in Rule 4 needs to be enlarged. In order to minimize the change in phase margin, this example only reduces R z .

[0108] Rule 6: When the rising slew rate does not meet the design specifications, that is, the rising slew rate is too small, because the rising slew rate is mainly affected by the charging time of the output node to the capacitor. The parameter adjustment strategy adopted in this example is to increase W 17 and W 23 .

[0109] Rule 7: When the falling slew rate does not meet the design specifications, that is, the falling slew rate is too small, because the falling slew rate is mainly affected by the discharge time of the output node capacitor. The parameter adjustment strategy adopted in this example is to increase W 18 and W 25 .

[0110] Rule 8: When the DC current does not meet the design specification, that is, the DC current is too large, according to design experience, the second stage consumes a lot of current. The parameter adjustment strategy adopted in this embodiment is to reduce the second stage current, that is, reduce W 17 ,W 18 .

[0111] Rule 9: When the output node operating voltage does not meet the design specification, that is, the output node voltage deviates from 0.9V, the parameter adjustment strategy adopted in this embodiment is to adjust the width ratio of the output stage, that is, W 17 / W 18 .

[0112] Each time the mutation guided by the design rules is executed, the first performance parameter is checked. Only one rule is executed for each mutation, and a new sire and a new mother are generated. That is, if the first performance parameter does not meet the design index, rule one is entered. After the parameter adjustment is completed according to rule one, a new sire and a new mother are generated, and subsequent performance parameters are no longer checked.

[0113] In this embodiment, a four-stage operational amplifier is optimized by using a conventional genetic algorithm (GA) and a rule-guided genetic algorithm (RG-GA), respectively. Both optimization methods are run in a server environment with 80 Intel Xeon 1.9-GHz CPU cores and 128-GB memory. Figure 6 The figure shows the trend of the cost values ​​of the two simulation circuit optimization methods. The horizontal axis Iteration represents the number of iterations. The smaller the cost value, the better the circuit performance. The initial values ​​of the circuit design parameters are obtained by hand calculation. Since the offset of the DC operating point of the front stage of the four-stage operational amplifier will have a greater impact on the back stage, the error of the hand calculation will be relatively large, which means that the initial cost value of the circuit performance will be relatively large. Figure 6It can be seen that the cost value obtained by the rule-guided genetic algorithm (RG-GA) can continue to decrease and begins to converge after 16 iterations. However, the cost of the traditional genetic algorithm (GA) no longer decreases from the 6th iteration, and is still greater than 90 when the algorithm stops at the 25th generation, which means that the traditional genetic algorithm (GA) has failed to find a suitable feasible solution.

[0114] Table 4 lists the optimization results of these two optimization methods. It can be seen that the solution gain found by the traditional genetic algorithm (GA) is only 46.4dB, which is too low for a four-stage operational amplifier, so this solution has no practical value. The solutions found by the rule-guided genetic algorithm (RG-GA) can meet the design indicators. Therefore, it can be concluded that for a four-stage operational amplifier with a more complex circuit topology, under the condition of limited sampling points, the traditional genetic algorithm (GA) cannot find a feasible solution, but the rule-guided genetic algorithm (RG-GA) can.

[0115] Table 4

[0116]

[0117] Example 3

[0118] An integrated circuit optimization system based on a rule-guided genetic algorithm, comprising:

[0119] The population acquisition module is configured to obtain an initial population for the genetic algorithm by sampling in the design space through an orthogonal Latin square method;

[0120] The evaluation and judgment module is configured to obtain the circuit performance parameters of each individual in the population by performing parallel SPICE simulation on each individual in the initial population; calculate the cost value of each individual in the initial population, and select the individual with the smallest cost value as the optimal individual; and judge whether the optimal individual meets the optimization termination condition;

[0121] The selection module is configured to select a population mutation mode by determining the random mutation probability of each individual;

[0122] The rule-guided module is configured to replace individuals that do not meet the design index requirements for individuals that are about to undergo rule-guided mutation operations according to circuit design rules and the importance of design goals, and add them to the next generation population.

[0123] Example 4

[0124] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded and executed by a processor of a terminal device. A rule-guided genetic algorithm-based integrated circuit optimization method provided in this embodiment.

[0125] Example 5

[0126] A terminal device includes a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, and the instructions are suitable for being loaded and executed by the processor. A rule-guided genetic algorithm-based integrated circuit optimization method provided in this embodiment.

[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0131] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0132] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for optimizing integrated circuits based on a rule-guided genetic algorithm, characterized in that: The implementation method is to embed circuit design rules into the traditional genetic algorithm, and replace the traditional random mutation with the mutation with a certain direction guided by the design rules. This method can find the global optimal solution that meets the circuit performance parameters with higher efficiency using a limited number of sampling points. The steps include: Step 1: Get the initial population and set the initial population as the current population; Step 2: Population evaluation, that is, by performing parallel SPICE simulation on each individual in the current population, the circuit performance parameters of each individual in the population are obtained; Step 3: Calculate the cost value of each individual in the current population, and select the individual with the smallest cost value as the optimal individual in the population; Step 4: Determine whether the optimal individual in the population meets the optimization termination condition. If so, the optimization ends and the individual with the smallest cost value in the current population is output, including its corresponding circuit design variables and circuit performance parameters. Otherwise, go to step 5. Step 5: Population selection, that is, selecting excellent individuals from the initial population according to the cost value; Step 6: Population crossover, i.e. randomly selecting a pair of individuals from the excellent individuals in the population as the father and mother, using the crossover operator to generate new individuals, and saving the position information of the individuals after the crossover and their parents in the population; Step 7: By judging the random mutation probability of each individual, the population mutation method is selected. If the random mutation probability of the individual is greater than the preset total mutation rate, the individual is not mutated and is directly placed in the next generation population, and the process proceeds to step 9; if the random mutation probability of the individual is less than the preset total mutation rate and greater than the preset rule mutation rate, the individual is subjected to a traditional random mutation operation to generate a new individual, which is added to the next generation population, and the process proceeds to step 9; if the random mutation probability of the individual is less than the preset rule mutation rate, the individual is subjected to a rule-guided mutation operation, and the process proceeds to step 8; Step 8: Rule-guided gene mutation, that is, by replacing individuals that do not meet the design index requirements according to the circuit design rules and the importance of the design goals for the individuals that are about to undergo rule-guided mutation operations, and adding them to the next generation population; Step 9: Repeat steps 2 to 7; Step 10: Get the optimization result.

2. The integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 1, characterized in that: In the step 1, obtaining the initial population specifically includes: sampling in the design space by an orthogonal Latin square method to obtain the initial population for the genetic algorithm.

3. The integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 1, characterized in that: The step 3 specifically includes using the circuit performance parameters and cost function F of each individual cost , get the cost value of each individual in the population, that is, the cost value.

4. The integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 3, characterized in that: The cost function F cost for: Where N is the number of performance indicators to be optimized, n = 1, 2, ... N; P n is the difference between the SPICE simulation result and the circuit performance parameter for the nth circuit performance parameter; f(P n ) is a specific function of the cost function, including but not limited to linear, exponential, and Gaussian functions; W n is the weight, representing the importance of the nth circuit performance parameter, W n The value of is set by the user as required and is a real number.

5. The integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 1, characterized in that: The optimization termination condition in step 4 includes whether the number of iterations is greater than a preset maximum number of iterations and whether the current population minimum cost value is less than a preset cost value.

6. The integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 1, characterized in that: The total mutation rate in step 7 refers to the ratio of individuals in the population that undergo mutation operations. Regular mutation is the main component of mutation operations, and the regular mutation rate is always smaller than the total mutation rate.

7. The integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 1, characterized in that: The step 8 also includes tracing back to the father and mother before the crossover for the individual that is about to undergo the rule-guided mutation operation according to the position information of the current individual and its parents in the population recorded in step 6, and checking in turn whether all design indicators meet the design requirements. If the most important design goal currently does not meet the design indicator requirements, the circuit design variables related to the design indicator are changed according to the circuit design rules to obtain a new father and a new mother; otherwise, check whether the next design indicator meets the design requirements, and repeat the above rule-driven gene mutation process.

8. An integrated circuit optimization system based on rule-guided genetic algorithm, used to implement the integrated circuit optimization method based on rule-guided genetic algorithm as claimed in claim 1, characterized in that: include: The population acquisition module is configured to obtain an initial population for the genetic algorithm by sampling in the design space through an orthogonal Latin square method; The evaluation and judgment module is configured to obtain the circuit performance parameters of each individual in the population by performing parallel SPICE simulation on each individual in the initial population; calculate the cost value of each individual in the initial population, and select the individual with the smallest cost value as the optimal individual in the initial population; and judge whether the optimal individual meets the optimization termination condition; The selection module is configured to select a population mutation mode by determining the random mutation probability of each individual; The rule-guided module is configured to replace individuals that do not meet the design index requirements for individuals that are about to undergo rule-guided mutation operations according to circuit design rules and the importance of design goals, and add them to the next generation population.

9. A computer-readable storage medium, characterized in that: A plurality of instructions are stored therein, and the instructions are suitable for being loaded by a processor of a terminal device and executing an integrated circuit optimization method based on a rule-guided genetic algorithm according to any one of claims 1 to 7.

10. A terminal device, characterized in that: The invention comprises a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; and the computer-readable storage medium is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing a rule-guided genetic algorithm-based integrated circuit optimization method according to any one of claims 1 to 7.