ArticleslgStudy

science

SystemC AMS

SystemC AMS is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SystemC AMS rather than just read about it. In short: SystemC AMS is an extension to SystemC for analog, mixed-signal and RF functionality. The SystemC AMS 2.0 standard was released on April 6, 2016 as IEEE Std 1666.1-2016.

Key takeaways

  • SystemC AMS belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SystemC AMS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SystemC AMS from memory before moving on to harder problems.

Reference excerpt

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

Language specification

Language features

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

Example code

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

linear transfer function:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with SystemC AMS

Start with the simplest possible case. Write down what SystemC AMS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SystemC AMS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SystemC AMS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SystemC AMS

In research
SystemC AMS appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SystemC AMS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SystemC AMS is common in secondary-school and first-year university syllabi. It links to neighbouring topics Hardware description languages, Hardware verification languages, System description languages, so understanding it makes those chapters shorter.
In everyday life
Look for SystemC AMS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study SystemC AMS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SystemC AMS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SystemC AMS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SystemC AMS in simple terms?

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

Why does SystemC AMS matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SystemC AMS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SystemC AMS.

Tags

  • Hardware description languages
  • Hardware verification languages
  • System description languages

Keep exploring