Native Floating Point Parameters

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.

Latency Strategy

Specify whether you want the design to map to minimum or maximum latency with native floating-point libraries.

Settings

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.

Dependency

To specify this parameter, set the Floating Point IP Library to Native Floating Point.

Command-Line Information

To specify the latency strategy:

  1. Create a floating-point target configuration object for Native Floating Point as the floating-point library.

    fpconfig = hdlcoder.createFloatingPointTargetConfig('NativeFloatingPoint');

  2. Specify the LatencyStrategy property of the LibrarySettings attribute of the floating-point target configuration object.

    fpconfig.LibrarySettings.LatencyStrategy = 'MIN';

  3. 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')

See also

Handle Denormals

Specify whether you want to handle denormal numbers in your design. Denormal numbers are nonzero numbers that are smaller than the smallest normal number.

Settings

Default: Off

On

Inserts additional logic to handle the denormal numbers in your design.

Off

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.

Dependency

To specify this parameter, set the Floating Point IP Library to Native Floating Point.

Command-Line Information

To specify the latency strategy:

  1. Create a floating-point target configuration object for Native Floating Point as the floating-point library.

    fpconfig = hdlcoder.createFloatingPointTargetConfig('NativeFloatingPoint');

  2. Specify the HandleDenormals property of the LibrarySettings attribute of the floating-point target configuration object.

    fpconfig.LibrarySettings.HandleDenormals = 'on';

  3. 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')

See also

Mantissa Multiplier Strategy

Specify how you want HDL Coder to implement the mantissa multiplication operation when you have Product blocks in your design.

Settings

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.

Dependency

To specify this parameter, set the Floating Point IP Library to Native Floating Point.

Command-Line Information

To specify the latency strategy:

  1. Create a floating-point target configuration object for Native Floating Point as the floating-point library.

    fpconfig = hdlcoder.createFloatingPointTargetConfig('NativeFloatingPoint');

  2. Specify the MantissaMultiplyStrategy property of the LibrarySettings attribute of the floating-point target configuration object.

    fpconfig.LibrarySettings.MantissaMultiplyStrategy = 'PartMultiplierPartAddShift';

  3. 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')

See also