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

In the following example hdlget_param returns the value of the HDL block parameter OutputPipeline to the variable p.

  p = hdlget_param(gcb,'OutputPipeline')

p =

     3

In the following example hdlget_param returns HDL block parameters and values for the current block to the cell array p.

p = hdlget_param(gcb,'all')

p = 

    'Architecture'    'Linear'    'InputPipeline'    [0]    'OutputPipeline'    [0]

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