Sensitivity computation in piecewise approximate circuit simulation

13
171 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 10, NO. 2, FEBRUARY 1991 Sensitivity Computation in Piecewise Approximate Circuit Simulation Peter Feldmann, Student Member, IEEE, Tuyen v. Nguyen, Student Member, IEEE, Stephen W. Director, Fellow, IEEE, and Ronald A. Rohrer, Fellow, IEEE Abstract-Both direct and adjoint methods are applied to the com- putation of time-domain transient sensitivities in the already efficient SPECS piecewise approximate circuit simulation environment. By ex- ploiting the event-driven nature of SPECS, the computation, storage, and interpolation of the Jacobians is not required to obtain sensitivi- ties. Both direct and adjoint methods require only a marginal compu- tational overhead and provide equivalent results. The choice of the method to employ depends on the ratio of the number of outputs to the number of parameters. More parameters favor the adjoint method and more outputs favor the direct. The overall efficiency of both SPECS and its time-domain sensitivity extension allows it to be applied to re- alistic circuits that due to their large size had previously made such analysis impractical. Simulation results on industrial circuits of up to 1500 MOS transistors show that transient sensitivities can be efficiently computed for large circuits. I. INTRODUCTION ENSITIVITY information provides a first-order approxi- S mation of the variation of circuit performance in response to parameter variations. Such sensitivities are extremely useful for the design of VLSI circuits in that they provide the underlying information necessary for optimization, statistical analysis, re- liability analysis, and performance-directed design in general. Moreover, as devices shrink to submicrometer sizes such sen- sitivities may be able to assess increasingly important effects of parameter variations, modeling approximations, and parasitic elements. While elegant methods [ 11, [2] for obtaining circuit sensitivities have long been known in theory, their practical ap- plication to time-domain transient sensitivity computation for circuits of significant size has been prohibitive because of ex- cessive storage and CPU time requirements. In this work, we describe a method of sensitivity computation that is based upon the efficient SPECS [3] piecewise approxi- mate circuit simulator. SPECS achieves a significant increase in performance over classical circuit simulation methods while retaining sufficient accuracy for most digital applications. Moreover, by exploiting the event-driven nature of SPECS, both the direct [2] and adjoint [I] methods for sensitivity computa- tion can be implemented very efficiently. Not only is the nom- inal simulation using SPECS more efficient than traditional circuit simulation, but the overhead required for the sensitivity analysis in SPECS is also much smaller than the overhead re- quired in a circuit simulation environment. The method devel- oped in this paper for computing transient sensitivities is gen- Manuscript received January 8, 1989. This work was supported in part by the Semiconductor Research Corporation, the National Science Foun- dation, AT&T Bell Laboratories, and the Harris Corporation. This paper was recommended by Associate Editor A. E. Ruehli. The authors are with the Department of Electrical and Computer Engi- neering, Carnegie Mellon University, Pittsburgh, PA 152 13. IEEE Log Number 9040609. era1 and applicable to any circuit simulator that employs piece- wise constant models. In traditional circuit simulation, transient sensitivities can be computed by the direct or adjoint method. In the direct method, a sensitivity circuit is associated with each variable parameter. Each element of the sensitivity circuit is obtained by directly differentiating the characteristic equation of the original ele- ment with respect to the desired parameter. The solution of this sensitivity circuit provides the sensitivities of all circuit re- sponses simultaneously with respect to this single parameter. One sensitivity circuit analysis must be performed for each vari- able parameter. The adjoint method, on the other hand, simultaneously com- putes the sensitivities of one circuit performance with respect to all variable circuit parameters. In this method, the original circuit is simulated over the time interval of interest. A spe- cially constructed adjoint circuit is then simulated over the same interval but backward in time. At each time point of this back- ward simulation, the transpose of the Jacobian that specifies the appropriate linearized circuit during the forward simulation, is employed to analyze the resultant adjoint circuit. The desired sensitivities of one performance measure with respect to all variable parameters are obtained by convolving appropriate re- sponses from the forward and backward simulations. One ad- joint circuit analysis must be performed to compute the sensitivities of each response performance function. The advantages and disadvantages of the two methods have been discussed in the literature [2], [4] and it has been often erroneously claimed that the direct method is superior to the adjoint method for sensitivity computation. In fact, the choice of the method to be used is essentially application dependent. In general, the direct method is advantageous when sensitivities of many responses with respect to a few parameters are re- quired, but not efficient when sensitivities with respect to many parameters are desired. On the other hand, the adjoint circuit approach is advantageous when sensitivities of a few responses with respect to many parameters are required. The latter is usu- ally the case in practice and most applications favor the adjoint approach. Adjoint analysis, however, incurs the problem of either storing the Jacobians at each time point of the forward simulation or reconstructing these Jacobians during the back- ward simulation. In addition, the waveforms across the ele- ments of interest during the forward simulation must also be stored for the convolution with the corresponding waveforms from the backward simulation. However, this storage require- ment is relatively insignificant in comparison with the storge requirement for the Jacobians. Another problem. which is com- mon to both the direct and adjoint methods, is time grid mis- match [2]. The optimal time grids, generated for good error control, for the simulation of the original circuit, and the sen- 0278-0070/91/0200-017 1$01 .OO 0 1991 IEEE

Transcript of Sensitivity computation in piecewise approximate circuit simulation

171 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 10, NO. 2, FEBRUARY 1991

Sensitivity Computation in Piecewise Approximate Circuit Simulation

Peter Feldmann, Student Member, IEEE, Tuyen v. Nguyen, Student Member, IEEE, Stephen W. Director, Fellow, IEEE, and Ronald A. Rohrer, Fellow, IEEE

Abstract-Both direct and adjoint methods are applied to the com- putation of time-domain transient sensitivities in the already efficient SPECS piecewise approximate circuit simulation environment. By ex- ploiting the event-driven nature of SPECS, the computation, storage, and interpolation of the Jacobians is not required to obtain sensitivi- ties. Both direct and adjoint methods require only a marginal compu- tational overhead and provide equivalent results. The choice of the method to employ depends on the ratio of the number of outputs to the number of parameters. More parameters favor the adjoint method and more outputs favor the direct. The overall efficiency of both SPECS and its time-domain sensitivity extension allows it to be applied to re- alistic circuits that due to their large size had previously made such analysis impractical. Simulation results on industrial circuits of up to 1500 MOS transistors show that transient sensitivities can be efficiently computed for large circuits.

I. INTRODUCTION ENSITIVITY information provides a first-order approxi- S mation of the variation of circuit performance in response to

parameter variations. Such sensitivities are extremely useful for the design of VLSI circuits in that they provide the underlying information necessary for optimization, statistical analysis, re- liability analysis, and performance-directed design in general. Moreover, as devices shrink to submicrometer sizes such sen- sitivities may be able to assess increasingly important effects of parameter variations, modeling approximations, and parasitic elements. While elegant methods [ 11, [2] for obtaining circuit sensitivities have long been known in theory, their practical ap- plication to time-domain transient sensitivity computation for circuits of significant size has been prohibitive because of ex- cessive storage and CPU time requirements.

In this work, we describe a method of sensitivity computation that is based upon the efficient SPECS [3] piecewise approxi- mate circuit simulator. SPECS achieves a significant increase in performance over classical circuit simulation methods while retaining sufficient accuracy for most digital applications. Moreover, by exploiting the event-driven nature of SPECS, both the direct [2] and adjoint [ I ] methods for sensitivity computa- tion can be implemented very efficiently. Not only is the nom- inal simulation using SPECS more efficient than traditional circuit simulation, but the overhead required for the sensitivity analysis in SPECS is also much smaller than the overhead re- quired in a circuit simulation environment. The method devel- oped in this paper for computing transient sensitivities is gen-

Manuscript received January 8, 1989. This work was supported in part by the Semiconductor Research Corporation, the National Science Foun- dation, AT&T Bell Laboratories, and the Harris Corporation. This paper was recommended by Associate Editor A . E. Ruehli.

The authors are with the Department of Electrical and Computer Engi- neering, Carnegie Mellon University, Pittsburgh, PA 152 13.

IEEE Log Number 9040609.

era1 and applicable to any circuit simulator that employs piece- wise constant models.

In traditional circuit simulation, transient sensitivities can be computed by the direct or adjoint method. In the direct method, a sensitivity circuit is associated with each variable parameter. Each element of the sensitivity circuit is obtained by directly differentiating the characteristic equation of the original ele- ment with respect to the desired parameter. The solution of this sensitivity circuit provides the sensitivities of all circuit re- sponses simultaneously with respect to this single parameter. One sensitivity circuit analysis must be performed for each vari- able parameter.

The adjoint method, on the other hand, simultaneously com- putes the sensitivities of one circuit performance with respect to all variable circuit parameters. In this method, the original circuit is simulated over the time interval of interest. A spe- cially constructed adjoint circuit is then simulated over the same interval but backward in time. At each time point of this back- ward simulation, the transpose of the Jacobian that specifies the appropriate linearized circuit during the forward simulation, is employed to analyze the resultant adjoint circuit. The desired sensitivities of one performance measure with respect to all variable parameters are obtained by convolving appropriate re- sponses from the forward and backward simulations. One ad- joint circuit analysis must be performed to compute the sensitivities of each response performance function.

The advantages and disadvantages of the two methods have been discussed in the literature [2], [4] and it has been often erroneously claimed that the direct method is superior to the adjoint method for sensitivity computation. In fact, the choice of the method to be used is essentially application dependent. In general, the direct method is advantageous when sensitivities of many responses with respect to a few parameters are re- quired, but not efficient when sensitivities with respect to many parameters are desired. On the other hand, the adjoint circuit approach is advantageous when sensitivities of a few responses with respect to many parameters are required. The latter is usu- ally the case in practice and most applications favor the adjoint approach. Adjoint analysis, however, incurs the problem of either storing the Jacobians at each time point of the forward simulation or reconstructing these Jacobians during the back- ward simulation. In addition, the waveforms across the ele- ments of interest during the forward simulation must also be stored for the convolution with the corresponding waveforms from the backward simulation. However, this storage require- ment is relatively insignificant in comparison with the storge requirement for the Jacobians. Another problem. which is com- mon to both the direct and adjoint methods, is time grid mis- match [2]. The optimal time grids, generated for good error control, for the simulation of the original circuit, and the sen-

0278-0070/91/0200-017 1$01 .OO 0 1991 IEEE

I72 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 10, NO. 2, FEBRUARY 1991

sitivity or the adjoint circuits, are in general different. In order to alleviate this problem, the Jacobians must be either recom- puted or interpolated, which may undermine computational ef- ficiency.

In this paper we show how these problems can be addressed by exploiting the event driven nature of the SPECS piecewise approximate circuit simulator. In fact, both direct and adjoint approaches are implemented in the SPECS environment with minimal overhead. As a result, time-domain sensitivities can be obtained very efficiently.

This paper is organized as follows. Section 11 describes how the theoretical methods for sensitivity computation are applied to the SPECS piecewise approximate simulation methodology. In Section 111 the general form of the branch equations that char- acterize both the sensitivity and the adjoint circuits is derived. Section IV describes the derivation of the solution of the com- panion circuit constructed either for the direct or the adjoint method. Results of sensitivity computations for circuits of up to 1500 MOS devices together with the performance compari- son of the adjoint and direct methods are presented in Section V. Section VI concludes the paper. Detailed derivations for the branch constitutive relationships of both the direct and adjoint circuits are given in the Appendixes.

11. TRANSIENT SENSITIVJTY COMPUTATION IN SPECS

The proposed method for sensitivity calculation can be used in conjunction with any circuit simulator that employs discrete piecewise constant models. SPECS is a piecewise approximate circuit simulator that exploits circuit latency, simplified device models, and uses a stability controlled explicit integration al- gorithm. In SPECS, the device characteristics are approximated by piecewise constant table models. An example of a table model for a two terminal device together with its time depen- dent piecewise constant current is shown in Fig. l(a) and (b).

The state of a circuit element can be defined in terms of the active segment in the I-V plane at any given time. For example, the state of the element shown in Fig. l(b) at time I can be defined in terms of the presently active segment Zk. The state of the entire circuit can be defined in terms of the combination of the states of all the elements in the circuit at a given time. An event is said to occur when the circuit changes its state. An inherent assumption of SPECS, which renders it computation- ally inexpensive, is that one, or at most a few elements, change state each time an event occurs. Hence, when an event occurs due to an element changing its state, the simulation algorithm simply computes the effect of this event on the rest of the circuit and then recomputes and schedules the time when the circuit is anticipated to change its state again.

In a piecewise constant circuit simulator such as SPECS, the adjoint and the sensitivity circuits are very simple. During the original simulation, between event times, all resistive (linear and nonlinear) elements are replaced by constant independent current sources. In this case, the circuit analyzed during the original simulation consists essentially only of independent voltage and current sources and capacitors. The sensitivity and the adjoint circuits have the same topology as the original cir- cuit where each branch is replaced by its corresponding ele- ment. The corresponding elements in the sensitivity or adjoint circuit are the following: open circuits for current sources in the original circuit, short circuits for voltage sources, and capaci- tors for capacitors [l], [2].

(a) (b) Fig. 1. (a) The piecewise constant I-Vcharacteristic of a two-terminal ele- ment in SPECS. (b) A corresponding time-domain current which could be associated with it.

Therefore, the sensitivity and adjoint circuits consist of dis- connected capacitors that are charged or discharged by inde- pendent sources. At each event time during the original simulation, there is a step change in current. As shown later in the paper, this step change in the original circuit corresponds to an instantaneous charge transfer among the nodes in the sensi- tivity or adjoint circuit. Note that this charge redistribution oc- curs locally due to the event driven nature of SPECS, and there is no need to solve the entire circuit to ascertain its effect. The associated simulation simply consists of computing the usually local redistribution of charge at each event time.

111. SENSITIVITY AND ADJOINT CIRCUIT ELEMENTS

In this section, the general form of the branch constitutive relations (BCR’s) for the elements in the associated circuits em- ployed for sensitivity computation is discussed. Note that the associated circuit in the direct method is called the sensitivity circuit and the associated circuit in the adjoint method is called the adjoint circuit. Detailed derivations of the sensitivity circuit elements are given in Appendix I and the derivations for the adjoint circuit elements are given in Appendix 11. Only circuit elements supported by SPECS are considered in this paper. These elements include general two terminal elements, specif- ically resistors and diodes, linear capacitors, MOS transistors and the current-controlled current sources required for the Ebers-Moll models of BJT’s.

The voltages an! currents in the associated circuits will be denoted by 0 and i while the voltages and currents in the orig- inal circuit will be denoted by v and i . The temporal variable in the original circuit will be denoted by I, and in the sensitivity and adjoint circuits by 7, where r = t, the normal time, for the sensitivity circuit and T = to + tf - t, the backward time, for the adjoint circuit [ 11.

As derived in the Appendixes, the BCR’s for both the sen- sitivity and adjoint circuit elements can be summarized as in Fig. 2. Branches corresponding to independent voltage sources in the original circuit become short circuits in the associated sensitivity, and adjoint circuits and branches corresponding to independent currert sources become open circuits. Branches corresponding to linear capacitors in the original circuit remain linear capacitors with the same capacitance in the adjoint cir- cuit; they become linear capacitors in parallel with independent current sources in the sensitivity circuit. Branches correspond- ing to resistors, nonlinear conductors, and MOS devices be- come time varying conductances and controlled sources, some having independent sources in parallel. All the- indepfndent sources can be grouped in the excitation vectors V, and I,. The values of the time varying conductances and :ontrolled sources can be expressed in the conductance matrix G, the elements of

I'ELDMAN et al. : COMPUTATION IN PIECEWISE APPROXIMATE CIRCUIT SIMULATION

~

173

Original Eircvil

i = f(v.p) - G c n d w terminal element

-I"t Linear Capacitor

SPECS MOSF!3 Model

Sasitivily dmrit ~

Adjdnt circuit

4- P,= - a P 2

Fig. 2 . Summary table of corresponding elements in the sensitivity and adjoint circuits.

which are given by

f A i I

(1 )

Therefore, the associated sensitivity and adjoint circuit ele- ments can be described together by the following system of equations:

r, = cfi, i; =

it, = V, + a,,b,

+ ailu + i, (2 )

where C is the diagonal matrix of capacitance values; 1, and 9, are the current and voltage excitations applied to the sensitivity or adjoint circuits; a,, and ai are matrices consisting of the coef- ficients for the voltage controlled voltage sources and the cur- rent controlled current sources; b, and i, are vectors of capacitor voltages and currents; Et, and 4 are-vectors of conductive ele- ment voltages and curreTts; b,,Aand i,, are vectors of controlling voltages and currents; V, and I, are vectors of voltage and cur- rent excitations; and d is the conductance matrix. In order to keep the derivation simple we will ignore the voltage excita- tions, the current controlled current sources, and the voltage controlled voltage sources. It can be argued that most of the interesting performance functions require only current source excitations for the adjoint circuit. For the direct method, on the other hand, whenever the sensitivity with respect to a zero val- ued resistor is desired, an independent voltage source will be part of the sensitivity circuit. However, in order to keep the

algebra simple, in our presentation it is assumed that V, = 0. With these simplifying assumptions, the BCR's for both the ad- joint and sensitivity circuits can be summarized by the follow- ing system of equations:

r, = cfi, ( 3 )

i; = dit, + i, (4)

8, = 0. ( 5 )

All the elements of the conductance matrix G are time vary- ing and the temporal dependence is time for the sensitivity cir- cuit and backward time for the adjoint circuit. Note that except for the excitations, both the sensitivity and adjoint circuits have the samf topology as the original circuit. The excitation vectors I, and V, are dependent upon the variable parameter in the di- rect method and the performance function in the adjoint method.

IV. SOLUTION OF THE ASSOCIATED CIRCUIT

4.1. Formulation of the Associated Circuit Equations

In the previous section we represented the branch constitutive relationships of both the adjoint and the sensitivity circuits with a common mathematical formulation. Since both associated cir- cuits have the same topology as the original, their Kirchhoff's law equations will be the same. We are, therefore, able to de- rive the solution of both circuits simultaneously. In the follow- ing derivation we use the term associated circuit to refer to both the adjoint and the sensitivity circuits.

State variable and tree/link [ 5 ] formulations of the circuit equations will be employed for the associated circuit. In the tree/link formulation the KCL and KVL equations can be writ- ten as

where and 6, are vectors of tree currents and voltages; 4 and b1 are vectors of link currents and voltages; and F is the topo- logical matrix [ 5 ] relating tree voltagedcurrents and link volt- ages/currents. Each row of F represents a fundamental cutset corresponding to a tree branch and each column of F represents a fundamental loop corresponding to a cotree link. Note that the F matrix of the associated circuit is identical to the topological matrix of the original circuit. For clarity of presentation it will be assumed that the tree is formed exclusively by independent voltage sources and capacitors. All other elements such as re- sistors, diodes, and independent and voltage controlled current sources are in the cotree. It is convenient to partition the tree current and voltage vectors as follows:

[ = [ :] and 8, =

where the index v stands for independent voltage sources and c stands for tree capacitors. This partition leads to the following partitioning of the F matrix into submatrices:

F = [::I. The system of differential equations that describes the behav-

ior of the associated circuit can now be derived using the BCR's

174 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. IO, NO. 2, FEBRUARY 1991

derived in the previous section ((3), (4), and (5)) and the Kirchhoffs law equations (6) and (7)):

ic = Cchc = -Fc<

= -F,(&, + jx)

= -Fce(F,'6c + Fr6,) - Fc&.

Since in the previous section it was also assumed that 6, = 0, the differential equation to be solved in order to simulate the associated circuit becomes

b, = -C-'FcGF,'6, - C 1 F C j x . ( 9 ) This derivation can be extended in a straightforward manner to include voltage excitations, cotree capacitors, and all types of controlled sources.

4.2. Solution of the Associated Circuit

Equation (9), which describes the behavior of the associated circuit, constitutes a first-order linear system of differential equations with variable coefficients of the form

b,(7) = A ( 7 ) h C ( 7 ) + Bu(7) ( 10) where 7 = t for the sensitivity circuit and 7 = Q + to - t for the adjoint circuit and

A ( 7) = - C- ' F, e ( 7) F,' (11)

B = -C-'F (12)

U(.) = &). (13) It was shown in th! previous section that the elements of the

conductance matrix Gare the partial derivatives ( a i m / a v n ) . Be- cause of the piecewise constant modeling, the derivatives will be zero except for the values of U, corresponding to current steps in the I-V characteristic. At these points the associated element value will be a Dirac impulse, the derivative of a step. The controlling voltage U, crosses these values, which corre- spond to the current steps in the I-V characteristic, at the time points corresponding to the event times in the original simula- tion. Therefore, the elements of matrix G obtained by the dif- ferentiation of the piecewise constant I-V characteristics are trains of impulses occumng at times corresponding to events in the original simulation.

Assume that 7, - I and 7, correspond to successive events in the original simulation. Between the events times, e = 0 and the associated circuit simply consists of a tree of capacitors charged (discharged) by independent sources. A ( 7) is zero and the behavior of the circuit in the open time interval (7, - , , 7,) is described by

6,(7) = Cc(7 , - ' ) - 1' C - ' F c f x ( t ) dr. (14)

At event times 7,, instantaneous charge redistribution occurs among the affected capacitors and the solution of (10) is given

T r - I

by

itc(.:) = exp A ( 7 ) d 7 6J7;) (1;: ) + [:exp (!:A(.) d o ) Bu(7 ) d7. (15)

Note that although A ( 7) is integrated over an infinitesimally small time interval, the resulting matrix will be nonzero be- cause the integrand contains Dirac impulses. The second term of the solution (15) is an integral of a finite entity over an infin- itesimally small time interval. Therefore, this term is always zero. The solution of the system at time 7, then becomes

\

Efficient computation of the ma!rix exponential is possible due to the special structure of the G matrix. The matrix G can be expanded as follows:

N N

where e, and en are the mth and nth unit vectors, having 1 on the mth and nth positions, respectively, and zeros on all the rest. Only the elements of the G matrix corresponding to firing links are nonzero at time 7e, therefore, only one or at most a few terms of this sum are nonzero. The exponential can be com- puted as follows:

(18 )

Note that in the above equation, there is an exponential of a sum of matrices. Since the sum of matrices in the exponent is commutative, the product of matrix exponentials is also com- mutative. As a result, even if events fire simultaneously they can be processed independently in any order. Therefore, with- out loss of generality it can be assumed that only one event occurs at a time.

Note that in (18), the matrix in the exponent is a dyad (an outer product) xy', where

x = -yC-'Fcem = -yC-ym (19)

Y = Fcen = f n (20)

f m , f n being the mth and nth columns of the F,. matrix and

The exponential of a dyad can be easily computed with the fol- lowing formula obtained from the Taylor expansion of the ex- ponential :

The only thing that remains to be done in order to solve the system is the computation of the coefficient y. Due to the piece-

-

FELDMAN et al. : COMPUTATION IN PIECEWISE APPROXIMATE CIRCUIT SIMULATION 175

wise constant approximation, the current around time t, can be expressed as

Hence:

Note that at time t, there is a step change of the current i, and voltage slope it,. Therefore, the impulse 6 ( t - t , ) occurs at a discontinuity of the voltage slope and the value it, ( t , ) is not defined. Approximating the impulse function with a symmetric pulse and taking the limit of the above integral yields

The left-side voltage slope it,, ( 1 , ) can never be zero or the event would not have occurred in the first place. However, it, ( t: ) = 0 when the firing link enters its steady state [6]. In this case, it: ( t , ) becomes zero and (25) is indeterminant. A more general formulation of the circuit equations must be considered in order to model correctly a link entering steady state.

The above expression was derived for the sensitivity circuit where 7 = t . For the adjoint circuit m and n are interchanged arid 7 = tf + to - t . The expression for y for the adjoint circuit btxomes

4.3. The Steady-State Problem

In order to understand the implications of a link entering steady state we need to consider the way SPECS handles this case. Consider an example of a two terminal element entering steady state as shown in Fig. 3. Suppose that the segment AB is the present active segment for this link. Further, assume that thle voltage slope across the link is positive such that the oper- ating point will move along the active segment from A to B. Note that the current through the link is constant while the link voltage varies as the operating point moves from A to B . When it reaches B, the operating point is supposed to jump to the adjacent segment CD and its current must be updated. How- ever, the new current CD would cause the voltage slope across the link to change sign because the rest of the circuit as repre- sented by the load line dictates an intermediate current value between AB and CD. As a result, the device current would os- cillate around this equilibrium value. In order to prevent this type of algorithmic oscillation, SPECS determines the "steady- state" current that makes the voltage slope across the link to be zero and forces the link to assume this current by introducing an intermediate segment FG in the device table model. The im- plication of this steady-state computation is that when the link enters steady state, it can be modeled as a constant voltage source because it moves along the vertical edge BC in comput- ing the intermediate current FG. Once the operating point is on the segment FG, the link can be modeled as a current source again. The corresponding elements in the associated adjoint and sensitivity circuits for the voltage source and current source

I V

Fig. 3. A two terminal device entering "pseudo" steady state.

models are the short and open circuits. Therefore, at times when a link enters steady state in the original simulation, the corre- sponding link in the associated circuit is shorted, allowing its two nodes to reach equilibrium, and then opened again.

Taking into account the steady-state model, we will treat the general case where a number of events occur simultaneously. Some of the events are normal events, some are due to links entering steady state. Partition the links of the associated circuit as

where the index e denotes the links that reach equilibrium as a result of the corresponding links in the original circuit reaching steady state, and g denotes the links that do not reach equilib- rium; This partitioning leads to a further partitioning of the F and G matrices

FW e e,, G g e G,, F = [, Fc,] and G =[ I 1.

The differential equation that describes the dynamics of the associated circuit in the interval ( 7,, 7: ) is

5 C = C-'? r = -C- 'F CR i R - C - l F I.? P . (27)

The current vector i, can be expressed in terms of link voltages using the normal BCR equations. The currents i,, on the other hand, are results of links being shorted, and therefore, their value will depend on the amount of charge that must be trans- ferred across the link in order to reach equilibrium. In order to formu!ate the differential equation we need to eliminate the cur- rents ic from (27). Note that it,( 7: ) = 0 because these links reach equilibrium. Since it, ( 7, ) is known, the voltages across the links reaching equilibrium can be written as

be(.) = itp(7,-) - i te(7,) U ( . - 7,) (28)

U being the unit step function. Using the Kirchoffs law equa- tions and the capacitor BCR's we derive the expression for it,:

Combining (29) with the derivative of (28) we obtain

F T , i t C ( ~ i ) 8 ( 7 - 7#) = Ff,C-'F,,ie + FL,C-'FcRiR.

Knowing that FFeG-'FCe is always invertible (see Appendix HI), the expression of i, in terms of the currents i, can be derived:

I76 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. IO, NO. 2, FEBRUARY 1991

Substituting this expression into (27) gives where

The BCR's for i, can be expressed as

l, = G,@, + G,,& + z, where the conductance matrix G,, includes the links controlled by links reaching equilibrium and C,, includes all the rest of the links. As discussed in the previous section, the contribution of the finite excitation I, can be ignored in the infinitesimal in- terval ( T,-, 7:). By substituting ig in (30) we obtain the general differential equation that describes the behavior of the associ- ated circuit at a time corresponding to an event in the original simulation:

S , = - ( I - T)c-'F,,G,,F;~,

- ( I - T)C-'FcgG,,0, + T0,(7:) S(7 - 7,) (31) where

T 3 c - ' F , , ( F ~ , c - ' F , ) - ' F ~ ~ . (32) For the first term we can use a similar decomposition of the matrix G,, as in the previous section:

(33)

Note that always k,*n # 0, because no link that enters steady state is part of the Ggg matrix. This is not true for the dge matrix needed in the evaluation of the second term. Because in this case the decomposition will lead to zero denominators, we will evaluate instead the product &,, 0,:

ai ai , &,,fie = C C 2 e .eT B = C C - e e j f i e k .

j k a U , k eJ j k a V , k

where f , , f , , , , , f , , are, respectively, the jth, mth, and nth column of matrix Fcg.

The general solution of the differential (34) can now be writ- ten as

0,(7,+) = exp ( i :IA(7) d 7 ) 0,(7;)

+ [zexp ( ! :A( . ) d o ) b S ( T - 7, ) d7. (35)

Note that in the infinitesimally small interval (7;, 7: ) the in- tegral within the second term can be replaced by the following expression:

where

By approximating the impulse with a symmetric pulse and tak- ing the limit as in the previous section, the solution (35) be- comes

+

fiC(7,+) = &hC(7;) + I"[&' + ( I - kl") ~ ( 7 - T,)] T

b S(7 - 7 , ) d7

0,(7:) = e%,(7,-) + ; (a. + I ) b .

Since f iek ( 7 : ) = v , k (7: ) = 0 , One Can Write for the interval (?;, 7:)

This solution is the key result of this section. It shows that if a number of events happen at the same time, one needs to pro- cess the steady-state events first to form the F,, matrix, the T matrix, and the excitation vector b. Then the rest of the events can be processed sequentially. In short, the general solution to compute the step voltage change in the associated circuit at an event time 7, is given by

& ( 7 ) = k V e k ( 7 ) , where k = 7. G e k ( 7 ; ) uek ( 7;

Hence:

= C C 7 A I . e j 6 (7;) ~ ( 7 - 7,) Consider some special cases of this general solution. No steady state events: then F,, = 0 . Hence, T = 0 and b

= 0. The solution reduces to the result of the previous section: J k U , k ( 7;) " ek

A I,,,, where f f k is the kth column of matrix Fee. We recognize the general form of the differential equation f i , ( 7 : ) = exp ( -e Ill )I 7 U,,, ~ - ~ , ~ ~ , ) f i ~ ( 7 ; )

b, = A&, + h6( 7 - 7,) (34) as given by (16) and (18).

FELDMAN er al. : COMPUTATION IN PIECEWISE APPROXIMATE CIRCUIT SIMULATION 117

Steady-state short

Sensitivity circuit Adjoint circuit

Fig. 4. The associated circuits for a MOS device at steady state

One steady-state event of a two terminal element: The cor- reaponding link in the sensitivityladjoint circuit is shorted and charge is transferred through this link alone. In this case, Fce = Fcj: = fek and fgn = fgn =fa = 0. Hence:

f Tk c- y e k

b = -Tfic(7e-)

A. = 0 and eA" = Z

and the solution becomes

One steady-state event of a controlled source: In the case of controlled sources for MOS devices, the analysis will be dif- ferent for the adjoint and the sensitivity circuit. Consider Fig. 4.

For the adjoint circuit, the controlling gs branch in the orig- inal circuit becomes the controlled branch. Consequently, when the gs link reaches steady state, the controlled gs link in the ad,joint circuit is shorted. This shorting does not affect the con- trolling ds link, which is still open. Charge is transferred through the controlled gs link only, and the analysis can be per- formed as for the two terminal case. For the sensitivity circuit, the gs link is still the controlling link. When the original gs link approaches steady state, the corresponding gs link is shorted aad charge is also transferred across the controlled ds link. In this case, charge is transferred across both the gs and ds links. In terms of our general solution, fRm = fRn = 0. Hence:

and the solution becomes

v. RESULTS AND DISCUSSION This methodology, which employs both direct and adjoint

methods for sensitivity computation, has been implemented within SPECS. The sensitivity program can compute sensitivi- ties of performance functions such as simple voltage levels, average voltage values, or delays with respect to various param- eters such as resistance, capacitance, MOS device parameters, table model entries, and even zero valued parasitics. Both the oriiginal and the associated circuits are solved exactly. The only

C

Fig. 5 . A simple RC circuit.

approximation is in the a priori piecewise constant modeling of the circuit elements. As a consequence, both the direct and the adjoint methods yield exactly the same results.

Consider the simple RC circuit shown in Fig. 5. This simple circuit is used to illustrate some properties of the time-domain sensitivity. The sensitivity of the output voltage with respect to the resistance is shown in Fig. 6 . The dashed curve is the ana- lytically derived sensitivity and the solid curve is the sensitivity predicted by our program. Sensitivities are not restricted only to actual circuit elements. Sensitivities with respect to zero-val- ued elements or device parameters can also be computed. Again consider the RC circuit shown in Fig. 5 . The transient sensitiv- ity of the output voltage with respect to the nonexistent capac- itor C, is shown in Fig. 7. The dashed curve is the analytically derived sensitivity and the solid curve is the SPECS sensitivity. In both examples, the discontinuities in the sensitivity re- sponses are a direct consequence of the discrete nature of the piecewise constant models. When a link in the original circuit has a step change in current, a corresponding instantaneous charge transfer must occur in the associated (adjoint or sensi- tivity) circuit. This charge transfer results in a step change in voltage sensitivities. Observe that although the instantaneous voltage sensitivities are discontinuous, the area under the sen- sitivity waveform very closely matches the area under the exact curve. However, if the instantaneous sensitivity at a particular time point is desired, computing the average sensitivity over a small interval about the time of interest would provide a more accurate result. In the adjoint analysis, an instantaneous sen- stivity requires applying an impulse excitation to the adjoint circuit. Hence, in order to compute the average sensitivity over a small interval, the impulse excitation is replaced by a narrow pulse excitation. For an integral performance function such as Elmore delay [7], the sensitivity calculated can be expected to be very close to the actual value. For example, the sensitivity of the Elmore delay of the output node of the simple RC circuit with respect to the resistance value is 0.93 for a 5 segment table model from 0 to 5 V and 0.98 for a 40 segment model. The exact sensitivity is 1 .O.

In order to compare the performance of the direct and adjoint methods, a CMOS circuit comprised of 100 MOS devices was used. The performance functions are the Elmore delays at var- ious outputs of the circuit. The results of this experiment are summarized in Figs. 8 and 9. The incremental overhead beyond the original simulation is less than 5% per associated circuit analysis. Note that with one associated circuit analysis, the ad- joint method yields the sensitivities of one circuit performance with respect to all circuit parameters of interest. The direct method produces, as a result of one analysis, the sensitivities of all performances of interest with respect to one parameter. Of course there is some minor overhead related to the compu- tation of each sensitivity, and therefore, adding an extra param- eter in the adjoint method or an additional performance function in the direct method is not totally free. However, these costs

178 lEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. IO. NO. 2. FEBRUARY 1991

0.0 5.00 10.00 15.00 20.00

Fig. 6. The sensitivity of the output voltage with respect to R for the sim- ple RC circuit.

Direct method overhead (Yo)

- 2 4 6 8 1 0

No. of Outputs

Fig. 8. Contour plot showing lines of equal computational overhead for the direct sensitivity method.

Adjoint method overhead ("lo)

1

2 4 6 8 1 0

No. of Outputs

Fig. 9. Contour plot showing lines of equal computational overhead for the adjoint sensitivity method.

-I.-:: : : : : : : : : : : : ' : : : : : : : : : : : : : : : :::::4 0.0 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00

Fig. 7 . The sensitivity waveform with respect to the zero capacitor for the simple RC circuit.

are virtually negligible compared to the cost of an associated circuit analysis.

As expected from the theory, the choice of the more efficient method depends on the relative number of outputs versus pa- rameters in a particular application. When the sensitivities of many responses with respect to a small number of parameters are required, the direct method should be employed. On the other hand, if the sensitivities of a few responses with respect to a large number of parameters are desired, the adjoint method is better. A less obvious result is the fact that the adjoint method better exploits the latency of a circuit. In the direct method, for both the original and the sensitivity circuits, the activity prop- agates from the input to the output and forward in time. There- fore, the activity cone of the sensitivity circuit will be identical with the activity cone of the original circuit. In the adjoint cir- cuit, on the other hand, the activity propagates from the output to the input and backward in time. Since SPECS and the sen- sitivity extension exploit latency explicitly, i.e., only active

parts of the circuit are calculated, for the adjoint analysis activ- ity will exist only in a portion of the original circuit's activity cone. This is also true in time; for most synchronous digital circuits the activity in the adjoint circuit will die out after going back one or two clock cycles, and there is no need to continue it back to to. This is consistent with the main rationale for syn- chronous clocked design, which is to make the present behav- ior of the circuit insensitive to transient behavior of the circuit in the past. When the number of outputs and parameters are comparable, the adjoint method should be slightly more expen- sive than the direct because the need to store and retrieve the event list and the waveform convolutions need to compute sen- sitivities. However, the latency exploitation more than compen- sates for this extra work, and as a consequence, the adjoint method is more efficient for digital circuits even when the num- ber of outputs and parameters are comparable. This advantage increases as the size of the circuit increases.

The methods for computing time-domain sensitivities dis- cussed above have been applied successfully to several large MOS circuits including three industrial circuits. Fig. 10 shows a typical SPECS sensitivity waveform compared with the wave- form obtained by perturbation using SPICE at a summing node

FELDMAN et al. : COMPUTATION IN PIECEWISE APPROXIMATE CIRCUIT SIMULATION

of an NMOS adder. There is a close agreement between the two. Table I summarizes the runtime performance of both direct and adjoint methods. These examples were run on a VAX-3200 work station. The runtimes for the sensitivity analyses are the incremental costs per parameter for the direct method and per oui.put for the adjoint method. The small performance advan- tage of the adjoint method is due to the better exploitation of circuit sparsity that was discussed in the previous paragraph. It can be safely concluded that the overhead of the sensitivity andysis in SPECS, per output for the adjoint method and per parameter for the direct, is typically less than 5% of the cost of the original simulation. Moreover, SPECS supports both the direct and adjoint method in an efficient and uniform environ- ment. The user can choose between the methods according to the problem at hand.

The availability of an efficient transient sensitivity computa- tion in SPECS provides a unique capability both to enhance sirnulation efficiency and to validate simulation results [8]. Spe- cifically, an initially crude and correspondingly quick simula- tioa can be undertaken by suppressing all parasitics and neglecting all second-order effects. Then the adjoint transient sensitivity analysis can be exploited to compute the sensitivities with respect to a large number of these suppressed parasitics and neglected second-order effects, and thereby to validate the results of the initial crude simulation. In the final analysis, models are refined and parasitics are reintroduced only where needed as indicated by the sensitivity results. This overall ap- proach increases both the efficiency and the confidence in the results of the SPECS simulation strategy. For example, con- sider an industrial benchmark circuit, a ring oscillator consist- ing of 15 inverters in the ring and 3 inverters at the tail with parasitic coupling resistors on the order of 185 Q between in- verters as shown in Fig. 11. With the parasitics suppressed, SPECS predicted a period of 18.73 ns. Sensitivity analysis showed that the sensitivity of the oscillator period with respect to the value of the parasitic resistors was 3.27 ns/kQ. Hence, again assuming the first-order dependence, the inclusion of 185- Q coupling resistors between successive inverters would alter the timing by about 0.6 ns, resulting in a period of 19.33 ns. In order to verify this conclusion, another SPECS simulation with all parasitics included was performed. The simulation resulted in a period calculation of 19.57 ns, but the runtime increased 80 times because the circuit was then stiff. Both SPECS results are within 2% of the period predicted by SPICE.

The next example of simulation validation is a CMOS 8-b hlanchester chain adder consisting of 178 MOS transistors. The scnsitivities of the carry output with respect to all suppressed h4OS parasitic drain and source resistances were computed. For a 20 segment model of MOS transistors, nominal SPECS sim- ulation with all these resistances suppressed required 108 CPU seconds. The computation of all the parasitic sensitivities re- quired an additional 39% of the cost of the original SPECS sim- ulation, which included the fixed overhead in parsing and input/ output operations. Therefore, on the average, the incremental overhead of the sensitivity analysis was about 0.14% per par- asitic. The results of the sensitivity analysis indicated that the timing of the carry output is most sensitive to the second and the third pass transistors of the chain. These sensitivities are on the order of 1 ns/ 100 fl while all other sensitivities are on the order of 0.1 ns/100 Q or less. Therefore, the circuit was sim- ulated again with parasitic resistors of 100 Q included for these transistors and the runtime increased to 182 s. The difference

-

I79

-2.m+ 12 0.0 1.m-06 2.m-06 3.m-06

Fig. 10. The sensitivity waveforms from SPECS and SPICE perturbation for an all NMOS adder.

T T

I r J

* I * I --I voscl

Fig. 1 1 . A ring oscillator.

TABLE I A SUMMARY OF RUNTIME PERFORMANCE OF SPECS SENSITIVITY FOR

BOTH DIRECT AND ADJOINT METHODS

Circuit Size SPECS Direct Adjoint

Adder 1 I5 MOS 19 s 0.7 s 0.5 s 4-b neural net 184 MOS 1205 s 41.0 s 39.5 s RAM 319 MOS 153 s 6 . 9 s 7.2 s ALU 356 MOS 89 s 3.9 s 1.8 s Crit. path 428 MOS 6 7 4 s 31 .2s 36.7 s Controller 1516 MOS 1547s 4 6 . 7 s 41.5 s

between the delays obtained from the two simulation runs tumed out to be much less than the 1-ns difference indicated by a first- order approximation. In this case, even though an additional simulation was performed to incorporate the effect of two po- tentially important parasitics, the total runtime for the two sim- ulations plus the sensitivity analysis was only 332 s. For comparison, a full simulation with all the parasitic resistances included took 2316 s.

The availability of cheap transient sensitivities also opens up a variety of other applications that have been considered pre- viously prohibitively expensive. The application of this sensi- tivity capability in statistical cicuit design is being investigated.

180 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN. VOL. 10, NO. 2, FEBRUARY 1991

The sensitivity capability can also be exploited to optimize the transistor sizing of critical circuitry. For example, in an adder, the cany chain has the longest delay. Hence, in order to mini- mize the delay, it is important to optimize the sizing of the tran- sistors along this critical path. Furthermore, the sensitivity information can be used to guide automated layout tools in de- termining critical and noncritical interconnections among the various modules, and then to determine the optimal placement of these modules to minimize the delay of critical paths. Yet another interesting application is in “smart extraction” for post- layout verification. Extractors typically produce extremely complicated circuits. This complexity may arise because of the uncertainty in the effect of all the detailed parasitics and second- order effects. Sensitivity analysis may help to guide the extrac- tion process itself. In short, the sensitivity capability will en- hance the usefulness of the simulator in a general synthesis/ optimization CAD system. The simulation efficiency is of par- amount importance in allowing the system to explore the design space quickly.

VI. CONCLUSIONS Piecewise approximate circuit simulation provides an effi-

cient framework for sensitivity computation. A methodology for computing transient sensitivities using both the direct and the adjoint methods has been derived. In fact this result represents the first implementation of the adjoint transient sensitivity com- putation method in a general purpose circuit simulator. The im- plementation of the sensitivity analysis in SPECS environment allowed for a fair comparison between the two methods and pointed out the advantages and disadvantages of each. Large circuits never before considered for extensive sensitivity anal- ysis have been simulated in reasonable CPU time and the results have been found to be acceptably accurate. The capability to compute transient sensitivities efficiently can have a significant impact in numerous applications such as simulation validation, circuit optimization, performance directed layout, and “smart extraction.”

APPENDIX I. SENSITIVITY CIRCUIT ELEMENTS (DIRECT METHOD) In the direct method, the branch constitutive relations of the

elements in the sensitivity circuit are obtained by directly dif- ferentiating the BCR’s of the corresponding elements in the original circuit with respect to the variable parameter of inter- est. The responses of this sensitivity circuit are the sensitivities of the responses of the original circuit with respect to this pa- rameter. Note that one sensitivity circuit must be constructed for each parameter of interest. The corresponding elements in the sensitivity circuit for various circuit elements are derived in the following subsections.

1) General Two Terminal Elements: i = i ( v , p ) : Differen- tiating with respect top yields

di ai dv ai + - - = - - dp av dp ap

i = G B + 1, where B = d v / d p is the voltage response and i = d i /dp is the current response of the sensitivity circuit. The corresponding element in the sensitivity circuit is a possibly time varying con-

ductance G = ai/av with an associated excitation i, = &lap in parallel.

2) Resistors: When the sensitivity with respect to a zero val- ued resistor is desired, the above formulation is not adequate and v = Ri must be used instead. Differentiating this charac- teristic equation with respect to p yields

0 = p, + Ri and if R = OJhe corresponding element is an independent volt- age source, V, = idR/dp .

3) Linear Capacitor: i = Cv: Differentiating with respect to p yields

d dv d dv di dC dP dP dp dt dp dt dp

b + c - [-] = E b + c - [-I - = -

; = 1, + cb. In the sensitivity circuit, the corresponding element to a linear capacitor is a linear capacitor-of the same value in parallel*with an associated current source I, = ( d C / d p ) U. In general, I, de- pends upon the voltage slope across. the capacitor in the original circuit. If C is not a function of p , I, will be zero. If C = 0, the zero capacitor becomes a current source in the sensitivity cir- cuit.

4) Linear Current Controlled Current Source: u1 = 0 (this is a dummy zero voltage source to measure the current through the controlling branch) and i2 = ai l . Differentiating with re- spect to p yields

1 1

i2 = I, + ail.

The corresponding element of a current controlled current source in the sensitivity circuit is also a current controlled current source wit! the same current gain Q in parallel with a current excitation I, = i l d a / d p .

p ) and i, = 0: Differentiat- ing both equations with respect to p yields

5) MOSFET: ids = i (vds,

dP

dP dVd.7 dP avjii dP aP did,7 = ~ dVgS ai + -.

In terms of the sensitivity circuit variables, these equations can be written as

LjiS = 0

The corresponding element of an MOS device consists of a volt- age controlled current source in parallel with a conductance and

FELDMAN er al. : COMPUTATION IN PIECEWISE APPROXIMATE CIRCUIT SIMULATION 181

a current source f, = ai, / a p . The values of the conductance and the transconductance may be time varying.

are derived in the following subsections. A more general and complete treatment can be found in [l].

I ) General Two Terminal Elements: i , = il (U/, p ) : Consider the terms corresponding to this element in the right-hand side of (40): 11. ADJOINT CIRCUIT ELEMENTS (ADJOINT METHOD)

In the adjoint method, an associated circuit, called the adjoint ciircuit, is derived from the original circuit using the following expression which results from Tellegen's theorem [ 11:

= (it/ $ - i ; ) 6 V / + ai 6p. aP

In order to cancel the term depending upon 6v, the following BCR is Equation (38) is satisfied as long as both the original and adjoint

circuits respect KVL and KCL and have the same topology. B

joint circuits. In order to simplify the expressions, the temporal dependence will not be shown explicitly. Equation (38) can be further partitioned and rewritten as

for the corresponding ad,oint circuit element:

(43) denotes all the corresponding branches in the original and ad- ai,

av1 z / = - it/

and the sensitivity with respect to the parameterp is given by n r + f O l + f

1 +f = sl0 5 ( i t N Si, - i , 6vN) dt (39) In the case of a linear resistor il = Gvl the BCR becomes 6 =

Girl and the sensitivity is given by

(45 1 where V denotes the terms corresponding to voltage sources; I acp lf

ap lo - = 1 i t l ( r ) v l ( t ) dt. denotes the terms corresponding to current sources; and N de-

notes the terms corresponding to nonsource branches. Since the choice of the element types in the adjoint circuit is arbitrary, the BCR's of the nonsource branches on the right-hand side of (39) can be chosen so as to cancel the terms depending upon 6iN or 6vN and to leave only terms depending upon parameter vari- ations. For a given performance function a, the excitations itv and il can be chosen so as to make the left-hand side of (39) equal to the performance variation 6a. In other words, the IKR's and the excitations of the adjoint circuit can be appro- priately chosen in (39) to yield

2) ~i~~~~ capacitor: ic = cfic: Consider the terms come- spending to the element c in (38):

s1: ( Dc 6ic - ;U,) dt

= SI (it, $ [ c 6v, + V, 6C] - l, 6vC

d ) dt + ( 11 Ocvc d t ) 6C. 6vc - ic 6vc = 'j: ( tit, 6@ = c BkaPk (40)

where 8k is a function of the appropriate responses of the orig- inal circuit and of the adjoint circuit, and Pk is the kth parame- ter. By the chain rule, the coefficients Pk are the desired s#ensitivities ( a @ / a p k ) .

The performance function CP can be assumed to be of the form

Integrating the first term by parts

= Cit, 6vclz -

= cfic(70) 6v,(tf) - ~ f i , ( ~ , ) 6vc( to)

dO (C 2 + &) 6vc dt + ( s," DCVC d t ) 6C

cp = s " f ( v l , i,,) dt. 0

(41) - (C % + &) 6vc dt + (SI it& dr) 6C.

'This formulation is sufficiently general to express all the inter- esting performances [l]. The performance function variation can then be expanded as cuit:

In order to cancel the term depending upon 6vc the following BCR is chosen for the corresponding element in the adjoint cir-

dbc i c = C-

dr

it,(r0) = 0 (47) If we assume that on the left-hand side of (40) 6vy = 0 and 6il = 0, and the adjoint circuit excitations are chosen such that it,, = ( a f / a i , ) and i / = ( a f / a v , ) , then the left-hand side of (39)

and the sensitivity with respect to C is given by

is exactly the performance variation Sa. On the right-hand side of (39), only the BCR's for the elements supported by SPECS

af = 1" itc(?) & ( t ) dt (48) ac

182 IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN, VOL. 10, NO. 2, FEBRUARY 1991

and with respect to vc( t o ) by

(49)

3) Current Controlled Current Source: v , = 0 and i2 = a i , : Consider the terms corresponding to the controlling and controlled branches in (38)

fi, ail - i; 6vl + f i 2 hi2 - l2 6v2

= 9, si, + fi2(a si, + i , sa) - i; 6v2

= (0, + fi2a> hil + v 2 i l sa - l2 6v2.

In order to cancel the terms depending upon 6 i l and 6v2 the following BCR's are chosen for the corresponding adjoint cir- cuit elements:

i2 = 0

o1 = -aD2

and the sensitivity is given by

a@ If

acr lo - = s f i 2 ( 7 ) i l ( t ) dt.

4) MOSFET: ids = ids vugs, p ) and igs = 0: Substituting the variations si,, = 0 and sids for the terms corresponding to the MOSFET into (38) yields

