| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Fixed-Point Toolbox |
| Contents | Index |
| Learn more about Fixed-Point Toolbox |
This table summarizes what's new in Version 1.4 (R2006a):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes—Details labeled as Compatibility Considerations, below. See also Summary. | Bug
Reports Includes fixes | No |
New features and changes introduced in this version are
Embedded MATLAB Subset Supports More Fixed-Point Toolbox Functions
Embedded MATLAB Subset Does Not Support a CastBeforeSum Value of 'false'
Arithmetic using the +,-, .*, and * operators is now supported for objects with [Slope Bias] scaling. Refer to [Slope Bias] Arithmetic in the product documentation for more information.
In support of this feature, the following properties have been added to the fimath object:
ProductBias — Bias of the product data type
ProductFixedExponent — Fixed exponent of the product data type
ProductSlope — Slope of the product data type
ProductSlopeAdjustmentFactor — Slope adjustment factor of the product data type
SumBias — Bias of the sum data type
SumFixedExponent — Fixed exponent of the sum data type
SumSlope — Slope of the sum data type
SumSlopeAdjustmentFactor — Slope adjustment factor of the sum data type
Refer to Property Reference in the product reference documentation for more information.
The fi object now supports the scaled double data type. The value ScaledDouble has been added to the DataType property of the numerictype object. The following values have also been added to the DataTypeMode property of the numerictype object:
Scaled double: binary point scaling
Scaled double: slope and bias scaling
Scaled double: unspecified scaling
Math operations are supported for fi objects with data type ScaledDouble.
The fipref object now has the property DataTypeOverride, which allows you to override fi objects with scaled doubles, singles, or doubles. Refer to Using fipref Objects to Set Data Type Override Preferences in the product documentation for more information.
The following Fixed-Point Toolbox functions are now supported by Embedded MATLAB subset:
Refer to Supported Functions and Limitations of the Fixed-Point Embedded MATLAB Subset in the product documentation for more information.
You can no longer set the fimath object property CastBeforeSum to false or 0 in Embedded MATLAB Function blocks. The reason for this restriction is that Embedded MATLAB subset does not produce the same numerical results as MATLAB when CastBeforeSum is false.
In the previous release, CastBeforeSum was set to false for default fimath objects in Embedded MATLAB subset If you have existing models that contain Embedded MATLAB Function blocks in which CastBeforeSum is false, you will now get an error when you compile or update your model. To correct this issue, you must set CastBeforeSum to true. To automate this process, you can run the utility slupdate either from the Model Advisor or by typing the following command at the MATLAB command line:
slupdate ('modelname')where 'modelname' is the name of the model containing the Embedded MATLAB Function block that generates the error. slupdate prompts you to update this property by selecting one of these options:
| Option | Action |
|---|---|
| Yes | Updates the first occurrence of CastBeforeSum=false in Embedded MATLAB Function blocks in the model and then prompts you for each subsequent instance found in the model. |
| No | Does not update any occurrences of CastBeforeSum=false in the model. |
| All | Updates all occurrences of CastBeforeSum=false in the model. |
Note slupdate detects CastBeforeSum=false only in default fimath objects defined for Simulink signals in Embedded MATLAB Function blocks. If you modified the fimath object in an Embedded MATLAB Function block, update CastBeforeSum manually in your model and fix the errors as they are reported. |
The RoundMode property value round has been added to the fimath object. The behavior of this rounding mode is identical to the MATLAB round function. For more information refer to RoundMode in the product documentation.
Previously, if you created a numerictype object without specifying a value for the FractionLength property, the fraction length would be automatically set to 15. Now however, if you do not set the FractionLength property when creating a numerictype object, the scaling will remain unspecified. For example:
T = numerictype(1, 16)
T =
DataTypeMode: Fixed-point: unspecified scaling
Signed: true
WordLength: 16
T.scaling
ans =
Unspecified
T.FractionLength
ans =
0Any instances of this syntax in your existing code will now return a different result.
Previously, the fi and quantizer objects logged minimums and maximums before quantization. They now log after quantization.
If your fixed-point data overflows and you want to log minimums and maximums for the full floating-point range, use the 'ScaledDoubles' or 'TrueDoubles' values of the fipref object DataTypeOverride property. For example, the following fixed-point variable overflows. The saturated minimum and maximum values are logged:
p = fipref;
p.LoggingMode = 'On';
p.DataTypeOverride = 'ForceOff';
a = fi(-2:2, true, 16, 15)
Warning: 3 overflows occurred in the fi assignment operation.
a =
-1 -1 0 0.99997 0.99997
DataTypeMode: Fixed-point: binary point scaling
Signed: true
WordLength: 16
FractionLength: 15
RoundMode: nearest
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
CastBeforeSum: true
logreport(a)minlog maxlog lowerbound upperbound noverflows nunderflows a -1 0.9999695 -1 0.9999695 3 0
Now set DataTypeOverride to 'ScaledDoubles'. Note that overflows are reported, but the data is not quantized. The minimum and maximum logs show the full possible range of the data without quantization:
p = fipref;
p.LoggingMode = 'On';
p.DataTypeOverride = 'ScaledDoubles';
b = fi(-2:2, true, 16, 15)
Warning: 3 overflows occurred in the fi assignment operation.
b =
-2 -1 0 1 2
DataTypeMode: Scaled double: binary point scaling
Signed: true
WordLength: 16
FractionLength: 15
RoundMode: nearest
OverflowMode: saturate
ProductMode: FullPrecision
MaxProductWordLength: 128
SumMode: FullPrecision
MaxSumWordLength: 128
CastBeforeSum: true
logreport(b)minlog maxlog lowerbound upperbound noverflows nunderflows b -2 2 -1 0.9999695 3 0
For an in-depth example of using logging and data type override to help set appropriate scalings for fixed-point quantities, see the Fixed-Point Toolbox demo "Fixed-Point Data Type Override, Min/Max Logging, and Scaling".
![]() | Version 1.5 (R2006b) Fixed-Point Toolbox Software | Version 1.3 (R14SP3) Fixed-Point Toolbox Software | ![]() |

Learn how to apply early verification to your development process through these technical resources.
How much time do you spend on testing to ensure implementation meets system-level requirements?
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |