Generación de código de punto fijo en Simulink
Puede generar código C con Fixed-Point Designer™ a través de Simulink® Coder™ o Embedded Coder®. El código generado a partir de modelos de punto fijo solo utiliza tipos enteros e incluye automáticamente todas las operaciones, como los desplazamientos, que se necesitan para tener en cuenta las diferencias en las ubicaciones de punto fijo. Puede usar el código generado en procesadores de punto fijo embebidos o en sistemas de prototipado rápido aunque contengan un procesador de punto flotante.
Cuando se utiliza con HDL Coder™, Fixed-Point Designer permite generar código Verilog® y VHDL® bit-true sintetizable a partir de modelos de Simulink, gráficos de Stateflow® y bloques MATLAB Function.
Temas
Modelo de código de alto rendimiento
- 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.
Incorporar código de MATLAB
- 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.
Usar 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.
Personalizar código generado
- Control the Generation of Fixed-Point Utility Functions
Control the generation of fixed-point utility functions using specified minimum and maximum values.
Mantener el cumplimiento de las normas
- 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.
Solución de problemas
Data types supported for simulation and code generation.