Main Content

hdlget_param

Return value of specified HDL block-level parameter for specified block

Syntax

p = hdlget_param(block_path,prop)

Description

p = hdlget_param(block_path,prop) gets the value of a specified HDL property of a block or subsystem, and returns the value to the output variable.

Input Arguments

block_path

Path to a block or subsystem in the current model.

Default: None

prop

A character vector that designates one of the following:

  • The name of an HDL block property of the block or subsystem specified by block_path.

  • 'all' : If prop is set to 'all', hdlget_param returns Name,Value pairs for HDL properties of the specified block.

Default: None

Output Arguments

p

p receives the value of the HDL block property specified by prop. The data type and dimensions of p depend on the data type and dimensions of the value returned. If prop is set to 'all', p is a cell array.

Examples

Open the sfir_fixed model. Set the OutputPipeline parameter in the model to 3 by using the hdlset_param function. Return the value of the OutputPipeline parameter to the variable p by using the hdlget_param function.

  open sfir_fixed
  hdlset_param(gcb,'OutputPipeline',3) 
  p = hdlget_param(gcb,'OutputPipeline')

p =

     3

Return HDL block parameters and values for the product block (m1) of the sfir_fixed model to the cell array p.

p = hdlget_param(gcb,'all')

p =

  1×18 cell array

  Columns 1 through 5

    {'Architecture'}    {'Linear'}    {'ConstrainedOutp…'}    {[0]}    {'DSPStyle'}

  Columns 6 through 10

    {'none'}    {'HandleDenormals'}    {'inherit'}    {'InputPipeline'}    {[0]}

  Columns 11 through 14

    {'LatencyStrategy'}    {'inherit'}    {'MantissaMultipl…'}    {'inherit'}

  Columns 15 through 18

    {'NFPCustomLatency'}    {[0]}    {'OutputPipeline'}    {[2]}

Tips

  • Use hdlget_param only to obtain the value of HDL block parameters (see HDL Block Properties: General for a list of block implementation parameters). Use hdldispmdlparams to see the values of HDL model parameters. To obtain the value of general model parameters, use the get_param function.

Introduced in R2010b