Main Content

La traduction de cette page n'est pas à jour. Cliquez ici pour voir la dernière version en anglais.

Virgule fixe

Représenter les signaux et les valeurs de paramètres avec des nombres à virgule fixe pour améliorer les performances du code généré

Dans le cas du hardware numérique, les nombres sont représentés comme des types de données à virgule fixe ou à virgule flottante. Pour ces deux types de données, la taille des mots est fixée à un certain nombre de bits. Toutefois, la plage dynamique des valeurs à virgule fixe est bien inférieure à celle des valeurs à virgule flottante à taille de mot équivalente. Les processeurs à virgule flottante peuvent fortement simplifier l'implémentation temps réel d'un système et approximer efficacement les nombres du monde réel. Toutefois, les processeurs à virgule fixe présentent de nombreux autres avantages. Ils sont généralement plus petits et consomment moins d'énergie. De plus, ils nécessitent moins de mémoire et de temps de traitement.

Pour simuler un modèle utilisant des nombres à virgule fixe, vous devez installer le produit Fixed-Point Designer™. Vous n'avez pas besoin de Fixed-Point Designer pour modifier un modèle contenant des blocs à virgule fixe ni pour spécifier des types de données à virgule fixe.

Fonctions

fixdtCreate Simulink.NumericType object describing a fixed-point or floating-point data type
fixpt_look1_func_approxOptimize fixed-point approximation of nonlinear function by interpolating lookup table data points
fixpt_evenspace_cleanupModify breakpoints of lookup table to have even spacing
fixpt_look1_func_plotPlot fixed-point approximation function for lookup table
fixpt_set_allSet property for each fixed-point block in subsystem
fixptbestexpExponent that gives best precision for fixed-point representation of value
fixptbestprecDetermine maximum precision available for fixed-point representation of value

Rubriques

  • Specify Fixed-Point Data Types

    If you do not have Fixed-Point Designer, you can still inspect and use fixed-point models that others share with you.

  • Specify Data Types Using Data Type Assistant

    Interactively apply data types, such as integer, fixed-point, and enumerated types, to data items in a model.

  • Share Fixed-Point Models

    Inspect and use an existing fixed-point model when you do not have Fixed-Point Designer.

  • Control Fixed-Point Instrumentation and Data Type Override

    If you do not have Fixed-Point Designer, you can work with a model containing Simulink® blocks with fixed-point settings by turning off fixed-point instrumentation and setting data type override to scaled doubles.

  • Fixed-Point Numbers

    In computer memory, an item of fixed-point data is stored as an integer. To interpret the data as a real-world number, the computer applies a mathematical scaling to the integer. The scaling is fixed, which means it cannot change during execution.

  • Benefits of Using Fixed-Point Hardware

    Fixed-point designs can perform faster and consume fewer computing resources than floating-point designs.

  • Scaling, Precision, and Range

    Examine the interaction between the scaling that you apply to fixed-point data, the precision with which the data can represent real-world values, and the range of real-world values that the data can represent.

  • Fixed-Point Data in MATLAB and Simulink

    Apply fixed-point data types to data in Simulink models and to data in MATLAB® code.

Informations connexes