How simulation works in CertSAFEΒΆ

CertSAFE provides powerful simulation tools that can be used for anything from quick experimentation during development to formal expected results generation for verification and validation of safety-critical systems. This flexibility is provided by CertSAFE’s fast simulation and the ability to simulate any part of a project at any time. You can even keep editing a diagram while you have a simulation open, and the results will automatically update when you save the changes to your diagram.

CertSAFE’s simulation is based on a simple discrete-time design. Time is broken into frames, which occur at regularly-spaced instantaneous points in time. The amount of “wall clock” time between frames is controlled by the project frame rate, which is a global variable edited in the project options. This variable only has a meaningful effect on models that query it using the Project Frames Per Second primitive or a component wrapping that primitive; otherwise, it is purely for display purposes in the GUI.

Each frame, all of the units in the instance hierarchy under simulation are executed exactly once. The results produced by CertSAFE are always the simulated values at the end of the frame of execution. The order that CertSAFE chooses to execute units in is irrelevant, except that a value will always be produced before it is consumed within a frame. This makes the simulation very predictable and easy-to-understand.