Using the Verify Operator
The Verify operator is used to check if the original and the complement of an element marked as redundant are consistent. The operator returns a Boolean value.
Proceed as follows to check the consistency of an element marked as redundant:
- In the Basic Blocks palette or toolbar, click the
Verify button to add a Verify operator. Place the operator in the drawing area.
Note
The Verify operator has only one input. You must add one operator for each element you want to check.
For a scalar element marked as redundant, do the following:
- Connect the element output to the input of the Verify operator.
For an array or matrix marked as redundant, do the following:
Right-click the element and select Get/Set Ports from the context menu.
The Get and Set ports of the element are displayed.
Connect the Get port to the input of the Verify operator.
If you connect the output of an array or matrix to the Verify operator, only a single array/matrix element (selected via output index for x (and y)) is checked for consistency.
- Connect the output of the Verify operator to a block that accepts Boolean values (e.g., a logic variable or the connector of an If block).
See Code Generation with Redundant Data Storage for examples of generated code.
Note |
|---|
You must connect only an element marked as redundant to the Verify operator. If you connect a non-redundant element to the Verify operator, an error is issued during code generation: MMdl371 – verify operator can only be used on model identifier with redundant flag set |
See also