Fixed-Point Blockset |
 |
Recommendations for Arithmetic and Scaling
This section describes the relationship between arithmetic operations and fixed-point scaling, and some basic recommendations that may be appropriate for your fixed-point design. For each arithmetic operation:
- The general [Slope Bias] encoding scheme described in Scaling is used.
- The scaling of the result is automatically selected based on the scaling of the two inputs. In other words, the scaling is inherited.
- Scaling choices are based on
- Minimizing the number of arithmetic operations of the result.
- Maximizing the precision of the result.
- Additionally, radix point-only scaling is presented as a special case of the general encoding scheme.
In embedded systems, the scaling of variables at the hardware interface (the ADC or DAC) is fixed. However for most other variables, the scaling is something you can choose to give the best design. When scaling fixed-point variables, it is important to remember that:
- Your scaling choices depend on the particular design you are simulating.
- There is no best scaling approach. All choices have associated advantages and disadvantages. It is the goal of this section to expose these advantages and disadvantages to you.
| Example: Limitations on Range | | Addition |  |