Set and View HDL Block Parameters

For a list of HDL block properties, see HDL Block Properties.

Set HDL Block Parameters from the GUI

You can view and set HDL-related block properties, such as implementation and implementation parameters, at the individual block level. To open the HDL Properties dialog box:

  1. Right-click the block and select HDL Code > HDL Block Properties.

    The HDL Properties dialog box opens.

  2. Modify the block properties as desired.

  3. Click OK.

Set HDL Block Parameters from the Command Line

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

For example, to set the sharing factor to 2 and the architecture to Tree for a block in your model:

  1. Open the model and select the block.

  2. Enter the following at the command line:

    hdlset_param (gcb, 'SharingFactor', 2, 'Architecture', 'Tree')

To view the architecture for the same block, enter the following at the command line:

hdlget_param(gcb,'Architecture')

You can also assign the returned HDL block parameters to a cell array. In the following example, hdlget_param returns all HDL block parameters and values to the cell array p.

 p = hdlget_param(gcb,'all')

p = 

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

See also hdlset_param and hdlget_param.

View All HDL Block Parameters

hdldispblkparams displays the HDL block parameters available for a specified block.

The following example displays HDL block parameters and values for the currently selected block.

hdldispblkparams(gcb,'all')

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HDL Block Parameters ('simplevectorsum/vsum/Sum of
Elements')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Implementation

	Architecture  : Linear

Implementation Parameters

	InputPipeline : 0
	OutputPipeline : 0

See also hdldispblkparams.

View Non-Default HDL Block Parameters

The following example displays only HDL block parameters that have non-default values for the currently selected block.

hdldispblkparams(gcb)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HDL Block Parameters ('simplevectorsum/vsum/Sum of
Elements')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Implementation

	Architecture : Linear

Implementation Parameters

	OutputPipeline : 3

See also hdldispblkparams.

Was this topic helpful?