Multiplier promotion threshold - Share smaller multipliers with other larger multipliers by using the resource sharing optimization - MATLAB (original) (raw)

Main Content

Share smaller multipliers with other larger multipliers by using the resource sharing optimization

Model Configuration Pane: Optimization / Resource sharing

Description

To share smaller multipliers with other larger multipliers by using the resource sharing optimization, specify the multiplier promotion threshold. This threshold specifies the maximum word length by which HDL Coderâ„¢ promotes a multiplier for sharing with other multipliers. For example, if you have a multiplier whose input word lengths sum to 28 bits and you want to share that multiplier with another multiplier whose input word lengths sum to 34 bits, subtract the total bits from each other, and set the multiplier promotion threshold to at least as large as the difference. In this example, the difference is 6 bits.

Dependencies

To share multipliers in your design:

Settings

0 (default)

0

No difference in word length between the multipliers, meaning that HDL Coder shares multipliers that have the same word length.

N, where N is an integer greater than 0

Maximum word length by which HDL Coder promotes a multiplier for sharing with other multipliers. If the difference in word lengths is less than or equal to N, HDL Coder promotes and shares multipliers that have different word lengths.

To determine N:

Tips

To set this property, use the functions hdlset_param or makehdl. To view the property value, use the function hdlget_param.

For example, you can use the MultiplierPromotionThreshold setting when you generate HDL code for the symmetric_fir subsystem inside the sfir_fixed model by using either of these methods:

No recommendations.

Programmatic Use

Parameter: MultiplierPromotionThreshold
Type: integer
Value: integer greater than or equal to 0
Default: 0

Version History

Introduced in R2016b