pcDefinePCell
pcDefinePCell(
l_cellIdentifier
l_formalArgs
body_of_code
)
=> d_cellViewId / nil
Description
Creates parameterized (super) master cellview. This function enables you to pass a SKILL definition for a Pcell including a list of its parameters.
Also, refer to dbDefineProc in the Virtuoso Studio Design Environment SKILL Reference.
Arguments
|
l_cellIdentifier
|
List containing the library database ID, cell name, view name, and view type. View type is optional and defaults to maskLayout. Valid Values: maskLayout, schematic, schematicSymbol
|
|
l_formalArgs
|
The parameter declaration section, containing a list of input parameters and their default values, all enclosed in parentheses. Each element of the list is itself a list containing a parameter symbol, its (optional) data type, and a default value. Do not use the list keyword, but enclose the parameters in parentheses instead.
In addition, The l_formalArgs argument to pcDefinePCell can include an expression. However, it is the value of that expression and not the expression itself, which gets associated as a default value of the corresponding parameter. As a result, such expression cannot be retrieved later on once the Pcell has been compiled (i.e. super master created).
|
|
|
You can specify l_formalArgs as:
Format 1: (S_paramName tS_paramType g_paramValue)
Format 2: (S_paramName g_paramValue)
where,
-
S_paramName: A symbol of the parameter name.
-
tS_paramType: Either a string or a symbol to represent the parameter type of a Pcell parameter.
You may or may not enclose the parameter type within quotes. Valid values include Boolean, int, float, and ilList. It is optional to include the parameter type (see the Caution note).
-
g_paramValue: Default value of a defined parameter.
The value specified must match the specified parameter type if the specified parameter type is defined as a Pcell parameter list.
Cadence recommends following the first format to define a Pcell parameter because this format can be comprehended clearly both by the graphical Pcell application and the end user of Pcell.
Examples
( Switch1 "float" 0.625 )
( Switch2 float 0.625 )
( Switch3 0.625 )
|
|
|
Consider specifying the data type of a Boolean argument as shown in the following example:
(is_orthogonal_boolean_arg "boolean" nil)
where, the data type of the is_orthogonal_boolean_arg argument has been specified as Boolean and the default value of this Boolean argument has been set to nil.
|
|
body_of_code
|
SKILL code for creating geometries and pins. You must provide code here. Enclose the code in a let or prog statement. If you use variables in the code, define them at the beginning of the let or prog statement. Using let gives faster performance than prog; prog allows multiple exits while let exits only at its end. Optionally, from within this code, you can call SKILL functions, application functions, and your own user-defined functions.
|
|
|
Calls to functions from within the body_of_code section are part of the Pcell, but the functions themselves are not part of the Pcell. These functions must be available each time the Pcell is evaluated. If a called function is not available when a Pcell is evaluated, the Pcell fails.
If you want the system to automatically load functions when it opens your library, include the functions in your libInit.il file. Do not load a file from within a Pcell.
|
Value Returned
|
d_cellViewId
|
The cellview ID of the parameterized (super) master is returned if the (super) master is created.
|
|
nil
|
Returned if the parameterized (super) master cellview is not created.
|
Examples
pcDefinePCell(
list( ddGetObj("tutorial") "ask" "layout"
) ; end of list for first argument
(
(layer string "metal1")
(width float 3.0)
(length float 6.0)
) ; end of pcell parameters
let(
() ; no local variables in this example
rodCreateRect (
?name "minMetal"
?width width
?layer layer
?length length
) ; end of rodCreateRect
) ; end of body_of_code let
) ; end of pcDefinePCell
This example creates a rectangle named minMetal on the metal1 layer, with a width equal to 3 and a length equal to six.
Related Topics
Safety Rules for Creating SKILL Pcells
Compile to Pcell
pcHIDefineParamCell
pcDefinePCell
Return to top