Known Software and Documentation Problems     Search    Help Desk 

Fixed-Point Blockset 2.0: Documentation Updates

The Fixed-Point Blockset updates described below are incorporated into the PDF and HTML online documentation. These updates are not present in the Fixed-Point Blockset User's Guide.

DSP Processor Support

When using the Fixed-Point Blockset with Real-Time Workshop 3.0, you can use target processors that have only one register size (e.g., 32-bit). This supports data type emulation of 8 and 16 bits on the TCI_C30/C40 DSP and similar processors.

To do this, add -DDSP32=1 to your template makefile and add %assign DSP32=1 to your system target file.

Fixed-Point Demos Moved

The Fixed-Point Blockset demos were moved from toolbox/fixpoint/demos to toolbox/fixpoint/fxpdemos. Most of the demo names were changed to include fxp at the beginning of the name.

fpupdate Modified

The description of fpupdate given on page 8-6 of the Release 11 version of the Fixed-Point Blockset User's Guide is incomplete. For a complete description of this function, type help fpupdate at the MATLAB command line.

Fixed-Point GUI Modified

The Fixed-Point Blockset GUI was modified in these ways:

For a complete description of the interface, invoke the GUI and select the Help button.

Parameter Saturation Produces Warning

Whenever a Fixed-Point Blockset parameter saturates, a warning is displayed.

Signal Errors Produce Warnings or Errors

If a block is configured for logging, the maximum absolute error for each block is logged in addition to the minimum and maximum simulation values. If the maximum absolute error exceeds 50% of the output range, then a warning, an error, or nothing is issued depending on the setting of the Integer Overflow mode under Simulation>Parameters>Diagnostics.

The maximum absolute error represents an error due to online calculations within a block. The maximum absolute error excludes effects due to quantization of the parameters and inputs. Online calculations are those performed by the fixed-point processor.

FixPt Relay Block

The FixPt Relay block has a constant vector scaling mode. The best precision is based on the Output when on and Output when off parameter values. Additionally, this block no longer has a logging option and will not have its scaling set by the automatic scaling script autofixexp.

For information about the constant vector scaling mode, refer to page 3-11 of the Release 11 version of the Fixed-Point Blockset User's Guide.

FixPt Relational Operator Block

The FixPt Relational Operator block uses a new data type conversion rule.

The second input of the block is not always converted to the data type of the first input before comparison. Instead, the input with the smallest positive range is converted to the data type of the other input prior to comparison.

FixPt Switch Block

The FixPt Switch block uses a new rule for setting the output data type.

The first input no longer specifies the output data type. Instead, if input 1 has a larger positive range than input 3, then it specifies the output data type. Otherwise input 3 specifies the output data type.

FixPt Unit Delay

The FixPt Unit Delay block accepts continuous sample times. When it has a continuous sample time, the block is equivalent to a Memory block.

FixPt Look-Up Table (ID and 2D)

For the FixPt Look-Up Table and FixPt Look-Up Table (2D) blocks, the automatic scaling script autofixexp employs a special rule to avoid parameter saturation errors.

autofixexp modifies the scaling by using the output look-up values in addition to the logged minimum and maximum simulation values. This prevents the data from being saturated to different values.

For the FixPt Look-Up Table block, the look-up values are given by the Vector of output values parameter (the YDataPoints variable). For the FixPt Look-Up Table (2D) block, the look-up values are given by the Table parameter (the TableDataPoints variable).

The first input no longer specifies the output data type. Instead, if input 1 has a larger positive range than input 3, then input 1 specifies the output data type. Otherwise input 3 specifies the output data type.

Using rsim Target or External Mode

If you are using the Real-Time Workshop external mode or rapid simulation (rsim) target, there are situations where you may get unexpected errors when tuning block parameters.

These errors can arise when you use blocks that support constant scaling for best precision and youuse the "best precision" scaling option. To avoid these errors, you should use the Use Specified Scaling parameter value. Refer to the Fixed-Point Blockset User's Guide for blocks that support this feature.

For more information about rapid simulation target or external mode, refer to the Real-Time Workshop User's Guide.

External Mode

There are two main issues to consider when using external mode.

External Mode Tuning Gives Different Results Than Simulation..    When performing a simulation with fixed-point blocks, you can vary the block parameters over any range. The generated code has the flexibility to change the radix point on-the-fly. In external mode, however, the radix point cannot be changed on-the-fly and the code must be regenerated to accommodate radix point changes.

The Fixed-Point Blockset handles this issue by ignoring changes in the radix point when connected to the target in external mode. This means that unlike simulation, the blockset automatically produces the most accurate representation of the number without moving the radix point.

If a Block Parameter Change is Great Enough, the External Mode Cannot be Used..    If a block parameter is changed by a sufficient amount (approximately a factor of two), the radix point changes. If you change a parameter such that the radix point moves during an external mode simulation (or during graphical editing) and you reconnect to the target, a checksum error occurs and the code must be rebuilt.

For example, suppose a fixed-point block has a parameter value of -2. You then build the code and connect in external mode. While connected, you change the parameter to -4. In simulation, this parameter change causes a radix point change. In external mode, the radix point is kept fixed. If you keep the parameter value of -4 and disconnect from the target, then when you reconnect, a checksum error occurs and you must rebuild your code.

Rapid Simulation Target

There is one main issue to consider when using rapid simulation target.

If a Block Parameter Change is Great Enough, the Rapid Simulation Target Cannot be Used..    If a block parameter is changed by a sufficient amount (approximately a factor of two), the radix point changes. Any change in the radix point requires the code to be rebuilt (i.e., the model checksum is changed). This means that if the parameters are changed over a great enough range, the rapid simulation target cannot be used and a checksum error message occurs when you initialize the rsim executable.



[ Previous | Help Desk | Next ]