Circuit simulation method, circuit simulation device, medium and electronic equipment

By processing the circuit netlist of integrated circuits, generating equivalent circuits and performing reduction processing, the problem of excessive simulation calculation in the prior art is solved, and the effect of reducing simulation complexity and improving simulation efficiency is achieved.

CN114510891BActive Publication Date: 2025-04-01SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210040056.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-14
Publication Date
2025-04-01
Estimated Expiration
2042-01-14

AI Technical Summary

Technical Problem

In the prior art, simulation calculations are too expensive and are difficult to apply to the simulation problems of large-scale integrated circuits.

Method used

By obtaining the circuit netlist of the target integrated circuit, processing is done to obtain the nodes to be retained, removing the internal nodes and adding them to the port nodes, equivalent circuits are generated, and simplifying them to reduce the internal nodes and connected components, and increasing the equivalent capacitance and resistance between port nodes.

Benefits of technology

The complexity of equivalent circuits is reduced, the calculation amount during the simulation process is reduced, and the simulation efficiency and reduced RC circuit accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510891B_ABST
    Figure CN114510891B_ABST
Patent Text Reader

Abstract

The present invention provides a circuit simulation method, a circuit simulation device, a medium and an electronic device. The circuit simulation method comprises: obtaining a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist comprises internal nodes and port nodes; processing the first circuit netlist to obtain nodes to be retained, wherein the RC time constant of the nodes to be retained is greater than the average RC time constant of the internal nodes of the first circuit netlist; removing the nodes to be retained from the internal nodes of the first circuit netlist, and adding the nodes to be retained to the port nodes of the first circuit netlist to generate a second circuit netlist; simplifying the second circuit netlist to obtain an equivalent circuit; and performing circuit simulation on the equivalent circuit through a circuit simulator of the electronic device. The method can reduce the amount of calculation in the simulation process of large-scale integrated circuits and reduce the complexity of simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a circuit simulation method, and in particular to a circuit simulation method, a circuit simulation device, a medium and an electronic device. Background Art

[0002] Post-circuit simulation generally uses a simulation circuit simulator to simulate the entire circuit, where the entire circuit includes the logic circuit and the RC network constructed after parasitic extraction. In integrated circuits, the existence of parasitic networks greatly increases the scale of the circuit network, which leads to a significant increase in the cost of simulation calculations. Summary of the invention

[0003] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a circuit simulation method, a circuit simulation device, a medium and an electronic device, so as to solve the problem of excessive simulation calculation cost in the prior art.

[0004] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present invention provides a circuit simulation method, which is applied to an electronic device and is used to simulate a target integrated circuit. The circuit simulation method includes: obtaining a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist includes internal nodes and port nodes; processing the first circuit netlist to obtain nodes to be retained, wherein the RC time constant of the nodes to be retained is greater than the average RC time constant of the internal nodes of the first circuit netlist; removing the nodes to be retained from the internal nodes of the first circuit netlist, and adding the nodes to be retained to the port nodes of the first circuit netlist to generate a second circuit netlist; simplifying the second circuit netlist to obtain an equivalent circuit, wherein the simplification includes: obtaining equivalent capacitance and / or equivalent resistance between the port nodes of the second circuit netlist, eliminating the internal nodes of the second circuit netlist and the resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist; and performing circuit simulation on the equivalent circuit through a circuit simulator of the electronic device.

[0005] In an embodiment of the first aspect, the equivalent circuit is a passive RC circuit.

[0006] In an embodiment of the first aspect, a method for processing the first circuit netlist to obtain the nodes to be retained therein includes: obtaining the average RC time constant; searching the internal nodes in the first circuit netlist according to the average RC time constant to obtain nodes whose RC time constants are greater than the average RC time constant as the nodes to be retained.

