SystemC AMS

Last updated

SystemC AMS is an extension to SystemC for analog, mixed-signal and RF functionality. [1] The SystemC AMS 2.0 standard was released on April 6, 2016 as IEEE Std 1666.1-2016.

Contents

Language specification

 ToDo: description

Language features

 ToDo: description

MoC - Model of Computation

A model of computation (MoC) is a set of rules defining the behavior and interaction between SystemC AMS primitive modules. SystemC AMS defines the following models of computation: timed data flow (TDF), linear signal flow (LSF) and electrical linear networks (ELN).

TDF - Timed Data Flow

In the timed data flow (TDF) model, components exchange analogue values with each other on a periodic basis at a chosen sampling rate, such as every 10 microseconds. By the sampling theorem, this would be sufficient to convey signals of up to 50 MHz bandwidth without aliasing artefacts. A TDF model defines a method called `processing()' that is invoked at the appropriate rate as simulation time advances. A so-called cluster of models share a static schedule of when they should communicate. This sets the relative ordering of the calls to the processing() methods of each TDF instance in the cluster. The periodic behaviour of TDF allows it to operate independently of the main SystemC event-driven kernel used for digital logic.

ELN - Electrical Linear Networks

The SystemC electrical linear networks (ELN) library provides a set of standard electrical components that enable SPICE-like simulations to be run. The three basic components, resistors, capacitors and inductors are, of course, available. Further voltage-controlled variants, such as a transconductance amplifier (voltage-controlled current generator) enable most FET and other semiconductor models to be readily created.

Current flowing in ELN networks of resistors can be solved with a suitable simultaneous equation solver. These are called the nodal equations. Where time-varying components, such as capacitors and inductors are included, Euler's method is typically implemented to model them. Euler's method is a simple approach to solving finite-difference time-domain (FDTD) problems. For instance, to simulate the capacitor charge problem on the left below, a timestep delta\_t is selected that is typically about one percent of the time constant and the iteration on the bottom right is executed.

The error in Euler's method decreases quadratically with smaller time steps, but an overly-small time step results in a slow simulation for a complex finite-element simulation. But this is not a problem in many situations where part of a complex SoC or plant controller is run alongside a plant model that has just a few state variables, such as the car transmission system because there are orders of magnitude difference in time constants (e.g. 100 MHz clock versus 1~ms shortest inertial time constant). Simulating the analogue subsystem inside the RTL simulator then makes sense. Moreover, most plant control situations use closed-loop negative feedback with the controller being just as good at managing a slightly errored plant model as the real model.

Under the ELN formalism, the SystemC initialisation and simulation cycles are extended to support solving nodal flow equations. Nodal equation solving is generally solved iteratively rather than using direct methods such as Gaussian Elimination or based on matrix inverses. Iterative methods tend to have greater stability and are fast when the state has only advanced slightly from the previous time step. When the kernel de-queues a time-advancing event from the event queue, the simulation time is advanced. The analogue part of the simulator maintains a time quantum beyond which the nodal equations need to be re-computed. This quantum is dynamically adjusted depending on the behaviour of the equations. If the equations are `bendy', meaning that linear extrapolation using Euler's method over the quantum will lead to too much error, the time step is reduced, otherwise it can be gradually enlarged at each step. Overall, two forms of iteration are needed: the first is iteration at a time step to solve the nodal equations to a sufficient accuracy. The second is between time steps. In a simple implementation, once simulation time has advanced beyond the Euler quantum, the analogue sub-system is re-solved. If the extrapolation errors are too great, the simulator must go back to the last time step and simulate forward again using a smaller analogue quantum. This mechanism is also the basis for SPICE simulations. Each analogue variable that is the argument to a `cross', or other analogue sensitivity, is then examined to see if new digital domain work has been triggered. If so, new events are injected on the discrete event queue for the current simulation time.

LSF - Linear Signal Flow

The SystemC linear signal flow (LSF) library provides a set of primitive analogue operators, such as adders and differentiators that enable all basic structures found in differential equations to be constructed in a self-documenting and executable form. The advantage of constructing the system from a standard operator library is that `reflection' is possible: other code can analyse the structure and perform analytic differentiation, summation, integration and other forms of analysis, such as sensitivity analysis to determine a good time step. This would not be possible for an implementation using ad-hoc coding. In general programming, reflection refers to a program being able to read its own source code.

