Abstract:
Method and system for determining electrical isomorphism between two electrical networks are disclosed. In one embodiment, the method includes representing the circuit as a hierarchically-arranged set of branches, which includes a root branch and a plurality of other branches logically organized in a graph. The hierarchically-arranged set of branches including a first branch that includes a first electrical network and a second branch that includes a second electrical network, where the first and second branches are interconnected in the graph through a third branch at a higher hierarchical level in the graph than the first and second branches. Next, the method determines whether the first and second electrical networks are electrically isomorphic networks. If the first and second electrical networks are determined to be electrically isomorphic networks, the first and second electrical networks are represented with a single electrically isomorphic network. The method further includes simulating the first and second electrical networks using the single electrically isomorphic network.

Description:
RELATED APPLICATIONS  
       [0001]     This application is related to the following application, which is commonly owned by Cadence Design Systems, Inc. and is filed on the same date as this application, and is hereby incorporated by reference in its entirety: System and Method for Converting a Flat Netlist into a Hierarchical Netlist, attorney docket number 018812-2000800.  
       FIELD OF THE INVENTION  
       [0002]     The present invention relates to the field of electronic design automation tools. In particular, the present invention relates to a method and system for determining electrical isomorphism between two electrical networks.  
       BACKGROUND OF THE INVENTION  
       [0003]     The development of complicated integrated circuits often requires powerful numerical simulation programs. For example, circuit simulation is an essential part in the design flow of integrated circuits, helping circuit designers to verify the functionality and performance of their designs without going through expensive fabrication processes. Examples of electronic circuit simulators include the Simulation Program with Integrated Circuit Emphasis (SPICE) developed at the University of California, Berkeley (UC Berkeley), and various enhanced versions or derivatives of SPICE, such as SPECTRE, developed by Cadence Design Systems, Inc. SPICE and its derivatives or enhanced versions will be referred to hereafter as SPICE circuit simulators, or SPICE.  
         [0004]     An integrated circuit is a network of circuit elements such as resistors, capacitors, inductors, mutual inductors, transmission lines, diodes, bipolar junction transistors (BJT), junction field effect transistors (JFET), metal-oxide-semiconductor field effect transistors (MOSFET), metal-semiconductor field effect transistors (MESFET), thin-film transistors (TFT), etc. SPICE models a circuit in a node/element fashion, i.e., the circuit is regarded as a collection of various circuit elements connected at nodes. At the heart of SPICE is the so-called Nodal Analysis, which is accomplished by formulating nodal equations (or circuit equations) in matrix format to represent the circuit and by solving these nodal equations. The circuit elements are modeled by device models, which produce model results that are represented in the circuit equations as matrices.  
         [0005]     A device model for modeling a circuit element, such as the SPICE model for modeling MOSFET devices, developed by UC Berkeley, typically includes model equations and a set of model parameters that mathematically represent characteristics of the circuit element under various bias conditions. For example, a circuit element with n terminals can be modeled by the following current-voltage relations: 
 
 I   i   =f   i (V 1   , . . . , V   n   , t ) for  i= 1, . . . ,  n,  
 
 where I i  represents the current entering terminal I; V j (j=1, . . . , n) represents the voltage or terminal bias across terminal j and a reference terminal, such as the ground; and t represents the time. The Kirchhoff&#39;s Current Law implies that the current entering terminal n is given by  
         I   n     =       ∑     i   =   1       n   -   1       ⁢           ⁢       I   i     .           
 
 A conductance matrix of the circuit element is defined by:  
       G   ⁢           ⁢           (     V     1   ,               …   ⁢           ,             V   n     ,             t   )     :=       (             ∂     f   1         ∂     V   1             ⋯           ∂     f   1         ∂     V   n                 ⋮       ⋰       ⋮               ∂     f   n         ∂     V   1             ⋯           ∂     f   n         ∂     V   n               )     .                 
 
 To model the circuit element under alternating current (AC) operations, the device model also considers the relationship between node charges and the terminal biases: 
 
 Q   i   =q   i ( V   1   , . . . , V   n   , t ) for  i= 1, . . . ,  n.  
 
 where Q i  represents the node charge at terminal i. Thus, the capacitance matrix of the n-terminal circuit element is defined by  
       C   ⁢           ⁢           (     V     1   ,               …   ⁢           ,             V   n     ,             t   )     :=       (             ∂     q   1         ∂     V   1             ⋯           ∂     q   1         ∂     V   n                 ⋮       ⋰       ⋮               ∂     q   n         ∂     V   1             ⋯           ∂     q   n         ∂     V   n               )     .                 
 
         [0006]     A complex integrated circuit may contain millions of circuit elements such as transistors, resistors, and capacitors. The design and simulation of such a complex integrated circuit may involve multiple teams of engineers. It is advantageous to partition the design of such complex integrated circuit using a hierarchical approach, whereby certain circuit elements are grouped together and may be reused repeatedly through the integrated circuit or in a subsequent design. A method and system for design and simulation of an integrated circuit with a hierarchical data structure are disclosed by U.S. patent application Ser. No. 10/724,277, entitled “System and Method for Simulating a Circuit Having Hierarchical Structure,” which, filed on Nov. 26, 2003 and commonly owned by Cadence Design Systems, Inc., is incorporated expressly by reference in its entirety herein.  
         [0007]     Hierarchical simulation is most useful when it can also be applied to simulate a back-annotated flat netlist containing parasitic RC networks. During back-annotation, a flat netlist in DSPF (Detailed Standard Parasitic Format) or SPEF (Standard Parasitic Exchange Format) that consists of millions of RC elements is produced by a process called Parasitic Extraction. The flat netlist is also referred to as a gate-level netlist.  
         [0008]     Prior-art circuit simulators simulate a back-annotated circuit as a flat circuit. After reading in the flat netlist, the circuit simulators perform a process known as the RC Reduction on a net by net basis to reduce the number of RC elements within a particular RC network in the flat netlist. Various techniques for performing RC Reduction are described in “Asymptotic waveform evaluation for timing analysis,” by L. Pillage and R. Rohrer in  IEEE Transactions on CAD,  vol. 9, no. 4, pp. 352-366, April 1990; “Efficient Linear Circuit Analysis by Pade Approximation via Lanczos Process,” by P. Feldmann and R. Freund in  IEEE Transactions on CAD,  vol. 14, no. 5, pp. 639-649, May 1995; and “Stable and Efficient Reduction of Large Multiport RC Networks by Pole Analysis via Congruence Transformations,” by K. Kerns and A. Yang in  IEEE/ACM DAC,  pp. 280-285, 1996.  
         [0009]     However, after the RC Reduction process, the prior-art circuit simulators simulate the design using the flat netlist. As a result, the performance of the simulation suffers significantly because of the large number of circuit elements, such as the back-annotated parasitic resistors and capacitors that have to be simulated. Additionally, simulating the flat netlist requires more memory because of the large number of circuit elements of the back-annotated flat netlist.  
         [0010]     Therefore, methods and systems for determining electrical isomorphism between two electrical networks are needed for improving the efficiency of simulating an integrated circuit with its parasitic RC networks after back-annotation.  
       SUMMARY  
       [0011]     Electrical isomorphism is a process of identifying electrical networks that are electrically equivalent though they may differ topologically. In one embodiment, a method for simulating a circuit having a hierarchical data structure includes representing the circuit as a hierarchically-arranged set of branches, which includes a root branch and a plurality of other branches logically organized in a graph. The hierarchically-arranged set of branches includes a first branch that includes a first electrical network and a second branch that includes a second electrical network, where the first and second branches are interconnected in the graph through a third branch at a higher hierarchical level in the graph than the first and second branches. Next, the method determines whether the first and second electrical networks are electrically isomorphic networks. If the first and second electrical networks are determined to be electrically isomorphic networks, the first and second electrical networks are represented with a single electrically isomorphic network. The method further includes simulating the first and second electrical networks using the single electrically isomorphic network.  
         [0012]     In another embodiment, a system for simulating a circuit having a hierarchical data structure includes at least one processing unit for executing computer programs, a graphical-user-interface for viewing representations of the integrated circuit on a display, and a memory for storing information of the integrated circuit. In addition, the system includes means for representing the circuit as a hierarchically-arranged set of branches, which includes a root branch and a plurality of other branches logically organized in a graph. The hierarchically-arranged set of branches includes a first branch that includes a first electrical network and a second branch that includes a second electrical network, where the first and second branches are interconnected in the graph through a third branch at a higher hierarchical level in the graph than the first and second branches. The system also includes means for determining whether the first and second electrical networks are electrically isomorphic networks. If the first and second electrical networks are determined to be electrically isomorphic networks, the first and second electrical networks are represented with a single electrically isomorphic network. The system further includes means for simulating the first and second electrical networks using the single electrically isomorphic network.  
         [0013]     In yet another embodiment, a computer program product comprising medium storing programs for execution by one or more computer systems includes an electrical isomorphism module for identifying electrically isomorphic networks, where the electrical isomorphism module is used in conjunction with at least a microprocessor unit, a memory, and a user interface. The electrical isomorphism module includes one or more computer programs containing instructions for representing the circuit as a hierarchically-arranged set of branches, which includes a root branch and a plurality of other branches logically organized in a graph. The hierarchically-arranged set of branches includes a first branch that includes a first electrical network and a second branch that includes a second electrical network, where the first and second branches are interconnected in the graph through a third branch at a higher hierarchical level in the graph than the first and second branches. The electrical isomorphism module also includes instructions for determining whether the first and second electrical networks are electrically isomorphic networks. If the first and second electrical networks are determined to be electrically isomorphic networks, the first and second electrical networks are represented with a single electrically isomorphic network. The electrical isomorphism module further includes instructions for simulating the first and second electrical networks using the single electrically isomorphic network.  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0014]     The aforementioned features and advantages of the invention as well as additional features and advantages thereof will be more clearly understandable after reading detailed descriptions of embodiments of the invention in conjunction with the following drawings.  
         [0015]      FIG. 1  illustrates a system for determining electrical isomorphism between two electrical networks according to an embodiment of the present invention.  
         [0016]      FIG. 2  is an RC network used to illustrate the transfer-function matrix approach according to an embodiment of the present invention.  
         [0017]      FIG. 3  illustrates a circuit representation of a port in the RC network of  FIG. 2  according to an embodiment of the present invention.  
         [0018]      FIG. 4  is an RC network used to illustrate the moments-matching approach according to an embodiment of the present invention.  
         [0019]      FIG. 5  illustrates a method for applying the technique of electrical isomorphism to improve circuit simulation efficiency according to an embodiment of the present invention. 
     
    
     DESCRIPTION OF EMBODIMENTS  
       [0020]     Methods and systems are provided for determining electrical isomorphism between two electrical networks of an integrated circuit. The following descriptions are presented to enable any person skilled in the art to make and use the invention. Descriptions of specific embodiments and applications are provided only as examples. Various modifications and combinations of the examples described herein will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other examples and applications without departing from the spirit and scope of the invention. Thus, the present invention is not intended to be limited to the examples described and shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.  
         [0021]     In one embodiment, a system for determining electrical isomorphism between two electrical networks is implemented using a computer system schematically shown in  FIG. 1 . The computer system includes one or more central processing units (CPUs)  100 , at least a user interface  102 , a memory device  104 , a system bus  106 , and one or more bus interfaces for connecting the CPU, user interface, memory device, and system bus together. The computer system also includes at least one network interface  103  for communicating with other devices  105  on a computer network. In alternative embodiments, much of the functionality of the circuit simulator may be implemented in one or more application-specific integrated circuits or field-programmable gate arrays, thereby either eliminating the need for a CPU, or reducing the role of the CPU in simulating the integrated circuit.  
         [0022]     The memory device  104  may include a high-speed random access memory or may also include a non-volatile memory, such as one or more magnetic disk storage devices. The memory device  104  may also include mass storages that are remotely located from the central process unit(s)  100 . The memory device  104  preferably stores: 
        an operating system  108  that includes procedures for handling various basic system services and for performing hardware-dependent tasks;     an electrical isomorphism module  110 , for determining electrical isomorphism between two electrical networks of an integrated circuit;     transfer-function matrix and moments-matching database  112 , for storing information for the transfer-function matrix and the moments-matching approaches;     a DSPF/SPEF flat netlist  114 ;     a behavioral SPICE netlist  116 ; and     a back-annotated hierarchical netlist  118 .        
 
         [0029]     The electrical isomorphism module, transfer-function matrix and moments-matching database, DSPF/SPEF flat netlist, behavioral SPICE netlist, and back-annotated hierarchical netlist may include executable procedures, sub-modules, tables, and other data structures. In other embodiments, additional or different modules and data structures may be used, and some of the modules and/or data structures listed above may not be used.  
         [0030]     In the following sections, two approaches are described for determining electrical isomorphism between two electrical networks of an integrated circuit, namely the transfer-function matrix approach and the moments-matching approach.  
         [0000]     Transfer-Function Matrix Approach  
         [0031]     In general, the transfer-function matrix approach obtains the transfer-function matrices at a predefined frequency from the two networks of interest and compares the elements of the corresponding matrices. For an electrical network represented by a n×n matrix, there are n×n comparisons. If each element from the first matrix is substantially equivalent to its corresponding element in the second matrix, the two electrical networks are considered as electrically isomorphic networks at this frequency. This process is repeated at other frequencies. If the two electrical networks are substantially equivalent at all frequencies, the two electrical networks are considered to be electrically isomorphic. In that case, a single representation of the two electrical networks is stored and used for simulation.  
         [0032]     In one embodiment, the transfer-function matrix approach includes: (a) determining a first transfer-function matrix representing the first electrical network and a second transfer-function matrix representing the second electrical network respectively at a predefined frequency; (b) comparing corresponding elements of the first and second transfer-function matrices; (c) identifying the first and second electrical networks as electrically isomorphic networks at the predefined frequency, if the corresponding elements of the first and second transfer-function matrices are substantially equivalent within a predetermined tolerance range. The above procedures from (a) to (c) are repeated over a predetermined range of frequencies. If the first and second electrical networks are substantially equivalent over the predetermined range of frequencies, the first and second electrical networks are identified as electrically isomorphic networks over the predetermined range of frequencies.  
         [0033]     Specifically, the method for determining a transfer-function matrix of an electrical network at the predefined frequency includes the following procedures for each port in the electrical network: (a) expressing a transfer-function relationship between the port with respect to other ports in the electrical network; (b) stimulating the port with a known input; and (c) determining transfer-function responses at other ports of the electrical network with respect to the known input. The above procedures from (a) to (c) are repeated for all ports of the electrical network. Then, the transfer-function matrix is constructed using the transfer-function responses determined.  
         [0034]      FIG. 2  is an RC network used to illustrate the transfer-function matrix approach according to an embodiment of the present invention. The RC network  200  includes power supplies V S1    202  and V S2    204 , reference resistors R ref    206  and R ref    208 , resistors R 1   210 , R 2   212 , R 3   214 , and R 4   216 , and capacitors C 1   220 , C 2   222 , C 3   224 , C 4   226 , and C 5   228 . The RC network  200  also has 5 ports, namely ports  1 ,  2 ,  3 ,  4 , and  5 . Considering the electrical network as shown in  FIG. 2 , the matrix Y relates voltage (v) to current (i) by  
         [0000]     Yv=i.  
         [0035]      FIG. 3  illustrates a circuit representation of a port in the RC network of  FIG. 2  according to an embodiment of the present invention. Each port (port i) of the RC network of  FIG. 2  may be modeled to include a power source E G    302 , a reference-resistor R ref    304 , and a load-impedance Z L    306 . The voltage across the Z L    306  is V i , and the current passing through the Z L  is I i . As shown in  FIG. 3 , the wave vectors a i  and b i  at the port i may be defined as  
                 a   i     =         V   i         R   ref         +         R   ref       ⁢     I   i           ,   and                   b   i     =         V   i         R   ref         -         R   ref       ⁢     I   i           ;               
 where V i  is the terminal voltage, I i  is the terminal current, and R ref  is an arbitrary reference resistance. 
 
         [0036]     Next, extended wave vectors may be defined such that 
 