[0007] In an embodiment of the first aspect, the implementation method of searching the internal nodes in the first circuit netlist according to the average RC time constant to obtain a node whose RC time constant is greater than the average RC time constant as the node to be retained includes: step S1, randomly obtaining a node in the first circuit netlist as a random internal node, and determining whether the RC time constant of the random internal node is less than the average RC time constant, and if the RC time constant of the random internal node is less than the average RC time constant, re-obtaining the random internal node; step S2, searching the random internal node by breadth-first search based on the random internal node and the search radius The algorithm searches the first circuit netlist and determines whether the nodes searched by the breadth-first search algorithm meet the conditions. If the searched nodes belong to nodes to be retained, searched nodes and / or non-ground port nodes, it is determined that the searched nodes do not meet the conditions, otherwise, it is determined that the searched nodes meet the conditions; step S3, when the searched nodes meet the conditions, the searched nodes are marked as searched nodes, and the random internal nodes are marked as nodes to be retained and searched nodes; step S4, if the number of times the searched nodes meet the conditions is different from the preset number, go to step S1, otherwise the nodes to be retained are obtained.

[0008] In an embodiment of the first aspect, the circuit simulation method further includes: acquiring the search radius in response to a received instruction.

[0009] In an embodiment of the first aspect, the method for obtaining the equivalent capacitance and / or equivalent resistance between the port nodes of the second circuit netlist includes: obtaining the conductance matrix, the capacitance matrix of the internal circuit of the second circuit netlist, and the conductance connection matrix and the capacitance connection matrix between the internal circuit and the port nodes of the second circuit netlist; and obtaining the equivalent resistance and / or the equivalent capacitance according to the conductance matrix, the capacitance matrix, the conductance connection matrix, and the capacitance connection matrix.

[0010] In an embodiment of the first aspect, the circuit simulation method further includes: displaying a circuit simulation result using a display of the electronic device.

[0011] The second aspect of the present invention provides a circuit simulation device, the circuit simulation device comprising: a circuit netlist acquisition unit, used to acquire the circuit netlist of the target integrated circuit as a first circuit netlist, the first circuit netlist comprising internal nodes and port nodes; a first circuit netlist processing unit, used to process the first circuit netlist to acquire the to-be-retained nodes therein, the RC time constant of the to-be-retained nodes being greater than the average RC time constant of the internal nodes of the first circuit netlist; a second circuit netlist generation unit, used to remove the to-be-retained nodes from the internal nodes of the first circuit netlist, and add the to-be-retained nodes to the internal nodes of the first circuit netlist. The port nodes of the first circuit netlist are used to generate a second circuit netlist; a second circuit netlist processing unit is used to simplify the second circuit netlist to obtain an equivalent circuit, and the simplification includes: obtaining equivalent capacitance and / or equivalent resistance between the port nodes of the second circuit netlist, eliminating the internal nodes of the second circuit netlist and the resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist; a circuit simulation unit is used to perform circuit simulation on the equivalent circuit through a circuit simulator of the electronic device.

[0012] A third aspect of the present invention provides a computer-readable storage medium, and when the computer program is executed by a processor, the circuit simulation method described in any one of the first aspects of the present invention is implemented.

[0013] The fourth aspect of the present invention provides an electronic device, comprising: a memory on which a computer program is stored; and a processor, which is communicatively connected to the memory and executes the circuit simulation method described in any one of the first aspects of the present invention when calling the computer program.

[0014] As described above, the circuit simulation method, circuit simulation device, medium and electronic device of the present invention have the following beneficial effects:

[0015] The circuit simulation method can obtain a second circuit netlist according to a first circuit netlist of a target integrated circuit, and obtain an equivalent circuit of the target integrated circuit according to the second circuit netlist. The process of obtaining the equivalent circuit includes steps such as simplifying the second circuit netlist and eliminating internal nodes of the second circuit netlist, so the complexity of the equivalent circuit is lower than that of the target integrated circuit. Therefore, circuit simulation based on the equivalent circuit can reduce the amount of calculation in the simulation process and reduce the complexity of simulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Shown is a flow chart of a circuit simulation method according to a specific embodiment of the present invention.

[0017] Figure 2 Shown is a flow chart of a method for obtaining a node to be removed in a specific embodiment of the present invention.

