|On this page…|
All fixed-point blocks support code generation, except particular simulation features. The sections that follow describe the code generation support that the Fixed-Point Designer™ software provides. You must have a Simulink® Coder™ license to generate C code or a HDL Coder™ license to generate HDL code.
Fixed-point code generation supports all integer and fixed-point data types that are supported by simulation. See Supported Data Types.
All rounding modes—Ceiling, Convergent, Floor, Nearest, Round, Simplest, and Zero —are supported.
Saturation and wrapping are supported.
Wrapping generates the most efficient code.
Currently, you cannot choose to exclude saturation code automatically when hardware saturation is available. Select wrapping in order for the Simulink Coder product to exclude saturation code.
All blocks generate code for all operations with a few exceptions. The Lookup Table Dynamic block generates code for all lookup methods except Interpolation-Extrapolation.