This section contains parameters 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 Multiply-Add blocks, atomic subsystems, and MATLAB Function blocks in your design.
Share Multiply-Add blocks with the resource sharing optimization.
Default: 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.
Do not share Multiply-Add blocks.
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.
Property:
ShareMultiplyAdds |
Type: character vector |
Value:
'on' | 'off' |
Default:
'on' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use 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')
Use this parameter to specify the minimum bit width that is required to share Multiply-Add with the resource sharing optimization.
Default: 0
No minimum bit width for shared Multiply-Add blocks.
When resource sharing and Multiply-Add block sharing are enabled, share Multiply-Add blocks with a bit width greater than or equal to N.
To share Multiply-Add blocks in your design:
In the Resource Sharing tab, make sure that the Multiply-Add blocks check box is selected.
In the HDL Block Properties for the DUT Subsystem, specify the SharingFactor.
Property:
MultiplierAddSharingMinimumBitwidth |
Type: integer |
Value: integer greater than or equal to 0 |
Default: 0 |
To set this property, use hdlset_param
or makehdl
. To view the property value, use hdlget_param
.
For example, you can use the MultiplierAddSharingMinimumBitwidth
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', ... 'MultiplierAddSharingMinimumBitwidth',16)
When you use hdlset_param
, you can set the parameter on the
model and then generate HDL code using
makehdl
.
hdlset_param('sfir_fixed',MultiplierAddSharingMinimumBitwidth',16) makehdl('sfir_fixed/symmetric_fir')
Share atomic subsystems with the resource sharing optimization.
Default: On
When resource sharing is enabled, share atomic subsystems.
Do not share atomic subsystems.
To share Atomic Subsystem blocks in your design, in the HDL Block Properties for the parent DUT Subsystem, specify the SharingFactor.
Property:
ShareAtomicSubsystems |
Type: character vector |
Value:
'on' | 'off' |
Default:
'on' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use 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', ... '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')
Share MATLAB Function blocks with the resource sharing optimization.
Default: On
When resource sharing is enabled, share MATLAB Function blocks.
Do not share MATLAB Function blocks.
To share MATLAB Function blocks in your design, in the HDL Block Properties for the parent DUT Subsystem, specify the SharingFactor.
Property:
ShareMATLABBlocks |
Type: character vector |
Value:
'on' | 'off' |
Default:
'on' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use 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')