Main Content

Built-In Block Replacements

The Simulink® Design Verifier™ software provides a set of block replacement rules and a corresponding library of replacement blocks. Use these built-in block replacements when analyzing models. They serve as examples that you can examine to learn how to create your own block replacements.

The following table lists the factory default block replacement rules, available in the matlabroot\toolbox\sldv\sldv\private folder. There are two implementations of each factory-default block replacement rule. Rules whose file names end with _normal.m replace blocks with Subsystem blocks.

File Name

Description

blkrep_rule_lookup_normal.m

A rule that replaces 1-D Lookup Table blocks with an implementation that includes test objectives for each breakpoint and interval specified by the Breakpoints parameter.

blkrep_rule_lookup2D_normal.m

A rule that adds Test Condition/Proof Assumption blocks to the input ports of 2-D Lookup Table blocks. Each Test Condition/Proof Assumption block constrains signal values to the interval specified by the corresponding breakpoint vector.

blkrep_rule_mpswitch2_normal.m

A rule that adds a Test Condition/Proof Assumption block to the control input port of Multiport Switch blocks whose Number of data ports parameter is 2. The Test Condition/Proof Assumption block constrains signal values to the interval [1, 2] (or [0, 1] if the block uses zero-based indexing).

blkrep_rule_mpswitch3_normal.m

A rule that adds a Test Condition/Proof Assumption block to the control input port of Multiport Switch blocks whose Number of data ports parameter is 3. The Test Condition/Proof Assumption block constrains signal values to the interval [1, 3] (or [0, 2] if the block uses zero-based indexing).

blkrep_rule_mpswitch4_normal.m

A rule that adds a Test Condition/Proof Assumption block to the control input port of Multiport Switch blocks whose Number of data ports parameter is 4. The Test Condition/Proof Assumption block constrains signal values to the interval [1, 4] (or [0, 3] if the block uses zero-based indexing).

blkrep_rule_mpswitch5_normal.m

A rule that adds a Test Condition/Proof Assumption block to the control input port of Multiport Switch blocks whose Number of data ports parameter is 5. The Test Condition/Proof Assumption block constrains signal values to the interval [1, 5] (or [0, 4] if the block uses zero-based indexing).

blkrep_rule_switch_normal.m

A rule that replaces Switch blocks with an implementation that includes test objectives, requiring that each switch position be exercised when the values of the first and third input ports are different.

blkrep_rule_switch_nonvir_normal.m

A rule that replaces Switch blocks having non-virtual bus inputs with an implementation that converts non-virtual bus inputs to virtual bus inputs. This implementation includes test objectives and requires that each switch position be exercised when the values of the first and third input ports are different.

blkrep_rule_selector
   IndexVecPort_normal.m

A rule that adds a Test Condition/Proof Assumption block to the index port of Selector blocks whose Index Option parameter is Index vector (port). The Test Condition/Proof Assumption block constrains signal values to an interval whose endpoints are derived from the values of the Selector block's Input port size and Index mode parameters.

blkrep_rule_selector
   StartingIdxPort_normal.m

A rule that adds a Test Condition/Proof Assumption block to the index port of Selector blocks whose Index Option parameter is Starting index (port). The Test Condition/Proof Assumption block constrains signal values to an interval whose endpoints are derived from the values of the Selector block's Input port size, Output size, and Index mode parameters.

The library of replacement blocks that corresponds to the factory default rules is

matlabroot/toolbox/sldv/sldv/sldvblockreplacementlib