the life of spice as a transient circuit...

61
The Life of SPICE as a Transient Circuit Simulator Chung-Kuan Cheng CSE Department UC San Diego

Upload: others

Post on 21-Feb-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

The Life of SPICE as a

Transient Circuit Simulator

Chung-Kuan Cheng

CSE Department

UC San Diego

Page 2: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

2

Outline: SPICE (Simulation Program with Integrated Circuit Emphasis)

• Motivation and Contribution

• Theory and Algorithms

• Efforts to Improve the Simulator

• What I have learned

• Conclusion and Future Work

Page 3: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

3

Motivation: The Life of Spice

One of the most successful academic products. Thesoftware package and its derivatives have become thebread and buffer of circuit designers.

After 46 years, the core of its transient simulationalgorithms remains the dominant approaches to producethe gold standard for the characterization of the circuitbehavior.

“Every time we thought of a new technique, we hopedfor a factor of 100 to 1 in speed improvement. We wouldaccept 10 to 1, but we would only get 3 to 1, which wasnot enough to beat the improved speed of the newhardware coming out of Intel.”, D. Pederson, IEEESpectrum 1998.

Page 4: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

4

History of SPICE

• Cancer (Computer Analysis of Nonlinear Circuits, Excluding Radiation)

- 1971, Ron Rohrer (Ernest Kuh)

• SPICE1(Simulation Program with Integrated Circuit Emphasis)

- 1972, Larry Nagel (Don Pederson)

• SPICE2

- 1975, Larry Nagel

• SPICE3

- 1989, Tom Quarles (Richard Newton)

• 1980’s and Beyond

- Ngspice, HSPICE, Spectre, PowerSpice, et al.

- FastSPICE

Page 5: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

5

Research Ron Rohrer

Development Larry Nagel

Marketing Don Pederson ▪ All students used SPICE in his design

classes▪ He pushed very hard for “ease of use”

Sales Students▪ They fanned out into industry

It took SPICE 10 years to attain commercial

viability

Source: IEEE Solid-State Circuits Magazine

Page 6: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

6

D. Pederson, E.S. Kuh, R. Rohrer: NEC Award, 1995

Page 7: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

7

with R. Rohrer:godfather of SPICE, San Diego, 2017

Page 8: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

8

with Zhou FengSan Diego, 2017

Page 9: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

9

Motivation: Devices + Interconnects

• Tightly coupling capacitance & inductance (post layout)

• Nonlinear devices.

• Low margin designs with severe noises

A standard cell with three metal layers (sand-

colored) and vertical pillars (typically plugs of

tungsten), polysilicon gates (red), and the solid

silicon bulk. wikipediaFour layers copper interconnect, polysilicon

(pink), wells (greyish), and substrate (green)

wikipedia

Interconnects

from wired.com 2016/05

google-tpu-custom-chips

Page 10: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

10

Motivation: Complexity• Billions of transistors, interconnect components, over 7-

12 metal layers, and strong coupled/post-layout effects

• Simulation is critical to systems and modules: e.g. memories, custom digital, mixed-signal designs.

• Long simulation time (days, weeks) is one of significant bottlenecks. Impossible for full-chip simulation.

• Severe parasitic and noise problem.

Voltage drop analysis of a large network, Cadence Design Systems Inc.From Dick Sites, “Datacenter Computers modern

challenges in CPU design” Google Inc. 2015 & Intel i7

Page 11: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

11

Theory and Algorithm: Formulation

𝑑𝑞(𝑥(𝑡))

𝑑𝑡+ 𝑓 𝑥(𝑡) = 𝐵𝑢 𝑡

Linearized format

𝐶 𝑥𝑑𝑥

𝑑𝑡+ 𝐺 𝑥 𝑥 = 𝐵𝑢 𝑡 + 𝐹 𝑥

where

• 𝐶: linearized capacitance/inductance

• 𝐺: linearized conductance/resistance

• 𝐹: nonlinear device off-set

• 𝑥: node voltage/branch current

• 𝐵: incident matrix

• 𝑢(𝑡): input sources

Page 12: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

12

Theory and Algorithm: Formulation

Typical RLC circuit and its equations

from IEEE TCAD PRIMA 1998

𝐶 𝑥𝑑𝑥

𝑑𝑡+ 𝐺 𝑥 𝑥 = 𝐵𝑢 𝑡 + 𝐹 𝑥

Page 13: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

13

