Method for improving circuit simulation speed

文档序号:49484 发布日期:2021-09-28 浏览:34次 中文

阅读说明:本技术 一种提升电路仿真速度的方法 (Method for improving circuit simulation speed ) 是由 周振亚 吴大可 程明厚 阳杰 刘强 于 2021-07-22 设计创作,主要内容包括:一种提升电路仿真速度的方法,包括以下步骤:遍历电路网表,对电路进行超图分割,生成多个子电路以及顶层电路;对所述子电路和顶层电路调用并行弧长算法,加速支流分析的过程。本发明的提升电路仿真速度的方法,能够在合理的仿真时间内解决整个大规模非线性代数系统而不失去精度,以更大的容量和完全的精确性解决直流分析问题。(A method for improving the simulation speed of a circuit comprises the following steps: traversing the circuit netlist, carrying out hypergraph segmentation on the circuit, and generating a plurality of sub-circuits and a top-level circuit; and calling a parallel arc length algorithm for the sub-circuit and the top-level circuit to accelerate the process of branch analysis. The method for improving the circuit simulation speed can solve the problem of direct current analysis with larger capacity and complete accuracy without losing the accuracy of the whole large-scale nonlinear algebraic system in reasonable simulation time.)

1. A method for improving the simulation speed of a circuit is characterized by comprising the following steps:

traversing the circuit netlist, carrying out hypergraph segmentation on the circuit, and generating a plurality of sub-circuits and a top-level circuit;

and calling a parallel arc length algorithm to perform parallel direct current analysis on the sub-circuit and the top-level circuit.

2. The method for improving circuit simulation speed according to claim 1, wherein the step of traversing the circuit netlist, performing hypergraph segmentation on the circuit, and generating a plurality of sub-circuits and top-level circuits further comprises,

grouping and marking the independent voltage and current sources in each divided sub-circuit;

according to the scale of the divided sub-circuits from large to small, the groups of the independent voltage and current sources are sequenced;

and gradually raising the independent voltage and the current source from 0 to the original value in sequence according to the sorted grouping.

3. The method for increasing the simulation speed of a circuit according to claim 1, wherein the step of invoking a parallel arc length algorithm to perform a parallel DC analysis on the sub-circuit further comprises,

forming a Jacobian matrix and a right-end item of each sub-circuit by adopting MNA according to a circuit model and circuit topology, carrying out matrix decomposition on each sub-circuit and calculating Schur complement;

the top-level circuit synthesizes the coupling matrix, the schur complement matrix and the corresponding right-end terms of all the sub-circuits.

4. The method for increasing the speed of a circuit simulation of claim 3, further comprising,

solving the top matrix to obtain the solution of the external nodes (the coupling nodes of all the sub-circuits) and sending the solution back to each sub-circuit to obtain the solution of the internal nodes;

and calculating the real external solution and the real internal solution of each sub-circuit according to the solutions of all the external nodes and the internal nodes, stopping updating and calculating the partition when the sub-circuits are converged and the external nodes are stable, skipping NR iteration of the partition, and continuing to iterate the unstable partition until all the solutions are converged.

5. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program running on the processor, and the processor executes the computer program to perform the steps of the method for increasing the circuit simulation speed according to any one of claims 1 to 4.

6. A computer-readable storage medium, on which a computer program is stored, which, when running, performs the steps of the method of increasing the speed of a circuit simulation of any of claims 1 to 4.

Technical Field

The invention relates to the technical field of integrated circuit simulation, in particular to a direct current analysis method in integrated circuit simulation.

Background

SPICE-like circuit simulators are currently the most widely used computer-aided circuit design tools that provide a variety of analysis types to evaluate designers' circuits from different perspectives, with Direct Current (DC) analysis being one of the most fundamental and important tasks, because solving the DC operating point of a circuit is a necessary task that precedes any other simulation task, provides an initial solution for transient analysis, and determines a linearized, small-signal model of all nonlinear devices in AC analysis.

Existing dc analysis includes, step-by-step methods (gmin, source …) and ptran-like methods (ptran, dptran, ptransplus, dptranplus …), where the step-by-step method presents discontinuity problems, while ptran-like methods present strange oscillation phenomena (not true oscillations, but jumps from two or more states). This phenomenon is generally not solved if both problems are present in one circuit.

With the rapid development of Very Large Scale Integration (VLSI) technology, the feature size of the circuit is greatly reduced, and especially after layout extraction, the number of devices is easily millions. This makes SPICE-like circuit simulators very expensive in computing dc operating points. Parallel dc analysis to maintain SPICE simulation accuracy is becoming a critical part of circuit simulators that handle large circuits.

In device-level simulations of very large scale integrated circuits, dc analysis is the most fundamental and important part. As the complexity of integrated circuits continues to increase, it is becoming increasingly challenging to solve an entire large-scale nonlinear algebraic system in reasonable simulation time without losing accuracy. The invention provides a method for improving circuit simulation speed, which is based on a BBD (boundary Block Diagonal) form partitioned fast parallel arc length (arclength) algorithm called as PALBBD (binary), solves the problem of direct current analysis with larger capacity and complete accuracy, and adopts a new skipping strategy with a corrector to further accelerate the speed of direct current analysis.

