An extension to SystemC-A to support mixed-technology systems with distributed components Chenxu Zhao and Tom J. Kazmierski School of Electronics and Computer Science University of Southampton, UK Email: cz05r,[email protected] Abstract— This contribution proposes syntax extensions to VHDL-AMSP) has been presented [10]. Pending the develop- SystemC-A that support mixed-technology system modelling ment of a new standard, a preprocessor has been developed to where components might exhibit distributed behaviour modelled convert VHDL-AMSP into the existing VHDL-AMS 1076.1 by partial differential equations. The important need for such extensions arises from the well known modelling difficulties in standard automatically which can be simulated using currently hardware description languages where complex electronics in a available simulators. In this paper, we propose the first full mixed-technology system interfaces with distributed components implementation of the PDE extension to SystemC-A where from different physical domains, e.g. mechanical, magnetic or no preprocessor is required. thermal. A digital MEMS accelerometer with distributed me- The proposed extension has particular advantages in mixed chanical sensing element is used as a case study to illustrate modelling capabilities offered by the proposed extended syntax physical technology systems that exhibit distributed physical of SystemC-A. effects. For example, electromechanical Sigma-Delta MEMS sensor designs, e.g. accelerometers and gyroscopes, which I. INTRODUCTION are based on incorporation of mechanical sensing elements into Σ∆ modulator control loops, have attracted great re- SystemC-A [1] is a superset of SystemC intended to extend search interest [12]. The mechanical sensing element, which is the modelling capabilities of SystemC [2] to the analogue usually modeled by the lumped mass-spring-damper model(a domain. It provides constructs to support user defined ordinary second order ODE), is also a part of the loop filter in these differential and algebraic equations(ODAEs), and analogue systems. However, the lumped model only can capture the components to enable modelling of analogue, mixed-signal first resonant mode which is not accurate enough as higher and mixed-domain systems from high level of abstraction order mechanical resonant modes may significantly affect down to the circuit level. Most powerful features of VHDL- the performance and stability of the Σ∆ control loop [6]. AMS [3] and Verilog-AMS [4] are provided in SystemC-A Consequently, it is necessary to improve the accuracy of in addition to a number of extra advantages such as high the mechanical model and use partial rather than ordinary simulation speed, support for hardware-software co-design and differential equations. In section III the case study of a MEMS high levels of modeling [1]. SystemC-A is used to model accelerometer embdedded in a Σ∆ control loop is modelled mixed-signal and mixed-physical domain systems such as in the extended SystemC-A to demonstrate the efficiency of automotive seating vibration isolation system [1] and ferro- the new syntax. The accelerometer uses distributed sensing magnetic hysteresis [5]. elements. Although major AMS HDLs such as SystemC-A and VHDL-AMS are very powerful and flexible mixed physical II. SYSTEMC-A SYNTAX EXTENSION AND domain modeling tools, they face a challenge in modelling IMPLEMENTATION mixed-technology microsystem applications such as energy This section describes the new syntax of SystemC-A with harvesting systems and MEMS sensors. This is because current which users can define PDEs. HDLs only support ODAEs modelling. This limits accurate The abstract base class for PDEs is derived from the modelling of systems with distributed effects (mechanical [6], existing SystemC-A abstract base class sc a component. Both electromagnetic(EM) [7], thermal [8], [9], etc.) which can PDEs and their boundary conditions are generated from the not be neglected and may even play vital roles. Thus an new abstract base classes sc a P DE base in the proposed implementation of PDEs in major HDLs is in demand. Some extension. This new abstract base class also inherits the virtual attempts have already been made to implement PDEs within build method which is invoked by the SystemC-A analogue the existing limits of major AMS-HDLs [10], [11], [8]. Among kernel at each time step to build the system matrix from them, a proposal for syntax extension for VHDL-AMS(named contributions of all the components. A sample component class hierarchy with PDE extension is shown in Fig.1. The 978-3-9810801-7-9/DATE11/⃝c 2011 EDAA mechanical component in this example includes user defined Abstract component base class sc_a_component ...... Circuit level User defined components component ...... ...... Voltage Mechanical sc_a_capacitor sc_a_resistor Compensator Loop filter sources model ...... ...... ...... ...... ...... Abstract PDE base class PDEs with boundary sc_a_voltageS_square sc_a_voltageS_sin sc_a_PDE_base conditions for mechanics ...... ...... ...... Fig. 1. SystemC-A component hierarchy with PDE extensions. PDEs and associated boundary conditions which are derived A. Spatial Coordinate and Partial Quantity from the PDE base class. Currently, in SystemC-A, three types of analogue system A finite difference approach is used to discretize the PDEs variables ( node, flow, quantity), which are derived from an with respect to spatial variables and leave the time derivatives abstract base class called sc a system variable, are defined. In unchanged. Consequently, PDEs are converted to a series the proposed PDEs extension, a new type of system variable of ODEs which can be handled by the existing SystemC-A (Partial Quantity), which is also derived from the abstract base analogue solver. The modelling flow in SystemC-A with PDE class, is defined as illustrated in Fig.3. extensions is shown in the Fig.2. The method P DE coordinate Declaration() is used for The following example of a simple one dimensional PDE partial quantity definition and spatial coordinate declaration. demonstrates the new syntax: Multiple coordinate declarations will form a hypercube in the @Q(x; t) @Q(x; t) multi-dimensional space. As shown in the example code, the + A = B (1) spatial coordinate ”x” with the range R is divided into N node @x @t segments and the partial quantity ”Q” is discretized and Let the boundary condition be: defined inside the function in array format and discretization @M+N Q(x; t) = C; (2) step size dx(R/N node) is returned. @xM @tN The method P DE Quantity() is used to where Q(x; t) is the partial quantity of interest, A is the read a value of a particular partial quantity. For parameter, B is the excitation, C is the right hand side value example,P DE Quantity("Q"; x) returns the value of of the boundary condition equation, x is a spatial variable and Partial Quantity Q at node x. This function’s counterpart t is time. The boundary condition is defined in Eq.2. in SystemC-A is X() which reads the value of a quantity. The extended SystemC-A code for this example is: Similar to the differentiator (Xdot()) and integrator (INT EG()) operators which can be performed on ordinary sc a PDE example :: sc a PDE example f quantities, the new methods (P DE Quantity dot() and sc a PDE base ( "PDE_example")f P DE Quantity INIEG()) allow performing these two PDE C o o r d i n a t e Declaration( "Q" ,"x" ,R, operators on partial quantities. N node , dx ) ; g B. Partial Derivatives g If ”Q” is a partial quantity, the function Pdx(N,”Q”,x) repre- void sc a PDE example :: Build f sents the derivative of ”Q” with respect to spatial coordinative Pdxdt Boundary(M,N, "Q" , x , C ) ; at position x. N is an integral number which represents the f o r ( x =1; x<=N node ; x ++) derivative order. For example, Pdx(4,”Q”,x) represents the 4th f 4 order partial derivative @ Q . A partial quantity can also have a PDE( x,−Pdx ( 1 , "Q" , x)−A∗ Pdt ( 1 , "Q" , x )+B ) ; @x4 g derivative with respect to time, using the attribute dt, so item 5 g @Q Pdxdt(3,2,”Q”,x) represents @3x@2t . Start above, M and N determine the order of derivative with respect to coordinate x and time t, x is the specified position Initialization phase where the conditions should apply and C is the right hand side value of the boundary condition equation. As an example, Start Simulation P dxdt Boundary(1; 0; "Q"; 100:0; 0:0) represents the first sc_strat() order derivative of Q at the user specified spatial boundary (x=100.0) is equal to 0.0. Initialize Newton iteration D. PDE Formulation Method Function PDE() realizes the automatic equation formulation Scan component and PDE list to build of the PDEs to be modelled. This function is required to be J & RHS implemented in a ”for” loop and the number of loops deter- mined by the number of segments(N node). After providing D Solve J x=RHS using LU method the RHS vector will be provided in the 2nd term of the PDE() function, Jacobian matrix will be automated generated using Update solution a secant finite difference approximation which is defined in D Xn=Xn-1+ X terms of system RHS(fi(xj)) and a scalar ∆x: No @f f (x + ∆x ) − f (x ) Convergence? J = i = i j j i j (3) ij @x ∆x Yes j j Threshold No Finally, the function matrix is solved in the embedded crocessing? No Yes SystemC-A analog solver. Next event time? III. EXAMPLE:DISTRIBUTED MEMS ACCELEROMETER * WITH Σ∆ CONTROL LOOP Digital Process ... ... Digital Process A single axis lateral capacitive MEMS accelerometer with a Σ∆ control loop is used as an example to illustrate the SystemC-A syntax extension. Fig.4 shows the block diagram Yes Analog Delta cycle? of this system.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-