The cycle-driven simulation mechanism executes simulators in-process, in a thread within the same process space as SansGUI. The control flow of a cycle-driven simulator follows a sequence to call class functions described in this section. Only the class functions that belong to reference objects and parts can be executed. Component objects, even though they may have functions defined, are not called during a cycle simulation.
There are two possibilities in the cycle simulation calling sequence: 1) looping through all reference objects and then all parts and 2) looping through all parts and then all reference objects. Depending on the DLL Function Entry Points, one of the two possibilities is used:
Initialization (SG_xInitSize and SG_xInit): For object data resizing before initialization (SG_xInitSize), 2) looping through all parts and then all reference objects is applied to provide simulators with an opportunity to know how many parts there are in a Project Model in order to specify the sizes of matrices and/or tables accordingly. SansGUI will allocate memory dynamically before the subsequent initialization function calls. During initialization (SG_xInit), 1) looping through all reference object and then all parts is used because some parts may refer to some reference objects, which need to be initialized first.
Begin Run and Begin Case (SG_xBgnRun and SG_xBgnCase): For each run or case initialization, 1) is used for the same reason as in initialization.
Pre-Evaluation (SG_xPreEval): When preparing data for evaluation, 1) is used to prepare reference objects first.
Evaluation and Post-Evaluation (SG_xEval and SG_xPostEval): During and after evaluation, 2) looping through all parts and then all reference objects is used to provide the simulator with the opportunity of summarizing data in reference objects.
End Run and End Case (SG_xEndRun and SG_xEndCase): After each case and each run, 2) is used for preparing summery data in reference objects.
The data editing functions (SG_xEndEdit, SG_xLoadSize, and SG_xLoad) are not listed here because they are called per user's demand and are not called during the simulation run.
The pre-evaluation, evaluation, and post-evaluation are three subcycles within one cycle. That is, for each cycle in the simulation control object, a pre-evaluation cycle is followed by an evaluation cycle and then by a post-evaluation cycle.
Within each cycle, some rules are applied to the set of reference objects and the parts in the entire assembly hierarchy:
By Name: The flow control mechanism follows the listing order of reference objects in the Object Tree View.
Parts in the assembly hierarchy are called in a depth-first manner. If a part contains a subassembly, the functions of the parts in the subassembly will be called first. The options for evaluating the parts in the same assembly (in the same level) are:
By Name: The name order is used, as in the listing of parts in the Assembly Tree View.
By Z-Order: Use the depth information assigned by the user. It evaluates the parts from back to front.
By Horizontal Scan Lines: From the Canvas View of an assembly, each horizontal scan line goes from left to right with the control sequence goes from the top scan line to the bottom scan line.
By Vertical Scan Lines: From the Canvas View of an assembly, each vertical scan line goes from top to bottom with the control sequence goes from the left-most scan line to the right-most scan line.
Random: SansGUI generates a random sequence for all the parts in the same assembly level.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.