This section contains parameters in the HDL Code Generation > Floating Point pane of the Configuration Parameters dialog box. Use these parameters to specify
the latency strategy, whether to handle denormal numbers in your design, and how to perform
mantissa multiplication. To specify these settings, Floating Point IP
Library must be set to Native Floating Point
.
Specify whether you want the design to map to minimum or maximum latency with native floating-point libraries.
Default:
MAX
The options are:
MIN
Maps to minimum latency for the native floating-point libraries.
MAX
Maps to maximum latency for the native floating-point libraries.
ZERO
Does not use any latency for the native floating-point libraries.
To specify this parameter, set the Floating Point IP Library to
Native Floating Point
.
To specify the latency strategy:
Create a floating-point target configuration object for Native Floating
Point
as the floating-point
library.
fpconfig = hdlcoder.createFloatingPointTargetConfig('NativeFloatingPoint');
Specify the LatencyStrategy
property of the
LibrarySettings
attribute of the floating-point target
configuration
object.
fpconfig.LibrarySettings.LatencyStrategy = 'MIN';
Set the floating-point target configuration on the model and then generate HDL
code. This example shows how to set the configuration on the
sfir_single
model and generate HDL code for the
symmetric_fir
subsystem:
hdlset_param('sfir_single','FloatingPointTargetConfig',fpconfig) makehdl('sfir_single/symmetric_fir')
Specify whether you want to handle denormal numbers in your design. Denormal numbers are nonzero numbers that are smaller than the smallest normal number.
Default: Off
Inserts additional logic to handle the denormal numbers in your design.
Does not add additional logic to handle the denormal numbers in your design. If the input is a denormal value, HDL Coder™ treats the value as zero before performing computations.
To specify this parameter, set the Floating Point IP Library to
Native Floating Point
.
To specify the latency strategy:
Create a floating-point target configuration object for Native Floating
Point
as the floating-point
library.
fpconfig = hdlcoder.createFloatingPointTargetConfig('NativeFloatingPoint');
Specify the HandleDenormals
property of the
LibrarySettings
attribute of the floating-point target
configuration
object.
fpconfig.LibrarySettings.HandleDenormals = 'on';
Set the floating-point target configuration on the model and then generate HDL
code. This example shows how to set the configuration on the
sfir_single
model and generate HDL code for the
symmetric_fir
subsystem:
hdlset_param('sfir_single','FloatingPointTargetConfig',fpconfig) makehdl('sfir_single/symmetric_fir')
Specify how you want HDL Coder to implement the mantissa multiplication operation when you have Product blocks in your design.
Default: Auto
The options are:
Auto
This default option automatically determines how to implement the mantissa multiplication depending on the Synthesis tool that you specify.
If you do not specify a Synthesis tool, this setting
selects the Full Multiplier
implementation by
default.
If you specify Altera Quartus II
as the
Synthesis tool, this setting selects the
Full Multiplier
implementation.
If you specify Xilinx Vivado
or
Xilinx ISE
as the Synthesis
tool, this setting selects the Part Multiplier Part
AddShift
implementation.
Full Multiplier
Specify this option to use only multipliers for implementing the mantissa multiplication. The multipliers can utilize DSP units on the target device.
Part Multiplier Part AddShift
Specify this option to split the implementation into two parts. One part is implemented with multipliers. The other part is implemented with a combination of adders and shifters. The multipliers can utilize the DSP units on the target device. The combination of adders and shifters does not utilize the DSP.
No Multiplier Full AddShift
Select this option to use a combination of adders and multipliers to implement the mantissa multiplication. This option does not utilize DSP units on the target device. You can also use this option if your target device does not contain DSP units.
To specify this parameter, set the Floating Point IP Library to
Native Floating Point
.
To specify the latency strategy:
Create a floating-point target configuration object for Native Floating
Point
as the floating-point
library.
fpconfig = hdlcoder.createFloatingPointTargetConfig('NativeFloatingPoint');
Specify the MantissaMultiplyStrategy
property of the
LibrarySettings
attribute of the floating-point target
configuration
object.
fpconfig.LibrarySettings.MantissaMultiplyStrategy = 'PartMultiplierPartAddShift';
Set the floating-point target configuration on the model and then generate HDL
code. This example shows how to set the configuration on the
sfir_single
model and generate HDL code for the
symmetric_fir
subsystem:
hdlset_param('sfir_single','FloatingPointTargetConfig',fpconfig) makehdl('sfir_single/symmetric_fir')