SPICE Flow: Transient Analysis• DC analysis

• Device Evaluation (easy to parallelize)

• Numerical Integration

- Solve the dynamical (differential equation) systems𝑑𝑞(𝑥)

𝑑𝑡+ 𝑓 𝑥 = 𝑢 𝑡

- The most time consuming part, when system is large

• Convergence & Error Check

• Step Control

Device Evaluation

Numerical Integration

Convergence & Error CheckRe-evaluate

Circuit netlist

Step Control

Tim

e s

tep

pin

g

finish

Device Evaluation &

DC Analysis

Page 14: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

14

Theory and Algorithm: Problems

Huge, stiff, nonlinear, dynamic system

• Circuits of millions to billions of elements with parasitics.

• Stiffness: System eigenvalues variate by a range of 107 or higher.

• CMOS models: parameters change drastically between on and off states.

• Frequencies: 1K-1G hertz or wider. Simulation goes through the details of Gigahertz to cover the trend of Kilohertz.

Issues: Accuracy, Stability, Complexity (Computation time and power consumption).

Page 15: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

15

Theory and Algorithm: Problems

Issues: Accuracy, Stability, Complexity (Computation time and power consumption).

• Accuracy: algorithm, step size and numerical precision

• Double-precision floating-point: 16 significant decimal digits, Exponent (-1024-1023)

• Stability: An algorithm is called numerically stable if an error, whatever its cause, does not grow to be much larger during the calculation.

Page 16: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

16

Theory and Algorithm: SPICE Approaches

• Numerical Integration

- Dahlquist barrier: No linear multi-step method with order larger than 2 can be A stable.

- Low order linear multi-step integration to preserve the A stability

• Nonlinearity

- Newton Raphson iteration

- Convergent when the initial guess is close to the solution (reducing the step size h)

• Matrix Solver

- Direct sparse matrix solver

- Robust and reasonably efficient

Page 17: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

17

Theory and Algorithm: Integration

A homogenous dynamical system 𝑑𝑥

𝑑𝑡= 𝐴𝑥

Solution:

𝑥 𝑡 + ℎ = 𝑒ℎ𝐴𝑥 𝑡 = 𝐼 + ℎ𝐴 +(ℎ𝐴)2

2+⋯+

ℎ𝐴 𝑘

𝑘!+ ⋯ 𝑥(𝑡)

Numerical Integration (Conventional Method)

• Forward Euler 𝑥 𝑡 + ℎ = 𝑥 𝑡 + ℎ ሶ𝑥 𝑡 = 𝐼 + ℎ𝐴 𝑥(𝑡)

• Backward Euler 𝑥 𝑡 + ℎ = 𝑥 𝑡 + ℎ ሶ𝑥 𝑡 + ℎ where ሶ𝑥 𝑡 + ℎ =A 𝑥 𝑡 + ℎ

𝑥 𝑡 + ℎ = 𝐼 − ℎ𝐴 −1𝑥(𝑡)

• Trapezoidal Method

𝑥 𝑡 + ℎ = 𝑥 𝑡 +ℎ

2ሶ𝑥 𝑡 + ሶ𝑥 𝑡 + ℎ

𝑥 𝑡 + ℎ = 𝐼 −1

2ℎ𝐴

−1

𝐼 +1

2ℎ𝐴 𝑥 𝑡

Page 18: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

18

Numerical Integration Accuracy• An example:

𝑑𝑥

𝑑𝑡= −𝑥, where 𝑥(𝑡 = 0) = 1.5, ℎ 𝜖 [0,10].

• EXPM: Analytical solution 𝑥(ℎ) = 𝑒ℎ𝑥(𝑡 = 0)

• FE: Forward Euler ; BE: Backward Euler; TR: Trapezoidal Method

Page 19: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

19

Efforts to Improve the Simulator

• Waveform Relaxation Method

• Alternating Direction Implicit (ADI) Method

• Integration with High Order Derivatives

• Matrix Solvers

• Matrix Exponential Integrator

Page 20: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

20

Waveform Relaxation Method

Τ𝑑𝑥1𝑘 𝑑𝑡 = 𝑓1(𝑥1

𝑘, 𝑥2𝑘−1, 𝑥3

𝑘−1),

Τ𝑑𝑥2𝑘 𝑑𝑡 = 𝑓1(𝑥1

𝑘−1, 𝑥2𝑘, 𝑥3

𝑘−1),

