Main Content

Resource Sharing Parameters for Subsystems and Floating-Point IPs

This page describes configuration parameters that reside in the HDL Code Generation > Optimization > Resource sharing tab of the Configuration Parameters dialog box. Enable these parameters to save resources on the target device by specifying whether to share atomic subsystems, MATLAB Function blocks, and floating-point IPs in your design.

Share Atomic subsystems

Share Atomic Subsystem blocks with the resource sharing optimization.

Settings

Default: On

On

When you enable resource sharing, HDL Coder™ shares atomic subsystems.

Off

Do not share atomic subsystems.

Dependency

To share Atomic Subsystem blocks in your design, in the HDL Block Properties for the parent DUT Subsystem, specify the SharingFactor.

Command-Line Information

Property: ShareAtomicSubsystems
Type: character vector
Value: 'on' | 'off'
Default: 'on'

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 ShareAtomicSubsystems 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', ... 
            'ShareAtomicSubsystems','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','ShareAtomicSubsystems','on')
    makehdl('sfir_fixed/symmetric_fir')

See Also

Share MATLAB Function blocks

Share MATLAB Function blocks with the resource sharing optimization.

Settings

Default: On

On

When you enable resource sharing, HDL Coder shares MATLAB Function blocks.

Off

Do not share MATLAB Function blocks.

Dependency

To share MATLAB Function blocks in your design, in the HDL Block Properties for the parent DUT Subsystem, specify the SharingFactor.

Command-Line Information

Property: ShareMATLABBlocks
Type: character vector
Value: 'on' | 'off'
Default: 'on'

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 ShareMATLABBlocks 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', ... 
            'ShareMATLABBlocks','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','ShareMATLABBlocks','on')
    makehdl('sfir_fixed/symmetric_fir')

See Also

Share Floating-Point IPs

Settings

Default: On

On

When you enable resource sharing, HDL Coder shares floating-point IP blocks.

Off

Do not share floating-point IP blocks.

Dependency

To share floating-point IPs:

  • In the HDL Block Properties for the parent DUT Subsystem, specify the SharingFactor. The number of floating-point IP blocks that get shared depends on the SharingFactor that you specify for the subsystem.

  • In the Configuration Parameters dialog box, in the HDL Code Generation > Floating Point Target pane, select Use Floating Point.

Command-Line Information

Property: ShareFloatingPointIP
Type: character vector
Value: 'on' | 'off'
Default: 'on'

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 ShareFloatingPointIP 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', ... 
            'ShareFloatingPointIP','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','ShareFloatingPointIP','on')
    makehdl('sfir_fixed/symmetric_fir')

See Also