| 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 3.0 (R2009b):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes Summary | Bug
Reports Includes fixes | No |
New features and changes introduced in this version are:
New Relationship Between fi Objects and a Global fimath Simplifies Fixed-Point Arithmetic
Built-in Integer and Floating-Point Support Added for Bitshift Operations
Embedded MATLAB Support for Variable-Size Arrays and Matrices
In previous versions of Fixed-Point Toolbox software, all fi objects had an attached fimath object property. The attached fimath object determined how the fi object performed fixed-point arithmetic operations. This format made it more cumbersome to create fi objects, sometimes resulting in "mismatched fimath" errors.
In R2009b, the behavior of the fi object has been changed. A fi object no longer needs to have its own attached fimath object property. Rather than each fi object having its own set of fimath object properties, you can now associate fi objects with the global fimath. See Working with the Global fimath for more information.
When you create a fi object in R2009b without specifying any fimath object properties in the constructor, MATLAB returns a fi object that associates itself with the global fimath. If you change the global fimath, all fi objects that are associated with the global fimath automatically pick up the new fimath properties.
You can still use the fi object constructor function to specify a particular fimath object for a fi object.
In general, fixed-point arithmetic operations use the following rules:
If either fi object in a binary operation has its own fimath object, the operation uses that fimath object.
If both fi objects in a binary operation use the global fimath, the operation uses the global fimath.
For more information on fixed-point arithmetic rules, see fimath Rules for Fixed-Point Arithmetic.
This feature also includes several new functions:
isfimathlocal — Use this function to find out whether a fi object has its own explicitly attached fimath object. Any fi object that does not have its own fimath object is instead associated with the global fimath.
sfi, ufi — Use these constructors to create signed and unsigned fi objects that associate themselves with the global fimath. See New sfi and ufi Constructors for Creating fi Objects for more information.
removedefaultfimathpref — Use this function to remove a user-configured global fimath from your MATLAB preferences. See Working with the Global fimath in the Fixed-Point Toolbox User's Guide for more information.
The new relationship between fi objects and the global fimath results in the following incompatibilities:
Construction of fi Objects. To create fi objects with Fixed-Point Toolbox software, the fi constructor must know which RoundMode and OverflowMode properties to use. You can specify these fimath object properties in a fi object constructor. In this case, the constructor uses the RoundMode and OverflowMode properties you specify to create the fi object.
The new relationship between fi objects and the global fimath state introduces a compatibility consideration. This compatibility issue relates to the construction of fi objects from a floating-point value when you do not specify any fimath object properties in the fi object constructor. When you constructed fi objects in such a way in R2008b and R2009a, the fi constructor used the RoundMode and OverflowMode properties of the old default fimath object.
When you create a fi object in this way in R2009b, you may get different results. As of this release, the fi constructor creates the fi object using a RoundMode of nearest and an OverflowMode of saturate. Thus, the setting of the RoundMode and OverflowMode properties of the global fimath are not used to create fi objects from floating-point values.
You can still create a fi object from a floating-point value in R2009b with a RoundMode and OverflowMode other than nearest and saturate. To do so, specify your desired RoundMode and OverflowMode properties in the fi constructor.
Behavior change for add, mpy and sub Functions. In previous releases, the output of the fimath object functions add, mpy and sub was assigned the fimath object specified in the function call. For example, the syntax c = add(F,a,b) where F is a fimath object, resulted in a fi object c being created and assigned the fimath object F.
In R2009b, the output fi object c is always associated with the global fimath. It no longer gets assigned the fimath object F.
Specifying fimath Properties in the Embedded MATLAB Function Block. This release removes the FIMATH for fixed-point input signals and FIMATH for fi and fimath constructors parameters from the Embedded MATLAB Function Block. You now use the Embedded MATLAB function block fimath radio buttons to set the following:
The fimath properties to be associated with fixed-point inputs
The fimath properties to be associated with all fi and fimath objects constructed in the block
You can choose one of the following options for the Embedded MATLAB function block fimath parameter:
Same as MATLAB — When you select this option, the block uses the same fimath properties as the current global fimath.
Specify other — When you select this option, you can specify your own set of fimath object properties. These properties get associated with all fixed-point block inputs and all fi and fimath objects constructed in the block.
Run a model that had the FIMATH for fi and fimath constructors parameter set to Same as MATLAB factory default in R2009b. You may notice different results. This difference occurs because all fi and fimath objects constructed in the Embedded MATLAB function block now use the Embedded MATLAB function block fimath.
To achieve the same results as previous releases, set the Embedded MATLAB function block fimath to the MATLAB factory default when you run your model in R2009b. Otherwise, all fi and fimath objects constructed within your Embedded MATLAB function blocks may be associated with different fimath object properties.
To inform you of this change in behavior, the block issues a warning at the MATLAB command line. To turn off the warning, run slupdate on your model.
Fixed-Point Toolbox software now supports two new fi object constructor functions:
sfi — Construct signed fixed-point numeric object
ufi — Construct unsigned fixed-point numeric object
These new constructors simplify the construction of fi objects. You no longer need to specify the signedness and fimath object properties of the fi object in the constructor. All fi objects you construct with one of these functions are automatically associated with the global fimath. They do not have a fimath object of their own. For more information on the global fimath and how it can help you simplify arithmetic with fi objects, see:
| New Relationship Between fi Objects and a Global fimath Simplifies Fixed-Point Arithmetic |
Fixed-Point Toolbox software now provides support for the conv function.
The following Fixed-Point Toolbox functions now support built-in integers:
The following Fixed-Point Toolbox function now supports both built-in integers and floating-point data types:
The Embedded MATLAB subset now supports variable-size arrays and matrices with known upper bounds. With this feature, you can define inputs, outputs, and local variables in Embedded MATLAB functions to represent data that varies in size at runtime. You can use variable-size data in:
Embedded MATLAB Function blocks in Simulink
Embedded MATLAB functions in Stateflow® charts
Embedded MATLAB compliant M functions, from which you can generate MEX code with emlmex and C code with emlc (requires Real-Time Workshop® software)
For more information, see Working with Variable-Size Data in the Embedded MATLAB User's Guide.
The new compilation report provides compile-time type information for the variables and expressions in your Embedded MATLAB functions. This information helps you find the sources of error messages and understand type propagation issues, particularly for fixed-point data types.
The new compilation report is not supported by the MATLAB internal browser on Sun™ Solaris™ 64-bit platforms. To view the compilation report, you must have your MATLAB Web preferences configured to use an external browser, for example, Mozilla® Firefox. To learn how to configure your MATLAB Web preferences, see Web Preferences in the MATLAB documentation.
![]() | Version 3.1 (R2010a) Fixed-Point Toolbox Software | Version 2.4 (R2009a) 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-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |