Virgola fissa
All’interno dell’hardware digitale, i numeri sono rappresentati da tipi di dati in virgola fissa o in virgola mobile. Per entrambi di questi tipi di dati, le dimensioni della parola sono fissate in un numero di bit prestabilito. Tuttavia, l’intervallo dinamico dei valori in virgola fissa è molto inferiore rispetto a quello dei valori in virgola mobile e dell’equivalente dimensione della parola. Mentre i processori in virgola mobile possono semplificare notevolmente l’implementazione di un sistema in tempo reale e approssimare efficacemente i numeri del mondo reale, i processori in virgola fissa offrono numerosi altri vantaggi. I processori in virgola fissa sono generalmente più piccoli e consumano meno energia. Richiedono inoltre meno memoria e meno tempo di esecuzione.
Per simulare un modello che utilizza numeri in virgola fissa, è necessario installare il prodotto Fixed-Point Designer™. Il prodotto Fixed-Point Designer non è invece necessario per modificare un modello contenente blocchi in virgola fissa o per specificare tipi di dati in virgola fissa.
Funzioni
fixdt | Create Simulink.NumericType object describing a fixed-point or
floating-point data type |
fixpt_look1_func_approx | Optimize fixed-point approximation of nonlinear function by interpolating lookup table data points |
fixpt_evenspace_cleanup | Modify breakpoints of lookup table to have even spacing |
fixpt_look1_func_plot | Plot fixed-point approximation function for lookup table |
fixpt_set_all | Set property for each fixed-point block in subsystem |
fixptbestexp | Exponent that gives best precision for fixed-point representation of value |
fixptbestprec | Determine maximum precision available for fixed-point representation of value |
Argomenti
- 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.