[0018] Figure 3 The flowchart of a method for obtaining a node whose RC time constant is greater than an average RC time constant according to a specific embodiment of the present invention is shown.

[0019] Figure 4 It is a flow chart showing a method for implementing the simplification process of the second circuit netlist according to the present invention in a specific embodiment.

[0020] Figure 5 Shown is a flow chart of a circuit simulation method according to a specific embodiment of the present invention.

[0021] Figure 6 Shown is a schematic structural diagram of a circuit simulation device according to the present invention in a specific embodiment.

[0022] Figure 7 Shown is a schematic structural diagram of the electronic device of the present invention in a specific embodiment.

[0023] Component number description

[0024] 600 Circuit Simulator

[0025] 610 Circuit Netlist Acquisition Unit

[0026] 620 First Circuit Netlist Processing Unit

[0027] 630 Second circuit netlist generation unit

[0028] 640 Second Circuit Netlist Processing Unit

[0029] 650 Circuit Simulation Unit

[0030] 700 Electronic equipment

[0031] 710 Memory

[0032] 720 processor

[0033] Steps S11-S15

[0034] Steps S21-S22

[0035] Steps S31-S34

[0036] Steps S41-S42

[0037] Steps S51-S55 DETAILED DESCRIPTION

[0038] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0039] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0040] In the existing circuit simulation methods, it is difficult to directly apply them to large-scale simulation problems due to the high cost of simulation calculation. In view of the above problems, the present invention provides a circuit simulation method, which can obtain a second circuit netlist based on a first circuit netlist of a target integrated circuit, and obtain an equivalent circuit of the target integrated circuit based on the second circuit netlist. Among them, the process of obtaining the equivalent circuit includes the steps of simplifying the second circuit netlist and eliminating the internal nodes of the second circuit netlist, so that the complexity of the equivalent circuit is lower than that of the target integrated circuit. Therefore, circuit simulation based on the equivalent circuit can reduce the amount of calculation in the simulation process and reduce the complexity of simulation.

[0041] In one embodiment of the present invention, the circuit simulation method is applied to an electronic device to simulate a target integrated circuit. Figure 1 , the circuit simulation method comprises:

[0042] S11, obtaining a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist includes internal nodes and port nodes, wherein the first circuit netlist is an undirected graph, and the ground nodes in the first circuit netlist are port nodes.

[0043] Optionally, in this embodiment, the internal nodes of the first circuit netlist may be internal nodes numbered sequentially in the range of 1-K, and the port nodes of the first circuit netlist may be port nodes numbered sequentially in the range of 1-M, wherein K is the total number of internal nodes of the first circuit netlist, and M is the total number of port nodes of the first circuit netlist.

[0044] S12, processing the first circuit netlist to obtain a node to be retained, wherein the RC time constant of the node to be retained is greater than the average RC time constant of the internal nodes of the first circuit netlist. The RC time constant represents a constant of the time process of the transition reaction, and in an RC circuit, it is the product of resistance and capacitance. The RC circuit is also called a resistor-capacitor circuit, and a primary RC circuit consists of a resistor and a capacitor.

[0045] Optionally, in this embodiment, the first circuit netlist may be searched by a breadth-first algorithm to obtain the to-be-retained node, wherein the RC time constant of the to-be-retained node is greater than an average RC time constant of the first circuit netlist.

[0046] S13, removing the to-be-retained nodes from the internal nodes of the first circuit netlist, and adding the to-be-retained nodes to the port nodes of the first circuit netlist to generate a second circuit netlist. Since the to-be-retained nodes are nodes that seriously affect the accuracy of the simplified RC circuit, the accuracy of the simplified RC circuit can be improved by removing the to-be-retained nodes and adding the to-be-retained nodes to the port nodes of the first circuit netlist.

[0047] S14, simplifying the second circuit netlist to obtain an equivalent circuit, the simplification comprising: obtaining equivalent capacitance and / or equivalent resistance between port nodes of the second circuit netlist, eliminating internal nodes of the second circuit netlist and resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist.

