CN-121981033-A - Automatic circuit optimization method and device, storage medium and electronic equipment
Abstract
The application discloses an automatic circuit optimizing method, an automatic circuit optimizing device, a storage medium and electronic equipment, wherein the automatic circuit optimizing method comprises the steps of obtaining an optimizing target, a constraint condition and an optimizing variable of a circuit to be optimized, determining a target optimizing algorithm according to the optimizing target and the optimizing variable, generating at least one group of candidate circuit parameters based on the target optimizing algorithm, calculating the fitness of the candidate circuit parameters according to the optimizing target and the constraint condition, and iteratively updating the candidate circuit parameters by utilizing the target optimizing algorithm based on the fitness until a preset termination condition is met to obtain the target circuit parameters. The application can improve the circuit optimization efficiency.
Inventors
- WANG YUEFAN
- LUO ZHIHONG
- CHEN QI
- LI XIAOYU
Assignees
- 上海概伦电子股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260116
Claims (10)
- 1. A method for automatically optimizing a circuit, comprising: Obtaining an optimization target, constraint conditions and optimization variables of a circuit to be optimized; Determining a target optimization algorithm according to the optimization target and the optimization variable; generating at least one set of candidate circuit parameters based on the target optimization algorithm; calculating the adaptability of the candidate circuit parameters according to the optimization target and the constraint condition; And based on the fitness, iteratively updating the candidate circuit parameters by using the target optimization algorithm until a preset termination condition is met, so as to obtain target circuit parameters.
- 2. The method of automatic circuit optimization according to claim 1, further comprising, after said generating at least one set of candidate circuit parameters based on said target optimization algorithm, before said calculating the fitness of said candidate circuit parameters according to said optimization target and constraints: automatically generating a corresponding circuit netlist based on the candidate circuit parameters; Calling an external simulator to simulate the circuit performance of the circuit netlist to obtain a simulation result; And extracting a performance index value corresponding to the optimization target from the simulation result.
- 3. The circuit automatic optimization method according to claim 2, wherein the calculating the fitness of the candidate circuit parameters according to the optimization objective and constraint conditions includes: Calculating an objective function value of each performance in the optimization target based on the performance index value; judging the feasibility of the candidate circuit parameters according to the constraint conditions; and calculating the fitness of the candidate circuit parameters based on the objective function value and the feasibility judging result.
- 4. The method of automatic circuit optimization according to claim 3, wherein calculating the fitness of the candidate circuit parameters based on the objective function value and the feasibility determination result comprises: If the feasibility judging result meets the constraint condition, the objective function value is directly used as the adaptability of the candidate circuit parameters; And if the feasibility judging result does not meet the constraint condition, adding a penalty term on the basis of the objective function value to calculate the fitness of the candidate circuit parameters.
- 5. The automatic circuit optimization method according to claim 1, wherein the determining a target optimization algorithm based on the optimization target and the optimization variables comprises: determining the number of the optimization targets, the feasible region of the optimization variables and simulation cost constraint; if the optimization targets are multiple and the simulation cost constraint is lower than a preset threshold, taking a multi-target evolutionary algorithm as a target optimization algorithm; If the optimization targets are multiple and the simulation cost constraint is lower than a preset threshold, taking a multi-target Bayesian optimization algorithm as a target optimization algorithm; If the optimization targets are multiple and the simulation cost constraint is higher than a preset threshold, taking the multi-target evolutionary algorithm as a target optimization algorithm; And if the optimization target is single and the feasible region of the optimization variable is a discrete or mixed space, taking a genetic algorithm or a simulated annealing algorithm as a target optimization algorithm.
- 6. The method of automatic circuit optimization according to claim 5, wherein if the target optimization algorithm is a multi-target evolutionary algorithm, the iteratively updating the candidate circuit parameters using the target optimization algorithm based on the fitness comprises: combining all candidate circuit parameters and the fitness thereof of the current iteration into a mixed population; Non-dominant sequencing is carried out on the mixed population to obtain a plurality of non-dominant front layers; Calculating the crowding degree distance of individuals in the same non-dominant front layer; based on the non-dominant ranking and the crowding degree distance, elite selection operation is carried out, and the next generation parent population is screened out; and executing crossover and mutation operation on the parent population to generate candidate circuit parameters for the next iteration.
- 7. The method of automatic circuit optimization according to claim 5, wherein if the target optimization algorithm is a multi-target bayesian optimization algorithm, the iteratively updating the candidate circuit parameters using the target optimization algorithm based on the fitness comprises: constructing all the historical candidate circuit parameters and corresponding performance index values as a training data set; based on the training data set, respectively constructing or updating a Gaussian process agent model for each optimization target; And determining candidate circuit parameters for the next iteration through a preset acquisition function based on the current Gaussian process agent model.
- 8. An automatic circuit optimizing apparatus, comprising: the acquisition unit is used for acquiring an optimization target, constraint conditions and optimization variables of the circuit to be optimized; the determining unit is used for determining a target optimization algorithm according to the optimization target and the optimization variable; a generation unit for generating at least one set of candidate circuit parameters based on the target optimization algorithm; the computing unit is used for computing the adaptability of the candidate circuit parameters according to the optimization target and the constraint condition; And the iteration unit is used for carrying out iteration update on the candidate circuit parameters by utilizing the target optimization algorithm based on the fitness until a preset termination condition is met, so as to obtain target circuit parameters.
- 9. A storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor to perform the method of circuit auto-optimization of any one of claims 1-7.
- 10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the circuit auto-optimization method of any one of claims 1-7 when the computer program is executed by the processor.
Description
Automatic circuit optimization method and device, storage medium and electronic equipment Technical Field The embodiment of the application relates to the technical field of integrated circuits, in particular to a method and a device for automatically optimizing a circuit, a storage medium and electronic equipment. Background In the field of integrated circuit design and manufacturing, general Purpose Input Output (GPIO) interface circuits and standard cell circuits are fundamental modules that constitute modern chip functions, whose performance directly affects the overall power consumption, speed, reliability and area of the chip. Along with the continuous evolution of process nodes, the complexity of circuit design is obviously improved, the design space is increasingly huge, and higher requirements are put on the circuit performance and the design efficiency. Currently, optimization of GPIOs and standard cell circuits still depends extensively on the experience of the design engineer and the manual iterative method. However, each parameter adjustment of the optimization method highly dependent on manual experience needs to regenerate a netlist and perform simulation, and the whole iteration process is long in time, and especially in a high-dimensional design space, the manual searching efficiency is extremely low, so that the optimization efficiency of a circuit is low. Disclosure of Invention The embodiment of the application provides a circuit automatic optimization method, a circuit automatic optimization device, a storage medium and electronic equipment, which can improve the optimization efficiency of a circuit. In a first aspect, an embodiment of the present application provides a method for automatically optimizing a circuit, including: Obtaining an optimization target, constraint conditions and optimization variables of a circuit to be optimized; Determining a target optimization algorithm according to the optimization target and the optimization variable; generating at least one set of candidate circuit parameters based on the target optimization algorithm; calculating the adaptability of the candidate circuit parameters according to the optimization target and the constraint condition; and based on the fitness, iteratively updating the candidate circuit parameters by using the target optimization algorithm until a preset termination condition is met to obtain target circuit parameters. In the circuit automatic optimization method provided by the embodiment of the application, after generating at least one group of candidate circuit parameters based on the target optimization algorithm, before calculating the fitness of the candidate circuit parameters according to the optimization target and the constraint condition, the method further comprises: automatically generating a corresponding circuit netlist based on the candidate circuit parameters; Calling an external simulator to simulate the circuit performance of the circuit netlist to obtain a simulation result; And extracting a performance index value corresponding to the optimization target from the simulation result. In the circuit automatic optimization method provided by the embodiment of the application, the calculating the adaptability of the candidate circuit parameters according to the optimization target and the constraint condition includes: Calculating an objective function value of each performance in the optimization target based on the performance index value; judging the feasibility of the candidate circuit parameters according to the constraint conditions; and calculating the fitness of the candidate circuit parameters based on the objective function value and the feasibility judging result. In the automatic circuit optimization method provided by the embodiment of the present application, the calculating the fitness of the candidate circuit parameters based on the objective function value and the feasibility judgment result includes: If the feasibility judging result meets the constraint condition, the objective function value is directly used as the adaptability of the candidate circuit parameters; And if the feasibility judging result does not meet the constraint condition, adding a penalty term on the basis of the objective function value to calculate the fitness of the candidate circuit parameters. In the automatic circuit optimization method provided by the embodiment of the application, the determining a target optimization algorithm according to the optimization target and the optimization variable comprises the following steps: determining the number of the optimization targets, the feasible region of the optimization variables and simulation cost constraint; If the optimization targets are multiple and the simulation cost constraint is lower than a preset threshold, taking a multi-target Bayesian optimization algorithm as a target optimization algorithm; If the optimization targets are multiple and the simulation cos