Presentation is loading. Please wait.

Presentation is loading. Please wait.

SPICE Diego : Circuit Simulation for Post Layout Analysis Chung-Kuan Cheng Department of Computer Science and Engineering University of California, San.

Similar presentations


Presentation on theme: "SPICE Diego : Circuit Simulation for Post Layout Analysis Chung-Kuan Cheng Department of Computer Science and Engineering University of California, San."— Presentation transcript:

1 SPICE Diego : Circuit Simulation for Post Layout Analysis Chung-Kuan Cheng Department of Computer Science and Engineering University of California, San Diego, CA, USA Contact: ckcheng@ucsd.edu

2 Outline Background of Transient Circuit Simulation – Formulations – Problems Matrix Exponential Circuit Simulation (Mexp) – Stiffness Problem – Skip of Regularization – Flexible Time Stepping – Errors Experiments Conclusions 2

3 Previous Works SPICE – R. Rohrer, 1960s, D. Pederson, 1973 – Xyce (parallel processing) – Ngspice (open source) Matrix Exponential – 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 3

4 VLSI Circuit: Devices + Interconnect C: cap./ind. matrix G: cond./imp. matrix x(t): v/i vector, and u(t): input sources n: millions to billions of nodes 4 Multiple layers of metal with tightly coupling C and L (post layout) Millions to billions of devices Low margin designs with severe noises

5 Simulation Flow Device Evaluation – effective caps and current – linearization Numerical Integration – solve a system of ordinary differential equations Convergence & Error Check – stability and errors Step Control – adjust step size 5 Device Evaluation Numerical Integration Convergence & Error Check re-evaluate Circuit netlist Step Control stepping finish

6 Transient Circuit Simulation Transient simulation: Numerical integration Low order approx.: Backward Euler, Trapezoidal, Gear’s – Matrix decomposition for each time step h – Implicit process with Newton Raphson iteration – Dahlquist stability barrier – Local truncation error limits the time step High order approx.: Matrix exponential operator – Matrix decomposition for flexible time step h – Explicit and stable process – Error reduces as step size increases for certain operators 6

7 Numerical Integration Forward Euler Backward Euler Trapezoidal Method 7

8 Trade off between stability and performance SILCA [Li & Shi, ‘03]ACES [Devgan & Rohrer, ‘97] Numerical Integration 8 computational effort stability high low high Backward Euler Forward Euler our method Telescopic [Dong & Li, ‘10]

9 Analytical Formulation Standard Krylov Method Rational Krylov Method Invert Krylov Method Matrix Exponential Methods 9

10 Matrix Exponential Method Analytical solution perspective – Let A=-C -1 G, b=C -1 u (C can be regularized [TCAD 2012]) Let input be piecewise linear 10

11 Matrix Exponential Computation 11

12 Matrix Exponential Method Accuracy: Analytical solution – Approximate e Ah as (I+Ah)  Forward Euler – Approximate e Ah as (I-Ah) -1  Backward Euler Scalable: Sparse matrix-vector multiplication (SpMV) Stability: Stable for passive circuits 12 reference solution

13 13

14 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. 14

15 Rational Krylov Subspace Spectral Transformation: – Shift-and-invert matrix A – Rational Krylov subspace captures slow-decay components – Use rational Krylov subspace for matrix exponential 15 Important eigenvalue: Component that decays slowly. Not so important eigenvalue: Component that decays fast.

16 Rational Krylov Subspace: e Ah v Rational Krylov subspace Arnoldi orthogonalization V m =[v 1 v 2 … v m ] Matrix reduction (Assume that v 1 =v) Matrix exponential operator 16

17 Invert Krylov Subspace e Ah v Invert Krylov space Arnoldi orthogonalization V m =[v 1 v 2 … v m ] Matrix reduction (v 1 =v) Matrix exponential operator 17 Comment: The calculation of A -1 v i =G -1 Cv i is much simpler when G is sparse but C is not for post layout simulation

18 Absolute Error: A Sample Test Case 18

19 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 19

20 Matrix exponential operators vs. low order scheme 20

