Main Content


Set HDL-related parameters at model or block level



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 arguments. You can specify several name and value arguments in any order as Name1,Value1,…,NameN,ValueN.


collapse all

This example uses the sfir_fixed model to show 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;

Input Arguments

collapse all

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

Example: "modelname/subsysA/blockName"

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: hdlset_param("sfir_fixed", TargetLanguage = "Verilog")

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: hdlset_param("sfir_fixed", "TargetLanguage", "Verilog")

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

  • A model configuration parameter, that you alternatively specify in the Configuration Parameters dialog box.

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

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


  • When you set multiple parameters on the same model or block, use a single hdlset_param command that has 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 parameters.

Version History

Introduced in R2010b