The Fixed-Point Designer™ software performs net slope computation using division to handle net slopes when simplicity and accuracy conditions are met.
Category: Math and Data Types
Default:
Off
Off
Performs net slope computation using integer multiplication followed by shifts.
On
Performs net slope computation using a rational approximation of the net slope. This results in an integer multiplication and/or division when simplicity and accuracy conditions are met.
Use division for reciprocals of integers
only
Performs net slope computation using division when the net slope can be represented by the reciprocal of an integer and simplicity and accuracy conditions are met.
This optimization affects both simulation and code generation.
When a change of fixed-point slope is not a power of two, net slope computation is necessary. Normally, net slope computation uses an integer multiplication followed by shifts. Enabling this new optimization replaces the multiplication and shifts with an integer division or an integer multiplication and division under certain simplicity and accuracy conditions.
Performing net slope computation using division is not always more efficient than using multiplication followed by shifts. Ensure that the target hardware supports efficient division.
To ensure that this optimization occurs:
Set the word length of the block so that the software can
perform division using the long
data type of
the target hardware. That setting avoids use of multiword
operations.
Set the Signed integer division rounds to
configuration parameter on the Hardware Implementation pane to
Zero
or
Floor
. The optimization does not
occur if you set this parameter to
Undefined
.
Set the Integer rounding mode parameter
of the block to Simplest
or to the
value of the Signed integer division rounds
to configuration parameter setting on the
Hardware Implementation pane.
This parameter requires a Fixed-Point Designer license.
Parameter:
UseDivisionForNetSlopeComputation |
Value:
'off' | 'on' |
'UseDivisionForReciprocalsOfIntegersOnly' |
Default:
'off' |
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | On (when target hardware supports efficient
division) Off (otherwise) |
Safety precaution | No impact |