This section describes user controls for executing tightly coupled, in-process simulators. There is also a Running External Process Simulation section in this manual for executing external process simulators. Whether your simulator is in-process or external depends on the decision made by its developer. You can examine the simulation control (SimControl) objects to see if either is available, or both. SansGUI currently uses Cycle simulation control objects for in-process simulation and XProc simulation control objects for external process simulation. If you have a Default object created for the SimControl.Cycle derived class, verified through the Tree View under the Object tab in the left pane, the in-process simulator is available to you. Similarly, if you have a Default object created for the SimControl.XProc class, you need to go to the next section to run it externally.
If you want simulation results to be logged, you need to go through the procedures stated in the Setting Up Result Log section before running the simulation.
To start the in-process simulator, click on the Run In-Process button (a right pointed triangle like the play button in a CD player) in the Run toolbar. After clicking on the button, the trace of the simulation run will be shown in the Operation View in the bottom pane. If you have selected attributes for value logging, the results will be displayed in the Result View. If there are any messages issued by the simulator, they will be logged in the Message View. All the views are in the bottom pane with separate tabs. You can switch to a different tab while the simulation is running.
To stop the simulation, click on the Stop button in the Run toolbar. The simulation will be terminated as soon as possible. SansGUI will call the end simulation run routines to allow the simulator to clean up the simulation and release resources. In very rare occasions, you may want to bypass the end run routines and stop the simulation immediately. You can select Tools>Terminate Simulation from the pull-down menu; however, please use this option with great care. You cannot continue to execute a terminated simulation reliably. If you need to suspend the simulation and continue to run it later, use the Pause/Resume mechanism described next.
You can pause a simulation, while it is running, by clicking on the Pause/Resume button in the Run toolbar. A # Simulation PAUSED message will be displayed in the Operation View and the Pause/Resume button will be shown depressed. Clicking on the button again will resume the simulation run.
One useful feature in the SansGUI environment is that it allows the user to monitor and change the values when the simulation is paused. As in part, link, or object data entry using the associated Properties dialog, the editing facility is available for value examination and modification when paused. The only difference is that you are editing the part, link, or object directly, rather than a copy of it. Therefore, there is only an OK button but no Cancel button in the Properties dialog. You can use the Grid View in the right pane to modify the data directly.
When you click on the Pause button, SansGUI suspend the execution thread immediately. At this time, the simulator routine may still be executed within a particular part or object. When this situation occurs, SansGUI locks the adjacent parts, links, and reference objects related to the part or object being executed while allowing the user to change the values of unrelated parts, links, and objects. The locked fields have the same background color as the tooltips registered under Windows and the editable ones will have a white background.
The single step and fast forward operations, to be described next, are available only when the simulation is paused.
While the simulation is paused, clicking on the Single Step button in the Run toolbar will advance the simulation in one step, which means:
In a cycle-driven simulation, it will advance the number of cycles specified in the Cycle Increment attribute of the Default simulation control object.
While the simulation is paused, clicking on the Fast Forward button in the Run toolbar will advance the simulation in the following manner:
In a cycle-driven simulation, it will advance the number of cycles calculated by multiplying the Cycle Increment and the Screen Refresh Interval (when not zero). More details can be found in the Simulation Control Objects section in Chapter 1.
During the simulation, the values of attributes with In/Out, Output, Port scopes and all array attributes (they are with In/Out scope) may be modified. If you run the simulation again immediately, the initial values may be different. Especially, when parts and links have values changed from their derived objects, all the new values are stored as overriding values. Therefore, to reset the values for the next run, you need to be aware of the following:
Simulation Control Object: In the Default simulation control object, the Current Cycle Number does not need to be reset because SansGUI will do it automatically. There may be global attributes, defined by the simulation developer, that require initialization. Consult your simulator documentation for details.
Overriding Values: You need to remove the overriding values from parts and links created during the simulation. You can clear all overriding values by selecting the Edit>Clear Override Values menu item from the pull-down menu. You must notice that this operation will clear all the overriding values from all parts and links with two exceptions: 1) it will not clear overriding values in the attributes with Input scope and 2) it will not clear overriding values of symbolic parameter type. It may clear those values you intend to override at the beginning of the simulation. Therefore, after the Clear Override Values operation, you may need to enter some of the overriding values for the next simulation run.
More Global Values: Other objects that contain global attributes defined by the simulator may need to be reinitialized. Check your simulator documentation for details.
The Reset Data button in the Run toolbar can be used to remove the overriding values, similar to selecting Edit>Clear Override Values, and reset all the In/Out and Output numerical data to their default values in the simulation control object.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.