MATLAB Help Center
Restore block- and model-level HDL parameters to model
hdlrestoreparams(dut)
hdlrestoreparams(dut,filename)
hdlrestoreparams(dut) restores to the specified model the default block- and model-level HDL settings.
dut
example
hdlrestoreparams(dut,filename) restores to the specified model the block- and model-level HDL settings from a previously saved file.
filename
collapse all
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.
symmetric_fir
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.
%% 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.
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')
%% 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
DUT subsystem name, specified as a character vector, with full hierarchical path.
Example: 'modelname/subsysTarget'
'modelname/subsysTarget'
Example: 'modelname/subsysA/subsysB/subsysTarget'
'modelname/subsysA/subsysB/subsysTarget'
Name of file containing previously saved HDL model parameters.
Example: 'mymodel_saved_params.m'
'
Introduced in R2012b
hdlsaveparams
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
Europe
Asia Pacific
Contact your local office