â i =a i  if node i is a port, otherwise  â   i   =I   i =( Yv ) i ; and 
 
{circumflex over (b)} i =b i  if node i is a port, otherwise  {circumflex over (b)}   i   =I   i =( Yv ) i . 
 
 In this example, nodes  1  and  5  are ports and nodes  2 ,  3 , and  4  are internal nodes. The procedures for computing the transfer-function matrix are described as follows. 
 
         [0037]     First, define the matrix  
         F   _     =     [           1       R   ref                                                                             1                                                                       1                                                                       1                                                                         1       R   ref               ]         
 
 i.e.,  
         F   ii     =     1       R   ref             
 
 if i is a port, F ij =0 if i≠j, and F ii =1 otherwise; and the matrix  
         H   _     =     [           1     R   ref           0       0       0       0           0       0       0       0       0           0       0       0       0       0           0       0       0       0       0           0       0       0       0         1     R   ref             ]         
 
 i.e.,  
         H   ii     =     1     R   ref           
 
 if i is a port, and H ii =0 otherwise. Then, 
 
 â={overscore (F)}   −1 ( {overscore (H)}++{overscore (Y)} ) v ;  
 
 {circumflex over (b)}={overscore (F)}   −1 ( {overscore (H)}−{overscore (Y)} ) v.  
 
 Solving for {circumflex over (b)}, 
 
 {circumflex over (b)}={overscore (F)}   −1 ( {overscore (H)}−{overscore (Y)} )( {overscore (H)}+{overscore (Y)} ) −1   {overscore (F)}â.  
 
 The transfer-function matrix (Ŝ) may be written as 
 
 Ŝ={overscore (F)}   −1 ( {overscore (H)}−{overscore (Y)} )( {overscore (H)}+{overscore (Y)} ) −1   {overscore (F)}={overscore (F)}   −1 [2 {overscore (H)} (( {overscore (H)}+{overscore (Y)} ) −1   −{overscore (I)} )] {overscore (F)},  
 
 where {overscore (I)} is the identity matrix. Note that ({overscore (H)}+{overscore (Y)}) is equivalent to ({overscore (G)}+s{overscore (C)}), where s denotes a complex frequency jω, {overscore (C)} denotes the capacitance matrix, and {overscore (G)} denotes the conductance matrix. 
 
         [0038]     For a given frequency ω, the Ŝ matrix is calculated to characterize the electrical response of the network. To calculate the Ŝ matrix, a vector r i  is constructed, whose entries are all zeros, except for the i th  entry, which equals to 1. Then, the vector 
 
 {circumflex over (b)}   i   ={overscore (F)}   −1 [2 {overscore (H)} (( {overscore (G)}+s{overscore (C)} ) −1   −{overscore (I)} )] {overscore (F)}r   i  
 
 is computed by multiplying r i  through Ŝ. Note that since r i  has a single entry of 1 in its i th  entry, {circumflex over (b)} i  is the i th  column of Ŝ. By repeating the process, the complete transfer-function matrix is obtained. 
 
         [0039]     Next, all entries of vector r i  are set to 0, except that the i th  entry is set to 1, where i is the i th  port. Then the following equation is solved 
 