[0048] By eliminating the internal nodes of the second circuit netlist and the resistors and / or capacitors connected to the internal nodes of the second circuit netlist, and adding additional resistors and / or capacitors between the port nodes of the second circuit netlist, the number of state variables of the target integrated circuit can be reduced, thereby achieving circuit model order reduction and improving the computational efficiency of the simulation. In addition, the equivalent circuit has similar performance to the target integrated circuit and can ensure passivity, and can be conveniently applied to the scenario of integrated circuit simulation.

[0049] S15, performing circuit simulation on the equivalent circuit by using a circuit simulator of the electronic device.

[0050] Optionally, the circuit simulation method in this embodiment may further include: displaying the circuit simulation result using a display of the electronic device.

[0051] According to the above description, the circuit simulation method described in this embodiment can obtain the second circuit netlist according to the first circuit netlist of the target integrated circuit, and obtain the equivalent circuit of the target integrated circuit according to the second circuit netlist. The process of obtaining the equivalent circuit includes the steps of simplifying the second circuit netlist and eliminating the internal nodes of the second circuit netlist, so the complexity of the equivalent circuit is lower than that of the target integrated circuit. Therefore, circuit simulation based on the equivalent circuit can reduce the amount of calculation in the simulation process and reduce the complexity of simulation.

[0052] See also Figure 2 In one embodiment of the present invention, a method for processing the first circuit netlist to obtain nodes to be retained therein includes:

[0053] S21, obtaining the average RC time constant, wherein the average RC time constant is the average value of the RC time constants of the internal nodes in the first circuit netlist.

[0054] S22, searching the internal nodes in the first circuit netlist according to the average RC time constant to obtain nodes whose RC time constants are greater than the average RC time constant as the nodes to be retained.

[0055] Optionally, this embodiment can determine whether the RC time constant of the initial search starting point is less than the average RC time constant during the iteration process of the breadth-first search, and if not, continue the search process; if so, regenerate the initial search starting point, wherein the initial search starting point is an internal node of the first circuit netlist.

[0056] According to the above description, the algorithm described in this embodiment can search the internal nodes in the first circuit netlist according to the average RC time constant to obtain the nodes whose RC time constant is greater than the average RC time constant as the nodes to be retained, wherein the nodes to be retained are the nodes that seriously affect the accuracy of the simplified RC circuit.

[0057] See also Figure 3 In one embodiment of the present invention, the implementation method of searching the internal nodes in the first circuit netlist according to the average RC time constant to obtain the nodes whose RC time constant is greater than the average RC time constant as the nodes to be retained includes:

[0058] S31, randomly obtain a node in the first circuit netlist as a random internal node, and determine whether the RC time constant of the random internal node is less than the average RC time constant, if the RC time constant of the random internal node is less than the average RC time constant, then re-obtain a random internal node. The method for generating the random internal node may be: obtaining a total number K of internal nodes in the first circuit netlist, where the internal nodes of the first circuit netlist are internal nodes numbered in sequence in the range 1-K; obtaining a random number i generated according to an average probability, where the value range of i is 1-K; obtaining an internal node numbered i as the random internal node.

[0059] S32, searching the first circuit netlist by a breadth-first search algorithm based on the random internal nodes and the search radius, and determining whether the nodes searched by the breadth-first search algorithm meet the conditions; if the searched nodes belong to nodes to be retained, searched nodes and / or non-ground port nodes, determining that the searched nodes do not meet the conditions; otherwise, determining that the searched nodes meet the conditions.

[0060] Optionally, during the search process of the breadth-first search algorithm, a node search can be carried out based on the search radius. If the searched node is a node to be retained, a searched node and / or a non-ground port node, the number of search failures is increased by 1. If the number of search failures reaches an upper limit, the search radius is reduced by 1 and the number of search failures is initialized, and the search is restarted.

[0061] S33, when the searched node meets the condition, the searched node is marked as a searched node, and the random internal node is marked as a to-be-retained node and a searched node.

[0062] S34, if the number of times the searched node meets the condition is different from the preset number, go to step S1, otherwise obtain the node to be retained.

