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',
adds and defines a custom parameter for your reference design with a text box that
displays the default value of the parameter.parameter_name
,'DisplayName',display_name
,'DefaultValue',default_value
)
addParameter('ParameterID',
adds and defines a custom parameter for your reference design with additional options
specified by one or more parameter_name
,'DisplayName',display_name
,'DefaultValue',default_value
,Name,Value
)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
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.
ParameterType
— Parameter widget
hdlcoder.ParameterType.Edit
(default) | hdlcoder.ParameterType.DropDown
| hdlcoder.ParameterType.Edit
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.
Choice
— Choice of parameter values
''
(default) | cell array of character vectors
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