System Simulation:Reasons for System Simulation
Overview
System simulation means the simulation of very complex and often also heterogeneous systems.
To emphasize these aspects, sometimes it is called overall system simulation. In system simulation models at the higher abstraction levels are generally used. Of course, there are many modeling and simulation aspects in common with those de- scribed in the foregoing chapters 10 (Analog Simulation), 11 (Digital Simulation) and, most of all, 12 (Mixed-Signal Simulation). But there are also typical specialties, which led to the development of specialized system simulators.
Reasons for System Simulation
There is more than one reason for an overall sys- tem simulation. They are determined by the typical problems of the top-down and bottom-up oriented design style:
• In the top-down design, a verification or validation of the system specification is necessary. If it is possible to refine the specification in the first design step so that it can be simulated at an abstract level, we speak about an executable specification. Signal-processing algorithms de- scribed by formulas or block diagrams are typical examples. Only after a few more design steps will there be enough detailed information about the implementation so that circuit simulators can be used at gate or transistor level, see also fig. 12.1.
• In the bottom-up design transistor and gate counts often become so large that a circuit simulation at this level would take huge computational times (days or weeks). In the digital domain simulation accelerators (hardware accelerators) could be used, but usually they are very expensive. A widely used method is the development of more abstract models with reduced accuracy which is still sufficient for a system simulation.
• Independently of the applied bottom-up or top- down design methodology, the interactions of the system, which is to be designed, with its environment have to be analyzed together. For example, in the design of telecommunication modem circuits the data transfer between the subscribers over wires has to be considered, and in the design of micro-electro-mechanical systems (MEMS) the influence of external forces and temperatures has to be included in the sys- tem simulation.
It will not always be possible to divide a system description so clearly into different abstraction levels, as is described in fig. 12.1. But in such cases system simulation can also be understood as a multi-level simulation: models at lower and higher levels of abstraction are included into one simulation model and the simulator has to simulate them simultaneously.
Modeling for System Simulation
The most important requirement for carrying out a system simulation is a powerful multi-level, mixed- signal simulator [13.5], [13.66]. However, there exist some demands which should be satisfied:
• A large number of signal and data types: continuous-time, discrete-time, continuous- value, discrete-value; bit and character strings, abstract data types (see chap. 12) such as words and records.
• The possibility of describing the behavior of new system components (their models are not available in a library, yet) by the user.
• This behavioral modeling should be supported by a modeling language (Hardware Description Language, HDL), but, additionally, an interface to include C and C++ programs should be avail- able (Foreign Language Interface).
• The graphical front-end should accept block diagrams and circuit schematics and generate automatically a textual netlist. Buses and different data types (e.g., as element parameters) have to be supported. Ideally all the element types shown in fig. 12.1 should be available as models in a library.
Unfortunately the widely used simulators of the SPICE family (PSpice, HSpice, iSpice, ...) do not satisfy most of these demands. They can be used for system simulation only in very special cases. Much better are other simulators like Saber, ELDO, Spectre, and Smash, which are not so strongly focused on purely electrical circuit simulation. These simulators have some mixed-mode simulation capabilities, their libraries contain analog and digital models, and they have (proprietary) modeling languages for behavioral modeling. But these simulators have their roots in analog circuit simulation, and therefore the digital simulation capabilities are not very powerful compared with logic simulators (see chapter 11).
If a very efficient mixed-signal simulation is required, the coupling of different simulators may be recommended. Powerful analog simulators such as Saber or ELDO may be coupled with powerful logic simulators such as ModelSim, VSS or Verilog via special interface software. In this way the most powerful simulation algorithms of both domains may be combined. Another advantage is the direct usability of the analog and digital circuit descriptions (e.g., as simulator-specific netlists) which have not to be converted into the netlist formats of other simulators. There are also no problems with the compatibility of the model libraries of different simulators: each simulator uses its own input language and model library. This data consistency is extremely important in an industrial design flow.
In system simulation different modeling approaches may be used.
• Behavioral models: the behavior of the elements is described by mathematical formulas or tables. The notation may be carried out in the form of a program written in a universal programming language (FORTRAN, C, C++) or in a simulator-specific description language (HDL) such as Mast for Saber, HDL-A for ELDO, or SpectreHDL for Spectre. Behavioral models may be used at all levels of abstraction, from the specification level downwards to the transistor circuit level [13.3], [13.13], [13.21], [13.29], [13.48], [13.56].
• Structural models: a complex model results from the interconnection of simpler components. For these basic components simulator- internal models (the so-called primitives) exist. Such basic components are, e.g., resistors, capacitors, inductors, or different types of con- trolled sources. In the SPICE world this type of modeling is often called macromodeling [13.9], [13.20]. While older simulators only support this type of modeling, modern simulators permit additionally a behavioral description formulated by the user. A mixed structural and behavioral description is particularly efficient: the system is modeled by the interconnection of subsystems which are modeled by behavioral descriptions or, hierarchically, by the interconnection of other basic elements [13.24].
Particularly for analog systems a further distinction between basic properties of physical effects and their transformation into models is important. Physical systems may be classified [13.40], [13.58], [13.76] into:
• Conservative systems: their system quanti- ties are flow quantities and difference quantities (e.g., in electronics: currents and voltages);
• Non-conservative systems: consisting of in- terconnected elements with inputs and outputs, only one type of quantity (signals), and mostly a directed signal flow.
A flow quantity (a through quantity) is measured at one point of the physical system (e.g., an elec- trical current or a hydraulic flow). A difference quantity (an across quantity) is measured between two points, e.g., a mechanical displacement or an electrical voltage. In table 13.1 some of the most important flow and difference quantities are shown. These concepts will be discussed more detailed in section 13.3.
The term conservative physical systems is motivated by compatibility constraints for flow as well as difference quantities being valid. In electrical systems these constraints are the well-known Kirchhoff’s current law and voltage law. Similar conservation laws for flow and difference quantities also hold in many other physical domains.
This fact can be reflected in different classes of system models: conservative system models with conservative signals (flow and difference signals) and non-conservative systems (with non- conservative signals). We use the term signal as a model of all kinds of physical quantities which are able to exchange energy or information between the subsystems. We will use the term network to describe a system model consisting of elements, connections between these elements, and conservative signals. To stress that these networks are models of physical systems in different domains, sometimes the term generalized Kirchhoffian net- work is used [13.73].
Non-conservative systems only have one type of signal and there are no conservation laws for these signals. Block diagram descriptions of control or communication systems as well as signal flow graphs are the well-known examples. If the equations describing the system behavior are known the construction of an equivalent block diagram or a signal flow graph is very simple. Vice versa, setting up the system equations from a block diagram description is a relatively easy task because } of the directed signal flow in all elements and the } absence of any reverse interactions between the interconnected elements. Equation-oriented simulators such as Matlab/Simulink or MatrixX are very popular for the analysis of non-conservative systems.
For conservative systems the formulation of mathematical equations is substantially more difficult, especially if one is interested in as small as possible a number of system variables (state equations, state-space description). Therefore the manual setup of system equations for an equation- oriented simulator is extremely cumbersome and can not be recommended. Instead, specialized simulators, oriented towards conservative systems, should be used. The system description usually consists of a description of interconnected subsystems and elements: textually as a netlist, graphically as a circuit diagram. It is the task of the input processor of such a simulator to transform this structural system description into a system of non- linear differential-algebraic equations (DAEs). During the simulation the DAE system is solved numerically in the simulator.
These different modeling possibilities will be illustrated by means of the simple example of a vibrating system (a damped oscillator). If the final implementation of this system is not yet defined we start with a mathematical description, a differential equation of second order:
Without dealing with further details, it is briefly mentioned that the model description – starting with the keyword template – contains an interface description and an internal part (which is not necessarily visible from the outside). The behavioral description is formulated in a way which is very similar to mathematical expressions.
But also with structural models the system can be described. In fig. 13.1 are shown:
• a block diagram for Matlab/Simulink;
• an electrical circuit for the simulation, e.g., with Spice.
In the electrical circuit the input signal y is realized as a current source iinp, whereas the output signal x corresponds to the voltage at the node 1.
From these examples it is also evident that one can select a conservative or a non-conservative model for the description of an abstract system. However, for the modeling of the system realized one should select this type of model, which corresponds best to the nature of the most essential physical quantities, e.g., choose an electrical circuit, or a block diagram, or a mechanical network as the most appropriate model type.
From these few remarks on mixed-signal simulation at system level it is evident that the present possibilities for system modeling and simulation, the number of available simulators and proprietary modeling languages lead to a confusing variety. Also the practical handling of the simulator coupling is sometimes difficult. These are the reasons for the on-going standardization efforts for mixed-signal modeling languages, which include also the system level (see section 13.1.4). These standardized modeling languages are increasingly sup- ported by powerful mixed-signal, multi-domain simulators.
Overview of System Simulators
Just the various applications of the system simulation do not allow the application of ‘the one system simulator’. Rather the nature of the technical sys- tem which has to be simulated and the possibilities of its modeling does influence the selection of the system simulator crucially. The following list gives a small, far from complete outline of efficient simulators.
The graphical input description capabilities mainly refer to block diagrams with a directed signal flow, as they are used, e.g., in control engineering and with data processing algorithms, see also fig. 13.1a). These simulators are particularly well suit- able for non-conservative systems, for which the differential equations can be set up comparatively simple [13.10], [13.41]. Implicit differential equa- tion systems and algebraic dependencies which are usual within conservative systems are difficult to be handled with these simulators.
General discrete systems
The signals are usually defined as discrete-value and discrete-time.
• GPSS, Simscript, SIMPLE++: Discrete Event simulators with queues and other models commonly used in queuing theory [13.8];
• Statechart oriented simulators: they use generalized automaton models; the states and the signal conditions under which transitions between the states occur are graphically described (e.g., with the simulator Renoir [13.51]);
• Petri net simulators: for simple, colored, timed and other Petri net classes [13.44];
• Ptolemy: an object-oriented simulation frame- work, in the research stage [13.12].
These simulators are not only used in electron- ics, but mainly in the analysis of communication, logistics, and production systems. An important application field is the performance evaluation (performance analysis) on the basis of simulations [13.8]. Basically also logic simulators, which are widely used in digital electronics, are quite suitable for the simulation of general discrete systems.
Analog circuit simulators
They were first developed for the analysis of electrical circuits. Newer simulators have modeling capabilities with behavioral description languages (MAST, ...) and are very well suitable for other, also non-electrical, systems:
The widely used simulators of the SPICE family unfortunately have no behavioral modeling languages and new models can be only introduced by the construction of equivalent circuits (macro- modeling). For some SPICE versions one can formulate at least simple equations as the behavioral description of new elements.
Digital circuit simulators
Primarily developed for digital circuits, described at gate level, these simulators have been very powerful also at the register transfer and system level by their extension with efficient hardware model- ing languages such as VHDL and VerilogHDL:
Special operation modes, e.g., cycle-based simulation, or restriction to the simulation above the gate level (e.g., instruction set simulation) lead to substantial increases of the simulation speed and allow an efficient system simulation.
Some of the above-mentioned simulators for continuous or analog systems were extended to mixed- signal simulators:
• Saber and ELDO: analog networks and small digital systems modeled by digital basic elements and behavioral descriptions which are not too complicated;
• Matlab: addition of a State chart simulator State flow.
All three simulators, however, do not use the standardized languages VHDL or Verilog HDL for the digital subsystems. Therefore the coupling of analog circuit simulators with VHDL or Verilog simulators is more efficient.
The modeling and simulation approaches de- scribed, on the one hand, are basically suitable for very different systems of electronics, computer and control engineering, as well as communication technology. On the other hand, this general applicability leads to
• not all relevant questions being able to be effectively be processed (e.g., in communications technology);
• a substantial modeling effort has to be spent (e.g., in microelectronics, mechatronics and again in communications technology).
These two aspects are discussed more exactly in the following sections 13.2 and 13.3.
A Perspective: VHDL-AMS
VHDL has been established world-wide (just like Verilog HDL) as a digital specification and modeling language – not least because of the standardization by IEEE, the development of efficient simulators, and the definition of a synthesizeable language subset. Many of the above-mentioned
demands from the view of system simulation are already satisfied by this language. The insufficient handling of the analog, continuous-time and continuous-value signals and elements must be seen, however, as a substantial lack. It was consequent to extend the digital VHDL to analog and mixed-signal systems: VHDL-AMS (similar extensions were defined also for VerilogHDL). The IEEE standardization of VHDL-AMS was finished in 1999 [13.72], the first VHDL-AMS simulators were launched in the last three years. They al- ready support a large extent of the new language [13.2], [13.51], [13.64], [13.67]. Thus the variety of modeling languages for system simulation will be drastically reduced, as soon as more and more simulators support this language in the future. For a systematic design, however, not only standardized modeling languages and simulation possibilities are important, but also their embedding in the design flow. Present design systems support VHDL and SPICE transistor netlists perfectly, but the variety of proprietary mixed-signal description languages could not be included in the same way. Only standardized languages like VHDL-AMS give the chance to integrate the system simulation seamless into a top-down design flow.
Without dealing with VHDL-AMS in detail [13.19], [13.33], [13.72], [13.77], [13.79], [13.80], some substantial concepts are to be presented here, nevertheless, briefly. VHDL-AMS is a strict superset of VHDL, i.e., all constructs of the digital VHDL are available and are also needed in mixed-signal simulation. For the description of analog components some semantic extensions of the existing concepts were defined:
• ENTITY: Interface description: the port list can contain also conservative and non-conservative terminals carrying continuous signals.
• ARCHITECTURE: Quantities, terminals, nature declaration, and simultaneous statements are new parts of the body of an architecture description. Some attributes for discrete-time and continuous-time signals are defined.
• CONFIGURATION: This basic concept of VHDL can also be used in VHDL-AMS for the selection of one of the various architecture bodies corresponding to an entity.
• LIBRARY: Collection of frequently used declarations of types; pre-defined functions (contained in Packages) and models.
Additionally some new constructs were introduced to describe further port types, objects, and data types, as well as new types of statements. To the most important ones there belong:
• TERMINAL: Ports carrying conservative quantities (through and across quantities, e.g., cur- rents and voltages in electronics). Terminal ports can be defined as being of an electrical, thermal, kinematic, . . . nature. Internal nodes of an element can be declared with a terminal statement.
• NATURE: Natures represent physical domains (comp. table 13.1). Terminals and conservative quantity types are defined by the NATURE statement. Types of through quantity and across quantity at conservative clamps are determined with ACROSS and THROUGH. Additionally, the reference node (REFERENCE), belonging to a terminal type, is defined.
• QUANTITY: Non-conservative ports (to de- scribe a directed signal flow in block diagrams), distinguished between the signal directions IN and OUT.
• free QUANTITY: Additional internal quantities (states);
• branch QUANTITY: Branch definition by the specification of the start and the end node as well as the through and across quantities of the branch.
• ==: With this symbol an equality relationship is introduced:
left side == right side of the equation. It is not an assignment but an implicit equation which has to be solved numerically. The equation is shifted to the DAE solver of the simulator. The unknown quantities in the equation (the simultaneous statement) are calculated independently of whether they occur on the left or on the right side or on both.
• PROCEDURAL: All statements in a procedural block are executed sequentially;
• DOT: Attribute for the temporal derivative d /dt
(identifier): identifier ’DOT;
• LIMIT: Step size limitation in the analog simulation by numerical integration;
• BREAK: Handling of discontinuities in the analog simulator.
A simple example (a linear resistor with the terminals p1 and p2 and the resistance value value_r)
For a linear capacitor essentially only the voltage- current relationship is to be formulated newly, whereby the temporal derivative d/ dt is ex- pressed with the DOT attribute. Additionally, a given initial value vc0 of the capacitor voltage can be used or this initial value is calculated as the DC bias point by the simulator. If no parameter value vc0 is given, the simulator uses the smallest real number (REAL’LOW) and detects by it that vc0 has to be calculated statically (the current through the capacitor has to be zero).
Additionally, in the IEEE standard the principal time-domain, mixed-signal simulation cycle is de- fined (fig. 13.2). The knowledge of this simulation cycle is important in the construction of mixed- signal models, particularly in the modeling of the interfaces between analog and digital subsystems and during the initial value calculation.
Figure 13.3 shows a system frequently used in electronics: a sigma-delta converter. The digital signal at the output of the comparator (an A/D converter) is fed back into the analog circuit section over a D/A converter, which generates an analog electrical signal.
The VHDL-AMS models of the two converters are:
For the consideration of delays and finite signal slopes in the D/A converter, the language element AFTER is used in the digital sub-model and the attribute RAMP in the analog sub-model. In the model of the A/D converter the attribute ABOVE(threshold) is applied to the analog signal v1 to produce an event for the digital simulator, which influences the digital simulation.
Even if these examples were only small, nevertheless they give an impression of the power of the new modeling language, e.g.:
• clear model structure (separation of the inter- face from the core of the model): ENTITY and ARCHITECTURE;
• notation of the behavioral description in equation-like manner;
• mixture of structural and behavioral descriptions at different abstraction and modeling levels;
• use of the simulator’s equation solver also for the handling of equations in the model;
• clearly defined interactions between analog and digital simulation algorithms (mixed-signal simulation cycle).
Further supplements with respect to the digital VHDL concern the analysis in the frequency do- main (small-signal AC analysis), the bias point calculation (DC analysis), and the noise analysis. VHDL-AMS is thus not limited to the modeling for transient simulation. All of these advantages make VHDL-AMS not only interesting for the mixed-signal circuit simulation but also for the system simulation.
Comments
Post a Comment