Using the Assert Operator (SWC Editors)

Note

This instruction applies only to SWCs specified as block diagrams. Using the Assert operation in an SWC specified in ESDL is described in Assert Operation (ESDL Editor).

  1. In the Basic Blocks palette or toolbar, click the Assert button.
  2. Place the operator in the drawing area.
  3. To determine the interval for the operand, do the following:

    1. Right-click the conversion operator and select Assert from the context menu.

      The Assert Attributes dialog window opens.

    2. In the Assert Attributes dialog window, enter lower and upper limit for the interval of the operand.
    3. Close the Assert Attributes dialog window with OK.
  4. Connect the operator input to a scalar operand of numerical type (i.e., cont, limitInt, wrapInt, sdisc or udisc).

    If you connect the input of the assert operator to an unsupported type, an error is issued during code generation. For example: If you connect an enumeration to the assert operator, an error MMdl23 is returned.

  5. Connect the operator output to a suitable operator or element.

An example is given in Example: Assert Operator.

See also

Example: Assert Operator

The following link applies only to the ESDL editor for software components:

Assert Operation (ESDL Editor)

The following links apply only to the block diagram editor for software components:

Assert Operator – Block Diagram Editor for SWCs

Assert Attributes Dialog Window