Main Content

hdlset_param

Set HDL-related parameters at model or block level

Syntax

hdlset_param(path,Name,Value)

Description

hdlset_param(path,Name,Value) sets HDL-related parameters in the block or model referenced by path. The parameters to be set, and their values, are specified by one or more Name,Value pair arguments. You can specify several name and value pair arguments in any order as Name1,Value1,…,NameN,ValueN.

Input Arguments

path

Path to the model or block for which hdlset_param is to set one or more parameter values.

Default: None

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'Name'

Name is a character vector that specifies one of the following:

  • A model-level HDL-related property. See Properties — Alphabetical List for a list of model-level properties, their data types and their default values.

  • An HDL block property, such as an implementation name or an implementation parameter. See HDL Block Properties: General for a list of block implementation parameters.

Default: None

'Value'

Value is a value to be applied to the corresponding property in a Name,Value argument.

Default: Default value is dependent on the property.

Examples

The following example uses the sfir_fixed model to demonstrate how to locate a group of blocks in a subsystem and specify the same output pipeline depth for each of the blocks.

open sfir_fixed;
prodblocks = find_system('sfir_fixed/symmetric_fir', 'BlockType', 'Product');
for ii=1:length(prodblocks), hdlset_param(prodblocks{ii}, 'OutputPipeline', 2), end;

Tips

  • When you set multiple parameters on the same model or block, use a single hdlset_param command with multiple pairs of arguments, rather than multiple hdlset_param commands. This technique is more efficient because using a single call requires evaluating parameters only once.

  • To set HDL block parameters for multiple blocks, use the find_system function to locate the blocks of interest. Then, use a loop to iterate over the blocks and call hdlset_param to set the desired parameters.

Introduced in R2010b