Ports

TDF in/outport definition:

 sca_tdf::sca_in<PortType>  sca_tdf::sca_out<PortType>

TDF converter in/outport definition:

 sca_tdf::sc_in<PortType>  // DE → TDF inport  sca_tdf::sc_out<PortType> // TDF → DE outport

ELN terminal definition:

 sca_eln::sca_terminal

Nodes

 sca_eln::sca_node         // ELN node  sca_eln::sca_node_ref     // ELN reference node

Cluster

 ToDo: description

Tracing

sca_trace_file*tf=sca_create_tabular_trace_file("trace_file_name.dat");sca_trace(tf,<PORT|SIGNAL|NODE>,"name");

Example code

TDF

Timed-Data-Flow 1st order low pass model:

#include<systemc-ams>usingnamespacesca_util;// introduced for convenience: sca_util::sca_vector<TYPE> → sca_vector<TYPE>usingnamespacesca_core;// introduced for convenience: sca_core::sca_time() → sca_time()usingnamespacesca_ac_analysis;// introduced for convenience: sca_ac_analysis::sca_ac() → sca_ac()SCA_TDF_MODULE(tdf_low_pass){// TDF portssca_tdf::sca_in<double>inp;sca_tdf::sca_out<double>outp;// parametersdoublefcut;// cut-off frequency// methodsvoidinitialize();// simulator callback for initialization purposevoidac_processing();// simulator callback for AC behavior implementationvoidprocessing();// simulator callback for time implementation// constructorSCA_CTOR(tdf_low_pass){fcut=1.0e3;// cut-off frequency 1kHz}private:sca_vector<double>num;// numerator coefficientssca_vector<double>den;// de-numerator coefficientssca_vector<double>state;// state vectorsca_tdf::sca_ltf_ndltf_nd;// linear transfer function (numerator/de-numerator type)};

linear transfer function:

// initialize linear transfer function coefficientsvoidtdf_low_pass::initialize(){num(0)=1.0;den(0)=1.0;den(1)=1.0/(2.0*M_PI*fcut);}

ToDo: description

// AC implementationvoidtdf_low_pass::ac_processing(){sca_ac(outp)=sca_ac_ltf_nd(num,den,sca_ac(inp));}

ToDo: description

// time domain implementationvoidtdf_low_pass::processing(){outp=ltf_nd(num,den,state,inp);}

ELN

Electrical-Linear-Networks 1st order low pass netlist:

SC_MODULE(eln_low_pass_netlist){// sca eln terminalssca_eln::sca_terminaln1;sca_eln::sca_terminaln2;// internal nodessca_eln::sca_node_refgnd;// eln modulessca_eln::sca_ri_r;sca_eln::sca_ci_c;SC_CTOR(eln_low_pass_netlist):i_r("i_r"),i_c("i_c"){i_r.value=1.0;i_r.p.bind(n1);i_r.n.bind(n2);i_c.value=1.0/(2.0*M_PI*1.0e3);i_c.p.bind(n2);i_c.n.bind(gnd);}};

LSF

Linear-Signal-Flow netlist:

History

SystemC AMS study group was founded in 2002 to develop and maintain analog and mixed-signal extensions to SystemC, and to initiate an OSCI (Open SystemC initiative) SystemC-AMS working group. The study group has made initial investigations and specified and implemented a SystemC extension to demonstrate feasibility of the approach. In 2006, a SystemC AMS working group has been funded which continued the work of the study group inside OSCI, and now goes on to work on SystemC AMS within the Accellera Systems Initiative, resulting in the AMS 1.0 standard in 2010. After the release of the Accellera SystemC AMS 2.0 standard in 2013, the standard was transferred to the IEEE Standards Association in 2014 for further industry adoption and maintenance. The SystemC AMS standard was released April 6, 2016 as IEEE Std 1666.1-2016. [2] [3] COSEDA Technologies provides with COSIDE the first commercially available design environment based on SystemC AMS standard.

Related Research Articles

Electrical network Assemblage of connected electrical elements

An electrical network is an interconnection of electrical components or a model of such an interconnection, consisting of electrical elements. An electrical circuit is a network consisting of a closed loop, giving a return path for the current. Linear electrical networks, a special type consisting only of sources, linear lumped elements, and linear distributed elements, have the property that signals are linearly superimposable. They are thus more easily analyzed, using powerful frequency domain methods such as Laplace transforms, to determine DC response, AC response, and transient response.

In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, and most commonly, digital logic circuits.

SPICE is a general-purpose, open-source analog electronic circuit simulator. It is a program used in integrated circuit and board-level design to check the integrity of circuit designs and to predict circuit behavior.

Computational fluid dynamics Branch of fluid mechanics that uses numerical analysis and data structures to solve and analyze problems that involve fluid flows

Computational fluid dynamics (CFD) is a branch of fluid mechanics that uses numerical analysis and data structures to analyze and solve problems that involve fluid flows. Computers are used to perform the calculations required to simulate the free-stream flow of the fluid, and the interaction of the fluid with surfaces defined by boundary conditions. With high-speed supercomputers, better solutions can be achieved, and are often required to solve the largest and most complex problems. Ongoing research yields software that improves the accuracy and speed of complex simulation scenarios such as transonic or turbulent flows. Initial validation of such software is typically performed using experimental apparatus such as wind tunnels. In addition, previously performed analytical or empirical analysis of a particular problem can be used for comparison. A final validation is often performed using full-scale testing, such as flight tests.

A network, in the context of electrical engineering and electronics, is a collection of interconnected components. Network analysis is the process of finding the voltages across, and the currents through, all network components. There are many techniques for calculating these values. However, for the most part, the techniques assume linear components. Except where stated, the methods described in this article are applicable only to linear network analysis.

SystemC is a set of C++ classes and macros which provide an event-driven simulation interface. These facilities enable a designer to simulate concurrent processes, each described using plain C++ syntax. SystemC processes can communicate in a simulated real-time environment, using signals of all the datatypes offered by C++, some additional ones offered by the SystemC library, as well as user defined. In certain respects, SystemC deliberately mimics the hardware description languages VHDL and Verilog, but is more aptly described as a system-level modeling language.

Small-signal modeling is a common analysis technique in electronics engineering used to approximate the behavior of electronic circuits containing nonlinear devices with linear equations. It is applicable to electronic circuits in which the AC signals are small relative to the DC bias currents and voltages. A small-signal model is an AC equivalent circuit in which the nonlinear circuit elements are replaced by linear elements whose values are given by the first-order (linear) approximation of their characteristic curve near the bias point.

OrCAD Electronic design automation software

OrCAD Systems Corporation was a software company that made OrCAD, a proprietary software tool suite used primarily for electronic design automation (EDA). The software is used mainly by electronic design engineers and electronic technicians to create electronic schematics, perform mixed-signal simulation and electronic prints for manufacturing printed circuit boards. OrCAD was taken over by Cadence Design Systems in 1999 and was integrated with Cadence Allegro since 2005.

Ngspice is a mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE, version 3f.5, which was released in 1993. A small group of maintainers and the user community contribute to the ngspice project by providing new features, enhancements and bug fixes.

Crash simulation

A crash simulation is a virtual recreation of a destructive crash test of a car or a highway guard rail system using a computer simulation in order to examine the level of safety of the car and its occupants. Crash simulations are used by automakers during computer-aided engineering (CAE) analysis for crashworthiness in the computer-aided design (CAD) process of modelling new cars. During a crash simulation, the kinetic energy, or energy of motion, that a vehicle has before the impact is transformed into deformation energy, mostly by plastic deformation (plasticity) of the car body material, at the end of the impact.

Quite Universal Circuit Simulator

Quite Universal Circuit Simulator (Qucs) is a free-software electronics circuit simulator software application released under GPL. It offers the ability to set up a circuit with a graphical user interface and simulate the large-signal, small-signal and noise behaviour of the circuit. Pure digital simulations are also supported using VHDL and/or Verilog.

Verilog-AMS is a derivative of the Verilog hardware description language that includes analog and mixed-signal extensions (AMS) in order to define the behavior of analog and mixed-signal systems. It extends the event-based simulator loops of Verilog/SystemVerilog/VHDL, by a continuous-time simulator, which solves the differential equations in analog-domain. Both domains are coupled: analog events can trigger digital actions and vice versa.

Soft-body dynamics Computer graphics simulation of deformable objects

Soft-body dynamics is a field of computer graphics that focuses on visually realistic physical simulations of the motion and properties of deformable objects. The applications are mostly in video games and films. Unlike in simulation of rigid bodies, the shape of soft bodies can change, meaning that the relative distance of two points on the object is not fixed. While the relative distances of points are not fixed, the body is expected to retain its shape to some degree. The scope of soft body dynamics is quite broad, including simulation of soft organic materials such as muscle, fat, hair and vegetation, as well as other deformable materials such as clothing and fabric. Generally, these methods only provide visually plausible emulations rather than accurate scientific/engineering simulations, though there is some crossover with scientific methods, particularly in the case of finite element simulations. Several physics engines currently provide software for soft-body simulation.

Electronic circuit simulation

Electronic circuit simulation uses mathematical models to replicate the behavior of an actual electronic device or circuit. Simulation software allows for modeling of circuit operation and is an invaluable analysis tool. Due to its highly accurate modeling capability, many colleges and universities use this type of software for the teaching of electronics technician and electronics engineering programs. Electronics simulation software engages its users by integrating them into the learning experience. These kinds of interactions actively engage learners to analyze, synthesize, organize, and evaluate content and result in learners constructing their own knowledge.

A signal-flow graph or signal-flowgraph (SFG), invented by Claude Shannon, but often called a Mason graph after Samuel Jefferson Mason who coined the term, is a specialized flow graph, a directed graph in which nodes represent system variables, and branches represent functional connections between pairs of nodes. Thus, signal-flow graph theory builds on that of directed graphs, which includes as well that of oriented graphs. This mathematical theory of digraphs exists, of course, quite apart from its applications.

In electrical engineering, modified nodal analysis or MNA is an extension of nodal analysis which not only determines the circuit's node voltages, but also some branch currents. Modified nodal analysis was developed as a formalism to mitigate the difficulty of representing voltage-defined components in nodal analysis. It is one such formalism. Others, such as sparse tableau formulation, are equally general and related via matrix transformations.

Spectre is a SPICE-class circuit simulator owned and distributed by the software company Cadence Design Systems. It provides the basic SPICE analyses and component models. It also supports the Verilog-A modeling language. Spectre comes in enhanced versions that also support RF simulation (SpectreRF) and mixed-signal simulation.

Gas networks simulation or Gas Pipeline Simulation is a process of defining the mathematical model of gas transmission and gas distribution systems, which are usually composed of highly integrated pipe networks operating over a wide range of pressures. Simulation allows to predict the behaviour of gas network systems under different conditions. Such predictions can be effectively used to guide decisions regarding the design and operation of the real system.

In mathematics the discrete least squares meshless (DLSM) method is a meshless method based on the least squares concept. The method is based on the minimization of a least squares functional, defined as the weighted summation of the squared residual of the governing differential equation and its boundary conditions at nodal points used to discretize the domain and its boundaries.

The Scarborough criterion is used for satisfying convergence of a solution while solving linear equations using an iterative method.

References

  1. "SystemC AMS". accellera.org. Retrieved 2016-08-01.
  2. "SystemC AMS (Analog/Mixed-Signal)". accellera.org. Retrieved 2016-08-01.
  3. "SystemC-AMS and Design of Embedded Mixed-Signal Systems". www.systemc-ams.org. Retrieved 2016-08-01.