Main Content

hdlrestoreparams

Restore block- and model-level HDL parameters to model

Description

example

hdlrestoreparams(dut) restores to the specified model the default block- and model-level HDL settings.

example

hdlrestoreparams(dut,filename) restores to the specified model the block- and model-level HDL settings from a previously saved file.

Examples

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.

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

collapse all

DUT subsystem name, specified as a character vector, with full hierarchical path.

Example: 'modelname/subsysTarget'

Example: 'modelname/subsysA/subsysB/subsysTarget'

Name of file containing previously saved HDL model parameters.

Example: 'mymodel_saved_params.m'

Introduced in R2012b