Defining Simulation Control Classes

A simulation control class defines how the simulator is invoked and executed. There are two types of simulation controls supported by SansGUI:

The two types of simulation controls are not mutually exclusive. You can decide to provide simulators for both of them, so that the users can run the simulator either in a highly interactive session or as a long process during off-hours. For more details and semantics behind the simulator controls, please consult the SansGUI Simulation Control chapter in the SansGUI Reference Manual.

Creating Simulation Control Classes

To indicate which simulation control mechanism to use, all one has to do is to create a subclass from one of the intrinsic simulation control classes. To create the simulation control subclass:

Simulator Version Control

The version number of the simulation control class that you created decides the version number of the simulator. Each time you build an Object Library, the version number of the simulation control will be incremented according to the operation you chose. Unlike the version numbers of other classes, which will be incremented only when there is a change in the class schema, the version number of the simulation control class will always be incremented during the Object Library generation process. Your simulator's version number should be synchronized with the version number of the simulation control class in the generated Object Library. The Class Schema Version Control mechanism is described with further details in Chapter 1.

Entering Global Attributes

In addition to the attributes inherited from the intrinsic simulation control class, you can add a custom set of attributes to your simulation control class. Because the data object of the simulation control class will be passed as a parameter in each of the SansGUI API calls during run time, it is possible to access and update the data values in it when evaluating all system objects and parts. Thus, the attributes in the simulation control class can be treated as global variables. Similar to other programming practices, you should limit the use of global variables to as few as possible.

Entering global attributes to the simulation control class is actually the same as entering attributes to all other classes. See the Adding Attributes to Classes section for more details.


C:\FH_Suite\htmlgifs\home.gif Accessing Class Properties Adding Unit Objects

SansGUI Modeling and Simulation Environment Version 1.2

Copyright 2000-2003 ProtoDesign, Inc. All rights reserved.