f i g s Si,, - i, 6vgS + fids sid, - ids 6v,

aid, aP

+ fi* - sp.

In order to cancel the terms depending on the response varia- tions, the corresponding branches in the adjoint circuit must satisfy

(53)

Consequently, the corresponding element of an MOS device in the adjoint circuit consists of a conductance in the drain-source branch and a current source, controlled by the drain-source voltage, in the gate-source branch. From the remaining term, the sensitivity is given by

(54)

Lemma: If the columns f,,, , f,, of F,, are linearly de- pendent, then the links (or a subset of these links) correspond- ing to these columns form a loop with the voltage sources (or a subset of these voltage sources).

Proofi If one of the columns f,,, * , fcn is zero, then the corresponding link forms a loop with voltage sources only. SO assume that fc,, * . * , fCn are all different from zero. By KVL, the link voltages U,,, * . , U,, corresponding to these columns are given by

Ven = fL f iu + f ,T , f ic .

Hence, for any set of constants a,, a2, * . , a,, one can write

a,v,, + * + a,v,,

= (Ulf l ; + - * * + a,f;,)fiU

+ (a, f:, + + a, f:,)fic.

Since f c , , set {a, ,

, fCn of F,, are linearly dependent, there exists a - , a, } not all zero, such that

UIf,i + - . + a,f,T, = 0. Therefore:

a, U,, + * * + a,v,, = (a , f,i + * * * + U, fTn)fiu.

This equation shows that these link voltages are dependent on one another and the values of the voltage sources. In other words, this set of links (or its subset) form a loop with the set of voltage sources (or its subset).

Using the result of this lemma, if these links are allowed to reach equilibrium simultaneously at re, then vel (7: ) = * = U,, (7: ) = 0 and the voltage sources must satisfy the condition

(a,f,T, + * * + a,fTn)fi,,(7,+) = 0. If alfTl + - * + a,fz , = 0, t h e n a , ~ , , + + a,v,,

= 0 at all times. In other words, these link voltages are depen- dent on one another.

If f i , (7: ) = 0, then a , v e 1 ( 7 : ) + * * + a,v,,(7:) = 0.

In any case, at r:, the link voltages are not independent. In this scenario, if each link that reaches steady state in the orig- inal circuit is blindly replaced by a voltage source, there will be a loop of zero-valued voltage sources in the sensitivitylad- joint circuit. Since the voltage across one link of this set is com- pletely determined by the voltages across the other links, this link can be replaced by a current source in the original circuit or by an open circuit in the sensitivity/adjoint circuit. In all the other links reach equilibrium, the voltage across this link is en- sured to be zero at 7: and the equilibrium condition is always satisfied. Moreover, if the link is open, the corresponding col- umn can be deleted from the F,, matrix and grouped to the FcR matrix. This process can be continued until all columns of F,, are linearly independent. Hence, all the columns of F,, can al- ways be ensured to be linearly independent. Since the capaci- tance matrix C and its inverse C-' are positive definite, the product F:,C-'F,., is also positive definite [9]. Therefore, FTeC-'F,., is always nonsingular and invertible.

ACKNOWLEDGMENT

The authors wish to thank Chandramouli Visweswariah and Alex Stein for many useful discussions during the course of this work.

FELDMAN et al. : COMPUTATION IN PIECEWISE APPROXIMATE CIRCUIT SIMULATION

~

1 R3

REFERENCES

S. W. Director and R. A. Rohrer, “The generalized adjoint net- work and network sensitivities,” IEEE Trans. Circuit Theory, vol.

D. A. Hocevar, P. Yang, T . N. Trick, and B. D. Epler, “Tran- sient sensitivity computation for MOSFET circuits,” IEEE Trans. Computer-Aided Design, vol. CAD-4, pp. 609-620, Oct. 1985. C. Visweswariah and R. A. Rohrer, “SPECS2: An integrated cir- cuit timing simulator,” in Proc. IEEE In?. Con$ on CAD, Nov.

T. N. Trick, F. R. Colon, and S. P. Fan, “Computation of ca- pacitor voltage and inductor current sensitivities with respect to initial conditions for the steady-state analysis of nonlinear periodic circuits,” IEEE Trans. Circuits Syst . , vol. CAS-22, pp. 391-396, May 1975. L. 0. Chua and P. M. Lin, Computer-Aided Analysis of Electronic Circuits. Englewood Cliffs, NJ: Prentice-Hall, 1975. C. Visweswariah, “Piecewise approximate circuit simulation,” Tech. Rep., Camegie Mellon Univ., May 1989. W. C. Elmore, “The transient response of damped linear networks with particular regard to wideband amplifiers,” J. Appl. Phys.,