( {overscore (G)}+s{overscore (C)} ) T   x   i   =r   i , 
 
 where ( ) T  represents the transpose of a matrix. For each input port j, compute 
 
 c   ji =( r   j ) T   x   i . 
 
 Then,  
           S   ii     =         2   ⁢     c   ii         R   ref       -   1       ;       
 
 and for i≠j,  
         S   ij     =         2   ⁢     c   ji         R   ref       .         
 
         [0040]     In the transfer-function matrix approach, the Ŝ matrices are calculated for the two electrical networks over a range of frequencies. The highest frequency of interest is determined by detecting the sharpest rising and falling edges of voltage and current sources. For example, if the shortest transition time is 0.1 ns, then the highest frequency is 10 GHz (1/0.1 ns). If the corresponding Ŝ matrices of the two electrical networks are within a predetermined tolerance, the two electrical networks are considered as electrically isomorphic networks, and a single representation of the two electrical networks is stored and used for simulation. Note that the predetermined tolerance may be a user-defined parameter. For example, a user-defined tolerance of 1% indicates that the values of the corresponding elements of the transfer-function matrices if the two electrical networks are within 1% of each other. A person of ordinary skill in the art would recognize that other user-defined parameters for setting the tolerance levels may be used according to the application and accuracy level of the simulation desired by the circuit designer.  
         [0000]     Moments-Matching Approach  
         [0041]     In the moments-matching approach, the admittance matrices of two electrical networks, where the coefficients of the admittance matrices contain a sum of moments, are obtained. The corresponding coefficients of the admittance matrices are then compared to determine whether two electrical networks are electrically isomorphic networks.  
         [0042]     In one embodiment, the moments-matching approach includes determining a first admittance matrix representing the first electrical network and a second admittance matrix representing the second electrical network respectively and then comparing corresponding elements of the first and second admittance matrices. If the corresponding elements of the first and second admittance matrices are substantially equivalent within a predetermined tolerance range, the first and second electrical networks are identified as electrically isomorphic networks.  
         [0043]     In particular, the method represents a voltage of an unknown internal port as a function of voltages of known external supplies and a function of complex frequency (jw). The method for determining an admittance matrix of an electrical network further includes the following procedures for each known external supply: (a) providing a stimulus to the electrical network by turning on the known external supply at a predefined voltage and turning off other known external supplies; (b) measuring current responses at the unknown ports of the electrical network due to the stimulus in (a); and (c) repeating procedures (a) and (b) for all known external power supplies of the electrical network. Then, the method constructs the admittance matrix using the current responses determined from procedures (a) to (c) described above.  
         [0044]      FIG. 4  is an RC network used to illustrate the moments-matching approach according to an embodiment of the present invention. The RC network  400  includes power supplies V s1    402  and V s2    404 , resistors R 1   410 , R 2   412 , R 3   414 , and R 4   416 , and capacitors C 1   420 , C 2   422 , C 3   424 , C 4   426 , and C 5   428 . The RC network  400  also has 5 ports, namely ports  1 ,  2 ,  3 ,  4  and  5 . In the moments-matching approach, the state variables (V) at zero frequency are expanded. The circuit equation of  FIG. 4  may be written as  
         (       [             G   1     +     G   2             -     G   2                             -     G   2               G   2     +     G   3             -     G   3                             -     G   3               G   3     +     G   4             ]     +     s   ⁡     [           C   2                                                   C   3                                                   C   4           ]         )     ⁢               [           V   2               V   3               V   4           ]     =       [           G   1         0           0       0           0         G   4           ]     ⁡     [           V   s1               V   s2           ]         ,           ⁢       with   ⁢             ⁢             ⁢     G   i       =       1     R   i       .                 
 In the above equation, V 2 , V 3 , V 4  are functions of the complex frequency (s=jω), and 
   V   2   =V   2,0   +sV   2,1   +s   2   V   2,2   + . . . +s   n   V   2,n ,    V   3   =V   3,0   +sV   3,1   +s   2   V   3,2   + . . . +s   n   V   3,n ,    V   4   =V   4,0   +sV   4,1   +s   2   V   4,2   + . . . +s   n   V   4,n ,  
 where the first subscript represents a node number and the second subscript represents the ascending order of coefficient. In this example, n equals 2 because n cannot exceed the number of internal nodes minus 1. The order of expansion n affects the accuracy of calculation. In other embodiments, a number less than n may be chosen if the approximation meets desired design criteria. 
 
         [0045]     Next, the matrix equation is solved by setting V s1 =1 and V s2 =0 for input port  1 ; and V s2 −1 and, V s1 =0 for input port  2 . In other words, the RC network is stimulated by turning on one known external supply at a predefined voltage and turning off other known external supplies.  
         [0046]     In matrix form, 
 
