SystemC-AMS(CUDA) Ruru /14
Outline Introduction Modeling Formalisms ELN(Electrical Linear Networks) Solve Ordinary Differential Equation Solve Eln-Cluster Workflow SystemC Kernel Solver Performance
Introduction Positioning SystemC AMS Extensions
Introduction Modeling formalisms and use cases
Modeling Formalisms
Electrical Linear Networks ELN
Setup of the equation system Kirchhoff’s current law(KCL)
Electrical Linear Networks ELN elaboration and simulation phases
Problem : Thermo Model Thermo Model : RLC model Solve ELN equation Purpose Using CUDA to Speedup
Solve Ordinary Differential Equation Euler’s Method Backward Euler Method
SystemC Kernel Solver Eln-cluster Initialization Module(r, l, c …) : modules Node(sca_terminal, sca_node …) : equations Sparse Matrix Spcode
Solve Eln-Cluster Workflow Solve Differential Equation ana_solv DATA (Sdata, R, X) Next Cluster Next Timestamp Cluster? Timestamp? …
Modify ana_solv to GPU Every eln-cluster Every time stamp Workflow Copy matrix data to GPU Execute ana_solv by GPU Copy result data to host ana_solv DATA (Sdata, R, X) GPU ana_solv DATA (Sdata, R, X)
Solve Eln-Cluster Workflow Solve Differential Equation ana_solv DATA (Sdata, R, X) Next Cluster Next Timestamp Cluster? Timestamp? … GPU ana_solv DATA (Sdata, R, X)
Performance The result is correct No speed up 200 module of one cluster : 75 ms (CPU) 200 module of one cluster : 165 ms (GPU)
Thanks for Your Attention!
Euler’s Method Question : y’ = f(x, y), x0 < x < b, y(x0) = y0, h is constant xi = x0 + i*h ; (i = ….) yi = y(xi) ~ Yi (Yi is result) yn+1 = yn + h*f(yn, xn) Example : y’ = y, y(0) = 1, h = 0.5 Solve : y1 = y(0) + y’(0)*h = 1 + 1*0.5 = 1.5 y2 = … Yi = exp(x) => Y(0.5) = 1.649… 1.5 vs 1.649
Backward Euler Method Question : y’ = f(x, y), x0 < x < b, y(x0) = y0, h is constant xi = x0 + i*h ; (i = ….) yi = y(xi) ~ Yi (Yi is result) yn+1 = yn + h*f(yn, xn) Example : y’ = -y^3, y(0) = 1, h = 0.5 Solve : y1 = y(0) + f(x1, y1)*h = *y1^3 First => y1 = y(0) + f(x0, y0)*h = 1-0.5*y0^3 = 0.5 Then recursive… y1 = => => … =>