Main Content

addParameter

Class: hdlcoder.ReferenceDesign
Namespace: hdlcoder

Add and define custom parameters for your reference design

Syntax

addParameter('ParameterID',parameter_name,'DisplayName',display_name,'DefaultValue',default_value)
addParameter('ParameterID',parameter_name,'DisplayName',display_name,'DefaultValue',default_value,Name,Value)

Description

addParameter('ParameterID',parameter_name,'DisplayName',display_name,'DefaultValue',default_value) adds and defines a custom parameter for your reference design with a text box that displays the default value of the parameter.

addParameter('ParameterID',parameter_name,'DisplayName',display_name,'DefaultValue',default_value,Name,Value) adds and defines a custom parameter for your reference design with additional options specified by one or more Name,Value pair arguments.

The custom parameters are optional. In the HDL Workflow Advisor Set Target Reference Design task, HDL Coder™ populates the Reference design parameters section with the custom parameters and the options that you specify.

Input Arguments

expand all

Custom parameter name, specified as a character vector.

Example: 'DUTPath'

Example: 'ChannelMapping'

Name that you want to display for the custom parameter in the HDL Workflow Advisor, specified as a character vector. This name appears in the Reference design parameters section in the Set Target Reference Design task.

Example: 'DUT Path'

Example: 'Channel Mapping'

Default value to set for the custom parameter, specified as a character vector. In the Set Target Reference Design task in the HDL Workflow Advisor, HDL Coder displays the default value of the custom parameter inside a text box.

Example: '1'

Name-Value Pair 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.

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

Specify the widget type to use for the parameter values. By default, theParameterType is a text box. If you specify the drop-down list for ParameterType, use the Choice property to list the parameter values as a cell array of character vectors.

Example: 'ParameterType',hdlcoder.ParameterType.Dropdown specifies a drop-down list with the values that the parameter can take.

The list of choices that you can specify for the custom parameter, specified as a cell array of character vectors. To specify this list, set ParameterType to hdlcoder.ParameterType.Dropdown.

Example: 'ParameterType',hdlcoder.ParameterType.Dropdown,'Choice',{'Rx', 'Tx'} specifies a drop-down list with Rx and Tx as the drop-down values.

Version History

Introduced in R2016b