Main Content

CMP

  • CMP block

Libraries:

Description

The CMP block implements the CMP instruction. The block computes the logical expression stored in source and depending upon the result, the Enable Out is set or cleared.

Ports

Input

expand all

This acts as the enabler for the block. The block executes only when EnableIn is true.

The source consists a logical expression which computes to True or False. The supported operators for expressions are add, subtract, multiply, divide, exponent, and parenthesis.

Data Types: int8 | int16 | int32 | single | String

Output

expand all

This is the enable output from the block. If the logical expression results in True then the EnableOut is set. If the logical expression results in False then the EnableOut is cleared.

Version History

Introduced in R2019a

See Also

| | | | |