Patent ID: 8209644

Claim:
A computer-implemented method for simulating an electrical circuit comprising a set of sub-circuits, each sub-circuit comprising a set of ports, the method comprising: receiving a circuit description comprising a set of sub-circuit descriptions; defining, based on said circuit description, a hierarchical relationship among the set of sub-circuits that specifies whether each sub-circuit is instantiated by other sub-circuits; identifying a particular sub-circuit having a particular port that (i) connects, in a first instantiated instance, to a voltage source and (ii) does not connect, in a second instantiated instance, to any voltage source; creating (i) a first copy of said particular sub-circuit for simulating the particular sub-circuit when the particular port is connected to a voltage source in the first instantiated instance and (ii) a second copy of said particular sub-circuit for simulating the particular sub-circuit when the particular port is not connected to a voltage source in the second instantiated instance; and at the computer, performing a simulation of the circuit using the first and second copies of the particular sub-circuit.