[0063] According to the above description, the algorithm described in this embodiment searches the first circuit netlist through a breadth-first search algorithm to obtain nodes to be retained. This algorithm can obtain multiple nodes to be retained at one time, and because the algorithm searches based on a search radius, the node distances between the multiple nodes to be retained are far, thereby improving the accuracy of the RC circuit after simplification.

[0064] See also Figure 4 In one embodiment of the present invention, a method for obtaining equivalent capacitance and / or equivalent resistance between port nodes of the second circuit netlist includes:

[0065] S41, acquiring a conductance matrix and a capacitance matrix of an internal circuit of the second circuit netlist, and a conductance connection matrix and a capacitance connection matrix between the internal circuit and port nodes of the second circuit netlist;

[0066] S42, acquiring the equivalent resistance and / or the equivalent capacitance according to the conductance matrix, the capacitance matrix, the conductance connection matrix, and the capacitance connection matrix.

[0067] Optionally, in this embodiment, a method for obtaining the equivalent resistance and / or the equivalent capacitance may include the following steps: obtaining the constant term of the port admittance matrix of the second circuit netlist and the first-order moment of the port admittance matrix of the second circuit netlist based on the conductance matrix, the capacitance matrix, the conductance connection matrix and the capacitance connection matrix. Wherein, the conductance connection matrix describes the relationship between the port nodes and the internal nodes, the number of rows of the conductance connection matrix may be the number of internal nodes of the second circuit netlist, the number of columns of the conductance connection matrix may be the number of port nodes of the second circuit netlist, and the elements of the conductance connection matrix are determined by the resistance elements between the corresponding port nodes and the internal nodes. For example, the conductance connection matrix may be represented by the following formula:

[0068]

[0069] The first row represents the internal node numbered 3, the second row represents the internal node numbered 4, the first column represents the port node numbered 1, and the second column represents the port node numbered 2. 1,3 Represents the resistance element between the internal node numbered 3 and the port node numbered 1, the element U0(2,2) in the conductance connection matrix U0 is determined by the resistance element between the internal node numbered 4 and the port node numbered 2, the element U0(1,1) in the conductance connection matrix U0 is determined by the resistance element between the internal node numbered 3 and the port node numbered 1, and the elements of the capacitance connection matrix are determined by the capacitance elements between the corresponding port nodes and the internal nodes, which is the same as the conductance connection matrix and will not be repeated here. Determine whether the lower triangular element of the constant term of the port admittance matrix is ​​greater than 0, if greater than 0, obtain the equivalent resistance between the corresponding port nodes; determine whether the lower triangular element of the first-order moment of the port admittance matrix is ​​greater than 0, if greater than 0, obtain the equivalent capacitance between the corresponding port nodes. For example, if the element in the fourth row and fifth column of the constant term of the port admittance matrix is ​​greater than 0, the equivalent resistance between the port node numbered 4 and the port node numbered 5 is obtained, and the size of the equivalent resistance is determined by the element value of the constant term of the port admittance matrix.

[0070] Optionally, the implementation method of acquiring the constant term of the port admittance matrix of the second circuit netlist and the first-order moment of the port admittance matrix of the second circuit netlist based on the conductance matrix, the capacitance matrix, the conductance connection matrix and the capacitance connection matrix can be expressed by the following formula:

[0071]

[0072] in is the first-order moment of the port admittance matrix of the second circuit netlist, U1 is the capacitor connection matrix, and C is the capacitor matrix. In addition, the constant term of the port admittance matrix of the second circuit netlist can be expressed by the following formula:

[0073]

[0074] in is the constant term of the port admittance matrix of the second circuit netlist, U0 is the conductance connection matrix, and G is the conductance matrix.

[0075] According to the above description, the algorithm described in this embodiment can obtain the equivalent capacitance and / or equivalent resistance between the port nodes of the second circuit netlist by acquiring the correlation matrix of the internal circuit of the second circuit netlist.

[0076] See also Figure 5 In one embodiment of the present invention, the circuit simulation method includes:

