Main Content

Fixed-Point Code Generation in Simulink

Optimize code generation for fixed-point models

You can generate C code with Fixed-Point Designer™ by using Simulink® Coder™ or Embedded Coder®. The code generated from fixed-point models uses only integer types and automatically includes all operations, such as shifts, needed to account for differences in fixed-point locations. You can use the generated code on embedded fixed-point processors or on rapid prototyping systems even if they contain a floating-point processor.

When used with HDL Coder™, Fixed-Point Designer lets you generate bit-true synthesizable Verilog® and VHDL® code from Simulink models, Stateflow® charts, and MATLAB Function blocks.

Topics

Model for High Performance Code

Incorporate MATLAB Code

Use the Model Advisor

Customize Generated Code

Maintain Standard Compliance

  • Use of Shifts by C Code Generation Products
    Understand the use of shifts by MathWorks® coder products including how to control the shifts using optimization settings in the configuration parameters as well as modeling techniques.

Troubleshooting

Supported Data Types

Data types supported for simulation and code generation.

Featured Examples