Main Content

Check for Relational Operator block usage

Check ID: com.mathworks.HDL.ModelChecker.runNFPRelopChecks

Check ID: com.mathworks.HDL.ModelAdvisor.runNFPRelopChecks

Check Relational Operator blocks which use floating point types have boolean outputs.

Description

This check displays a warning if your Simulink® model contains Relational Operator blocks that compare floating-point data types and produce a non-boolean output. By default, the Output data type of the block is boolean. If you specify a non-boolean output, the block implementation after HDL code generation is not optimal, and can increase the resource usage on the target hardware device.

Available with Simulink, HDL Coder™, Fixed-Point Designer™, and MATLAB® Coder™.

Results and Recommended Actions

To fix this warning, click Modify Settings and the code generator changes the Output data type of the block to boolean.

Capabilities and Limitations

  • Runs on only Relational Operator block that compare floating-point data types.

  • Analyzes content in all masked subsystems.

See Also

Relational Operator