Simulation and timelines¶
The primary unit of simulation in CertSAFE is simply called a simulation. A simulation represents a single execution of a CertSAFE model over a period of time. You can create a new unsaved simulation by clicking the “New Simulation” button on the main toolbar or under the File → New menu. Every simulation has a reference to a simulation root that determines the subsystem to be simulated. The simulation root must be a composite unit, i.e. either a diagram or a stitch. When you create a new simulation in CertSAFE, its simulation root is set to the current GUI root; the reference to the simulation root is then saved as part of the simulation file. If you want to change the root of a simulation after creating it, you can edit the “Simulation root” property in the Properties view, or simply drag-and-drop a diagram or stitch from the Projects view into the simulation editor.
The CertSAFE editor for a simulation is called a timeline, since the main content of the editor is the large area where waveforms—Cartesian plots of the simulated values of variables—are displayed. Each waveform corresponds to a specific variable within the instance hierarchy of the simulation root. Waveforms can be added by dragging variables into the timeline from the Instance tree. If you drag a unit in from the Instance tree, all of that unit’s inputs and outputs (but not its local variables) will be added to the simulation.
In the timeline, the x-axis represents time, and the y-axis represents the values of variables. Variables need not all be displayed on the same scale. Each waveform has a baseline that shows the zero point for that variable’s plot, and a scale that specifies the size ratio between the value of the variable and pixels on the screen. You can edit the baseline offset and scale of a waveform by selecting the waveform and editing the corresponding properties in the Properties view. You can also drag waveforms vertically to move their baseline, and hold the Alt key and drag to change their scale. If you’re having a hard time selecting or dragging a waveform, you can click on the icon in the baseline as a sort of “handle”. You can also select variables in the test from the list on the left side of the timeline. This list also has an eye icon for each variable that you can click on to toggle whether the variable is shown or hidden.
When you move your mouse over a timeline, CertSAFE will show a thin blue line representing the point in time your mouse is pointed at. This is called the time cursor. When the time cursor is placed at a frame, CertSAFE will display the values each variable attained after the focused frame finished executing. These values are displayed in the table on the left side of the timeline and in the baseline for each waveform.
Double-clicking on an empty spot in the timeline will lock the time cursor. This means that you can move your mouse around freely without the time cursor following along. When the time cursor is locked, it is displayed as gray instead of blue, and the x- and y-axis rulers at the edges of the timeline area will turn from blue to yellow. You can unlock the time cursor by right-clicking on it.
If you open a diagram in instance mode, CertSAFE will display probes that show the value of every intermediate calculation in the diagram. The values displayed come from the data computed for the time cursor’s location in the most-recently-focused timeline. Probes are color-coded by data type: light blue for floating-point, purple for integer, and yellow for enumeration. Boolean values are displayed specially, showing as gray for FALSE and green for TRUE. You can move probes around by dragging them within the diagram.
The bar at the bottom of the window in CertSAFE provides a number of options for adjusting how you work with the timeline interface. You can use these options to quickly adjust the radix (base) and precision that values are displayed in, toggle the display of baselines and IntelliPoints, and various other settings. Mousing over each control will give a short description of what that option does.