Main Content

Mantissa Multiplier Strategy

Specify how to implement the mantissa multiplication operation

Since R2020b

Model Configuration Pane: Floating Point

Description

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

Dependencies

To specify this parameter, select Use Floating Point.

Settings

Auto (default) | Full Multiplier | Part Multiplier Part AddShift | No Multiplier Full AddShift

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 for single data types and Full Multiplier for half and double data types.

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.

Tips

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

Recommended Settings

No recommended settings.

Programmatic Use

Parameter: MantissaMultiplyStrategy property of LibrarySettings attribute of hdlcoder.FloatingPointTargetConfig object
Type: character vector
Values: 'Auto' | 'Full Multiplier' | 'Part Multiplier Part AddShift' | 'No Multiplier Full AddShift'
Default: 'Auto'

Version History

Introduced in R2020b