In addition to function-specific limitations listed in the table,
the following general limitations apply to the use of Fixed-Point Designer™ functions
in generated code, with `fiaccel`

:

`fipref`

and`quantizer`

objects are not supported.Word lengths greater than 128 bits are not supported.

You cannot change the

`fimath`

or`numerictype`

of a given`fi`

variable after that variable has been created.The

`boolean`

value of the`DataTypeMode`

and`DataType`

properties are not supported.For all

`SumMode`

property settings other than`FullPrecision`

, the`CastBeforeSum`

property must be set to`true`

.You can use parallel for (

`parfor`

) loops in code compiled with`fiaccel`

, but those loops are treated like regular`for`

loops.When you compile code containing

`fi`

objects with nontrivial slope and bias scaling, you may see different results in generated code than you achieve by running the same code in MATLAB^{®}.

Function | Remarks/Limitations |
---|---|

N/A | |

N/A | |

N/A | |

Code generation in MATLAB does not support the syntax `F.add(a,b)` . You must use the syntax`add(F,a,b)` .
| |

N/A | |

N/A | |

N/A | |

Not supported for slope-bias scaled | |

N/A | |

N/A | |

N/A | |

N/A | |

Not supported for slope-bias
scaled | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

Generated code may not handle out of range shifting. | |

Generated code may not handle out of range shifting. | |

Generated code may not handle out of range shifting. | |

Not supported for slope-bias
scaled | |

N/A | |

N/A | |

N/A | |

N/A | |

Variable-sized inputs are only supported when the `SumMode` property of the governing`fimath` is set to`Specify precision` or`Keep LSB` .For variable-sized signals, you may see different results between generated code and MATLAB. In the generated code, the output for variable-sized signals is computed using the `SumMode` property of the governing`fimath` .In MATLAB, the output for variable-sized signals is computed using the `SumMode` property of the governing`fimath` when both inputs are nonscalar. However, if either input is a scalar, MATLAB computes the output using the`ProductMode` of the governing`fimath` .
| |

N/A | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

Variable-size signals are not supported. | |

N/A | |

N/A | |

If supplied, the index, | |

Any non- `fi` input must be constant; that is, its value must be known at compile time so that it can be cast to a`fi` object.Complex and imaginary divisors are not supported. Code generation in MATLAB does not support the syntax `T.divide(a,b)` .
| |

For the automated workflow, do not use explicit double or single casts in your MATLAB algorithm to insulate functions that do not support fixed-point data types. The automated conversion tool does not support these casts. Instead of using casts, supply a replacement function. For more information, see Function Replacements. | |

N/A | |

Supported for scalar fixed-point signals only. Supported for scalar, vector, and matrix, `fi` single and`fi` double signals.
| |

Not supported for fixed-point signals with different biases. | |

The default constructor syntax without any input arguments is not supported. If the `numerictype` is not fully specified, the input to`fi` must be a constant, a`fi` , a single, or a built-in integer value. If the input is a built-in double value, it must be a constant. This limitation allows`fi` to autoscale its fraction length based on the known data type of the input.All properties related to data type must be constant for code generation. `numerictype` object information must be available for nonfixed-point Simulink^{®}inputs.
| |

Variable-sized inputs are only supported when the `SumMode` property of the governing`fimath` is set to`Specify precision` or`Keep LSB` .
| |

Fixed-point signals coming in to a MATLAB Function block from Simulink are assigned a `fimath` object. You define this object in the MATLAB Function block dialog in the Model Explorer.Use to create `fimath` objects in the generated code.If the `ProductMode` property of the`fimath` object is set to anything other than`FullPrecision` , the`ProductWordLength` and`ProductFractionLength` properties must be constant.If the `SumMode` property of the`fimath` object is set to anything other than`FullPrecision` , the`SumWordLength` and`SumFractionLength` properties must be constant.
| |

N/A | |

N/A | |

The dimensions argument
must be a built-in type; it cannot be a | |

N/A | |

N/A | |

N/A | |

N/A | |

Not supported for fixed-point signals with different biases. | |

The syntax | |

N/A | |

N/A | |

Not supported for fixed-point signals with different biases. | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

Avoid using the | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

