CN112001140B - Useful deviation time sequence optimization method based on PSO algorithm - Google Patents

Useful deviation time sequence optimization method based on PSO algorithm Download PDF

Info

Publication number
CN112001140B
CN112001140B CN202011165958.8A CN202011165958A CN112001140B CN 112001140 B CN112001140 B CN 112001140B CN 202011165958 A CN202011165958 A CN 202011165958A CN 112001140 B CN112001140 B CN 112001140B
Authority
CN
China
Prior art keywords
optimal solution
global optimal
time
pso algorithm
particle position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011165958.8A
Other languages
Chinese (zh)
Other versions
CN112001140A (en
Inventor
黄凯
李鹏
李立浧
习伟
曾祥君
尹项根
宋怡瞳
郑丹丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN202011165958.8A priority Critical patent/CN112001140B/en
Publication of CN112001140A publication Critical patent/CN112001140A/en
Application granted granted Critical
Publication of CN112001140B publication Critical patent/CN112001140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • G06F30/3315Design verification, e.g. functional simulation or model checking using static timing analysis [STA]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Design And Manufacture Of Integrated Circuits (AREA)

Abstract

The invention discloses a useful deviation time sequence optimization method based on a PSO algorithm, which comprises the following steps: s1, selecting path common points and adding the common points into a buffer; s2, taking the path common point as a particle, taking the buffer quantity as a particle position, taking the sum of worst violations of the establishing time and the holding time as a global optimal solution, and obtaining the optimal buffer quantity by adopting a PSO algorithm, wherein the steps of: s21, randomly generating initial particle positions; s22, inputting the initial particle position into a skew function to obtain an individual optimal solution and a global optimal solution; s23, entering a circulation, inputting the particle position into a skew function, updating the individual optimal solution, and obtaining the current round of global optimal solution; s24, if the global optimal solution of the current round is larger than the global optimal solution, the global optimal solution of the current round is used as the global optimal solution, otherwise, the global optimal solution is not changed; s25, updating the speed; and S26, updating the particle position, if continuing to loop to step S23, and if ending the loop, outputting the particle position.

Description

Useful deviation time sequence optimization method based on PSO algorithm
Technical Field
The invention relates to the technical field of chip physical design static time sequences, in particular to a useful deviation time sequence optimization method based on a PSO algorithm.
Background
As the design requirements of integrated circuits are higher, the circuit scale increases, the combinational logic level increases, and it is more difficult to make the circuit reach timing closure. The timing closure of an integrated circuit consists of two parts, namely, keeping time closure and establishing time closure. For circuits, hold time (hold) is directly related to the circuit function, which can cause problems if the hold time does not converge. The setup time (setup) is related to the frequency of the circuit, and if the setup time is not converged, the operating frequency of the circuit may not meet the design requirement. Therefore, in engineering projects, in order to ensure that the functions of the chip operate normally, the hold time violation should be eliminated first, and then the setup time violation should be repaired as much as possible.
The clock of an integrated circuit is usually tree-shaped, i.e. the work difficulty of timing repair is simplified by ensuring that the clock trees reaching each node are the same length. But there is a conflict between the setup time and the hold time for reaching the same point. That is, if there is a certain margin (slack) in the hold time at a certain point and there is a violation in the setup time, the margin of the hold time can be "borrowed" into the setup time by changing the length of the clock tree at this point, reducing the margin of the hold time and also reducing the violation in the setup time. This method is called useful bias (usefull skew) optimization. But this situation may also result in a new hold time violation being generated when optimizing the setup time. Therefore, two factors are combined to optimize the timing sequence.
Disclosure of Invention
In order to solve the defects of the prior art and achieve the purpose of reducing the violation of the retention time when the useful deviation is optimized to establish the time, the invention adopts the following technical scheme:
a useful deviation time sequence optimization method based on a PSO algorithm comprises the following steps:
s1, selecting path common points and adding the common points into a buffer;
s2, taking the path common points as particles, taking the buffer number as the Particle positions, taking the sum of worst violations of the setup time and the hold time as a global optimal solution, and obtaining the optimal buffer number by adopting a PSO (Particle Swarm Optimization) algorithm, wherein the method comprises the following steps:
s21, randomly generating initial particle positions;
s22, inputting the initial particle position into a skew function to obtain an individual optimal solution and a global optimal solution;
s23, entering a circulation, inputting the particle position into a skew function, updating the individual optimal solution, and obtaining the current round of global optimal solution;
s24, if the global optimal solution of the current round is larger than the global optimal solution, the global optimal solution of the current round is used as the global optimal solution, otherwise, the global optimal solution is unchanged;
s25, updating the speed according to the particle position, the global optimal solution and the inertia weight:
Figure 164DEST_PATH_IMAGE001
wherein vel is velocity, w is inertial weight, r1, r2 are random numbers between 0 and 1, c1, c2 are learning factors, pos is particle position, pbest is individual optimal solution, gbest is global optimal solution;
and S26, updating the particle position according to the updated speed:
Figure 486640DEST_PATH_IMAGE002
and judging whether the circulation meets the end condition, if not, entering the step S23, and if so, outputting the particle position, namely obtaining the optimized number of the buffers.
The PSO algorithm is applied to the signature and check stage of time sequence analysis of chip physical design, and is mainly used for optimizing and establishing time violation and improving the running frequency of the chip. In a chip system, a plurality of groups of ports are provided, each group of ports is provided with a path common point, buffers are added to the common points to adjust the length of a clock tree, the number of the buffers added to each path common point is taken as an independent variable of a function, the time sequence of the group is repaired by adjusting the independent variable, after the time sequences of the groups with the worst time sequence on the chip are repaired, the whole time sequence of the chip is also repaired, the simulation result of the optimization mode is more real, and the follow-up establishment time and holding time violation analysis can be carried out.
The inertial weight decreases with increasing number of iterations:
Figure 777944DEST_PATH_IMAGE003
whereintFor the current number of iterations, T is the set maximum number of iterations, and wmax and wmin are ranges of w. The larger the inertia weight is, the smaller the influence of the global optimal solution and the individual optimal solution on the speed and the particle position is, and the possibility of falling into the local optimal solution is high.
The skew function converts the number of the buffers into commands in the PT tool through the script, carries out time sequence analysis through the PT tool, reports new optimized holding time and worst time violation, and sums the holding time and the worst time violation through the script and outputs a global optimal solution.
And acquiring a port corresponding to the worst setup time violation, and reporting the worst hold time violation of the port. The method is used for eliminating the influence of other holding time violations on optimization, and finally, a situation that the setup time is greatly optimized and the holding time violations are not much increased is achieved, namely the situation that the setup time violations are repaired in an ideal way.
In step S1, a point on a group of port paths to be repaired is taken as a common point of the paths, and performing the useful bias optimization at this point can effectively reduce the number of particles in the optimization algorithm.
A drawing step is added between the steps S24 and S25, the relation between the current cycle number and the global optimal solution is drawn, the optimization effect can be seen more visually, and the optimization iteration number is set conveniently.
The skew function sets the processes of inputting the number of the buffers to the script, acquiring new optimized holding time from the script and establishing the worst time violation as a cycle, and actually increases the times of time sequence analysis by times, so that the result of each PSO cycle has a higher reference value.
The invention has the advantages and beneficial effects that:
on the basis of the analysis of the violation of the setup time and the hold time in the original static time sequence analysis of the physical design of the chip, the setup time is optimized by using a useful deviation optimization method, and the PSO algorithm is combined, so that the violation of the hold time on the basis of optimizing the setup time is better ensured to be smaller, the function of the chip is ensured, and the running frequency of the chip is improved.
Drawings
FIG. 1 is a schematic diagram of the PSO algorithm of the present invention.
Fig. 2 is a flow chart of the overall operation of the method of the present invention.
FIG. 3 is a flowchart illustrating the operation of the skew script in the present invention.
FIG. 4 is a flowchart illustrating the operation of get _ wns script in the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
The PSO algorithm is a model for simulating a bird swarm to find food, that is, when a certain bird finds food, the overall flight direction of the bird swarm is propelled in the direction, and finally the global optimum (gbest) and the individual optimum (pbest) of each particle are achieved. This algorithm is typically used to find the most valued of the function.
As shown in fig. 1, initialization of some variables including the number of particles, the maximum velocity, the range of positions (positions) of the particles, and a function, which is skew, is performed first. An initial pos is generated by using a random number, and a skew function is called to obtain pbest and gbest at the position.
Then the algorithm enters a loop, the loop frequency is adjustable, and the algorithm is set to be 100 times in the invention in consideration of time cost. In the loop, pbest and the maximum value itr _ best obtained in the current loop are updated according to pos, namely gbest obtained in the current loop. Itr _ best is compared with the original gbest, if itr _ best is larger than the original gbest, the gbest is updated, otherwise the gbest is not changed. And drawing is carried out next step, the abscissa is the current cycle number, and the ordinate is the gbest, so that the optimization effect can be seen more visually, and the optimization iteration number can be set conveniently. Then, the kernel of the PSO algorithm is obtained, that is, according to the relationship between the current position and the gbest and the weight updating speed:
Figure 779399DEST_PATH_IMAGE001
whereinwIs the weight of the inertia, and,r 1r 2is a random number between (0, 1).c 1c 2Is a learning factor. Then according tovelUpdatingpos
Figure 447140DEST_PATH_IMAGE002
As can be seen from the formula, the larger the inertial weight is, the less the velocity and the position are influenced by the global optimal solution and the individual optimal solution, and the local optimal solution may be involved. In order to overcome the problem, the inertia weight is set to be reduced along with the increase of the iteration times, so that the influence of the later optimal solution on the speed and the position is increased, and the bootstrap program finds the global optimal solution. Is shown in the following formula, whereintAnd T is the set maximum iteration number for the current iteration number. In the invention is provided withw max=0.9,w min=0.4, decreasing as the number of cycles increases.
Figure 584861DEST_PATH_IMAGE003
In the timing optimization, the global optimum is set as a case where the sum of worst violations (WNS) of the setup time and the hold time is as close to 0 as possible, i.e., a case where the timing is the best (WNS itself is a negative number, and the maximum is 0). The particles are common points of the paths where the timing violation exists at present. Namely, the time sequence result is regarded as a function, and the useful deviation in the useful deviation optimization method is regarded as an independent variable of the function. By adjusting the useful deviation, a situation is finally reached where the setup time is optimized substantially without much larger hold time violations, i.e. the situation of the setup time violations in the ideal is repaired.
As shown in fig. 2, in the useful bias timing optimization method based on the PSO algorithm, first, the hold time violation is almost 0 in the item, and under the condition that the setup time violation is not optimized, a group of ports where the setup time violation is most difficult to repair is found out. The port which catches the set of the establishment time violation is at a point on a path in the establishment time timing report, and the point is usually a common point of a plurality of paths which establish the time violation path, and the number of particles in the optimization algorithm can be effectively reduced by carrying out the useful bias optimization at the point.
The entry point for a useful bias optimization method is to add a buffer (buffer) to adjust the length of the clock tree, i.e., the argument that takes the number of buffers added per path common point as a function, namely pos. Compared with other methods, the result simulated by the optimization method is more real, and subsequent establishment time and holding time violation analysis can be performed. Therefore, the common point of each path is set as a particle, and the number of buffers added to the common point of the path is set as an entry point for optimizing the particle timing. The invention utilizes Prime Time software of Synopsys company to carry out experiments, a PT tool is usually used for signature timing analysis, and the tool can simulate the influence of the PT tool on the establishing Time and the holding Time according to various parameters of the buffer after the buffer is inserted, and further calculate the change of the establishing Time and the holding Time.
And at the initial stage of operation, randomly generating the number of buffers added to the common point of each path, wherein the generated number of buffers is the input of the skew function. This number is translated into commands in the PT tool using scripts. When the PT tool performs timing analysis, the command just generated is read, and then timing analysis after adding a buffer is performed. And reporting a new worst default of the holding time caused by optimization in the time sequence analysis, and then reporting a worst default of the establishing time of the group for optimization. Adding the two results, inputting the result into a PSO algorithm as a function value of a skew function under the condition that the number of buffers at the moment is input, carrying out optimization direction analysis according to the result and the above formula by the algorithm, generating the number of new buffers added with the common points of the paths, further carrying out the next cycle, wherein the cycle number can be set at will, and the optimal result, namely the optimal number of buffers, is obtained after several cycles.
In the present invention, in order to optimize the setup time and the hold time simultaneously, the results of the two terms are added. To eliminate the impact of other hold time violations on the optimization, only the points associated with the endpoints in the setup time report are screened for reporting when a hold time violation is reported. As shown in fig. 3, when the holding times of the endpoints are not violated, the holding times are uniformly set to 0, so that the influence on the optimization of the setup time is avoided.
As shown in fig. 4, in the operation process of the skew function, a loop is also included, in order to make the result of each PSO loop have a reference value, the number of cycles of the skew in the experiment is recorded as N and is set to 8, so that the timing analysis is actually performed 800 times in 100 rounds of PSO algorithm loops.
In a system-on-chip, there are multiple groups of ports, each group of ports has a path common point, and adding a buffer to the common point can repair the timing of the group. After the time sequences of the groups with the worst time sequence on the chip are repaired, the time sequence of the whole chip is also repaired.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (4)

1. A useful deviation time sequence optimization method based on a PSO algorithm is characterized in that the PSO algorithm is applied to a signature stage of time sequence analysis of chip physical design, and the method comprises the following steps:
s1, selecting a common point of the path, taking the last point of a group of port paths with the most difficult time violation to be repaired as the common point of the path, and adding the common point into a buffer;
s2, using the common points of the paths as particles, using the number of buffers as particle positions, converting the number of the buffers into commands in a PT tool through a script by a skew function, carrying out time sequence analysis through the PT tool, obtaining ports corresponding to worst setup time violations, reporting the worst hold time violations to the ports, uniformly setting the worst hold time violations to 0 when the hold times of the ports are not violated, using the sum of the worst setup time violations and the worst hold time violations as a global optimal solution, and obtaining the optimal number of the buffers by adopting a PSO algorithm, wherein the method comprises the following steps:
s21, randomly generating initial particle positions;
s22, inputting the initial particle position into a skew function to obtain an individual optimal solution and a global optimal solution;
s23, entering a circulation, inputting the particle position into a skew function, updating the individual optimal solution, and obtaining the current round of global optimal solution;
s24, if the global optimal solution of the current round is larger than the global optimal solution, the global optimal solution of the current round is used as the global optimal solution, otherwise, the global optimal solution is unchanged;
s25, updating the speed according to the particle position, the global optimal solution and the inertia weight:
Figure DEST_PATH_IMAGE001
wherein vel is velocity, w is inertial weight, r1, r2 are random numbers between 0 and 1, c1, c2 are learning factors, pos is particle position, pbest is individual optimal solution, gbest is global optimal solution;
and S26, updating the particle position according to the updated speed:
Figure DEST_PATH_IMAGE002
and judging whether the circulation meets the end condition, if not, entering the step S23, and if so, outputting the particle position, namely obtaining the optimized number of the buffers.
2. The PSO algorithm-based useful bias timing optimization method of claim 1, wherein the inertial weight decreases with increasing number of iterations:
Figure DEST_PATH_IMAGE003
whereintFor the current number of iterations, T is the set maximum number of iterations, and wmax and wmin are ranges of w.
3. The PSO algorithm-based method for optimizing timing of useful bias according to claim 1, wherein a mapping step is added between steps S24 and S25 to map the relationship between the current cycle number and the global optimal solution.
4. The PSO algorithm-based method for optimizing timing of useful skew as claimed in claim 1, wherein the skew function loops the number of input buffers to the script and the process of obtaining the optimized new hold time and establishing the worst-case time violation from the script.
CN202011165958.8A 2020-10-27 2020-10-27 Useful deviation time sequence optimization method based on PSO algorithm Active CN112001140B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011165958.8A CN112001140B (en) 2020-10-27 2020-10-27 Useful deviation time sequence optimization method based on PSO algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011165958.8A CN112001140B (en) 2020-10-27 2020-10-27 Useful deviation time sequence optimization method based on PSO algorithm

Publications (2)

Publication Number Publication Date
CN112001140A CN112001140A (en) 2020-11-27
CN112001140B true CN112001140B (en) 2021-03-30

Family

ID=73474472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011165958.8A Active CN112001140B (en) 2020-10-27 2020-10-27 Useful deviation time sequence optimization method based on PSO algorithm

Country Status (1)

Country Link
CN (1) CN112001140B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117494630B (en) * 2023-12-29 2024-04-26 珠海格力电器股份有限公司 Register time sequence optimization method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103632001A (en) * 2013-11-27 2014-03-12 中国人民解放军国防科学技术大学 Retention time sequence optimization method based on multiplexing of buffer unit
CN108988393A (en) * 2018-08-21 2018-12-11 广东电网有限责任公司 A kind of optimization method of micro- source timing of microgrid black starting-up
CN110598235A (en) * 2019-06-25 2019-12-20 眸芯科技(上海)有限公司 Method and system for repairing time sequence violation in chip design

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103632001A (en) * 2013-11-27 2014-03-12 中国人民解放军国防科学技术大学 Retention time sequence optimization method based on multiplexing of buffer unit
CN108988393A (en) * 2018-08-21 2018-12-11 广东电网有限责任公司 A kind of optimization method of micro- source timing of microgrid black starting-up
CN110598235A (en) * 2019-06-25 2019-12-20 眸芯科技(上海)有限公司 Method and system for repairing time sequence violation in chip design

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于粒子群优化算法的有用时钟偏差规划;郑丹丹等;《浙江大学学报(工学版)》;20100430;第665-669页 *

Also Published As

Publication number Publication date
CN112001140A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
JP5373906B2 (en) SYSTEM AND METHOD FOR DESIGNING INTEGRATED CIRCUITS USING ADAPTIVEVOLTAGE ANDSCALING OPTIMIZATION
CN103324774B (en) A kind of processor performance optimization method based on clock planning deviation algorithm
CN109376467B (en) Clock tree layout flow method and clock tree deviation compensation device in integrated circuit
JP5883676B2 (en) LSI design method
JP2011530763A5 (en)
US20060053395A1 (en) Clock tree synthesis for low power consumption and low clock skew
CN112001140B (en) Useful deviation time sequence optimization method based on PSO algorithm
JP5229119B2 (en) Model generation program, method and apparatus
US9110689B2 (en) Automatic pipeline stage insertion
CN115964974A (en) Establishment time optimization method and system based on genetic algorithm
CN112818620B (en) Chip design optimization system and method based on dynamic unbalanced clock
US20170024502A1 (en) Simulation of Hierarchical Circuit Element Arrays
WO2022000576A1 (en) Formal verification comparison point matching method and system, processor, and memory
CN112183005B (en) DFT circuit construction method and application in integrated circuit test mode
US9058452B1 (en) Systems and methods for tracing and fixing unknowns in gate-level simulation
US10896283B1 (en) Noise-based optimization for integrated circuit design
JP2011508345A (en) Integrated technology analysis system
US20110022996A1 (en) Methods for designing integrated circuits employing context-sensitive and progressive rules and an apparatus employing one of the methods
CN110083942B (en) Signal electromigration batch repairing method, system and medium based on physical information
CN112329372A (en) Method for generating code pattern for signal integrity analysis
CN116401977B (en) Integrated method, integrated device, computing apparatus and storage medium for integrated circuit
CN114118423B (en) Symbol weight-based preamble selection method, system and electronic equipment
US11983478B2 (en) Selection of full or incremental implementation flows in processing circuit designs
US11797739B2 (en) Endpoint path margin based integrated circuit design using sub-critical timing paths
US20230066423A1 (en) Accounting for steady state noise in bit response superposition based eye diagram simulation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Huang Kai

Inventor after: Li Peng

Inventor after: Li Licheng

Inventor after: Xi Wei

Inventor after: Zeng Xiangjun

Inventor after: Yin Xianggen

Inventor after: Song Yitong

Inventor after: Zheng Dandan

Inventor before: Huang Kai

Inventor before: Li Peng

Inventor before: Li Licheng

Inventor before: Xi Wei

Inventor before: Zeng Xiangjun

Inventor before: Yin Xianggen

Inventor before: Song Yitong

Inventor before: Zheng Dandan