Drawing simple logic diagrams in CertSAFE is easy, but as soon as you try to express systems larger than a single image can accommodate you will want to know how to make projects that span multiple diagrams. CertSAFE provides a variety of powerful tools to express large systems and manage their complexity. Core to these features are the concepts of definitions and instances.
When you draw a diagram in CertSAFE, you are creating the definition of a unit type. A unit type is a class of block or unit that implements particular logic. “Switch” is an example of a unit type, specifically a primitive unit type that is built into the CertSAFE simulation engine. Each diagram, stitch, interpolation table, and case table file in a project defines a single unit type.
When you drag a unit type into a diagram in the CertSAFE GUI, a new unit of that type is created and placed in the diagram. This new unit is a child unit of the enclosing diagram, and the enclosing diagram has a child reference to the new unit’s unit type. Each child unit of a diagram or stitch has a child name, which is a name that is displayed in the GUI to identify that specific child.
A definition in CertSAFE does not “do” anything by itself, any more than a function in an imperative programming language like C can run itself. In order to simulate your model, you must instantiate a definition by selecting a root definition in the GUI. Your root specifies the “top level” of your system; it represents the scope of instances that you are interested in working with.
At any time, there is at most one definition active as the GUI root in CertSAFE. The GUI root is marked with a yellow star in the Projects view, and its name is also displayed in the bottom bar. You can select a diagram as your current working root in CertSAFE by right-clicking on it in the Projects view and selecting “Set As Specified Root”. If there is a particular unit type that your team uses as the root most of the time on a project, you can set a default root in the Project Options editor for that project; CertSAFE will then automatically select that root each time you open the project.
Simulation files also have a simulation root that specifies the definition to be simulated. If the “Root follows timeline focus” toggle button in the bottom bar is depressed, the GUI root will automatically switch to match the simulation when you open or switch to a simulation editor in the GUI. If this makes the GUI root different than the root you selected with the “Set As Specified Root” command, your specified root will be displayed with a grayed-out star in the Projects view, indicating it is still the specified root but is inactive. The GUI root will automatically return to the specified root when you close the simulation.
Once you have selected a root in CertSAFE, you can navigate the instance hierarchy induced by that choice of root using the Instance view and breadcrumbs bar.
The Instance view shows a tree representation of the instance hierarchy. It is always available when a GUI root is selected in CertSAFE. The breadcrumbs bar specifically appears in diagram and stitch editors in instance mode to show the editor’s current location and allow you to navigate the hierarchy. Instance mode is enabled by clicking the “D”/”I” toggle button immediately to the left of the breadcrumbs bar.