( {overscore (G)}+s{overscore (C)} ) {circumflex over (v)}={circumflex over (b)};  
 
 {circumflex over (v)}={circumflex over (v)}   0   +s{circumflex over (v)}   1   +s   2   {circumflex over (v)}   2 . 
 
         [0047]     By equating the constant term and coefficients of s, s 2 , . . . , etc. 
 
{circumflex over (v)} 0 ={overscore (G)} −1 {circumflex over (b)}; 
 
{circumflex over (v)} 1 =−{overscore (G)} −1 {overscore (C)}{circumflex over (v)} 0 . 
 
         [0048]     Then, the port currents are expressed in terms of the known voltages 
 
 I   1   =V   s1 ( G   1   +sC   1 )− V   2   G   1 ; 
 
 I   2   =V   s2 ( G   4   +sC   5 )− V   4   G   4 . 
 
         [0049]     For input port  1 , V 2  may be expressed as 
 
 V   2   =V   1   2,0   +sV   1   2,1   +s   2   V   1   2,2 + . . . ; 
 
 with the superscript i denotes the influence of input port i. The port current at port  1  due to input port  1  may be expressed as 
 
 I   1   1   =G   1   −V   2,0   1   G   1   +s ( C   1   −V   2,1   1   G   1 )−s 2   V   2,2   1   G   1 . 
 
         [0050]     Similarly, I 2   1 , I 1   2 , I 2   2  are expressed as follows: 
 
 I   2   1   =−V   4,0   1   G   4   −sV   4,1   1   G   4   −s   2   V   4,2   1   G   4 ; 
 
 I   1   2   =−V   2,0   2   G   1   −sV   2,1   2   G   1   −s   2   V   2,2   2   G   1 ; 
 
 I   2   2   =G   4   −V   4,0   2   G   4   +s ( C   5   −V   4,1   2 )− s   2   V   4,2   2   G   4 . 
 
         [0051]     For n ports, the admittance matrix coefficients are obtained from I 1, . . . , n   1, . . . , n . Next, the two electrical networks are determined to be electrically isomorphic networks if the corresponding coefficients of the admittance matrices for the first few moments are within a predetermined tolerance. Note that the predetermined tolerance may be a user-defined parameter. For example, a user-defined tolerance of 1% indicates that the values of the corresponding admittance matrix coefficients of the two electrical networks are within 1% of each other. A person of ordinary skill in the art would recognize that other user-defined parameters for setting the tolerance levels may be used according to the application and accuracy level of the simulation desired by the circuit designer. If the sums of the moments of the corresponding elements of the two admittance matrices are substantially equivalent, a single representation of the two electrical networks is stored and used for simulation.  
         [0052]      FIG. 5  illustrates a method for applying the technique of electrical isomorphism to improve circuit simulation efficiency according to an embodiment of the present invention. As shown in  FIG. 5 , a behavioral SPICE netlist  502  and a DSPF/SPEF flat netlist  510  are merged into a back-annotated hierarchical netlist  520  containing back-annotated parasitic elements. A system and method for converting a flat netlist into a hierarchical netlist are described in U.S. Patent application “System and Method for Converting a Flat Netlist into a Hierarchical Netlist.” The entire content of the “System and Method for Converting a Flat Netlist into a Hierarchical Netlist” application is incorporated herein by reference.  
         [0053]     The behavioral SPICE netlist  502  from the schematic has three instances of the same inverter (INV), namely X 1   504 , X 2   506 , and X 3   508 . The three inverters, namely X 1 , X 2 , and X 3 , refer to the same subcircuit INV  509 . The DSPF/SPEF flat netlist  510  has three nets. Two of the nets X 1 .B  512  and X 2 .B  514  contain the same RC network while X 3 .B  516  contains a different RC network. The nets are grouped into sets of substantially equivalent subcircuits and then stitched to form the back-annotated hierarchical netlist  520 . When the instances X 1  and X 2  are determined to receive the same net B, then they may share the same modified inverter primitive subcircuit INV 1   522 . The original INV primitive  509  is split into two subcircuits  522  and  524  so that X 3  is separated from X 1  and X 2  with its own version of subcircuit INV 2   524 . In this example, X 1   504  and X 2   506  have an identical RC network as described by the subcircuit  522 . The technique of electrical isomorphism may be applied in simulating the circuit of  FIG. 5  that X 1  and X 2  may be represented by a single RC network even though they contain topologically different RC networks. Therefore, the method of electrical isomorphism improves the performance of circuit simulation because it reduces the number of circuit elements that have to be simulated. A person of ordinary skill in the art may recognize that the technique of electrical isomorphism may be applied before or after an RC Reduction.  
         [0054]     One skilled in the relevant art will recognize that many possible modifications and combinations of the disclosed embodiments may be used, while still employing the same basic underlying mechanisms and methodologies. The foregoing description, for purposes of explanation, has been written with references to specific embodiments. However, the illustrative discussions above are not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations are possible in view of the above teachings. The embodiments were chosen and described to explain the principles of the invention and their practical applications, and to enable others skilled in the art to best utilize the invention and various embodiments with various modifications as are suited to the particular use contemplated.