Not supported for fixed-point signals with different biases. | |

N/A | |

N/A | |

N/A | |

Supported for scalar fixed-point signals only. Supported for scalar, vector, and matrix, `fi` single and double signals.
| |

Not supported for fixed-point signals with different biases. | |

N/A | |

N/A | |

N/A | |

N/A | |

Any
non- | |

When the exponent `k` is a variable and the input is a scalar, the`ProductMode` property of the governing`fimath` must be`SpecifyPrecision` .When the exponent `k` is a variable and the input is not scalar, the`SumMode` property of the governing`fimath` must be`SpecifyPrecision` .Variable-sized inputs are only supported when the `SumMode` property of the governing`fimath` is set to`SpecifyPrecision` or`Keep LSB` .For variable-sized signals, you may see different results between the generated code and MATLAB. In the generated code, the output for variable-sized signals is computed using the `SumMode` property of the governing`fimath` .In MATLAB, the output for variable-sized signals is computed using the `SumMode` property of the governing`fimath` when the first input,, is nonscalar. However, when`a` is a scalar, MATLAB computes the output using the`a` `ProductMode` of the governing`fimath` .
| |

Code generation in MATLAB does not support the syntax `F.mpy(a,b)` . You must use the syntax`mpy(F,a,b)` .When you provide complex inputs to the `mpy` function inside of a MATLAB Function block, you must declare the input as complex before running the simulation. To do so, go to the**Ports and data manager**and set the**Complexity**parameter for all known complex inputs to`On` .
| |

N/A | |

Any non- `fi` input must be constant; that is, its value must be known at compile time so that it can be cast to a`fi` object.Variable-sized inputs are only supported when the `SumMode` property of the governing`fimath` is set to`SpecifyPrecision` or`KeepLSB` .For variable-sized signals, you may see different results between the generated code and MATLAB. In the generated code, the output for variable-sized signals is computed using the `SumMode` property of the governing`fimath` .In MATLAB, the output for variable-sized signals is computed using the `SumMode` property of the governing`fimath` when both inputs are nonscalar. However, if either input is a scalar, MATLAB computes the output using the`ProductMode` of the governing`fimath` .
| |

N/A | |

Not supported for fixed-point signals with different biases. | |

N/A | |

| |

N/A | |

Fixed-point signals coming in to a MATLAB Function block from Simulink are assigned a `numerictype` object that is populated with the signal's data type and scaling information.Returns the data type when the input is a nonfixed-point signal. Use to create `numerictype` objects in generated code.All `numerictype` object properties related to the data type must be constant.
| |

The dimensions argument
must be a built-in type; it cannot be a | |

Any
non- | |

N/A | |

When the exponent | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

N/A | |

The dimensions argument
must be a built-in type; it cannot be a | |

N/A | |

N/A | |

In the syntax | |

N/A | |

N/A | |

All properties related to data type must be constant for code generation.
| |

The dimensions argument
must be a built-in type; it cannot be a | |

N/A | |

N/A | |

For the automated workflow, do not use explicit double or single casts in your MATLAB algorithm to insulate functions that do not support fixed-point data types. The automated conversion tool does not support these casts. Instead of using casts, supply a replacement function. For more information, see Function Replacements. | |

N/A | |

The dimensions argument
must be a built-in type; it cannot be a | |

N/A | |

Complex and [Slope Bias] inputs error out. Negative inputs yield a 0 result.
| |

N/A | |

N/A | |

Code generation in MATLAB does not support the syntax `F.sub(a,b)` . You must use the syntax`sub(F,a,b)` .
| |

N/A | |

N/A | |

Variable-sized inputs
are only supported when the | |

`fi` input must be constant; that is, its value must be known at compile time so that it can be cast to a`fi` object.When you provide complex inputs to the `times` function inside of a MATLAB Function block, you must declare the input as complex before running the simulation. To do so, go to the**Ports and data manager**and set the**Complexity**parameter for all known complex inputs to`On` .
| |

N/A | |

If supplied, the index, | |

If supplied, the index, | |

All properties related to data type must be constant for code generation.
| |

N/A | |

N/A | |

N/A | |

N/A | |

N/A |

Was this topic helpful?