[0077] S51, obtaining a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist includes internal nodes and port nodes. The port node set of the first circuit netlist is P = {1, 2, ..., M}, and the internal node set of the first circuit netlist is Where M is the total number of port nodes of the first circuit netlist, K is the total number of internal nodes of the first circuit netlist, and N x Represents the xth internal node.

[0078] S52: Process the first circuit netlist to obtain nodes to be retained therein, wherein the RC time constant of the nodes to be retained is greater than the average RC time constant of the internal nodes of the first circuit netlist.

[0079] Optionally, the first circuit netlist may be processed by a breadth-first search algorithm, and the processing process may be:

[0080] S521, obtaining the mean value and search radius of the RC time constant of the internal node, and setting the number of successes, the number of failures, the upper limit of the number of successes, and the upper limit of the number of failures, wherein the number of successes and the number of failures can be set to 0.

[0081] S522, randomly generate a random number i between [1, K] according to the average probability and obtain the internal node N numbered i i .

[0082] S523, determine the internal node N i Whether the preset condition is met, if yes, execute S525, if not, execute S524. i Meeting the preset condition means that: the internal node N i is the node to be retained or the searched node, or the internal node N i The RC time constant is smaller than the average RC time constant.

[0083] S524, searching the nodes in the first circuit netlist by using a breadth-first search algorithm according to the search radius, if the searched node is a to-be-retained node, a searched node or a non-ground port node, then executing S525, otherwise marking the searched node as a searched node, and marking the internal node N i Mark them as searched nodes and to-be-retained nodes, and increase the number of successes by 1, and proceed to step S526.

[0084] S525, add 1 to the number of failures, and determine whether the number of failures reaches the upper limit of the number of failures, if yes, reduce 1 from the search radius, set the number of failures to 0, and execute step S522. If no, continue to execute step S522.

[0085] S526, determining whether the number of successes has reached the upper limit of the number of successes, if yes, stopping the iteration process, if no, continuing to execute S522.

[0086] S53: Remove the to-be-retained nodes from the internal nodes of the first circuit netlist, and add the to-be-retained nodes to the port nodes of the first circuit netlist to generate a second circuit netlist.

[0087] S54, simplifying the second circuit netlist to obtain an equivalent circuit, the simplification comprising: obtaining equivalent capacitance and / or equivalent resistance between port nodes of the second circuit netlist, eliminating internal nodes of the second circuit netlist and resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist.

[0088] Optionally, this embodiment can obtain the equivalent resistance and / or equivalent capacitance between corresponding port nodes by obtaining the conductance matrix and capacitance matrix of the internal circuit of the second circuit netlist, the conductance connection matrix and capacitance connection matrix between the internal circuit and the port of the second circuit netlist, the constant term of the port admittance matrix of the second circuit netlist and the first-order moment of the port admittance matrix of the second circuit netlist, and traversing the constant term of the port admittance matrix and the lower triangular elements of the first-order moment of the port admittance matrix. The relationship between the constant term of the port admittance matrix and the conductance matrix, the capacitance matrix, the conductance connection matrix and the capacitance connection matrix can be expressed by the following formula:

[0089]

[0090] in is the constant term of the port admittance matrix of the second circuit netlist, U0 is the conductance connection matrix, and G is the conductance matrix. In addition, the first-order moment of the port admittance matrix can be expressed by the following formula:

[0091]

[0092] in is the first-order moment of the port admittance matrix of the second circuit netlist, U1 is the capacitor connection matrix, and C is the capacitor matrix.

[0093] In addition, the values ​​of the equivalent resistance and the equivalent capacitance are determined by the values ​​of the lower triangular elements. For example, if the element of the i-th row and j-th column of the constant term of the port admittance matrix is Then the equivalent resistance between the corresponding port node i and port node j is Similarly, if the element of the first-order moment of the port admittance matrix in the i-th row and j-th column is Then the equivalent capacitance between the corresponding port node i and port node j is Since the values ​​of the equivalent resistance and the equivalent capacitance are non-negative, when the lower triangular element is a negative value, the value is directly discarded.

