Products & Services Solutions Academia Support User Community Company

Learn more about Fixed-Point Toolbox   

Version 1.4 (R2006a) Fixed-Point Toolbox Software

This table summarizes what's new in Version 1.4 (R2006a):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated 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

[Slope Bias] Math Support Added

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:

Refer to Property Reference in the product reference documentation for more information.

Scaled Double Data Type Support Added to the fi Object

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:

Math operations are supported for fi objects with data type ScaledDouble.

Global DataTypeOverride Property Added to the fipref Object

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.

Embedded MATLAB Subset Supports More Fixed-Point Toolbox Functions

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.

Embedded MATLAB Subset Does Not Support a CastBeforeSum Value of 'false'

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.

Compatibility Considerations

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:

OptionAction
YesUpdates 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.
NoDoes not update any occurrences of CastBeforeSum=false in the model.
AllUpdates all occurrences of CastBeforeSum=false in the model.

'round' Value Added to the fimath Object RoundMode Property

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.

numerictype Object Syntax Change

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 =

     0

Compatibility Considerations

Any instances of this syntax in your existing code will now return a different result.

Minimums and Maximums Now Logged After Quantization

Previously, the fi and quantizer objects logged minimums and maximums before quantization. They now log after quantization.

Compatibility Considerations

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".

  


Free Early Verification Kit

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