T. Nguyen, P. Feldmann, S. W. Director, and R. A. Rohrer, “SPECS simulation validation with efficient transient sensitivity computation,” in Proc. IEEE In?. Con$ on CAD, Nov. 1989, pp.

G. Strang, Introduction to Applied Mathematics. Wellesley, MA: Wellesley-Cambridge, 1986.

CT-16, pp. 318-323, Aug. 1969.

1987, pp. 94-97.

vol. 19, pp. 55-63, 1948.

252-255.

Peter Feldmann (S’87) received the B.Sc. de- gree in computer engineering (summa cum laude) from Technion, Haifa, Israel, in 1983 and the M.S. degree in electrical engineering also from Technion in 1987. He is currently working towards the Ph.D. degree at Camegie Mellon University, Pittsburgh, PA.

From 1985 through 1987 he worked for Zo- ran Microelectronics in Haifa as VLSI design engineer on the design of digital signal proces- sors. His research interests include CAD for

VLSI circuits: more specifically, simulation and statistical circuit de- sign, signal and image processing algorithms, and their implementa- tion.

Tuyen V. Nguyen (S’87) received the B.S.E.E. (summa cum laude) and the M.S.E.E. degrees from the University of Arkansas, Fay- etteville, Arkansas in 1985 and 1987, respec- tively. He is currently working towards the Ph.D. degree in electrical and computer engi- neering at Camegie Mellon University, Pitts- burgh, PA.