[0094] Optionally, the equivalent capacitor and / or the equivalent resistor are added between the port nodes of the second circuit netlist, wherein the correspondence between the equivalent capacitor and the equivalent resistor and the port node has been described in S54 and will not be repeated here. By eliminating the internal nodes of the second circuit netlist and the resistors and / or elements connected to the internal nodes of the second circuit netlist, and adding additional resistors and / or capacitor elements between the port nodes of the second circuit netlist, the number of state variables of the target integrated circuit can be reduced, thereby achieving circuit model reduction and improving the computational efficiency of the simulation.

[0095] S55, performing circuit simulation on the equivalent circuit by using a circuit simulator of the electronic device.

[0096] According to the above description, the circuit simulation method described in this embodiment can obtain the second circuit netlist according to the first circuit netlist of the target integrated circuit, and obtain the equivalent circuit of the target integrated circuit according to the second circuit netlist. The process of obtaining the equivalent circuit includes the steps of simplifying the second circuit netlist and eliminating the internal nodes of the second circuit netlist, so the complexity of the equivalent circuit is lower than that of the target integrated circuit. Therefore, circuit simulation based on the equivalent circuit can reduce the amount of calculation in the simulation process and reduce the complexity of simulation.

[0097] See also Figure 6 , the present invention also provides a circuit simulation device, comprising: a circuit netlist acquisition unit, used to acquire a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist includes internal nodes and port nodes;

[0098] A first circuit netlist processing unit is used to process the first circuit netlist to obtain nodes to be retained, wherein the RC time constant of the nodes to be retained is greater than the average RC time constant of the internal nodes of the first circuit netlist; a second circuit netlist generating unit is used to remove the nodes to be retained from the internal nodes of the first circuit netlist, and add the nodes to be retained to the port nodes of the first circuit netlist to generate a second circuit netlist; a second circuit netlist processing unit is used to simplify the second circuit netlist to obtain an equivalent circuit, wherein the simplification includes: obtaining equivalent capacitance and / or equivalent resistance between the port nodes of the second circuit netlist, eliminating the internal nodes of the second circuit netlist and the resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist; a circuit simulation unit is used to perform circuit simulation on the equivalent circuit through a circuit simulator of the electronic device.

[0099] It should be noted that the modules in the circuit simulation device are Figure 1 The corresponding steps in the circuit simulation method shown correspond to each other one by one, and in order to save space in the specification, they will not be described in detail here.

[0100] Based on the above description of the circuit simulation method, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, Figure 1 or Figure 5 The circuit simulation method shown.

[0101] Based on the above description of the circuit simulation method, the present invention also provides an electronic device. Figure 7 In one embodiment of the present invention, the electronic device 700 includes: a memory 710 on which a computer program is stored; a processor 720, which is connected to the memory 710 for executing the computer program and implementing Figure 1 or Figure 5 The circuit simulation method shown.

[0102] Optionally, the electronic device further comprises a display, and the display is used to display a GUI interaction interface related to the circuit simulation method.

[0103] The protection scope of the circuit simulation method described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0104] In summary, the circuit simulation method, circuit simulation device, medium and electronic device of the present invention are used to simulate the target integrated circuit, which can improve the simulation efficiency of large-scale integrated circuits and improve the accuracy of simplified RC circuits. Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

[0105] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A circuit simulation method, characterized in that: Applied to an electronic device, for simulating a target integrated circuit, the circuit simulation method comprises: Acquire a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist includes internal nodes and port nodes; Processing the first circuit netlist to obtain a to-be-retained node therein, wherein an RC time constant of the to-be-retained node is greater than an average RC time constant of internal nodes of the first circuit netlist; Removing the to-be-retained nodes from the internal nodes of the first circuit netlist, and adding the to-be-retained nodes to the port nodes of the first circuit netlist to generate a second circuit netlist; Simplifying the second circuit netlist to obtain an equivalent circuit, the simplification comprising: obtaining equivalent capacitance and / or equivalent resistance between port nodes of the second circuit netlist, eliminating internal nodes of the second circuit netlist and resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist; The equivalent circuit is subjected to circuit simulation by a circuit simulator of the electronic device.

