By constructing a prototype simulator, Mom, we have shown that it is possible to modify Rsim’s switch-level simulation framework to allow more general piecewise linear transistor models in place of the switched resistor model. In addition we have shown that many of Rsim’s restrictions can be removed: Mom allows floating capacitors, non-tree circuit topologies, and feedback. Although these enhancements require extensive changes, they don’t seriously impair the simulator’s efficiency for the simplest cases. That is when the simplest switch-level models are used Mom achieves speeds and accuracies comparable to those of dedicated switch-level simulators. In addition the ability to handle more general piecewise linear models gives the simulator a great deal more flexibility. Mom can simulate circuits that can’t be simulated by Rsim or Bisim and yet with substantial speedups over SPICE.
This approach looks particularly promising for simulating circuits that are just beyond the capabilities of switch-level simulation. Frequently most of a circuit can be simulated using switch-level models and only small portions require more accurate models. Because Mom has been structured such that the additional generality is paid for only where it is used it can simulate those circuits with only a minor degradation of efficiency.
However our experiments uncovered some limitations to the approach. Apparently the overhead of rescheduling devices will prevent Mom from replacing circuit simulators. Benchmarks show that Mom’s speed falls precipitously as the complexity of transistor models is increased. Unfortunately increased model complexity fundamentally requires
much more work to be done in order to determine when devices change regions of linearity. We expect that the approach will lose its speed advantage when models having the full accuracy and generality of SPICE’s nonlinear models are used.
Perhaps the most important contribution of this thesis is that it addresses the question: is moments matching a practical alternative to numerical integration for computing the transient response of nonlinear electrical networks? The results from this thesis indicate that the answer is “it depends”. Consider the space bounded by circuit simulators at one end and switch-level simulators at the other (Figure 88). Remember that the timing
increasing speed increasing accuracy circuit simulation (SPICE) switch-level simulation (Rsim) timing simulation (MOTIS) piecewise linear moment-based simulation (Mom)
Figure 88: Simulation Space
simulators attempted to adapt the basic techniques used by circuit simulators (nonlinear device models and numerical integration) in order to extend the capabilities of circuit simulation in the direction of switch-level simulation. Despite some very impressive speedups, a gap remained; timing simulators never became fast enough to replace switch- level simulators. In an analogous fashion we have tried to adapt some basic techniques used by switch-level simulators (piecewise linear device models and moment analysis) in order to extend the capabilities of switch-level simulation in the direction of circuit simulation. The result is a simulator that fills the gap between timing simulation and switch-level simulation, although the initial indications are that this approach will not yield a replacement for circuit simulation.
An interesting perspective on the tradeoffs faced by the two approaches can be gained by considering both from the standpoint of waveform approximation. The numerical
integration techniques used by circuit simulators approximate the time domain response
using a polynomial in
t
, where the polynomial is chosen to match the low order terms of the Taylor series expansion of the actual response:h
(t
)=h
0+h
1t
+h
2t
2
+
:::
(91)This produces an approximation (Figure 89) that converges to the actual response as
t
!0.t v(t)
Figure 89: Numerical Integration Approximation
The consequence of this approach is that the size of the time step is limited by the need to maintain good convergence between the approximate and actual response. If the device models are strongly nonlinear then past samples of the response are probably not going to be good predictors of the future behavior. In that case it will probably be necessary to take small time steps anyway. However if the models are linear or nearly linear then moments matching offers a better alternative.
The moments matching techniques used by switch-level simulators approximate the Laplace transform of the response using a ratio of polynomials in
s
, where the polynomials are chosen in order to match the low order terms of the Taylor series expansion of the Laplace transform of the actual response:H
(s
)=m
0+m
1s
+m
2s
2
+
:::
(92)The result is a frequency domain approximation that converges to the actual Laplace transform as
s
!0 or equivalently a time domain approximation (Figure 90) that convergest v(t)
Figure 90: Moments Matching Approximation
and moves in towards the origin only as the order of the approximation is increased. For the case of Rsim the models are linear and we are only interested in the response at its 50% point. Apparently this point is far enough away from the origin that low order approximations are usually sufficient. However, as more complex piecewise linear models are used to approximate more strongly nonlinear behavior it becomes more likely that some device will switch in the vicinity of
t
0. When this happens the work that went into gettinga good match for large
t
is wasted and the simulator retains what is essentially the worst part of the approximation. It appears that moments matching is a poor choice when the piecewise linear models are very detailed and have many regions of linearity.From this perspective some related approaches appear to be worth investigating. Since numerical integration appears to be advantageous when devices are strongly nonlinear, and moments matching when devices are strongly linear, a hybrid approach could dynamically choose between the two approaches based upon the anticipated step size. This would avoid the work of generating a waveform approximation accurate at
t
= 1 in thosecases when only a small portion around
t
=0 will be used. Simultaneously the accuracyproblems (described in Chapter 4) associated with generating extremely large waveform approximations could be avoided. If a waveform approximation has an amplitude of several thousand volts, probably only a small portion around
t
= 0 will be used. In those casesnumerical integration (or some other waveform approximation technique accurate near the origin) should be selected.
those described above. Our experience with Mom indicates that the principle problem that must be addressed when trying to improve the efficiency of our simulator is the overhead of rescheduling devices. To a large extent this overhead is due to the difficulty of finding the roots of weighted sums of exponentials. Therefore, it would be worthwhile to investigate other waveform approximation techniques with the goal of finding one which produces approximate waveforms whose roots can be more readily computed. Such a technique could easily yield a faster approach to simulation.