Disclosure of Invention

In order to solve the defects in the prior art, the invention aims to provide a method for improving the simulation speed of a circuit, which is based on a parallel arc length (arclength) algorithm of a BBD (boundary Block Diagnonal) matrix structure, can solve the whole large-scale nonlinear algebraic system in reasonable simulation time without losing precision, and solves the problem of direct current analysis with larger capacity and complete precision.

In order to achieve the above object, the present invention provides a method for increasing the simulation speed of a circuit, comprising the following steps:

traversing the circuit netlist, carrying out hypergraph segmentation on the circuit, and generating a plurality of sub-circuits and a top-level circuit;

and calling a parallel arc length algorithm to perform parallel direct current analysis on the sub-circuit and the top-level circuit.

Further, the step of traversing the circuit netlist, performing hypergraph segmentation on the circuit, and generating a plurality of sub-circuits and top-level circuits further comprises,

grouping and marking the independent voltage and current sources in each divided sub-circuit;

according to the scale of the divided sub-circuits from large to small, the groups of the independent voltage and current sources are sequenced;

and sequentially accelerating the independent voltage and the current source according to the sorted groups.

Further, the step of calling the parallel arc length algorithm to perform parallel direct current analysis on the sub-circuits further comprises,

forming a Jacobian matrix and a right-end item of each sub-circuit by adopting MNA according to a circuit model and circuit topology, carrying out matrix decomposition on each sub-circuit and calculating Schur complement;

and accumulating all the schur complements to form the Jacobian matrix and the right-end term of the top-level partition.

Further, the method also comprises the following steps of,

solving the top matrix to obtain the solution of the external node, and sending the solution back to each sub-circuit to obtain the solution of the internal node;

and calculating the real external solution and the real internal solution of each sub-circuit according to the solutions of all the external nodes and the internal nodes, stopping updating and calculating the partition when the sub-circuits are converged and the external nodes are stable, skipping NR iteration of the partition, and continuing to iterate the unstable partition until all the solutions are converged.

To achieve the above object, the present invention further provides an electronic device, which includes a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the steps of the method for increasing the circuit simulation speed as described above when running the computer program.

To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when running executes the steps of the method for increasing the simulation speed of a circuit as described above.

The method for improving the simulation speed of the circuit has the following beneficial effects:

1) the method is easy to realize: the proposed algorithm is easy to implement on the existing SPICE-like simulator, and is easy to integrate into any type of simulator under the condition of not changing a data structure, because the dimension of the Jacobian matrix does not need to be expanded;

2) easy to use is high-efficient: in order to improve the simulation efficiency, the original circuit is divided into a plurality of sub-circuits by hypergraph division, each sub-circuit is solved in parallel, namely, a plurality of sub-tasks of one sub-circuit are combined to reduce the synchronization times, and meanwhile, the model evaluation process of a stable sub-circuit and a part of unstable sub-circuits can be skipped;

3) the convergence is good: in solving the problem of incapability of convergence, the arc length method has more obvious effect on tracking solution curves compared with other continuation methods;

4) ensuring convergence accuracy: the proposed algorithm can achieve very small loss of accuracy while speeding up.

Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

Drawings

The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:

FIG. 1 is a flow chart of a method for increasing the simulation speed of a circuit according to the present invention;

FIG. 2 is a schematic diagram of a circuit partitioning and skipping strategy according to the present invention;

fig. 3 is a schematic diagram of the parallel algorithm and skip strategy principle according to the present invention.

Detailed Description

The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.

Example 1

Fig. 1 is a flowchart of a method for increasing a simulation speed of a circuit according to the present invention, and the method for increasing a simulation speed of a circuit according to the present invention will be described in detail with reference to fig. 1.

First, in step 101, traverse all components in the netlist, perform hypergraph segmentation on the circuit, and divide the circuit into a plurality of sub-circuits and a top-level circuit.

In the embodiment of the present invention, hypergraph segmentation means that a large circuit is divided into a plurality of sub-circuits and a top-level circuit (which may also be nested, and is only divided into two layers as an example) by depending on the setting of the coupling nodes as few as possible, and the top-level circuit is the connection relationship of each sub-circuit.

In step 102, ramp-up is performed separately for the independent voltage source and the independent current source of each sub-circuit.

In the embodiment of the invention, the independent voltage and current source of each sub-circuit are respectively grouped and marked; according to the scale of the sub-circuits from large to small, the voltage source groups and the current source groups are respectively sequenced; according to the sorted voltage source groups and current source groups, ramp-up (lifting from 0 to an original value) is carried out on the independent voltage and current sources respectively and sequentially, so that the iterative process can be gradually transited from simple solving to solving of an original circuit.

In step 103, parallel arc length algorithm is used to perform parallel dc analysis on the sub-circuits.

