Method for solving linear equations for semiconductor device simulation
By nesting, partitioning, reordering, and iterating the preconditional GMRES algorithm on the linear equations of semiconductor device simulation, the problems of low accuracy and slow speed in solving the algorithm are solved, achieving fast and high-precision solving of linear equations, which is suitable for semiconductor device simulation and integrated circuit design optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-12
- Publication Date
- 2026-07-24
Smart Images

Figure CN122452476A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of semiconductor integrated circuit auxiliary design and device simulation, and electronic design automation (EDA), and in particular to a method for solving linear equations for semiconductor device simulation. Background Technology
[0002] Semiconductor device simulation technology is the cornerstone of modern integrated circuit design or electronic design automation (EDA), enabling accurate modeling and optimization of nanoscale transistors and circuits. Discretization of drift-diffusion equations or partial differential equations (PDEs) in device modeling typically generates large-scale, sparse, and often ill-conditioned linear equations. Simulation requires solving a series of these linear equations to obtain the waveforms of key physical quantities such as current and voltage over time; therefore, solving these linear equations accounts for a significant portion of the overall simulation time. Furthermore, these ill-conditioned equations must be solved with sufficient accuracy; otherwise, the simulation results may be physically ambiguous or unstable, leading to serious reliability issues in downstream electronic design automation processes. Therefore, the methods for solving linear equations in device simulation require very high accuracy, while minimizing runtime is also crucial to save time and costs.
[0003] Solve the system of linear equations The conventional method is to perform LU decomposition of the matrix using double-precision floating-point numbers with pivot selection, and then solve for the right-hand vector through a process of forward and backward substitution. Corresponding solution However, for ill-conditioned linear equations in device simulation, conventional methods may still fail to obtain sufficiently accurate solutions. This is generally addressed by increasing the precision of the numbers throughout the solution process, such as using multi-component precision or quadruple precision floating-point numbers instead of double precision floating-point numbers. However, this significantly increases the computational load, resulting in a computation time that is 4 to 8 times longer than before.
[0004] In related technologies, a GMRES-IR algorithm is proposed to solve this ill-conditioned equation. It combines iterative refinement techniques to improve the accuracy of solutions to linear equation systems with iterative solutions to linear equation systems (the representative method is the GMRES algorithm). Furthermore, it uses multiple floating-point precision representations in the calculation, ultimately achieving the same solution accuracy in a shorter computation time.
[0005] However, the mixed-precision GMRES-IR algorithm of related technologies still has the following main problems: the inner GMRES iteration has a large number of convergence steps and the GMRES iteration calculation time is long, which urgently need to be solved. Summary of the Invention
[0006] This application provides a method for solving linear equations in semiconductor device simulation to address the problems of low accuracy and slow speed in algorithm solutions for semiconductor device simulation.
[0007] The first aspect of this application provides a method for solving a system of linear equations for semiconductor device simulation, comprising the following steps: The target linear equation system for semiconductor device simulation is determined, and the coefficient matrix of the target linear equation system is nested, segmented and reordered to obtain the transformed coefficient matrix and the corresponding right-hand vector. Based on the preset decomposition accuracy, the transformed coefficient matrix is decomposed by selecting the principal component LU, and the previous and back substitution algorithms are used to obtain the current solution vector of the transformed linear equation system. Based on the preset working accuracy, the initial residual vector corresponding to the current solution vector is calculated, and it is determined whether the initial residual vector satisfies the preset solution conditions. If the initial residual vector does not satisfy the preset solution conditions, then based on the preset working accuracy, the current solution vector and the preset precondition GMRES algorithm convergence conditions, the preset correction vector equation is solved according to the precondition GMRES algorithm to obtain the correction vector. The precondition GMRES algorithm adopts a precondition method based on the result of the selected principal component LU decomposition. Based on the preset working precision, the current solution vector, and the correction vector, an updated solution vector is obtained, and the updated solution vector is used as the current solution vector. The step of calculating the residual vector of the current solution vector based on the preset working precision is re-executed until the latest residual vector after iteration satisfies the preset solution conditions. The final solution is obtained based on the latest current solution vector.
[0008] Optionally, after determining whether the initial residual vector satisfies the preset solution conditions, the method further includes: If the initial residual vector satisfies the preset solution conditions, then based on the preset working accuracy, the final solution of the target linear equation system is calculated according to the current solution vector of the transformed linear equation system.
[0009] Optionally, the preset solution conditions are: ; in, For the first The residual vector of the next iteration The first threshold, Let be the right-hand vector of the target linear equation system.
[0010] Optionally, the preset decomposition precision is a double-precision floating-point number format, and the preset working precision is a double-double precision floating-point number format, wherein the precision of the preset working precision is higher than the precision of the preset decomposition precision.
[0011] Optionally, the preset convergence condition of the GMRES algorithm is:
[0012] ; in, For the first The residual vector of the next iteration The transformed coefficient matrix is... For the first The correction vector of the next iteration is the solution to the correction vector equation obtained by the pre-condition GMRES algorithm. This is a relative threshold. Let be the right-hand vector of the target linear equation system. Both c and c are constants.
[0013] Optionally, the preset correction vector equation is: ; in, The transformed coefficient matrix is... For the first The correction vector for the next iteration. For the first The residual vector of the next iteration.
[0014] Optionally, the formula for calculating the residual vector is: ; in, For the first The residual vector of the next iteration The right-hand vector after transformation. The transformed coefficient matrix is... This is the current solution to the transformed system of linear equations.
[0015] Therefore, this embodiment of the application determines the target linear equation system and performs nested segmentation and reordering of its coefficient matrix to obtain the transformed coefficient matrix and the corresponding right-hand vector. Based on a preset decomposition accuracy, the transformed coefficient matrix is decomposed using principal component LU decomposition, a previous-generation algorithm, and a back-generation algorithm to obtain the current solution vector. Based on a preset working accuracy, if the initial residual vector does not meet the preset solution conditions, a correction vector is obtained by solving the problem using the pre-condition GMRES algorithm. Based on the preset working accuracy, the current solution vector, and the correction vector, an updated solution vector is obtained as the current solution vector, and the step of calculating the residual vector is re-executed until the latest residual vector after iteration meets the preset solution conditions. The final solution is obtained based on the latest current solution vector. This solves the problems of low solution accuracy and slow speed in semiconductor device simulation algorithms.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0017] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a method for solving a system of linear equations for semiconductor device simulation, provided according to an embodiment of this application. Figure 2 This is a flowchart of a method for solving linear equations for semiconductor device simulation according to an embodiment of this application. Detailed Implementation
[0018] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0019] The following describes a method for solving linear equations for semiconductor device simulation, based on embodiments of the present application, with reference to the accompanying drawings. Addressing the issues of low accuracy and slow speed in algorithmic solutions for semiconductor device simulation mentioned in the background, this application provides a method for solving linear equations for semiconductor device simulation. In this method, embodiments of the present application determine the target linear equation system and perform nested partitioning and reordering of its coefficient matrix to obtain a transformed coefficient matrix and corresponding right-hand vectors. Based on a preset decomposition accuracy, the transformed coefficient matrix is subjected to principal component LU decomposition, a previous-generation algorithm, and a back-generation algorithm to obtain the current solution vector. Based on a preset working accuracy, if the initial residual vector does not meet the preset solution conditions, a correction vector is obtained using the pre-condition GMRES algorithm. Based on the preset working accuracy, the current solution vector, and the correction vector, an updated solution vector is obtained as the current solution vector, and the step of calculating the residual vector is re-executed until the latest residual vector after iteration meets the preset solution conditions. The final solution is obtained based on the latest current solution vector. This solves the problems of low accuracy and slow speed in algorithmic solutions for semiconductor device simulation.
[0020] Specifically, Figure 1 This is a flowchart illustrating a method for solving linear equations for semiconductor device simulation provided in an embodiment of this application.
[0021] like Figure 1 As shown, the method for solving linear equations for semiconductor device simulation includes the following steps: In step S101, the target linear equation set for semiconductor device simulation is determined, and the coefficient matrix of the target linear equation set is nested, segmented and reordered to obtain the transformed coefficient matrix and the corresponding right-hand vector of the target linear equation set.
[0022] Nested Dissection is a graph partitioning algorithm for sparse matrix reordering, designed to reduce padding elements generated during matrix decomposition and improve computational efficiency.
[0023] Specifically, for the equation coefficient matrix in Perform nested splitting and reordering to obtain the transformed problem. ,in , To represent a permutation matrix of sorted elements, the solution vector is... The relationship with the original solution is: Nested partitioning and reordering can be achieved using existing techniques, such as the method described in the following paper: G. Karypis and V. Kumar, “A fast and high quality multilevel scheme for partitioning irregulargraphs,” SIAM J. Scientific Comput., vol. 20, no. 1, pp. 359–392, 1998.
[0024] In step S102, based on the preset decomposition accuracy, the transformed coefficient matrix is decomposed by selecting principal components (LU), and the previous and back substitution algorithms are used to obtain the current solution vector of the transformed linear equation system. Based on the preset working accuracy, the initial residual vector corresponding to the current solution vector is calculated, and it is determined whether the initial residual vector satisfies the preset solution conditions.
[0025] Optionally, in some embodiments, the formula for calculating the residual vector is: ; in, For the first The residual vector of the next iteration The right-hand vector after transformation. The transformed coefficient matrix, This is the current solution to the transformed system of linear equations.
[0026] The preset decomposition precision refers to the floating-point representation precision pre-set in numerical computation for matrix decomposition (such as LU decomposition). The preset working precision refers to the floating-point representation precision pre-set in numerical computation for the core iterative computation process.
[0027] Specifically, the decomposition precision (preset decomposition precision) is used for... The transformed coefficient matrix is solved by using pivot LU decomposition, previous generation algorithm, and back generation algorithm to obtain the current solution vector. Initialize the iteration count, i.e., k=0; calculate the initial residual vector using the working precision (preset working precision). And determine whether the initial residual vector satisfies the preset solution conditions.
[0028] Optionally, in some embodiments, the preset decomposition precision is a double-precision floating-point number format, and the preset working precision is a double-double precision floating-point number format, wherein the precision of the preset working precision is higher than the precision of the preset decomposition precision.
[0029] It is understood that the embodiments of this application are based on the mixed precision GMRES-IR method, which uses two floating-point numbers to represent precision, namely decomposition precision and working precision. The working precision has higher accuracy and a larger amount of related calculations. While ensuring the accuracy of the result remains unchanged, the calculation time can be significantly shortened. The decomposition precision uses double-precision floating-point numbers (double, 64 binary digits), and the working precision uses double-double precision (128 binary digits).
[0030] In step S103, if the initial residual vector does not meet the preset solution conditions, then based on the preset working accuracy, the current solution vector and the preset precondition GMRES algorithm convergence conditions, the preset correction vector equation is solved according to the precondition GMRES algorithm to obtain the correction vector. The precondition GMRES algorithm adopts a precondition method based on the result of principal component LU decomposition.
[0031] Optionally, in some embodiments, the preset correction vector equation is: ; in, The transformed coefficient matrix, For the first The correction vector for the next iteration. For the first The residual vector of the next iteration.
[0032] Among them, the preconditioning GMRES algorithm is an iterative method for solving large-scale sparse linear equation systems. It combines the Generalized Minimal Residual Method (GMRES) and preconditioning techniques. GMRES is a Krylov subspace iterative method for solving asymmetric linear equation systems. Preconditioning is a technique that improves the properties of the coefficient matrix by transforming the original equation.
[0033] Specifically, if the initial residual vector does not meet the preset solution conditions, the pre-conditional GMRES algorithm is executed to solve the equation using the preset working accuracy. (The preset modified vector equation) uses the result of LU decomposition (the current solution vector) as a precondition (the preset precondition GMRES algorithm convergence condition); where the precondition GMRES algorithm is a classic iterative solution method, see the book: Yu Wenjian, Feng Xin, and Li Xin, eds., Big Data Computation Methods, Higher Education Press, 2024. ISBN: 978-7-04-061591-3.
[0034] Optionally, in some embodiments, the preset solution conditions are: ; in, For the first The residual vector of the next iteration The first threshold, Let be the right-hand vector of the objective linear system of equations.
[0035] It is understandable that the vector norm notation Both represent the L2 norm, used to measure the magnitude of the residual vector; .
[0036] Optionally, in some embodiments, the preset preconditions for the GMRES algorithm convergence are:
[0037] ; in, For the first The residual vector of the next iteration The transformed coefficient matrix, For the first The correction vector for the next iteration. This is a relative threshold. Let be the right-hand vector of the objective linear system of equations. Both c and c are constants.
[0038] Understandably, relative threshold It increases dynamically with the iteration process; among which, , .
[0039] In step S104, based on the preset working precision, the current solution vector, and the correction vector, the updated solution vector is obtained, and the updated solution vector is used as the current solution vector. The step of calculating the residual vector of the current solution vector based on the preset working precision is repeated until the latest residual vector after iteration satisfies the preset solution conditions. The final solution is obtained based on the latest current solution vector.
[0040] Specifically, using working accuracy calculation The iteration count is k = k + 1, and the step of calculating the residual vector of the current solution vector based on the preset working precision is repeated until the latest residual vector after iteration satisfies the preset solution conditions. Based on the latest current solution vector, the final solution is calculated using the preset working precision. .
[0041] Therefore, the embodiments of this application are an improved implementation of the existing mixed-precision GMRES-IR method. The corresponding literature for the mixed-precision GMRES-IR method is as follows: E. Carson and NJ Higham, “Accelerating the solution of linear systems by iterative refinement in three precisions,” SIAMJ. Sci. Comput., vol. 40, no. 2, pp. A817–A847, 2018.
[0042] Optionally, in some embodiments, after determining whether the initial residual vector satisfies the preset solution conditions, the method further includes: if the initial residual vector satisfies the preset solution conditions, then based on the preset working precision, the final solution of the target linear equation system is calculated according to the current solution vector of the transformed linear equation system.
[0043] Understandably, if The algorithm skips the entire iterative refinement process and directly calculates the final solution using a preset working precision. .
[0044] Therefore, this application proposes to first perform a nested segmentation sparse matrix rearrangement, so that the matrix... The non-zero elements in the matrix exhibit a more clustered distribution, resulting in better memory locality when performing matrix-vector multiplication, thus leading to faster execution. This application proposes a dynamic criterion setting technique for the inner GMRES iteration, thereby reducing the number of iterations in the GMRES algorithm. Relative threshold The settings differ from conventional methods, achieving the effect of reducing the number of iterations and computational load. In summary, the embodiments of this application significantly shorten the running time of the mixed-precision GMRES-IR method while maintaining the accuracy of the results.
[0045] For example, for a typical practical problem with a matrix dimension of 3.7 × 10⁵, the method in this embodiment takes 28 seconds to run, with a solution error of only 1.1 × 10⁻¹⁵. Compared to the method that uses double-double precision for LU decomposition to obtain the solution vector, the method in this embodiment achieves a speedup of 9.4 times, with almost no reduction in accuracy. The experimental computer was a Linux server equipped with a Xeon Gold 6230R CPU and 128 GB of memory.
[0046] Therefore, this application embodiment achieves the same solution accuracy while accelerating matrix-vector multiplication through sparse matrix rearrangement and reducing the number of iterations in the GMRES algorithm through dynamic convergence settings for the inner GMRES iteration, thereby significantly shortening the runtime of the mixed-precision GMRES-IR algorithm. This technology is suitable for solving ill-conditioned linear equation systems in semiconductor device simulation. Compared with existing methods, it can solve linear equation systems more quickly and accurately, thereby accelerating device simulation and shortening the design cycle of downstream integrated circuit design or optimization tasks.
[0047] To facilitate those skilled in the art to further understand the linear equation solution method for semiconductor device simulation in the embodiments of this application, the following is combined with... Figure 2 The embodiments shown will be described in detail.
[0048] Specifically, such as Figure 2 As shown, Figure 2 This is a flowchart of a method for solving a system of linear equations for semiconductor device simulation according to an embodiment of this application. First, the target system of linear equations for semiconductor device simulation is determined, and the coefficient matrix is nested, segmented and reordered to obtain the transformed coefficient matrix and the corresponding right-hand vector.
[0049] Then, the transformed coefficient matrix is subjected to pivot LU decomposition using the decomposition precision, and the current solution vector is obtained by using the previous generation algorithm and the back generation algorithm. The initial residual vector corresponding to the current solution vector is then calculated using the working precision, and it is determined whether the initial residual vector satisfies the preset solution conditions.
[0050] If the initial residual vector satisfies the solution conditions, the final solution is obtained directly based on the current solution vector. If not, the corrected vector equation is solved using the preconditioned GMRES algorithm with working precision, and the corrected vector is obtained. The result of the selected principal component LU decomposition is used as the precondition, and the inner GMRES iteration uses a dynamic convergence criterion. The current solution vector is added to the corrected vector to obtain the updated solution vector, which is then used as the new current solution vector. The residual vector of the new current solution vector is recalculated using working precision, and it is determined whether the solution conditions are satisfied. If not, the steps of solving the corrected vector, updating the solution vector, and calculating the residual are repeated until the residual vector satisfies the solution conditions. Finally, the final solution is obtained based on the current solution vector that satisfies the conditions.
[0051] Therefore, this invention significantly shortens the computation time while ensuring the accuracy of the solution, and is suitable for the rapid solution of large-scale ill-conditioned linear equation systems.
[0052] According to the linear equation system solution method for semiconductor device simulation proposed in this application, the target linear equation system is determined, and its coefficient matrix is nested, segmented, and reordered to obtain the transformed coefficient matrix and the corresponding right-hand vector. Based on a preset decomposition accuracy, the transformed coefficient matrix is decomposed using pivot LU decomposition, a previous-generation algorithm, and a back-generation algorithm to obtain the current solution vector. Based on a preset working accuracy, if the initial residual vector does not meet the preset solution conditions, a correction vector is obtained by solving the problem using the pre-condition GMRES algorithm. Based on the preset working accuracy, the current solution vector, and the correction vector, the updated solution vector is obtained as the current solution vector, and the step of calculating the residual vector is re-executed until the latest residual vector after iteration meets the preset solution conditions. The final solution is obtained based on the latest current solution vector. This solves the problems of low solution accuracy and slow speed in semiconductor device simulation algorithms.
[0053] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0054] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0055] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0056] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0057] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
Claims
1. A method for solving linear equation systems for semiconductor device simulation, characterized in that, Includes the following steps: The target linear equation system for semiconductor device simulation is determined, and the coefficient matrix of the target linear equation system is nested, segmented and reordered to obtain the transformed coefficient matrix and the corresponding right-hand vector. Based on the preset decomposition accuracy, the transformed coefficient matrix is decomposed by selecting the principal component LU, and the previous and back substitution algorithms are used to obtain the current solution vector of the transformed linear equation system. Based on the preset working accuracy, the initial residual vector corresponding to the current solution vector is calculated, and it is determined whether the initial residual vector satisfies the preset solution conditions. If the initial residual vector does not satisfy the preset solution conditions, then based on the preset working accuracy, the current solution vector and the preset precondition GMRES algorithm convergence conditions, the preset correction vector equation is solved according to the precondition GMRES algorithm to obtain the correction vector. The precondition GMRES algorithm adopts a precondition method based on the result of the selected principal component LU decomposition. Based on the preset working precision, the current solution vector, and the correction vector, an updated solution vector is obtained, and the updated solution vector is used as the current solution vector. The step of calculating the residual vector of the current solution vector based on the preset working precision is re-executed until the latest residual vector after iteration satisfies the preset solution conditions. The final solution is obtained based on the latest current solution vector.
2. The method according to claim 1, characterized in that, After determining whether the initial residual vector satisfies the preset solution conditions, the method further includes: If the initial residual vector satisfies the preset solution conditions, then based on the preset working accuracy, the final solution of the target linear equation system is calculated according to the current solution vector of the transformed linear equation system.
3. The method according to claim 1, characterized in that, The preset solution conditions are: ; in, For the first The residual vector of the next iteration The first threshold, Let be the right-hand vector of the target linear equation system.
4. The method according to claim 1, characterized in that, The preset decomposition precision is a double-precision floating-point number format, and the preset working precision is a double-double precision floating-point number format, wherein the precision of the preset working precision is higher than the precision of the preset decomposition precision.
5. The method according to claim 1, characterized in that, The preset convergence condition for the GMRES algorithm is: ; in, For the first The residual vector of the next iteration The transformed coefficient matrix is... For the first The correction vector for the next iteration. This is a relative threshold. Let be the right-hand vector of the target linear equation system. Both c and c are constants.
6. The method according to claim 1, characterized in that, The preset correction vector equation is: ; in, The transformed coefficient matrix is... For the first The correction vector for the next iteration. For the first The residual vector of the next iteration.
7. The method according to claim 1, characterized in that, The formula for calculating the residual vector is: ; in, For the first The residual vector of the next iteration The right-hand vector after transformation. The transformed coefficient matrix is... This is the current solution to the transformed system of linear equations.