hdlrestoreparams
Restore block- and model-level HDL parameters to model
Description
Examples
Save and Restore HDL-Related Model Parameters
This example shows how to set HDL parameters on a model and save the parameters in a MATLAB® script.
Set Model HDL Parameters
Open the sfir_fixed
model.
sfir_fixed
Verify that model parameters have default values.
hdlsaveparams('sfir_fixed/symmetric_fir')
%% Set Model 'sfir_fixed' HDL parameters hdlset_param('sfir_fixed', 'HDLSubsystem', 'sfir_fixed/symmetric_fir');
Set HDL-related model parameters for the symmetric_fir
subsystem.
hdlset_param('sfir_fixed/symmetric_fir', 'SharingFactor', 3) hdlset_param('sfir_fixed/symmetric_fir', 'InputPipeline', 5)
Save Model HDL Parameters
Verify that model parameters are set.
hdlsaveparams('sfir_fixed/symmetric_fir')
%% Set Model 'sfir_fixed' HDL parameters hdlset_param('sfir_fixed', 'HDLSubsystem', 'sfir_fixed/symmetric_fir'); % Set SubSystem HDL parameters hdlset_param('sfir_fixed/symmetric_fir', 'InputPipeline', 5); hdlset_param('sfir_fixed/symmetric_fir', 'SharingFactor', 3);
Save the model parameters to a MATLAB® script, sfir_saved_params.m
.
hdlsaveparams('sfir_fixed/symmetric_fir', 'sfir_saved_params.m')
Verify Saved Parameters
Reset HDL-related model parameters to default values.
hdlrestoreparams('sfir_fixed/symmetric_fir')
Verify that model parameters have default values.
hdlsaveparams('sfir_fixed/symmetric_fir')
%% Set Model 'sfir_fixed' HDL parameters hdlset_param('sfir_fixed', 'HDLSubsystem', 'sfir_fixed');
Restore the saved model parameters from sfir_saved_params.m
.
hdlrestoreparams('sfir_fixed/symmetric_fir', 'sfir_saved_params.m')
Verify that the saved model parameters are restored
hdlsaveparams('sfir_fixed/symmetric_fir')
%% Set Model 'sfir_fixed' HDL parameters hdlset_param('sfir_fixed', 'HDLSubsystem', 'sfir_fixed/symmetric_fir'); % Set SubSystem HDL parameters hdlset_param('sfir_fixed/symmetric_fir', 'InputPipeline', 5); hdlset_param('sfir_fixed/symmetric_fir', 'SharingFactor', 3);
Input Arguments
dut
— DUT subsystem name
character vector
DUT subsystem name, specified as a character vector, with full hierarchical path.
Example: 'modelname/subsysTarget'
Example: 'modelname/subsysA/subsysB/subsysTarget'
filename
— Name of file
character vector
Name of file containing previously saved HDL model parameters.
Example: '
mymodel_saved_params.m'
Version History
Introduced in R2012b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)