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.
Rubriques
Model for High Performance Code
- Lookup Table Optimization
Optimize lookup tables in your model to improve efficiency. - Selecting Data Types for Basic Operations
How to select efficient data types for basic fixed-point operations. - Fixed-Point Code Generation Support
Simulink features supported for fixed-point code generation.
Incorporate MATLAB Code
- Control Data Types and Generate Code with MATLAB Function Block
Use data type override andfimath
objects with the MATLAB Function block. - Generate Fixed-Point FIR Code Using MATLAB Function Block
Create and generate code for a fixed-point, low-pass, direct form FIR filter.
Use the Model Advisor
- Optimize Generated Code with the Model Advisor
Use the Model Advisor to identify model settings that might lead to non-optimal results in code generation. - Net Slope Computation
Control how the software handles net slope computations in generated code.
Customize Generated Code
- Control the Generation of Fixed-Point Utility Functions
Control the generation of fixed-point utility functions using specified minimum and maximum values.
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.
Résolution des problèmes
Data types supported for simulation and code generation.