2. The circuit simulation method according to claim 1, characterized in that: The equivalent circuit is a passive RC circuit.

3. The circuit simulation method according to claim 1, characterized in that: The method for processing the first circuit netlist to obtain the nodes to be retained therein includes: Obtaining the average RC time constant; The internal nodes in the first circuit netlist are searched according to the average RC time constant to obtain nodes whose RC time constants are greater than the average RC time constant as the nodes to be retained.

4. The circuit simulation method according to claim 3, characterized in that: The implementation method of searching the internal nodes in the first circuit netlist according to the average RC time constant to obtain nodes having an RC time constant greater than the average RC time constant as the nodes to be retained includes: Step S1, randomly obtaining a node in the first circuit netlist as a random internal node, and determining whether the RC time constant of the random internal node is less than the average RC time constant, and if the RC time constant of the random internal node is less than the average RC time constant, re-obtaining the random internal node; Step S2, searching the first circuit netlist by a breadth-first search algorithm based on the random internal nodes and the search radius, and judging whether the nodes searched by the breadth-first search algorithm meet the conditions, if the searched nodes belong to the nodes to be retained, the searched nodes and / or the non-ground port nodes, judging that the searched nodes do not meet the conditions, otherwise, judging that the searched nodes meet the conditions; Step S3, when the searched node meets the conditions, marking the searched node as a searched node, and marking the random internal node as a to-be-retained node and a searched node; Step S4: if the number of times the searched node meets the condition is different from the preset number, go to step S1; otherwise, obtain the node to be retained.

5. The circuit simulation method according to claim 4, characterized in that: The circuit simulation method further includes: acquiring the search radius in response to a received instruction.

6. The circuit simulation method according to claim 1, characterized in that: The method for obtaining the equivalent capacitance and / or equivalent resistance between the port nodes of the second circuit netlist includes: Acquire a conductance matrix and a capacitance matrix of an internal circuit of the second circuit netlist, and a conductance connection matrix and a capacitance connection matrix between the internal circuit and port nodes of the second circuit netlist; The equivalent resistance and / or the equivalent capacitance are obtained according to the conductance matrix, the capacitance matrix, the conductance connection matrix, and the capacitance connection matrix.

7. The circuit simulation method according to claim 1, characterized in that: The simulation method further includes: displaying the circuit simulation result using a display of the electronic device.

8. A circuit simulation device, characterized in that: Applied to an electronic device for simulating a target integrated circuit, including: A circuit netlist acquisition unit, configured to acquire a circuit netlist of the target integrated circuit as a first circuit netlist, wherein the first circuit netlist includes internal nodes and port nodes; A first circuit netlist processing unit, configured to process the first circuit netlist to obtain nodes to be retained therein, wherein the RC time constant of the nodes to be retained is greater than an average RC time constant of internal nodes of the first circuit netlist; A second circuit netlist generating unit, configured to remove the to-be-retained nodes from the internal nodes of the first circuit netlist, and add the to-be-retained nodes to the port nodes of the first circuit netlist, so as to generate a second circuit netlist; A second circuit netlist processing unit, configured to simplify the second circuit netlist to obtain an equivalent circuit, wherein the simplification includes: obtaining equivalent capacitance and / or equivalent resistance between port nodes of the second circuit netlist, eliminating internal nodes of the second circuit netlist and resistance and / or capacitance elements connected to the internal nodes of the second circuit netlist, and adding the equivalent capacitance and / or the equivalent resistance between the port nodes of the second circuit netlist; The circuit simulation unit is used to perform circuit simulation on the equivalent circuit through a circuit simulator of the electronic device.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the circuit simulation method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: The electronic device comprises: A memory storing a computer program; A processor is communicatively connected to the memory, and executes the circuit simulation method according to any one of claims 1 to 7 when calling the computer program.