Package: coder
Floating-point to fixed-point conversion configuration object
A coder.FixptConfig
object
contains the configuration parameters that the fiaccel
function
requires to convert floating-point MATLAB® code to fixed-point MATLAB code.
Use the -float2fixed
option to pass this object
to the fiaccel
function.
creates a fixptcfg
=
coder.config('fixpt')coder.FixptConfig
object
for floating-point to fixed-point conversion.
|
Enable derived range analysis. Values: |
|
Enable collection and reporting of simulation range data. If you need to run a long simulation to cover the complete dynamic range of your design, consider disabling simulation range collection and running derived range analysis instead. Values: |
|
Default fixed-point fraction length. Values: 4 (default) | positive integer |
|
Default signedness of variables in the generated code. Values: |
|
Default fixed-point word length. Values: 14 (default) | positive integer |
|
Enable detection of overflows using scaled doubles. Values: |
|
Values: |
|
Suffix for fixed-point file names. Values: |
|
View the numeric types report after the software has proposed fixed-point types. Values: |
|
Enable simulation data logging to plot the data differences introduced by fixed-point conversion. Values: |
|
Optimize the word lengths of variables whose simulation min/max logs indicate that they are always whole numbers. Values: |
|
Name of function to use for comparison plots.
The plot function should accept three inputs:
Values: |
|
Use Simulation Data Inspector for comparison plots.
Values: |
|
Propose fixed-point types based on Values: |
|
By default (false), propose data types with the minimum word length needed to represent the value. When set to true, propose data type with the smallest word length that can represent the range and is suitable for C code generation ( 8,16,32, 64 … ). For example, for a variable with range [0..7], propose a word length of 8 rather than 3. Values: |
|
Propose fixed-point types based on Values: |
|
Propose data types based on simulation range data, derived ranges, or both. Values: |
|
Safety margin percentage by which to increase the simulation
range when proposing fixed-point types. The specified safety margin
must be a real number greater than Values: 0 (default) | double |
|
Perform faster static analysis. Values: |
|
Abort analysis if timeout is reached. Values: |
|
Test bench function name or names, specified as a string or cell array of strings. You must specify at least one test bench. If you do not explicitly specify input parameter data types, the conversion uses the first test bench function to infer these data types. Values: |
|
Enable numerics testing. Values: |
addApproximation | Replace floating-point function with lookup table during fixed-point conversion |
addDesignRangeSpecification | Add design range specification to parameter |
addFunctionReplacement | Replace floating-point function with fixed-point function during fixed-point conversion |
clearDesignRangeSpecifications | Clear all design range specifications |
getDesignRangeSpecification | Get design range specifications for parameter |
hasDesignRangeSpecification | Determine whether parameter has design range |
removeDesignRangeSpecification | Remove design range specification from parameter |
You can convert floating-point MATLAB code to fixed-point code using the Fixed-Point Converter app. Open the app using one of these methods:
On the Apps tab, in the Code Generation section, click Fixed-Point Converter.
Use the fixedPointConverter
command.