Festkomma-Codegenerierung in Simulink
Optimieren der Codegenerierung für Festkomma-Modelle
Sie können Simulink® Coder™ oder Embedded Coder® verwenden, um mit Fixed-Point Designer™ C Code zu generieren. Der aus Festkomma-Modellen generierte Code verwendet nur Integertypen und umfasst automatisch alle Operationen wie Verschiebungen, die aufgrund von Unterschieden in den Festkommastellen erforderlich sind. Sie können den generierten Code auf Festkomma-Embedded-Prozessoren oder Rapid-Prototyping-Systemen verwenden, auch wenn diese einen Gleitkomma-Prozessor umfassen.
Bei der Verwendung mit HDL Coder™ können Sie mit Fixed-Point Designer bit-echten, synthesierbaren Verilog®- und VHDL®-Code aus Simulink-Modellen, Stateflow®-Diagrammen und MATLAB Function-Blöcken generieren.
Themen
Modellieren für Hochleistungscode
- 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.
Integrieren von MATLAB Programmcode
- 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.
Verwenden des 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.
Anpassen von generiertem Code
- Control the Generation of Fixed-Point Utility Functions
Control the generation of fixed-point utility functions using specified minimum and maximum values.
Einhaltung von Standards
- 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.
Fehlersuche
Data types supported for simulation and code generation.