In the embodiment of the invention, a parallel arc length algorithm of nonlinear direct current analysis is adopted, and the method can be specifically executed as follows:

1) the non-linear equation for the pure impedance circuit will be solved:

F(x)=0,x∈Rm,F(x)∈Rm→Rm

the method comprises the following steps:

H(x,λ)=λF(x)+(1-λ)G·x=0

where λ is the interpolated homotopy parameter, which is a one-dimensional unknown variable, G represents a correlation matrix with constant terms 1e-3, and λ and X are functions of the arc length s, where s satisfies:

wherein i is an unknown number corresponding to the voltage or current at the i node; m is the number of unknowns.

2) Predictor solution is performed.

In the embodiment of the present invention, the predictor (predictor) solution may be specifically implemented as: the direction V of the prediction step is calculated using the data of the previous point and the current point.

And multiplying the step length h by the V _ lambda and the V _ x, and adding the step length h to the x and the lambda to obtain the prediction solutions x ^ k and lambda ^ k.

In the embodiment of the invention, if the prediction solution is not good enough, V _ lambda and V _ x are not recalculated, but the step length h is reduced, and prediction is carried out again.

3) A correctror (corrector) solution is performed.

In the embodiment of the present invention, the corrector (corrector) solution may be specifically implemented as: solving a system of equations:

at this point, the structures of j (x) and f (x) do not need to be changed, but rather the solution is performed by NR iteration:

wherein, delta lambda is the variation of lambda, and delta x is the variation of x

The method for increasing the simulation speed of the circuit according to the present invention is further described with reference to an embodiment.

FIG. 2 is a schematic diagram of a circuit partitioning and skipping strategy according to the present invention, as shown in FIG. 2(a), B1,B2,…,Bk-1Divided k-1 sub-circuit matrixes are adopted, and TOP is a TOP-level matrix; c1,…,Ck-1And D1,…,Dk-1Is a matrix of connected nodes. As shown in fig. 2(b), when the sub-circuits converge and the external nodes stabilize, the sub-circuits no longer need updating and calculation, the NR iteration of the sub-circuits can be bypassed, and the remaining unstable circuits will continue to iterate until all converge.

Fig. 3 is a schematic diagram of the parallel algorithm and skip strategy principle according to the present invention, and the parallel acceleration principle of the present invention is explained in detail with reference to fig. 3.

In an embodiment of the present invention, first, model evaluation is performed on each sub-circuit, a Modified Nodal Analysis (MNA) is used to form a jacobian matrix and a right-end term (RHS) for each sub-circuit according to a circuit model and a circuit topology, and an LU matrix decomposition and Schur compensation (Schur compensation) are performed on each sub-circuit. Three tasks are merged into one task per sub-circuit and can be done in parallel with load balancing. The same color is used here to represent tasks on the same processor. After this, all Schur complements are added to form the matrix of the top matrix and the RHS. The top matrix is solved to obtain the solution for the outer nodes and sent back to each sub-circuit to obtain the inner node solution. Here, all solutions represent solutions of the following linear equations, not solutions of homotopic functions.

With all the outer and inner solutions, δ λ can be calculated. Then, the true external solution and the internal solution of each sub-circuit can be obtained in parallel by the δ λ and δ x formulas in step 3). A loop is executed that checks the skip condition of each sub-circuit in parallel from the second NR iteration. If δ λ is small enough and any one sub-circuit converges, e.g. B in FIG. 32And B4The circuit converges and the outer solution of the top matrix of the two converging sub-circuits is also small enough, then the two sub-circuits can be considered stable and can be skipped directly on the next iteration. Here, unlike the conventional model evaluation and LU decomposition skipping strategy,

in another embodiment, the present invention also utilizes an additional skip strategy with respect to replacing the internal solution of each sub-circuit. For the skipped sub-circuits, a corrector should be used to form the RHS of the top matrix to maintain accuracy, since the current is affected by the external node voltage. It is proven that the accuracy is not lost by using the corrector.

The invention provides a novel parallel arc length algorithm for direct current analysis. Because arclength has a strong capability of solving the problem of non-convergence compared with other continuation methods. We use hypergraph partitioning to get a matrix structure in BBD to achieve parallelism. In this context, we propose a more efficient skip strategy for each partition in addition to the existing ones to minimize the amount of computation without any loss of precision. We incorporate a sub-task of a sub-circuit to reduce the number of synchronizations and propose a new skip strategy and provide a corrector for the top level voltage or current update to ensure the accuracy of the simulation. Our method differs from other conventional skipping strategies in that it can replace the stable sub-circuit and even skip part of the model evaluation process of the unstable sub-circuit.

In an embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program running on the processor, and the processor executes the computer program to perform the steps of the method for increasing the circuit simulation speed.

In an embodiment of the present invention, there is also provided a computer readable storage medium having stored thereon a computer program which, when running, performs the steps of the method of increasing the speed of a circuit simulation as described above.

Those of ordinary skill in the art will understand that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数模混合仿真中解决无归属域线型模数冲突的方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类