|
A number of factors influence whether or not a Simulink block executes during a given simulation step. These include whether or not the block (or a subsystem containing the block) has a sample time and whether or not the block resides in a conditionally executed subsystem. Conditional input branch execution is an optimization supported by Simulink that offers an additional way to determine when blocks execute by disabling them in some cases. Beginning with V2006.3.5 (beta), Reactis also supports this feature. To understand how conditional input branch execution works, consider the following simple model. When input c is greater than or equal to zero, the Switch block outputs relop1 and ignores relop2. Conversely, when c is less than zero, the Switch block outputs relop2 and ignores relop1. The basic idea behind conditional input branch execution is to not execute ignored blocks. This optimization does not change outputs computed by the model, but it might speed up execution since some blocks do not execute. In the case of Reactis, the optimization has in important impact on coverage tracking. Namely, coverage targets for a block should not be considered to be covered during a simulation step when that block is ignored due to conditional input branch execution. For example, in the above model, neither the true nor false branch of relop2 should be considered covered when c is greater than or equal to zero. In addition to Switch blocks, conditional input branch execution also applies to Multiport Switch blocks and non-virtual subsystems. That is the non-control inports of Multiport Switches and the inports of non-virtual subsystems each serve as the root of an ignorable branch just as each non-control inport of a Switch blocks does. We call these inports ignorable inports. In the simple example above, each ignorable branch consisted of a single block wired to an ignorable inport; however, in general, an entire group of blocks might be ignored. The set of blocks included in an ignorable branch is computed as follows. A block B is included in an ignorable branch IB if it meets each of the following conditions:
In Simulink, a model is configured to use conditional branch execution in two ways.
|