Τ𝑑𝑥3𝑘 𝑑𝑡 = 𝑓1(𝑥1

𝑘−1, 𝑥2𝑘−1, 𝑥3

𝑘).

+ Partitioning and distributed computation

+ Each differential equation picks its own timesteps

- Gauss-Seidel and Gauss-Jacobi techniques, Convergence, Stability

E. Picard, “On the application of successive approximation methods to the study of some ordinary differential equations,” Journal of pure and applied mathematics, 1893.

E. Lelarasmee, A.E. Ruehli, A.L. Sangiovanni-Vincentelli,”Waveform relaxation: theory and practice,” IEEE Trans. On CAD 1982.

Page 21: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

21

Alternating Direction Implicit Method

Split the G matrix: 𝐶 Τ𝑑𝑥 𝑑𝑡 = −𝐺𝑥 = −𝐺1𝑥 − 𝐺2𝑥

Alternate two half steps of trapezoidal integration

2𝐶

ℎ+ 𝐺1 𝑥 𝑡 +

2=

2𝐶

ℎ− 𝐺1 𝑥(𝑡)

2𝐶

ℎ+ 𝐺2 𝑥 𝑡 +

2=

2𝐶

ℎ− 𝐺2 𝑥(𝑡 +

2)

• Partitioning is the key

• The number of non-zero elements is decreased

• Stable

D.W. Peaceman, H.H. Rachford Jr., Journal of SIAM, 1955.

T. Namiki, K. Ito, IEEE Tran. Microwave Theory and Technology, 1999. 2D

EM wave.

Z. Zhu, R. Shi, and C.K. Cheng, E.S. Kuh, ASPDAC 2006.

Page 22: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

22

Use Taylor expansion with high order derivatives to approximate the integration solution.

+ High order accuracy

+ Stable

- N-fold dimensions (N the order of the formula)

- High order derivatives of nonlinear models

• N. Obreshkov, On the mechanical quadrature, Akad. Nauk, 1942

• E. Gad, M. Nakhla, R. Achar, Y. Zhou, A-stable and L-stable high-order integration methods for solving stiff differential equations. IEEE TCAD, 2009.

Integration with High Order Derivatives

Page 23: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

23

Speed up the calculation of matrix solvers via supercomputer, GPU, node ordering and graph sparsification.• Supercomputer, Trilinos: Xyce, S. Hutchinson, E. Keiter, R.

Hoekstra, H. Watts, A. Waters, R. Schells, S. Wix, Parallel Computing: Advances and Current Issues (pp. 165-172), 2002.

• Node Ordering, Block Triangular Form: KLU, T.A. Davis, E. Palamadai Natarajan. ACM Transactions on Mathematical Software, 2010.

• GPU: L. Ren, X. Chen, Y. Wang, C. Zhang, H. Yang, H., 2012, Design Automation Conference, 2012.

• Graph Sparsification: Z. Feng, Design Automation Conference 2016.

Matrix Solvers

Page 24: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

24

• Analytical Formulation

• Standard Krylov Method

• Rational Krylov Method

• Invert Krylov Method

C. Moler, C. Van Loan, 19 dubious ways to compute the exponential of a matrix, 1978; twenty-five years later, 2003

A. Nauts, R.E. Wyatt, 1983; T.J. Park, J.C. Light, 1986; Y. Saad, 1992

Matrix Exponential Methods

Page 25: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

25

Matrix Exponential Method

• Analytical solution perspective

- Let 𝐴 = −𝐶−1𝐺, 𝑏 = 𝐶−1𝑢 (C can be regularized [TCAD 2012])

• Let input be piecewise linear

dbetxehtxh

