Main Content

Multiply-Add blocks

Share Multiply-Add blocks with the resource sharing optimization

Since R2021a

Model Configuration Pane: Optimization / Resource sharing

Description

Share Multiply-Add blocks with the resource sharing optimization.

Dependencies

  • To share Multiply-Add blocks in your design, in the HDL Block Properties for the DUT Subsystem, specify the SharingFactor.

  • When you specify the Multiply-Add block sharing minimum bitwidth, the code generator shares Multiply-Add blocks that have a bit width greater than or equal to the minimum bit width. The default minimum bit width for sharing Multiply-Add blocks is zero.

Settings

On (default) | Off
On

When resource sharing is enabled, share Multiply-Add blocks with a bit width greater than or equal to Multiply-Add block sharing minimum bitwidth.

Off

Do not share Multiply-Add blocks.

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 ShareMultiplyAdds setting when you generate HDL code for the symmetric_fir subsystem inside the sfir_fixed model using either of these methods.

  • Pass the property as an argument to the makehdl function.

    makehdl('sfir_fixed/symmetric_fir', ... 
            'ShareMultiplyAdds','on')
  • When you use hdlset_param, you can set the parameter on the model and then generate HDL code using makehdl.

    hdlset_param('sfir_fixed','ShareMultiplyAdds','on')
    makehdl('sfir_fixed/symmetric_fir')

Recommended Settings

No recommendations.

Programmatic Use

Parameter: ShareMultiplyAdds
Type: character vector
Value: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2021a

See Also

Model Settings