21 Matrix exponential operators vs. low order scheme 21 Method FE2 orderdiverge BE2 orderflat TR3 orderflat* Std Kry2 orderflatdrop Inv Kry1 orderflatdrop Rat Kry1 orderflatdrop

22

23 Rational Krylov Method vs Trapezoidal Method

24

25

26

27 Rational Krylov Space Method

28 Standard and Invert Krylov Methods

29 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 -12 second range which is near the right end.

30 Three Krylov Methods

31 Experiment (Rational Krylov) Linux workstation – Intel Core i7-920 2.67GHz CPU – 12GB memory. Test Cases – Stiff RC mesh network (2500 Nodes) Mexp vs. Rational Mexp – Power Distribution Network (45.7K~7.4M Nodes) Rational Mexp vs. Trapezoidal (TR) with fixed time step (avoid LU during the simulation) 31

32 Experiment (I) RC mesh network with 2500 nodes. (Time span [0, 1ns] with a fixed step size 10ps) stiffness definition: Comparisons between average (m avg ) and peak dimensions (m peak ) of Krylov subspace using – Standard Basis: m avg = 115 and m peak =264 – Rational Basis: m avg = 3.11, and m peak =10 Rational Basis-MEXP achieves 224X speedup for the whole simulation (vs. Standard Basis-MEXP). 32

33 Experiment (II) PDN Cases – On-chip and off-chip components – Low-, middle-, and high-frequency responses – The time span of whole simulation [0, 1ps] 33

34 Experiment (II) 34 Mixture of low, mid, and high frequency components. 16X speedups over TR. Difference of MEXP and HSPICE: 7.33×10 -4 ; TR and HSPICE: 7.47×10 -4

35 Experiment: CPU time 35

36 Conclusions on Rational Krylov Approach Rational Krylov Subspace solves the stiffness problem. – No need of regularization – Small dimensions of basis. – Flexible time steps. Adaptive time stepping is efficient to explore the different frequency responses of power grid transient simulation (considering both on-chip and off-chip components) – 15X speedup over trapezoidal method. 36

37 Experiment (Invert Krylov) Implemented in MATLAB and C/C++ – The interactions between C/C++ and MATLAB 2013a are through MATLAB Executable (MEX) external interface with GCC 4.7.3. – Devices are evaluated using BSIM3 device model and matrix stamping using C code. In a Linux workstation – Intel CPU i7 3.4GHZ – 32GB memory 37

38 Numerical Results [1] Results of IEEE EMC&SI [1]. Simulation of PDN with Nonlinear Components 38 [1] H. Zhuang, I. Kang, X. Wang, J.-H. Lin C. K. Cheng. “Dynamic Analysis of Power Delivery Network with Nonlinear Components Using Matrix Exponential Method”, IEEE EMC & SI 2015, (to appear)

39 Numerical Results (II) [2] H. Zhuang, W. Yu, I. Kang, X. Wang, C. K. Cheng, “An Algorithmic Framework of Large-Scale Circuit Simulation Using Exponential Integrators,” ACM/IEEE DAC 2015 39 Results from our DAC 2015 [2] Simulation of large general circuits Due to the C matrix, the factorization complexity of (C+hG) increased

40 Conclusions Rational/Invert Krylov methods solve the stiffness problem. – No need of regularization – Small dimensions of basis. – Explicit integration (no need of NR iteration) – Flexible time steps Invert Krylov method – Post layout analysis 40

41 Conclusions: Future Works C++ code of SPICE Diego Mutliscale multiphysical analysis – SPICE, full wave, thermal cycling, stress simulation Theory of matrix exponential Distributed computation 41

42 Thanks and Q&A 42

43

44

45 Rational Krylov Approach: gamma = 1e-14

46 Rational Krylov Approach: gamma= 5e-15

47 Rational Krylov Approach: gamma=5e-19


Download ppt "SPICE Diego : Circuit Simulation for Post Layout Analysis Chung-Kuan Cheng Department of Computer Science and Engineering University of California, San."

Similar presentations


Ads by Google