Main Content

Check for MATLAB Function block settings

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

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

Check HDL compatible settings for MATLAB Function blocks.

Description

This check displays a warning if your model uses MATLAB Function blocks that have settings not recommended for HDL code generation. The settings include checking whether the MATLAB Function block has:

  • fimath settings defined as per hdlfimath. The hdlfimath function uses fimath settings that are compatible for HDL code generation.

  • Saturate on integer overflow check box cleared.

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 updates the MATLAB Function block settings to be compatible with HDL code generation.

Capabilities and Limitations

  • Runs on library models.

  • Analyzes content in all masked subsystems.

  • Analyzes only the functions that the Simulink model directly references.

See Also

Design Guidelines for the MATLAB Function Block