pcDefinePPCell
pcDefinePPCell(l_cellIdentifier l_overrideCodeParams l_defaultCodeParams ls_formalArgs body_of_code) =>d_cellViewId/nil
Description
Creates a parameterized Pcell master cellview (P2cell) that enables you to pass the SKILL definition for a Pcell, including a list of its arguments, similar to the pcDefinePCell function. This function also accepts a code argument declaration list and a code argument override list, where the code parameter can be used in the Pcell code body to create multiple Pcell super masters from a single Pcell code.
Within pcDefinePPCell, the override code parameter is always a simple variable, which receives the input provided by the caller of pcDefinePPCell. This will always be the use model of P2cell because there is always a driver function that calls it. The function should not be used as a top-level function (not inside a procedure) because that will lose the purpose of the new parameterization feature.
Arguments
|
A list that contains the library database ID, cell name, view name, and view type. View type is optional and defaults to |
|
|
A SKILL list in the DPL format. Each parameter within the DPL is represented by a pair of s_codeParamName and g_codeParamValue. Only the value can be a SKILL expression.
The caller of
|
|
|
A list that contains one or many code parameter specification. Each code parameter specification is defined in the following format: (S_codeParamName [S_codeParamType] g_codeParamValue)
Valid values:
The caller of
The declared code parameter is in a simple list format. This format is consistent with the declaration of Pcell parameters used by pcDefinePCell. |
|
|
This declaration cannot contain another SKILL expression inside it. |
|
|
A list of parameters defining a Pcell parameter set. There are the following two ways to define the Pcell parameter set.
|
|
|
SKILL code for creating geometries and pins. You must provide code here. Enclose the code in a 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
You can access the name and value of any code parameter using |
Value Returned
|
The cellview ID of the parameterized super master if the Pcell is successfully compiled. |
|
Examples
procedure( createPmos(xVal) let((libName cellName ppcDef overrideCodeParams ) ; Setup library and cell name, and the override code parameter
; values
libName = "PcellDemo"
cellName = "pmos"
overrideCodeParams = list( nil
'layerName "Via2" 'rectWidth 3*xVal 'createGate t)
; Calls myMakeMos to create one Pcell super master
myMakeMos( libName cellName "layout" "maskLayout"
overrideCodeParams)
; Update the cell name and one of the override code parameter value
cellName = "pmos_ng"
overrideCodeParams->createGate = nil
; Calls myMakeMos to create another Pcell super master
myMakeMos( libName cellName "layout" "maskLayout"
overrideCodeParams)
)
)
procedure( myMakeMos(libName cellName viewName viewType @optional (overrideCPs nil))
let((smId)
; Use pcDefinePPCell to create a Pcell that accepts code parameters
smId = pcDefinePPCell(
; Define super master's identification
list(ddGetObj(libName) cellName viewName viewType )
; Define variable to accept override code parameters
overrideCPs
; Define code parameters
( ( layerName string "Metal")
( rectWidth float 1.0 )
( createGate boolean nil )
)
; Define Pcell parameters
( (dd1 "none" )
(sd1 "none" )
(w 5.0)
(l 1.0)
(fingers 1 )
)
; Define Pcell code
let( (cv rect rectW createGate)
cv = pcCellView
sd1 = cv~>parameters~>sd1
dd1 = cv~>parameters~>dd1
w = aelNumber(cv~>parameters~>w)
l = aelNumber(cv~>parameters~>l)
fingers = cv~>parameters~>fingers
; Leverage code parameter to create different
; contents for a Pcell super master
createGate = pcGetCodeParamValue(cv "createGate")
when( createGate
layerName = pcGetCodeParamValue(cv "layerName")
rectW = pcGetCodeParamValue(cv "rectWidth")
rect = dbCreateRect(cv
list(layerName "drawing")
list( 2:2 3:2+round(rectW))))
)
)
smId
)
)
This example develops multiple Pcell super masters by using the P2cell method.
Related Topics
Return to top