CDF Parameters
CDF parameters are represented by g_cdfParamId objects, which are SKILL objects that you can manipulate like other SKILL database objects. You can use a g_cdfParamId to access information about a parameter by using the right arrow ( ->) operator. Although you can add any information to a g_cdfParamId, the object has elements to hold information that it maintains.
In addition to getting the g_cdfParamIds through the parameters element of a g_cdfDataId, you can also access a parameter by specifying:
g_cdfDataId->paramName
paramName is the name of the parameter. However, you must not create any user-defined properties on a g_cdfDataId that conflict with the name of a parameter on the g_cdfDataId.
Each parameter can use the following properties:
- use
- paramType
- defValue
- value
- prompt
- choices
- units
- editable
- callback
- parseAsNumber
- dontSave
- parseAsCEL
- storeDefault
- display
use
Specifies whether to use this parameter. The use attribute is context-specific and is evaluated when necessary. In this element, you can specify parameters that you are not using because of the value of other parameters, or because of the function being used. The use element must be a string.
-
If the element evaluates to a value other than
nil, the system uses the parameter. - If a value for the element exists, the system ignores the value.
-
If the element evaluates to
nil, the system does not use the parameter. -
If you do not specify this element,
tis assumed, so the system always uses the element.
paramType
Type of the parameter. Valid values for this field are
"string"
"int"
"float"
"radio"
"cyclic"
"Boolean"
"button"
"netSet"
The quotation marks are required. CDF checks that the parameter value matches the type specified. You must specify this field.
netSet type to store inherited connections in CDF. Inherited connections allow you to selectively override global signals in designs created in Virtuoso Schematic Editor. The override information is communicated through net expressions and netSet properties.defValue
Default value of the parameter. You must specify this element.
value
Current value of the parameter.
prompt
Prompt that appears on a form field when an application asks for the value of this parameter. The value for this field must be a string. You must specify this element.
choices
Possible values (a list of strings) of a cyclic or radio type parameter. Do not use this element for other types of parameters.
units
Unit type of the parameter. You often modify parameters that represent resistance, capacitance, length, time, power, and so forth, and expect to see the parameter value scaled to appropriate units (for example, pF, uM, dBm). Valid values for this element include the following strings:
"resistance"
"capacitance"
"inductance"
"conductance"
"time"
"frequency"
"power"
"powerDB"
"lengthMetric"
"lengthEnglish"
"angle"
"voltage"
"current"
"temperature"
The quotation marks are required. This element determines the unit’s suffix and scale factor to use when displaying the parameter value. For example, by setting a parameter’s units element to capacitance, the parameter value is displayed as 5 pF instead of 5e-12.
editable
Specifies whether a parameter is for display only. If set to nil, the element specifies a displayed parameter that you cannot change. (Other parameters’ callbacks can change the parameter.) Use this element only on int, float, and string type fields.
The editable field must be a string and is evaluated when necessary.
-
If the element evaluates to a value other than
nil, the parameter is editable. -
If the element evaluates to
nil, the parameter is grayed out when displayed as a form field. -
If you do not specify the element,
tis assumed, meaning that the element is editable.
callback
(Optional) Specifies the SKILL code to be executed whenever the value of a parameter changes. Using callback, you can cause any parameter’s value to affect any other parameter’s value. The value of this element must be a string.
parseAsNumber
Specifies a string type parameter whose value can evaluate to a floating-point number. These types of parameters often occur for circuit-level simulators that allow component parameters to be either numbers or expressions containing variables.
If you specify this element, the system parses the value of the parameter to check if the value is a number.
- If the value is a number, the system converts the string to a floating point number, converts the string to the most efficient notation (taking into account any units field specified), then reconverts the number into a string.
- If the parameter value is not a number, the system does no conversion.
For example, if the parameter value is the string 5.4e-12 and the parameter value has a units element of capacitance (that is, the suffix is F), the parameter value is converted to the string 5.4p before being displayed. However, if the parameter value is c1, no conversion takes place.
dontSave
Specifies that the parameter cannot be stored in any instance that corresponds to the component.
The value for the dontSave element must be a string. The system evaluates the element as necessary. If it evaluates to a value other than nil, the parameter is not stored. If you do not specify the element, nil is assumed and the parameter value is stored.
parseAsCEL
If set to yes, the associated CDF parameter is processed as a CDF Expression Language (CEL) expression. The parameter must be a string. If the expression resolves to a numeric value (the usual case), the parseAsNumber flag should also be set to yes.
storeDefault
Specifies whether the parameter default value is saved as a property of the instance. All tools based on the Cadence Analog Design Environment software use the CDF to find default values if no property exists on an instance.
If set to no (the default) or don’t use, a property is not saved on the instance when the parameter value is the default. Also, if the default value of the parameter changes, all instances that use the default automatically get the new default value. (To see the change in an open window, you must select Window – Redraw from the Cadence menu.)
If set to yes and the parameter value is set to the same value as the default, a property is saved on the instance. One disadvantage of this attribute is that if the default value of a parameter changes, the instances that use the default do not automatically change to the new default. If you are a user of the Open Simulation Software (OSS) system, and you used to set this attribute to yes because you could only netlist using instance properties, you can now set it to no because OSS users now have the option of using CDF.
display
Determines if this parameter is displayed in forms that display CDF parameters, such as the Edit Object Properties form or the Add Instance form. You must enter t, nil, or a SKILL expression that evaluates to t or nil in this element to determine if this parameter is to be displayed. If the field evaluates to non-nil (the default), the parameter is displayed. If the element evaluates to nil, the parameter is not displayed.
Example
You can use the g_cdfDataId baseCell from the previous example to examine the parameters in the base-level cell CDF description of the Schottky transistor in the analog library. For example, that cell has a parameter m. You can access information about m in the following manner:
baseCell->m->prompt
"Multiplier"
baseCell->m->editable
nil
baseCell->m->display
"artParameterInToolDisplay(’m)"
baseCell->m->paramType
"string"
Return to top