hAAh )()()(0

)(

h

tbhtbtbb

)()()()(

h

tbhtbAIAhetbAIetxehtx AhAhAh )()(

)()()()( 21

Page 26: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

26

Matrix Exponential Computation

Transform into

For simplicity, we use 𝐴 to represent ෩A, from now on

• Forward Euler fits the first two terms as (I+hA)

• Backward Euler fits the first two terms as (I-hA)-1

• Trapezoidal fits the first three terms as (I-0.5hA)-1

(I+0.5hA)

x 𝑡 + ℎ = I𝑛 0 𝑒෩Aℎ x(𝑡)

e2

෩A =A W0 J

, J =0 10 0

, e2 =01,W =

b 𝑡 + ℎ − b(𝑡)

ℎb(𝑡)

𝑒A ≡ I + A +A2

2+A3

3!+ ⋯+

A𝑘

𝑘!+ ⋯

h

tbhtbAIAhetbAIetxehtx AhAhAh )()(

)()()()( 21

Page 27: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

27

Matrix Exponential Method

• Accuracy: Analytical solution

- Approximate eAh as (I+Ah) Forward Euler

- Approximate eAh as (I-Ah)-1 Backward Euler

• Scalable: Sparse matrix-vector multiplication (SpMV)

• Stability: Stable for passive circuits

27

reference solution

Page 28: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

28

Krylov Subspac: Approximate 𝑒𝐴ℎv

• Krylov subspace

- Standard Basis Generation

- Orthogonalization (Arnoldi Process):

- Matrix reduction: m=10~30

• Matrix exponential operator (Assume 𝑣1=𝑣 or 𝑣 =1)

- time stepping, h, via scaling

- Posteriori error estimate [Saad92]

𝑲𝒎 𝐀, 𝐯 = 𝐯, 𝐀𝐯, 𝐀𝟐𝐯,… , 𝐀𝒎−𝟏𝐯

𝐀 = −𝐂−𝟏𝐆

𝐕𝒎 = 𝐯𝟏, 𝐯𝟐, ⋯ , 𝐯𝒎

𝐀𝐕𝒎 = 𝐕𝒎𝐇𝒎,𝒎 + 𝒉𝒎+𝟏,𝒎𝐯𝒎+𝟏𝒆𝒎𝑻

𝒆𝐀ℎ𝐯 ≈ 𝐕𝒎 𝒆𝐇𝒎,𝒎ℎ𝒆𝟏

1

Τ

1,1, eeevChresidue

h

mmmmmmH

Page 29: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

29

Property of Standard Krylov Subspace Method

• Theorem [Saad ‘92]: Standard Krylov method fits the first m terms in Taylor’s expansion.

• Standard Krylov subspace tends to capture the eigenvalues of large magnitude

• For transient analysis, the eigenvalues of small real magnitude are wanted to describe the dynamic behavior.

Page 30: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

30

Rational Krylov Subspace

• Spectral Transformation:- Shift-and-invert matrix A

- Rational Krylov subspace captures slow-decay components

- Use rational Krylov subspace for matrix exponential

100

Important eigenvalue: Component that decays slowly.

Not so important eigenvalue: Component that decays fast.

𝑲𝒎 𝐀, 𝐯 𝑲𝒎 (𝐈 − 𝛾𝐀)−𝟏, 𝐯

(𝐈 − 𝛾𝐀)−𝟏

Page 31: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

31

Rational Krylov Subspace: eAhv

Rational Krylov subspace

• Arnoldi orthogonalization Vm=[v1 v2 … vm]

• Matrix reduction (Assume that v1=v)

• Matrix exponential operator

𝑲𝒎 (𝐈 − 𝛾𝐀)−𝟏, 𝐯 = 𝐯, (𝐈 − 𝛾𝐀)−𝟏𝐯, (𝐈 − 𝛾𝐀)−𝟐 𝐯,… , (𝐈 − 𝛾𝐀)−𝒎+𝟏𝐯

𝒓𝒆𝑠𝑖𝑑 = (𝑪

𝜸+𝐺)ℎ𝒎+𝟏,𝒎𝐯𝒎+𝟏𝒆𝒎

T𝑯−𝟏𝒆ℎ/𝛾 (𝐈−𝑯−𝟏)𝒆𝟏

(𝑰 − 𝛄𝑨)−𝟏𝐕𝒎 = 𝐕𝒎𝑯+ 𝒉𝒎+𝟏,𝒎𝐯𝒎+𝟏𝒆𝒎𝑻

𝒆𝐀𝒉𝐯 ≈ 𝐕𝒎𝒆𝒉

𝜸(𝐈−𝑯−𝟏)

𝒆𝟏

Page 32: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

32

Invert Krylov Subspace eAhv

Invert Krylov space

• Arnoldi orthogonalization Vm=[v1 v2 … vm]

• Matrix reduction (v1=v)

• Matrix exponential operator

𝑲𝒎 𝐀−𝟏, 𝐯 = 𝐯, 𝐀−𝟏𝐯, 𝐀−𝟐 𝐯,… , 𝐀−𝒎+𝟏𝐯

𝒆𝐀𝒉𝐯 ≈ 𝐕𝒎 𝒆𝒉𝑯−𝟏𝒆𝟏

𝒓𝒆𝒔𝒊𝒅𝒖𝒆 = ℎ𝒎+𝟏,𝒎𝑮𝐯𝒎+𝟏𝒆𝒎T𝑯−𝟏𝒆ℎ𝑯

−𝟏𝒆𝟏

𝑨−𝟏𝐕𝒎 = 𝐕𝒎𝑯+ 𝒉𝒎+𝟏,𝒎𝐯𝒎+𝟏𝒆𝒎𝑻

Comment: The calculation of A-1vi=G-1Cvi is much

simpler when G is sparse but C is complex for post

layout simulation

Page 33: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

33

Absolute Error: A Sample Test Case

We derive absolute errors of various methods using a sample test case with known solution (Eigenvalue/eigenvector approach).

• n: circuit node number= 1600

• G: conductance range [0.01, 100]

• C: capacitance range [8.5e-18, 9.9e-16]

• A=-C-1G: eigenvalue range [-3.98e17, -8.49e10]

• v: L2 norm = 23.3; L∞ norm = 0.999 from rand(1600,1) by MATLAB

Page 34: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

34

Matrix exponential operators vs. low order scheme

• FE: Forward Euler• Std. M: standard Mexp, m=2• Inv. M: Invert Mexp, m=2• Rat. M: Rational Mexp, m=2• BE: Backward Euler • TR: Trapezoidal

Page 35: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

35

Matrix exponential operators vs. low order scheme

• Case h< e-17 (Taylor’s expansion is valid)- Trapezoidal method: error terms start from the third order- BE, FE, and Krylov methods: error terms start from the

second order- Invert and rational Krylov methods: error terms start from

the first order if 𝛾 is not well chosen

• Case e-17<h<e-10- FE method: the result diverges- Trapezoidal and Krylov methods: the results are flat if 𝛾 is

not well chosen- BE method and invert/rational Krylov methods: the results

look better

• Case e-10<h- FE method: the result diverges- Trapezoidal and BE methods: the results are flat - All Krylov methods: the absolute errors shrink with the

solution.

Page 36: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

36

Matrix exponential operators vs. low order scheme

Method ℎ ≤min|𝜆|−1

slope

min |𝜆|−1 < ℎ< max|𝜆|−1

max|𝜆|−1 ≤ ℎ

FE 2nd order divergent divergent

BE 2nd order flat flat

TR 3rd order flat* flat*

Std Kry 2nd order flat drop

Inv Kry 1st order flat drop

Rat Kry 1st order flat drop

• For three Krylov methods, m=2

• For rational Krylovthod, 𝛾 is set a large constant

• * TR is worse than that BE

Page 37: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

37

Rational Krylov Approach: 𝛾 = h/2

Page 38: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

38

Rational Krylov Method vs Trapezoidal Method

When 𝛾 = ℎ

2,

rational Krylov and trapezoidal methods

use the same subspace: 𝑣, (𝐼 − γ𝐴)-1 𝑣.

However, rational Krylov method is

better in terms of accuracy or allows

longer time step h for the same

accuracy.

Page 39: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

39

Rational Krylov Approach: 𝛾= 5e-11

Page 40: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

40

Rational Krylov Approach: 𝛾 = 5e-14

Page 41: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

41

Rational Krylov Space: 𝛾=5e-17

Page 42: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

42

Rational Krylov Space Method

• For a linear system and a constant 𝛾,

we need only one LU decomposition

for different time step h.

• If constant 𝛾 is large enough, the

longer time step h we use, the better

accuracy we obtain.

Page 43: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

43

Standard and Invert Krylov Methods

Page 44: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

44

Standard and Invert Krylov Methods

As m increases,

• the curve of Krylov method shifts to the right and converges at the right end

• the curve of invert Krylov method shifts to the left and converges at the left end.

The desired time step h is around 10-12second range which is near the right end.

Page 45: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

45

Three Krylov Methods

Standard Krylov Method

• Result is accurate when time step size h is tiny

• C cannot be singular (regularization)

Rational Krylov Method

• Result is superior to trapezoidal method for all h

• For proper choice of 𝛾, the result is the best among the three Krylov methods

• The calculation is the most expensive (C+𝛾G)-1

Invert Krylov Method

• Result is good when step size h is large enough

• The calculation is the simplest G-1C, in particular for post layout simulation

Page 46: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

46

Numerical Stability of Singular Systems

• A 1 tank RLC model with a singular C matrix

• To avoid 𝐶−1, exponential integrators should beevaluated with low-order 𝜑 functions

𝑥𝑘+1 = 𝑥𝑘 + 𝜑0 ℎ𝐽 𝑔𝑘 − 𝑔𝑘 + ℎ𝜑1 ℎ𝐽 ෨𝑏𝑘 − ℎ෨𝑏𝑘where

𝑔𝑘 = 𝐽−1𝑔𝑘 = 𝑥𝑘 − 𝐺−1𝐵𝑢 𝑡

෨𝑏𝑘 = 𝐽−1𝑏𝑘 = −𝐺−1𝐵𝑑𝑢

𝑑𝑡

Page 47: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

47

Numerical Stability of Singular Systems

• Step input I_s with risingtime 10ps

• Element-wise residue isplotted for each variable𝑟𝑒𝑠𝑖𝑑𝑢𝑒

= 𝐶𝑑𝑥𝑘𝑑𝑡

+ 𝐺𝑥𝑘 − 𝐵𝑢 𝑡𝑘

• The increasing residuecould be approximatedwith a sensitivity matrix.Since ෨𝑏𝑘 = 0 after T =10ps, the solution is

𝑥𝑘+1 = 𝑥𝑘 + 𝜑0 ℎ𝐽 𝑔𝑘 − 𝑔𝑘

Page 48: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

48

Error Estimation with Sensitivity Matrix

• From Arnoldi process, we have the relation with 𝑣1 = 𝑣

• Assume a local error with 𝑣 in target function 𝐹 𝑣 =𝜑0 ℎ𝐽 𝑣

𝐹 𝑣 + 𝜖 − 𝐹 𝑣 = 𝐷𝜖

the error with 𝑉𝑚 = 𝑣1 + 𝜖 𝑣2 + 𝜖′ is or higher order compared to 𝐻𝑚

where

Page 49: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

49

Error Estimation with Sensitivity Matrix

• When the diagonals in 𝐷 has absolute value >1, the error of variable keeps accumulating

• Slope of increasing residue versus 𝛾 iscompared to log of diagonals in 𝐷

Slope of Residue vs.

log(D(1,1))

Contributions to D from

each vector of 𝑽𝒎

Page 50: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

50

Error Estimation with Sensitivity Matrix

• Once the step size h is fixed, the ratio𝛾 will affect the sensitivity matrix 𝐷.Only the second term 𝐷2 makes thedifference.

• ℎ = 8.76e − 10𝑠, 𝐷1 1,1 = 0.1803. Bychanging 𝛾, absolute value of diagonalscan be bounded D 1,1 ≤ 1.

Contribution of second vector

once h is fixed

Page 51: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

51

Singularity Handling

a diagonal matrix

using 0 to mark

singular elements

• We exclude the error fromsingular variables by slightlymodifying Arnoldi Process

• There is no accumulatingresidue

Page 52: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

52

Multifrequencies Simulation

• Modeled as a 3 tankRLC circuit

• Multiple resonantfrequencies𝑓𝑙𝑜 = 5.88𝑘𝐻𝑧, 𝑓𝑚𝑖𝑑= 5.86𝑀𝐻𝑧, 𝑓ℎ𝑖 = 1.28𝐺𝐻𝑧

• Apply singularityhandling methods

Page 53: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

53

What I have learned from SPICE: Ernest S. Kuh, 1928-2015

• A pioneer in the field of circuit theory

- Principles of circuit synthesis, Kuh, Pederson, 1959

- Theory of linear active networks, Kuh, Rohrer, Holden-Day,, 1967

- Basic circuit theory, Desoer, Kuh, 1967

- Linear and nonlinear circuits, Chua, Desoer, Kuh, 1987

• Chair, EECS Dept, UC Berkeley 1968-1972

• Dean, School of Engineering, UC Berkeley 1973-1980

- Industrial Liaison, Engineering Fund

- Bechtel Engineering Center (Library)

• Prof, EECS Dept., UC Berkeley 1956-

• UC Berkeley Ernest S. Kuh Distinguished Lecture Series

• Technical Advisor, CLK Design Automation, Inc.

• Sports: Swimming and Tennis

Page 54: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

54

What I have learned from SPICE: Rohrer

• Very solid at theory

- Theory of linear active networks, Kuh, Rohrer, Holden-Day,, 1967

- Circuit theory: an introduction to the state variable approach, Rohrer, McGraw-Hill 1970

- Introduction to systems theory, Director, Rohrer, McGraw-Hill 1972

- Electronic circuit and system simulation methods, Pillage, Rohrer, Visweswariah, McGraw-Hill, 1995

- Applied introductory circuit analysis for electrical and computer engineers, Reed, Rohrer, Prentice Hall, 1999

Page 55: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

55

InterHDL (1997-98) Acquired

TMA (1995-98) IPO 1997 - Acquired

2/21/2018 (c)2017 Ronald A Rohrer

1970 1975 1980 1985 1990 1995 2000 2005 2010 2015 2020

(1986 - ) IPO 1992

(2008-15) Acquired

- AEDCAP (1971-72) Failed

Scientific Calculations – MEDS (1983-85) Failed

Genesis Microchip (1994-99) IPO 1998 - Acquired

(2008-14) Failed

Precedence (1995-98) Acquired

Lambda Technology (1995-2004) Failed

Xynetix (1997-99) Acquired

NeoLinear(2000-04) Acquired

The Marathon Group (1998-99) Acquired

Comstock Systems (1999 -2001) Acquired

Start-Ups by R. Rohrer

PSI (1992-94) Acquired

ISS(1990-95) IPO 1994 - Acquired

CadMos (1999 -2000) Acquired

Xpedion (2003-04) AcquiredXpedion (2003-04) Acquired

Page 56: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

56

What I have learned from SPICE: Pederson 1925-2004

• Built crystal radio sets at 10 years old.

• Found study partner to uplift his grade from C.

• Worked on amplifiers in Ph.D. program.

• Built the first academic IC fabrication facility (1962) with used processing equipment donated by companies (Fairchild Semiconductor International, Inc. founded 1957).

• Built SPICE in need of circuit analysis.

• Trained students and released the software package.

• Motto: You don’t get any credit for doing 95 percent of the job.

Page 57: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

57

What I have learned from SPICE

• Motivation

- Curiosity beyond the current scope of jobs

• Solid foundation in theory

- Comprehension of the principle and limits

• Simplification of the problems

- Start from the fundamental equations

- Begin with simple device models

• Collaboration

- Collaborate with others

- Learn from the customers

Page 58: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

58

Conclusion and Future Directions

• SPICE: Robust tool for many applications

• The goal is to handle huge, stiff, nonlinear, dynamic systems

• The algorithms are elegant and supportedby theory

• The process includes integration, matrix solver, and nonlinear system handling

• New algorithms and/or new hardware

Page 59: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

59

Future DirectionsSparse Matrix Solvers: Distributed computation, or

Tailor made hardware.

Delay Differential Equations: Initial condition,

Latency

Stochastic Differential Equations: Stochastic inputs

or parameters

Parameter Approximation: Inverse problem, Brain

imaging,

Causality

checking

Huang e

t al. N

euro

Image 2

012

Page 60: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

60

Thank you!

Page 61: The Life of SPICE as a Transient Circuit Simulatorcseweb.ucsd.edu/~kuan/talk/mtu18/MtuTalk022318.pdf · bread and buffer of circuit designers. After 46 years, the core of its transient

61

References• X. Yang, W. Ku, and C.K. Cheng, "A New Efficient Simulation Method for RLC Interconnect via Amplitude and Phase Approximation,“ Asia and South

Pacific Design Automation Conf., pp. 463-467, Jan. 2000, Yokohoma, Japan.

• Z. Zhu, K. Rouz, M. Borah, C.K. Cheng, and E.S. Kuh "Efficient Transient Simulation for Transistor-Level Analysis,“ Asia and South Pacific Design Automation Conf., pp. 240-243, 2005.

• Z. Zhu, H. Peng, K. Rouz, M. Borah, C.K. Cheng and E.S. Kuh, "Two-Stage Newton-Raphson Method for Transistor Level Simulation,“ IEEE Trans. on Computer Aided Design, pp. 881-895, May 2007.

• H. Peng and C.K. Cheng, "Fast Transient Simulation of Lossy Transmission Lines,“ IEEE Int. Symp. on Circuits and Systems, pp. 2706-2709, 2007.

• H. Peng, , K. Rouz, M. Borah, and C.K. Cheng, "Parallel Full-Chip Transient Simulation at Transistor Level,“ IEEE Electrical Performance of Electronic Packaging, pp. 239-242, 2008.

• H. Peng, C.K. Cheng, "Parallel Transistor Level Full-Chip Circuit Simulation,“ Design Automation and Test in Europe, pp. 304-307, 2009, selected for reprint at EDA Tech Forum, pp. 34-38, June 2009.

• H. Peng and C.K. Cheng, "Parallel Transistor Level Circuit Simulation using Domain Decomposition Methods,“ IEEE Asia and South Pacific Design Automation Conf., pp. 397-402, 2009.

• X. Hu, W. Zhao, P. Du, A. Shayan, C.K. Cheng, "An Adaptive Parallel Flow for Power Distribution Network Simulation Using Discrete Fourier Transform,“ Asia and South Pacific Design Automation Conference, pp. 125-130, 2010.

• S.H. Weng, P. Du, C.K. Cheng, "A Fast and Stable Explicit Integration Method by Matrix Exponential Operator for Large Scale Circuit Simulation," IEEE Int. Symp. on Circuits and Systems, pp. 1467-1470, 2011.

• S.H. Weng, Q, Chen, and C.K. Cheng, "Circuit Simulation by Matrix Exponential Method,“ IEEE ASICON, pp. 369-372, 2011.

• Q. Chen, W. Schoenmaker, S.H. Weng, C.K. Cheng, G.H. Chen, L.J. Jiang, and N. Wong, "A Fast Time-Domain EM-TCAD Coupled Simulation Framework via Matrix Exponential," IEEE/ACM (Best Paper Award Candidate, 5/82 papers/338 submissions).

• S.H. Weng, Q.Chen, N. Wong, and C.K. Cheng, "Circuit Simulation using Matrix Exponential Method for Stiffness

• Handling and Parallel Processing", IEEE/ACM Int. Conf. on Computer Aided Design, 407-414, 2012.

• Q. Chen, S.H. Weng, and C.K. Cheng, "A Practical Regularization Technique for Modified Nodal Analysis in Large-Scale Time-Domain Circuit Simulation,“ IEEE Trans. on Computer-Aided Design, pp. 1031-1040, July 2012.

• H. Zhuang, S.H. Weng, and C.K. Cheng, "Power Grid Simulation using Matrix Exponential Method with Rational Krylov Subspaces,“ IEEE ASICON, C5-5, 2013.

• H. Zhuang, S.H. Weng, J.H. Lin, and C.K. Cheng, "MATEX: A Distributed Framework for Transient Simulation of Power Distribution Networks," ACM/IEEE Design Automation Conf., pp. 43.3.1-6, 2014.

• H. Zhuang, W. Yu, I. Kang, X. Wang, and C.K. Cheng, "An Algorithmic Framework for Efficient Large-Scale Circuit Simulation using Exponential Integrators,“ ACM/IEEE Design Automation Conf., 2015.

• I. Kang, X. Wang, J.H. Lin, R. Coutts, and C.K. Cheng, "Impulse Generation from S-Parameters for Power Delivery Network Simulation," IEEE Symp. on Electromagnetic Compatibility and Signal Integrity, pp. 277-281, 2015.

• Q. Mei, W. Schoemaker, S.H. Weng, H. Zhuang, C.K. Cheng, and Q. Chen, "An Efficient Transient Electro-Thermal Simulation Framework for Power

• Integrated Circuits," IEEE Trans. on Computer-Aided Design, pp. 832-843, May 2016.

• H. Zhuang, W. Yu, S.H. Weng, I. Kang, J.H. Lin, X. Zhang, R. Coutts, and C.K. Cheng, "Simulation Algorithms with Exponential Integration for Time-Domain Analysis of Large-Scale Power Delivery Networks,“ IEEE Trans. on Computer-Aided Design, pp. 1681-1694, Oct. 2016.

• H. Zhuang, X. Wang, Q. Chen, P. Chen, and C.K. Cheng, "From Circuit Theory, Simulation to SPICE_Diego: A Matrix Exponential Approach for Time-Domain Analysis of Large-Scale Circuits,“ IEEE Circuits and Systems Magazine, pp. 16-34, issue 2, 2016.

• X. Wang, H. Zhuang, and C.K. Cheng, "Exploring the Exponential Integrators with Krylov Subspace Algorithms for Nonlinear Circuit Simulation," to appear in ACM/IEEE Int. Conf. on Computer Aided Design, 2017.