From June 1989 to December 1989 he was with AT&T Bell Laboratories, Murray Hill, NJ on an industrial leave. During that time, he

worked on delay calculation for timing verification of semicustom and full custom circuits. His current research interests include circuitltim- ing and mixed-mode simulation.

Stephen W. Director (S’65-SM’75-F’78) re- ceived the B.S. degree from the State Univer- sity of New York at Stony Brook, in 1965 and the M.S. and Ph.D. degrees in electrical engi- neering from the University of California, Berkeley, in 1967 and 1968, respectively.

From 1968 until 1977 he was with the De- partment of Electrical Engineering at the Uni- versity of Florida, Gainesville. From 1974 to 1975 he was a Visiting Scientist in the Mathe- matical Sciences Department at IBM’s T.J.

Watson Research Center, Yorktown Heights, NY. He joined Carnegie Mellon University in 1977 and was Director of the SRC-CMU Re- search Center for Computer-Aided Design from 1982 to 1989. He is currently the Whitaker Professor and Head of the Department of Elec- trical and Computer Engineering at Camegie Mellon University.

Dr. Director has served as President of the IEEE Circuits and Sys- tems Society, as Chairman of the CAS Technical Committee on Com- puter-Aided Network Design (CANDE) and as Associate Editor of the IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS. He has authored or coauthored four texts. In 1970 and in 1985 he received Best Paper Awards from the IEEE Circuits and Systems Society; in 1976 he re- ceived the Frederick Emmons Terman Award as the outstanding young electrical engineering educator from the Amencan Society of Engi- neering Education; and in 1978 he received the W.R.G. Baker Prize Paper Award from the IEEE. In 1984 he received an IEEE Centennial Medal and was named a Distinguished Alumnus for the State Univer- sity of New York, Stony Brook. He was elected to membership in the National Academy of Engineenng in 1989.

Ronald A. Rohrer (S’57-M’64-SM’74-F’80) received the B.S.E.E. degree from MIT, Cam- bridge, MA, in 1960, and the M.S.E.E. and Ph.D. degrees from the University of Califor- nia, Berkeley, in 1961 and 1963, respectively.

His 1960’s pioneering work in electronic de- sign automation formed the basis for several advances in circuit simulation, sensitivity, and optimization. He is the author and coauthor of three textbooks and numerous techical papers. He is currentlv Universitv Professor of Electri-

cal and Computer Engineering at Camegie Meilon University, Pitts- burgh, PA.

Dr. Rohrer was President of the IEEE Circuits and Systems Society in 1987, and received the CAS Society Award in 1990. In 1989 he was elected to the U.S. National Academy of Engineering. He is the found- ing editor of the IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN.