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 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')
Default: On
When you enable resource sharing, HDL Coder™ shares floating-point IP blocks.
Do not share floating-point IP blocks.
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 HDL Code Generation > Global Settings > Floating Point Target tab, set the Floating Point IP Library to a value
other than None
.
Property:
ShareFloatingPointIP |
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 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')