1
Custom Constraints Functions
This chapter covers details about the SKILL functions available for the Constraints Manager and Circuit Prospector assistants. It contains sections on the following topics:
- Input and Output Parameters for Custom Constraints Functions
- Pre-Defined Symbols
- Constraint Manager Assistant Customization SKILL Commands
- Circuit Prospector Assistant Customization SKILL Commands
- Rapid Analog Prototype Category (Circuit Prospector) Customization SKILL Commands
- Constraint Generator Customization SKILL Commands
- Table Editor SKILL Commands
Constraint Integration and Third Party Tools
Any non-Cadence tools, that are integrated into DFII, can also register their proprietary constraints within the Constraint system using a config.xml file as discussed in the
For more information on this feature, contact your local Cadence representative.
Constraint Cache
The constraint cache is a collection of constraint data that is built on demand for a given design and contains all the constraints related to that design.
There are two distinct APIs, ciCacheFind which only returns an already created cache, and ciCacheGet which will either return an already created cache or force one to be built.
ciCacheFind and ciCacheGet will result in some applications wanting to use ciCacheFind and defer all constraint API usage when a cache has not been built by another application. Other applications may only use ciCacheGet.Input and Output Parameters for Custom Constraints Functions
cache
Is defined as: u_cache | (libName cellName viewName)
u_cache
Is a SKILL user type object that references a constraint cache.
u_constraint
Is a SKILL user type object that references a constraint.
parameter_value
A parameter value is a SKILL atom or list that contains a legal value for the .
- Enumerated parameters and arrays are expressed as homogeneous value type lists.
-
Boolean values are evaluated to SKILL
t/nilfor true/false respectively (and"TRUE"/"FALSE"strings both evaluate tot, while0/1evaluate tot/nilrespectively).
When is specified in a parameter, the atom members are converted to the specified values using standard arithmetic conversion.
Strings are not converted to and from numerals. For example, "1" is not converted to the integer 1 and the integer 1 is not converted to the string "1".
parameter
Is defined as: (name_string [] parameter_value)
A constraint parameter is a list that contains the parameter name and parameter_value and, optionally, a .
parameter_list
Is defined as a list of constraint parameters:
(constraint_parameter1 constraint_parameter2 ...)
constraint_member
Is defined as: ( [ ])
A constraint member is a list containing the member name and type and, optionally, a list of member . Constraints always refer to constraint members using a name and type pair to avoid conflicts in design namespaces between design objects: the pair (name type) creates a unique namespace for any design hierarchy.
design_object
Is defined as: ( )
-
A design object is similar to a constraint_member
, in that it is always a design_object_namedesign_object_typepair and it cannot have parameters. -
A design object is part of the constraint cache
if any constraint has been set on that design object. - A design object contains references to all constraints that refer to it as a member.
design_object_name
A member name is a legal design object name in the CDBA name space.
member_list
Is defined as a list of constraint members:
(constraint_member1 constraint_member2 ...)
design_object_list
Is defined as:
A design object list is a list of design objects.
Pre-Defined Symbols
The following is a list of constraint pre-defined symbols:
design_object_type
Is defined as: inst | net | modgen | netClass | cluster | pin | instTerm | master | terminal | boundary | netClassGroup | symmetry | diffPair | matchedLength | bus
A design object type is a symbol that describes the database object type of a design object.
The design objects type, such as inst, net, pin, instTerm, terminal, and boundary are used when specifying those types of design object as members of a constraint.
ciConCreate(cache 'diffPair ?members list( list("N1" 'net) list("N2" 'net)))
It specifies two nets N1 and N2 as members of a Diff Pair constraint.
The modgen, netClass, cluster, netClassGroup, symmetry, diffPair, matchedLength, and bus are used when specifying those type of constraints as members of another constraints. These constraints can also be members of other constraints. For example, Symmetry (on Modgens), Guardring (on Clusters) or to create hierarchical relationships like a Cluster comprising of other Clusters.
ciConCreate(cache 'symmetry ?members list( list("Moden_1" 'modgen)))
It specifies Modgen constraint Modgen_1 as a member of a Symmetry constraint.
ciConCreate(cache 'cluster ?members list( list("I0" 'inst) list("Cluster_2" 'cluster)))
It specifies instance I0 and cluster Cluster_2 as members of a Cluster constraint.
parameter_type
Is defined as: int | float | string | intrange | floatrange | enum | enumset | stringset
constraint_type
A list of default constraint types corresponding to SKILL names is illustrated below:
| Constraint Type | SKILL Name |
|---|---|
For information on the current list of Constraint Manager constraints, see
parameter_key
member_key
name_key
axis_key
axis
Is defined as: axis_name_string []
Constraint Manager Assistant Customization SKILL Commands
The following SKILL commands are available for customizing the Constraint Manager assistant:
ciAddHierarchicalNotes
ciAddHierarchicalNotes(t_libName t_cellName t_viewName[g_hierarchical] ) => t / nil
Description
Adds notes to the templates and constraints for a single cellview or all along the hierarchy beginning from the given cellview.
See also ciUpdateHierarchicalNotes and ciRemoveHierarchicalNotes.
Arguments
Value Returned
Examples
To add notes to the entire hierarchy starting from the specified cellview:
ciAddHierarchicalNotes("myLib" "myCellName" "myView" t)
ciAddLeadingSlash
ciAddLeadingSlash(t_name[?skipEmptyg_skipEmpty] ) =>t_name
Description
Adds a forward slash (/) to the beginning of the passed string if it does not already have one.
Arguments
Value Returned
Examples
ciAddLeadingSlash("NM1")
=> "/NM1"
ciAddLeadingSlash("/I1/NM1")
=> "/I1/NM1"
ciAddLeadingSlash("")
=> ""
ciAddLeadingSlash("" ?skipEmpty nil)
=> "/"
ciAddProcessRules
ciAddProcessRules(d_Idl_rules [ t_parameterType ] ) =>t/nil
Description
Adds the specified process rules to the front of the rules associated with the given object.
By default, the process rules for all objects are derived from the foundry constraint group in the technology database. These rules can however be overridden for specific objects or for a given design.
Process rule overrides on any object apply to other objects following a hierarchical precedence. For example, when applied to nets they will affect all routes and shapes that belong to that net, and when applied to routes they will affect all the shapes (paths, pathSegs) on that route. In Virtuoso, applications follow the precedence of: wires (paths/pathSegs/vias/guides) -> routes -> nets -> net classes -> design, when looking up constraints on objects (defaulting to foundry). The lookup is further guided by the ordering of constraints within any one constraintGroup (hard lookup) and the precedence ordering of the constraint groups themselves (soft lookup).
ciAddProcessRules SKILL command only applies the hard lookup find, that is only to those constraints that are within any single constraintGroup.- The process rule overrides constraint in the Virtuoso Unified Custom Constraints User Guide.
- Process Rules for Objects in the Virtuoso Unified Custom Constraints User Guide.
Arguments
Value Returned
Example
To add a spacing to Group to Outside Group on a netclass:
ciAddProcessRules(netClassCon list(list("minSpacing" "Metal1" .2 )) "TransReflexive")
To define default values for the top and bottom layers of a constraint group called myRG1:
ciAddProcessRules(myRG1 '( ("minWidth" "Metal1" 1.0) ("minWidth" "Metal2" 1.2) ("validLayers" nil ("Metal1" "Metal2" "Metal3"))))
ciAddRuleGroup
ciAddRuleGroup( [d_techID|d_cellViewID]t_name) =>t/nil
Description
Creates an oaConstraint group, with a given name, for technology or design files.
The first argument given should be either d_techID or d_cellViewID, followed by t_name.
Arguments
Value Returned
Example
tf = techGetTechFile(geGetEditCellView())
cg1 = ciAddRuleGroup(tf "cg1")
To create a new constraint group called myRG1:
cv=geGetEditCellView()
myRG1=ciAddRuleGroup(cv "myRG1")
The new constraint group can now be selected as the Default Group (Constraint Group) on the Constraint Parameter Editor. Default values for the myRG1 parameters can be defined using the command.
ciAddTrailingSlash
ciAddTrailingSlash(t_name[?skipEmptyg_skipEmpty] ) =>t_name
Description
Adds a forward slash (/) to the end of the passed string if it does not already have one.
Arguments
|
The name to which the forward slash needs to be added at the end. |
|
Value Returned
Examples
ciAddTrailingSlash("NM1")
=> "NM1/"
ciAddTrailingSlash("/I1/NM1/")
=> "/I1/NM1/"
ciAddTrailingSlash("")
=> ""
ciAddTrailingSlash("" ?skipEmpty nil)
=> "/"
ciAllCellViewsInHierarchy
ciAllCellViewsInHierarchy(d_cellViewDBId[t_pathToCurrentCellView] [t_pathFilter] [t_depth] [s_predicate] ) => list /nil
Description
Returns a list of disembodied property lists containing the path and database ID of each cellview in the hierarchy, or to a specific depth starting from a given cellview and path to that cellview.
Arguments
Value Returned
|
List of all cellviews and paths below the current cellview up to the specified depth. |
|
Example
allCVs = ciAllCellViewsInHierarchy(geGetEditCellView())
((nil hierPath "" cellView db:0xf0f1e492)
(nil hierPath "/I16" cellView db:0xf0f1b192)
(nil hierPath "/I18" cellView db:0xf0f1b192)
(nil hierPath "/I17" cellView db:0xf0f1b192)
(nil hierPath "/I17/I22" cellView db:0xf0f1b194)
(nil hierPath "/I17/I23" cellView db:0xf0f1b198)
(nil hierPath "/I15" cellView db:0xf0f1ac12)
)
I17cv = nthelem(4 allCVs)
I17CVs = ciAllCellViewsInHierarchy(I17cv "/I17")
((nil hierPath "/I17" cellView db:0xf0f1b192)
(nil hierPath "/I17/I22" cellView db:0xf0f1b194)
(nil hierPath "/I17/I23" cellView db:0xf0f1b198)
)
allCVsI17 = ciAllCellViewsInHierarchy(geGetEditCellView() "" "/I17")
((nil hierPath "" cellView db:0xf0f1e492)
(nil hierPath "/I17" cellView db:0xf0f1b192)
(nil hierPath "/I17/I22" cellView db:0xf0f1b194)
(nil hierPath "/I17/I23" cellView db:0xf0f1b198)
)
allCVsDepth1 = ciAllCellViewsInHierarchy(geGetEditCellView() "" "" 1)
((nil hierPath "" cellView db:0xf0f1e492)
(nil hierPath "/I16" cellView db:0xf0f1b192)
(nil hierPath "/I18" cellView db:0xf0f1b192)
(nil hierPath "/I17" cellView db:0xf0f1b192)
(nil hierPath "/I15" cellView db:0xf0f1ac12)
)
;;Only look into cellview which are part of the library AnalogLib.
procedure(myPredicate(libName cellName viewName depth)
!exists(x '(("ether_adcflash_RAD90" "adc_sample_hold" "schematic")
("ether_adcflash_RAD90" "adcflash_comparator_actr" "schematic")
("ether_adcflash_RAD90" "and2_1x_hv" "schematic")
("ether_adcflash_RAD90" "clkbuf_2x_hv" "schematic")
("ether_adcflash_RAD90" "inv_2x_hv" "schematic")
("ether_adcflash_RAD90" "nand2_2x_hv" "schematic")
("ether_adcflash_RAD90" "or2_2x_hv" "schematic")
("ether_adcflash_RAD90" "sheet_a" "symbol")
("ether_adcflash_RAD90" "sheet_aa" "symbol")
("ether_adcflash_RAD90" "sheet_b" "symbol"))
equal(x list(l c v)))
)
ciAllCellViewsInHierarchy(cv currentHierPath pathFilter depth 'myPredicate)
ciAllCellViewsInHierarchy(geGetEditCellView(window(3)) "" "" -1 'testPredicate)
((nil hierPath "" cellView db:0x17f0b69a)
(nil hierPath "/ADCFLASH_REF_LADDER" cellView db:0x17f0711a)
(nil hierPath "/ADCFLASH_REF_LADDER/I2" cellView db:0x17f0af1a)
(nil hierPath "/ADCFLASH_REF_LADDER/R1" cellView db:0x17f0949a)
(nil hierPath "/ADCFLASH_REF_LADDER/R11" cellView db:0x17f0949a)
(nil hierPath "/ADCFLASH_REF_LADDER/R12<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R13<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R17<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R18<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R19<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R20<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R21<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R3<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R7<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R8<4:0>" cellView db:0x17f09a9a)
)
ciAllCellViewsInHierarchy(cv currentHierPath pathFilter depth)
ciAllCellViewsInHierarchy(geGetEditCellView(window(3)) "" "" -1 )
((nil hierPath "" cellView db:0x17f0b69a)
(nil hierPath "/ADCFLASH_REF_LADDER" cellView db:0x17f0711a)
(nil hierPath "/ADCFLASH_SAMPLE_HOLD" cellView db:0x17f06a1a)
(nil hierPath "/I22" cellView db:0x17f0619a)
(nil hierPath "/I37" cellView db:0x17f0531a)
(nil hierPath "/I38" cellView db:0x17f04d1a)
(nil hierPath "/I39" cellView db:0x17f04d1a)
(nil hierPath "/I4" cellView db:0x17f0619a)
(nil hierPath "/I40" cellView db:0x17f0499a)
(nil hierPath "/I41" cellView db:0x17f0499a)
(nil hierPath "/I42" cellView db:0x17f0531a)
(nil hierPath "/I5" cellView db:0x17f0619a)
(nil hierPath "/I6" cellView db:0x17f0619a)
(nil hierPath "/I7" cellView db:0x17f0619a)
(nil hierPath "/I8" cellView db:0x17f0619a)
(nil hierPath "/I9" cellView db:0x17f0619a)
(nil hierPath "/ADCFLASH_REF_LADDER/I2" cellView db:0x17f0af1a)
(nil hierPath "/ADCFLASH_REF_LADDER/R1" cellView db:0x17f0949a)
(nil hierPath "/ADCFLASH_REF_LADDER/R11" cellView db:0x17f0949a)
(nil hierPath "/ADCFLASH_REF_LADDER/R12<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R13<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R17<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R18<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R19<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R20<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R21<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R3<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R7<1:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_REF_LADDER/R8<4:0>" cellView db:0x17f09a9a)
(nil hierPath "/ADCFLASH_SAMPLE_HOLD/I58" cellView db:0x17f04d1a)
(nil hierPath "/I22/I12" cellView db:0x17f0431a)
(nil hierPath "/I22/I13" cellView db:0x17f0431a)
(nil hierPath "/I22/I16" cellView db:0x17f03d9a)
(nil hierPath "/I22/I17" cellView db:0x17f03d9a)
(nil hierPath "/I22/R2" cellView db:0x17f09a9a)
(nil hierPath "/I22/R3" cellView db:0x17f09a9a)
(nil hierPath "/I4/I12" cellView db:0x17f0431a)
(nil hierPath "/I4/I13" cellView db:0x17f0431a)
(nil hierPath "/I4/I16" cellView db:0x17f03d9a)
(nil hierPath "/I4/I17" cellView db:0x17f03d9a)
(nil hierPath "/I4/R2" cellView db:0x17f09a9a)
(nil hierPath "/I4/R3" cellView db:0x17f09a9a)
(nil hierPath "/I5/I12" cellView db:0x17f0431a)
(nil hierPath "/I5/I13" cellView db:0x17f0431a)
(nil hierPath "/I5/I16" cellView db:0x17f03d9a)
(nil hierPath "/I5/I17" cellView db:0x17f03d9a)
(nil hierPath "/I5/R2" cellView db:0x17f09a9a)
(nil hierPath "/I5/R3" cellView db:0x17f09a9a)
(nil hierPath "/I6/I12" cellView db:0x17f0431a)
(nil hierPath "/I6/I13" cellView db:0x17f0431a)
(nil hierPath "/I6/I16" cellView db:0x17f03d9a)
(nil hierPath "/I6/I17" cellView db:0x17f03d9a)
(nil hierPath "/I6/R2" cellView db:0x17f09a9a)
(nil hierPath "/I6/R3" cellView db:0x17f09a9a)
(nil hierPath "/I7/I12" cellView db:0x17f0431a)
(nil hierPath "/I7/I13" cellView db:0x17f0431a)
(nil hierPath "/I7/I16" cellView db:0x17f03d9a)
(nil hierPath "/I7/I17" cellView db:0x17f03d9a)
(nil hierPath "/I7/R2" cellView db:0x17f09a9a)
(nil hierPath "/I7/R3" cellView db:0x17f09a9a)
(nil hierPath "/I8/I12" cellView db:0x17f0431a)
(nil hierPath "/I8/I13" cellView db:0x17f0431a)
(nil hierPath "/I8/I16" cellView db:0x17f03d9a)
(nil hierPath "/I8/I17" cellView db:0x17f03d9a)
(nil hierPath "/I8/R2" cellView db:0x17f09a9a)
(nil hierPath "/I8/R3" cellView db:0x17f09a9a)
(nil hierPath "/I9/I12" cellView db:0x17f0431a)
(nil hierPath "/I9/I13" cellView db:0x17f0431a)
(nil hierPath "/I9/I16" cellView db:0x17f03d9a)
(nil hierPath "/I9/I17" cellView db:0x17f03d9a)
(nil hierPath "/I9/R2" cellView db:0x17f09a9a)
(nil hierPath "/I9/R3" cellView db:0x17f09a9a)
)
ciAxisCreate
ciAxisCreate(u_cachet_axisName [l_parameterList] ) =>t/nil
Description
Arguments
|
The constraint |
|
|
The direction = "horizontal" | "vertical" axisLocation = "any" | "fixed" coordinate (only valid if location is "fixed") Examples: ; Create a movable horizontal axis. ciAxisCreate(cache "hAxis" '(("direction" "horizontal") ("axisLocation" "any"))) ; Create a fixed, vertical axis. ciAxisCreate(cache "vAxis" '(("direction" "vertical") ("axisLocation" "fixed") ("coordinate" 10))) |
Value Returned
ciAxisDelete
ciAxisDelete(u_cache t_axisName[g_forceDelete] ) =>t/nil
Description
Deletes an axis from the specified cache.
Arguments
|
The constraint |
|
|
By default, an axis will not be deleted if it is being used by one or more constraints. Pass t to force the axis to be destroyed. Any constraints attached to the axis will be updated to use a default axis. |
Value Returned
ciAxisExists
ciAxisExists(u_cache t_axisName) =>t/nil
Description
Returns t (true) if the named axis exists in the cache. Access to axes is only provided through the axis name. No direct reference to an axis object is provided.
Arguments
|
The constraint |
|
Value Returned
ciAxisListCon
ciAxisListCon(u_cache t_axisName) =>u_constraint/nil
Description
Lists all the constraints that are attached to a given axis.
Arguments
Value Returned
|
No axes exist in the cache or no constraint is associated with the given axis. |
ciAxisListParams
ciAxisListParams(u_cache t_axisName[g_includeDefaults] ) => parameterList /nil
Description
Lists the parameters associated with an axis.
Arguments
|
Optional argument. A Boolean value ( |
Value Returned
ciAxisReplaceParams
ciAxisReplaceParams(u_cache t_axisName l_parameterList) =>t/nil
Description
Replaces all axis constraint parameters with a new set of parameters.
Arguments
|
The direction = "horizontal" | "vertical" axisLocation = "any" | "fixed" coordinate (only valid if location is "fixed") Examples: ; Replace a movable horizontal axis. ciAxisReplaceParams(cache "hAxis" '(("direction" "horizontal") ("axisLocation" "any"))) ; Replace a fixed, vertical axis. ciAxisReplaceParams(cache "vAxis" '(("direction" "vertical") ("axisLocation" "fixed") ("coordinate" 10))) |
Value Returned
ciCacheCallbackRegister
ciCacheCallbackRegister(l_callbackPropList) =>t/nil
Description
Arguments
Value Returned
|
The registration failed and the callback registry was not updated. |
Examples
;; Definition of a pre-save callback:
(defun myPreSaveCallback (cache)
;; Do something useful with the cache here.
;; Do not call any save function here.
(printf "Cache for design %L is about to be saved." cache->design))
;;Definition of a post-save callback:
(defun myPostSaveCallback (cache saved)
;; Do something useful with the saved cache.
;; Do not call any save function here.
;; For the time being 'saved' always retuns 't'
(printf "Cache for design %L has been saved [%L].\n" cache->design saved))
;; Definition of the callback lists
preSaveCB = '(nil callback myPreSaveCallback type ciPreSaveCallback enable t)
postSaveCB = '(nil callback myPostSaveCallback type ciPostSaveCallback)
;; Register the callbacks
(mapcar 'ciCacheCallbackRegister (list preSaveCB postSaveCB))
;; If the callbacks were not registered already, this call returns (t t)
;; In this case, a second call will return (nil nil) because the callback
;; registry will not be changed.
;; Currently only the preSaveCB will be called on saved, because the postSaveCB is disabled
;; To enable it, we need to call ciCacheCallbackUpdate.
postSaveCB->enable = t
(ciCacheCallbackUpdate postSaveCB)
;; returns 't'. Now the callback is enabled. A second call returns 'nil' because the callback registry will not be changed.
;; To unregister the callbacks
(mapcar 'ciCacheCallbackUnregister (list preSaveCB postSaveCB))
;; returns (t t). A second call returns (nil nil), because the callback registy
;; will not be changed.
;; Calls to ciCacheCallbackUpdate for these callbacks will return nil.
;; These callbacks need to be registered again to be re-enabled.
ciCacheCallbackUnregister
ciCacheCallbackUnregister(l_callbackPropList) =>t/nil
Description
Unregisters a previously registered callback.
Arguments
Value Returned
|
The operation failed and the callback registry was not updated. |
Example
Refer to the Examples given in the ciCacheCallbackRegister section.
ciCacheCallbackUpdate
ciCacheCallbackUpdate(l_callbackPropList) =>t/nil
Description
Updates a registered callback.
Arguments
Value Returned
|
The operation failed and the callback registry was not updated. |
Example
Refer to the Examples given in the ciCacheCallbackRegister section.
ciCacheCellName
ciCacheCellName(u_cache) =>t_cellName
Description
Returns the cell name of the specified constraint cache. The cache library, cell, and view refers to the schematic, configuration, physical configuration, or layout view that the constraint cache is associated with.
Arguments
Value Returned
|
The cell name of the associated schematic, configuration, physical configuration, or layout. |
Example
Return the cell name of the current constraint cache:
ciCacheCellName(ciGetCellView())
=> "block1"
ciCacheConstraintCellName
ciCacheConstraintCellName(u_cache) =>t_cellName
Description
Returns the constraint cell name of the specified constraint cache. The constraint library, cell, and view refers to the storage location of the constraints, which might be a constraint view or layout.
Arguments
Value Returned
Example
Return the constraint cell name of the current constraint cache:
ciCacheConstraintCellName(ciGetCellView())
=> "block1"
ciCacheConstraintLibName
ciCacheConstraintLibName(u_cache) =>t_libName
Description
Returns the constraint library name of the specified constraint cache. The constraint library, cell, and view refers to the storage location of the constraints, which might be a constraint view or layout.
Arguments
Value Returned
Example
Return the constraint library name of the current constraint cache:
ciCacheConstraintLibName(ciGetCellView())
=> "overview"
ciCacheConstraintViewName
ciCacheConstraintViewName(u_cache) =>t_viewName
Description
Returns the constraint view name of the specified constraint cache. The constraint library, cell, and view refers to the storage location of the constraints, which might be a constraint view or layout.
Arguments
Value Returned
Example
Return the constraint view name of the current constraint cache:
ciCacheConstraintViewName(ciGetCellView())
=> "constrBlock"
ciCacheDiscardEdits
ciCacheDiscardEdits(u_cache) =>u_cache/ nil
Description
Discards changes made to the constraint cache in the memory and returns a new constraint cache ID. This function does not apply to layout constraint caches.
Arguments
Value Returned
|
A new constraint cache ID if the changes made to the constraint cache could be discarded successfully. |
|
Example
Discard the memory changes made to the current constraint cache:
cache = ciGetCellView()
when( ciCacheIsModified(cache)
cache = ciCacheDiscardEdits(cache)
)
ciCacheFind
ciCacheFind(d_dbCellViewId|t_libName t_cellName t_viewName) =>u_cache/ nil
Description
Finds an existing constraint cache for a given design specified using library, cell, and view names. Alternatively, pass the dbCellViewId of the required design.
Arguments
Value Returned
|
Returns the constraint cache if the cache has already been built (see |
|
Examples
Find a cache using lib/cell/view names:
cache = ciCacheFind("myLib" "myDesign" "schematic")
Find a cache using the cellview in the current editor window:
cache = ciCacheFind(geGetEditCellView())
ciCacheGet
ciCacheGet(d_dbCellViewId|t_libName t_cellName t_viewName) =>u_cache/ nil
Description
Finds an existing constraint cache. If it cannot find an existing cache, it creates and populates a cache for the given design, using library, cell, and view names. Alternatively, pass the dbCellViewId of the required design.
Arguments
Value Returned
|
Returns the constraint cache if the cache has already been built through a previous call to |
|
|
If the specified |
Example
cv = geGetEditCellView()
ciCacheGet(cv)
ci:0x252c2d90
ciCacheGet(cv->libName cv->cellName cv->viewName)
ci:0x252c2d90
ciCacheGetAllNetNames
ciCacheGetAllNetNames(g_cache[?expandNamesg_expandNames] ) =>l_result
Description
Returns a sorted list of all the net names in the cellview associated with the constraints cache. By default, the iterated net names are expanded.
Arguments
|
Used to control whether the iterated names should be expanded. By default, it is set to |
Value Returned
|
Returns a sorted list of the net names in the cellview. The expansion of iterated net names depends on the Boolean value set for the g_expandNames argument. |
Examples
-
To get a list of all net names in the cellview and expand the iterated net names:
cache = ciGetCellView()
ciCacheGetAllNetNames(cache)
( "netA" "netB" "netC<0>" "netC<1>" "netD" )
-
To get a list of all net names in the cellview and not expanded iterated net names:
ciCacheGetAllNetNames(cache ?expandNames nil)
( "netA" "netB" "netC<0:1>" "netD" )
ciCacheGetCellView
ciCacheGetCellView(g_cache) =>d_cellviewID/ nil
Description
Returns the cellview associated to the specified cache.
Arguments
Value Returned
Examples
cv = ciCacheGetCellView(ciGetCellView())
dbFindAnyInstByName(cv "instanceName")
ciCacheGetEnabledNotifications
ciCacheGetEnabledNotifications(
)
=> t_listNotifications / nil
Description
Returns a list of cache notifications that ciCacheNotifications enabled.
Arguments
Value Returned
|
List of notification symbols is returned if notifications have been enabled. |
|
Examples
ciCacheNotifications('disable '(NotifyAll))
t
ciCacheGetEnabledNotifications()
nil
Returns nil because all notifications are disabled.
ciCacheNotifications('enable '(WarnDesignInfoUpdates InfoOnCacheEditModeChanges))
t
ciCacheGetEnabledNotifications()
(InfoOnCacheEditModeChanges WarnDesignInfoUpdates)
Returns a list of notification symbols that are enabled.
ciCacheIsLayout
ciCacheIsLayout(g_cache) =>t/nil
Description
Returns t if the passed cache is a layout cache.
Arguments
Value Returned
Example
schCache = ciCacheGet("amsPLL" "vco" "schematic")
layCache = ciCacheGet("amsPLL" "vco" "layout")
ciCacheIsLayout(schCache)
nil
Retuns nil as the passed cache is not a layout cache.
ciCacheIsLayout(layCache)
t
Returns t as the passed cache is a layout cache.
ciCacheIsModified
ciCacheIsModified(u_cache) =>t/nil
Description
Checks whether a constraint cache has been modified.
Arguments
Value Returned
Example
The following saves a constraint cache if it has been modified:
cache = ciGetCellView()
when( ciCacheIsModified(cache)
ciCacheSave(cache)
)
ciCacheIsWritable
ciCacheIsWritable(u_cache) =>t/nil
Description
Checks whether a constraint cache is writable.
Arguments
Value Returned
Example
cache = ciGetCellView()
unless( ciCacheIsWritable(cache)
cache = ciCacheMakeEditable(cache)
)
Makes a constraint cache editable if it is read only.
ciCacheLCV
ciCacheLCV(u_cache) =>l_libCellViewNames
Description
Returns a list containing the library, cell, and view names of the specified constraint cache. The cache library, cell, and view refers to the schematic, configuration, physical configuration, or layout view that the constraint cache is associated with.
Arguments
Value Returned
Example
ciCacheLCV(ciGetCellView())
=> ("overview" "block1" "physConfig")
Gets the library, cell, and view names of the current constraint cache.
ciCacheLibName
ciCacheLibName(u_cache) =>t_libName
Description
Returns the library name of the specified constraint cache. The cache library, cell, and view refers to the schematic, configuration, physical configuration, or layout view that the constraint cache is associated with.
Arguments
Value Returned
|
The library name of the associated schematic, configuration, physical configuration, or layout. |
Example
Return the library name of the current constraint cache:
ciCacheLibName(ciGetCellView())
=> "overview"
ciCacheListAxesNames
ciCacheListAxesNames(u_cache) =>t_axesNames/ nil
Description
Lists all axes names in a cache. Access to axes is only provided through the axis name, no direct reference to an axis object is provided.
Arguments
|
The constraint cache where the axes are enumerated. See also |
Value Returned
ciCacheListCon
ciCacheListCon(u_cache[g_includeOutOfContext] ) =>l_constraintList/nil
Description
Lists all the constraints from a given cache.
Arguments
|
See |
|
|
Set to include out of context constraints (constraints not in the current view). |
Value Returned
ciCacheListConstrainedObjects
ciCacheListConstrainedObjects(u_cache[g_includeOutOfContext] ) =>l_designObjectList/nil
Description
Lists the name and type of all constrained objects.
Arguments
|
See |
|
|
If this optional argument is specified and set to |
Value Returned
|
A list of all objects that are constrained. When the optional |
|
ciCacheListConstrainedObjectNames
ciCacheListConstrainedObjectNames(u_cache[g_includeOutOfContext] ) =>l_objectNameList/nil
Description
Lists the names of the constrained objects (without the type of object).
Arguments
|
See |
|
|
If this optional argument is specified and set to |
Value Returned
|
A list of strings with all names of objects that are constrained. When the optional |
|
ciCacheListTemplates
ciCacheListTemplates(u_cache[t_templateType] ) =>l_templateIdList/nil
Description
Lists all templates, of an optional given type, from a cache.
Arguments
|
See |
|
Value Returned
ciCacheListTypeNames
ciCacheListTypeNames(u_cache) =>l_constraintTypeList/nil
Description
Lists all the names of the constraint types that are legal for the given cache.
Arguments
|
See |
Value Returned
|
A list of all constraint type names. The complete constraint type set listed in |
|
ciCacheListTypes
ciCacheListTypes(u_cache) =>l_constraintTypeList/nil
Description
Lists all constraint types in a cache.
Arguments
|
See |
Value Returned
ciCacheMakeEditable
ciCacheMakeEditable(u_cache) =>u_cache/ nil
Description
Reopens the constraint cache for edit and returns a new constraint cache ID. This function does not apply to layout constraint caches.
Arguments
Value Returned
|
The new constraint cache ID if the constraint cache could be reopened in edit mode. |
|
Example
cache = ciGetCellView()
when( null(ciCacheIsWritable(cache))
cache = ciCacheMakeEditable(cache)
)
Reopens the current constraint cache for editing.
ciCacheMakeReadOnly
ciCacheMakeReadOnly(u_cache) =>u_cache/ nil
Description
Reopens the constraint cache in read-only mode and returns a new constraint cache ID. Any in modifications to the memory are discarded. This function does not apply to layout constraint caches.
Arguments
Value Returned
|
The new constraint cache ID if the constraint cache could be reopened in read-only mode. |
|
|
The constraint cache could not be reopened in read-only mode. |
Example
cache = ciGetCellView()
when( ciCacheIsWritable(cache)
cache = ciCacheMakeReadOnly(cache)
)
Reopens the current constraint cache in read mode.
ciCacheNeedRefresh
ciCacheNeedRefresh(u_cache) =>t/nil
Description
Checks if the constraint cache has changed on the disk and needs to be refreshed.
Arguments
Value Returned
Example
The following reports if the current constraint cache needs to be refreshed from the disk:
cache = ciGetCellView()
when( ciCacheNeedRefresh(cache)
info("Cache %L constraint view %L need refresh\n" ciCacheLCV(cache) ciConstraintLCV(cache))
)
Cache ("overview" "block1" "physConfig") constraint view ("overview" "block1" "constrBlock") need refresh
The following reports how many contraint caches need to be refreshed from the disk:
needrefresh = setof(c ciGetOpenCellViews() ciCacheNeedRefresh(c))
when( needrefresh
info("%d constraint caches need refresh\n" length(needrefresh))
)
2 constraint caches need refresh
ciCacheNotifications
ciCacheNotifications(s_enable l_notifications) =>t/nil
Description
Enables or disables notifications related to the constraint cache. This function helps CAD teams in debugging.
Arguments
Value Returned
Examples
ciCacheNotifications('enable '(WarnDesignInfoUpdates InfoOnCacheEditModeChanges))
t
Enables notifications for the edit and read mode switches in cache and any updates to the schematic cache design information excluding the config views.
ciCacheNotifications('enable '(WarnDesignInfoUpdates ))
nil
Returns nil because WarnDesignInfoUpdates is already enabled.
ciCacheNotifications('disable '(WarnDesignInfoUpdates ))
t
Returns t after disabling WarnDesignInfoUpdates notifications.
ciCacheNotifications('disable '(WarnDesignInfoUpdates ))
nil
Returns nil because WarnDesignInfoUpdates notifications are already disabled.
ciCacheNotifications('enable '(NotifyAll))
t
Enables all notifications and returns t.
ciCacheNotifications('disable '(NotifyAll))
t
Disables all notifications and returns t.
ciCachep
ciCachep(g_value) =>t/nil
Description
Checks if an object is a valid constraint cache ID.
Arguments
Value Returned
Example
ciCachep(
obj
)
=> t
As shown in the example above, the object, obj is a valid constraint cache.
ciCachePurge
ciCachePurge(u_cache) =>t/nil
Description
Purges a constraint cellview from virtual memory.
Arguments
|
Specifies the constraint cacheID. See |
Value Returned
ciCacheSave
ciCacheSave(u_cache) =>t/nil
Description
Arguments
|
Specifies the constraint cacheID of a schematic constraint cellview. See |
Value Returned
Example
ciCacheSave(ciGetCellView())
Saves the constraint cache associated with the current window.
ciCacheTopCellName
ciCacheConstraintCellName(u_cache) =>t_cellName
Description
Returns the top cell name of the specified constraint cache. The top library, cell, and view refers to the schematic or layout cellview. If the cache is associated with a configuration or physical configuration, it is the top cell specified by the configuration.
Arguments
Value Returned
Example
Return the top cell name of the current constraint cache:
ciCacheTopCellName(ciGetCellView())
=> "block1"
ciCacheTopLibName
ciCacheTopLibName(u_cache) =>t_libName
Description
Returns the top library name of the specified constraint cache. The top library, cell, and view refers to the schematic or layout cellview. If the cache is associated with a configuration or physical configuration, it is the top cell specified by the configuration.
Arguments
Value Returned
Example
Return the top library name of the current constraint cache:
ciCacheTopLibName(ciGetCellView())
=> "overview"
ciCacheTopViewName
ciCacheTopViewName(u_cache) =>t_viewName
Description
Returns the top view name of the specified constraint cache. The top library, cell, and view refers to the schematic or layout cellview. If the cache is associated with a configuration or physical configuration, it is the top cell specified by the configuration.
Arguments
Value Returned
Example
Return the top view name of the current constraint cache:
ciCacheTopViewName(ciGetCellView())
=> "schematic"
ciCacheTopViewName(ciGetCellView())
=> "layout"
ciCacheTransfer
ciCacheTransfer(u_fromCache u_toCache?conTypess_conTypes) => t / nil
Description
Transfers constraints from the source cache to the specified target cache. The transfer can be restricted to constraints of a specified type. It cannot be used to transfer constraints between two schematics or two layouts.
Note: Before you run ciCacheTransfer, ensure that the schematic and layout windows are open in XL or a higher tier.
Arguments
Value Returned
Examples
Transfers all constraints from the schematic to the layout:
schCache = (ciGetCellView (window 2))
layCache = (ciGetCellView (window 3))
Transfers all constraints from the schematic cache to the layout cache:
(ciCacheTransfer schCache layCache)
Transfers all netClass constraints from the schematic cache to the layout cache:
(ciCacheTransfer schCache layCache ?conTypes 'netClass)
Transfer netClass and alignment constraints from the schematic cache to the layout cache:
(ciCacheTransfer schCache layCache ?conTypes '(netClass alignment))
ciCacheTransferSelection
ciCacheTransferSelection( u_fromCache u_toCache ) => t / nil
Description
Transfers the selected constraints and templates from the source cache to the target cache in a session run in XL or above tier. If there are no selected constraints in the source cache, all the constraints and templates from the source cache are transferred to an editable target cache. When a constraint is transferred, the template within which it exists is also transferred along with all the other constraints inside the template.
Note: Before you run ciCacheTransferSelection, ensure that the schematic and layout windows are open in XL or above tier. The Constraint Manager assistant should also be open in the window from where the constraints need to be transferred.
Arguments
ciCacheTransferSelection SKILL function cannot be used to transfer constraints between two schematics or two layouts.Value Returned
|
Selected constraints and templates were transferred successfully. |
|
Examples
Consider that there are two caches bound together in an XL-tier session: from is the source cache and to is the target cache opened in edit mode.
The source cache is bound to a design for which libname, cellname, viewname are 'ether_adc45n', 'adc_cascode_opamp', and 'schematic'.
The target cache is bound to the layout design associated to the source design.
;; For all constraints transfer
;;Deselect everything in all designs
(let ((currentSelection (hsmGetSelectedSet)))
(when currentSelection
(hsmDeselect ?spec currentSelection)))
;;Transfer all constraints/templates from the source 'from' to the target 'to'
(ciCacheTransferSelection from to)
;; For partial constraint transfer
;; Deselect everything in all design
(let ((currentSelection (hsmGetSelectedSet)))
(when currentSelection
(hsmDeselect ?spec currentSelection)))
;;Select the first constraint found in the source cache
(hsmSelect ?spec `(("(ether_adc45n.adc_cascode_opamp:schematic)" (constraint ,(car from->constraints)))))
;;Transfer the selected constraint
(ciCacheTransferSelection from to)
ciCacheViewName
ciCacheViewName(
u_cache
)
=> t_viewName
Description
Returns the view name of the specified constraint cache. The cache library, cell, and view refers to the schematic, configuration, physical configuration, or layout view that the constraint cache is associated with.
Arguments
Value Returned
|
The view name of the associated schematic, configuration, physical configuration, or layout. |
Example
Return the view name of the current constraint cache:
ciCacheViewName(ciGetCellView())
=> "physConfig"
ciCheckConstraints
ciCheckConstraints(d_cellViewID) =>t/nil
Description
Runs the constraint checker on the passed schematic or layout cellview if the cellview contains constraints.
When the constraint checker is called for a schematic cellview, the constraint and template status checks start automatically based on the current settings in the Constraints tab of the Schematic Rules Check Setup form.
When the constraint checker is called for a layout cellview, the checks are performed through the PVS-CV licensed tool. Therefore, make sure that the Phys_Ver_Sys_Const_Validator (license number 96300) license has been checked out in addition to the Layout license. For more information, refer to
Arguments
Value Returned
Example
ciCheckConstraints(geGetEditCellView())
ciCombineInstNetsPins
ciCombineInstNetsPins(l_instsNetsPins) =>l_result
Description
This function is used within Circuit Prospector constraint generator expressions to turn a list of sub-lists into a single simple list. When the instsNetsPins information is represented as a list of sub-lists there is one sub-list each for instances, nets, pins, and instTerms. In addition, this function effectively flattens the sub-lists to leave a combined list of all the instances, nets, pins, and instTerms without sub-lists. The flattened list is in a form suitable to be used as the member list for ciConCreate.
To turn the result into a more manageable disembodied property list (DPL), see ciSeparateInstsNetsPins.
Arguments
Value Returned
|
Returns a simple flattened list containing each instance, net, pin, and instTerm in the |
Example
instsNetsPinsAsSubLists = '(("/MN5" "/MN2") ("/n5" "/gnd!") nil nil)
ciCombineInstNetsPins(instsNetsPinsAsSubLists)
(("/MN5" 'inst)
("/MN2" 'inst)
("/n5" 'net)
("/gnd!" 'net))
ciConAppendOneMember
ciConAppendOneMember(u_constraint l_member) =>t/nil
Description
Appends one constraint member to the given contstraint. The new member is added in the last position in the member list.
Arguments
|
Constraint member, represented as a list. The member is a pair (name type) or a triplet (name type parameter), listed in the same format as ciConCreate. |
Value Returned
Example
ciConAppendOneMember(con '("MN12" inst))
Appends an extra instance, MN12, to a constraint.
ciConBaseName
ciConBaseName(t_constraintName) =>baseName
Description
Extracts and returns the basename from the specified constraint name. A constraint name consists of the basename and the counter added as a suffix. For example, in the constraint name, myConstraint_2, the basename is myConstraint and the counter is _2.
Arguments
Value Returned
|
The constraint name without the counter suffix, that is, the constraint basename. |
Example
cache = ciGetCellView()
conName = car(cache~>constraints~>name)
newUniqueName = ciNextConName(cache ciConBaseName(conName))
ciConCallbackIsRegistered
ciConCallbackIsRegistered(?namet_name?typet_type) =>t/nil
Description
Checks whether a constraint callback has been registered.
See also ciConRegisterCallback, ciConUnregisterCallback, and ciConUpdateCallback.
Arguments
|
The type passed as a symbol of the callback. Currently, |
Value Returned
Examples
-
If
myTransferCallbackis not registered as a callback, the function returnsnil.ciConCallbackIsRegistered(?name 'myTransferCallback ?type 'ciConTransferCallback)
nil
-
If
myTransferCallbackwas registered as a callback of typeciConTransferCallbackby using theciConRegisterCallbackfunction, theciConCallbackIsRegisteredfunction returnst. This means that themyTransferCallbackcallback will be called before and after the constraints are transferred.;;Register the callback.
ciConRegisterCallback(?name 'myTransferCallback ?type 'ciConTransferCallback)
t
;;Later, you can verify whether the callback was registered successfully.
ciConCallbackIsRegistered(?name 'myTransferCallback ?type 'ciConTransferCallback)
t
ciConCreate
ciConCreate(u_cache d_constraintType[?membersl_memberList] [?paramsl_parameterList] [?nameg_constraintName] [?axisg_axisName] [?noteg_constraintNote] [?verboseg_verbose])=>u_constraint/nil
Description
Arguments
|
See |
|
|
A legal constraint type. See |
|
|
An ordered constraint member list. See |
|
|
An optional list of constraint parameters. See |
|
|
An optional legal string specifying the constraint name. A constraint with that name must not already exist in the cache. If not specified, a name will be generated as |
|
|
An optional axis name to which the constraint belongs. When an axis with the given name does not exist it will be created. |
|
|
An optional argument that enables you to specify notes to constraints to provide more details. |
|
|
A Boolean argument that controls whether a message is displayed to inform of the successful creation of a constraint. Default: |
Value Returned
|
The created constraint. (see |
|
Examples
-
Creating a Symmetry constraint:
ciConCreate( cache 'symmetry ?members list(list("M1" 'inst) list("M2" 'inst)) ?axis "vSym" )
(If the specified axis does not exist then you might need to create it using the ciAxisCreate() API).
-
Creating a Modgen constraint:
modgen=ciConCreate( cache 'modgen ?members list(list("M1" 'inst) list("M2" 'inst)) ?params list(list("numRows" 1) list("numCols" 2) ))
In the example above, a Modgen constraint is generated with basic parameters. The parameters specify the Modgen member instances and the size of the array. Default values are used for parameters that are not specified, for example the symbol assignments.In Schematic, m-factored instances are not expanded. Therefore, the parameters specified pertain to the unexpanded values, such as rows and columns.You can generate a Modgen constraint with member parameters (in Layout):?members list( list("M1.1" 'inst list(list("row" 0) list("col" 0) list("abutment" 1))) list("M1.2" 'inst list(list("row" 0) list("col" 1) list("abutment" 1))) list("M2.1" 'inst list(list("row" 0) list("col" 2) list("abutment" 1))) list("M2.2" 'inst list(list("row" 0) list("col" 3) list("abutment" 1))) )
As specified above, m-factored instances are not expanded in the schematic, which makes it difficult to specify member parameters for the expanded instances. However, you may specify multiple instances in such cases as follows:list( list("M1" ‘inst list(list("row" 0) list("col" 0) list("abutment" 1))) list("M1" ‘inst list(list("row" 0) list("col" 1) list("abutment" 1))) list("M2" ‘inst list(list("row" 0) list("col" 2) list("abutment" 1))) list("M2" ‘inst list(list("row" 0) list("col" 3) list("abutment" 1))) )
Here, bothM1andM2have an m-factor of2. Also, the row and column assignment for each instance is given.
You can also specify Modgens with dummy devices and associated parameters (in schematic):memberList = list( list("gpdk045/nmos2v/layout" master (("row" 0) ("col" 0) ("abutment" 1) list("dummyNetToUse" 1) ("dummyParams" "((fingers 1) (fw 4u) (l 400n))"))) list("M3" inst (("row" 0) ("col" 1) ("abutment" 1))) list("M2" inst (("row" 0) ("col" 2) ("abutment" 1))) list("M2" inst (("row" 0) ("col" 3) ("abutment" 1))) list("M3" inst (("row" 0) ("col" 4) ("abutment" 1))) list("gpdk045/nmos2v/layout" master (("row" 0) ("col" 5) ("abutment" 1) list("dummyNetToUse" 1) ("dummyParams" "((fingers 1) (fw 4u) (l 400n))"))) list("gpdk045/nmos2v/layout" master (("row" 1) ("col" 0) ("abutment" 1) list("dummyNetToUse" 1) ("dummyParams" "((fingers 1) (fw 4u) (l 400n))"))) list("M2" inst (("row" 1) ("col" 1) ("abutment" 1))) list("M3" inst (("row" 1) ("col" 2) ("abutment" 1))) list("M3" inst (("row" 1) ("col" 3) ("abutment" 1))) list("M2" inst (("row" 1) ("col" 4) ("abutment" 1))) list("gpdk045/nmos2v/layout" master (("row" 1) ("col" 5) ("abutment" 1) list("dummyNetToUse" 1) ("dummyParams" "((fingers 1) (fw 4u) (l 400n))"))) list("vdd!" net) ;;; dummy net )
modgen2 = ciConCreate( cache 'modgen ?members memberList ?params list( list("numRows" 2) list("numCols" 6) list("pattern" "mapping (( M2 X) (M3 Y))")
); list) )
In the above example, the pattern parameter is used to map symbols to alphabets.ciConCreate( d_cache 'modgen ?members list( list("R0" 'inst list( list("row" 5 ) list("col" 0 ) list("orient" "R0" ))) list("R0" 'inst list( list("row" 4 ) list("col" 0 ) list("orient" "MY" ))) list("R0" 'inst list( list("row" 1 ) list("col" 0 ) list("orient" "R0" ))) list("R1" 'inst list( list("row" 0 ) list("col" 0 ) list("orient" "MY" ))) list("R1" 'inst list( list("row" 2 ) list("col" 0 ) list("orient" "R0" ))) list("R1" 'inst list( list("row" 3 ) list("col" 0 ) list("orient" "MY" ))));list
As shown in the example above, you can specify members and parameters for deciding the placement order of the Modgen devices that are generated from schematic and where both?params list( list( "numRows" 6 ) list( "numCols" 1 ) );ciConCreateR0andR1have an s-factor of3.
As shown in the example below, to add a dummy that has a master different from its neighbor, specify the additionaldummyParamSourceparameter.("gpdk045/nmos2v_3/layout" master (("row" 0) ("col" 11) ("abutment" 1) ("dummyParamSource" "default")
To specify dummy parameters, use the additionaldummyParamsparameter, as shown below:("gpdk045/nmos2v_3/layout" master (("row" 0) ("col" 11) ("abutment" 1) ("dummyParamSource" "default") ("dummyParams" "((fingers 1) (fw 4u) (l 400n))")))
If specifying a dummy different from the neighbor, thedummyParamsshould be specified. Otherwise, the values of the dummy parameters (length, width, fingers etc.) will be set to minimum. -
Creating a constraint using another existing constraint as its member:
Suppose there are three instances outside of modgens, and three modgens (each having some number of instances). If you want to create an orientation constraint of only six objects, which includes these three instances and three modgens, you can use a syntax like the one shown below:ciConCreate( cache ?type orientation ?members list( list("M1" 'inst) list("Modgen1" 'modgen)) ?params list(list("restrictTo" list("R0" "MY"))) )
This type of constraint creation is supported for the objects listed in the design_object_type section.
ciConCreateExpanded
ciConCreateExpanded(u_cache d_constraintType[?membersl_memberList] [?paramsl_parameterList] [?namet_constraintName] [?axist_axisName] [?noteg_constraintNote] [?verboseg_verbose] ) =>l_constraints/nil
Description
Expands vector names into groups of vector bit names in a constraint specific manner (when a constraint’s member list contains vector names). Constraints are then created for each vector bit name grouping.
Arguments
|
See |
|
|
A legal constraint type. See |
|
|
An ordered constraint member list. See |
|
|
An optional list of constraint parameters. See |
|
|
An optional legal string that is unique in the constraint naming cache. If not specified, a name will be generated automatically. |
|
|
An optional axis name to which the constraint belongs. When an axis with the given name does not exist it will be created. |
|
|
An optional argument that enables you to specify notes to constraints to provide more details. |
|
|
A Boolean argument that controls whether a message is displayed to inform of the successful creation of a constraint. Default: |
Value Returned
Example
ciConCreateExpanded(cache 'symmetry ?members list(list("MN1<0:4>" 'inst)))
=> list( symmetry("MN1<0>", "MN1<4>"), symmetry("MN1<1>", "MN1<3>"), symmetry("MN1<2>")
ciConCreateExpanded(cache 'cluster ?members list(list("MN1<0:4>" 'inst)))
=> list( cluster("MN1<0>", "MN1<1>", "MN1<2>", "MN1<3>", "MN1<4>")
ciConDelete
ciConDelete(u_constraint) =>t/nil
Description
Deletes a constraint. After deleting the constraint, the u_constraint will be invalid.
Arguments
Value Returned
ciConDeleteAll
ciConDeleteAll(
l_constraints
d_cvID
)
=> t / nil
Description
Deletes the specified constraints in a cellview.
Arguments
|
The database ID of the cellview from which constraints are to be deleted. |
Value Returned
Example
Deletes all the constraints in the current cellview.
when(window = hiGetCurrentWindow()
when(cellView = geGetEditCellView(window)
ciConDeleteAll(ciCacheGet(cellView)->constraints cellView)
)
)
ciConFind
ciConFind(u_cache t_constraintName) =>u_constraint/nil
Description
Finds a constraint in a given cache.
Arguments
|
The constraint cache in which the constraint belongs. See cache. |
|
Value Returned
|
The |
|
ciConGetAxisName
ciConGetAxisName(u_constraint) =>t_axisName/ nil
Description
Returns, for a given constraint, the axis name if one is associated with the given constraint.
Arguments
|
The id of the constraint to obtain an associated axis name from (see |
Value Returned
ciConGetCache
ciConGetCache(u_constraint) =>cache_ID
Description
Returns the constraint cache that contains the given constraint.
Arguments
|
The ID of the constraint (see |
Value Returned
Example
ciConGetCache(conId) => cacheId
ciConGetComment
ciConGetComment(u_constraint) =>t_comment/nil
Description
Returns the comment parameter of a constraint.
Arguments
|
The id of the constraint to obtain details of any comment parameters from (see |
Value Returned
ciConGetCreatedTime
ciConGetCreatedTime(u_constraint) =>constraint_created_time/ nil
Description
Returns the created time of a constraint.
Arguments
|
The id of the constraint whose creation time you want to return (see |
Value Returned
ciConGetMembersOfType
ciConGetMembersOfType(g_con s_type) =>l_filteredList
Description
Returns the constraint member list filtered by the passed member type.
Arguments
|
The constraint for which the filtered member list should be returned. |
|
Value Returned
|
A filtered version of the constraint members only containing members of the specified type. |
Example
ciConGetMembersOfType(modgen 'inst)
Returns the instance members of the modgen, but will not return the net members (if the modgen has members of type net).
ciConGetName
ciConGetName(u_constraint) =>t_constraintName
Description
Returns the name of a constraint.
must be a legal reference to a constraint. Using a constraint_id after a constraint has been deleted can result in a fatal error.Arguments
Value Returned
ciConGetNote
ciConGetNote(u_constraint) =>t_note/ nil
Description
Returns the note parameter of a constraint.
Arguments
|
The ID of the constraint whose note you want to return (see |
Value Returned
ciConGetOwner
ciConGetOwner(u_constraint) =>l_lcv/ nil
Description
Returns the library name, cell name, and view name of the cell where the passed constraint was created.
Arguments
|
The ID of the constraint whose library, cell, and view origin information you want to return (see |
Value Returned
|
Lists library, cell, and view name of the passed constraint. |
|
Example
ciConGetOwner(u_constraint)
=> ("amsPLL" "vco" "schematic")
ciConGetPriority
ciConGetPriority(u_constraint) =>x_priority
Description
Returns the priority value of a constraint.
Arguments
|
The ID of the constraint whose priority value you want to return (see |
Value Returned
|
The priority value of the given constraint. It is an integer between |
ciConGetStatus
ciConGetStatus(u_constraint) =>symbol/ nil
Description
Returns the status of a constraint.
See also ciConSetStatus.
Arguments
|
The ID of the constraint whose status you want to return (see |
Value Returned
Example
ciConSetStatus(cc 'disabled t)
ciConGetStatus(cc)
disabled
ciConGetType
ciConGetType(u_constraint) =>s_constraintTypeName
Description
Returns the constraint type symbol.
Arguments
|
The ID of the constraint whose type symbol you want to return. |
Value Returned
|
Details of the constraint_type symbol. |
Example
ciConSetStatus(cc 'disabled t)
ciConIsInContext
ciConIsInContext(u_constraint) =>t/nil
Description
Returns the current context status of a constraint. A constraint is in context if all its members are in the database. For example, a net member can become out of context if the net is deleted from the database.
Arguments
|
The ID of the constraint whose context status you want to return (see |
Value Returned
ciConIsOutOfContext
ciConIsOutOfContext(u_constraint) =>t/nil
Description
Returns the current context status of a constraint. A constraint is out of context if one or more of its members are not in the database. For example, a net member can become out of context if the net is deleted from the database.
Arguments
|
The ID of the constraint whose context status you want to return (see |
Value Returned
ciConIsOverridden
ciConIsOverridden(u_constraint) =>t/nil
Description
Returns whether a constraint has been overridden.
Arguments
|
The ID of the constraint that you want to establish has been overridden or not (see |
Value Returned
ciConIsWritable
ciConIsWritable(u_constraint) =>t/nil
Description
Returns whether the constraint is writable.
Arguments
|
The ID of the constraint that you want to establish writable status (see |
Value Returned
ciConListMembers
ciConListMembers(u_constraint[g_includeParameters] [g_includeDefaults] ) =>l_memberList/nil
Description
Returns a list of constraint members and their member parameters, if any.
Arguments
|
The constraint ID (see |
|
|
Optional argument. A Boolean value (
If argument is set as |
|
|
Optional argument. A Boolean value ( |
Value Returned
|
List of constraint members name and types (see |
|
Example
(ciConListMembers con) ;;
Includes all parameters, including defaults.
(ciConListMembers con nil) ;;
ciConListMemberNames
ciConListMemberNames(u_constraint) =>l_memberList/nil
Description
Returns a list of strings where each string is a constraint member name. This function will only return member names as opposed to ciConListMembers which returns tuples containing member names and types.
Arguments
|
The |
Value Returned
|
List of constraint members names (see |
|
ciConListParams
ciConListParams(u_constraint[g_includeDefaults] ) =>l_parameterList/nil
Description
Returns all parameters for a constraint.
Arguments
|
The |
|
|
Optional argument. A Boolean value ( |
Value Returned
|
List of parameters found for given constraint (see |
|
ciConListParamNames
ciConListParamNames(u_constraint) =>l_parameterNames/ nil
Description
Returns the legal parameter names for a given constraint.
Arguments
|
The constraint ID whose parameters you want to list (see u_constraint). |
Value Returned
ciConListTemplates
ciConListTemplates(u_constraint) =>l_templateList/nil
Description
Returns the list of templates of which the given constraint is a member.
Arguments
|
The constraint ID whose templates you want to list (see u_constraint). |
Value Returned
Example
con = ciConFind(cache, "Const_1")
tempList = ciConListTemplates(con)
ciConp
ciConp(g_value) =>t/nil
Description
Checks if an object is a valid constraint ID.
Arguments
Value Returned
Example
ciConp(
obj
)
=>t
As shown in the above example, the object, obj is a valid constraint.
ciConRegisterCallback
ciConRegisterCallback(?namet_name?typet_type) =>t/nil
Description
Registers a constraint callback.
See also ciConCallbackIsRegistered, ciConUnregisterCallback, and ciConUpdateCallback.
Arguments
Value Returned
Example
procedure(myTransferCallback(scx lcx directionL2P status)
;;print a message each time the callback is called
printf("myTransferCallback: scx %L - lcx %L - directionL2P %L - status %L\n" scx lcx directionL2P status)
)
;;Register the "myTransferCallback" as callback of type 'ciConTransferCallback.
;;"myTransferCallback" will be called before and after constraints are transferred.
ciConRegisterCallback(?name 'myTransferCallback ?type 'ciConTransferCallback)
t
ciConRemoveMembers
ciConRemoveMembers(u_constraint l_memberList) =>l_memberList/nil
Description
Removes a list of members from a constraint.
Arguments
|
The |
|
|
The list of members to be removed. See |
Value Returned
Example
ciConListMembers(a)
(("PM0" inst nil)
("PM6" inst nil)
("PM4" inst nil)
("PM1" inst nil)
("PM2" inst nil)
)
>
ciConRemoveMembers(a list(list("C3" 'inst) list("C4" 'inst)))
t
>
ciConListMembers(a)
(("PM0" inst nil)
("PM6" inst nil)
("PM4" inst nil)
("PM1" inst nil)
("PM2" inst nil)
)
ciConResetAllParams
ciConResetAllParams(u_constraint) =>t/nil
Description
Resets all parameters on a constraint to their default values. Parameters can only be reset if the constraint view is currently writable.
Arguments
|
The |
Value Returned
ciConResetParams
ciConResetParams(u_constraint[l_parameterNameList] ) =>t/nil
Description
Resets a list of parameters to their default values.
Arguments
|
The |
|
|
List of parameter names to be reset to their default values. See parameter_list. |
Value Returned
ciConSetAxis
ciConSetAxis(u_constraint t_axisName) =>t/nil
Description
Associates a given constraint with the named axis. If the constraint does not accept an axis, nil is returned, and if the axis does not exist it will be created.
Arguments
|
The identifier for the constraint that you want to associate with a given axis (see also |
|
|
The axis name. If the axis does not exist one will be created with the default |
Value Returned
|
Constraint does not allow an axis or another failure has occurred. |
ciConSetNote
ciConSetNote(u_constraint t_note) =>t/nil
Description
Replaces the note parameter of a constraint.
Arguments
|
The |
|
Value Returned
ciConSetPriority
ciConSetPriority(u_constraint x_priorityValue) =>t/nil
Description
Sets the priority for a constraint.
Arguments
|
The |
|
|
Sets the priority value for the constraint. It is an integer value between |
Value Returned
ciConSetStatus
ciConSetStatus(u_constraint t_statusSymbol g_statusValue) =>t/nil
Description
Sets a given status flag for a constraint.
See also ciConGetStatus.
Arguments
|
The |
|
|
The status symbol can be either: ‘ |
|
|
Specifying |
Value Returned
Example
ciConSetStatus(cc 'disabled t)
ciConGetStatus(cc)
disabled
ciConstraintsForType
ciConstraintsForType(l_constraints s_conType) =>l_filteredConstraints/ nil
Description
Filters the list of constraints and returns the constraints of the specified type.
Arguments
|
The symbol for the type of constraint to filter the specified list with. |
Value Returned
Example
ciConstraintsForType(template->constraints 'modgen)~>name
=> '("modgen1")
ciConstraintsForType(ciGetCellView()->constraints 'modgen)~>name
=> '("modgen1" "modgen2" "modgen3")
ciConstraintLCV
ciConstraintLCV(u_cache) =>l_libCellViewNames
Description
Returns a list containing the library, cell, and view names of the specified constraint cache. The constraint library, cell, and view refers to the storage location of the constraints, which may be a constraint view or layout.
Arguments
Value Returned
|
List comprising the storage library, cell and view names of the constraint view or layout returned in the following format: ( t_libName t_cellName t_viewName ) ( "overview" "block1" "constrBlock" ) |
Example
Get the constraint storage library, cell, and view names of the current constraint cache:
ciConstraintLCV(ciGetCellView())
=> ("overview" "block1" "constrBlock")
ciConstraintLCV(ciGetCellView())
=> ("overview" "block1" "layout")
ciConstraintViewLessp
ciConstraintViewLessp(u_cache1 u_cache2 ...) =>t/nil
Description
Specifies a predicate function for sorting the constraint caches based on their library, cell, and view names.
Arguments
Value Returned
Example
The following sorts a list of read-only constraint caches:
readonly = setof(c ciGetOpenCellViews() null(ciCacheIsWritable(c)))
mapcar(lambda( (c) info("Cache %L constraint view %L\n" ciCacheLCV(c) ciConstraintLCV(c))) sort(readonly 'ciConstraintViewLessp))
Cache ("overview" "block1" "physConfig") constraint view ("overview" "block1" "constrBlock")
Cache ("overview" "block2" "schematic") constraint view ("overview" "block2" "constraint")
Cache ("overview" "upper" "schematic") constraint view ("overview" "upper" "constraint")
ciConTypeHasNamedParameter
ciConTypeHasNamedParameter(t_conType t_paramName) =>t/nil
Description
Returns t if the passed constraint type has a parameter with a name matching the passed parameter name.
Arguments
Value Returned
|
The parameter name of the passed constraint type matches the passed parameter name. |
|
Examples
ciConTypeHasNamedParameter( "modgen" "numRows")
=> t
ciConTypeHasNamedParameter( "relativeOrientation" "axis")
=> nil
ciConUnregisterCallback
ciConUnregisterCallback(?namet_name?typet_type) =>t/nil
Description
Unregisters a constraint callback.
See also ciConCallbackIsRegistered, ciConRegisterCallback, and ciConUpdateCallback.
Arguments
|
The name passed as a symbol of the callback procedure to be unregistered. |
|
|
The type passed as a symbol of the callback. Currently, |
Value Returned
Example
procedure(myTransferCallback(scx lcx directionL2P status)
;;print a message each time the callback is called
printf("myTransferCallback: scx %L - lcx %L - directionL2P %L - status %L\n" scx lcx directionL2P status)
)
;;function is not yet registered.So, the function won't be unregistered.
ciConRegisterCallback(?name 'myTransferCallback ?type 'ciConTransferCallback)
nil
;;Register the "myTransferCallback" as callback of type 'ciConTransferCallback.
;;"myTransferCallback" will be called before and after constraints are transferred.
ciConRegisterCallback(?name 'myTransferCallback ?type 'ciConTransferCallback)
t
;;Now the function can be unregistered
ciConRegisterCallback(?name 'myTransferCallback ?type 'ciConTransferCallback)
t
ciConUpdateCallback
ciConUpdateCallback(?namet_name?typet_type[ ?enabledg_enabled] ) =>t/nil
Description
Enables or disables a constraint callback.
See also ciConCallbackIsRegistered, ciConRegisterCallback, and ciConUnregisterCallback.
Arguments
Value Returned
Example
procedure(myTransferCallback(scx lcx directionL2P status)
;;print a message each time the callback is called
printf("myTransferCallback: scx %L - lcx %L - directionL2P %L - status %L\n" scx lcx directionL2P status)
)
;;function is not yet registered.So, the function will be registered.
ciConUpdateCallback(?name 'myTransferCallback ?type 'ciConTransferCallback ?enabled t)
t
ciConCallbackIsRegistered(?name 'myTransferCallback ?type 'ciConTransferCallback)
t
;;function is registered and enabled. So nothing is done.
ciConUpdateCallback(?name 'myTransferCallback ?type 'ciConTransferCallback ?enabled t)
nil
;;function is registered and is of type 'ciConTransferCallback. So, the function will be unregistered.
ciConUpdateCallback(?name 'myTransferCallback ?type 'ciConTransferCallback ?enabled nil)
t
ciConCallbackIsRegistered(?name 'myTransferCallback ?type 'ciConTransferCallback)
nil
ciConUpdateMemberParams
ciConUpdateMemberParams(
g_conId
l_memberParams
)
=> t / nil
Description
Updates the specified constraint member parameters with the given values without impacting other member parameters.
Arguments
|
The ID of the constraint whose member parameters are to be updated. |
|
|
The list of constraint members and parameters to be updated. |
Value Returned
|
No member parameters were updated. For example, if all the member parameter values are already set to the passed values, the constraint is not updated. |
Example
Updates the member parameters associated with the high current design intent HighCurrent_VDD. The Current parameter is changed from -5.0 to -11.0 for VDD:2 and from 0.0 to 11.0 for M12:S. The parameters of the other members associated with the design intent are unchanged.
cache = ciGetCellView()
conId = car(ciTemplateFind(cache "HighCurrent_VDD")->constraints)
foreach(mapcar mbr conId->members list(car(mbr) assoc("Current" caddr(mbr))))
(("VDD:2"
("Current" float -5.0)
)
("PM0:S"
("Current" float 1.0)
)
("PM7:S"
("Current" float 2.0)
)
("M5:S"
("Current" float 2.0)
)
("PM2:S"
("Current" float 0.0)
)
("M4:S"
("Current" float 0.0)
)
("M12:S"
("Current" float 0.0)
)
("PM1<0>:S"
("Current" float 0.0)
)
("PM1<1>:S"
("Current" float 0.0)
)
)
ciConUpdateMemberParams(conId list( list("VDD:2" list(list("Current" -11.0))) list("M12:S" list(list("Current" 11.0)))))
foreach(mapcar mbr conId->members list(car(mbr) assoc("Current" caddr(mbr))))
(("VDD:2"
("Current" float -11.0)
)
("PM0:S"
("Current" float 1.0)
)
("PM7:S"
("Current" float 2.0)
)
("M5:S"
("Current" float 2.0)
)
("PM2:S"
("Current" float 0.0)
)
("M4:S"
("Current" float 0.0)
)
("M12:S"
("Current" float 11.0)
)
("PM1<0>:S"
("Current" float 0.0)
)
("PM1<1>:S"
("Current" float 0.0)
)
)
ciConUpdateMembers
ciConUpdateMembers(u_constraint l_memberList) =>t/nil
Description
Used to update members and their parameters by replacing the members with the list contained in l_memberList.
The list can be of the form (("PM1" inst) ("PM2" inst)), but not (("PM1" inst nil) ("PM2" inst nil)). That is, if there are no parameters, the parameters element in the tuples should be omitted.
.Arguments
|
The |
|
|
The list of members to be updated. See |
Value Returned
Example
The following example details how to include additional members on a cluster constraint using the ciConUpdateMembers command:
procedure(doClusterBoundaries(cv cache name align)
let((conname1 conname2)
printf("name in doClusterBoundariess is %L\n" name)
if(align then
if((conname1 = ciConFind(cache name)) then
printf("adding in doClusterBoundariess is %L\n" align)
ciConUpdateMembers(conname1 append(align foreach(mapcar x ciConListMembers(conname1) list(car(x) cadr(x)))))
else
printf("creating in doClusterBoundariess is %L\n" align)
conname1 = ciConCreate(cache 'cluster
?members align
?name name
)
ciConCreate(cache 'clusterBoundaryDef
?members list(list(name 'cluster))
?params list(list("boundary" x=getBoundary(cv "upper")) list("flexibleFlag" 1))
)
)
)
printf("names = %L\n" ciConListMembers(conname1))
)
)
ciConUpdateParams
ciConUpdateParams(u_constraint[l_parameterList] ) =>t/nil
Description
Updates parameter values with those values listed in l_parameterList.
Default values will reset the parameter to default and the storage for the default value will be deleted. Enumerated values will be reset first, then updated rather than appended.
Arguments
|
The |
|
|
The list of parameters to be used for the parameter update. See |
Value Returned
ciConUprevCellBoundary
ciConUprevCellBoundary(d_cellView) =>t/nil
Description
Converts deprecated boundaryArea and areaUtilization constraints to cellBoundary constraints.
Arguments
Value Returned
ciConVerify
ciConVerify(
{ u_cache [ d_constraintType ] } | { u_constraint }
)
=> t / nil
Description
Runs the consistency checker on demand. The behavior of the consistency checker is based on the values provided for each argument.
Arguments
|
See If this argument is specified without any other argument, the consistency checker runs on all constraints in the cache. |
|
|
A valid constraint type. See If this argument is specified with u_cache, the consistency checker runs on all constraints of the given type in the specified cache. |
|
|
Specify the SKILL user-type object that references a constraint. The consistency checker is run on this constraint.
To know the value of |
Value Returned
Examples
Based on the above explanation, there are the following three possibilities that have been explained using examples:
-
You specified the
ciCachepointer or(list "lib" "cell" "view"), as illustrated below.ciConVerify(ciGetCellView())
Here,ciGetCellView()returns the cache.
ORciConVerify('("lib" "cell" "view"))
In this case, the consistency checker runs on all constraints in the cache. -
You specified the
ciCachepointer or(list "lib" "cell" "view"), and the type name, as illustrated below.ciConVerify(ciGetCellView(), 'alignment)
In this case, the consistency checker runs on all constraints of the specified type in the specified cache. -
You specified only the constraint pointer, as illustrated below.
con = ciConFind(ciGetCellView(), "Constr_0")
ciConVerify(con)
In this case, the consistency checker runs on the specified constraint.
ciConvertNestedNetClassToNetClassHierGroup
ciConvertNestedNetClassToNetClassHierGroup(g_cacheId[S_constraintName] ) =>t/nil
Description
Converts one or all nested Net Class constraints in a cache to corresponding Net Class Hier Group constraints. The name, members, and parameters of the original nested Net Class constraint remain the same after the conversion.
Arguments
|
Constraint name if only one conversion is required; otherwise, all the nested Net Class constraints in the cache are converted. |
Value Returned
Examples
-
Converts all nested Net Class constraints to Net Class Hier Group constraints:
ciConvertNestedNetClassToNetClassHierGroup(ciGetCellView())
-
Converts only one nested Net Class constraint named
Constr_1to Net Class Hier Group constraint:ciConvertNestedNetClassToNetClassHierGroup(ciGetCellView() "Constr_1")
ciCreateFilter
ciCreateFilter(t_filterName l_data) =>t/nil
Description
Defines a filter to show/hide constraints in the Constraint Manager.
For more information see
Arguments
Value Returned
Example
ciCreateFilter( "MyAlign"
list(
list("Constraint Types"
list("Alignment" ))
list("Member Types" )
)
ciCurrentPathIterator
ciCurrentPathIterator(
d_cellview
t_matchExpr
)
Description
Finds the current path structure in Circuit Prospector. It is an iterator function that does not support hierarchy.
Arguments
|
The cellview containing the design instances to be iterated over. |
|
|
The matched expression string to be used in the iteration. Variables |
Value Returned
Example
ciCurrentPathIterator(cv "t")
ciDefaultParamToMatchFilter
ciDefaultParamToMatchFilter(d_insts[t_simulator] ) =>l_param2DList/nil
Description
The function for the default filter in the Match Subset Editor.
procedure( ciDefaultParamToMatchFilter(inst simulator)
prog((param2DList)
if( ciIsDevice(inst "fet") then
param2DList= ciGetMatchParam2DList(inst "fetParamListForMatching")
)
if( ciIsDevice(inst "resistor") then
param2DList = ciGetMatchParam2DList(inst "resistorParamListForMatching")
)
if( ciIsDevice(inst "capacitor") then
param2DList = ciGetMatchParam2DList(inst "capacitorParamListForMatching")
)
return(param2DList)
)
)
With the list of parameter names per device type defined by:
ciMapParam("fetParamListForMatching" '("model" "w" "l" "m"))
ciMapParam("resistorParamListForMatching" '("model" "w" "l" "r" "m"))
ciMapParam("capacitorParamListForMatching" '("model" "w" "l" "c" "m"))
Arguments
Value Returned
|
A 2D list containing the parameter name-value pair for all of the filtered parameters. |
|
Example
ciDefaultParamToMatchFilter("MN5" "")
ciDeleteModgenTopologies
ciDeleteModgenTopologies(g_modgen) =>t/nil
Description
Deletes the database topology objects associated with the specified modgen along with the constraints on those topology objects. See also ciSetModgenTopology for an example of how to create database topology objects for a modgen.
Arguments
Value Returned
Example
mgGetTopologyFromModgen(modgen)
=> db:0x299dc85c
ciDeleteModgenTopologies(modgen)
mgGetTopologyFromModgen(modgen)
=> nil
ciDeleteRuleGroup
ciDeleteRuleGroup(g_constraintGroupPointer) =>t/nil
Description
See also: ciAddRuleGroup.
Arguments
Value Returned
Example
ciDeleteRuleGroup(cg1)
ciDeleteUnreferencedObjects
ciDeleteUnreferencedObjects(g_constraintGroupPointer) =>t/nil
Description
Deletes the unreferenced objects. When a design contains unreferenced objects and you try to create contraints in it, the constraints might be out-of-context. In such a scenario, use this function before you start to create the constraints.
Arguments
|
The cache ID from where the unreferenced objects have to be removed. |
Value Returned
Example
ciDeleteUnreferencedObjects(ciGetCellView(geGetEditCellView())
ciDesignLCV
ciDesignLCV(u_cache) =>l_libCellViewNames
Description
Returns a list containing the library, cell, and view names of the specified constraint cache. The design library, cell, and view refers to the schematic or layout cellview. If the cache is associated with a configuration or physical configuration, it is the top cell specified by the configuration.
Arguments
Value Returned
|
List comprising the library, cell and view names of the associated schematic or layout returned in the following format: ( t_libName t_cellName t_viewName ) ( "overview" "block1" "schematic" ) |
Example
Get the library, cell, and view names of the current constraint cache:
ciDesignLCV(ciGetCellView())
=> ("overview" "block1" "schematic")
ciDesignLCV(ciGetCellView())
=> ("overview" "block1" "layout")
ciEnableAutoConstraintNotes
ciEnableAutoConstraintNotes(g_enable) =>t/nil
Description
Provides an API alternative that allows you to enable or disable auto constraint notes.
Arguments
|
Boolean argument where |
Value Returned
Example
ciEnableAutoConstraintNotes(t)
ciExpandMembers
ciExpandMembers(l_designObjectList[?compressg_compress] ) =>l_designObjectList
Description
Expands any iterated or repeated member in the passed member list. For example, MN1<0:2> gets expanded to MN1<0>, MN1<1>, and MN1<2>.
In the case of net repetitions, such as <*3>inp, by default these get expanded N times as inp, inp, inp. However, if the optional compress argument is set to t, then <*3>inp will be expanded to just inp. The same applies to net bundles that contain repetitions, such as <*3>inp, a, b, c, inp, inp will by default be expanded to inp, inp, inp, a, b, c, inp, inp but with compress set to t will be expanded to inp, a, b, c.
Arguments
|
When set to |
Value Returned
|
Returns the expanded iterated or repeated member in the passed member list. |
Example
instsNetsPins = list( list("MN1<4:0>" 'inst) list("MN0" 'inst) list("<*3>inp" 'net) )
expandedMembers = ciExpandMembers(instsNetsPins ?compress t)
mapcar( lambda( (mem) car(mem) ) expandedMembers)
("MN1<4>" "MN1<3>" "MN1<2>" "MN1<1>" "MN1<0>" "MN0" "inp")
ciExpandName
ciExpandName(t_iteratedRepeatedBundledName g_compress s_type) =>l_bitNames
Description
This function is used within constraint generators to expand iterated, repeated, and bundled names for instances, nets, and pins into a list of individual bit names. This is necessary if these names are to be used in calls to ciConCreate().
As an alternative to calling ciExpandName() and prior to calling ciConCreate(), call ciConCreateExpanded(), which does a default expansion of the iterated, repeated, and bundled names.
Arguments
|
Specify a string containing the iterated, repeated, and bundled name to be expanded. |
|
|
Specify the type of iterated object, that is, |
Value Returned
|
Returns a list of the individual bit names for the iterated, repeated, and bundled names. |
Example
ciExpandName("<*2>(<*3>a,b),b,c<0:3>" nil 'inst)
("a" "a" "a" "b" "a" "a" "a" "b" "b" "c<0>" "c<1>" "c<2>" "c<3>")
ciExpandName("<*2>(<*3>a,b),b,c<0:3>" t 'net)
("a" "b" "c<0>" "c<1>" "c<2>" "c<3>")
ciExpandName("pin5<0:2>:3" nil 'pin)
("pin5<0>" "pin5<1>" "pin5<2>")
ciExpandName("pin5<0:2>" nil 'pin)
("pin5<0>" "pin5<1>" "pin5<2>")
ciExpandName("pin3<10>:pin3<10>" nil 'pin)
pin3<10>
ciFindOpenCellView
ciFindOpenCellView(t_libName t_cellName t_viewName t_constraintViewName) =>u_cache/ nil
Description
Returns the open constraint cache for the library, cell, view, and constraint view. If the constraint cache is not already open, this SKILL function returns nil.
See also ciCacheFind that finds the constraint cache based on the constraint viewNameList.
See also ciFindOpenCellViews that allows a wider range of criteria to be matched.
Arguments
Value Returned
|
Returns the constraint |
|
|
No open constraint cache could be found for the specified library, cell, view, and constraint view. |
Example
-
Find the open constraint cache associated with a
physConfig.cc = ciFindOpenCellView("overview" "block1" "physConfig" "constraint")
-
Find the open constraint cache for an alternative constraint view:
constrviewname = "constr"
unless( cc = ciFindOpenCellView("overview" "block1" "schematic" constrviewname)
info("%s is not open" constrviewname)
ciFindConsWithDuplicateMembers
ciFindConsWithDuplicateMembers(d_cellViewID) =>l_constraintList/ nil
Description
Finds constraints with duplicate members and displays them in a list.
Arguments
|
ID of the cellview searched for duplicate constraint members. |
Value Returned
|
Returns a list of constraints with duplicate constraint members. |
|
Examples
List constraints with duplicate members present in the currently edited cellview.
ciFindConsWithDuplicateMembers(geGetEditCellView())
ciFindOpenCellViews
ciFindOpenCellViews( [?cacheLibt_cacheLib] [?cacheCellt_cacheCell] [?cacheViewt_cacheView] [?designLibt_designLib] [?designCellt_designCell] [?designViewt_designView] [?constraintLibt_constraintLib] [?constraintCellt_constraintCell] [?constraintViewt_constraintView] ) =>l_cacheIds/nil
Description
Returns a list of open constraint caches that match the criteria specified by the optional keyed arguments. A constraint cache can be associated with the following three views: 1. The cache library, cell, and view refers to the schematic, configuration, physical configuration, or layout view that the constraint cache is associated with. 2. The design library, cell, and view refers to the schematic or layout cellview. If the cache is associated with a configuration or physical configuration, it is the top cell specified by the configuration. 3. The constraint library, cell, and view refers to the storage location of the constraints, which can be a constraint view or layout.
Arguments
|
|
|
Value Returned
|
No open constraint cache matching the specified criteria could be found. |
Example
-
Find constraint caches using a constraint view name, as shown below.
ciFindOpenCellViews(?constraintView "constraint")
=> (ci:0x2d87cef0 ci:0x2d03a850 ci:0x2d038a00 ci:0x2d036910 ci:0x2cf95bf0)
ciFindOpenCellViews(?constraintView "constrBlock")
=> (ci:0x2d86f840)
-
Find constraint caches associated with a physConfig, as shown below.
ciFindOpenCellViews(?cacheView "physConfig")
=> (ci:0x2d86f840 ci:0x2cf95bf0)
-
Find constraint caches associated with a schematic, as shown below.
ciFindOpenCellViews(?cacheView "schematic")
=> (ci:0x2d87cef0 ci:0x2d03a850 ci:0x2d038a00 ci:0x2d036910)
-
Additional constraint caches might have schematic as the design view, including those associated with a physConfig, as shown below.
ciFindOpenCellViews(?designView "schematic")
=> (ci:0x2d87cef0 ci:0x2d86f840 ci:0x2d03a850 ci:0x2d038a00 ci:0x2d036910
ci:0x2cf95bf0)
-
Find constraint caches using multiple criteria, as shown below.
ciFindOpenCellViews(?cacheLib "overview" ?designView "layout")
=> (ci:0x26fc4820 ci:0x243626a0)
ciFindOpenCellViews(?cacheView "physConfig" ?designLib "overview" ?constraintView "constraint")
=> (ci:0x2701bf80)
-
Layout constraint caches might be found using the cache, design and constraint names, as shown below.
ciFindOpenCellViews(?cacheView "layout")
=> (ci:0x2d6ef0c0 ci:0x2a374e80)
=> ciFindOpenCellViews(?designView "layout")
(ci:0x2d6ef0c0 ci:0x2a374e80)
ciFindOpenCellViews(?constraintView "layout")
=> (ci:0x2d6ef0c0 ci:0x2a374e80)
-
Multiple constraint caches might be associated with a schematic, as shown below.
ciFindOpenCellViews(?designLib "overview" ?designCell "block1" ?designView "schematic")
=> (ci:0x24304250 ci:0x24370340)
-
Schematic is never the constraint storage view, as shown below.
ciFindOpenCellViews(?constraintView "schematic")
=> nil
-
Constraint is never the primary cache view, as shown below.
ciFindOpenCellViews(?cacheView "constraint")
=> nil
ciGetCellTermDefaultNetName
ciGetCellTermDefaultNetName(
t_cellName
t_termName
)
=> t_netName / nil
Description
Returns the default net name registered with a terminal for the cell name and terminal name that is passed.
Arguments
Value Returned
|
The default net name registered with the given cell name and terminal name. |
|
Example
ciGetDefaultNetName("pmos" "D")
ciGetCellView
ciGetCellView( [?windowd_window] [?findOnlyg_findOnly] [@restrest]) => u_cache/nil
Description
Returns the constraint cellview associated with a schematic or layout window.
ciGetCellView function can accept either of the two positional arguments, or will accept a single keyword as ciGetCellView(?window windowId ?findOnly t).Arguments
Value Returned
|
The constraint cache ID for the returned constraint cellview. |
|
Example
ciGetCellView(window(4))
Opens the constraint cache for window(4).
ciGetCellView(?window window(3) t)
Finds the constraint cache for window(3), if it is open.
ciGetCellView(?findOnly t)
Find the constraint cache for current window, if it is open.
ciGetCellView()
Opens the constraint cache for current window.
ciGetCellViewForObjectPath
ciGetObjectCellViewObjectPath(t_objectFullPathName t_currentHierPath) =>d_cellviewID/ nil
Description
Retrieves the cellview ID from the specified path to an object. This function is used within constraint generators.
objectName = "/abc/" or "" or "///", and so on), it is assumed that the object would be found in the current cellview. If the object is found, the following function returns the cellview ID:
ciGetCellViewForObjectPath(objectName ciGetCellView())
Arguments
|
Full hierarchical path to the object including the object name. |
|
Value Returned
|
Returns cellview ID associated with a particular object path. |
|
Example
cv = ciGetCellViewForObjectPath("/I16/MP0" "")
cv->libName
"amsPLL"
cv->cellName
"vco2phase"
cv->viewName
"schematic"
ciGetConnectedInsts
ciGetConnectedInsts(d_cvID l_nets u_constraint) =>l_instsNets/ nil
Description
Finds the instances to which all the nets in a constraint are connected and the corresponding connecting nets on which the constraint can be propagated.
Arguments
|
Cellview ID to which the specified nets and constraint belong. |
|
Value Returned
|
Returns a list of lists. The first member of the list is a connected instance and second is a list of connecting nets. For example: list(list(inst1 list(net1 net2)) list(inst2 list(net3 net4)) ...) |
|
Example
cv=geGetEditCellView()
db:0x230ae61a
con=ciConFind(ciGetCellView() "CG__0")
ci:0x2dee5dd0
nets = list("inp3" "inp4")
("inp3" "inp4")
insts = ciGetConnectedInsts(cv nets con)
((db:0x230a88e6
("outp" "outm")
)
(db:0x230a88e4
("inp" "inm")
)
)
car(insts)
(db:0x294888e6
("outp" "outm")
)
caar(insts)
db:0x294888e6
caar(insts)~>name
"|I16"
ciGetCustomFilterNames
ciGetCustomFilterNames( ) =>l_filterList/nil
Description
Returns a list of registered custom filters (including the Default filter) for the Match Subset Editor.
Arguments
Value Returned
Example
If a custom filter has been registered as myFilter, then
("Default" "myFilter")
ciGetDefaultNetName
ciGetDefaultNetName(
d_inst
t_termName
)
=> t_netName / nil
Description
Returns the default net name registered with a terminal by specifying and an instance ID and a terminal name.
Arguments
Value Returned
Example
ciGetDefaultNetName(db:0x345678 "B")
ciGetFoundryRules
ciGetFoundryRules(d_techfile) =>oaConstraintGroup/ nil
Description
Returns the foundry constraint group for the given technology file.
Arguments
Value Returned
Example
cv=geGetEditCellView() tf=techGetTechFile(cv) ciGetFoundryRules(tf)~>name
ciGetMatchParam2DList
ciGetMatchParam2DList(d_insts t_holdername) =>l_param2DList/nil
Description
Returns a 2D list (name-value pair) of CDF parameters present on the given instances as well as in the given holder list.
Arguments
|
Instances where name-value pairs are required to be returned. |
|
|
Holder list where name-value pairs are required to be returned. |
Value Returned
Example
If there is an instance, inst, the following SKILL function:
ciGetMatchParam2DList(inst "fetParamListForMatching")
(("model" "pmos1")
("l" "340.0n")
("w" "8u")
("m" "1")
)
ciGetMembersOfType
ciGetMembersOfType(l_instsNetsPins s_type[?includeTypeg_includeType] [?removeLeadingSlashg_removeLeadingSlash] [?expandg_expand] ) =>l_filteredList
Description
Filters the instsNetsPins list used by constraint generators to only include members of a specified type. See also, ciConGetMembersOfType.
Arguments
Value Returned
|
A filtered version of the passed |
Example
instsNetsPins = '(("MN1" inst) ("MN2" inst) ("netA" net) ("pinA" pin) ("MN3" inst))
ciGetMembersOfType( instsNetsPins 'inst )
=> '(("MN1" inst) ("MN2" inst) ("MN3" inst))
ciGetMembersOfType( instsNetsPins 'inst ?includeType nil)
=> '("MN1" "MN2" "MN3")
instsNetsPins = '(("MN1<0:1>" inst) ("netA" net) ("pinA" pin))
ciGetMembersOfType( instsNetsPins 'inst ?expand t)
=> '(("MN1<0>" inst) ("MN1<1>" inst))
ciGetObjectCellView
ciGetObjectCellView(t_objectPathAndName l_cache) =>cvID/ nil
Description
Used within constraint generators to retrieve the cellview associated with a particular object path. This SKILL function is similar to ciGetCellViewForObjectPath, but uses the cellview information associated with the cache if the object path does not contain a hierarchical path.
objectName = "/abc/" or "" or "///", and so on), it is assumed that the object would be found in the current cellview. If the object is found, the following function returns the cellview ID:
ciGetCellViewForObjectPath(objectName ciGetCellView())
Arguments
Value Returned
|
Returns cellview ID associated with a particular object path. |
|
Example
cv = ciGetObjectCellView("/I16/MP0" cacheTop)
cv->libName
"amsPLL"
cv->cellName
"vco2phase"
cv->viewName
"schematic"
;; Without a hier path to MP0 will use the cellview information associated with the cache to locate the cell view for MP0
cv = ciGetObjectCellView("MP0" cache_vco2phase)
cv->libName
"amsPLL"
cv->cellName
"vco2phase"
cv->viewName
"schematic"
;; Without a hier path to MP0 will use the cellview information associated with the cache to locate the cell view for MP0, but cacheTop does not contain MP0 - return nil
cv = ciGetObjectCellView("MP0" cacheTop)
cv->libName
nil
cv->cellName
nil
cv->viewName
nil
ciGetOpenCellViews
ciGetOpenCellViews( [?includeLayoutg_includeLayout] ) =>l_cacheIds/nil
Description
Returns a list of open constraint caches in the virtual memory.
Arguments
|
Specifies whether the layout constraint caches are included. Default: |
|
Value Returned
|
No open constraint cache matching the specified criteria could be found. |
Example
-
Get the modified constraint views:
modifiedcaches = setof(c ciGetOpenCellViews() ciCacheIsModified(c))
-
Get the open constraint library/cell/view names:
mapcar('ciConstraintLCV ciGetOpenCellViews())
-
Sort the list of constraint caches, excluding layout:
sort(ciGetOpenCellViews(?includeLayout nil) 'ciConstraintViewLessp)
-
Get the layout constraint caches:
layoutcaches = setof(c ciGetOpenCellViews(?includeLayout t) ciCacheIsLayout(c))
ciGetRuleGroupByName
ciGetRuleGroupByName( [d_techfile|d_cellView]t_name) =>oaConstraintGroup/nil
Description
Returns the constraint group from the specified design or technology database with the specified name.
Arguments
Value Returned
Example
ciGetRuleGroupByName(tf, "2xRouting")
ciGetRuleGroupName
ciGetRuleGroupName(g_constraintGroupPointer) =>oaConstraintGroup/ nil
Description
Returns the string name of a constraint group from a given constraint group pointer.
Arguments
|
The constraint group pointer for which string name is needed. |
Value Returned
|
The name of the constraint group for the given constraint group pointer. |
|
Example
ciGetRuleGroupName(cg1)
"cg1"
ciGetRuleGroups
ciGetRuleGroups( [d_techID|d_cellViewID] ) =>oaConstraintGroupList/nil
Description
Returns a list of oaConstraintGroup pointers for a given technology or design file.
Arguments
Value Returned
Example
ciGetRuleGroupName(cg1)
"cg1"
ciGetWidgetProperties
ciGetWidgetProperties(l_genArgs) =>l_widgetProp/ nil
Description
Returns the widget properties set on the constraint generator arguments, genArgs.
Arguments
Value Returned
Example
args = list(nil 'width 0.35 'length 0.7
'widgetProperties list('widgetProperties
'width list('toolTip "" 'hide nil 'enable t)
'height list('toolTip "" 'hide nil 'enable t)
'width\.label list('text "Width" 'toolTip "" 'hide nil 'enable t)
'height\.label list('text "Height" 'toolTip "" 'hide nil 'enable t)
)
procedure(myArgumentCallback(cache argName args oldArgs instsNetsPins userEdit)
let(( (properties ciGetWidgetProperties(args) ) )
;;Setting a toolTip on the widget width
properties->width->toolTip = "Enter the width of the transistor"
;;changing the text displayed in the constraint generator dialog for the argument widget
properties->width\.label->text = "Width (um):"
;;returning the updated value of argument
;; args is now equal to:
;; list(nil 'width 0.35 'length 0.7
;; 'widgetProperties list('widgetProperties
;; 'width list('toolTip "Enter the width of the transistor" 'hide nil 'enable t)
;; 'height list('toolTip "" 'hide nil 'enable t)
;; 'width\.label list('text "Width (um) :" 'toolTip "" 'hide nil 'enable t)
;; 'height\.label list('text "Height" 'toolTip "" 'hide nil 'enable t)
;; )
args
)
)
ciHasCellAnyRegTerm
ciHasCellAnyRegTerm( t_cellName ) =>t/nil
Description
Returns information on whether or not the given cell has at least one terminal registered with a default net.
Arguments
Value Returned
|
Given cell has one or more terminals registered with a default net. |
|
Example
ciHasCellAnyRegTerm("pmos")
ciHaveSameBulkNets
ciHaveSameBulkNets( l_dbId ) =>t/nil
Description
Returns t if the passed list of devices have the same bulk connection.
This function relies on the bulk terminal names that are being registered for the devices in the PDK using ciMapTerm("bulk" <listOfBulkTerminalNames>).
Arguments
Value Returned
|
If the specified list of devices have the same bulk connection. |
|
Example
l_dbId = geGetSelectedSet()
ciHaveSameBulkNets(l_dbId)
ciHierCompareConstraint
ciHierCompareConstraint( u_sourceCons u_targetCache [?pathsl_occurrencePaths ] [?recursiveg_recursive] ) =>constraintComparisons/nil
Description
Copies and compares applicable pushed or pulled constraints in the layout hierarchy. The copied constraint members, such as nets, terminals, instance terminals, and so on correspond to the original constraint members as they are physically connected.
Arguments
Value Returned
ciHierCompareConstraints
ciHierCompareConstraints( u_sourceCache u_targetCache [?pathsl_occurrencePaths ] [?recursiveg_recursive] ) =>constraintComparisons/nil
Description
Compares applicable pushed or pulled constraints in the layout hierarchy. The copied constraint members (nets, terminals, instance terminals, and so on) correspond to the original constraint members because they are physically connected.
Arguments
Value Returned
Examples
ciHierCompareConstraints(source target)
ciHierCompareConstraints(source target ?paths list("/I0" "/I1") ?recursive t)
ciHierCompareConstraints(source target ?paths list("/I3/I0/I0"))
ciHierCompareConstraints(source target ?recursive t)
ciHierUpdateConstraints
ciHierUpdateConstraints( u_sourceCache u_targetCache [?pathsl_occurrencePaths ] [?recursiveg_recursive] ) =>t/nil
Description
Used in sync with the pushed and pulled constraints with their source constraints. After push or pull the constraint parameters have been modified, you can use this SKILL function to update the pushed or pulled constraints.
Arguments
|
Cache where constraints have been created after push or pull. Used only for pulled constraints. |
|
Value Returned
Example
ciHierUpdateConstraints(
srcCache destCache ?recursive t
)
ciIsNetSuperType
ciIsNetSuperType(t_netType) =>t/nil
Description
Tests whether or not the given net type is a super-type.
Arguments
Value Returned
Example
;; Register a super type and some sub-types.
ciRegisterNetSuperType("Supply" '("Power" "Ground"))
ciRegisterNetNames("Power" '("vcc"))
ciRegisterNet("Ground" '("gnd"))
;; Check which types are super and which are sub.
ciIsNetSuperType("Supply") ; t
The above example shows that Supply is a super-type.
ciIsNetSuperType("Power") ; nil
The above example shows that Power is not a super-type.
ciIsNetSuperType("Ground") ; nil
The above example shows that Ground is not a super-type.
ciLoadConfigXML
ciLoadConfigXML(t_directoryPathToConfigXML) =>g_result
Description
Loads the specified constraint config.xml file. In the process, the new entries get merged into the existing config.xml files that have already been loaded and the existing entries are overwritten.
When you start Virtuoso, all config.xml files found in the Cadence Search Path are loaded and merged based on the order in which they are found in the setup.loc file. By using this function, you can load a config.xml on demand after Virtuoso has been started, such as when a design library or PDK is loaded.
See also ciLoadDotCadenceFiles, ciLoadIcon, and ciLoadIcons.
Arguments
|
The full path to the directory that contains a file named |
Value Returned
Example
ciLoadConfigXML("/project1/.cadence/dfII/ci") ;; load project specific config.xml
ciLoadConfigXML("./.cadence/dfII/ci") ;; load local config.xml
ciLoadConfigXMLFromString
ciLoadConfigXMLFromString(t_configXMLString) =>g_result
Description
Loads the string representation of a config.xml file. If a new entry does not match an existing entry, the new entry gets added into the config.xml files that have already been loaded. However, if the new entry matches an existing entry, the new entry overwrites the old one.
When you start Virtuoso, all config.xml files found in the Cadence Search Path are loaded and merged based on the order in which they are found in the setup.loc file. By using this function, you can load a config.xml on demand after Virtuoso has been started, such as when a design library or PDK is loaded.
See also ciLoadConfigXML, ciLoadDotCadenceFiles, ciLoadIcon, and ciLoadIcons.
Arguments
Value Returned
Example
configXMLstring="\
<ConstraintConfig>\
<ConstraintType>\
<Name>myConType</Name>\
<GUIName>My Con Type</GUIName>\
<Icon>myConTypeIcon.png</Icon>\
<MinMembers>1</MinMembers>\
<MaxMembers>1000000</MaxMembers>\
<AllowedMemberTypes>inst</AllowedMemberTypes>\
<VerifyCB>myConTypeVerifyCB</VerifyCB>\
<Param>\
<Name>param1</Name>\
<GUIName>Param1</GUIName>\
<Type>boolean</Type>\
<Scope>constraint</Scope>\
<DefaultValue>true</DefaultValue>\
</Param>\
<Param>\
<Name>Param2</Name>\
<Type>enum</Type>\
<ValueRange>aaa bbb ccc ddd</ValueRange>\
<Scope>constraint</Scope>\
<DefaultValue>\"ccc\"</DefaultValue>\
</Param>\
</ConstraintType>\
</ConstraintConfig>"
ciLoadConfigXMLFromString(configXMLstring)
procedure( myConTypeVerifyCB(con)
printf("Verifying constraint %s (%s)\n" con~>name con~>type)
) ;procedure
For more details on VerifyCB callback, see
ciLoadConstrFrom
ciLoadConstrFrom(
t_sourceCache
t_targetCache
t_mode
)
=> t / nil
Description
Loads the constraints from the source cache to the target cache of the same type.
Arguments
|
The mode in which the constraints should be loaded from the source cache. The following values are accepted: |
Value Returned
Example
ciLoadConstrFrom(ciOpenCellView("amsPLL" "vco2phase" "schematic" "constraint_source" "r") ciOpenCellView("amsPLL" "vco2phase" "schematic" "constraint_target" "r") "Replace")
=> t
INFO (CMGR-5294): Loaded the following successfully from cellview 'amsPLL/vco2phase/schematic':
3 of 3 constraints
2 of 4 parasitic constraints
1 of 2 constraint groups
ciLoadDotCadenceFiles
ciLoadDotCadenceFiles(t_pathToDotCadenceDir[g_verbose] ) =>g_result
Description
Loads all constraint-related files within the hierarchy of the specified .cadence directory.
Specifically the following type of files are loaded:
-
.cadence/icons/16x16/*.png -
.cadence/dfII/ci/config.xml -
.cadence/dfII/ci/iterators/*.il *.ile *.cxt -
.cadence/dfII/ci/generators/*.il *.ile *.cxt -
.cadence/dfII/ci/structures/*.il *.ile *.cxt -
.cadence/dfII/ci/finders/*.il *.ile *.cxt -
.cadence/dfII/ci/categories/*.il *.ile *.cxt -
.cadence/dfII/ci/categories/org/*.il *.ile *.cxt
In case of the config.xml file, the new entries get merged into the existing config.xml files that have already been loaded and the existing entries are overwritten.
This SKILL function can be called within the libInit.il file of a PDK or design library so that library-specific constraint customizations can be setup when the library is loaded. As you can have your own customizations, it is recommended that the following command is run to re-load those customizations:
ciLoadDotCadenceFiles("./.cadence")
Arguments
|
The full path to the |
|
|
(Optional) Boolean to turn on verbose messages about the files being loaded. It defaults to |
Value Returned
|
Returns |
Example
ciLoadDotCadenceFiles("./.cadence") ;;; load constraints files from local .cadence directory
ciLoadDotCadenceFiles(getShellEnvVar("PROJECT_DOT_CADENCE") t) ;;; load constraints files from a project specific .cadence directory and turn on verbose messages:
INFO (CMGR-3066): Loading all files within '/project1/skill/.cadence'...
INFO (CMGR-3066): Loading icons from '/project1/skill/.cadence/icons/16x16'...
INFO (CMGR-3066): Loading icon file: '/project1/skill/.cadence/icons/16x16/MyCascode.png'...
INFO (CMGR-3066): Loading icon file: '/project1/skill/.cadence/icons/16x16/MyDifferentialPair.png'...
INFO (CMGR-3066): Loading XML config from '/project1/skill/.cadence/dfII/ci'...
INFO (CMGR-3066): Loading Constraint Editor files[0]...
INFO (CMGR-3066): Loading Constraint Generator files[2]...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/generators/MyCascode.il...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/generators/MyDifferentialPair.il...
INFO (CMGR-3066): Loading Circuit Prospector Iterator files[3]...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/iterators/MyCascodeIterator.il...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/iterators/MyDifferentialPairIterator.il...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/iterators/MyIteratorUtils.il...
INFO (CMGR-3066): Loading Circuit Prospector Finder files[2]...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/finders/MyCascode.il...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/finders/MyDifferentialPair.il...
INFO (CMGR-3066): Loading Circuit Prospector Structure files[0]...
INFO (CMGR-3066): Loading Circuit Prospector Category files[1]...
INFO (CMGR-3066): /project1/skill/.cadence/dfII/ci/categories/MyCategory.il...
INFO (CMGR-3066): Loading Circuit Prospector Category Organization files[0]...
INFO (CMGR-3066): Loading Constraint Filter files[0]...
INFO (CMGR-3066): Loading Constraint Menu History files[0]...
t
ciLoadIcon
ciLoadIcon(t_iconFilePath[g_verbose] ) =>g_result
Description
Loads a specific PNG format icon file from the specified directory so that it can be used by the Constraint Manager. The file should have a .png extension.
When you start Virtuoso, all icon files found in the .cadence/icons/16x16 directories in the Cadence Search Path are loaded in the order in which they are found in the setup.loc file. By using this function, you can load icon files on demand after Virtuoso has been started, such as when a design library or PDK is loaded.
See also ciLoadDotCadenceFiles, ciLoadConfigXML, and ciLoadIcons.
Arguments
|
Boolean to turn on verbose messages about the icon files being loaded. It defaults to |
Value Returned
Example
ciLoadIcon("/project/.cadence/icons/16x16/Cascode.png") ;;; load project specific icons
t
ciLoadIcon("./.cadence/icons/16x16/MyCascode.png" t) ;;; load local icons verbosely
INFO (CMGR-3066): Loading icon file: './.cadence/icons/16x16/MyCascode.png'...
t
ciLoadIcons
ciLoadIcons(t_iconDirectoryPath[g_verbose] ) =>g_result
Description
Loads all PNG format icon files from the specified directory so that these can be used by the Constraint Manager. The file should have a .png extension.
When you start Virtuoso, all icon files found in the .cadence/icons/16x16 directories in the Cadence Search Path are loaded in the order in which they are found in the setup.loc file. By using this function, you can load icon files on demand after Virtuoso has been started, such as when a design library or PDK is loaded.
See also ciLoadDotCadenceFiles, ciLoadConfigXML, and ciLoadIcon.
Arguments
|
(Optional) Boolean to turn on verbose messages about each icon file being loaded. It defaults to |
Value Returned
Example
ciLoadIcon("/project/.cadence/icons/16x16/Cascode.png") ;;; load project specific ciLoadIcons("/project/.cadence/icons/16x16") ;;; load project specific icons
t
ciLoadIcons("./.cadence/icons/16x16" t) ;;; load local icons verbosely
INFO (CMGR-3066): Loading icon file: './.cadence/icons/16x16/MyCascode.png'...
INFO (CMGR-3066): Loading icon file: './.cadence/icons/16x16/MyDifferentialPair.png'...
t
ciListEditors
ciListEditors(
)
=> l_editors / nil
Description
Generates a list of the current constraint editors that are available from the Constraint Manager’s Constraint Generator toolbar option.
Arguments
Value Returned
ciListTypes
ciListTypes(
)
=> l_types
Description
Generates a list of the current definitions for each constraint type in the config.xml files, the name of the constraint, and a list of legal constraint parameters and their default values.
Arguments
Value Returned
ciListProcessRules
ciListProcessRules(d_Id[t_parameterType] ) =>process_rules/nil
Description
Lists all process rules associated with the given object.
Arguments
Value Returned
Example
To list the input taper rules on a net:
ciListProcessRules(net, "InputTaper")
ciLxComparisonReport
ciLxComparisonReport( [?layoutCVg_layoutCV] [?showReportg_showReport] [?useViewNamesg_useViewNames] [?useTimeStampg_useTimeStamp] [?pathg_path] [?filenameg_filename] ) =>t/nil
Description
Prints a comparison report between a layout and its corresponding VLS XL schematic and/or top configuration.
Arguments
Value Returned
Example
-
ciLxComparisonReport ?layoutCV layoutCV_d
When passing in the layout cellview ID, the correct schematic or configuration will be identified and, when the design is already opened in VLS XL, a report will be generated for that layout and its current schematic pair. -
ciLxComparisonReport ?showReport nil
A browser with the report will not be shown. -
ciLxComparisonReport ?useViewNames t
The file name created will contain the source and the destination lib/cell/view names. This way the report files can be identified from the name without opening them. -
ciLxComparisonReport ?useTimeStamp t
The file name contains a timestamp (year, month, day and time of day). It can be used in conjunction with any of the above examples.
For example, if you want to generate a specific report for a layout cellview and its schematic, without showing a browser, with the file name identifying both the view names and the run time, then you can use... -
ciLxComparisonReport ?layoutCV layoutCV_d ?showReport nil ?useViewNames t ?useTimeStamp t
The order in which the keyed parameters are placed does not matter. -
ciLxComparisonReport ?path "pathstring/"
This will write to the current directory that the path need not end with a '/' character. For example,?path "/foo/bar"will write a file in the"/foo/bar/". The default is “./” and a string is expected.
-
ciLxComparisonReport ?path "temp" ?fileName "rpt.html"
This will create a filerpt.htmlunder thetempdirectory.
ciModgenMergeLayersFromArgs
ciModgenMergeLayersFromArgs(l_args[?layersPresetArgNamet_layersPresetArgName] [?mergeLayersArgNamet_mergeLayersArgName] ) =>t_modgenLayers/null_string
Description
Returns a string with the list of layers from a property list, where each layer is separated by a comma.
Arguments
Value Returned
Examples
-
Assume, the default layers are:
layerDef1,layerDef2,layerDef3and
The function returns:args = list(nil Merge\ layers "layer1; layer2; layer3" Layers\ preset "default")"layerDef1, layerDef2, layerDef3" -
Assume, the well layers are:
layerWell1, layerWell2, layerWell3andargs = list(nil Merge\ layers "layer1; layer2; layer3 " Layers\ preset "well")
The function returns:"layerWell1, layerWell2, layerWell3" -
If there are no layers, but
args = list(nil Merge\ layers "layer1; layer2; layer3 " Layers\ preset "none")
The function returns:"" -
Assume,
args = list(nil Merge\ layers "layer1; layer2; layer3 " Layers\ preset presetValue)
wherepresetValueis a string different from"default","none", or"well".
The function returns:"layer1, layer2, layer3"
ciModgenListFingerSplitCons
ciModgenListFingerSplitCons(g_modgen) =>l_fingerSplitCons/ nil
Description
Returns a list of fingerSplit constraints that exist on the passed modgen members. This SKILL function can be used in a template create or check callback function to include the fingerSplit constraints within a template.
Note: The fingerSplit constraints are not visible in the Constraint Manager assistant.
See also ciModgenSplitFingers and ciTemplateCreateDefinition.
Arguments
|
The modgen for which the |
Value Returned
|
The list of the |
|
|
|
Examples
;;; Split the modgen fingers
ciModgenSplitFingers(ciGetCellView() modgen ‘(("MN1" inst) ‘(("MN2" inst)) t)
ciModgenListFingerSplitCons(modgen)~>name
("fs1" "fs2")
;;; unsplit the modgen fingers
ciModgenSplitFingers(ciGetCellView() modgen ‘(("MN1" inst) ‘(("MN2" inst)) nil)
ciModgenListFingerSplitCons(modgen)~>name
nil
ciModgenRefreshStorage
ciModgenRefreshStorage(g_modgen) =>t/nil
Description
Reinitializes the internal modgen storage. When the ci SKILL functions are used to update a modgen constraint in layout or the modgen previewer, the internal modgen storage needs to be reinitialized to ensure it is in a consistent state. Modgen constraint updates include adding/removing members, updating parameters, and adding/removing guard rings.
Arguments
|
The modgen that has been updated and whose storage needs to be reinitialized. |
Value Returned
|
The modgen constraint was refreshed in the layout or the modgen previewer. |
|
|
The modgen constraint could not be refreshed in the layout or the modgen previewer. |
Example
ciConUpdateParams(modgen '(("numRows" 4)))
ciModgenRefreshStorage(modgen)
ciModgenSplitFingers
ciModgenSplitFingers(g_cache g_modgen l_instsNetsPins g_split) =>l_instsNetsPins
Description
Splits or unsplits the device fingers for the instances specified in the instsNetsPins list associated with the passed modgen. When called in a layout view, the physical device instances are split or unsplit and the modgen figGroups are updated accordingly. When called in a schematic view, the finger split information is stored in the schematic constraints cache. This information is used while transferring the schematic constraints to layout, and splitting or unsplitting the instances in layout.
This function should be called before the modgen members are updated to take into account device finger splitting. This function does not update the modgen members. This is the responsibility of the user because the interdigitation pattern of the modgen needs to accommodate the addition or removal of the finger-split instances.
See also ciModgenTemplateFingerSplitPreDestroy.
Arguments
Value Returned
|
An updated |
Examples
instsNetsPins = '(("|MN1" inst)("|MN2" inst))
;;; |MN1(m=1, fingers=2) |M2(m=1, fingers = 3)
splitInstsNetsPins = ciModgenSplitFingers(cache modgen instsNetsPins t)
'(("|MN1.1" inst)("|MN1.2" inst)("|MN2.1" inst)("|MN2.2" inst)
("|MN2.3" inst))
ciModgenSplitFingers(cache modgen splitInstsNetsPins nil)
'(("|MN1" inst)("|MN2" inst))
ciModgenTemplateFingerSplitPreDestroy
ciModgenTemplateFingerSplitPreDestroy(g_template) =>t/nil
Description
Ensures that the split device instance fingers are unsplit and that the modgen figGroup is updated before the specified template is deleted. This high-level function should be used where modgens are contained within templates that control finger splitting on those modgens. To call this function before the template is deleted, it should be registered as the preDestroySymbolName of the template when the template is defined by using ciTemplateCreateDefinition.
See also ciModgenSplitFingers and ciTemplateCreateDefinition.
Arguments
Value Returned
|
Template deleted successfully after unsplitting the split device instance fingers and updating the modgen figGroup. |
|
Examples
ciTemplateCreateDefinition('FingerSplitTest
'FingerSplitTestCheckCB
'FingerSplitTestCreateCB
?acceptsUserParams t
?params ciGetStructArgs('FingerSplitTest)
?preDestroySymbolName
ciModgenTemplateFingerSplitPreDestroy
)
ciObjectIsInContext
ciObjectIsInContext(u_cache t_designObjectName t_designObjectType) =>t/nil
Description
Returns the current context status of an object. If an object is in context, it is present in the database.
Arguments
|
The constraint cache ID (see |
|
|
A legal design object name in the CDBA name space (see |
|
|
A symbol that describes the database object type of a design object (see |
Value Returned
ciObjectListCon
ciObjectListCon(u_cache t_designObjectName t_designObjectType) =>constraintIdList/nil
Description
Lists all constraints that refer to a given design object as a member.
Arguments
|
See |
|
|
See |
|
|
See |
Value Returned
|
A list of |
|
ciObjectPathAndName
ciObjectPathAndName(t_objectPathAndName) =>l_disembodied_objectPath_objectName
Description
This function is used in constraint generators to separate the object path and name from a string. The result is returned as a disembodied property list with properties, such as objectPath and objectName. The objectPath property is a list of strings that represent the full hierarchical path to the object including the objects name.
Arguments
Value Returned
Example
opn = ciObjectPathAndName("/I1/I2/MN1")
opn->objectPath ("I1" "I2" "MN1")
opn->objectName "MN1"
ciOpenCellView
ciOpenCellView(t_libNamet_cellName t_viewName t_constraintViewName t_mode ) =>u_cache/ nil
Description
Opens the constraint cache for the library, cell, view, and constraint view in read or edit mode as specified, and returns the constraint cache ID or returns nil if the constraint cache could not be opened. ciOpenCellView allows the mode to be specified. However, it does not downgrade the mode to read if the constraint cache is already open in edit mode. In this case, ciReopenCellView can be used to change the mode, if required.
See also ciCacheGet that finds or opens the constraint cache based on the current constraint viewNameList instead of specifying a particular constraint view.
Arguments
Value Returned
|
Returns the constraint |
|
|
Returned when the specified library, cell, view, or constraint view does not exist. |
Examples
-
Open the constraint cache associated with a schematic in read mode.
cc = ciOpenCellView("overview" "block1" "schematic" "constraint" "r")
-
Open the constraint cache associated with a physConfig in edit mode.
cc = ciOpenCellView("overview" "block1" "physConfig" "constrTampa" "a")
-
Open the constraint cache for multiple constraint views in read mode.
constrviewnames = list("comstr1" "constr2" "constr3")
mapcar(
lambda( (conview)
ciOpenCellView("overview" "block2" "schematic" conview "r") )
constrviewnames)
ciOpenPanicCellView
ciOpenPanicCellView(t_libNamet_cellName t_viewName t_constraintViewName ) =>u_cache/ nil
Description
Restores the constraint cellview (associated with a schematic cellview) that was saved in panic state, which is when Virtuoso exited unexpectedly, in the hierDesign.oa- file. The restored constraint cellview opens in append mode. You can use the Constraint Manager to view this constraint cellview. This SKILL function returns a cache pointer of the restored constraint cellview. Use this cache pointer as an argument with the SKILL function to save the restored constraint cellview. You can then open the recovered constraint cellview in the Constraint Manager.
Arguments
|
The library from which the constraint view needs to be restored. |
|
|
The cell from which the constraint view needs to be restored. |
|
|
The schematic view from which the constraint view needs to be restored. |
|
Value Returned
|
Returns the constraint |
|
|
Returned when the specified library, cell, view, or constraint view, or the |
Example
cache = ciOpenPanicCellView("amsPLL" "vco" "schematic" "constraint")
Here, ciOpenPanicCellView will open the cellview, constraint that was saved in panic state. Calling the ciCacheSave(cache) SKILL function will save the restored panic state view.
ciPrintReport
ciPrintReport( d_sourceCache d_targetCache [t_fileName] [g_includeDefaultParam] ) =>t/nil
Description
Generates an HTML report containing constraint differences between two designs.
The report contains the following sections:
- constraints only in source design
- constraints only in target design
- different constraints
- equal constraints
Arguments
|
The constraint |
|
|
Optional argument which lets you set the html file name where the report should be written. |
|
|
Optional argument (default |
Value Returned
ciPullConstraint
ciPullConstraint(u_cons u_targetCache[?pathsl_paths] [?autoTagg_autoTag] [?recursiveg_recursive] [?updateg_update] ) =>constraintIdList/nil
Description
Copies a single constraint up the layout hierarchy.
This can be described as “pulling” the constraint up the design hierarchy. The copied constraint’s members (nets, terminals instance terminals and so on) will also correspond to the original constraint members as they are physically connected.
-
Constraints will only be pulled if the
hierarchicalScopeparameter enumerated value set includes the value above. -
Constraints will only be pushed if the
hierarchicalScopeparameter enumerated value set includes the value below.
See also
Arguments
Value Returned
t |
Constraint successfully pulled up the layout hierarchy as per settings. |
nil |
Example
ciPullConstraint(con top_cache ?recursive t ?paths list("|I18/I1"))
This will pull all connected constraint from a lower level design (source_cache) to the top_cache along the path "|I18/I1". That is, it will pull the constraint from I1 to I18 and then recursively from I18 to top_cache.
ciPullConstraints
ciPullConstraints(u_sourceCache u_targetCache[?pathsl_paths] [?autoTagg_autoTag] [?recursiveg_recursive] [?updateg_update] ) =>constraintIdList/nil
Description
Copies all applicable constraints up a layout hierarchy.
This can be described as “pulling” constraints up the design hierarchy. The copied constraints’ members (nets, terminals instance terminals and so on) will also correspond to the original constraint members as they are physically connected.
-
Constraints will only be pulled if the
hierarchicalScopeparameter enumerated value set includes the value above. -
Constraints will only be pushed if the
hierarchicalScopeparameter enumerated value set includes the value below.
See also
Arguments
Value Returned
|
Constraints successfully pulled up the layout hierarchy as per settings. |
|
Example
ciPullConstraints(source_cache top_cache ?recursive t ?paths list("|I18/I1"))
This will pull all connected constraints from a lower level design (source_cache) to the top_cache along the path "|I18/I1". That is, it will pull constraints from I1 to I18 and then recursively from I18 to top_cache.
ciPushConstraint
ciPushConstraint(u_constraint[?pathsl_paths] [?autoTagg_autoTag] [?recursiveg_recursive] [?updateg_update] ) =>constraintIdList/nil
Description
Copies a single of constraint down a layout hierarchy.
This can be described as “pushing” the constraint down a design hierarchy. The copied constraint’s members (nets, terminals instance terminals, and so on) will also correspond to the original constraint members as they are physically connected.
-
Constraints will only be pulled if the
hierarchicalScopeparameter enumerated value set includes the value above. -
Constraints will only be pushed if the
hierarchicalScopeparameter enumerated value set includes the value below.
See also
Arguments
Value Returned
|
Constraint successfully pushed down the layout hierarchy as per settings. |
|
ciPushConstraints
ciPushConstraints(u_cache[?pathsl_paths] [?autoTagg_autoTag] [?recursiveg_recursive] [?updateg_update] ) =>constraintIdList/nil
Description
Copies a set of constraints down a layout hierarchy.
This can be described as “pushing” constraints down a design hierarchy. The copied constraints’ members (nets, terminals instance terminals, and so on) will also correspond to the original constraint members as they are physically connected.
-
Constraints will only be pulled if the
hierarchicalScopeparameter enumerated value set includes the value above. -
Constraints will only be pushed if the
hierarchicalScopeparameter enumerated value set includes the value below.
See also
Arguments
Value Returned
|
Constraints successfully pushed down the layout hierarchy as per settings. |
|
Example
-
In the following example, if you specify
l_pathsargument, then constraints will be pushed toI1andI2only.ciPushConstraints(cache ?paths list("I1" "I2"))
-
In the following example, the constraints will be first pushed to
I1from current level and then fromI1toI2.ciPushConstraints(cache ?paths list("I1/I2"))
ciRefreshCellView
ciRefreshCellView(u_cache) =>u_cache/nil
Description
Refreshes the constraint cache in the virtual memory with the most current copy from the disk if it has changed.
Arguments
Value Returned
|
Returns a new cache ID if the constraint cache was refreshed. |
|
Example
Refresh the current constraint cache if it has been updated on the disk:
cache = ciGetCellView()
when( ciCacheNeedRefresh(cache)
cache = ciRefreshCellView(cache)
)
ciRegisterConstraintEditor
ciRegisterConstraintEditor( list(nil 'namet_name'descriptiont_description'constraintTypet_constraintType'constraintParamsl_constraintParams'editorAvailableExpressiont_editorAvailableExpression'startEditorExpressiont_startEditorExpression'iconNamet_iconName'addToToolbarg_addToToolbar'templateTypesl_templateTypes'useForTemplateEditg_useForTemplateEdit'useForConstraintCreationg_useForConstraintCreation'useForConstraintParamEditg_useForConstraintParamEdit'editableConstraintParamsl_editableConstraintParams) =>t/nil
Description
Registers a constraint editor with the Constraint Manager assistant and, optionally, adds a button to the Constraint Manager toolbar. This button can be used to open the registered constraint editor. An entry is also added to the Constraint Editor submenu that appears on the context-sensitive menu of the Constraint Manager.
See also ciUnregisterConstraintEditor.
Arguments
|
Type of constraint that can be edited using this constraint editor (if you select in the Constraint Manager a constraint that does not match this type, the constraint editor option is grayed out). |
|
|
List of constraint parameter names and values that require to be matched for the constraint editor to be able to edit a constraint in the Constraint Manager. If the parameter name or values do not match the values set using this parameter, the constraint editor option is grayed out. |
|
|
Expression that is evaluated to determine whether a constraint editor is available in the application currently being run. For example, this argument can be used to specify that a constraint editor is available only in the layout or schematic Constraint Manager. The Constraint Comparison Report is available only in layout.
If this expression returns |
|
|
Expression that is evaluated before the constraint editor is opened. This expression can refer to a constraint variable whose value is the selected constraint when the constraint editor is run or nil if no constraint is currently selected. |
|
|
Name of the |
|
|
Determines whether or not a tool button should be added to the Constraint Manager toolbar for the constraint editor. |
|
|
List of templates that can be edited in the constraint editor. |
|
|
Determines whether the constraint editor should be launched in the following two cases:
This argument works only when the
'useCGenForEdit argument of the ciRegisterConstraintGenerator SKILL function is not set for the constraint generator associated with the concerned template. Otherwise, double-click or parameter edit launches the associated constraint generator dialog box. |
|
|
Determines whether the constraint editor should be launched whenever a constraint of the type specified by the |
|
|
Determines whether the constraint editor should be launched when you edit a constraint parameter in the Constraint Parameter Editor pane. |
|
|
List of constraint parameters for which the constraint editor is displayed when one of the listed parameters is edited in the Constraint Parameter Editor pane. If a constraint parameter is not specified in this list, it is edited within the Constraint Parameter Editor pane. |
|
Value Returned
Example
ciRegisterConstraintEditor(
list(nil 'name "Module Generator"
'description "Modgen - Layout Structure Editor"
'constraintType "layoutStructure"
'constraintParams list( "type=module")
'editorAvailableExpression "when(dbValidP(cv) equal(cv->cellViewType "maskLayout"))"
'startEditorExpression "mgCreateOrEdit(geGetEditCellView () constraint nil)"
'iconName "nexGenEd"
'addToToolbar t
'templateTypes list("CurrentMirror" "DiffPair")
'useForTemplateEdit t
'useForConstraintCreation t
'useForConstraintParamEdit t
'editableConstraintParams list("numRows" "numCols")
)
)
ciRegisterCustomDeviceFilter
ciRegisterCustomDeviceFilter(t_name t_func) =>t/nil
Description
Registers a custom filter or modifies an existing filter.
Arguments
Value Returned
Example
ciRegisterCustomDeviceFilter(“myDefault” 'CstMyFilter)
ciRegisterNetSuperType
ciRegisterNetSuperType(t_superType l_subTypes) =>t/nil
Description
This function creates a net type that automatically includes the names, regular expressions, and predicates registered in other net types. The new net type is known as a super-type, and the net types included in it as sub-types.
For more information, also see the following:
Arguments
|
Specifies a list of sub-type nets to include in the super-type net. |
Value Returned
|
Indicates that the new super-type net has been created successfully. |
|
Example
;; Register "Supply" as the union of "Power" and "Ground".
ciRegisterNetSuperType("Supply" '("Power" "Ground"))
;; Register some power and ground nets.
procedure(myPowerPredicate(net netType) net->sigType == "supply")
ciRegisterNetNames("Power" '("vcc"))
ciRegisterNetRegexs("Power" '("[vV][dD][dD]"))
ciRegisterNetPredicate("Power" 'myPowerPredicate)
procedure(myGroundPredicate(net netType) net->sigType == "ground")
ciRegisterNet("Ground" '("gnd"))
ciRegisterNetRegexs("Ground" '("[vV][sS][sS]"))
ciRegisterNetPredicate("Ground" 'myGroundPredicate)
;; The "Supply" super-type contains everything in "Power" and "Ground".
ciNetNames("Supply") ; ("vcc" "gnd")
ciNetRegexs("Supply") ; ("[vV][dD][dD]" "[vV][sS][sS]")
ciNetPredicates("Supply") ; (myPowerPredicate myGroundPredicate)
ciRegTypeBindingParameter
ciRegTypeBindingParameter(S_typeName S_paramName) =>t/nil
Description
Registers a binding parameter for a user-defined constraint type from a config.xml file. The parameter value must match for the constraints of that type to be considered equivalent between schematic and layout. Specifying an empty parameter name string unregisters the binding parameter.
Arguments
Value Returned
Example
Check if the constraint type has a binding parameter:
ciTypeHasBindingParameter('myType)
=> nil
Register a binding parameter for "myBindingParam" for "myType":
ciRegTypeBindingParameter("myType" "myBindingParam")
Confirm binding parameter has been registered:
ciTypeHasBindingParameter('myType)
=> t
ciTypeBindingParameter('myType)
=> "myBindingParam"
Unregister a binding parameter by specifying an empty string:
ciRegTypeBindingParameter("myType" "")
ciTypeHasBindingParameter('myType)
=> nil
ciRemoveConstrainedPinNetsFromRails
ciRemoveConstrainedPinNetsFromRails(g_cache) =>t/nil
Description
Deletes any constraints on pins where the net on the pin is also a member of a rail constraint because this is currently not supported by the Analog Placer.
Arguments
Value Returned
|
Constraints on pins from the specified cache successfully removed. |
|
Example
pinCon = ciConCreate(cache 'alignment ?members '(("VDD:2" pin) ("hold:5" pin) ("inp:9" pin)))
railCon = ciConCreate(cache 'rail ?members '(("VDD" net) ("PR Boundary" boundary) ))
mapcar(lambda((mem) car(mem)) pinCon~>members)
("VDD:2" "hold:5" "inp:9")
mapcar(lambda((mem) car(mem)) railCon~>members)
("VDD" "PR Boundary")
ciRemoveConstrainedPinNetsFromRails(cache)
*WARNING* (CMGR-6140): Pin 'VDD:2' from alignment constraint 'Constr_3' is contained within a rail constraint 'Constr_5'. This is not supported by the analog placer and the pin member will be deleted from the alignment constraint by precedence rules.
mapcar(lambda((mem) car(mem)) pinCon~>members)
("hold:5" "inp:9")
mapcar(lambda((mem) car(mem)) railCon~>members)
("VDD" "PR Boundary")
ciRemoveHierarchicalNotes
ciRemoveHierarchicalNotes(t_libName t_cellname t_viewname[g_hierarchical] ) =>t/nil
Description
Removes the existing notes from the templates and constraints for a single cellview or all along the hierarchy beginning from the given cellview.
See also ciAddHierarchicalNotes and ciUpdateHierarchicalNotes.
Arguments
Value Returned
Example
To remove notes from the entire hierarchy starting from the specified cellview:
ciRemoveHierarchicalNotes("myLib" "myCellName" "myView" t)
ciRemoveLeadingSlash
ciRemoveLeadingSlash(t_name) =>t_name
Description
Removes the leading forward slash from a string if it has one.
Arguments
|
The name from which the leading forward slash needs to be removed. |
Value Returned
Example
ciRemoveLeadingSlash("/NM1")
=> "NM1"
ciRemoveLeadingSlash("I1/NM1")
=> "I1/NM1"
ciRemoveProcessRules
ciRemoveProcessRules(d_Id) =>t/nil
Description
Removes all process rules associated with the given object.
Arguments
Value Returned
|
The process rules for the given route or net have been successfully removed. |
|
Example
ciRemoveProcessRules(netId)
ciRemoveTrailingSlash
ciRemoveTrailingSlash(t_name) =>t_name
Description
Removes the leading forward slash from a string if it has one.
Arguments
|
The name from which the trailing forward slash needs to be removed. |
Value Returned
Example
ciRemoveTrailingSlash("/NM1/")
=> "/NM1"
ciRemoveTrailingSlash("I1/NM1")
=> "I1/NM1"
ciReopenCellView
ciReopenCellView(u_cache t_mode) =>u_cache/ nil
Description
Reopens the constraint view in read or edit mode. Note: This function does not apply to layout constraint caches.
Arguments
|
The mode in which the constraint view needs to be opened, that is, read ( |
Value Returned
|
The constraint cache could not be reopened in the requested mode. |
Example
-
Reopen current constraint cache in edit mode.
cache = ciGetCellView()
when( null(ciCacheIsWritable(cache))
cache = ciReopenCellView(cache "a")
)
-
Reopen current constraint cache in read mode.
cache = ciGetCellView()
when( ciCacheIsWritable(cache)
cache = ciReopenCellView(cache "r")
)
ciReorderAssistants
ciReorderAssistants(l_newOrder) =>t/nil
Description
Reorders the listing of Circuit Prospector assistants (categories). The new ordering should be a list of the existing category names in the order that you wish them to appear in the Circuit Prospector category drop-down list.
nil category name is interpreted as a separator in the Circuit Prospector category drop down list.Arguments
|
The new ordering of the Circuit Prospector assistants (categories) |
Value Returned
Example
ciReorderAssistants(list("Nets" "Pins" "Inst Terms" nil "Devices" "Structures" nil "Properties" nil "Electrical Constraints" "Placement Constraints" "Routing Constraints" nil "Clusters" "Matched Parameters" "Modgens" "Orientations" "Symmetries"))
This results in the Circuit Prospector Category drop-down list looking like:
Nets
Pins
Inst Terms
-----------------
Devices
Structures
-----------------
Properties
-----------------
Electrical Constraints
Placement Constraints
Routing Constraints
------------------
Clusters
Matched Parameters
Modgens
Orientations
Symmetries
ciResistorArrayUpdateRowColVal
ciResistorArrayUpdateRowColVal(
g_direction
)
=> t
Description
Increases or decreases the row and column values of the series or parallel resistor array template that contains the currently selected modgen. If the selected topology orders the resistor devices by Row, the value displayed in the Col field is updated using this function. Conversely, if the selected topology orders the resistor devices by Col, the value displayed in the Row field is updated.
Arguments
|
The value of row or column is increased when set to |
Value Returned
Example
hiSetBindKeys("VLS-GXL" list(list("<Btn4Down>" "ciResistorArrayUpdateRowColVal(t)")))
hiSetBindKeys("VLS-GXL" list(list("<Btn5Down>" "ciResistorArrayUpdateRowColVal(nil)")))
Btn4Down is scroll wheel up and Btn5Down is scroll wheel down. Using these bindkeys, you can increase and decrease the row or column value by scrolling mouse wheel up and down, respectively when the figGroup (modgen) is selected in the navigator.
ciResolveBulkNet
ciResolveBulkNet(t_device l_hierContext[?viewNameListg_viewNameList] [?stopViewListg_stopViewList] ) =>list/nil
Description
This function is used with Circuit Prospector finder expressions to retrieve the bulk net on a device and resolves the net to the highest level in the design.
If the device does not have a bulk net it will look to see whether or not the device has a property, which matches any of the bulk net property names registered with ciMapParam("bulkParamName"). For example, "bulkp" or "bulkn".
If a bulk property does exist, and is a net name, then the net will be resolved to the highest level in the design.
If the property is a net expression then this will be evaluated in the context of the current window's viewNameList/stopViewList or within the context of the passed viewNameList/stopViewList. Where the device symbol does not have an explicit bulk terminal, the spectre view typically has the default bulk terminal and therefore, the viewNameList should include spectre. For example, “schematic spectre symbol”.
Arguments
Value Returned
|
A disembodied property list |
|
Example
ciResolveBulkNet(
dev hierContext
?viewNameList "schematic spectre symbol"
?stopViewList "symbol"
)
ciRunMatchingConstraintsGenerator
ciRunMatchingConstraintsGenerator(t_strength d_insts u_cache) =>t/nil
Description
This SKILL function is run by the Matching(Strength) constraint generator expression and used to create matching template constraints.
Arguments
Value Returned
Example
ciRunMatchingConstraintsGenerator(list(nil ‘strength "low") list(’("MN0" inst) ’("MN1" inst)) cache)
whereMN0andMN1are the two instances on which the matching constraint has been created.
ciSelectedConstraints
ciSelectedConstraints(g_cache[ ?types_type] ) =>l_selectedConstraints
Description
Returns a list of selected constraint IDs that are contained in the passed constraints cache.
Arguments
|
The constraint type. When specified, only returns the selected constraints of that type. |
Value Returned
Example
con1=ciConCreate(cache 'alignment ?members '(("NM0" inst)("NM1" inst)))
con2=ciConCreate(cache 'distance ?members '(("NM2" inst)("NM3" inst)))
hsmSelect(?type 'constraint ?name list(con1 con2))
ciSelectedConstraints(cache)~>type
(alignment distance)
ciSelectedConstraints(cache ?type 'alignment)~>type
(alignment)
ciSelectedTemplates
ciSelectedTemplates(g_cache[ ?types_type] ) =>l_selectedTemplates
Description
Returns a list of selected template IDs that are contained in the passed constraints cache.
Arguments
|
The constraint type. When specified, only returns the selected templates of that type. |
Value Returned
Example
temp1=ciTemplateCreate(cache "myTemplate1" ?members '(("NM0" inst)("NM1" inst)))
temp2=ciTemplateCreate(cache "myTemplate2" ?members '(("NM2" inst)("NM3" inst)))
hsmSelect(?type 'template ?name list(temp1 temp2))
ciSelectedTemplates(cache)~>type
("myTemplate1" "myTemplate2")
ciSelectedTemplates(cache ?type "myTemplate2")~>type
("myTemplate2")
ciSetHaloOptions
ciSetHaloOptions( ) =>t/nil
Description
Invokes a user interface that allows you to set the various constraint visualization options.
Arguments
Value Returned
Example
ciSetHaloOptions()
ciSetHaloPolicy
ciSetHaloPolicy(t_haloPolicy) =>t/nil
Description
Sets the policy for object haloing and grouping.
Arguments
|
|
|
Unlike |
Value Returned
Example
ciSetHaloPolicy(“noGrouping”)
ciSetMaxHaloGroupSize
ciSetMaxHaloGroupSize(x_maxHaloGroupSize) =>t/nil
Description
Allows the setting of a limit on the number of database objects to be haloed and grouped together when a constraint is selected in the Constraint Manager. The setting of a group size limit is only possible when minDisplay has been set as the halo policy using ciSetHaloPolicy.
Arguments
|
Specify the number of database objects to be haloed and grouped. |
Value Returned
Example
ciSetMaxHaloGroupSize(5000) => t
ciSetModgenTopology
ciSetModgenTopology(g_modgen l_newTopology) =>t/nil
Description
Sets the database topology on the modgen and deletes any pre-existing database topologies.
Topology objects can be created with the following functions: dbCreateTopology, dbCreateTrunk, dbCreateTwig, and dbCreateStrap. Constraints, such as minWidth and validLayers, can be applied to the topology objects using the cstCreateConstraint function. For further information on topology creation, refer to Virtuoso Design Environment SKILL Reference.
See also ciDeleteModgenTopologies.
Arguments
Value Returned
Example
topology1 = dbCreateTopology(strcat("topo_" netId1->name) netId1)
trunk1 = dbCreateTrunk("trunk1" topology1 "horizontal")
dbSetTrunkAnchor(trunk1 devId1)
dbSetTrunkSide(trunk1 "top")
dbSetTrunkOrthoOffset(trunk1 0.08)
cg = cstCreateConstraintGroupOn(trunk1 "default")
cstCreateConstraint(cg "validLayers" nil list("Metal1"))
cstCreateConstraint(cg "minWidth" list("Metal1") 0.09)
twigCnt = 0
foreach(instTerm netId1~>instTerms
twig = dbCreateTwig(sprintf(nil "twig%d" ++twigCnt) trunk1)
dbSetTwigObject(twig instTerm)
)
topologies = list(topology1)
ciSetModgenTopology(modgen topologies)
ciSetSymmetricAxes
ciSetSymmetricAxes(g_cache) =>t
Description
Where symmetry constraints exist with multiple axes, forces a single axis of symmetry to be the most commonly used axis.
Arguments
Value Returned
Example
ciCacheListCon(cache)~>axis
("vertical5" "vertical1" "vertical2" "vertical3" "vertical5" "vertical5"
)
ciSetSymmetricAxes(cache)
ciCacheListCon(cache)~>axis("vertical5" "vertical5" "vertical5" "vertical5" "vertical5" "vertical5"
)
ciSigTypeMatchesNetType
ciSigTypeMatchesNetType(d_net t_netType) =>t/nil
Description
This function creates a net predicate that checks whether or not the sigType attribute of a net matches a given net type.
sigType used by the database SKILL function. Circuit Prospector uses the name supply as a super-type containing power and ground nets. The ciSigTypeMatchesNetType function takes care of this discrepancy.
For more information, see ciRegisterNetPredicate.
Arguments
Value Returned
|
Indicates that the new net predicate has been created successfully. |
|
Example
;; Set some sigType attributes on nets
cv = geGetEditCellView()
pwr = dbFindNetByName(cv "pwr")
gnd = dbFindNetByName(cv "gnd")
clk = dbFindNetByName(cv "clk")
pwr->sigType = "supply" ; See NOTE above.
gnd->sigType = "ground"
clk->sigType = "clock"
;; Check if sigType matches Circuit Prospector net type.
ciSigTypeMatchesNetType(pwr "power") ; t
ciSigTypeMatchesNetType(gnd "ground") ; t
ciSigTypeMatchesNetType(clk "clock") ; t
ciSimpleName
ciSimpleName(name_t type_p) =>t_str
Description
Expands the passed name and simplifies it (removes duplicates). If the resulting name is a single string then this is returned otherwise the original name string is returned.
Arguments
|
The type of object the name belongs to, such as |
Value Returned
|
Returns a string, which is either the simplified version of the name if the name can be simplified to a single string or the original name if it cannot be simplified |
Example
ciSimpleName("<*3>VDD" 'net)
=> "VDD"
ciSimpleName("<*2>(<*3>a,b),b,c<0:3>" 'net)
=> "<*2>(<*3>a,b),b,c<0:3>"
ciSortedOpenCellViews
ciSortedOpenCellViews( [?includeLayoutg_includeLayout] ) =>l_cacheIds
Description
Returns a list of open constraint caches from ciGetOpenCellViews sorted using ciConstraintViewLessp.
Arguments
|
Specifies whether the layout constraint caches are included. The default is |
|
Value Returned
Example
Sorted list of open constraint caches, including layout:
ciSortedOpenCellViews(?includeLayout t)
Report the sorted list of constraint storage library, cell, and view names:
mapcar('ciConstraintLCV ciSortedOpenCellViews(?includeLayout t))
("overview" "block1" "constraint")
("overview" "block1" "constrBlock")
("overview" "block1" "layout")
("overview" "block2" "constraint")
("overview" "middle" "constraint")
("overview" "penthouse" "constraint")
("overview" "penthouse" "layout")
("overview" "upper" "constraint")
ciTemplateAddCons
ciTemplateAddCons(u_templateId l_listOfConstraints) =>t/nil
Description
Adds one or more ci constraints to a ci constraint template.
ciTemplateCreate.
For more information, see ciTemplateDeleteCons.
Arguments
|
Identifies the template object to which the specified |
|
|
Specifies a list of constraint identifiers whose constraint should be added to the specified template. |
Value Returned
|
Indicates that the constraints have been successfully added to the template. |
|
|
Indicates that the operation failed because either the template or one of the constraints was not valid or found. |
Example
cache = ciGetCellView()
myTemplate = ciCreateTemplate(cache "myTemplateDefinition" "TemplateName" list(constraint1 constraint2))
myTemplate~>constraints~>name
("constraint1" "constraint2")
extraConstraint1 = ciConCreate(cache "symmetry" list(member1 member2))
extraConstraint2 = ciConCreate(cache "shielding" list(member1 member2))
listOfExtraConstraints = list(extraConstraint1 extraConstraint2)
ciTemplateAddCons(myTemplate listOfExtraConstraints) ;; adding extraConstraint1 and extraConstraint2 to myTemplate
myTemplate~>constraints~>name ;; we should see extraConstraint1 and extraConstraint2 names in the list below, this confirms that they have well been added.
("constraint1" "constraint2” "extraConstraint1" "extraConstraint2")
ciTemplateCreate
ciTemplateCreate(u_cache t_templateDefinitionName[?namet_name] [?membersl_members] [?paramsl_params] [?userParamst_userParams] ) =>templateId/nil
Description
The ciTemplateCreate command passes the designObjectList and userParams to the createSymbolName callback defined using . The return value of the checkSymbolName call must be a list of . This list of constraints is used internally to define a ciTemplate and manage the constraints together. Any edits of the member constraints will trigger a call to checkSymbolName with the list of constraints to manage the template content.
Arguments
|
See |
|
|
The template definition name. For example, “ |
|
|
Used in the same manner as constraint_member. No parameters are accepted. |
|
|
List of template parameters. See |
|
|
Any SKILL object or list that the user defined callback understands. |
Value Returned
Example
ciTemplateCreate cache 'mypair ?members (list (list "l1" 'inst) (list "l2" 'inst))
ciTemplateCreate cache "commonCentroid" ?members '( '("A" 'inst) '("B" 'inst) '("C" 'inst) '("D" 'inst))
ciTemplateCreateDefinition
ciTemplateCreateDefinition(t_typeName s_checkSymbolName s_createSymbolName[?paramsl_params] [?acceptsUserParamss_acceptsUserParams] [?transferSymbolNames_transferSymbolName] [?preDestroySymbolNames_preDestroySymbolName] ) =>t/nil
Description
Creates a template definition.
A template is a managed collection of constraints that are created and grouped together and maintained as a collection in the Constraint infrastructure, in Virtuoso Schematic XL and Virtuoso Layout XL.
A template definition is characterized by:
- A template definition name
- Two SKILL callback (function) symbols that are called automatically:
-
Four optional arguments:
-
?acceptsUserParams: If set tot, it configures the template definition to accept user parameters. If set tonil, it will not allow them. -
?params: Defines an optional list of template parameters. Template parameters are similar to constraint parameters and can also be accessed and manipulated by the templatecreateandmodifycallback functions. For more information, refer to the Virtuoso Unified Custom Constraints User Guide. -
?transferSymbolName: A SKILL callback symbol that is called automatically when a template is transferred to layout or to the schematic. -
?preDestroySymbolName: A SKILL callback symbol that is called automatically when a template is about to be deleted.
-
See also, ciTemplateCreate, ciTemplateAddCons, and ciTemplateDeleteCons.
Arguments
Value Returned
The SKILL create and modify callbacks play an important role in the template creation and update processes:
Create Callback
Purpose
Returns a list of constraints to be placed inside the new template instance.
The create callback is called when a template is instantiate from ciTemplateCreate. It is passed the list of design objects the template constraint will be created on and optionally can be passed a list of user parameters and template parameter values.
In the case of a template definition in which a list of parameter definition is specified, the create callback will typically be passed a list of template parameter values that will be fetched as default values for the relevant parameters, into the created template.
Format
(defun createSymbolName (g_cachel_design_objects@key (l_paramsnil) (l_userParamsnil))
;; any required user parameters will be passed through the
;; ciTemplateCreateDefinition into the callback
(let (constraints)
;; the list of constraints to be managed by the template must be created here
constraints
)
) ;; the list of constraints must be returned
Arguments
|
List containing the design objects used for the template creation. These are used to create the the template constraints on. Each design object in the list should be in the following format: list(<
where designObjectType is either |
|
|
Optional argument. Contains a list of template parameters that will pre-configure all or part of the template parameters on the created template. Each parameter in the list should be of following format: list(< Template parameters are stored on the template and can be modified by the user after the template has been created. Template parameter modifications will trigger the template check callback and this allows the template constraints to be dynamically updated in response to the parameter changes.
This argument can only be used when at least one template parameter is defined while calling ciTemplateCreateDefinition.
|
|
|
Optional argument. Contains a list of parameters usable for any purpose. These are usually used to pass extra data to the create callback and allow more flexibility for the callback to create the template instance. Each parameter in the list should be of the following format: list(< These parameters are not stored on the template and are used for the purpose of template creation only. |
Value Returned
|
The list of constraints that the template will contain. If |
Modify Callback
Purpose
Checks the correctness of the template instance.
The modify callback is called whenever a template is updated by a parameter update or a constraint update, addition or deletion. It will capture the updated parameters or constraints and allow their assessment, examination, and manipulation to prevent or allow the template modification. The callback can take further actions upon the template modification on any other object in the available execution context.
Format
(defun checkSymbolName (u_template@key (l_oldTemplateParamsnil) (l_constraintsnil) (s_modTypenil) (l_userParamsnil) )
;; any required user parameters will be passed through the
;; ciTemplateCreateDefinition into the callback
(let (new_constraint_list)
;; the list of constraints to be managed by the template must be modified here
new_constraint_list
)
) ;; the list of constraints must be returned
Arguments
Value Returned
Transfer Callback
Purpose
Called when a template is transferred to layout or to the schematic.
Format
(defun transferSymbolName (u_template)
(let ((ok t))
printf("Template %L has been transferred (isLayout: %L)\n"
template->name ciCacheIsLayout(template->cache))
ok
)
)
Arguments
|
Template object which has been transferred to the schematic or layout. |
Value Returned
|
The callback failed to run. This does not effect the transfer though. |
Pre-Destroy Callback
Purpose
Called when a template is about to be deleted.
Format
(defun preDestroySymbolName (u_template)
(let ((allowDestroy t))
;;;; Determine if the passed template is allowed to be destroyed or not
allowDestroy
)
)
Arguments
|
Template object which has been transferred to the schematic or layout. |
Value Returned
Example
The following two examples are covered below:
- A simple example with partial code that outlines the workflow from the creation of the template definition to the instantiation of a template.
-
A complete example with complete and more complex code that fully shows how to use template callbacks and template parameters and also registering a template generator for the created template definition.
Steps of the template creation process demonstrated:
Step 1: Declaring the arguments passed as parameters tociTemplateCreateDefinionandciTemplateCreate.
Step 2: CallingciTemplateCreateDefinitonin order to create a new template definition
Step 3: Once the new definition is available, callingciTemplateCreateto instanciate a new template (from SKILL) using the definition just created.
Step 4: (Optional) Registering a constraint generator for the template definition created, to make it usable from the constraint manager. (on top of theciTemplateCreatefunction)
Example 1
;; ***********************************************************
;; Step 1: Declaring template callbacks and template parameter definitions
;; ***********************************************************
;;IMPORTANT:
;; The template definition and its callbacks and other arguments are usually defined in .cadence/dfII/ci/generators.
;; This allows them to be loaded at the virtuoso startup
;; 1) Declaring Create Callback: 'ciMatchCreateNew
(defun ciMatchCreateNew (cache listOfDevices @key (params nil) (userParams nil))
;; do the necessary processing the function arguments here.
;; ... PROCESSING ...
listOfconstraints ;; Then return the list of constraint to be inserted inside the template.
)
;; 2) Declaring Modify (also called in some cases "check" ) callBack: 'ciMatchCheck
(defun ciMatchCheck (templates @key (oldTemplateParams nil) (constraints nil) (modType nil) (userParams nil) )
;; Perform any necessary processing based on the value of the function arguments, amongst which
;; oldTemplateParams and template~>parameters
;; For instance Retrieve the value of the strength parameter BEFORE update (old value)
paramList = exists(p oldTemplateParams car(p) == "strength")
;; …
;; … Do any further processing step (skipped for clarity) here
;; …
;; Retrieve the value of the strength parameter AFTER update (current value).
paramList = exists(p template~>parameters car(p) == "strength")
;; finally return nil to prevent change or t to allow them, here
t ;; in this case return t (but it could be nil, it is enterely up to the processing happening inside this callback)
)
;; 3) declaring a template parameter definition list
myParamsDefinitionList = list(list("strength" 'enum "low" list("low" "medium" "high"))
list("doubleNoDefault" 'float)
list("doubleWDefault" 'float 3.75 2.5)
list("doubleWDefault2" 'float 1.5 0.1 4.2)
list("intNoDefault" 'int)
list("intWDefault" 'int 5 1)
list("intWDefault2" 'int 5 1 6))
;; ***********************************************************
;; Step 2: Creation of a template definition:
;; ***********************************************************
myNewTemplateDefinition = ciTemplateCreateDefinition("matchTemplateWithParameters " ;; template name definition
'ciMatchCreateNew ;; modify callback function from the previous example
'ciMatchCheck ;; create callback function from the previous example
?params myParamsDefinitionList ;; optional list of template parameter definition
)
;; ***********************************************************
;; Step 3: Instanciation of a template that uses template parameters:
;; ***********************************************************
insts = '(("M1" inst) ("M2" inst)) ;; a simple list of instances
;; Pre-requisite: have a valid CI cache object at this point: i.e. cache = ciGetCellView()
;; Call to ciTemplateCreate()
myNewTemplate = ciTemplateCreate (
cache ;; Cache storage object
"matchTemplateWithParameters" ;; Template definition name
?members insts ;; instances the template will be created on
?params parameterInstances ;; list of parameter instances is passed here
)
;; skipping step 4 for Example 1, refer to example 2
Example 2
;; ***********************************************************
;; Step 1: Declaring template callbacks and template parameter definitions
;; ***********************************************************
;;IMPORTANT:
;; The template definition and its callbacks and other
;; arguments are usually defined in .cadence/dfII/ci/generators.
;; This allows them to be loaded at the virtuoso startup
;; 1) Declaring Create Callback: 'ciMatchCreateNew
(defun ciMatchCreateNew (cache listOfDevices @key (params nil) (userParams nil))
(let ((strength 1)
constraints newcon
;; modgen configuration
(mFactor 1) (byN 1)
(continue t)
strengthParam
)
(unless (cache && listOfDevices)
continue = nil
)
strengthParam = (cadar setof(x params (car x) == "strength"))
(cond
((strengthParam == "low") strength = 1)
((strengthParam == "medium") strength = 2)
((strengthParam == "high") strength = 3)
)
;; strength must be an integer fixp checks that for us.
(unless (fixp strength)
(warn "Matching template example: Strenght parameter expected to be integer, it is %L." strength)
continue = nil
)
;; matching template only works for 2 devices
(unless ((length listOfDevices) == 2)
(warn "Matching template example: extected a device pair (%L)" listOfDevices)
continue = nil
)
(when continue
;; everything is set
(warn "Matching template example: Creating Matching template with strength %d" strength)
(case strength
(1
;; matching parameters
newcon = (ciConCreate cache 'matchedParameters
?members listOfDevices
;;?params (list (list "matchSubset" (list "l" "w" "m")))
?verbose nil)
(if newcon
then constraints = (append1 constraints newcon)
else (warn "Matching template example: (strength 1) failed to create matching constraint."))
)
(2
;; matching parameters & orientation
newcon = (ciConCreate cache 'matchedParameters
?members listOfDevices
;;?params (list (list "matchSubset" (list "l" "w" "m")))
?verbose nil)
(if newcon
then constraints = (append1 constraints newcon)
else (warn "Matching template example: (strength 2) failed to create matching constraint"))
newcon = (ciConCreate cache 'relativeOrientation
?members listOfDevices ?verbose nil)
(if newcon
then constraints = (append1 constraints newcon)
else (warn "Matching template example: (strength 2) failed to create relative orientation constraint"))
)
(3
;; matching parameters & orientation & alignment
newcon = (ciConCreate cache 'matchedParameters
?members listOfDevices
;;?params (list (list "matchSubset" (list "l" "w" "m")))
?verbose nil)
(if newcon
then constraints = (append1 constraints newcon)
else (warn "Matching template example: (strength 3) failed to create matching constraint"))
newcon = (ciConCreate cache 'relativeOrientation
?members listOfDevices ?verbose nil)
(if newcon
then constraints = (append1 constraints newcon)
else (warn "Matching template example: (strength 3) failed to create relative orientation constraint"))
newcon = (ciConCreate cache 'alignment
?members listOfDevices ?verbose nil)
(if newcon
then constraints = (append1 constraints newcon)
else (warn "Matching template example: (strength 3) failed to create alignment constraint"))
)
(t ;; default case
(warn "Matching template example: Strength parameter value not recognized: %d. No Template created"
strength)
)
)
)
constraints ;; list of constraints to be contained in the template
)
)
;; 2) Declaring Modify (also called in some cases "check" ) callBack: 'ciMatchCheck
(defun ciMatchCheck (templates @key (oldTemplateParams nil) (constraints nil) (modType nil) (userParams nil) )
(info "************************************ \n")
(info "Executing ciMatchCheck NEW CALLBACK \n")
(info "************************************ \n")
(let (oldStrengthValue currentStrengthValue param currentConstraints members ch template
(continue t)
(ret nil)
)
;; We have only one template here. Therefore, let us call it a template instead.
template = templates
ch = template~>cache
(when (ch == nil)
(info "Error cache empty \n")
continue = nil
)
;; The values symbol modType can be
; 'unspecifiedChange,
; 'paramUpdate,
; 'constraintAdd,
; 'constraintDelete,
; 'constraintUpdate
;; It is important to check the change flag and take an appropriate action
;; depending on the type of change.
;; - 'constraintAdd, 'constraintDelete, 'constraintUpdate occur when one
;; or several constraints are updated or deleted or added.
;; - 'paramUpdate occurs when one or several template parameters
;; (as opposed to user parameters) are updated.
;; - 'unspecifiedChange occurs when a constraint parameters and constraints
;; have been modified at the same time. In this case, this is up to
;; this function to perform all of the required to take an appropriate action
;; if necessary.
(when continue
(case modType
('paramUpdate
(info "Info: paramUpdate case \n")
;; Comparing and printing the value of the parameters BEFORE and AFTER
;; the change that this function will (or NOT) validate.
;; The "oldTemplateParams" argument contains a list of the template
;; parameters' value BEFORE the change, that is before being edited.
;; This helps to 1) know which parameters are being edited
;; 2) compare each template parameter's old value (BEFORE changed)
;; to the new current one (AFTER change).
;; This is what we'll do here, printing the old and new current values
;; of these edited template parameters, so that we can see what
;; is the change about and then take action upon it.
;; Retrieve the value of the strength parameter BEFORE update (old value)
paramList = exists(p oldTemplateParams car(p) == "strength")
param = car(paramList)
oldStrengthValue = caddr(param)
;; Retrieve the value of the strength parameter AFTER update (current value).
paramList = exists(p template~>parameters car(p) == "strength")
param = car(paramList)
name = car(param)
currentStrengthValue = caddr(param)
(if (and oldStrengthValue != nil currentStrengthValue != nil)
(info "Old value of parameter %L BEFORE update was : %L \n current value after update is : %L \n" name oldStrengthValue currentStrengthValue)
)
;; Retrieve and print the value BEFORE update (old value) of all the parameters that have been changed.
(info "oldTemplateParams length %L contains: \n" length(oldTemplateParams))
foreach(x oldTemplateParams
(info "The old value of param %L was %L.\n" car(x) caddr(x))
)
;; Now we process the value of parameter "strength" and depending on its value "low" "medium" or "high",
;; We will regenerate the constraints of the template in different ways.
ret = t
(when ((setof x oldTemplateParams ((car x) == "strength")) != nil)
(info "Found that strength param has changed ! => processing its new Value \n")
ret = (processStrengthParameter ch template currentStrengthValue)
)
ret
)
('constraintAdd
;; In the same way, we can evaluate the constraints being added to the template
;; access them using the "constraints" argument, and take the appropriate action (reject of validate the change)
(info "Info: constraint Add case \n")
(info "ret before add constraint = %L \n" ret)
ret = (processAddedConstraints ch template constraints)
)
('constraintDelete
;; In the same way, we can evaluate the constraints being deleted to the template
;; access them using the "constraints" argument, and take the appropriate action (reject of validate the change)
(info "Info: constraint Delete case \n")
ret = (processDeletedConstraints ch template constraints)
)
('constraintUpdate
;; In the same way, we evaluate the constraints being updated in the template.
;; IMPORTANT: In the case of an constraint update, the constraints argument contains
;; a list of the old value (BEFORE change) of the constraints being updated.
(info "Info: constraint Update case \n")
ret = (processUpdatedConstraints ch template constraints)
)
(t ;; default case
(info "Warning: Unspecified change. \n")
;; TODO manual checks to determine what action is appropriate.
)
)
)
(info "Return value for ciMatchCheck = %L \n" ret)
ret
) ;; let
) ;; end of the callback
;; 3) Declaring the Helpers functions used in the check callback (these allow to simplify
;; the code even if these are not compulsory)
;; These Helpers evaluate and then take action upon updated, deleted or added
;; template constraints depending on the value of the strength parameter and
;; then allow the change or refuse it by returning t or nil.
(defun processStrengthParameter (cache template paramValue)
(let (newcon ret newcons currentConstraints)
;; 1) In the case of the Matching Strength Template, we need to retrieve the
;; current members of the constraints we are currently in the template (BEFORE
;; changes) and then use them as the new
;; members of the constraints that we will create and then add to the template.
currentConstraints = car(template~>constraints)
listOfDevices = currentConstraints~>members
listOfDevices = (mapcar 'lambda( (x) list(car(x) cadr(x))) listOfDevices)
(info "Members ok \n Members list size: %L \n" length(listOfDevices))
foreach( mapcar x listOfDevices
(info "member name: %L type: %L \n" car(x) cadr(x))
(info " ")
)
;; 2) We delete all of the current constraints from the template (before
;; creating and adding some new ones)
currentConstraints = template~>constraints
;; Allows deleting a constraint from a template.
;; In this case we remove from template "template" the constraints contained
;;in list "currentConstraints"
;; also the t flag is optional but specifies that the constraint is not only
;; deleted from the template but will also
;; be removed from the cellview. If the flag is nil then the constraint is only
;; deleted from the template and remains separately in the cellview.
(ciTemplateDeleteCons template currentConstraints t)
(case paramValue
("low"
(info "case strength = low \n")
;; 3) creating + adding a new constraint to the template
newcon = (ciConCreate cache 'matchedParameters
?members listOfDevices
?verbose nil
)
newcons = list(newcon)
)
("medium"
(info "case strength = medium \n")
;; 3) creating + attaching new constraint to be added
newcon = (ciConCreate cache 'matchedParameters
?members listOfDevices
?verbose nil
)
(if newcon
then newcons = (append1 newcons newcon)
else (warn "Matching Strength template: (strength medium) failed to create matching constraint"))
newcon = (ciConCreate cache 'relativeOrientation
?members listOfDevices ?verbose nil)
(if newcon
then newcons = (append1 newcons newcon)
else (warn "Matching Strength template: (strength medium) failed to create relative"))
ret = t
)
("high"
(info "case strength = high \n")
;; 3) creating + attaching new constraint to be added
newcon = (ciConCreate cache 'matchedParameters
?members listOfDevices
?verbose nil
)
(if newcon
then newcons = (append1 newcons newcon)
else (warn "Matching Strength template: (strength high) failed to create matching constraint"))
newcon = (ciConCreate cache 'relativeOrientation
?members listOfDevices ?verbose nil)
(if newcon
then newcons = (append1 newcons newcon)
else (warn "Matching Strength template: (strength high) failed to create relative"))
newcon = (ciConCreate cache 'alignment
?members listOfDevices ?verbose nil)
(if newcon
then newcons = (append1 newcons newcon)
else (warn "Matching Strength template: (strength high) failed to create alignment constraint"))
ret = t
)
(t
(warn "Strength parameter value not recognized: %d. \n"
value)
ret = nil ;; will prevent the current change to happen.
)
) ; case
(if (length newcons) > 0
;; Allows adding a new constraints to a template.
(ciTemplateAddCons template newcons)
)
(info "successfully added new con \n")
ret
);let
)
(defun processAddedConstraints (cache template constraints)
(let ((re t))
(info "This is the list of constraints to be ADDED: \n")
dumpConstraints(constraints)
;; TODO here : check the value of the constraints to be added
;; i.e return nil to prevent the change to happen otherwise return t.
;; example: preventing constraints of type alignment to be added.
(foreach con constraints
(if (eq con~>type 'alignment) then
re = nil ;; this is going to prevent the current change (add constraints to the template to happen)
)
)
;;return value
(info "Return value for adding constraints = %L \n" re)
re
)
)
(defun processDeletedConstraints (cache template constraints)
(info "This is the list of constraints to be DELETED from the template: \n")
dumpConstraints(constraints)
;; TODO likewise as per processAddedConstraints() function, take action using the "constraints" parameter list
t
)
(defun processUpdatedConstraints (cache template constraints)
(info "This is the list of constraints to be UPDATED from the template: \n")
dumpConstraints(constraints)
;; TODO likewise as per processAddedConstraints() function, take action using the "constraints" parameter list
t
)
;; Dump function to make obvious what constraints are updated, delete or added by the modify callback
;; Note: in a real world scenario this kind of function is not compulsory but can
;; help debugging and understanding the callback actions.
;; It is advisable to be generous on debug statements and dumping functionalities in order
;; to ease the adoption of new virtuoso functions or
;; features like the template parameters within the context of template callbacks.
(defun dumpConstraints (constraints)
(foreach mapcar con constraints
(info "*******************************************************\n")
(info "Constraint Name: %L type: %L \n" con~>name con~>type)
listOfDevices = (mapcar 'lambda( (x) list(car(x) cadr(x))) con~>members)
(info "%L Members found: \n" length(con~>members))
(foreach mapcar x listOfDevices
(info " - name: %L type: %L \n" car(x) cadr(x))
)
(info "*******************************************************\n")
)
)
;; 4) Declaring the parameter definitions collection:
;;strength: enumeration parameter can take values "low" "medium" "high" and its default is "low"
myParamDefinitionList = list(list("strength" 'enum "low" list("low" "medium" "high"))
list("doubleNoDefault" 'float) ;; Float parameter with no default or range
list("doubleWDefault" 'float 3.75 2.5) ;; Float parameter with default value 3.75 and minimum value range of 2.5
;; Float parameter with default value 3.75 and minimum value range of 0.1 and maximum 4.2
list("doubleWDefault2" 'float 1.5 0.1 4.2)
list("intNoDefault" 'int) ;; Float parameter with no default or range
list("intWDefault" 'int 5 1) ;; Float parameter with default value 5 and minimum value range of 1
;; Float parameter with default value 5 and minimum value range of 1 and maximum 6
list("intWDefault2" 'int 5 1 6))
;; Note: For more details on template parameters see the constraint customisation guide.
;; ***********************************************************
;; Step 2: Creation of a template definition:
;; ***********************************************************
myNewDefinition = ciTemplateCreateDefinition("matchNewCreateCB" ;; template name definition
'ciMatchCheck ;; modify callback
'ciMatchCreateNew ;; create callback
?params myParamDefinitionList ;; optional list of template parameter definitions
?acceptsUserParams t) ;; optional flag that specifies if user parameter are allowed
;; Note: even though the names are close template parameters and user parameters are different.
;; Template parameter like constraint parameter are displayed and can be modified from the constraint manager
;; User parameters are only used to extend the definition of a parameter for specific purpose independently from the ;; Constraint Manager.
;; ***********************************************************
;; Step 3: Instanciation of a template that uses template parameters:
;; ***********************************************************
;; The arguments for ciTemplateCreate are:
;; The list of paremeter does not include all of the parameters in the
;; paremeter definition used in ciTemplateCreateDefinition() because this SKILL
;; function overrides the default values defined by parameter definitions for each
;; parameter of the template. Therefore, the list does not necessarily have to
;; provide a parameter value for each parameter definition. It is a simple list of
;; parameter values:
params = list(
list("strength" "medium")
list("doubleNoDefault" 5.6)
list("doubleWDefault" 2.4)
list("intWDefault" 2)
list("intWDefault2" 3))
)
insts = '(("M1" inst) ("M2" inst)) ;; a simple list of instances
;; Pre-requisite: have a valid CI cache object at this point,
;; that is, cache = ciGetCellView()
myNewTemplate = (ciTemplateCreate cache "matchNewCreateCB" ?name "myNewTemplateName"
?members insts
?params params ;; params
)
;; ***********************************************************
;; Step 4: (optional) Registering a template generator for the template definition
;; just created.
;; ***********************************************************
;; add the constraint generator in the browser make sure you have an
;; icon that exists; this example uses the "add" icon; put your icon
;; in .cadence/dfII/icons
ciRegisterConstraintGenerator(
list(nil
'name "My Demo generator"
'description "Generate Various Levels of Constraints for a pair"
'expression "(demoNewPair args insts cache)"
'addToToolbar t
'iconName "add"
'args list(
list( "strength" `enum "low" "medium" "high")
)
)
)
ciRegisterConstraintGenerator(
list(nil
'name "newMatchTplCreateCB"
'description "Creates a Match Strength Template with template parameters"
'expression "ciRunMatchingConstraintsGeneratorNewCreateCB(args insts cache)"
'addToToolbar t
'iconName "templateMatched"
'args list(
list( "strength" `enum "low" "medium" "high")
)
)
)
;; Function that gets call by the constraint generator when the UI button gets pressed to generate a template
(defun ciRunMatchingConstraintsGeneratorNewCreateCB (args insts cache)
let( (ret strength)
if( length(insts) != 2 then
;; The number of instances has to be 2 in the case of this template.
(info "Select 2 instances to create a template")
else
;; putting together a strength parameter value depending on the value of the strength argument
;; of the constraint generator.
;; This is the typical way a constraint generator argument often interacts with
;; template parameters.
(case args->strength
("low"
params = (list (list "strength" "low"))
)
("medium"
params = (list (list "strength" "medium"))
)
("high"
params = (list (list "strength" "high"))
)
(t
params = (list (list "strength" "low"))
)
)
ret = (ciTemplateCreate cache ;; the cache storage i.e can retrieve for the current cellview using ciGetCellView()
"matchNewCreateCB" ;; template definition name (the one created in this example)
?name "myMatchTemplateWithTemplateParameters" ;; optional: name of the template, automatically generated
otherwise
?members insts ;; instances on which the template is created
?params params) ;; template parameter values passed, in this case only strength
)
ret
)
)
ciTemplateCreateExpanded
ciTemplateCreateExpanded(u_cache t_templateDefinitionName[?namet_name] [?membersl_members] [?paramsg_params] [?userParamsg_userParams] [?compressg_compress] ) => templateId /nil
Description
The same functionality as ciTemplateCreate, but first expands any iterated or repeated members. For example, MN1<0:2> gets expanded to MN1<0>, MN1<1>, and MN1<2>.
In the case of net repetitions, such as <*3>inp, by default these get expanded N times as inp, inp, inp. However, if the optional compress argument is set to t, then <*3>inp will be expanded to just inp. The same applies to net bundles that contain repetitions. For example <*3>inp,a,b,c,inp,inp will by default be expanded to inp,inp,inp,a,b,c,inp,inp but with compress set to t will be expanded to inp,a,b,c.
Arguments
|
The constraint cache. See |
|
|
List of template parameters. See |
|
|
Any SKILL object or list that the user defined callback understands. |
|
|
When set to |
Value Returned
Example
instsNetsPins = list( list("MN1<4:0>" 'inst) list("MN0" 'inst) list("<*3>inp" 'net) )
temp1 = ciTemplateCreateExpanded(cache "MyTemplate" ?name "temp1" ?members instsNetsPins ?compress t)
mapcar( lambda( (mem) car(mem) ) temp1~>members)
("MN1<4>" "MN1<3>" "MN1<2>" "MN1<1>" "MN1<0>" "MN0" "inp")
ciTemplateDefinitionExists
ciTemplateDefinitionExists(t_templateDefinitionName) =>templateId/nil
Description
Verifies whether a template definition with a given name exists.
Arguments
Value Returned
Example
cache = ciCacheGet("amsPLL" "vco" "schematic")cache->templates
(ci:0x181c81f8 ci:0x1842a2a8)
cache->templates~>name
("MatchTemplate0" "MatchTemplate1")
ciTemplateFind(cache "MatchTemplate0")
ci:0x181c81f8
cache->templates~>??
(((cache ci:0x18144680)
type("CurrentMirror")
(name "MatchTemplate0")
(constraints
(ci:0x17597978 ci:0x1776dee8)
)
)
((cache ci:0x18144680)
type("match")
(name "MatchTemplate1")
(constraints
(ci:0x15a17070)
)
)
)
ciTemplateDefinitionExists("match")
t
ciTemplateDelete
ciTemplateDelete(d_templateId) =>t/nil
Description
Arguments
Value Returned
ciTemplateDeleteCons
ciTemplateDeleteCons(u_templateId l_listOfConstraints[s_doDeletet|nil] ) =>t/nil
Description
This function deletes or removes one or more CI constraints from a CI constraint template.
By default, the s_doDelete optional argument is set to t. Setting s_doDelete to t detaches the constraint specified by l_listOfConstraints from the template object specified by u_templateId, and then deletes it.
On the contrary, if s_doDelete is set to nil, the specified constraint will only be detached from the template without being deleted from the cellview it belongs to. It will no longer be a part of the template, but will continue to be visible in the cellview.
ciTemplateCreate.
For more information, see ciTemplateAddCons.
Arguments
Value Returned
Example
The following example illustrates a situation when s_doDelete is set to t:
cache = ciGetCellView() ;; get the current constraint cellview, which contains all the template and constraints for the current design.
myTemplate = ciCreateTemplate(cache "myTemplateDefinition" "TemplateName"list(constraint1 constraint2 constraint3))
myTemplate~>constraints~>name
("constraint1" "constraint2")
listOfConstraintsToDelete = list(constraint1 constraint2)
ciTemplateDeleteCons(myTemplate listOfConstraintsToDelete) ;; doDelete defaulted to t, this will cause the constraint to be deleted from its design.
myTemplate~>constraints~>name
("constraint3")
The following example illustrates a situation when s_doDelete is set to nil:
cache~>constraints~>name
("constraint1" "constraint2" "constraint3" "constraint4")
myTemplate = ciCreateTemplate(cache "myTemplateDefinition" "TemplateName"list(constraint1 constraint2 constraint3 constraint4))
myTemplate~>constraints~>name
("constraint1" "constraint2" "constraint3" "constraint4")
listOfConstraintsToDelete = list(constraint1 constraint2)
ciTemplateDeleteCons(myTemplate listOfConstraintsToDelete) ;; doDelete defaulted to t will cause the constraint deletion from cache (not only detach it from myTemplate)
myTemplate~>constraints~>name
("constraint3" "constraint4")
cache~>constraints~>name
"constraint3" "constraint4")
;; Now, set doDelete to nil so that it only detaches the constraints without deleting them
listOfConstraintsToDetach = list(constraint3)
ciTemplateDeleteCons(myTemplate listOfConstraintsToDetach ?doDelete nil) ;; doDelete set to nil will only detach the selected constraints from the template only (does not delete the constraint from cache)
myTemplate~>constraints~>name ;; we can see that only constraint4 remains in the template("constraint4")
cache~>constraints~>name
"constraint3" "constraint4") ;; and also constraint3 has not been deleted from the design, only detached from its template.
ciTemplateFind
ciTemplateFind(u_cache t_templateName) =>t/nil
Description
Finds template in cache.
Arguments
|
The constraint cache. See |
|
Value Returned
Example
cache = ciCacheGet("amsPLL" "vco" "schematic")
cache->templates
(ci:0x181c81f8 ci:0x1842a2a8)
cache->templates~>name
("MatchTemplate0" "MatchTemplate1")
ciTemplateFind(cache "MatchTemplate0")
ci:0x181c81f8
In this example, the corresponding template ID is found based on the specified template name.
ciTemplateGetCache
ciTemplateGetCache(u_templateId) =>cache_ID
Description
Returns the constraint cache that contains the template.
Arguments
|
Specifies the ID of the template whose constraint cache you want to return. |
Value Returned
Example
ciTemplateGetCache(templateId) => cacheId
ciTemplateGetComment
ciTemplateGetComment(u_templateId) =>t_templateCommentStatus/ nil
Description
Returns the comment that shows the template status.
Arguments
|
Specifies the ID of the template for which you want to return the status comment. |
Value Returned
|
Invalid template ID; therefore, template status comment could not be returned. |
Example
cache = ciGetCellView()
tpl = car(cache~>templates)
comment = ciTemplateGetComment(tpl)
print("%s" comment)
Prints the template status comment for the given template ID.
ciTemplateGetCreatedTime
TemplateGetCreatedTime(u_templateId) =>x_template_created_time/nil
Description
This function returns the creation time of a template, which is the time and date close to a second when the template has been created.
Arguments
|
Specifies the ID of the template whose creation time you want to return. |
Value Returned
|
Returned if the specified template ID is valid. It is the time when the constraint was created, of type integer. |
|
Example
Pre-requisite: Create a template (see documentation for ).
cache = ciGetCellView()
cache~>templates~>name
("myTemplate")
tpl = car(cache~>templates)
tpl~>name
"myTemplate"
ciTemplateGetCreatedTime(tpl)
1344335532
ciTemplateGetDefName
ciTemplateGetDefName(d_templateId) =>templateDefinitionName/nil
Description
Gets the template definition name.
Arguments
Value Returned
ciTemplateGetName
ciTemplateGetName(d_templateId) =>templateName/nil
Description
Arguments
Value Returned
ciTemplateGetNote
ciTemplateGetNote(u_template_id) =>t_note/nil
Description
Returns the note parameter of a template.
For more information, see ciTemplateSetNote.
Arguments
Value Returned
|
Displays the details of the note if it exists for the given template. |
|
Example
Pre-requisite: Create a template (see documentation for ).
cache = ciGetCellView()
cache~>templates~>name
("myTemplate")
tpl = car(cache~>templates)
ciTemplateGetNote(tpl)
""
ciTemplateSetNote(tpl "testNote") ;; the note is currently empty "". So, assign a new value for the template note
ciTemplateGetNote(tpl)
"testNote"
ciTemplateGetStatus
ciTemplateGetStatus(u_templateId) =>t_templateStatus/ nil
Description
Arguments
|
Specifies the ID of the template for which you want to return the status. |
Value Returned
|
Invalid template ID; therefore, template status could not be returned. |
Example
cache = ciGetCellView()
tpl = car(cache~>templates)
ciTemplateGetStatus(tpl)
Prints the template status for the given template ID.
ciTemplateGetType
ciTemplateGetType(u_template_id) =>t_template_type_name/nil
Description
Returns the symbolic name of the given template type, such as commonCentroid.
For more information, see ciTemplateSetNote.
Arguments
|
Specifies the ID of the template whose symbolic name you want to return. |
Value Returned
|
Displays the symbolic name (textual value) of the template type. |
|
|
Returned if no symbolic name is found for the given template type. |
Example
Pre-requisite: Create a template (see documentation for ).
cache = ciGetCellView()
cache~>templates~>name
("myTemplate")
tpl = car(cache~>templates)
ciGetTemplateType(tpl) ;; get the name of the symbol defining the template type
"commonCentroid"
tpl~>type ;; you can equally get the type by using the ~> operator with the type property
"commonCentroid"
ciTemplateListCon
ciTemplateListCon(d_templateId) =>constraintIdList/ nil
Description
Gets the template constraint list.
Arguments
Value Returned
ciTemplateListParamNames
ciTemplateListParamNames(u_template_id) =>l_paramNames_list/nil
Description
Returns a list of template parameter names if the template has a list of parameters in its definition.
For more information, see ciTemplateListParams.
Arguments
|
Specifies the ID of the template whose parameter names you want to get. |
Value Returned
|
Displays a list of parameter names from the definition of the given template. |
|
|
Returned if no parameters are found in the definition of the given template. |
Example
Pre-requisite: Create a template (see documentation for ).
cache = ciGetCellView()
cache~>templates~>name
("myCurrentMirror")
tpl = car(cache~>templates)
tpl~>type
"CurrentMirror"
ciTemplateListParamNames(tpl) ("Style" "Add Dummies" "Abut All" "Add GuardRing" "Type" "Shape" "Net" "Spacing" "Left Spacing" "Right Spacing" "Top Spacing" "Bottom Spacing" "MPP" "Use Fluid" "Device" "Width" "Use Min DRC for Spacing"
)
ciTemplateListParams
ciTemplateListParams(u_template_id[s_includeDefaults_bool] ) =>l_paramNames_list/nil
Description
Returns a list of template parameter name, type, and value, provided the template has a list of parameters in its definition.
Arguments
Value Returned
Example
/*Pre-requisite for this function is to create a template (see documentation for ciTemplateCreate())*/
cache = ciGetCellView()
cache~>templates~>name
("myCurrentMirror")
tpl = car(cache~>templates)
tpl~>type
"CurrentMirror"
ciTemplateListParams(tpl)
(("Style" enum "SingleRow")
("Add Dummies" boolean t)
("Abut All" boolean t)
("Add GuardRing" boolean nil)
("Type" enum "ring")
("Shape" enum "rectangular")
("Net" enum "inp")
("Spacing" float 0.0)
("Left Spacing" float 0.0)
("Right Spacing" float 0.0)
("Top Spacing" float 0.0)
("Bottom Spacing" float 0.0)
("MPP" enum "N-Tap")
("Use Fluid" boolean nil)
("Device" enum "NM1")
("Width" float 0.0)
("Use Min DRC for Spacing" boolean nil)
)
ciTemplateListParams(tpl nil) ;; set the includeDefaults flag to nil to exclude all parameters with default values.
(("Style" enum "SingleRow")
("Add Dummies" boolean t)
)
Reference
ciTemplatep
ciTemplatep(g_value) =>t/nil
Description
Checks if an object is a valid constraint template ID.
Arguments
Values Returned
|
Returns |
Example
when( ciTemplatep(obj) info("Object is a valid constraint template %L\n" obj) )
ciTemplateResetAllParams
ciTemplateResetAllParams(u_template_id) =>t/nil
Description
Resets all template parameters to their default values.
Arguments
|
Specifies the object ID of the template whose parameters will be reset to their default value. |
Values Returned
|
All parameters are successfully reset to their default value. |
|
Example
Pre-requisite is to create a template, see documentation for ciTemplateCreate()
cache = ciGetCellView()
cache~>templates~>name
("myCurrentMirror")
tpl = car(cache~>templates)
tpl~>type
"CurrentMirror"
ciTemplateListParams(tpl) ;; list all parameters including default parameters
(("Style" enum "SingleRow")
("Add Dummies" boolean t)
("Abut All" boolean t)
("Add GuardRing" boolean nil)
("Type" enum "ring")
("Shape" enum "rectangular")
("Net" enum "inp")
("Spacing" float 0.0)
("Left Spacing" float 0.0)
("Right Spacing" float 0.0)
("Top Spacing" float 0.0)
("Bottom Spacing" float 0.0)
("MPP" enum "N-Tap")
("Use Fluid" boolean nil)
("Device" enum "NM1")
("Width" float 0.0)
("Use Min DRC for Spacing" boolean nil)
)
;; set the includeDefaults flag to nil to exclude all parameters with default values.
;; This show us the only parameters for which the value is not the default value.
ciTemplateListParams(tpl nil)
(("Style" enum "SingleRow") ;; default value is "Auto"
("Add Dummies" boolean t) ;; default value is nil
)
ciTemplateResetAllParams(tpl) ;; resets all of the parameters to their default value, in this case will reset "Style" and "Add Dummies" parameters.
t
ciTemplateListParams(tpl nil) ;; Now try listing non default value parameters ONLY.
nil ;; The result is nil since all parameters are now reset to their default value
ciTemplateListParams(tpl t) ;; list all parameters including default parameters
(("Style" enum "Auto") ;; We can now see "Auto" and "Add Dummies" back to their default value
("Add Dummies" boolean nil)
("Abut All" boolean t)
("Add GuardRing" boolean nil)
("Type" enum "ring")
("Shape" enum "rectangular")
("Net" enum "inp")
("Spacing" float 0.0)
("Left Spacing" float 0.0)
("Right Spacing" float 0.0)
("Top Spacing" float 0.0)
("Bottom Spacing" float 0.0)
("MPP" enum "N-Tap")
("Use Fluid" boolean nil)
("Device" enum "NM1")
("Width" float 0.0)
("Use Min DRC for Spacing" boolean nil)
)
Reference
ciTemplateResetParams
ciTemplateResetParams(u_template_id l_listOfParamNames) =>t/nil
Description
Resets one or more template parameters to their default value.
Arguments
|
Specifies the ID for the template whose parameters need to be reset to their default value. |
|
|
Specifies a list (string) containing the parameter names of the parameter to reset. |
Values Returned
|
All parameters are successfully reset to their default values. |
|
Example
;;Pre-requisite to create a template, see documentation for ciTemplateCreate()
cache = ciGetCellView()
cache~>templates~>name
("myCurrentMirror")
tpl = car(cache~>templates)
tpl~>type
"CurrentMirror"
ciTemplateListParams(tpl t) ;;listing all parameters including default values parameters
(("Style" enum "SingleRow")
("Add Dummies" boolean t)
("Abut All" boolean t)
("Add GuardRing" boolean nil)
("Type" enum "ring")
("Shape" enum "rectangular")
("Net" enum "3")
("Spacing" float 0.0)
("Left Spacing" float 0.0)
("Right Spacing" float 0.0)
("Top Spacing" float 0.0)
("Bottom Spacing" float 0.0)
("MPP" enum "N-Tap")
("Use Fluid" boolean nil)
("Device" enum "C0")
("Width" float 0.0)
("Use Min DRC for Spacing" boolean nil)
)
ciTemplateListParams(tpl t) ;; listing only non default valued parameters.
(("Style" enum "Auto")
("Add Dummies" boolean t)
)
ciTemplateResetParams(tpl list("Style")) ;; reseting the "Style" parameter
t
ciTemplateListParams(tpl t) ;; checking that the "Style" parameter has been reset and that only the "Add Dummies" parameter remains.
(
("Add Dummies" boolean t)
)
Reference
ciTemplateSetNote
ciTemplateSetNote(u_template_id t_note) =>t/nil
Description
Sets the note parameter of a template.
Arguments
|
Specifies the ID of the template for which you want to setup a new note value. |
|
|
Specifies the note value that will be affected to the selected template. |
Values Returned
|
No template note was found or the function encountered an error during execution. |
Example
;;Pre-requisite is to create a template, see documentation for ciTemplateCreate()
cache = ciGetCellView()
cache~>templates~>name
("myTemplate")
tpl = car(cache~>templates)
ciTemplateGetNote(tpl)
""
ciTemplateSetNote(tpl "testNote") ;; the note is currently empty "" so we assign a new value for the template note
ciTemplateGetNote(tpl)
"testNote"
Reference
ciTemplateSetStatus
ciTemplateSetStatus(
u_templateId
s_statusSymbol
t_statusComment
)
=> t / nil
Description
Arguments
|
Specifies the ID of the template whose status you want to set. |
|
Value Returned
Example
cache = ciGetCellView()
tpl = car(cache~>templates)
ciTemplateSetStatus(tpl 'enforced "Enforced")
Sets the template status and comment for the given template ID.
ciTemplateSortParamDefs
ciTemplateSortParamDefs(u_template_id) =>l_sortedParamDef/nil
Description
Sorts parameter definitions of a template type, by name and returns a list of parameter definitions sorted in alphabetical order.
Arguments
|
Specifies the template ID for which we want to sort the parameter definitions. |
Values Returned
Example
;;Pre-requisite: create a template (see documentation for ciTemplateCreate())
cache = ciGetCellView()
cache~>templates~>name
("myCurrentMirror")
tpl = car(cache~>templates)
tpl~>type
"CurrentMirror"
ciTemplateSortParamDefs("CurrentMirror")
(("Sorted Template definition: \n " "CurrentMirror"
(("Abut All" boolean 1 boolean "t")
("Add Dummies" boolean 0 boolean "nil")
("Add GuardRing" boolean 0 boolean "nil")
("Bottom Spacing" float 0.0 float "0.0")
("Bulk Layer" enum nil
("Metal1" "Metal2" "Metal3" "Metal4" "Metal5"
"Metal6" "Metal7" "Metal8" "Metal9" "Poly"
) enum
"ciCreateRoutingLayerEnumString(2)"
)
("Left Spacing" float 0.0 float "0.0")
("MPP" enum nil
("N-Tap" "P-Tap" "PO_M1" "M1_M2" "Metal1_8x_bus") enum
"strcat(buildString(techGetMPPTemplateNames(ciGetTechFile())))"
)
("Right Spacing" float 0.0 float "0.0")
("Shape" enum nil
("rectangular" "rectilinear") enum
"\"rectangular rectilinear\""
)
("Spacing" float 0.0 float "0.0")
("Style" enum nil
("Auto" "SingleRow" "DoubleRow") enum
"\"Auto SingleRow DoubleRow\""
)
("Top Spacing" float 0.0 float "0.0")
("Type" enum nil
("ring" "pane") enum
"\"ring pane\""
)
("Use Fluid" boolean 0 boolean "nil")
("Use Min DRC for Spacing" boolean 0 boolean "nil")
("Width" float 0.0 float "0.0")
)
)
)
Reference
ciTemplateListParams, ciTemplateListParamNames
ciTemplateUpdateParams
ciTemplateUpdateParams(u_template_id l_parameter_list=>t/nil
Description
This function updates the parameter values of the listed parameters for templates that have one or more parameter definitions.
Arguments
|
Specifies the template ID whose parameter values you want to update. |
|
Values Returned
Example
;;Pre-requisite: create a template, see documentation for ciTemplateCreate()
cache = ciGetCellView()
cache~>templates~>name
("myCurrentMirror")
tpl = car(cache~>templates)
tpl~>type
"CurrentMirror"
ciTemplateListParams(tpl t) ;; listing non default valued parameters, should list nothing since all have the default values at this point.
nil
listOfupdatedParams = list(list("Bulk Offset" 0.12) list("Gate Layer" "Metal2") list("Footer Include File Name" "../.cadence/myFile.il")) (("Bulk Offset" 0.12) ("Gate Layer" "Metal2") ("Footer Include File Name" "../.cadence/myFile.il")
)
ciTemplateUpdateParams(tpl listOfupdatedParams) ;; Updating the parameter values for the 3
;; Note in case where a template callback is executed here, other extra statements can possibly be output here.
t
ciTemplateListParams(tpl t) ;; listing non default parameters again, this time should return the 3 updated parameters.
(("Bulk Offset" float 0.12) ("Footer Include File Name" string "../.cadence/myFile.il") ("Gate Layer" enum "Metal2")
)
ciToFloat
ciToFloat(g_value) =>f_result
Description
Returns a floating point number for the passed value. If the value is a string, then it will be evaluated and the result returned.
Arguments
|
Specifies a value that should either be a floating point number or a string that evaluates to a floating point number. |
Values Returned
Example
ciToFloat("0.1*3.0") => 0.3
ciToFloat(3.1768) => 3.1768
ciTransferConstraintsInProgress
ciTransferConstraintsInProgress( ) =>t/nil
Description
Returns a Boolean to indicate whether constraint transfer is in progress.
Arguments
Values Returned
Example
;;Transfer of constraints is in progress
ciTransferConstraintsInProgress()
t
ciTypeBindingParameter
ciTypeBindingParameter(S_typeName) =>S_bindingParam/null_string
Description
Returns the name of the registered binding parameter for a constraint type or an empty string if none is registered.
Arguments
Values Returned
|
The binding parameter name with which the constraint type was registered. |
|
|
An empty string ( |
Example
Confirm binding parameter has been registered:
ciRegTypeBindingParameter("myType" "myBindingParam")
ciTypeBindingParameter('myType)
=> "myBindingParam"
ciTypeDefBaseType
ciTypeDefBaseType(S_typeName) =>S_baseTypeName
Description
Returns the config.xml by assigning a unique constraint type name to different constraint types that all share the same base type name. This allows multiple versions of the same base constraint type to exist at the same time. To return the version number of a constraint type, see ciTypeDefVersion.
For more details on the UI configuration file config.xml, see
Arguments
|
The constraint type name. It may be specified as a string or symbol. |
Value Returned
|
The constraint base type name. It may be specified as a string or symbol. |
Example
The custom constraint types matchedDevs and matchedDevs_vl are defined in config.xml as follows:
<ConstraintType>
<Name>matchedDevs</Name>
<GUIName menu="Placement">Matched Devices</GUIName>
<Version>2</Version>
<BaseType>matchedDevs</BaseType>
..
<ConstraintType>
<Name>matchedDevs_v1</Name>
<GUIName menu="Placement">Matched Devices</GUIName>
<Version>1</Version>
<BaseType>matchedDevs</BaseType>
..
The results would be as follows:
ciTypeDefBaseType('matchedDevs) => 'matchedDevs
ciTypeDefVersion('matchedDevs) => 2
ciTypeDefBaseType('matchedDevs_v1) => 'matchedDevs
ciTypeDefVersion('matchedDevs) => 1
ciTypeDefVersion
ciTypeDefVersion(S_typeName) =>x_version
Description
Returns the version number of the passed constraint type. The default version number is 1. Custom constraint types defined through config.xml can specify the version number of the constraint through a
Each version has its own unique constraint type name, but all versions have the same base type name. This allows multiple versions of the same base constraint type to exist at the same time. To return the base type of a constraint type, see ciTypeDefBaseType.
For more details on the UI configuration file config.xml, see
Arguments
|
The constraint type name. It may be specified as a string or symbol. |
Value Returned
Example
ciTypeDefVersion('symmetry) => 1
The custom constraint types matchedDevs and matchedDevs_vl are defined in config.xml as follows:
<ConstraintType>
<Name>matchedDevs</Name>
<GUIName menu="Placement">Matched Devices</GUIName>
<Version>2</Version>
..
<ConstraintType>
<Name>matchedDevs_v1</Name>
<GUIName menu="Placement">Matched Devices</GUIName>
<Version>1</Version>
..
The results would be as follows:
ciTypeDefVersion('mathedDevs) => 2
ciTypeDefVersion('mathedDevs_vl) => 1
ciTypeHasBindingParameter
ciTypeHasBindingParameter(S_typeName) =>t/nil
Description
Checks if a binding parameter has been registered for the specified constraint type.
Arguments
Values Returned
|
A binding parameter exists for the specified constraint type. |
|
Example
ciTypeHasBindingParameter('myType)
=> nil
ciTypeIsType
ciTypeIsType(S_typeName) =>t/nil
Description
Checks if the specified typeName is a constraint type name, which may be a built-in type, such as distance, or a user-defined custom constraint type that has been specified in a config.xml file.
Arguments
Values Returned
Example
Check if the specified built-in constraint type name, such as distance, is a constraint type name. It may be specified as a string or symbol.
ciTypeIsType("distance")
=> t
ciTypeIsType('distance)
=> t
User-defined constraint type name, myType, may be specified as a string or symbol:
ciTypeIsType("myType")
=> t
ciTypeIsType('myType)
=> t
Non-constraint type names return nil:
ciTypeIsType("unknown")
=> nil
ciTypeIsUserDefined
ciTypeIsUserDefined(S_typeName) =>t/nil
Description
Checks if the specified typeName is a user-defined custom constraint type that is specified in a config.xml file.
Arguments
Values Returned
|
The specified constraint type is a user-defined constraint type. |
|
|
The specified constraint type is not a user-defined constraint type. |
Example
Check if the specified constraint type name, myType, is user-defined:
ciTypeIsUserDefined('myType)
=> t
Specify a built-in constraint type, such as symmetry, which is not user-defined.
ciTypeIsUserDefined('symmetry)
=> nil
List all user-defined constraint types.
usertypes = setof(ct ciListTypes() ciTypeIsUserDefined(ct))
ciTypeListCon
ciTypeListCon(u_cache t_constraintType[g_includeOutOfContext] ) =>l_designObject/nil
Description
Lists all the constraints of a given type for a given cache.
Arguments
|
The constraint cache. See |
|
|
Set a legal constraint type (string or symbol). See |
|
Value Returned
|
Returns a list of constraints of the given type in the given cache. |
|
ciUniqueMembers
ciUniqueMembers(l_memberList) =>l_mems
Description
This utility function returns the unique members from the specified member list. It is typically used for member lists that can contain repeated member names due to mFactor expansion.
Arguments
|
Specifies a member list in the constraint member format. The member list is a list of sublists where each sublist contains the member name and type, and optionally contains its parameters. |
Values Returned
|
Returns alphanumeric sorted member list with member types that has been filtered to only include the unique member names. |
Example
ciUniqueMembers( list( list("MN3" 'inst list("x" 1)) list("MN1" 'inst list("y" 2)) list("MN4" 'inst list("z" 3)) list("MN1" 'inst list("y" 2)) list("MN1" 'inst list("y" 2)) list("MN3" 'inst list("x" 1)) list("MN333" 'inst list("a" 333)) ) ) (("MN1" inst) ("MN3" inst) ("MN333" inst) ("MN4" inst)
)
ciUnregisterAssistant
ciUnregisterAssistant(t_assistantName) =>t/nil
Description
Unregisters a Circuit Prospector assistant (category) that was previously registered using ciRegisterAssistant.
See also .
Arguments
Value Returned
|
Action successful. Category no longer displayed in the list of Circuit Prospector categories. |
|
Example
ciUnregisterAssistant("Pins")
ciUnregisterConstraintEditor
ciUnregisterConstraintEditor(t_constraintEditorName) =>t/nil
Description
Unregisters a previously registered constraint editor. If the constraint editor appears in the Constraint Manager’s Constraint Editors menu, then running this function removes it from the menu list.
See also ciRegisterConstraintEditor.
Arguments
Value Returned
|
Removed the specified constraint editor from the Constraint Manager’s Constraint Editors menu. |
|
Example
ciUnregisterConstraintEditor("Matching (strength)")
Removes the constraint editor named Matching (strength).
ciUnregisterNetSuperType
ciUnregisterNetSuperType( t_superType ) =>t/nil
Description
Removes a net super-type, leaving its sub-types intact.
Arguments
Values Returned
Example
ciRegisterNetSuperType("Priority" '("High" "Low"))
ciRegisterNetSuperType("Supply" '("Power" "Ground"))
ciGetNetSuperTypes() ; ("Priority" "Supply")
ciUnregisterNetSuperType("Supply")
ciGetNetSuperTypes() ; ("Priority")
Reference
ciUnRegisterTerm
ciUnregisterTerm(t_libName t_cellName t_viewName t_termName) =>t/nil
Description
Unregisters the terminal of a l/c/v if that terminal has already been registered with a default net.
Arguments
Value Returned
Example
ciUnRegisterTerm('('("analogLib" "pmos" "symbol")) "D")
ciUpdateHierarchicalNotes
ciUpdateHierarchicalNotes(t_libName t_cellName t_viewName[g_hierarchical] ) => t / nil
Description
Updates the existing notes on the templates and constraints for a single cellview or all along the hierarchy beginning from the given cellview.
See also ciAddHierarchicalNotes and ciRemoveHierarchicalNotes.
Arguments
Value Returned
Examples
To update notes in the entire hierarchy starting from the specified cellview:
ciUpdateHierarchicalNotes("myLib" "myCellName" "myView" t)
ciUprevEAConstrs
ciUprevEAConstrs(d_cv[u_cache] ) =>t/nil
Description
Modifies and corrects those constraints in the 610EA (early adopter) release which became obsolete in the full 610 release. Specifically, this command will update any layout structure constraints to be modgen, cluster, or cluster boundary constraints.
Arguments
|
The constraint specified in the given constraint |
Value Returned
Example
ciUprevEAConstrs(cv)
Performs an update on the constraint in the given cellview.
ciUprevEAConstrs(cv cache)
Performs an update on the constraint specified in the given constraint cache.
ciUtilsAddNTimes
ciUtilsAddNTimes(g_val x_n t_valFmt g_addQuotes t_sep) =>x_str
Description
This utility function is used in modgen constraint generation for creating a string with repeated values.
Arguments
|
A Boolean to control whether double quotes are added around each value in the string or not. |
|
|
The separator string to be used between each repeated value in the string. |
Value Returned
|
A string containing the passed value repeated the required number of times with double quotes and separators as specified. |
Examples
ciUtilsAddNTimes("f" 3 "%s" t " ")
=> "\"f\" \"f\" \"f\" "
ciUtilsAddNTimes(0.45 2 "%f" nil ",")
=> "0.45,0.45
ciUtilsAddQuotes
ciUtilsAddQuotes(l_stringList) =>t_string
Description
This function is used in constraint generation for converting a list of strings into a string where each string in the list will have double quotes when added to the string.
Arguments
Value Returned
|
A single string containing the strings in the passed list of strings where each string has double quotes. |
Example
ciUtilsAddQuotes('("a" "b" "c"))
=> "\"a\" \"b\" \"c\""
ciUtilsBuildString
ciUtilsBuildString(l_vals t_valFmt t_sep) =>l_string
Description
This is a utility function for building a string from a list of values. The values are converted to strings by applying the passed string format and separated by the passed separator.
Arguments
Value Returned
|
A string containing all the values in the passed list separated by the passed separator. |
Example
ciUtilsBuildString('(1.1 2.2 3.3) "%f" " ")
=> "1.1 2.2 2.3"
ciUtilsMakeUnique
ciUtilsMakeUnique(l_objLst) =>l_objList
Description
This function takes a list of items, which can contain duplicate items and returns a list without any duplicate items.
Arguments
Value Returned
Examples
ciUtilsMakeUnique('(1 2 2 2 1 3 4 5 3 3))
=> list(1 2 3 4 5)
ciUtilsMakeUnique('("a" "a" "b" "c" "a" "a" "b" "c"))
=> ("a" "b" "c")
ciUtilsRemoveNils
ciUtilsRemoveNils(l_vals) =>l_vals
Description
Removes the nil elements from a list.
Arguments
Value Returned
Example
ciUtilsRemoveNils(list(nil nil 1 2 3 nil nil 4 5 6 nil nil))
=> (1 2 3 4 5 6)
ciUtilsRepeatNTimes
ciUtilsRepeatNTimes(g_val x_n) =>l_vals
Description
This is a utility function for creating a list containing a single value repeated the specified number of times.
Arguments
Value Returned
|
A list containing a single value repeated the specified number of times. |
Examples
ciUtilsRepeatNTimes(0.55 4)
=> '(0.55 0.55 0.55 0.55)
ciUtilsRepeatNTimes("Metal1" 2)
=> '("Metal1" "Metal1")
ciUtilsReplaceNils
ciUtilsReplaceNils(l_items) =>l_res
Description
This is a utility function for replacing any nil elements in a list with the specified value. See also, ciUtilsRemoveNils and ciUtilsMakeUnique.
Arguments
Value Returned
Example
ciUtilsReplaceNils(list(nil nil 1 2 3 nil nil 4 5 6 nil nil) 100)
=> (100 100 1 2 3 100 100 4 5 6 100 100)
ciWithinConstraint
ciWithinConstraint(s_conType g_cache l_objs) =>l_cons
Description
Returns the constraints that contain the specified objects as members of the given constraint type.
Arguments
|
The list of objects where each object is a sub-list containing the object name and type. |
Values Returned
|
A list of constraints of the given type that have the specified objects as its constraint members. |
Example
ciWithinConstraint('alignment cache '(("NM9" inst)("PM6" inst)))
(ci:0x27ce1630 ci:0x27ea9c70)
Circuit Prospector Assistant Customization SKILL Commands
The following SKILL commands are available for customizing the Circuit Prospector assistant:
ciActiveSameCellAndSizeIterator
ciActiveSameCellAndSizeIterator(d_cellviewID t_matchExpression) =>l_devices
Description
Returns a list of devices where each sub-list corresponds to two or more active devices that have the same cell and size in the cellview. If the finder match net expression evaluates to nil, the device is ignored.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
finder = ciGetFinder("APR Active Same Cell and Size")
insts = ciActiveSameCellAndSizeIterator(geGetEditCellView() finder->expression) ("/I1" "/I2")
ciAlignPinsOnCellSide
ciAlignPinsOnCellSide(u_cache l_memberList[?sidet_side] ) =>t/nil
Description
Generates alignment constraints for pins on the same side.
Arguments
|
The constraint |
|
|
A single list of instances, pins, instance terminals, and net members that have been selected from the Circuit Prospector assistant. |
|
Value Returned
Example
ciAlignPinsOnCellSide( ciCacheGet(geGetEditCellView()) list( list("/I1/x" pin) list("/I2/x" pin)) "top")
ciAPRCascodeIterator
ciAPRCascodeIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for advanced place and route cascoded structures.
Arguments
|
Database ID of the cellview to which the iterator is to be applied. |
|
|
Expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
cv = geGetEditCellView()
ciAPRCascodeIterator(cv "t")
ciAPRXYInstSymmetricIterator
ciAPRXYInstSymmetricIterator(d_cellview t_finderExpr[?triggerg_trigger] [?likeSchemaSymg_likeSchemaSym] ) => list / nil
Description
Evaluates the finderExpr with the current symmetric pair of objects with common source or drain terminal names that are assigned to L and R local variables. This iterator is customized for the Auto-Device Placement and Routing flow and is used by the Circuit Prospector finderExpr) is not nil.
The L and R variables can be referenced in the finderExpr.
In the current schematic, the instance symmetry iterator first looks for symmetrical triggering pairs and then propagates the symmetries from these pairs along the nets and devices that are connected to the triggering pairs and symmetrical pairs which can be one of the following:
-
A differential pair made of
fetandbjtdevices. -
A pair of instances with the same cell name and same size as
fetorbjtdevices with mirrored orientation, aligned on the same Y co-ordinate.
The symmetries are propagated through the nets using terminal names defined for each active device. Symmetries are also transmitted to and propagated through passive devices.
To be a symmetrical pair, both instances must have the same cell name and size.
Symmetries for instances are converted to self-symmetries when there is only one member on the path for symmetry propagation.
Arguments
Value Returned
Example
The symmetric pairs with common source or drain terminal names that are assigned to L and R local variables are evaluated and the symmetric pair MN16 and MN5 is returned:
finderExpr="(L->libName == R->libName) && (L->cellName == R->cellName) &&
(L->w == R->w) && (L->l == R->l) && (L->r == R->r) && (L->c == R->c)"
symmPairs = ciAPRXYInstSymmetricIterator(cv finderExpr)
symmPair1 = car(symmPairs)
print(symmPair1~>name)
("MN16" "MN5")
ciBasicGetParamValue
ciBasicGetParamValue(d_deviceId t_paramName) =>paramValue/nil
Description
This API is similar to ciGetParamValue, except it does not evaluate iPar or pPar expressions. It gets the parameter value of the user defined parameter. The user-defined parameter was mapped to its PDK names by the ciMapParam function.
Arguments
|
The placeholder name that is used to map the parameter name. The user-defined parameter was mapped to its PDK names by ciMapParam. |
Value Returned
Example
If a mapping for fetLength exists ciMapParam("fetLength" '("l")) device is set by
device=car(geGetSelSet()) from the cell view
ciBasicGetParamValue(device "fetLength")
=> "340.0n" ; returns the fetlength for that device
ciBlockResistorArrayIterator
ciBlockResistorArrayIterator(d_cellview t_matchExpr) =>l_returnedInsts/nil
Description
Iterates over all resistor devices in the cellview based on the result of evaluating the passed or matched expression. This function is used by the Block Resistor Array finder of the Circuit Prospector assistant.
Arguments
|
The cellview containing the design instances to be iterated over. |
|
Value Returned
|
A list of returned instances. For example: list(list( inst1 inst2 inst3 ...)) |
|
Example
matchExpr = "ciIsDevice(device \"resistor\")"
resDevices = ciBlockResistorArrayIterator(geGetEditCellView() matchExpr)
print(resDevices~>name)
ciBuildModgenParams
ciBuildModgenParams(g_cache l_devInfo l_pattern r_nil l_args) =>l_modgenParamsAndMembers
Description
Creates modgen parameter and member list. This is a utility function.
Arguments
Value Returned
Example
devInfo = ciCollectDeviceInfo(cache '(("NM0" inst) ("NM1" inst)) )
pattern = '( ("NM0" "NM1" "NM1" "NM0")
("NM1" "NM0" "NM0" "NM1"))
args = args = list( nil stringToSymbol("Add GuardRing") t stringToSymbol("Add Dummies") nil stringToSymbol("Abut All") t)
modgenParmasAndMembers = ciBuildModgenParams(cache 'diffPair devInfo pattern modgenRouting args)
modgenParams = car(modgenParmasAndMembers)
(("numRows" 2)
("numCols" 4)
("pattern" "custom ( ( A B B A ) ( B A A B ) ) ( ( MX MX MX MX ) ( R0 R0 R0 R0 ) )")
modgenMembers = cadr(modgenParmasAndMembers)
(("NM0" inst
(("row" 0)
("col" 0)
("abutment" 1)
)
)
("NM1" inst
(("row" 0)
("col" 1)
("abutment" 1)
)
)
("NM1" inst
(("row" 0)
("col" 2)
("abutment" 1)
)
)
("NM0" inst
(("row" 0)
("col" 3)
("abutment" 1)
)
)
("NM1" inst
(("row" 1)
("col" 0)
("abutment" 1)
)
)
("NM0" inst
(("row" 1)
("col" 1)
("abutment" 1)
)
)
("NM0" inst
(("row" 1)
("col" 2)
("abutment" 1)
)
)
("NM1" inst
(("row" 1)
("col" 3)
("abutment" 1)
)
)
)
ciBundleSignalsIterator
ciBundleSignalsIterator(d_cellView t_matchExpression) =>l_signals/nil
Description
Used by the Circuit Prospector assistant to iterate over all named bundle and bus nets. It returns the list of corresponding signals. The signals are grouped according to the result of the match expression. If the match expression evaluates to nil the signal list is ignored.
Arguments
Value Returned
|
The list of signal lists, grouped per the evaluated result of the match expression. |
|
Example
To group all signals from the current schematic cellview that are included into a bundle net called “data<0:1>,reset,test”:
ciBundleSignalsIterator(geGetEditCellView() “car(bundleSignals)==\”data\””)~>name => ((“data<0>” “data<1>” “reset” “test”))
ciCanCGBeUsed
ciCanCGBeUsed(g_ciCon t_CGDefName g_CG) =>t/nil
Description
The default callback used by ciSetCMCGSKILLCallbacks when no user-defined function has been specified for determining if a constraint group should be used or not.
Value Returned
Example
ciCascodeSeriesCurrentMirrorIterator
ciCascodeSeriesCurrentMirrorIterator(d_cellviewID t_matchExpression) =>l_devices
Description
Returns a list of corresponding devices that match cascode series current mirror structures in the cellview. If the finder match net expression evaluates to nil, the structures are ignored.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
finder = ciGetFinder("APR Cascode Series Current Mirror")
insts = ciCascodeSeriesCurrentMirrorIterator(geGetEditCellView() finder->expression) ("/I1" "/I2")
ciCategoryListFinderNames
ciCategoryListFinderNames(t_categoryName) =>l_finderNames/nil
Description
Lists all the finder names for a given category in Circuit Prospector.
Arguments
Value Returned
|
The specified category name is invalid. Therefore, no corresponding finders could be found. |
Example
ciCategoryListFinderNames("Rapid Analog Prototype")
The command illustrated above returns the following:
("MOS Cascode" "MOS Cascoded Current Mirror" "MOS Cascoded Current Mirror2" "MOS Current Mirror" "MOS Differential Pair" "MOS Differential Pair - Cross Coupled" "Passive Arrays" "Active Same Cell large mfactor" "Symmetric Instance Pairs - By Connectivity" "Capacitor Cluster" "Vertical Orientation" "Negative Supply" "Positive Supply" "Nets (Symmetry By Connectivity)" "Pins (Symmetry By Connectivity)" "Top Pins (Alignment)" "Bottom Pins (Alignment)" "Left Pins (Alignment)" "Right Pins (Alignment)" "Enforce Precedence")
ciClearNetSuperTypes
ciClearNetSuperTypes(
)
=> t
Description
Clears all registered net super-types.
Arguments
Value Returned
Example
;; Register some super-types.
ciRegisterNetSuperType("Priority" '("High" "Low"))
ciRegisterNetSuperType("Supply" '("Power" "Ground"))
ciGetNetSuperTypes() ; ("Priority" "Supply")
;; Clear net super-types.
ciClearNetSuperTypes()
=> t
As shown in the above example, all the registered net super-types are cleared.
ciClusterBoundaryForCluster
ciClusterBoundaryForCluster(u_cache l_instances) => l_clusterBoundary /nil
Description
Used by the Circuit Prospector assistant as a generator to set a Cluster Boundary constraint to an existing Cluster constraint. The flexibleFlag parameter of the Cluster Boundary is set to 1 (true).
Arguments
|
Constraint |
|
|
List of members of the same Cluster constraint that are selected in the Circuit Prospector assistant’s browser. |
Value Returned
|
A list made of the constraint ID for the new Cluster Boundary constraint when it is created. |
|
Example
If “NM1” and “NM2” are the names of two instances that are members of an existing Cluster constraint, the following functions creates a Cluster Boundary and the member of that new Cluster Boundary is the Cluster constraint for “NM1” and “NM2”:
cache = ciCacheGet(geGetEditCellView()
ciClusterBoundaryForCluster(cache list( list(“/NM1” inst) list(“/NM2” inst)))
ciCommonGateAndSourceIterator
ciCommonGateAndSourceIterator(d_cellviewID t_matchExpression) =>l_devices
Description
Returns a list of corresponding devices that match the common gate and source structures in the cellview. If the finder match net expression evaluates to nil, the structures are ignored.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
finder = ciGetFinder("APR Active Same Size Common Gate and Source")
cv= geGetEditCellView
ciCommonGateAndSourceIterator(cv "t")
Returns the common gate and source structures that match the expression
ciCommonGateAndSourceIterator(geGetEditCellView() finder->expression) ("/I1" "/I2")
ciCommonGateIterator
ciCommonGateIterator(d_cellviewID t_matchExpression) =>l_devices
Description
Returns a list of corresponding devices that match the common gate structures in the cellview. If the finder match net expression evaluates to nil, the structures are ignored.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
finder = ciGetFinder("APR Active Same Size Common Gate")
insts = ciCommonGateIterator(geGetEditCellView() finder->expression)
ciCommonSourceIterator
ciCommonSourceIterator(d_cellviewID t_matchExpression) =>l_devices
Description
Returns a list of corresponding devices that match the common source structures in the cellview. If the finder match net expression evaluates to nil, the structures are ignored.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
finder = ciGetFinder("APR Active Same Size Common Source")
insts = ciCommonSourceIterator(geGetEditCellView() finder->expression) ("/I1" "/I2")
ciCPRegistrationFromLAM
ciCPRegistrationFromLAM(l_componentTypes[?addNewLinesg_addNewLines] ) =>t_cpRegistrationString
Description
Used in conjunction with ciGetLAMComponentTypes to create a string containing ci registration function calls to register the device, terminal, and parameter mappings specified in a cph.lam file associated with a particular PDK. The device and terminal registrations are needed for the Circuit Prospector finders, iterators, and generators to function with the selected PDK. The returned string can either be evaluated using evalstring() to call the ci registration functions, or the string can be printed out using printf so that the ci registration calls can be placed in a file loaded by the libInit.il file of the PDK.
Arguments
Value Returned
|
Returns a string containing the |
Example
gpdk045_compTypes = ciGetLAMComponentTypes(geGetEditCellView() "gpdk045")
info(ciCPRegistrationFromLAM(gpdk045_compTypes ?addNewLines t))
ciRegisterDevice("nfet" append(ciGetDeviceNames("nfet") '(
("gpdk045" "nmos1v" nil)
("gpdk045" "nmos1v_3" nil)
)))
ciRegisterDevice("pfet" append(ciGetDeviceNames("pfet") '(
("gpdk045" "pmos1v" nil)
("gpdk045" "pmos1v_3" nil)
)))
ciRegisterDevice("fet" append(ciGetDeviceNames("fet") '(
("gpdk045" "nmos1v" nil)
("gpdk045" "nmos1v_3" nil)
)))
ciRegisterDevice("fet" append(ciGetDeviceNames("fet") '(
("gpdk045" "pmos1v" nil)
("gpdk045" "pmos1v_3" nil)
)))
ciMapParam("fingerWidth" append(ciGetParamMapping("fingerWidth") '("fw")))
ciMapParam("lxActiveLayer" append(ciGetParamMapping("lxActiveLayer") '("Oxide drawing")))
ciMapParam("lxMaxWidth" append(ciGetParamMapping("lxMaxWidth") '("1e-06")))
ciCreateRoutePriorityCon
ciCreateRoutePriorityCon(u_cache l_instsNetsPins v_value) =>ciCon/nil
Description
Used by Circuit Prospector constraint generators to generate routing priority constraints.
Arguments
|
The constraint cache (see |
|
Value Returned
Example
routePriorityCon = ciCreateRoutePriorityCon(cache instsNetsPins 5)
ciDeviceInfoGetRegisteredParams
ciDeviceInfoGetRegisteredParams( [t_deviceTypeName] ) =>l_paramNames
Description
Returns the parameters registered for the specified device type.
Arguments
|
The name of the device type. If the |
Value Returned
|
An association list that maps the parameters to their default values for the given device type, such as |
Example
-
Returns a default parameters list:
ciDeviceInfoGetRegisteredParams()
(("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil)
)
-
Returns the default parameters list because no paremeters were registered for
resistor:ciDeviceInfoGetRegisteredParams("resistor")
(("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil)
)
-
When you register parameters for
resistorusing the ciDeviceInfoRegisterParams SKILL function as following:ciDeviceInfoRegisterParams("resistor" list('("width" 1) '("length" 1) '("area" 1)))
t
TheciDeviceInfoGetRegisteredParamsSKILL function returns the list of newly registered parameters forresistor:ciDeviceInfoGetRegisteredParams("resistor")
(("width" 1)
("length" 1)
("area" 1)
)
ciDeviceInfoGetRegisteredTerminals
ciDeviceInfoGetRegisteredTerminals( [t_deviceTypeName] ) =>l_terminalNames
Description
Returns the terminals registered for the specified device type.
Arguments
|
The name of the device type. If the |
Value Returned
Example
-
When default terminals have not been overridden, the
ciDeviceInfoRegisterTerminalsSKILL function returns a list of all the registered default terminals:ciDeviceInfoGetRegisteredTerminals()
("source" "gate" "drain" "bulk")
-
When you register the different default terminals for
resistorusing the ciDeviceInfoRegisterTerminals SKILL function:ciDeviceInfoRegisterTerminals("resistor" list("minus" "plus"))
t
TheciDeviceInfoGetRegisteredTerminalsSKILL function returns a list of newly registered default terminals forresistor:ciDeviceInfoGetRegisteredTerminals("resistor")
("minus" "plus")
ciDeviceInfoRegisterParams
ciDeviceInfoRegisterParams(
{ t_deviceTypeName | 'default | nil }
[ (t_paramName ... t_paramNameN) | 'default | '(nil) ]
)
=> t / nil
Description
Registers or unregisters parameters for a device type, such as bjt, mos, and so on.
-
To register a parameter,
-
Specify a
deviceTypeNameas a string or specify the symbol,'default, to register default parameters, that is, parameters for device type that have not been registered usingciDeviceInfoRegisterParams. For example:ciDeviceInfoRegisterParams("mos" '(("mosParam1" "defaultValueForParam1") ("mosParam2" nil)))
t
ciDeviceInfoRegisterParams(default '(("default1" "defaultValue1")))
t
ciDeviceInfoGetRegisteredParams("mos")
(("mosParam1" "defaultValueForParam1") ("mosParam2" nil))
ciDeviceInfoGetRegisteredParams("noParamRegistered")
("default1" "defaultValue1")
-
Specify the
paramNamesargument as an association list containing the parameter names and their default values. To specify that there is no parameter for adeviceTypeName, setparamNamesas'(nil). This can be useful for some device types, such aspassive.
-
Specify a
-
To unregister all the parameters for all the device types, instead of specifying the
deviceTypeNameargument, specifynilas the first argument. - To unregister parameters for a given device type, do the following:
Arguments
Value Returned
|
Successfully registered or unregistered the parameters for the given device type. |
|
Example
ciDeviceInfoGetRegisteredParams("resistor") ;; returns default parameter list because no parameters were registered for "resistor"
(("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil)
)
ciDeviceInfoRegisterParams("resistor" list('("width" 1) '("length" 1) '("area" 1))) ;; register parameters for "resistor"
t
ciDeviceInfoGetRegisteredParams("resistor") ;; returns the new parameter list for "resistor"
(("width" 1)
("length" 1)
("area" 1)
)
ciDeviceInfoRegisterParams('default '(("length" 1) ("width" 1) ("perimeter" 4) ("area" 1))) ;; overrided default parameter
t
ciDeviceInfoGetRegisteredParams("mos") ;; returns default parameter list because no parameters were registered for "mos"
(("length" 1)
("width" 1)
("perimeter" 4)
("area" 1)
)
ciDeviceInfoRegisterParams("mos" '(("length" 1) ("width" 1) ("perimeter" 4) ("area" 1) ("mfactor" 1))) ;; register parameter for "mos"
t
ciDeviceInfoGetRegisteredParams("mos") ;; returns the parameter registered for "mos"
(("length" 1)
("width" 1)
("perimeter" 4)
("area" 1)
("mfactor" 1)
)
ciDeviceInfoRegisterParams("mos") ;; Unregister parameters for "mos"
t
ciDeviceInfoGetRegisteredParams("mos") ;; returns the default parameters because "mos" parameters have been unregistered.
(("length" 1)
("width" 1)
("perimeter" 4)
("area" 1)
)
ciDeviceInfoGetRegisteredParams("resistor") ;; "resistor" parameter are still registered.
(("width" 1)
("length" 1)
("area" 1)
)
ciDeviceInfoRegisterParams(nil) ;; Unregister all the parameters for all the device types
t
ciDeviceInfoGetRegisteredParams("resistor") ;; Returns the default parameter because all parameters have been unregistered.
(("length" 1)
("width" 1)
("perimeter" 4)
("area" 1)
)
ciDeviceInfoRegisterTerminals
ciDeviceInfoRegisterTerminals(
{ t_deviceTypeName | 'default | nil }
[ (t_terminalName ... t_terminalNameN) | 'default | '(nil) ]
)
=> t / nil
Description
Registers or unregisters terminals for a device type, such as bjt, mos, and so on.
- To register a terminal,
-
To unregister all the terminal for all the device types, instead of specifying the
deviceTypeNameargument, specifynilas the first argument. - To unregister terminals for a given device, do the following:
Arguments
Value Returned
|
Successfully registered or unregistered the terminals for the given device type. |
|
Example
ciDeviceInfoGetRegisteredTerminals("resistor") ;;nothing has been registered, so returns the default terminal list
("source" "gate" "drain" "bulk")
ciDeviceInfoRegisterTerminals("resistor" '("plus" "minus")) ;;registers terminals for "resistor"
t
ciDeviceInfoGetRegisteredTerminals("resistor") ;;now, as terminals have been registered for "resistor", the new set of terminals is returned
("plus" "minus")
ciDeviceInfoRegisterTerminals("opamp" '("in_min" "in_plus" "out"))
t
ciDeviceInfoGetRegisteredTerminals("opamp")
("in_min" "in_plus" "out")
ciDeviceInfoRegisterTerminals("opamp") ;;unregister terminals for "opamp".
;;you can also use ciDeviceInfoRegisterTerminals("opamp" nil) instead to unregister the "opamp" terminal
t
ciDeviceInfoGetRegisteredTerminals("opamp") ;;nothing has been registered for "opamp", so returns the default terminal list
("source" "gate" "drain" "bulk")
ciDeviceInfoGetRegisteredTerminals("resistor") ;;terminals are still registered for "resistor"
("plus" "minus")
ciDeviceInfoRegisterTerminals(nil) ;;unregister terminals for all device types
t
ciDeviceInfoGetRegisteredTerminals("resistor") ;;terminals for "resistor" have been unregistered, so the default terminals are returned
("source" "gate" "drain" "bulk")
ciDeviceInfoRegistry
ciDeviceInfoRegistry(
)
=> g_deviceInfo
Description
Returns the registry where information about all the device types is stored. This registry is used by ciCollectDeviceInfo.
Arguments
Value Returned
|
The table containing information about all the device types. |
Example
ciDeviceInfoRegistry()
table:deviceInfos
ciDeviceInfoRestoreDefaultParamNames
ciDeviceInfoRestoreDefaultParamNames(
)
=> l_defaultParams
Description
Restores device parameters to default parameters.
Arguments
Value Returned
Example
ciDeviceInfoRegisterParams('default '(("length" 1) ("width" 1) ("perimeter" 4) ("area" 1))) ;; overrides default parameter
t
ciDeviceInfoGetRegisteredParams() ;; returns the default parameters.
(("length" 1)
("width" 1)
("perimeter" 4)
("area" 1)
)
ciDeviceInfoRestoreDefaultParamNames() ;; restores device parameters to default parameters.
(("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil)
)
ciDeviceInfoGetRegisteredParams() ;; default parameters have been restored
(("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil
)
ciDeviceInfoRestoreDefaultTerminalNames
ciDeviceInfoRestoreDefaultTerminalNames(
)
=> l_defaultTerminals
Description
Restores device terminals to default terminals.
Arguments
Value Returned
Example
ciDeviceInfoGetRegisteredTerminals() ;; returns default terminal names
("source" "gate" "drain" "bulk")
ciDeviceInfoRegisterTerminals('default '("source" "drain" "gate")) ;;overrides default terminal names
t
ciDeviceInfoGetRegisteredTerminals() ;; returns the new default terminal names
("source" "drain" "gate")
ciDeviceInfoRestoreDefaultTerminalNames() ;; restores the default terminal names
("source" "gate" "drain" "bulk")
ciDeviceInfoGetRegisteredTerminals() ;; returns default terminal names that were restored
("source" "gate" "drain" "bulk")
ciDeviceInfoTerminalsAreValid
ciDeviceInfoTerminalsAreValid(l_terminalNames) =>t/nil
Description
Checks whether the specified device terminals are valid inputs for ciCollectDeviceInfo.
Arguments
|
The list of terminal names registered terminals for a device family, such as |
Value Returned
Example
ciDeviceInfoTerminalsAreValid(list('a))
nil
ciDeviceInfoTerminalsAreValid('("minus" "plus"))
t
ciEnableAssistant
ciEnableAssistant(t_assistantName g_enable) =>t/nil
Description
Enables or disables a Circuit Prospector assistant (category) so that it is visible/not visible in the list of Circuit Prospector categories.
Arguments
|
The name of the assistant (category) to be made visible or hidden. |
|
Value Returned
Example
ciEnableAssistant("Pins" nil)
Hides the Pins category in the Circuit Prospector
ciEnableAssistant("Pins" t)
Shows the Pins category in the Circuit Prospector
ciEvaluateGeneratorArgs
ciEvaluateGeneratorArgs(u_cache t_defaultCGen l_instNetsPinsTerms[?triggerCBinModet_triggerCBinMode] [?argValuesToUpdatel_argValuesToUpdate] ) =>l_argumentValues
Description
Evaluates the specified constraint generator argument values.
Arguments
|
The constraint |
|
|
The name of the default constraint generator for which arguments need to be evaluated. |
|
|
The list of instances, nets, pins, and terminals that need to be passed to evaluate the arguments. |
|
|
The mode in which the callbacks need to be called when |
|
|
The list of argument values that need to be updated after the first evaluation of the argument. This list can be one of the following: |
|
Value Returned
|
A DPL containing the values of each argument. No widget properties are appended to this DPL. |
Example
ciEvaluateGeneratorArgs(ciGetCellView() "GenericModgen" list('("M1" inst) '("M2" inst) '("INN" net)))
(nil Device\ mFactors " M1 (4) M2 (4)" Device\ Mapping " A:M1 B:M2"
Num\ Rows 1 Pattern " A A A A B B B B" Orientation
"R0 R0 R0 R0 R0 R0 R0 R0" Default\ Orientation "R0" Select\ Edge ""
Operation "" Device\ Horizontal\ Spacing 0.0 Device\ Vertical\ Spacing
0.0 Abut\ All t Dummy\ Net "INN"
Dummy\ Parameters "neighbor" Dummy\ Num\ Fingers 0 Dummy\ Length
0.0 Dummy\ Width 0.0 Add\ GuardRing nil
Type "ring" Shape "rectangular" Net
"INN" Spacing 0.0 Left\ Spacing 0.0
Right\ Spacing 0.0 Top\ Spacing 0.0 Bottom\ Spacing
0.0 MPP "N-Tap(gpdk045)" Use\ Fluid nil
Device "undefined" Width 0.0 Use\ Min\ DRC\ for\ Spacing
nil Layer\ Filter "" Merge\ layers ""
Layers\ preset "default"
)
ciEvaluateGeneratorArgs(ciGetCellView() "GenericModgen" list('("M1" inst) '("M2" inst) '("INN" net)) ?triggerCBinMode 'userEdit ?argValuesToUpdate list(list("Num Rows" 2)))
(nil Device\ mFactors " M1 (4) M2 (4)" Device\ Mapping " A:M1 B:M2"
Num\ Rows 2 Pattern "A A A A \nB B B B" Orientation
"R0 R0 R0 R0 \nR0 R0 R0 R0" Default\ Orientation "R0" Select\ Edge ""
Operation "" Device\ Horizontal\ Spacing 0.0 Device\ Vertical\ Spacing
0.0 Abut\ All t Dummy\ Net "INN"
Dummy\ Parameters "neighbor" Dummy\ Num\ Fingers 0 Dummy\ Length
0.0 Dummy\ Width 0.0 Add\ GuardRing nil
Type "ring" Shape "rectangular" Net
"INN" Spacing 0.0 Left\ Spacing 0.0
Right\ Spacing 0.0 Top\ Spacing 0.0 Bottom\ Spacing
0.0 MPP "N-Tap(gpdk045)" Use\ Fluid nil
Device "undefined" Width 0.0 Use\ Min\ DRC\ for\ Spacing
nil Layer\ Filter "" Merge\ layers ""
Layers\ preset "default"
)
list(list("Num Rows" 2))
list(nil "Num Rows" 2)
list("Num Rows" 2)
list('Num\ Rows 2), ....
For the argument name, symbols can also be used instead of string.
ciExpandIteratedDeviceInfo
ciExpandIteratedDeviceInfo(l_deviceInfo) =>l_expandedDeviceInfo
Description
Expands any iterated device names in a device information list returned by .
Arguments
|
The device information list returned by calling |
Value Returned
|
A device information list where the iterated device names have been expanded. |
Example
Collect the device information for MN1<0:2> and MN2 while treating MN1<0:2> as a single device:
devInfo = ciCollectDeviceInfo(cache '(("MN1<0:2>" inst) ("MN2" inst)))
mapcar(lambda((dev) dev->name) devInfo->devs) => '("MN1<0:2>" "MN2")
Then, expand any iterated devices out into individual devices, for example, MN1<0:2> => MN1<0>, MN1<1> and MN1<2>, as shown below:
expandedDevInfo = ciExpandIteratedDeviceInfo(devInfo)
mapcar(lambda((dev) dev->name) expandedDevInfo->devs) => '("MN1<0>" "MN1<1>" "MN1<2>" "MN2") ;;; devs is a list of 4 devices
ciFindObjectInHier
ciFindObjectInHier(d_cache t_objectFullPathName s_objectType) =>dbId/nil
Description
Finds the database ID of the specified hierarchical object. This function is used by Circuit Prospector constraint generators.
Arguments
|
Constraint view in which constraints are being created. This is either the current cache or the cache associated with the cellview in which the hierarchical object is contained. |
|
|
The object type, which has one of the following values:
|
Value Returned
Example
subCache = ciCacheGet("amsPLL" "vco2phase" "schematic")
obj = ciFindObjectInHier("/I7/I9/MN1" subCache 'inst)
obj->name
"MN1"
obj->cellView->cellName
"vco2phase"
ciGenerateConstraintGroup
ciGenerateConstraintGroup(g_ciCon t_CGDefName t_CGName) =>t/nil
Description
The default constraint group generation callback used by ciSetCMCGSKILLCallbacks when no user-defined function has been specified.
Value Returned
Example
ciGeneratorCheckInstsNetsPinsInstTerms
ciGeneratorCheckInstsNetsPinsInstTerms(l_instsNetsPins) =>t/nil
Description
Checks whether the constraint generator has been called with the expected number of instances, nets, pins, and instTerms. This function is used within the constraint generators. If a wrong number of instances, nets, pins, or instTerms have been provided then a warning message will be displayed in the CIW.
Arguments
Value Returned
|
Returns the expected number of instances, nets, pins, and instTerms. |
|
Example
The following snippets illustrate the use of the ciGeneratorCheckInstsNetsPinsInstTerms SKILL command:
Example 1
inp = '(("/MPS" inst) ("/MP7" inst) ("/MP" inst) ("/net014" net) ("/VDD" net))
inpDPL = ciSeparateInstsNetsPins(inp)
ciGeneratorCheckInstsNetsPinsInstTerms( "TestGen" inpDPL 2 2 0 0)
=> t
Example 2
ciGeneratorCheckInstsNetsPinsInstTerms( "TestGen" inpDPL 1 2 0 2)
=> nil
*WARNING* (CMGR-6002): Incorrect number of insts, nets, pins or instTerms to run Constraint Generator "TestGen". This generator requires 1 inst(s), 2 net(s) 0 pin(s) and 2 instTerm(s).
ciGeneratorForInstSymmetry
ciGeneratorForInstSymmetry(u_cache l_insts) =>ciCon/nil
Description
Used by the Circuit Prospector constraint generators to generate instance symmetry constraints.
Arguments
|
The constraint cache (see |
|
|
List of the instances that are to form part of the instance symmetry constraint. |
Value Returned
Example
instSymmetryCon = ciGeneratorForInstSymmetry(cache insts)
ciGeneratorForNetSymmetry
ciGeneratorForNetSymmetry(u_cache d_nets) =>ciCon/nil
Description
Used by the Circuit Prospector constraint generators to generate net symmetry constraints.
Arguments
|
The constraint cache (see |
|
|
The nets that are to form part of the instance symmetry constraint. |
Value Returned
Example
netSymmetryCon = ciGeneratorForNetSymmetry(cache nets)
ciGetAction
ciGetAction(t_actionName) =>l_actionAttributes
Description
Returns a disembodied property list (DPL) of attributes associated with the specified action name. This function is an alias for the ciGetGenerator function. The purpose of this alias is to emphasize the fact that constraint generator SKILL expressions can do everything possible in SKILL and not just create constraints.
See also ciRegisterAction, ciRegisterConstraintGenerator, and ciGetGenerator.
Arguments
Value Returned
Example
If the example given for ciRegisterAction is considered, the following:
ciGetAction("List Constraints")
list(nil
'name "List Constraints"
'description "List the constraints in the CIW"
'expression "when(args->\"List Types\" printf(\"%L\" cache->constraints~>type)) when(args->\"List Names\" printf(\"%L\" cache->constraints~>name))"
'addToToolbar t
'iconName "listConstraints"
'args list(
list("List Types" 'bool t)
list("List Names" 'bool t)
)
)
ciGetConstraintGroupsEnum
ciGetConstraintGroupsEnum(g_cache) =>l_constraintGroupName
Description
Returns a string to be used as an enum variable for selecting the default constraint group to be used by the Pin to Trunk router. The result can be used as the value of an argument for a constraint generator. The resulting enum variable is the same as the one used by the Pin to Trunk GUI of the Modgen Pattern Editor. Consistent with the Modgen Pattern Editor, it sets the default to virtuosoDefaultSetup if that choice is available.
Also see the ciRegisterConstraintGenerator SKILL function for more information on registering constraint generators and related arguments.
Arguments
Value Returned
Example
ciGetConstraintGroupsEnum(ciGetCellView())
"6xSpacing 4xSpacing 2xWidth virtuosoDefaultExtractorSetup virtuosoDefaultSetup virtuosoDefaultTaper VLMDefaultSetup DFM LEFDefaultRouteSpec_gpdk045 minPRBoundaryInteriorHaloCG minProtrusionNumCutCG virtuosoDefaultSetup"
ciGetCPSelectedResults
ciGetCPSelectedResults(u_cache) =>l_ciFinderResults/ nil
Description
Returns a list of finder results selected in Circuit Prospector. Each item in the list is a finder result which contains the list of devices and the finder name.
Arguments
Value Returned
Example
ciGetCPSelectedResults(ciGetCellView())
((("/NM12" "inst")
("/NM0" "inst") properties
(nil ciFinderName "Symmetric Instance Pairs - By Connectivity")
)
)
ciGetDeviceBulkTermName
ciGetDeviceBulkTermName(d_deviceID) =>t_terminalName/nil
Description
Returns the name of the bulk terminal for the passed device.
Arguments
Value Returned
Example
ciGetDeviceBulkTermName(myMOSdevice)
"B"
ciGetDeviceBulkTermName(myBJTdevice)
"SUB"
ciGetDeviceInfo
ciGetDeviceInfo(d_deviceID t_deviceTypeName) =>list/nil
Description
Returns the disembodied property list (DPL) associated with a particular device type.
Arguments
|
The device ID for which the disembodied property list needs to be returned. |
|
|
The device type associated with the given device.
If the device type has not been registered then |
Value Returned
|
A DPL associated with the given device.
A disembodied property list is optional and will have been specified when the device type was registered with ciRegisterDevice. If a disembodied property list was not specified when the device type was registered then an empty list will be returned.
|
|
Example
ciRegisterDevice("probeShort" list( list("analogLib"
"res"
"symbol"
list(nil 'shortedTerminalMap list( list( "I0" "I1"))
'shortTermExpr "ciGetParamValue(device \"r\") < 0.0001"
(nil "pplusres" nil)))
devInfo = ciGetDeviceInfo(myRes "probeShort")
devInfo->shortedTerminalMap => ( ( "I0" "I1"))
devInfo->shortTermExpr => "ciGetParamValue(device \"r\") < 0.0001"
ciGetDeviceNames
ciGetDeviceNames(t_deviceName) =>t_deviceNames/nil
Description
Returns all devices registered to the user-defined device name.
See also ciRegisterDevice.
Arguments
Value Returned
Example
ciRegisterDevice("fet"
’( (nil "nmos" nil)
’(nil "pmos" nil)
’(nil "nmos3" nil)
’(nil "pmos3" nil)
’(nil "nmos4" nil)
’(nil "pmos4" nil)))
then ciGetDeviceNames("fet") returns devices registered for "fet" as:
((nil "nmos" nil)
’(nil "pmos" nil)
’(nil "nmos3" nil)
’(nil "pmos3" nil)
’(nil "nmos4" nil)
’(nil "pmos4" nil)
)
Also (as an example) for nfet and pfet:
ciRegisterDevice("nfet"
’((nil "nmos" nil)
’(nil "nmos1v" nil)
’(nil "nmos1v_hvt" nil)
’(nil "nmos1v_iso" nil)
’(nil "nmos1v_nat" nil)
’(nil "nmos2v" nil)
’(nil "nmos2v_nat" nil)
’(nil "nmos3" nil)
’(nil "nmos4" nil)))
ciRegisterDevice("pfet"
’((nil "pmos" nil)
’(nil "pmos1v" nil)
’(nil "pmos1v_hvt" nil)
’(nil "pmos2v" nil)
’(nil "pmos3" nil)
’(nil "pmos4" nil)))
ciGetDeviceTermName
ciGetDeviceTermName(d_deviceId t_termName) =>t_deviceTermName/nil
Description
Returns the terminal name of a device based on the device database ID and the user-defined parameter termName.
Arguments
|
User-defined parameter mapped to the terminal names of the PDK using ciMapTerm. |
Value Returned
Example
For example (see also ciMapTerm):
gate, myGate , and myFETGate are all user-defined names and g is the terminal name.-
If you map
ciMapTerm("gate" ’("g"))
Then you should useciGetDeviceTermName(device "gate")in the matching expression.
[ciGetDeviceTermName(device "gate")will return"g" -
If you map
ciMapTerm("myGate" ’("g"))
Then you should useciGetDeviceTermName(device "myGate")in the matching expression.
[ciGetDeviceTermName(device "myGate")will return"g"] -
If you map
ciMapTerm("myFETGate" ’("g"))
Then you should useciGetDeviceTermName(device "myFETGate")in the matching expression
[ciGetDeviceTermName(device "myFETGate")will return"g" ]
For pre-defined structures such as MOS Differential Pairs and MOS Inverters, ciGetDeviceTermName uses gate, source, and drain as the defaults for gate, source, and drain terminal names respectively. This will work successfully on Cadence PDK as the Cadence PDK fet device also has gate, source, and drain as the default terminal names.
Internally then, all pre-defined structures, like differential pairs and MOS invertors, perform a:
ciGetDeviceTermName(device "gate") which returns "G" by default
ciGetDeviceTermName(device "source") which returns "S" by default
ciGetDeviceTermName(device "drain") which returns "D" by default
For these structures to work on a user PDK, map:
ciMapTerm("gate" '("g") ) then ciGetDeviceTermName(device "gate") will return "g".
With “gate” as the gate terminal name, the structures differential pair and MOS inverter will work correctly because “gate” is the gate fet terminal in the user PDK. Also, as the structures do not have anything in the matching expression (this defaults to t), there is nothing extra for to be performed here.
ciGetFinder
ciGetFinder(t_finderName) =>l_finderAtributes/nil
Description
Returns a disembodied property list (DPL) of attributes associated with the specified finder. This DPL is the same that was used to register the finder using ciRegisterFinder.
Arguments
|
The name of the finder for which attributes need to be retrieved. |
Value Returned
Example
ciGetFinder("Negative Supply")
The command for example might return the following:
(nil name "Negative Supply" description "Creates a group for each negative supply net"
iterator "Net Iterator" expression "ciIsNet(net \"ground\")" defaultCGen
"Negative Supply Route Priority" legalCGens nil
)
ciGetFirstDeviceTermName
ciGetFirstDeviceTermName(d_deviceID l_termNames) =>s_termName/nil
Description
Returns the first terminal name on the specified device that matches one of the terminal names specified in the termNames list.
Arguments
Value Returned
Example
ciGetFirstDeviceTermName(myMOS list("gate" "base"))
"gate"
ciGetFirstDeviceTermName(myBJT list("gate" "base"))
"base"
ciGetFluidGuardRingDeviceEnum
ciGetFluidGuardRingDeviceEnum(
)
=> t_fluidGuardRingDeviceString
Description
Returns a space delimited string of the fluid guard ring devices in the technology file. This string can be used to define an enum for constraint generators that require fluid guard ring device selection. Also, see ciSetStructArgs and ciRegisterConstraintGenerator.
Arguments
Value Returned
|
A space delimited string of the fluid guard ring devices in the technology file. |
|
Example
Get the fluid guard ring device names from the current technology file:
ciGetFluidGuardRingDeviceEnum() => "nring pring"
Then, register a constraint generator that has a fluid guard ring argument initialized to the names of the fluid guard ring devices in the current technology file:
ciSetStructArgs('MyGenerator
list(
list("Num Rows" 'int 1)
list("Add Guard Ring" 'bool nil)
list("Fluid Guard Ring Device" 'enum "ciGetFluidGuardRingDeviceEnum()")
)
)
ciGetGenerator
ciGetGenerator(t_generatorName) =>l_generatorAtributes/nil
Description
Returns a disembodied property list (DPL) of attributes associated to the specified constraint generator. This DPL is the same that was used to register the constraint generator using ciRegisterConstraintGenerator.
Arguments
|
The name of the constraint generator for which attributes need to be retrieved. |
Value Returned
Example
ciGetGenerator("Test Generator")
The command for example might return the following:
(nil name "Test Generator" description "Ask for Matching Variants"
expression "ciRunMatchingConstraintsGenerator(args insts cache)"
addToToolbar t iconName
"templateMatched" args (
("enumparam" enum "low" "medium" "high")
("intparam" int 1 hide)
("floatparam" float 0.2)
("boolparam" bool t)
("stringparam" string "asd" callback "callbackExpr")
)
menu "Rapid Analog Prototype"
forcePopup t
precondition "!ciWithinConstraint('modgen cache ciGetMembersOfType(instsNetsPins 'inst))"
callback "CbkExpr" useCGenForEdit t title "title"
size (100 100) templateName "MOS_Cascode" settings
(nil widgetPropertiesEnabled t))
ciGetIterator
ciGetIterator(t_iteratorName) =>l_iteratorAtributes/nil
Description
Returns a disembodied property list (DPL) of attributes associated to the specified iterator. This DPL is the same that was used to register the iterator using ciRegisterIterator.
Arguments
|
The name of the iterator for which attributes needs to be retrieved. |
Value Returned
Example
ciGetIterator("Same Cell Iterator")
The command for example might return the following:
(nil name "Same Cell Iterator" description "Iterate over all devices with same cell name. \nVariable \"device\" can be used in matchExpr" iteratorFnName "ciSameCellIterator" supportsFlattenedHier t)
ciGetLAMComponentTypes
ciGetLAMComponentTypes(d_cv t_pdkLibName[?suppressReadg_suppressRead] ) =>l_componentTypes
Description
Returns a list of the device, terminal, and parameter mappings specified in a cph.lam file associated with a particular PDK. This SKILL function can be used in conjunction with the ciCPRegistrationFromLAM SKILL function to create the device, terminal, and parameter registrations needed for the Circuit Prospector finders, iterators, and generators to function with the selected PDK.
Arguments
|
A Boolean value that defaults to |
Value Returned
Example
gpdk045_compTypes = ciGetLAMComponentTypes(geGetEditCellView() "gpdk045")
(nil libName "gpdk045" devices (
("nfet"
("nmos1v" "nmos1v_3")
)
("pfet"
("pmos1v" "pmos1v_3")
)
)
terminals nil parameters (
("fingerWidth"
("fw")
)
("lxActiveLayer"
("Oxide drawing")
)
("lxMaxWidth"
("1e-06")
)
)
)
info(ciCPRegistrationFromLAM(gpdk045_compTypes ?addNewLines t))
ciRegisterDevice("nfet" append(ciGetDeviceNames("nfet") '(
("gpdk045" "nmos1v" nil)
("gpdk045" "nmos1v_3" nil)
)))
ciRegisterDevice("pfet" append(ciGetDeviceNames("pfet") '(
("gpdk045" "pmos1v" nil)
("gpdk045" "pmos1v_3" nil)
)))
ciRegisterDevice("fet" append(ciGetDeviceNames("fet") '(
("gpdk045" "nmos1v" nil)
("gpdk045" "nmos1v_3" nil)
)))
ciRegisterDevice("fet" append(ciGetDeviceNames("fet") '(
("gpdk045" "pmos1v" nil)
("gpdk045" "pmos1v_3" nil)
)))
ciMapParam("fingerWidth" append(ciGetParamMapping("fingerWidth") '("fw")))
ciMapParam("lxActiveLayer" append(ciGetParamMapping("lxActiveLayer") '("Oxide drawing")))
ciMapParam("lxMaxWidth" append(ciGetParamMapping("lxMaxWidth") '("1e-06")))
ciGetMappedDeviceNames
ciGetMappedDeviceNames(
)
=> l_regdDevices / nil
Description
Returns all default device names (fet, nfet, pfet, and BJT) that have been registered using .
Arguments
Value Returned
Example
ciGetMappedDeviceNames() ((mapName ((nil "pfinFET" nil)) name "pfin" ) (mapName ((nil "nfinFET" nil)) name "nfin" )
)
ciGetNetNames
ciGetNetNames(t_netType) => (l_netNames|l_regexs|l_predicates) /nil
Description
Retrieves the net names, regular expressions and predicates that make up a net type.
Arguments
Value Returned
Example
;; Register net names, regular expressions and predicate.
ciRegisterNetNames("Power" '("vcc"))
ciRegisterNetRegexs("Power" '("[vV][dD][dD]"))
ciRegisterNetPredicate("Power" 'ciSigTypeMatchesNetType)
;; Retrieve them all in one go.
ciGetNetNames("Power") ; (("vcc") ("[vV][dD][dD]") ciSigTypeMatchesNetType)
ciGetNetSubTypes
ciGetNetSubTypes(t_superType) =>l_subTypes/nil
Description
Retrieves the sub-types contained in a net super-type.
Arguments
Value Returned
|
If t_superType is a super-type name, it returns the list of sub-type names registered for this super-type. |
|
Example
ciRegisterNetSuperType("Supply" '("Power" "Ground"))
ciGetNetSubTypes("Supply") ; returns ("Power" "Ground")
Returns the sub-type names, Power and Ground registered for super-type, Supply.
ciGetNetSuperTypes
ciGetNetSuperTypes()
=> l_superTypes
Description
Returns the list of registered net super-types.
Arguments
Value Returned
Example
;; Register some super-types.
ciRegisterNetSuperType("Priority" '("High" "Low"))
ciRegisterNetSuperType("Supply" '("Power" "Ground"))
;; Retrieve all super-types.
ciGetNetSuperTypes() ; ("Priority" "Supply")
Returns the super-type names, Priority and Supply.
ciGetParamMapping
ciGetParamMapping(t_paramName) =>l_paramNames/nil
Description
Returns all the parameters mapped for a given parameter name.
Arguments
Value Returned
Example
If, for example, "fetlength" is mapped as:
ciMapParam("fetlength" ’("l","len","length"))
Entering ciGetParamMapping("fetlength") will return:
("l" "len" "length")
ciGetParamName
ciGetParamName(d_deviceId t_paramPlaceholderName) =>paramName/nil
Description
Returns the parameter name of the user-defined parameter that is mapped to the given parameter placeholder name.
Arguments
|
The placeholder name used to map the parameter name. This is the user-defined parameter that was used in the PDK which was mapped to the placeholder name by ciMapParam. |
Value Returned
|
Command failed. Either no parameter was mapped or the mapped parameter is not set for the device. |
Example
If a mapping for fetLength exists:
ciMapParam(“fetLength” ‘(“l”))
device=car(geGetSelSet())
ciGetParamName(device “fetLength”)
will return “l” as the name of the parameter mapped to the placeholder name of “l”.
ciGetParamValue
ciGetParamValue(d_deviceId t_parameterPlaceholderName[?patht_path] [?convertNumberStringsg_convertNumberStrings] ) =>paramValue/nil
Description
Returns the parameter value for the user-defined parameter that is mapped to the given parameter placeholder name.
Arguments
|
The placeholder name that is used to map the parameter name The user-defined parameter, that is used in the PDK, was mapped to the placeholder name by ciMapParam. |
|
|
Optional instance path to allow |
|
|
Optional flag to control whether number strings should be converted to numbers to allow number comparison rather than string comparison. For example, this allows |
|
Value Returned
Example
If a mapping for the placeholder “fetlength” has been set by:
ciMapParam("fetLength" '("l"))
and the device is defined using the following from the cellview:
device=car(geGetSelSet())
Then, the following will return the value of the parameter “l” mapped to the “fetlength” placeholder and set for the device:
ciGetParamValue(device "fetlength")
"340.0n" ==> returns the fetlength for that device
ciGetParamValue(device "fetLength" ?convertNumberStrings t)
3.4e-07 ==> returns the fetlength for that device
ciGetParamValueOrDefault
ciGetParamValueOrDefault(d_obj t_paramName g_defValue[?warnUnmappedg_warnUnmapped] [?warnUnfoundg_warnUnfound] [?aelEnvg_aelEnv] ) =>d_paramVal
Description
Retrieves the value of the named parameter on the passed database object. The parameter name should have been registered ciMapParam. If the parameter is not found then the default value will be returned.
Arguments
|
The database ID of the object to retrieve the parameter from. |
|
|
The default value to be returned if the parameter is not found. |
|
|
Displays a warning message if the parameter is not mapped using ciMapParam. Default: |
|
|
Displays a warning message if the parameter is not found on the database object. Default: |
|
|
If specified, use the |
Value Returned
|
Returns the parameter value or defValue if the parameter is not found. |
Examples
ciGetParamValueOrDefault(inst "mFactor" 1)
=> 2 ;;; parameter found
ciGetParamValueOrDefault(inst "XXX" 33.3)
=> 33.3 ;;; parameter not found.
ciGetParamValues
ciGetParamValues(d_deviceId l_parameterNames[?patht_path] [?asDPLg_asDPL] ) =>l_paramValues/nil
Description
Returns the values of the specified parameters for the specified device. By default, the values are returned as a disembodied property list (DPL), but can also be returned as a simple list.
See also ciMapParam for specifying PDK independent device parameter name mappings.
Arguments
|
A list of the parameter names for which values need to be retrieved. The parameter names should be those that have been registered using the ciMapParam SKILL command. |
|
|
Specifies the hierarchical instance path to the device to allow the |
|
|
Determines whether the parameter values should be returned as a DPL or simple list. This is an optional argument. Default: |
Value Returned
|
Returns either a DPL or a simple list containing the requested parameter values. |
|
Examples
-
Returns a DPL of values of the
mFactor,length, andwidthparameters fordev2:IresDPL = ciGetParamValues(dev2 '("mFactor" "length" "width"))
(nil mFactor "1" length "180.0n" width "2u")
resDPL->mFactor
"1"
-
Returns a simple list of values of the
mFactor,length, andwidthparameters fordev3that is on the instance path/I1/I2:resL = ciGetParamValues(dev3 '("mFactor" "length" "width") ?asDPL nil ?path “/I1/I2”)
("1" "180.0n" "3u")
car(resL)
"1"
ciGetStructure
ciGetStructure(t_structureName) =>l_structureAtributes/nil
Description
Returns a disembodied property list (DPL) of attributes associated to the specified structure. This DPL is the same that was used to register the structure using ciRegisterStructure.
Arguments
|
The name of the structure for which attributes needs to be retrieved. |
Value Returned
Example
ciGetStructure("Test Structure")
The command for example might return the following:
(nil name "Test Structure" type "t1"
description "description" matchExpr "matchExpr" finder
"Negative Supply" nets (
(nil name "net1" expr "netExpr")
) insts (
(nil instId 1 expr "instExpr")
(nil instName "123" expr "expr1"
terms
((nil name "t1" expr "e1"
net "n1" repeatType "r1" repeatConn
"rn"
)
) repeatable "repInsts"
)
)
pins (
(nil name "pinName" net "pinNet")
) constraints (
(nil name "con1" type "symmetry"
params
((nil name "p1" val 1
type "numType"
)
) members
((nil name "n1" type "n1"
index 1 params
((nil name "mp2" val "mpVal"
type "string"
)
)
)
)
)
)
)
ciGetTechFile
ciGetTechFile()
=> d_techFile
Description
Retrieves the technology file for the current window.
Arguments
Value Returned
Example
tf = ciGetTechFile()
tf~>libName
"gpdk045"
ciGetTechMPPNames
ciGetTechMPPNames() =>l_mppNames/nil
Description
Returns a list of the MPP names for the current technology file. The MPP names are used in the creation of guard rings.
Arguments
Value Returned
Example
ciGetTechMPPNames()
=> ("N-Tap" "P-Tap")
ciGetTermNames
ciGetTermNames(t_termName) =>terminalNames
Description
Returns all the terminal names mapped to the user-defined parameter, termName.
Arguments
Value Returned
Example
If the terminal name mapping is set as:
ciMapTerm(“myGate” “G”)
ciGetTermNames(“myGate”)
will return "G" as the mapped terminal name.
ciGuardRingForCluster
ciGuardRingForCluster(u_cache l_instances[?mppNamet_mppName] ) =>l_guardRing/nil
Description
Used by the Circuit Prospector assistant as a generator to set a Guard Ring constraint to an existing Cluster constraint.
The Guard Ring constraint is created only if the name of the net can be found.
The name of the net for the guard ring is determined by the net connected to the bulk terminal of the first instance of the given list of instances.
bulk terminal must be registered with the ciMapTerm function, while an implicit bulk terminal can be registered with the ciMapParam function.Arguments
|
Constraint |
|
|
List of members of the same Cluster constraint that are selected in the Circuit Prospector assistant’s browser. |
|
|
Optional argument. Name of a multipart path (MPP) template to be used by the guard ring. By default, the name of the MPP is the first one defined in the technology file. |
Value Returned
|
A list made of the constraint ID for the new Guard Ring constraint when it is created. |
|
Example
If NM1 and NM2 are the names of two instances that are members of an existing Cluster constraint, the following functions creates a Guard Ring and the member of that new Guard Ring is the Cluster constraint for NM1 and NM2:
cache = ciCacheGet(geGetEditCellView()
ciGuardRingForCluster(cache list( list(“/NM1” inst) list(“/NM2” inst)))
ciGuardRingForModgen
ciGuardRingForModgen(u_cache l_instances[?mppNamet_mppName] ) =>l_guardRing/nil
Description
Used by the Circuit Prospector assistant as a generator to set a Guard Ring constraint to an existing Modgen constraint.
The Guard Ring constraint is created only if the name of the net can be found.
The name of the net for the guard ring is determined by the net connected to the bulk terminal of the first instance of the given list of instances.
bulk terminal must be registered with the ciMapTerm function, while an implicit bulk terminal can be registered with the ciMapParam function.Arguments
|
Constraint |
|
|
List of members of the same Modgen constraint that are selected in the Circuit Prospector assistant’s browser. |
|
|
Optional argument. Name of a multipart path (MPP) template to be used by the guard ring. By default, the name of the MPP is the first one defined in the technology file. |
Value Returned
|
A list made of the constraint ID for the new Guard Ring constraint when it is created. |
|
Example
If NM1 and NM2 are the names of two instances that are members of an existing Modgen constraint, the following functions creates a Guard Ring and the member of that new Guard Ring is the Modgen constraint for NM1 and NM2:
cache = ciCacheGet(geGetEditCellView()
ciGuardRingForModgen(cache list( list(“/NM1” inst) list(“/NM2” inst)))
ciHaveSameParamValues
ciHaveSameParamValues(l_devices l_paramNames[?patht_path] ) =>t/nil
Description
Returns t if the specified parameters have the same values on all the passed devices. The parameter names should be the PDK independent parameter names specified using the ciMapParam SKILL command.
Arguments
|
A list of the required parameter names that are the same as registered using the ciMapParam SKILL command. |
|
|
Specifies the hierarchical instance path required for the evaluation of the |
Value Returned
|
All the required parameter values match on all of the listed devices. |
|
|
Some parameter values do not match on some of the listed devices. |
Examples
Assume the ciGetParamValues SKILL command returns the following values of the mFactor, length, and width parameters for dev1, dev2, and dev3:
ciGetParamValues(dev1 '("mFactor" "length" "width"))=> (nil mFactor "1" length "180.0n" width "2u")
ciGetParamValues(dev2 '("mFactor" "length" "width"))=> (nil mFactor "1" length "180.0n" width "2u")
ciGetParamValues(dev3 '("mFactor" "length" "width"))=> (nil mFactor "4" length "180.0n" width "2u")
Based on the values returned above, the results of the ciHaveSameParamValue SKILL command vary as following for dev1, dev2, and dev3:
ciHaveSameParamValues(list(dev1 dev2) '("mFactor" "length" "width")) => t
ciHaveSameParamValues(list(dev1 dev2 dev3) '("mFactor" "length" "width") ?path “/I1/I2”) => nil
ciHierarchicalSeriesIterator
ciHierarchicalSeriesIterator(d_cellviewID t_matchExpression) =>l_devices
Description
Returns a list of corresponding devices that match the series structures in the cellview. If the finder match net expression evaluates to nil, the structures are ignored.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
finder = ciGetFinder("APR Active Same Cell Stacked Device Iterator")
insts = ciHierarchicalSeriesIterator(geGetEditCellView() finder->expression) ("/I1" "/I2")
ciIgnoreDevice
ciIgnoreDevice(d_device) =>t/nil
Description
This is a utility function that can be used in finder or constraint generator expressions. It returns t if the passed device should be ignored.
For example, device->master->nlAction == "ignore" or device->lvsIgnore == "TRUE".
Arguments
|
The device to be checked. This is the |
Value Returned
Examples
dev1->master->nlAction
=> nil
ciIgnoreDevice(dev1)
=>nil
dev1->master->nlAction = "ignore"
ciIgnoreDevice(dev1)
=> t
ciInstGetSplitFingers
ciInstGetSplitFingers(u_cache t_instancePath) =>g_split
Description
Returns a Boolean value to identify whether the specified instance has been set to use Split Fingers. It can be used by a constraint generator to control how the layout is generated for its member instances.
Arguments
Value Returned
|
Returns |
Example
Check if an instance will use Split Fingers:
ciInstSetSplitFingers(ciGetCellView() "M4" t)
ciInstGetSplitFingers(ciGetCellView() "M4")
=> t
Confirm Split Fingers has not been set for an instance:
ciInstSetSplitFingers(ciGetCellView() "M4" nil)
ciInstGetSplitFingers(ciGetCellView() "M4")
=> nil
ciInstIterator
ciInstIterator(d_cellview t_matchExpr[l_hierCellViews] ) =>list/nil
Description
Used by Circuit Prospector finders to iterate over all design instances, collating them into groups based on the result of evaluating the passed (match) expression.
The ciInstIterator function evaluates the match expression with the current design instance that is assigned to a local variable named device. The device instance can then be referenced in the matchExpr (as shown in the example below).
Arguments
|
The cellview containing the design instances to be iterated over. |
|
|
Optional argument that can contain a list of cellview IDs and their occurrence paths. If set, this then allows the iterator to iterate over all instances in the hierarchy in one run. This is required for when a finder is run on a flattended hierarchy (see Run finder...). |
Value Returned
list( list( inst1 inst2 inst3 ...) ) |
|
Example
finderDevExpr = “ciIsDevice(device ”fet”)”
fetGroups = ciInstIterator(cv finderDevExpr)
print(fetGroups~>name)
(“fet1” “fet2” “fet3”)
Example using hierCellViews argument:
fetGroups = ciInstIterator(cv finderDevExpr list( list( nil `hierPath “” `cellview cellview) ))
ciInstListSplitFingers
ciInstListSplitFingers(u_cache) =>l_instancePaths
Description
Returns the names of the instances that use Split Fingers. It can be used by a constraint generator to control how the layout is generated for its member instances.
Arguments
Value Returned
Example
Get a list of instances that use Split Fingers:
ciInstListSplitFingers(ciGetCellView())
=> ("M4" "I2/M4")
Stop using Split Fingers for all currently registered instances:
cache = ciGetCellView()
mapcar( lambda( (instname) ciInstSetSplitFingers(cache instname nil) )
ciInstListSplitFingers(cache))
ciInstSetSplitFingers
ciInstSetSplitFingers(u_cache t_instancePath g_split) =>t/nil
Description
Specifies whether an instance uses Split Fingers, that is, a separate instance per finger in layout. It can be used by a constraint generator to control how the layout is generated for its member instances.
Arguments
|
Specify |
Value Returned
Example
Use Split Fingers for instance M4 in the current cellview or a lower-level cellview I2/M4:
ciInstSetSplitFingers(ciGetCellView() "M4" t)
ciInstSetSplitFingers(ciGetCellView() "I2/M4" t)
Stop using Split Fingers for an instance:
ciInstSetSplitFingers(ciGetCellView() "M4" nil)
ciInstSetSplitFingers(ciGetCellView() "I2/M4" nil)
ciInstsNetsPinsFromSelSet
ciInstsNetsPinsFromSelSet(
)
=> l_selectedObjList / nil
Description
Returns a list of instances, nets, pins, or instTerms (InstsNetsPins) for the current selection.
Arguments
Value Returned
|
Lists of instances, nets, pins, or instTerms for the current selection. |
|
|
No instances, nets, pins, or instTerms were found for the current selection. |
Example
With an instance, net, pin, and instTerm selected, call
ciInstsNetsPinsFromSelSet()
Returns a list similar to the following:
(("C4:G" instTerm) ("C4" inst) ("SIDDQ:P__13" pin) ("bias1" net)
)
ciInstTermIterator
ciInstTermIterator(d_cellview t_finderInstTermExpr) =>l_instList/nil
Description
Used by the Circuit Prospector to iterate over all design instance terminals in the passed cellview. Instance terminals (instTerms) are grouped together based on the result of evaluating the passed expression (finderInstTermExpr).
-
All
instTermsthat have the samefinderInstTermExprresult are grouped together. -
If the
finderInstTermExprevaluates tonil, then theinstTermis ignored.
Arguments
|
The cellview containing the design instance terminals to be iterated over. |
|
|
The |
Value Returned
list( list(d_instTerm0 .. d_instTermN) list(d_instTerm0 ..d_instTermM) ) |
|
Example
To return groups of instTerms connected to the same net:
ciInstTermIterator(cv "term->net")
ciIsDevice
ciIsDevice(d_deviceId t_deviceName) =>t/nil
Description
Checks whether a device belongs to a particular device type.
The ciIsDevice command can also search for a device based on its cellName. This smart search is only performed when the device for a particular type is not registered.
For example, if nfet is not registered, then ciIsDevice(device nfet) will check if device=>cellName has a nmos in its cellName.
Arguments
|
The device to be checked. This is the |
|
|
The device type to be checked against. This is a device type that has been registered using ciRegisterDevice. |
Value Returned
Example
If, for example, fet is registered as:
ciRegisterDevice("fet"
’((nil "nmos" nil)
’(nil "pmos" nil)
’(nil "nmos3" nil)
’(nil "pmos3" nil)
’(nil "nmos4" nil)
’(nil "pmos4" nil)))
And device is set, for example, as:
device=car(geGetSelSet())
ciIsDevice(device "fet")
returns t if device is of type "fet", else nil.
ciIsNet
ciIsNet(d_netId t_netType[?regexIgnoreBundlesg_regexIgnoreBundles] ) =>t/nil
Description
Checks whether a particular netId belongs to a particular netType.
Arguments
|
The net to be checked. This is the |
|
|
The net type to be checked against. This is a net type that has been registered using ciRegisterNet. |
|
|
Optional Boolean argument that defaults to |
|
Value Returned
Example
If, for example, "supply" type nets are registered as:
ciRegisterNet("supply" ’("vcc" "vdd" "vss"))
myNet=car(geGetSelSet())~>net
Then, the following statement will return t if myNet is of type "supply", else nil:
ciIsNet(myNet "supply")
ciListAllCategoryNames
ciListAllCategoryNames( [g_includeSeparator] [g_listDisabled] ) =>l_categoryNames
Description
Lists all the categories in Circuit Prospector that have been registered by using ciRegisterAssistant. By default, it only lists the enabled assistants.
Arguments
Value Returned
Example
-
Returns only the enabled categories:
ciListAllCategoryNames()
("Rapid Analog Prototype" "Structures" "Devices" "Nets" "Pins" "Inst Terms")
-
Returns both enabled and disabled categories including separators:
ciListAllCategoryNames(t t)
("Rapid Analog Prototype" "Structures" "Devices" "Nets" "Pins"
"Inst Terms" nil "Properties" nil "Electrical Constraints"
"Placement Constraints" "Routing Constraints" nil "Clusters"
"Matched Parameters" "Modgens" "Orientations" "Symmetries")
ciListAllFinderNames
ciListAllFinderNames()
=> l_finderNames
Description
Lists all the finders in Circuit Prospector that have been registered by using ciRegisterFinder.
Arguments
Value Returned
Example
ciListAllFinderNames()
("Active Same Cell" "Active Same Cell and Size" "Active Same Cell and Finger
Width" "Active Same Cell and Common Gate" "Active Same Cell and Common Bulk"
"Active Common Gate" "Active Same Cell, Common Gate and Bulk" "Passive Same
Cell" "Passive Same Cell and Size" "Supply Nets" "Non-Supply Nets" "Symmetric
Nets" "Bus and Bundle" "Registered (sigType)" "Same sigType (none)"
"Pins (Symmetry By Connectivity)" "Top Pins (Alignment)" "Bottom Pins
(Alignment)" "Left Pins (Alignment)" "Right Pins (Alignment)" "Supply Pins
(Alignment)" "Input Pins (Alignment)" "Output Pins (Alignment)" "InstTerms by
Instance" "InstTerms by Name" "InstTerms by Net" "Registered Nets (sigType)"
"Same sigType Nets (none)" "fets (variantInfo)" "Same variantInfo Devices"
"pfets (placerControlledWell)" "Same placerControlledWell Devices"
"Symmetric Pairs (Correlation)" "Same Cell,Size,Bulk Devices (Matched
Parameters)" "Common Bulk (Cluster)" "Digital Cells (Cluster)"
"Same Cell,Size,Bulk Devices (Modgen)" "Clusters (Cluster Boundary)"
"Clusters (Guard Ring)" "Modgens (Guard Ring)" "Same Device Type (Orientation)"
"Modgens (Orientation)" "Inverters (Alignment)" "Inverters (Distance)"
"Supply Nets (Net Priority)" "Bus Bits" "Instances (Symmetry By Pre-selection)"
"Instances (Symmetry By Connectivity)" "Nets (Symmetry By Connectivity)"
"Symmetric Pairs (Matched Parameters)" "Same Cell,Finger Width MOS (Matched
Parameters)" "Current Mirror (Matched Parameters)" "Same Cell and Size
(Cluster)" "Same Cell,Finger Width MOS (Cluster)" "Digital Cells (Modgen)"
"Orientation as in Schematic" "MOS Current Mirror" "MOS Cascoded Current
Mirror" "MOS Cascoded Current Mirror2" "MOS Cascode"
"MOS Transmission Gate" "MOS Differential Pair" "MOS Differential Pair - Cross
Coupled" "MOS Common Gate" "MOS Parallel" "MOS Active Load" "MOS Inverter"
"Symmetric Instance Pairs - By Pre-selection" "Symmetric Instance Pairs - By
Connectivity" "Self Symmetric Instances - By Connectivity" "Placement Path"
"Passive Arrays" "Active Same Cell large mfactor" "Capacitor Cluster" "Vertical
Orientation" "Negative Supply" "Positive Supply" "Enforce Precedence"
)
ciListAllGeneratorNames
ciListAllGeneratorNames()
=> l_generatorNames
Description
Lists all the constraint generators in Circuit Prospector that have been registered by using ciRegisterConstraintGenerator.
Arguments
Value Returned
Example
Returns all the constraint generator names:
ciListAllGeneratorNames()
("Matched Parameters" "Matched Size" "Symmetry" "vSymmetry" "hSymmetry"
"Alignment" "Orientation" "Module" "Same Cell Name - Group + Relative Orientation"
"Common Gate - Group + Relative Orientation" "Same Well - Group + Relative
Orientation" "Module + Matched Parameters" "Group + Relative Orientation + Vertical
Alignment" "Group + Relative Orientation + Horizontal Alignment" "Group + Relative
Orientation + Matched Parameters" "Symmetry + Matched" "Matched + Distance"
"Matched + Symmetry + Distance" "Group" "Supply Route Priority" "Non Supply Route
Priority" "Matching (strength)" "Common Centroid" "Inst Symmetry" "Net Symmetry"
"Same Orientation" "Orientation per Device Type" "Bus for Nets" "Bus for Signal
Bits" "sigType for registered nets" "None" "Alignment for Right Pins" "Alignment
for Bottom Pins" "Alignment for Left Pins" "Alignment for Top Pins" "variantInfo
for FETs" "placerControlledWell" "Correlation" "Matched Parameters for Same Cell
Size and Bulk" "Cluster for Devices with common bulk" "Cluster for Standard Cells"
"Modgen for Same Cell Size and Bulk" "Cluster Boundary for Cluster" "Guard Ring for
cluster" "Guard Ring for modgen" "Orientation for modgen" "Alignment for Inverters"
"Distance for Inverters" "Symmetry for Pins" "Symmetry for Nets" "Symmetry for
Instance" "MatchedParameters for Symmetric Instances" "Matched Parameters for
Current Mirror" "Cluster for Devices with same name and size" "Cluster for Devices
with same finger width" "Modgen for Standard Cells" "Distance + Matched Orientation
+ Vertical Alignment" "Common Bulk - Group + Matching Orientation" "Matched
Parameters for Same Finger Width" "Placement Path" "Module (Cascode MOS
Transistors)" "Module (Cascoded Current Mirror)" "Module (Current Mirror)" "Module
(Diff Pair)" "Module (Passive Device Array)" "Module (Large mfactor)" "Symmetry
(default axis)" "Orientation Vertical" "Negative Supply Route Priority" "Positive
Supply Route Priority" "Enforce Modgen Symmetry Precedence" "GenericModgen" "MOS
Active Load - Matched + Symmetry + Distance")
ciListAllIteratorNames
ciListAllIteratorNames()
=> l_iteratorNames
Description
Lists all the iterators in Circuit Prospector that have been registered by using ciRegisterIterator.
Arguments
Value Returned
Example
Returns all the iterator names:
ciListAllIteratorNames()
("Same Cell Iterator" "Pin Iterator" "Net Iterator" "Instance Iterator" "InstTerm
Iterator" "XY Symmetric Iterator" "XY Net Symmetric Iterator" "MOS Current Mirror
Iterator" "MOS Cascoded Current Mirror Iterator" "MOS Cascoded Current Mirror
Iterator2" "MOS Cascode Iterator" "MOS Transmission Gate Iterator" "MOS
Differential Pair Iterator" "MOS Differential Pair - Cross Coupled Iterator" "MOS
Common Gate Iterator" "MOS Parallel Iterator" "MOS Active Load Iterator" "MOS
Inverter Iterator" "XY Instance Symmetric Iterator" "Signal Iterator" "Bundle
Signals Iterator" "XY Pin Symmetric Iterator" "Current Path Iterator")
ciListAllStructureNames
ciListAllStructureNames(
)
=> l_structureNames
Description
Lists all the structures in Circuit Prospector that have been registered by using ciRegisterStructure.
Arguments
Value Returned
Example
Returns all the structure names:
ciListAllStructureNames()
("Test Structure")
ciListGeneratableConstraintGroups
ciListGeneratableConstraintGroups(g_ciCon t_CGDefName) =>l_groupNames
Description
The default generatable constraint group listing callback used by ciSetCMCGSKILLCallbacks when no user-defined function has been specified.
Value Returned
Example
ciMakeHierContext
ciMakeHierContext(l_currentHierInfo l_allHierInfo) =>disembodied_property_list/nil
Description
Used by Circuit Prospector iterators that are required to run on flattened hierarchies. The iterators need to define a local variable, hierContext, to be referenced by finders that use that iterator. This function is used to initialize that local variable.
Arguments
Value Returned
Example
currentHierCellViewInfo = list(nil 'hierPath geGetInstHier(getCurrentWindow() 'cellview geGetEditCellView())
hierContext = ciMakeHierContext(curentHierCellViewInfo hierCellViews)
ciMakeObjectInfo
ciMakeObjectInfo(d_object l_cvInfo) =>l_listObj
Description
A utility function for constructing a disembodied property list to be used by Circuit Prospector iterators to return hierarchical path information about the found objects.
Arguments
Value Returned
Example
ciMakeObjectInfo(object cvInfo)
list(nil 'dbId object 'hierPath "/I15/I21")
ciMapParam
ciMapParam(t_paramPlaceholderName l_paramMapNameList) =>t/nil
Description
Maps a parameter placeholder name to the parameter names used in the PDK.
See also
Arguments
Value Returned
Examples
ciMapParam("width" append(ciGetParamMapping("width") ’("w" "Width")))
ciMapParam("length" append(ciGetParamMapping("length") ’("l" "Length")))
ciMapTerm
ciMapTerm(t_termName l_termMapNameList) =>t/nil
Description
Maps the user-defined termName to the terminal names used in the PDK.
Arguments
Value Returned
Example
ciMapTerm("drain" '("d" "D" "drain" "DRAIN" "Drain"))
ciMapTerm("gate" '("g" "G" "gate" "GATE" "Gate"))
ciMapTerm("source" '("s" "S" "source" "SOURCE" "Source"))
ciMapTerm("bulk" '("S" "BULK" "well" "SUB" "B"))
ciMapTerm("collector" '("c" "C" "collector"))
ciMapTerm("base" '("b" "B" "base" "BASE" "Base"))
ciMapTerm("emitter" '("e" "E" "emitter"))
ciMapTerm("resValue" '("r"))
ciMapTerm("indValue" '("I"))
ciMapTerm("capValue" '("c"))
ciMatchedFingerWidth
ciMatchedFingerWidth(u_cache l_instances) =>nil
Description
Used by the Circuit Prospector assistant as a generator to set a Matched Parameters constraint to the selected instance members.
The parameter set for matching is the one registered as fingerWidth with the function ciMapParam.
The Matched Parameters constraint is created either when no such constraint exists for at least one member, or the new members are added to the Matched Parameters constraint when it exists for the same parameter, and for at least one member.
Arguments
|
Constraint cache in which the Matched Parameters constraint must be created. See also u_cache, |
|
|
List of instance members to be matched for the value of the parameter registered as “ |
Value Returned
Example
If “NM1” and “NM2” are the names of two instances, the following function will create a Matched Parameter constraint for the parameter that corresponds to the registered fingerWidth parameter, and the members of that new constraint are “NM1” and “NM2”:
cache = ciCacheGet(geGetEditCellView()
ciMatchedFingerWidth(cache list( list("/NM1" 'inst) list("/NM2" 'inst)))
ciMatchedParametersForCurrent_Mirror
ciMatchedParametersForCurrent_Mirror(u_cache l_instances) =>nil
Description
Used the Circuit Prospector assistant as a generator to set Matched Parameters constraints to the selected instance members.
The parameters set for matching are the ones registered as length, fingerWidth, mFactor and fingerCount with the function ciMapParam.
The ratio value for the constraints are set for the Matched Parameters constraints applied for mFactor and fingerCount.
Arguments
|
Constraint cache in which the Matched Parameters constraints must be created. See also u_cache, |
|
|
List of instance members to be matched for the value of the parameters registered as length, fingerWidth, mFactor, and fingerCount. |
Value Returned
Example
If “NM1” and “NM2” are the names of two instances, the following function creates one Matched Parameter constraint per parameter that corresponds to the registered length, fingerWidth, mFactor, and fingerCount parameters, and the members of these new constraints are “NM1” and “NM2”:
cache = ciCacheGet(geGetEditCellView()
ciMatchedParametersForCurrent_Mirror(cache list( list(“/NM1” `inst) list(“/NM2” `inst)))
ciMatchedParamsForInstanceSymmetry
ciMatchedParamsForInstanceSymmetry(u_cache l_instances) =>nil
Description
Used by the Circuit Prospector assistant as a generator to set Matched Parameters constraints to the selected pair of instance members.
The parameters set for matching are the ones registered as length, width, mFactor, fingerCount, fingerWidth, resValue, and capValue, with the function ciMapParam and when found on the first instance.
The parameters corresponding to registered parameters are grouped into the same matched parameter constraint and applied to both devices.
The Matched Parameters constraints are either created when no such constraint exists for at least one member, or the new members are added to the Matched Parameters constraint when it exists for the same parameter set, and for at least one member.
Arguments
|
Constraint cache in which the Matched Parameters constraints must be created. See also u_cache, |
|
|
List of instance members to be matched for the value of the parameters registered as length, width, mFactor, fingerCount, fingerWidth, resValue, and capValue. |
Value Returned
Example
If “NM1” and “NM2” are the names of two instances registered as “nfet”, the following function creates a Matched Parameter constraint for the pair of parameters that correspond to the registered length, width, mFactor, fingerCount, fingerWidth, resValue, and capValue parameters, and the members of these new constraints are “NM1” and “NM2”:
cache = ciCacheGet(geGetEditCellView()
ciMatchedParamsForSameSizeInstances(cache list( list(“/NM1” `inst) list(“/NM2” `inst)))
ciMatchedParamsForSameSizeInstances
ciMatchedParamsForSameSizeInstances(u_cache l_instances) =>nil
Description
Used by the Circuit Prospector assistant as a generator to set Matched Parameters constraints to the selected instance members.
The parameters set for matching are the ones registered as length, width, resValue, or capValue, with the function ciMapParam, and when found on the first instance.
-
The parameters corresponding to length and width are grouped into the same matched parameter constraint and applied to devices registered as “
nfet” or “pfet”. -
The parameter corresponding to resValue is applied to devices registered as “
passive”. -
The parameter corresponding to capValue is applied to devices registered as “
passive”.
Arguments
|
Constraint cache in which the Matched Parameters constraints must be created. See also u_cache, |
|
|
List of instance members to be matched for the value of the parameters registered as length, width, resValue, or capValue. |
Value Returned
Example
If “NM1” and “NM2” are the names of two instances registered as “nfet”, the following function creates a Matched Parameter constraint for the pair of parameters that correspond to the registered length and width parameters, and the members of these new constraints are “NM1” and “NM2”:
cache = ciCacheGet(geGetEditCellView()
ciMatchedParamsForSameSizeInstances(cache list( list(“/NM1” `inst) list(“/NM2” `inst)))
ciMergeParams
ciMergeParams(l_params l_paramsToMerge[?overwriteb_overwrite] ) =>l_mergedParams
Description
Merges two lists of constraint parameters into a single list. By default, if the parameter being merged already exists in the list of parameters, the parameter value will be overwritten with the new value. The optional overwrite parameter can be set to nil to prevent parameter value overwrites.
Arguments
|
Identify whether the parameter values should be overwritten or not. Default: |
Value Returned
|
A merged parameters list with is the result of merging |
Example
-
Merging with overwrites allowed:
ciMergeParams('(("one" 1) ("two" 2) ("three" 3)) '(("one" "ONE") ("nine" "999")))
'(
("nine" "999")
("one" "ONE")
("two" 2)
("three" 3)
)
-
Merging with overwrites not allowed:
ciMergeParams('(("one" 1) ("two" 2) ("three" 3)) '(("one" "ONE") ("nine" "999")) ?overwrite nil)
'(
("nine" "999")
("one" 1)
("two" 2)
("three" 3)
)
ciModgenForSameCellSizeAndBulk
ciModgenForSameCellSizeAndBulk(u_cache l_instances) =>l_modgen/nil
Description
Used by the Circuit Prospector assistant as a generator to create Modgen constraints on groups of devices that have the same size and bulk connection.
Arguments
|
Constraint cache where the instances can be found from their full path names (See |
|
|
List of members that have the same size and bulk connection and are also selected in the Circuit Prospector browser. |
Value Returned
|
A list made of the constraint Id for the new Modgen constraint when it is created. |
|
Example
If NM1 and NM2 are the names of two instances, that have the same size and bulk connection, the following functions create a Modgen constraint with NM1 and NM2 as members:
cache = ciCacheGet(geGetEditCellView()
modgen = ciModgenForSameCellSizeAndBulk(cache list( list("/NM1" inst)
list("/NM2" inst)))
ciMOSActiveLoadStructIterator
ciMOSActiveLoadStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS active load structures.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSActiveLoadStructIterator(cv "t")
ciMOSCascodedCurrentMirrorStructIterator
ciMOSCascodedCurrentMirrorStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS cascoded current mirror structures.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSCascodedCurrentMirrorStructIterator(cv "t")
ciMOSCascodedCurrentMirrorStructIterator2
ciMOSCascodedCurrentMirrorStructIterator2(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS cascoded current mirror structures, with at least one of the leading pairs being diode connected.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSCascodedCurrentMirrorStructIterator2(cv "t")
ciMOSCascodeIterator
ciMOSCascodeIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for MOS cascoded structures.
Arguments
|
Database ID of the cellview to which the iterator is to be applied. |
|
|
Expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
Example
cv = geGetEditCellView()
ciMOSCascodeIterator(cv "t")
ciMOSCommonGateStructIterator
ciMOSCommonGateStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS common gate structures in a design.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSCommonGateStructIterator(cv "t")
ciMOSCrossCoupledDifferentialPairStructIterator
ciMOSCrossCoupledDifferentialPairStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for a MOS cross-coupled differential pair structure in a design. A MOS cross-coupled differential pair is a pair of MOS transistors that have the GATE of one transistor connected to the DRAIN of the other. The SOURCE of both transistors are connected to each other. By default, the SOURCE of the transistors cannot be connected to a POWER SUPPLY. This behavior can be changed by setting the environment variable crossCoupleDiffPairRequireSourceNotSupply to nil. To revert to the default behavior, set the environment variable back to t.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSCrossCoupledDifferentialPairStructIterator(cv "t")
ciMOSCrossCoupledQuadStructIterator
ciMOSCrossCoupledQuadStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS cross coupled quad structures in a design.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSCrossCoupledQuadStructIterator(cv "t")
ciMOSCurrentMirrorStructIterator
ciMOSCurrentMirrorStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS current mirror structures.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSCurrentMirrorStructIterator(cv "t")
ciMOSDifferentialPairStructIterator
ciMOSDifferentialPairStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for MOS differential pair structures in a design.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSDifferentialPairStructIterator(cv "t")
ciMOSInverterStructIterator
ciMOSInverterStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS inverter structures in a design.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSInverterStructIterator(cv "t")
ciMOSParallelStructIterator
ciMOSParallelStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS parallel structures.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSParallelStructIterator(cv "t")
ciMOSTransmissionGateStructIterator
ciMOSTransmissionGateStructIterator(d_cellViewID t_matchExpression) =>l_structuredObjects
Description
Iterator for all MOS transmission gate structures.
Arguments
|
The expression to be applied by the iterator to find the required items in the given cellview. |
Value Returned
|
The list of objects that satisfy the given matched expression. |
Example
cv = geGetEditCellView()
ciMOSTransmissionGateStructIterator(cv "t")
ciNetIterator
ciNetIterator(d_cellView t_finderNetExpr) =>l_netList
Description
Used by the Circuit Prospector assistant to iterate over all design nets, collecting them together into groups based on the result of evaluating the passed expression (finderNetExpr). All nets which have the same finderNetExpr result are grouped together. If the finder match net expression evaluates to nil, then the net is ignored.
Arguments
|
Finder match expression using the variable net to be used to iterate. |
Value Returned
Example
The ciNetIterator function evaluates the finder match expression with the current design net assigned to a local variable named net. The net variable can then be referenced in the finder match expression, for example:
To group all nets according to the number of instance terminals they are connected to:
finderNetExpr = "length(net->instTerms)"
netGroups = ciNetIterator(cv finderNetExpr)
foreach(netGroup netGroups
foreach( net netGroup print(net->dbId~>name) printf("\n"))
)
"net3""net5"
"net2""net8""net7"
"net4"
ciNetNames
ciNetNames(t_netType)=>l_netNames/nil
Description
Returns the list of net names registered for t_netType.
Arguments
Value Returned
Examples
Example 1
ciRegisterNetNames("Power" '("vdd" "vcc"))
ciNetNames("Power") ; ("vdd" "vcc")
The above example returns vdd and vcc net names that are registered for the Power net type.
ciNetNames("MyType") ; nil
The above example returns nil as a list of net names not found.
Example 2
The ciNetIterator function evaluates the finder match expression with the current design net assigned to a local variable named net. The net variable can then be referenced in the finder match expression, for example:
To group all nets according to the number of instance terminals they are connected to:
finderNetExpr = "length(net->instTerms)"
netGroups = ciNetIterator(cv finderNetExpr)
foreach(netGroup netGroups
foreach( net netGroup print(net->dbId~>name) printf("\n"))
)
"net3""net5"
"net2""net8""net7"
"net4"
ciNetOnTerm
ciNetOnTerm(d_inst t_termName) =>d_net/nil
Description
Utility function used by the Circuit Prospector assistant finders to retrieve the design instance connected to a named instance terminal.
Arguments
Value Returned
Example
desNet = ciNetOnTerm(desInst “G”)
print(desNet->name)
“r4”
For extended example of use see example section for ciGetDeviceTermName.
ciNetPredicates
ciNetPredicates(t_netType) =>l_predicates/g_predicate/nil
Description
Returns the net predicates registered for t_netType.
Arguments
Value Returned
Example
;; Get a single net predicate
ciRegisterNetPredicate("Ground" 'ciSigTypeMatchesNetType)
ciNetPredicates("Ground") ; ciSigTypeMatchesNetType
;; Get several predicates from a super-type.
procedure(myPredicate1(net netType) net->name == "xxx")
procedure(myPredicate2(net netType) net->name == "yyy")
ciRegisterNetPredicate("MyType1" 'myPredicate1)
ciRegisterNetPredicate("MyType2" 'myPredicate2)
ciRegisterNetSuperType("MySuperType" '("MyType1" "MyType2"))
ciNetPredicates("MySuperType") ; (myPredicate1 myPredicate2)
ciNetRegexs
ciNetRegexs(t_netType) => l_regexs /nil
Description
Returns the list of regular expressions registered for t_netType.
Arguments
Value Returned
Example
ciRegisterNetRegexs("Power" '("[vV][dD][dD]" "[vV][cC][cC]"))
ciNetRegexs("Power") ; ("[vV][dD][dD]" "[vV][cC][cC]")
ciNetRegexs("MyType"); nil
ciNextConName
ciNextConName(g_cache t_prefix) =>t_conName
Description
Returns the next unique constraint name based on the given constraint name prefix. This function assumes that the constraints have names of the format <prefix><number>.
Arguments
Value Returned
|
Returns a unique constraint name of the format |
Example
Assume that the cache does not contain any constraints prefixed with Symm, then:
symm1 = ciConCreate(cache 'symmetry ?name ciNextConName(cache "Symm") ?members '(("NM1" inst) ("NM2" inst)))
symm2 = ciConCreate(cache 'symmetry ?name ciNextConName(cache "Symm") ?members '(("NM3" inst) ("NM4" inst)))
symm3 = ciConCreate(cache 'symmetry ?name ciNextConName(cache "Symm") ?members '(("NM5" inst) ("NM6" inst)))
symm1~>name
"Symm"
symm2~>name
"Symm1"
symm3~>name
"Symm2"
Related Functions
ciNextObjName
ciNextObjName(l_objectNames[?baseNamet_baseName] ) =>t_objName
Description
Returns the next unique object name based on the given base object name prefix and a list of existing object names. This function assumes the objects have names of the format <baseName><number>.
Arguments
Value Returned
|
Returns a unique object name of the format |
Example
Assume that there are no constraints prefixed with the base name Symm, then:
ciNextObjName(cache->constraints~>name ?baseName "Symm")
=> "Symm"
ciNextObjName(append1(cache->constraints~>name "Symm") ?baseName "Symm")
=> "Symm1"
ciNextObjName(append(cache->constraints~>name list("Symm" "Symm1")) ?baseName "Symm")
=> "Symm2"
Related Functions
ciNextTemplateName
ciNextTemplateName(g_cache t_prefix) =>t_templateName
Description
Returns the next unique template name based on the given template name prefix. This function assumes the templates have names of the format <prefix><number>.
Arguments
Value Returned
|
Returns a unique template name of the format |
Example
Assume that the cache does not contain any templates already prefixed with Match, then:
match1= ciTemplateCreate(cache "match" ?name ciNextTemplateName(cache "Match") ?members '(("PM6" inst) ("PM3" inst)) ?userParams 1)
match2= ciTemplateCreate(cache "match" ?name ciNextTemplateName(cache "Match") ?members '(("PM4" inst) ("PM5" inst)) ?userParams 2)
match3= ciTemplateCreate(cache "match" ?name ciNextTemplateName(cache "Match") ?members '(("PM1" inst) ("PM2" inst)) ?userParams 3)
match1~>name
"Match"
match2~>name
"Match1"
match3~>name
"Match2"
Related Functions
ciNumTermsEQ2
ciNumTermsEQ2(d_net) =>t/nil
Description
Utility function used by the Circuit Prospector assistant finders to check if the passed design net Id is connected to two terminals.
Arguments
Value Returned
Example
desNet = dbFindNetByName(geGetEditCellView() “r4”)
ciNumTermsEQ2(desNet)
t
ciOrientationForModgen
ciOrientationForModgen(u_cache l_instances[?restrictTot_orientation] ) =>l_orientation/nil
Description
Used by the Circuit Prospector assistant as a generator to set an Orientation constraint to an existing Modgen constraint.
Arguments
|
Constraint |
|
|
List of members of the same Modgen constraint that are selected in the Circuit Prospector assistant’s browser. |
|
|
Name of the orientation value to be set. The value can be any of the following: |
Value Returned
|
A list made of the constraint ID for the new Orientation constraint when it is created. |
|
Example
If NM1 and NM2 are the names of two instances that are members of an existing Modgen constraint, the following functions creates an Orientation constraint and the member of that new constraint is the Modgen constraint for NM1 and NM2:
cache = ciCacheGet(geGetEditCellView()
ciOrientationForModgen(cache list( list("/NM1" inst) list("/NM2" inst)))
ciParallelNetResistorArrayIterator
ciParallelNetResistorArrayIterator(d_cellview t_matchExpr) =>l_returnedInsts/nil
Description
Iterates over all resistor devices, collating them into groups of parallelly-arranged resistors that start and end on the same net. This function is used by the Parallel Net Resistor Array finder of the Circuit Prospector assistant.
Arguments
|
The cellview containing the design instances to be iterated over. |
|
Value Returned
|
A list of returned instances. For example: list(list( inst1 inst2 inst3 ...)) |
|
Example
For the Parallel Net Resistor Array finder,
matchExpr = "ciIsDevice(device \"resistor\")"
resDevices = ciParallelNetResistorArrayIterator(geGetEditCellView() matchExpr)
print(resDevices~>name
ciParallelResistorArrayIterator
ciParallelResistorArrayIterator(d_cellview t_matchExpr) =>l_returnedInsts/nil
Description
Iterates over all resistor devices, collating them into groups of parallelly-arranged resistors that are all of the same length when their m-factor and iteration are expanded. This function is used by the Parallel Resistor Array (Length) finder of the Circuit Prospector assistant.
Arguments
|
The cellview containing the design instances to be iterated over. |
|
Value Returned
|
A list of returned instances. For example: list(list( inst1 inst2 inst3 ...)) |
|
Example
For the Parallel Resistor Array (Length) finder,
matchExpr = "ciIsDevice(device \"resistor\")"
resDevices = ciParallelResistorArrayIterator(geGetEditCellView() matchExpr)
print(resDevices~>name)
ciPinIterator
ciPinIterator(d_cellView t_finderPinExpr) =>l_pinList
Description
Used by the Circuit Prospector assistant finders to iterate over all design pins, collecting them together into groups based on the result of evaluating the passed finder expression (finderPinExpr). All pins which have the same finderPinExpr result are grouped together. If the finderPinExpr evaluates to nil, then the pin is ignored.
Arguments
|
Finder expression using the pin variable to iterate and group the pins with matching results. |
Value Returned
|
Grouped pin list returned, for example: list( list( pinA1_pin pinA2_pin ...) ;;; pin group A list( pinB1_pin pinNameB2_pin ...) ;;; pin group B ... |
Example
The ciPinIterator function evaluates the finderPinExpr with the current design pin assigned to a local variable can then be referenced in the finderPinExpr, for example:
To group all pins according to their cellName:
finderPinExpr = “pin->cellName”
pinGroups = ciPinIterator(cv finderPinExpr)
pinGroup1 = car(pinGroups)
print(car(pinGroup1~>cellName))
“ipin”
print(pinGroup1~>name)
(“in1” “in2” “in3”)
ciPlacerControlledWellGeneration
ciPlacerControlledWellGeneration(u_cache l_instsNetsPins[?wellTypet_wellType] ) =>nil
Description
Used by the Circuit Prospector assistant as a generator to set a placerControlledWell property for each given instance that is registered as a pfet.
The value of the placerControlledWell property is a pair-list with the name of the net connected to the bulk terminal for the given instance, and the layer name used for the well to be created for these instances.
Arguments
|
Constraint cache where the instances can be found from their full path names (See |
|
|
List of members (instances, nets, and pins) with their full path names and type, as selected in the Circuit Prospector browser. |
|
|
Name of the layer used for the well of the given instances. By default, the name of the well layer is the layer defined with the function “ |
Value Returned
Example
If MP3 and MP4 are the names of two instances that are registered as “pfet”, with the terminal registered as “bulk” connected to “VDD”, the following functions create a placerControlledWell property for “MP3” and “MP4”, with the value of that property being ("VDD" "NWELL"):
cache = ciCacheGet(geGetEditCellView()
ciPlacerControlledWellGeneration(cache list( list(“/MP3” `inst) list(“/MP4” `inst)) ?wellType “NWELL”)
ciPrintMappedDefaultNetNames
ciPrintMappedDefaultNetNames( ) =>t/nil
Description
Returns the default net name registered with a particular terminal. Also returns details of the corresponding lib/cell/view.
Arguments
Value Returned
ciPrintMappedDeviceNames
ciPrintMappedDeviceNames( ) =>t/nil
Description
Prints all default device names (for fets, BJTs, and so on) that have been registered using ciRegisterDevice.
Arguments
Value Returned
Example
If a device has been registered as follows:
ciRegisterDevice("fet"
’(’(nil "nmos" nil)
’(nil "pmos" nil)
’(nil "nmos3" nil)
’(nil "pmos3" nil)
’(nil "nmos4" nil)
’(nil "pmos4" nil)))
ciRegisterDevice("bjt"
’(’(nil "npn" nil)
’(nil "pnp" nil)
’(nil "bjt504tnpn" nil)
’(nil "bjt504tpnp" nil)))
ciPrintMappedDeviceNames() prints device registration:
ciPrintMappedDeviceNames()
-------------------Device= "fet" -----------------------
Mapping : (’(nil "nmos" nil) ’(nil "pmos" nil) ’(nil "nmos3" nil) ’(nil "pmos3" nil) ’(nil "nmos4" nil) ’(nil "pmos4" nil))
-------------------Device= "bjt" -----------------------
Mapping : (’(nil "npn" nil) ’(nil "pnp" nil) ’(nil "bjt504tnpn" nil) ’(nil "bjt504tpnp" nil))
ciPrintMappedNetNames
ciPrintMappedNetNames( ) =>t/nil
Description
Prints all net categories registered using ciRegisterNet.
Arguments
Value Returned
Example
ciRegisterNet("supply" ’("vcc" "vdd" "vss"))
ciRegisterNet("ground" ’("gnd!" "GND!"))
ciPrintMappedNetNames
-------------------Net= "supply" -----
Mapping : ("vcc" "vdd" "vss")
-------------------Net= "ground" ----
Mapping : ("gnd!" "GND!")
ciPrintMappedParams
ciPrintMappedParams( ) =>t/nil
Description
Prints all the parameters mapped by ciMapParam.
Arguments
Value Returned
Example
If, for example, a mapping for fetLength is:
ciMapParam("fetLength" '("l"))
ciPrintMappedParams() will output the following mapping:
---------------Parameter= "fetLength" ----
Mapping : ("l")
Other default mappings for various parameters:
ciMapParam("length" ’("l"))
ciMapParam("width" ’("w"))
ciMapParam("fetlength" ’("l","len","length"))
ciMapParam("fetwidth" ’("w","wid","width"))
ciMapParam("fingerName" ’("fingers","finger","nfing","ng","fold","stripes","gates","gate","mi","mfactor","n"))
ciMapParam("wFinger" ’("wFinger","w","G_W","effW","wg","wnom","fw"))
ciMapTerm("resValue" ’("r"));
ciMapTerm("indValue" ’("I"));
ciMapTerm("capValue" ’("c"));
Here using the same API to store pwr/gnd names:
ciMapParam("pwrgnd" ’("vdd" "VDD" "vss" "VSS" "vcc" "VCC" "gnd" "GND")) ; "pwr/gnd"
ciMapParam("batt" ’("vbatt","VBATT")) ;
ciMapParam("supply" ’("gnd","gnd!","GND","GND!","vss","vss!","VSS","VSS!","vssa","vssa!","VSSA","VSSA!","vcc","vcc!","VCC","VCC!","vdd","vdd!","VDD","VDD!","vdda","vdda!","VDDA","VDDA!"))
The respective ciPrintMappedParams() outputs would be:
-------------------Parameter= "length" ----------------------
Mapping : ("l")
-------------------Parameter= "width" -----------------------
Mapping : ("w")
-------------------Parameter= "fetlength" -------------------
Mapping : ("l" "len" "length")
-------------------Parameter= "fetwidth" --------------------
Mapping : ("w" "wid" "width")
-------------------Parameter= "fingerName" ------------------
Mapping : ("fingers" "finger" "nfing" "ng" "fold" "stripes" "gates" "gate" "mi" "mfactor" "n")
-------------------Parameter= "wFinger" ---------------------
Mapping : ("wFinger" "w" "G_W" "effW" "wg" "wnom" "fw")
-------------------Parameter= "resValue" -----------------------
Mapping : ("r")
-------------------Parameter= "indValue" -----------------------
Mapping : ("I")
-------------------Parameter= "capValue" -----------------------
Mapping : ("c")
-------------------Parameter= "pwrgnd" ----------------------
Mapping : ("vdd" "VDD" "vss" "VSS" "vcc" "VCC" "gnd" "GND")
-------------------Parameter= "batt" ------------------------
Mapping : ("vbatt" "VBATT")
-------------------Parameter= "supply" ----------------------
Mapping : ("gnd" "gnd!" "GND" "GND!" "vss" "vss!" "VSS" "VSS!" "vssa" "vssa!" "VSSA" "VSSA!" "vcc" "vcc!" "VCC" "VCC!" "vdd" "vdd!" "VDD" "VDD!" "vdda" "vdda!" "VDDA" "VDDA!")
ciPrintMappedTerminals
ciPrintMappedTerminals( ) =>t/nil
Description
Prints all the parameters mapped by ciMapTerm.
Arguments
Value Returned
Example
If, for example, the mapping of terminal names is set as:
ciMapTerm("myGate" ’("gate"))
ciPrintMappedTerminals() will print a mapping of:
-----------Terminal= "myGate" ----
Mapping : ("G")
Other examples of default terminal name mappings:
ciMapTerm("drain" '("d" "D" "drain" "DRAIN" "Drain"))
ciMapTerm("gate" '("g" "G" "gate" "GATE" "Gate"))
ciMapTerm("source" '("s" "S" "source" "SOURCE" "Source"))
ciMapTerm("bulk" '("S" "BULK" "well" "SUB" "B"))
ciMapTerm("collector" '("c" "C" "collector"))
ciMapTerm("base" '("b" "B" "base" "BASE" "Base"))
ciMapTerm("emitter" '("e" "E" "emitter"))
ciMapTerm("resValue" '("r"))
ciMapTerm("indValue" '("I"))
ciMapTerm("capValue" '("c"))
The respective ciPrintMappedTerminals() outputs would be:
-------------------Terminal= "drain" ----------------------
Mapping : ("d" "drain" "DRAIN" "Drain")
-------------------Terminal= "gate" -----------------------
Mapping : ("g" "gate" "GATE" "Gate")
-------------------Terminal= "source" ---------------------
Mapping : ("s" "source" "SOURCE" "Source")
-------------------Terminal= "bulk" -----------------------
Mapping : ("B" "S" "BULK" "well" "SUB")
-------------------Terminal= "collector" ------------------
Mapping : ("c" "C" "collector")
-------------------Terminal= "base" -----------------------
Mapping : ("b" "B" "base" "BASE" "Base")
-------------------Terminal= "emitter" --------------------
Mapping : ("e" "E" "emitter")
ciRegisterAction
ciRegisterAction(l_argList) =>t/nil
Description
Registers a list of attributes associated with an action and optionally adds the action to the constraints-related context menu, the Constraint Manager assistant's Constraint Menu, or both. This function is an alias for the ciRegisterConstraintGenerator function. The purpose of this alias is to emphasize the fact that constraint generator SKILL expressions can do everything possible in SKILL and not just create constraints.
See also ciRegisterConstraintGenerator, ciGetGenerator, and ciGetAction.
Arguments
|
A list of attributes for an action.
See |
Value Returned
Example
This example registers an action, List Constraints, and adds this to the Constraint Manager assistant's Constraint Menu. The action prints out the names and/or types of the constraints in the current cellview. When selected from the Constraint Menu, a dialog box will open allowing you to choose whether the constraint types and/or names should printed out in the CIW.
configXMLstring = "<ConstraintConfig>
<ConstraintType>
<Name>List Constraints</Name>
<MinMembers>0</MinMembers>
<MaxMembers>10000000</MaxMembers>
<AllowedMemberTypes>inst</AllowedMemberTypes>
<IgnoreConstraintType>true</IgnoreConstraintType>
</ConstraintType>
</ConstraintConfig>"
loadedOK = ciLoadConfigXMLFromString(configXMLstring)
printf("Load config.xml: %L\n" loadedOK)
ciRegisterAction(
list(nil
'name "List Constraints"
'description "List the constraints in the CIW"
'expression "when(args->\"List Types\" printf(\"%L\" cache->constraints~>type)) when(args->\"List Names\" printf(\"%L\" cache->constraints~>name))"
'addToToolbar t
'iconName "listConstraints"
'args list(
list("List Types" ‘bool t)
list("List Names" ‘bool t)
);args
);list
);ciRegisterAction
ciRegisterAssistant
ciRegisterAssistant(l_disembodiedList) =>t/nil
Description
Registers a new assistant (category) with the Circuit Prospector assistant. Assistants (categories) are groups of related Circuit Prospector finders. A category may represent a set of finders for a particular device type, for example fet, or a category could represent a top down/bottom up constraints flow. Categories can be registered automatically by placing them in a .cadence/dfII/ci/categories directory located on the Cadence File Search Path. The category registration SKILL code should be placed in a file in that directory with an .il extension, for example: .cadence/dfII/ci/categories/myCategory.il.
Arguments
Value Returned
Example
ciRegisterAssistant( list(nil
'name "Active Devices"
'description "All active device finders"
'finderNames list(
"Active Same Cell Name"
"Active Same Cell Name and Size"
"Active Common Gate"
"Active Same Well"
"Active X or Y Symmetric Pairs"
)
)
)
ciRegisterConstraintGenerator
ciRegisterConstraintGenerator( list(nil'namet_name'descriptiont_description'expressiont_expression['addToToolbarg_addToToolbar] ['argsl_args] ['callbackt_callbackExpr] ['iconNamet_iconName] ['menug_menu] ['preconditiont_preconditionExpr] ['settingsl_settings] ['sizel_size] ['titlet_title] ['useCGenForEditg_useCGenForEdit] ) ) =>t/nil
Description
Registers a constraint generator with the Constraint Manager and, optionally, will make it available as an entry in the Constraint Creation toolbar drop-down list of the Constraint Manager and in the Generate Constraints list in the context-menu. The constraint generator can then be set as the default generator for a Circuit Prospector finder or used explicitly in the Constraint Manager to create constraints.
A constraint generator is a SKILL expression that, when evaluated, will create constraints. The expression is evaluated within an internal function that makes available variables for accessing the selected instances, nets, and pins (instsNetsPins) and the constraints cache. The constraint generator may optionally specify arguments which may cause a window to display when the generator is run. This is to allow you to specify values for these arguments. The values of the arguments may then determine what constraints are generated and their parameter settings. The argument values are made available to the constraint generator expression via a variable (args). The args variable being a disembodied property list and the argument values can be accessed through the argument name, for example args->strength. Argument types can be any one of the following: bool, int, float, enum, string (a single-line string), multiString (a multi-line string), pattern (a multi-line string with fixed-pitch font), orient (a multi-line string with fixed-pitch font), separator, beginExpandedOptions, or endExpandedOptions.
separator and endExpandedOptions (see the Examples section).See also ciUnregisterAssistant.
Arguments
|
A SKILL expression that when evaluated will generate constraints. The expression can refer to |
|
|
Controls whether the constraint generator is added to the Constraint Manager toolbar. |
|
|
The optional list of constraint generator arguments. Each argument should be specified in the following format:
Here, The arguments can have an optional default value that can be of the same type as the argument type or a string that evaluates to a value of that type. For example, ("IntArg1" 'int 3) ("IntArg2" 'int "2+3")
Additionally, it is possible to specify callbacks for each individual argument. The argument list specified by list( < |
|
|
A callback expression is called whenever the value of that particular argument is modified. When the callback expression is evaluated, the current values of all arguments are made available to the callback expression through an Typically, a callback expression should be a call to a function of the following format: exmplCallbackExampleArgCallback( cache argName args oldArgs instsNetsPins userEdit templateId callbackMode)
|
|
|
|
|
When
callbackMode == 'modgenTemplateCheck, args->widgetProperties will return nil. Therefore, widgetProperties cannot be updated at this point.
For an example of how to set the widget properties in the argument list, refer to the Some of these settings might not be appropriate and you can change the values in the callback as appropriate. |
|
|
The callback expression is called whenever the OK button of the dialog box is clicked. The dialog box closes only if the callback expression returns
The current values of all arguments are made available to the callback expression through an
For an example of how to write generator callbacks while defining widget properties in the argument list, refer to the |
|
|
The name of the |
|
|
An optional list of strings or a single string which will create hierarchical sub-menus attached to the top-level drop-down menu.
|
|
|
It is an optional argument that can be specified and must evaluate to
|
|
Following is an example of the precondition: procedure(precondition(checkType instsNetsPins templateId) let(((result nil)) caseq(checkType ('EnableIcon ;; no templateId is passed when performing this check ;;available results: ;; if icon should be enabled ;; then result = t ;; else result != t ) |
|
('CreateEditReplace ;; no templateId is passed when performing this check ;;available results: ;; if template should be created then result = t ;; else if template should be edited then result = 'EditIfExists ;; else if template should be replaced then result = 'ReplaceIfExists ;; else reason why the template cannot be created (existing behavior) ) ('MatchTemplate ;; This the only time when templateId could be different than nil ;; If a precondition check for 'CreateEditReplace returns either 'EditIfExists or 'ReplaceIfExists, then precondition check to find the appropriate template is ran: ;; Based on the instsNetsPins if the template with the templateId is the one that should be edited or replaced. ;; If it should, then result = t ;; else, result = nil ) ('ValidMembers result = t ;; Based on the result, the template status will be set. ;; If the generated constraint is no longer valid due to changes made in the schematic by the designer, then result = nil ;; else, result = t ) ) result ) ) |
|
|
An optional disembodied property list of settings. This argument supports the following settings:
|
|
|
An optional list of two integers specifying the default width and height of the dialog box. If this argument is not specified, the dialog box is sized according to its contents. |
|
|
An optional expression that should evaluate to string. The string will be used as the title for the dialog. If this argument is not specified, a default title is created based on the constraint generator name and the selected instances, nets, and pins. |
|
|
By default, this argument is set to |
|
Value Returned
Examples
-
Registering a constraint generator called “Matching (strength)”:
ciRegisterConstraintGenerator(
list(nil
'name "Matching (strength)"
'description "Generate various levels of Matching constraints"
'expression "MyMatchingConstraintsGenerator(args instsNetsPins cache)" ;;; expression to generate constraints
'addToToolbar t ;;; if you want to add a button to the toolbar for generator
'iconName "templateMatched" ;;; icon to use on the toolbar. templateMatched.png must exist in the icon search path
'args list( "strength" 'enum "low" "medium" "high")
'menu list( "Custom1" "Custom2")
'title "sprintf(nil \"Matching for %L\" mapcar(lambda((x) car(x)) instsNetsPins))"
'size list(100 100)
)
)
-
Setting default values for string, int, and float arguments:
ciRegisterConstraintGenerator(
list(nil
'name "My Template"
'description "My Template"
'expression "myTemplate(args instsNetsPins cache)"
'addToToolbar t
'iconName "myTemplate"
'args list(
list("myString" `string "abc")
list("myIint" `int 1234 )
list("myFloat" `float 12.34)
);args
);list
);ciRegisterConstraintGenerator
-
Generating the Current Mirror-specific modgen:
ciRegisterConstraintGenerator(
list(nil
'name "Module (Current Mirror)"
'description "Generate Modgen Constraint for a Current Mirror"
'expression "ciCreateModgen(cache instsNetsPins 'CurrentMirror args ?createModgenTemplate t)”
'addToToolbar t
'iconName "CurrentMirror"
'args "ciGetStructArgs(`CurrentMirror)"
'precondition "if(ciWithinConstraint('modgen cache ciGetMembersOfType(instsNetsPins 'inst)) then \"some or all of the devices are already contained within an existing modgen\" else t)".
)
-
Enabling manual resizing of constraint generator dialog box:
ciRegisterConstraintGenerator(list(nil
'name "MyGenericModgen"
...
'settings list(nil 'widgetPropertiesEnabled t 'resizeMode "Manual")
)
)
ciRegisterDefaultNetName
ciRegisterDefaultNetName(t_deviceCategory l_lcvNames t_terminalCategory t_termName t_defaultNetName) =>t/nil
Description
Registers a default net name for the given terminal for either: the cellview of the same category or all lib/cell/view specified.
The registration function is used by those commands that automatically create wire stubs and wire names in the Virtuoso Schematic Editor.
The command will set the wire name according to the default net name, when a wire stub exists, or is created for the given cellview and terminal.
The default net name can be defined in two ways: registered for a device category and a terminal category, or for a list of L/C/V names and a terminal name.
Arguments
Value Returned
Example
For a particular cellview and terminal name:
ciRegisterDefaultNetName('('("analogLib" "pmos" "symbol")) "B" "vdd!")
For a device category and a terminal category:
ciRegisterDefaultNetName("pfet" "bulk" "VDD")
ciRegisterDevice
ciRegisterDevice(t_deviceName l_deviceNameMapList) =>t/nil
Description
Function used by the Circuit Prospector assistant to register a list of fet, nfet, pfet, BJT and passive device names to be used by ciIsDevice.
The ciIsDevice command is used to determine if an instance is a fet, nfet, pfet, BJT, passive device, or none of these. If nil is passed to ciRegisterDevice, the user-defined list is deleted and the internal default name list for the corresponding device type is used (see also ).
All device type names starting with a lowercase letter are reserved for use by the Circuit Prospector and other Cadence functions. It is therefore recommended that you define them for the Circuit Prospector to find and operate on the correct devices.
The current list of reserved device types are:
Arguments
|
The mapping list for the named device using library, cell, and view name. An optional match expression string can also be used to register a group of devices. |
Value Returned
Example
To register fet or BJT devices you can perform the following mapping:
ciRegisterDevice("fet"
'((nil "nmos" nil)
(nil "pmos" nil)
(nil "nmos3" nil)
(nil "pmos3" nil)
(nil "nmos4" nil)
(nil "pmos4" nil)))
ciRegisterDevice("bjt"
'((nil "npn" nil)
(nil "pnp" nil)
(nil "bjt504tnpn" nil)
(nil "bjt504tpnp" nil)))
To register all pfet devices that begin with pmos*, you can perform the following mapping using the optional matched expression:
ciRegisterDevice("pfet" '((nil nil nil (nil matchExpr "rexMatchp(\"^pmos\" device->cellName)"))))
To register all nfet devices that begin with nmos*, you can perform the following mapping using the optional matched expression:
ciRegisterDevice("nfet" '((nil nil nil (nil matchExpr "rexMatchp(\"^nmos\" device->cellName)"))))
To register all fet devices as a combination of nfet and pfet devices, you can perform the following mapping:
ciRegisterDevice("fet" append(ciGetDeviceNames("nfet") ciGetDeviceNames("pfet")))
nil can be used as a wildcard entry. For example, where libName = nil, cellName = cell1, and viewName = view1, all devices with cellName “cell1” will still be categorized as “user_defined_name” irrespective of the libName.Certain user-defined names may have already been registered but you can overwrite them.
lists all the registrations:
ciPrintMappedDeviceNames()
-------------------Device= fet
Mapping : (’(nil nmos nil) ’(nil pmos nil) ’(nil nmos3 nil) ’(nil
pmos3 nil) ’(nil nmos4 nil) ’(nil pmos4 nil))
-------------------Device= bjt ---
Mapping : (’(nil npn nil) ’(nil pnp nil) ’(nil bjt504tnpn nil) ’(nil
bjt504tpnp nil))
ciRegisterDevicesForPDKCategory
ciRegisterDevicesForPDKCategory(t_libName t_categoryName t_deviceTypeName) =>l_regdDevices/nil
Description
Calls the ciRegisterDevice function to register all cells of the t_categoryName PDK category in the t_libName library as a device of type, t_deviceTypeName. In addition, the ciRegisterDevicesForPDKCategory function returns the list of devices registered because of the current action. This list does not includes the devices that were registered with the given device type name previously.
Arguments
|
The device type name of the cells located under the specified category in the specified library. |
Value Returned
|
A list of registered devices. For example, ( ("t_categoryName" "cellName1" nil) ("t_categoryName" "cellName2" nil) ("t_categoryName" "cellName3" nil) ) |
|
Example
The following function registers all cells under the category "moscap" in the library "gpdk045" as devices of type "capacitor":
ciRegisterDevicesForPDKCategory("gpdk045" "moscap" "capacitor")
If the cells successfully get registered as "capacitor", the function returns the following list:
(("gpdk045" "pmoscap2v" nil)
("gpdk045" "pmoscap1v" nil)
("gpdk045" "nmoscap2v" nil)
("gpdk045" "nmoscap1v" nil)
)
If cells have already been registered as "capacitor", the function returns nil, as shown below.
ciRegisterDevicesForPDKCategory("gpdk045" "moscap" "capacitor")
nil
ciRegisterDynamicParamDef
ciRegisterDynamicParamDef(s_consTypeName t_paramTypeName l_paramDef) =>t/nil
Description
Registers dynamic parameter definition for a constraint type.
Only a native constraint type can have a set of dynamic parameters in addition to the predefined (static) parameters defined in Virtuoso. Unlike a normal constraint parameter, a user specifies and registers a dynamic parameter definition at run time in SKILL. Dynamic parameter definitions for custom constraint types can be added by creating different definitions of the constraint using config.xml. These definitions can be dynamically loaded using the ciLoadConfigXML or ciLoadConfigXMLFromString function. However, ensure that you must not change the definition while a design is open using a different definition.
A set of dynamic parameters is predefined in Virtuoso for given constraint types, and you cannot change them. You are only allowed to specify dynamic parameter definitions using this SKILL function. A constraint type is said to be dynamic if it has at least one dynamic parameter definition. For example, a constraint type A has static parameters P1 as integer and P2 as a string. Constraint type A is allowed to have a dynamic parameter definition for parameter P3, which will be defined at run time. Then, use the following function to register the dynamic parameter definition:
ciRegisterDynamicParamDef('A "P3" '(parameter definition))
Arguments
Value Returned
Example
ciRegisterDynamicParamDef('matchedLDE "method" '("method1" "method2" "method3"))
This function defines dynamic parameter, method, for constraint Matched LDE Parameters, whose internal name is matchedLDE that can be accessed using the ciListTypes function. This is an enumeration parameter definition with the following values: "method1" "method2" "method3". The definition specifies "method1" as a default value for the dynamic parameter.
ciRegisterFinder
ciRegisterFinder( list(nil 'namet_name'descriptiont_description'iteratort_iterator'expressiont_expression'defaultCGent_defaultCGen[ 'partialGroupingOkg_partialGroupingOk] ) ) =>t/nil
Description
Registers a new finder with the Circuit Prospector assistant (although the recommended method is to do this using the Edit Finder form). Finders are used by the Circuit Prospector to iterate over a design and collect together groups of instances, nets, and pins that share common characteristics. The finder expression will determine how these objects are grouped together. Finders can be registered automatically by placing them in a .cadence/dfII/ci/finders directory located on the Cadence File Search Path. The finder registration SKILL code should be placed in a file in that directory with an .il extension, for example .cadence/dfII/ci/finders/netTermCountFinder.il.
Arguments
Takes a disembodied property list where the property names are as follows:
|
The name of the iterator to use to find objects and apply the finder expression (see ciRegisterIterator). |
|
|
The finder expression to be applied by the iterator to group objects together. All objects with the same finder expression are grouped together. |
|
|
The name of the default constraint generator associated with this finder. When the results appear in the Circuit Prospector results window, default constraints can be created by selecting the Create Default Constraints option in the Constraint Manager toolbar. |
|
|
Groups instances, nets, and pins even if a subset of the members is in another group. This argument is not valid for circuit-related finders, for example, differential pairs and current mirrors. |
|
Value Returned
Example
ciRegisterFinder( list(nil
'name "Net Term Counts"
'description "Group nets according to terminal counts"
'iterator "Net Iterator"
'expression "length(net->instTerms)"
'defaultCGen "IRDrop"
'partialGroupingOk t
)
)
ciRegisterIterator
ciRegisterIterator( list(nil 'namet_name'descriptiont_description'iteratorFnNamet_iteratorFnName'supportsFlattenedHierg_supportsFlattenedHier) ) =>t/nil
Description
Registers a new iterator with the Circuit Prospector assistant (although the recommended method is to do this using the Edit Iterator form). Iterators are used by the Circuit Prospector finders to iterate over the design in a specific way, applying a finder expression which determines how objects are grouped.
All iterators should have two arguments: the cell view to be iterated over and the finder expression to be applied to the objects being iterated over. Iterators should return a list of grouped objects, a group being a list of object IDs. Grouping should be based on grouping together objects that share the same finder expression evaluation result. Objects should be ignored if the expression evaluates to nil. Since the finder expression is evaluated within the scope of the iterator function, it may contain references to any local variables that the iterator uses.
Iterators can be registered automatically by placing them in a .cadence/dfII/ci/iterators directory located in the Cadence File Search Path. The iterator registration SKILL code should be placed in a file in that directory with an .il extension, for example .cadence/dfII/ci/iterators/netIterator.il.
Arguments
Takes a disembodied property list where the property names are as follows:
|
The name of the iterator function to use. The function should accept two arguments, a cell view and a finder match expression. |
|
|
If set, argument will get passed into ciRunFinder when a finder is run. If the finder does not support a flattened hierarchy, then the Run finder on flattened hierarchy option (in the Run finder pull-down of the Circuit Prospector assistant toolbar will be grayed out). |
|
Value Returned
Example
ciRegisterIterator(
list(nil
`name "My Net Iterator"
`description "Iterate over all nets with expression vars: net, cellview"
`iteratorFnName "myNetIterator"
)
)
;;; Iterators must return a list of sub-lists where each sub-list represents a group and is a list database IDs for the
;;; insts/nets/pins/instTerms in that group
;;;
procedure( myNetIterator(cellview finderExpr)
let( (finderExprResults group groups result)
;;; Use an association table to group together objects with the same expression evaluation result
finderExprResults = makeTable("finderExprResults" nil)
foreach(net cellview->nets
;;; Expression can refer to net, cellview
result = evalstring(finderExpr)
;;; Group all non-nil results
when(result finderExprResults[result] = append(finderExprResults[result] list(net)))
)
;;; Create a list of grouped objects from the association table
groups = list()
foreach(result finderExprResults
group = finderExprResults[result]
groups = append(groups list(group))
)
groups
)
)
ciRegisterNet
ciRegisterNet(t_netType l_netNameList[?regexNetNamesl_regExpressionList] [?predicateg_predicate] ) =>t/nil
Description
Registers the net names, regular expressions and predicates that make up a net type. A net belongs to t_netType if its name is one of l_netNameList, or if it matches one of l_regExpressionList, or if g_predicate returns t.
analog, clock, ground, power, reset, scan, supply, tieHi, tieLo, and tieOff.?regexNetNames and ?predicate arguments default to nil if you do not explicitly specify them, resulting in *no* regular expressions or predicate. You may wish to use a more specific function to register net names, regular expressions or predicates individually.Virtuoso ships with the following built-in net registrations:
ciRegisterNet( "power" '("avdd" "avdd!" "vdd" "vdd!" "vdda" "vdda!"
"AVDD" "AVDD!" "VDD" "VDD!" "VDDA" "VDDA!"
"avcc" "avcc!" "vcc" "vcc!"
"AVCC" "AVCC!" "VCC" "VCC!")
?regexNetNames list("[Vv][Dd][Dd]" "[Vv][Cc][Cc]")
?predicate 'ciSigTypeMatchesNetType)
ciRegisterNet( "ground" '("agnd" "agnd!" "gnd" "gnd!" "gnda" "gnda!"
"AGND" "AGND!" "GND" "GND!" "GNDA" "GNDA!"
"avss" "avss!" "vss" "vss!" "vssa" "vssa!"
"AVSS" "AVSS!" "VSS" "VSS!" "VSSA" "VSSA!")
?regexNetNames list("[Gg][Nn][Dd]" "[Vv][Ss][Ss]")
?predicate 'ciSigTypeMatchesNetType)
ciRegisterNetSuperType( "supply" '("power" "ground"))
Arguments
|
A pre-defined or user-defined type in which to register nets. |
|
|
A list of net names that belong to |
|
|
A list of regular expressions that catch the net names belonging to |
|
|
A net predicate that determines whether or not a net belongs in |
|
Value Returned
|
Net category successfully registered with specified net list. |
|
Example
;; Register net names, regular expressions, and predicate in one go.
ciRegisterNet("Power" '("vcc")
?regexNetNames '("[vV][dD][dD]")
?predicate 'ciSigTypeMatchesNetType)
ciNetNames("Power") ; ("vcc")
ciNetRegexs("Power") ; ("[vV][dD][dD]")
ciNetPredicates("Power") ; ciSigTypeMatchesNetType
ciRegisterNetNames
ciRegisterNetNames(t_netType l_netNames) =>t/nil
Description
Registers a list of net names recognized by ciIsNet().
Arguments
Value Returned
Example
;; Register a fixed list of "Power" nets.
ciRegisterNetNames("Power" '("vdd" "vcc"))
;; Classify some nets in a cellview.
cv = geGetEditCellView()
vdd = dbFindNetByName(cv "vdd")
gnd = dbFindNetByName(cv "gnd")
VCC = dbFindNetByName(cv "VCC")
ciIsNet(vdd "Power") ; t
ciIsNet(gnd "Power") ; nil - "gnd" not a power net name.
ciIsNet(VCC "Power") ; nil - registered names are case-sensitive.
ciRegisterNetPredicate
ciRegisterNetPredicate(t_netType g_predicate) =>t/nil
Description
Registers a net predicate function used by ciIsNet().
A predicate is a SKILL function that takes a net and net type as arguments and returns t or nil to indicate whether or not the net belongs to the net type.
Arguments
|
A predicate function that either use a quoted function name, such as 'myPredicate, or a lambda(). The function must follow the following template:
|
Value Returned
Example
;; Register a fixed list of "Power" nets.
ciRegisterNetNames("Power" '("vdd" "vcc"))
;; Classify some nets in a cellview.
cv = geGetEditCellView()
vdd = dbFindNetByName(cv "vdd")
gnd = dbFindNetByName(cv "gnd")
VCC = dbFindNetByName(cv "VCC")
ciIsNet(vdd "Power") ; t
ciIsNet(gnd "Power") ; nil - "gnd" not a power net name.
ciIsNet(VCC "Power") ; nil - registered names are case-sensitive.
ciRegisterNetRegexs
ciRegisterNetRegexs(t_netType l_Regexs) =>t/nil
Description
Registers a list of regular expressions recognized by ciIsNet().
A net belongs to t_netType if its name matches any of these expressions.
Arguments
Value Returned
Example
;; Register regular expressions matching anything containing 'vdd' or 'vcc'.
ciRegisterNetRegexs("Power" '("[vV][dD][dD]" "[vV][cC][cC]"))
cv = geGetEditCellView()
vdd = dbFindNetByName(cv "vdd")
avdd = dbFindNetByName(cv "avdd")
Vdd = dbFindNetByName(cv "Vdd")
vddbang = dbFindNetByName(cv "vdd!")
VCC = dbFindNetByName(cv "VCC")
ciIsNet(vdd "Power") ; t
ciIsNet(avdd "Power") ; t
ciIsNet(Vdd "Power") ; t
ciIsNet(vddbang "Power") ; t
ciIsNet(VCC "Power") ; t
ciRegisterStructure
ciRegisterStructure(l_propertyList) =>t/nil
Description
Registers a structure with the Circuit Prospector assistant (although the recommended method is to do this using Capturing New Structures).
Arguments
|
List of properties to be applied to structure being registered. |
Value Returned
Example
ciRegisterStructure
( list(nil
‘name "MyStruct"
‘type "none"
‘description "none"
‘insts list(list(nil
‘instName "D0"
‘instId 0
‘expr "__ciInst__->name"
‘terms list(
list(nil ‘name "MINUS" ‘net "vdd!")
list(nil ‘name "PLUS" ‘net "vcom")
)
)
list(nil
‘instName "MP3"
‘instId 1 ‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__ >cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "r4")
list(nil ‘name "D" ‘net "r4")
)
)
list(nil
‘instName "MP11"
‘instId 2
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "r4")
list(nil ‘name "D" ‘net "vdd!")
)
)
list(nil
‘instName "MP10"
‘instId 3
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "r2")
list(nil ‘name "D" ‘net "n20")
)
)
list(nil
‘instName "MP6"
‘instId 4
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "n20")
list(nil ‘name "G" ‘net "r3")
list(nil ‘name "D" ‘net "r2")
)
)
list(nil
‘instName "MP5"
‘instId 5
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "n17")
list(nil ‘name "G" ‘net "r3")
list(nil ‘name "D" ‘net "n18")
)
)
list(nil
‘instName "MP7"
‘instId 6
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "n18")
list(nil ‘name "G" ‘net "r3")
)
)
list(nil
‘instName "MP9"
‘instId 7
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "r3")
list(nil ‘name "D" ‘net "n17")
)
)
list(nil
‘instName "MP2"
‘instId 8
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "n3")
)
)
list(nil
‘instName "D1"
‘instId 9
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pdio'"
‘terms list(
list(nil ‘name "MINUS" ‘net "vdd!")
list(nil ‘name "PLUS" ‘net "vcop")
)
)
list(nil
‘instName "MP0"
‘instId 10
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "n3")
)
)
list(nil
‘instName "MP1"
‘instId 11
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "n3")
list(nil ‘name "D" ‘net "n3")
)
)
list(nil
‘instName "MP4"
‘instId 12
‘expr "__ciInst__->libName == 'gpdk446' && __ciInst__->cellName == 'pmos3'"
‘terms list(
list(nil ‘name "S" ‘net "vdd!")
list(nil ‘name "G" ‘net "n2")
list(nil ‘name "D" ‘net "n2")
)
)
)
‘repeatableInsts nil
‘nets list(
list(nil
‘name "vdd!"
‘expr "t"
)
list(nil
‘name "r4"
‘expr "t"
)
list(nil
‘name "n2"
‘expr "t"
)
list(nil
‘name "vcom"
‘expr "t"
)
list(nil
‘name "n3"
‘expr "t"
)
list(nil
‘name "vcop"
‘expr "t"
)
list(nil
‘name "n17"
‘expr "t"
)
list(nil
‘name "n18"
‘expr "t"
)
list(nil
‘name "r2"
‘expr "t"
)
list(nil
‘name "n20"
‘expr "t"
)
list(nil
‘name "r3"
‘expr "t"
)
)
‘pins list(
)
‘matchExpr "t"
‘finder "MyStruct"
‘constraints list(
)
)
)
ciRemoveDuplicateMembers
ciRemoveDuplicateMembers(
{ d_cellViewID | l_constraintList }
[ ?conType t_conType ]
)
=> t / nil
Description
Removes duplicate constraint members from constraints which do not support duplicate members.
Arguments
Value Returned
Examples
Remove duplicates from all constraints in the current cellview.
ciRemoveDuplicateMembers(geGetEditCellView())
Remove duplicates only from design intent constraints.
ciRemoveDuplicateMembers(geGetEditCellView() ?conType 'designIntent)
Remove duplicates from the list of constraints provided.
conList = ciGetCellView()~>constraints
ciRemoveDuplicateMembers(conList)
ciResolveNet
ciResolveNet(d_netDBid g_hierContext[?simplifyt_simplify] ) => g_resolvedNetInfo /nil
Description
Resolves the passed net to the highest equivalent design net. Used by Circuit Prospector finders when run on flattened hierarchies. For example, the Active Common Gate finder.
Arguments
Value Returned
|
The highest level equivalent design net or the passed net (if it is an internal net). |
|
Example
when(ciIsDevice(device \”fet\”)
ciResolveNet(ciNetOnTerm(device ciGetDeviceTermName(device \"gate\")) hierContext)
hierContext will only be valid when a finder is run on a flattened hierarchy (see Run finder...). In all other cases, ciResolveNet returns the same net that has been passed into it.ciRunFinder
ciRunFinder(t_finderName t_iteratorFnName t_finderExpression t_constraintGenExpr[g_iteratorSupportFlatHier] [t_hierScope] [n_depth] [g_cache] [s_predicate] ) =>list
Description
Runs a Circuit Prospector finder and returns a list of objects grouped according to the finder expression evaluation result. If the depth argument is specified and the hierScope argument is 'depthCellViews, the finder searches only up to the specified depth. If cache is specified, the finder runs on that cache; otherwise, the search results are obtained from the current window. See also ciRegisterFinder and ciRegisterIterator.
Arguments
Value Returned
list( list( objA1 ... objAN) ;;; object group A list( objB1 ... objBN ;;; object group B ) |
Examples
ciRunFinder( "Net Term Counts" "Net Iterator" "length(net->instTerms)" "" nil 'allCellViews -1 ciGetCellView())
The command above results in net database objects that are grouped according to the number of instTerms on the net, as shown below:
(
("net1" "net2" "net3")
("net99" "net100")
)
procedure(myPredicate(libName cellName viewName depth)
libName == AnalogLib
)
ciRunFinder( "Net Term Counts" "Net Iterator" "length(net->instTerms)" "" nil 'allCellViews -1 ciGetCellView() 'myPredicate)
nil
The example above of using the predicate argument with ciRunFinder looks only into cellviews that are part of the library, AnalogLib.
ciRunFindersAndGenerators
ciRunFindersAndGenerators(g_cache t_categoryName[?runGeneratorsg_runGenerators] [?deleteExistingg_deleteExisting] [?addHierNotesg_addHierNotes] [?printFinderResultsg_printFinderResults] [?updateArgsExprg_updateArgsExpr] [?triggerCBinModeg_triggerCBinMode] ) =>list
Description
Runs all the finders and their corresponding generators for the specified constraint cache and Circuit Prospector category. The finders first find all the results and then the constraint generators are ran on those results to create constraints and templates.
Arguments
Value Returned
|
A DPL containing the list of constraint generator expressions for each the constraint generator name is run under the specified constraint category. |
Example
updateArgsExpression = "let(((argsToUpdate nil)) when(cGenName == \"Module (Current Mirror)\" argsToUpdate = list(list(\"Add GuardRing\" t)) ) argsToUpdate)"
ciRunFindersAndGenerators(ciGetCellView() "Rapid Analog Prototype" ?printFinderResults nil ?updateArgsExpr updateArgsExpression)
(nil Module\ \(Cascode\ MOS\ Transistors\) (ci:0x333c7090 ci:0x333e5f10) Module\ \(Cascoded\ Current\ Mirror\) (ci:0x3343a7c0)
Module\ \(Cascoded\ Current\ Mirror\) nil Module\ \(Current\ Mirror\) (ci:0x3346ee80 ci:0x3348b960) Module\ \(Diff\ Pair\)
(ci:0x31ec6700) Module\ \(Diff\ Pair\) nil Module\ \(Passive\ Device\ Array\) nil
Module\ \(Large\ mfactor\) nil Symmetry\ \(default\ axis\) (ci:0x322bfee0 ci:0x0 ci:0x0 ci:0x322de9a0 ci:0x0
ci:0x0
) Cluster\ for\ Standard\ Cells
nil Orientation\ Vertical (ci:0x334256f0 ci:0x2f5f6b00) Negative\ Supply\ Route\ Priority (
("VSS" net)
)
Positive\ Supply\ Route\ Priority (
("VDD" net)
) Symmetry\ \(default\ axis\) (ci:0x3314a5c0 ci:0x31ef5ce0 ci:0x334a0130 ci:0x31f37b60) Symmetry\ for\ Pins
(ci:0x33310ec0) Alignment\ for\ Top\ Pins (ci:0x0) Alignment\ for\ Bottom\ Pins (ci:0x0)
Alignment\ for\ Left\ Pins (ci:0x33053a00) Alignment\ for\ Right\ Pins (ci:0x325fece0) Enforce\ Modgen\ Symmetry\ Precedence
(t)
)
ciRunGenerator
ciRunGenerator(g_cache t_cGenName l_instsNetsPins[?argValuesToUpdateg_argValuesToUpdate] [?triggerCBinModeg_triggerCBinMode] ) =>list
Description
Given a constraint cache, a generator name and a list of objects(insts, nets, pins & terminals), the function Runs the specified constraint generator in the given constraint cache for the specified list of objects, that is, instances, nets, pins, and terminals. This function is called by ciRunFindersAndGenerators to run the constraint generator.
Arguments
Value Returned
Example
The example below runs a Module (Current Mirror) generator on a particular set of instances and nets.
ciRunGenerator(ciGetCellView() list(list("/MP1" 'inst) list("/MP0" 'inst) list("/MP2" 'inst) list("/n3" 'net) list("/vdd!" 'net)) "Module (Current Mirror)")
ciRunGenerator(ciGetCellView() "GenericModgen" list('("M1" inst) '("M2" inst) '("INN" net)) ?triggerCBinMode 'userEdit ?argValuesToUpdate list('Num\ Rows 2))
ci:0x3262a7f0 ;; if successful returns the template created
ciRunGenerator(ciGetCellView() "GenericModgen" list('("M1" inst) '("M2" inst) '("INN" net)) ?triggerCBinMode 'userEdit ?argValuesToUpdate list('Num\ Rows 2))
INFO (CMGR-6149): Running constraint generator 'GenericModgen'.
*WARNING* (CMGR-3125): Unable to run the constraint generator "GenericModgen" on objects '( ("M1" inst) ("M2" inst) ("INN" net)) because some or all of the devices are already contained within an existing modgen.
nil ;; failed to create the template
list(list("Num Rows" 2))
list(nil "Num Rows" 2)
list("Num Rows" 2)
list('Num\ Rows 2), ....
For the argument name, symbols can also be used instead of string.
ciRunPrecondition
ciRunPrecondition(g_cache t_cGenName l_instsNetsPins) =>l_templates/t/nil
Description
Runs all the precondition checks that are needed before a constraint generator can be run.
Arguments
|
The list of instances, pins, nets, and terminals that need to be passed to the precondtion. It is of the following format: list(list("inst1" 'inst) list("inst2" 'inst) list("net1" 'net)) |
Value Returned
Example
ciRunPrecondition(ciGetCellView() "GenericModgen" '('("M1" inst) '("M2" inst) '("INN" net))) ;; returns t if the precondition passes
t
ciSameCellIterator
ciSameCellIterator(
d_cellView
t_finderDeviceExpr
)
=> list
Description
Used by the Circuit Prospector to iterate over all design instances with the same master collecting them together into groups based on the result of evaluating the passed expression (finderDeviceExpr). This iterator ensures that the devices within a group have the same master. All devices with the same master, which have the same finderDeviceExpr result, are grouped together. If the finderDeviceExpr evaluates to nil then the device is ignored.
The ciSameCellIterator function evaluates the finderDeviceExpr function with the current design instance assigned to a local variable named “device”. The device variable can then be referenced in the finderDeviceExpr.
Arguments
Value Returned
list( list( instA1_inst instA2_inst ...) ;;; inst group A list( instB1_inst instB2_inst ...) ;;; inst group B |
Example
To group all fets with the same master according to the net connected to the gate:
finderDevExpr = "if(ciIsDevice) then ciNetOnTerm(device\"G\") else nil)"
fetgroups = ciSameCellIterator(cv finderDevExpr)
fetGroup1 = car(fetGroups)
print(fetGroup1~>name)
("fet1" "fet2" "fet3")
ciSeparateInstsNetsPins
ciSeparateInstsNetsPins(l_instsNetsPins) =>l_disembodiedInstsNetsPins
Description
Converts the instsNetsPins list into a disembodied property list to allow easier access to the instances, nets, pins, and instTerms in the sub-lists. This function is used within constraint generators.
Arguments
Value Returned
Example
inp = '(("/MPS" inst) ("/MP7" inst) ("/MP" inst) ("/net014" net) ("/VDD" net))
res = ciSeparateInstsNetsPins(inp)
res->insts
("/MPS" "/MP7" "/MP")
res->nets
("/net014" "/VDD")
res->pins
nil
res->instTerms
nil
ciSeriesResistorArrayIterator
ciSeriesResistorArrayIterator(d_cellview t_matchExpr) =>l_returnedInsts/nil
Description
Iterates over all resistor devices, collating them into groups of sequentially-arranged resistors that create the longest serial chain between two nets. The serial chain splits at a T-junction point. This function is used by the Series Resistor Array finder of the Circuit Prospector assistant.
Arguments
|
The cellview containing the design instances to be iterated over. |
|
Value Returned
|
A list of returned instances. For example: list(list( inst1 inst2 inst3 ...)) |
|
Example
For the Series Resistor Array finder,
matchExpr = "ciIsDevice(device \"resistor\")"
resDevices = ciSeriesResistorArrayIterator(geGetEditCellView() matchExpr)
print(resDevices~>name)
ciSetCMCGSKILLCallbacks
ciSetCMCGSKILLCallbacks(t_generateConstraintGroupFunctionName t_listGeneratableConstraintGroupsFunctionName t_constraintGroupCanBeUsedFunctionName) =>t/nil
Description
Controls the constraint groups that are visible in the Constraint Manager.
The following types of controls are available:
- Constraint groups that can be viewed in a particular Constraint Manager menu accessible from the Design and Technology databases.
- Constraint groups that can be viewed in a particular Constraint Manager menu, which can be generated.
- Content of the constraint groups that have been generated.
Arguments
Value Returned
Examples
Example 1
ciSetCMCGSKILLCallbacks(nil nil "myCanUse")
Use the default callbacks for constraint group generation and listing constraint groups that are generated. Override the default function for determining if a constraint group can be used.
Example 2
ciSetCMCGSKILLCallbacks("myGen" "myListGen" "myCanUse")
Override all the default callbacks, where myCanUse, myListGen, and myGen can be defined as following:
procedure(myCanUse(con cgDefName cg) ciCanCGBeUsed(con cgDefName cg) ; Just use the default callback for all cases
)
procedure(myListGen(con, defName) ; we only want to change the shielding list, ; for others we use default that Cadence supplies if(strcmp(defName, "shielding") == 0 then list("myParallelShield" "Width Aware Tandem")
else
ciListGeneratableConstraintGroups(con, defName)
; Use the default callback for all other cases )
)
procedure(myGen(con, defName, cgName) let((cv net cache cg netName) ; we only want to change the shielding gen, for others we use ; default that Cadence supplies if(strcmp(defName, "shielding") == 0 then cache = con~>cache
cv = dbFindOpenCellView(ddGetObj(car(cache~>design)) cadr(cache~>design)
caddr(cache~>design))
netName = car(cadr(con~>members))
net = dbFindNetByName(cv netName)
if(cgName == "myParallelShield" then
cg = myParallelGen(net, cgName)
else
cg = myShieldingGen(net, cgName)
)
cg
else
cg = ciGenerateConstraintGroup(con, defName, cgName)
; Use the default callback for all other cases if cg )
)
)
ciSetDefaultConstraintEditor
ciSetDefaultConstraintEditor(t_ConstraintEditorName) =>t/nil
Description
Sets the specified editor as the default constraint editor. The change will take effect at the next start-up of the Virtuoso Schematic Editor or Virtuoso Layout Editor. To keep the change persistent on each start-up of Virtuoso, set this function in an initialization file.
Arguments
|
Name of the editor that needs to be made the default constraint editor. By default, Module Generator is set as the default constraint editor. Following are the possible values for this argument: |
Value Returned
Examples
-
The Process Rule Editor gets set as the default constraint editor successfully because the value for the t_ConstraintEditorName argument was specified correctly:
ciSetDefaultConstraintEditor("Process Rule Editor...")
t
-
The name of the default editor was specified incorrectly (note the missing dots at the end of the constraint editor’s name) for the t_ConstraintEditorName argument. Therefore, the SKILL function returns
niland an error message is displayed.ciSetDefaultConstraintEditor("Process Rule Editor")
nil
*Error* ciSetDefaultConstraintEditor: (CMGR-3138): Cannot change the default constraint editor because the specified constraint editor 'Process Rule Editor' does not exist. To change the default constraint editor, call function 'ciSetDefaultConstraintEditor' with one of the following constraint editor names and then restart Virtuoso Schematic Editor or Virtuoso Layout Editor:
- 'Cell Planner...'
- 'Module Generator...'
- 'Process Rule Editor...'
- 'Constraint Comparison Report'
ciSetStructArgVal
ciSetStructArgVal(s_structType t_argName g_newValue) =>g_success
Description
Replaces the specified structure argument value with the specified value. This SKILL function can be used to override the default settings for the predefined structures.
Arguments
|
The name of the argument for which the value is to be updated. |
|
Value Returned
|
Boolean value indicating success or failure of the argument value update. |
Example
ciSetStructArgVal('GenericModgen "Horizontal Spacing" 0.001)
ciSetStructArgVal('GenericModgen "Route" t)
ciSetStructArgVal('GenericModgen "Pattern" "ABBA/BAAB")
ciSignalIterator
ciSignalIterator(d_cellView t_matchExpression) =>l_signals/nil
Description
Used by the Circuit Prospector to iterate over all signals in the passed cellview, and return a list of corresponding signals.
The signals are grouped according to the result of the match expression. If the match expression evaluates to nil, the signal list is ignored.
Arguments
|
Design cellview that contains the signals to be iterated (cellview->signals). |
|
|
A match expression used to group results together, or spread them into separate bins according to the result. |
Value Returned
|
The list of signal lists grouped as per the evaluated result of the match expression. |
|
Example
To group all signals from the current schematic cellview according to their signal type:
ciSignalIterator(geGetEditCellView() “signal->sigType”)
ciUnexpandDeviceInfo
ciUnexpandDeviceInfo(l_deviceInfo[?unexpandIteratedg_unexpandIterated] ) =>l_unexpandedDeviceInfo
Description
Contracts any mfactored device names and optionally any expanded iterated device names in a device information list returned by ciCollectDeviceInfo or ciExpandIteratedDeviceInfo. The mfactored device names used in the layout are of the format |<instName>.<mFactorIndx>, such as |MN1.3, and the iterated device names may be schematic device names like MN1<0> or layout device names like |MN1(0). In the layout, the device names may be mfactored and iterated, such as|MN1(3).4.
When a collection of mfactored device names are contracted (for example, |MN1.2, |MN1.3, |MN1.4) a single device will appear in the returned deviceInfo list using the base device name like |MN1, and the mfactor property will be set to the total number of devices that were contracted, in this case 3.
Arguments
|
Device information list returned by calling |
|
|
Boolean to control whether iterated devices should be contracted or not. |
|
Value Returned
|
A device information list where the mfactored device names and optional iterated device names have been contracted. |
Example
Collect the device information for iterated and mFactored layout devices |MN1(0), |MN1(1), |MN2.3, |MN2.4, and |MN2.5:
devInfo = ciCollectDeviceInfo(cache '(("|MN1(0)" inst)("|MN1(1)" inst)("|MN2.3" inst)("|MN2.4" inst)("|MN2.5" inst)))
mapcar(lambda((dev) list(dev->name dev->mFactor)) devInfo->devs) => '(("|MN1(0)" 1) ("|MN1(1)" 1) ("|MN2.3" 1) ("|MN2.4" 1) ("|MN2.5" 1))
Then, compress the device information for iterated and mFactored devices so that the device information relating to the same base device are combined. The combined device name will be modified to reflect the combined iteration range, and the device mFactor will represent the combined mFactor, as shown below:
unexpandedDevInfo = ciUnexpandDeviceInfo(devInfo ?unexpandIterated t)
mapcar(lambda((dev) list(dev->name dev->mFactor)) unexpandedDevInfo->devs) => '(("|MN1(0:1)" 1) ("|MN2" 3)) ;;; devs is a list of 2 devices
ciUnexpandIteratedDeviceInfo
ciUnexpandIteratedDeviceInfo(l_deviceInfo) =>l_unexpandedDeviceInfo
Description
Contracts any expanded iterated device names in a device information list returned by ciCollectDeviceInfo or ciExpandIteratedDeviceInfo. The iterated device names may be schematic device names, such as MN1<0>, or layout device names, such as |MN1(0).
Arguments
|
Device information list returned by calling |
Value Returned
|
A device information list where the iterated device names have been contracted. |
Example
Collect the device information for individual bits of an iterated device, for example, MN1<0>, MN1<1>:
devInfo = ciCollectDeviceInfo(cache '(("MN1<0>" inst)("MN1<1>" inst) ("MN2" inst)))
mapcar(lambda((dev) dev->name) devInfo->devs) => '("MN1<0>" "MN1<1>" "MN2")
Then, compress the device information for iterated devices so that the device information relating to the same base device are combined. The combined device name will be modified to reflect the combined iteration range, as shown below:
unexpandedDevInfo = ciUnexpandIteratedDeviceInfo(devInfo)
mapcar(lambda((dev) dev->name) unexpandedDevInfo->devs) =>
'("MN1<0:1>" "MN2") ;;; devs is a list of 2 devices
ciUnregisterConstraintGenerator
ciUnregisterConstraintGenerator(t_constraintGeneratorName) =>t/nil
Description
Unregisters a previously registered constraint generator.
If the constraint generator is included in the Constraint Manager’s Constraint Generator drop-down menu, then using this command will remove the constraint from this list.
See also ciRegisterConstraintGenerator.
Arguments
Value Returned
|
Constraint generator successfully removed from constraint creation pull-down in the Constraint Manager. |
|
Example
ciUnregisterConstraintGenerator(“Matching (strength)”)
Removes the constraint generator entitled Matching (strength).
ciUnregisterIterator
ciUnregisterIterator(t_iteratorFnName) =>t/nil
Description
Unregisters a Circuit Prospector iterator that was previously registered by using ciRegisterIterator. If successful, the iterator will no longer appear in the Edit Finder list or the Edit Iterator list.
Arguments
Values Returned
Example
ciUnregisterIterator("Pin Iterator")
t
ciVariantInfoForFingersAndFingerWidth
ciVariantInfoForFingersAndFingerWidth(u_cache l_instsNetsPins[?minFingerWidtht_minWidth] [?maxFingerWidtht_maxWidth] ) =>nil
Description
Used by the Circuit Prospector as a generator to set a variantInfo property to each given instance registered as a fet, when the parameter value for the parameter registered as fingerWidth is greater than the given minWidth value, and smaller than the maxWidth value.
- The value of the variantInfo property is a disembodied list with a pair of parameters “params” and “mode”.
- The value of the parameter “params” is a pair list of parameters and values.
- The first parameter of that latter pair list is the name of the parameter found on the instance and registered as the “fingerCount” parameter. Its value is a list of two or three variant values for the parameter that corresponds to the number of fingers. One of the values is the original value. The other values are half and double the original value, when the result is even.
- The second parameter of that pair list is the name of the parameter found on the instance and registered as the “fingerWidth” parameter. Its value is a list of two or three variant values for the parameter that corresponds to the finger width. One of the values is the original value. The other values are determined by the variant values for the number of fingers to keep the same total width value.
- The value of the parameter “mode” is “paramSets”. When that property is set, the Analog Placer automatically picks any variant for instantiation.
Arguments
|
Constraint cache where the instances can be found from their full path names (See |
|
|
List of instance members with their full path names and type, as selected in the Circuit Prospector browser. |
|
|
Optional value for the minimum value of the finger width. Default: |
|
|
Optional value for the maximum value of the finger width. Default: |
Value Returned
Example
If MN1, MN6, and MP4 are the names of instances registered as fet. Additionally, the parameter nf is registered as fingerCount, and the parameter fw is registered as fingerWidth, then when the value of nf is “8” and the value of fw is “10u”, the following functions create a variantInfo property for MN1, MN6, and MP4, and the value of that property will be (params (("nf" (4 8 16)) ("fw" (2e-05 1e-05 5e-06))) mode "paramSets"):
cache = ciCacheGet(geGetEditCellView()
ciVariantInfoForFingersAndFingerWidth(cache list( list(“/MN1” `inst) list(“/MN6” `inst) list(“/MP4” `inst)) ?minFingerWidth “4u” ?maxFingerWidth “60u”)
ciXYInstSymmetricIterator
ciXYInstSymmetricIterator(d_cellview t_finderExpr[?triggerg_trigger] [?likeSchemaSymg_likeSchemaSym] ) =>list/nil
Description
Evaluates the finderExpr with the current symmetric pair of objects that are assigned to L and R local variables. Used by Circuit Prospector finders to iterate over all symmetric design instance pairs, collecting them into symmetric pairs if the result of evaluating the passed expression (finderExpr) is not nil.
The L and R variables can be referenced in the finderExpr.
In the current schematic, the instance symmetry iterator first looks for symmetrical triggering pairs and then propagates the symmetries from these pairs along the nets and devices that are connected to the triggering pairs and symmetrical pairs which can be one of the following:
-
A differential pair made of
fetandbjtdevices. -
A pair of instances with the same cell name and same size as
fetorbjtdevices with mirrored orientation, aligned on the same Y co-ordinate.
The symmetries are propagated through the nets using terminal names defined for each active device. Symmetries are also transmitted to and propagated through passive devices.
To be a symmetrical pair, both instances must have the same cell name and size.
Symmetries for instances are converted to self-symmetries when there is only one member on the path for symmetry propagation.
Arguments
Value Returned
|
List of symmetric pairs, for example: list( list( objA1 objA2 ;;; symmetric pair A list( objB1 objB2 ;;; symmetric pair B ... ) |
|
Example
finderExpr="(L->libName == R->libName) && (L->cellName == R->cellName) &&
(L->w == R->w) && (L->l == R->l) && (L->r == R->r) && (L->c == R->c)"
symmPairs = ciXYInstSymmetricIterator(cv finderExpr)
symmPair1 = car(symmPairs)
print(symmPair1~>name)
("MN16" "MN5")
ciXYNetSymmetricIterator
ciXYNetSymmetricIterator(d_cellview t_finderExpr[?triggerg_trigger] [?likeSchemaSymg_likeSchemaSym] ) =>list/nil
Description
Used by Circuit Prospector finders to iterate over all pairs of symmetric nets, collecting them into symmetric pairs if the result of evaluating the passed expression (finderExpr) is not nil.
In the current schematic, the net symmetry iterator will first of all look for symmetrical triggering pairs and propagate the symmetries from these pairs along the nets and devices that are connected to the triggering pairs and the following symmetrical pairs.
The symmetries are propagated through the nets using terminal names defined for each active device.
Symmetries for nets are converted to self-symmetries when there is only one member on the path for symmetry propagation.
Arguments
Value Returned
|
List of symmetric pairs, for example: list( list( netA1 netA2 ;;; symmetric pair A list( netB1 netB2 ;;; symmetric pair B ... ) |
|
Example
finderExpr="t"
symmPairs = ciXYNetSymmetricIterator(cv finderExpr)
symmPair1 = car(symmPairs)
print(symmPair1~>name)
("net1" "net2")
ciXYPinSymmetricIterator
ciXYPinSymmetricIterator(d_cellview t_finderExpr[?triggerg_trigger] [?likeSchemaSymt_likeSchemaSym] ) =>list/nil
Description
Used by Circuit Prospector finders to iterate over all pairs of symmetric pins, collecting them into symmetric pairs if the result of evaluating the passed expression (finderExpr) is not nil.
In the current schematic, the pin symmetry iterator will first of all look for symmetrical triggering pairs and propagate the symmetries from these pairs along the nets and devices that are connected to the triggering pairs and the following symmetrical pairs.
Symmetries for pins are converted to self-symmetries when there is only one member on the path for symmetry propagation.
Arguments
Value Returned
|
List of symmetric pairs, for example: list( list( objA1 objA2 ;;; symmetric pair A list( objB1 objB2 ;;; symmetric pair B ... ) |
|
Example
finderExpr="t"
symmPairs = ciXYPinSymmetricIterator(cv finderExpr)
symmPair1 = car(symmPairs)
print(symmPair1~>name)
("I153" "I154")
ciXYSortInsts
ciXYSortInsts(l_list(dbInstId) ) =>l_list(dbInstId) /nil
Description
Sorts a list of dbInstID, first by their X coordinates and then by their Y coordinates. This will order the instances, from top to bottom and left to right, in terms of where they are located on the canvas.
Arguments
Value Returned
Example
insts~>xy
((-3.5625 1.125)
(-2.4375 0.875)
(-1.4375 1.125)
(-3.125 1.5625)
(-1.8125 1.5625)
(-2.9375 2.0625)
(-2.9375 2.5625))
xySortedInsts = ciXYSortInsts(insts)
xySortedInsts~>xy
((-2.9375 2.5625)
(-2.9375 2.0625)
(-3.125 1.5625)
(-1.8125 1.5625)
(-3.5625 1.125)
(-1.4375 1.125)
(-2.4375 0.875))
ciXYSymmetricIterator
ciXYSymmetricIterator(d_cellView t_finderExpr) =>list/nil
Description
Evaluates the finderExpr with the current symmetric pair of objects assigned to L and R local variables. The L and R variables can be referenced in the finderExpr. Iterates all pairs of symmetric design instances/pins (objects) collecting them together into symmetric pairs if the result of evaluating the passed expression (finderExpr) is not nil. The Circuit Prospector assistant finders use this function.
Arguments
|
Cellview containing pairs of symmetric design objects to be iterated. |
|
Value Returned
list( list( objA1 objA2) ;;; symmetric pair A list( objB1 objB2) ;;; symmetric pair B ... ) |
|
Example
To find all symmetrical devices which share the same library/cell name:
finderExpr = “L->libName == R->libName && L->cellName == R->cellName”
symmPairs = ciXYSymmetricIterator(cv finderExpr)
symmPair1 = car(symmPairs)
print(symmPair1~>name)
(“inst1” “inst2”)
Rapid Analog Prototype Category (Circuit Prospector) Customization SKILL Commands
Customizing the RAP Finders/ Generators
-
Each of the modgen based finder/generators in the RAP category call the
ciCreateModgen()function, which is the high level entry point for modgen generation. -
The
ciCreateModgen()function evaluates the modgen pattern expression that has been pre-registered for the specified structure type as well as handling device abutment, what type of guardring to add and whether to add dummies or not. It is possible to register alternative modgen pattern expression usingciSetStructGeneratorExpressions(). -
The args list supplied to
ciRegisterConstraintGenerator()supports separators to make the popup constraint generator options dialog easier to read. This is achieved by using the 'separatorargument type. For example:args= ( …
list("Guard Ring Options" 'separator)
…)
-
The args list supports expandable and collapsable groups of arguments. This is achieved by using the '
beginExpandedOptionsand 'endExpandedOptionsargument types. For example:args= ( …
list("Guard Ring Options" 'beginExpandedOptions)
… guard ring args specified between begin/end …
list("Guard Ring Options" 'endExpandedOptions)
…)
-
An optional '
hideparameter is supported on each argument to control the visibility of the argument on the dialog. This allows you to trim down and simplify the dialogs where default values of arguments are deemed sufficient and/or the user should be prevented from altering these values. For example:args= ( …
list("Guard Ring Type" 'enumlist("none" "ring" "pane" "ring") 'hide)
)
-
Multi-line text boxes can be created using the following argument types:
The text box created using the'multiStringargument type allows use of variable-sized font; whereas, the one created using the'patternor'orientargument type use fixed-size font only.
The'patternand'orientarguments types are useful for entering interdigitation patterns and device orientations. This is because the fixed-size font makes it easier to align device symbols and orientations on multiple lines.
For example,list("Description" ‘ "\" A description\n On multiple lines\"")
list("Device Interdigitation” ‘pattern "\"ABBA/BAAB\"") ;;; Use / or \n for new line
list("Device Orientation” ‘orient "\"R0 R0 R0 R0/MX MX MX MX\"") ;;; Use / or \n for new line
-
You can specify
'wigdetTypeascomboBoxfor a'stringargument type as shown below:list(argName 'string "buildString(Expression)" 'widgetType "comboBox")
As a result, a drop-down list box gets added to the generator GUI that contains values based on the specifiedExpression. At run time, when you open the generator GUI, the specifiedExpressionis evaluated and the values are displayed dynamically.
Customizing the RAP Finders: New Functions
A set of functions exist to allow the arguments lists to be fully customizable and PDK independent:
-
ciGetStructTypes(): Returns a list of registered structure types. For example:list('DiffPair, 'CurrentMirror, 'CascodedCurrentMirror, 'LargeMfactor, 'PassiveDeviceArrray)
-
ciAddStructArg(<structSymbolName> <argDef> @key (afterArgName nil)): Adds the argument definition to the end of args or after the specifiedargName. -
ciGetStructArg(<structSymbolName> <argName>): Gets a specified argument definition. -
ciReplaceStructArg(<structSymbolName> <argName> <argDef>): Replaces a specified argument definition. -
ciDeleteStructArg(<structSymbolName> <argName>): Deletes a specified argument definition. -
ciGetRoutingLayers(): Retrieves the list of routing layer names from the technology file. For example:list(“Metal1” “Metal2” “Metal3” “Metal4” “Metal5” “Metal6” “Poly”)
-
ciCreateRoutingLayerEnumString(layerNumber): Is a utility function for creating layer name enums, which retrieves the list of layer names from the technology file and make layerNumber the default by adding the associated layer name to the end of the list. For example:ciCreateRoutingLayerEnumString(2) => list(“Metal1” “Metal2” “Metal3” “Metal4” “Metal5” “Metal6” “Poly” “Metal2”)
-
ciGetRule(layerName ruleName defaultValue): Retrieves the required rule value from the technology file for a given layerName, where:
ciGetRule(“Metal2” "minWidth” 0.123) => 0.3 (techfile value)
ciGetRule(“Metal2” "minWidth” 0.123) => 0.123 (default value)
ciGetRule(“Metal2” "minWidth” 0.123) => 0.123 (default value)
Customizing the RAP Finders for Modgens: MOS Current Mirror
To simplify the definition of structures that require dummies and abutment, sets of arguments are pre-registered for each of these using the struct types 'Dummies, 'Abutment, and 'GuardRing. For example:
ciSetStructArgs('CurrentMirror append( append( append( append( list(list("Style" `enum "\"Auto SingleRow DoubleRow\"")) ciGetStructArgs('Dummies)) ciGetStructArgs('Abutment)) ciGetStructArgs('GuardRing))
)
)
-
where,
ciGetStructArgs('Dummies) -> list( list("Add Dummies"'bool nil)) -
where,
ciGetStructArgs('Abutment) -> list( list("Abut All"'bool t)) -
where,
ciGetStructArgs('GuardRing) ->list(
list(“Guard Ring" 'separator) ;;; Adds a separator into the GUI --Guard Ring ----------
list("Add Guard Ring” 'bool nil)
list(“Settings" 'beginExpandedOptionsnil) ;;; Adds an expander >>> into the GUI
list(“Type” 'enum “\“ring pane\””)
list(“Shape” 'enum “\”rectangular rectilinear\””)
list(“Net” 'enum “buildString(ciGetMembersOfType(instsNetsPins'net ?includeTypenil))”)
list(“Spacing” `float “0.0”)
list(“MPP” `enum "strcat(buildString(techGetMPPTemplateNames(ciGetTechFile())) \" \" ciGetGuardRingMPPName(car(ciInstsNetsPinsToDevInfo(cache instsNetsPins)- >devs)->dbId))")
list("Fluid Guard Ring" `separator) ;;; Adds a separator into the GUI -- Fluid Guard Ring ----------
list(“Use Fluid" `bool nil)
list(“Device” 'enum "buildString(ciGetMembersOfType(instsNetsPins 'inst ?includeType nil))")
list(“Width” `float 0.0)
list(“Use Min DRC For Spacing” 'bool nil)
list(“Settings" 'endExpandedOptions nil)
)
-
Where,
ciGetStructPDKMult(structType)returns a PDK dependent multiplier, which can be applied to the values returned byciGetRule(). This function returns1.0when called withstructTypeset to 'Default. -
Different multipliers can be set for different structTypes and PDKs using
ciSetStructPDKMult(structType pdkName multiplier). For example:ciSetStructPDKMult('CurrentMirror" gpdk045" 1.0) -
The
ciCreateModgen()function calls expressions to create the modgen device pattern, and guard ring. These expressions are pre-registered for each of the structure types. -
It is possible to register alternative modgen pattern, and guard ring expressions using
ciSetStructGeneratorExpressions(). -
A SKILL structure
ciStructGeneratorExpressionscan be defined with pattern, routing, and guardRing fields. These fields are SKILL expressions that are called to generate the modgen device pattern, and guardRing. -
By default the MOS Current Mirror generator expressions are registered as follows:
ciSetStructGeneratorExpressions('CurrentMirror
make_ciStructGeneratorExpressions(
?pattern "ciGenerateCurrentMirrorPattern(devInfo args)"
?guardRing“when(args->\"Add GuardRing\" ciCreateGuardRing(cache modgen args))”
)
)
Where,
Customizing the RAP Finders for Modgens: ciStructGeneratorExpressions-> pattern
The pattern field expression of the ciStructGeneratorExpressions structure should evaluate to a lists of lists where each sub-lists. Each sublist represents a row in the modgen and contains device names and optionally a list of modgen device parameters. The format of the device names and parameters is similar to that used when specifying the members when calling ciConCreate(), although the member type is not required.
The registered pattern expression can reference the cache, devInfo, and args as variables. Where, devInfo is the device information DPL returned by the ciCollectDeviceInfo() function and args is a disembodied property list containing the constraint generator args and values specified when the constraint generator was run. For example, to represent the pattern ABBA/BAAB for a diff pair with mfactor4, with devices named “MN1” and “MN2”, and custom spacings for some of the devices in the pattern the pattern list would be:
‘( ((“MN1” ((“horizontalCustomSpacing” 0.2))) (“MN2” ((“horizontalCustomSpacing” 0.3))) (“MN2”) (“MN1”))
((“MN2” ((“horizontalCustomSpacing” 0.2))) (“MN1” ((“horizontalCustomSpacing” 0.3))) (“MN1”) (“MN2”)) )
The ciCreateModgen() function takes this information and assign the correct row/column numbers and modgen pattern string for the modgen being created.
The devs field of the devInfo variable is a list of disembodied property lists where each disembodied property list contains PDK independent information about a device in the structure. This information can be used to generate the required modgen pattern lists.
For example, to generate a single row modgen containing all devices in the structure you could write a procedure as follows:
procedure( createSingleRowPattern(cache devInfo args)
let( (pattern row)
row = list()
foreach(dev devInfo->devs
for( m1 dev->mFactor
row = cons(dev->name row )
)
)
pattern = list(reverse(row))
)
)
Then set the pattern expression field of the ciStructGeneratorExpressions structure to call this function. For example:
genExprs= ciGetStructGeneratorExpressions('CurrentMirror)
genExprs->pattern = “createSingleRowPattern(cache devInfoargs)”
ciSetStructGeneratorExpressions('CurrentMirror genExprs)
Another example demonstrating the use of the devInfo disembodied property list:
;;; ABBA
;;; BAAB
;;;
;;; Note args contains user defined properties spacing1and spacing2 for specifying the device spacings
;;;
procedure( ciDiffPairPatternMFactor4( cache devInfo args)
prog( (devAdevBrow0 row1 pattern)
unless(length(devInfo->devs) == 2 warn(“Wrong number of devices\n”) return())
devA= car(devInfo->devs)
devB= car(devInfo->devs)
unless(devA->mFactor == 4 && devB->mFactor == 4 warn(“wrong mfactor”) return())
row0 = list( list(devA->name args->spacing1) list(devB->name args->spacing2)
list(devB->name) list(devA->name))
row1 = list( list(devB->name args->spacing1) list(devA->name args->spacing2)
list(devA->name) list(devB->name))
pattern = list(row0 row1)
return(pattern)
)
)
Customizing the RAP Finders for Modgens: ciStructGeneratorExpressions -> guardRing
The guardRing field of the ciStructGeneratorExpressions structure should be an expression that generates a guard ring for the passed modgen based on the guard ring settings in the passed generator args.
By default the guardRing expression for all structure types are registered as:
"when(args->\"Add GuardRing\" ciCreateGuardRing(cache modgen args))"
Here is an example of how to register alternative guard ring generator expressions for structure types:
procedure( createGuardRing(cache modgen args)
let( (guardRingNet guardRingMembers guardRingParams guardRing)
when(args->"Add GuardRing"
guardRingNet= list(args->Net 'net list( list("shape" args->Shape)
list("spacing" args->Spacing) list("mppName" args->MPP)))
guardRingMembers= list(list(modgen->name 'modgen) guardRingNet)
guardRingParams= list( list( "type" args->Type ) )
guardRing = ciConCreate(cache 'powerStructure ?members
guardRingMembers ?params guardRingParams ?verbose nil)
)
)
)
genExprs= ciGetStructGeneratorExpressions(‘CurrentMirror)
genExprs->guardRing= "createGuardRing(cache modgen args)"
ciSetStructGeneratorExpressions(‘CurrentMirror genExprs)
Examples for Registering a New Structure Type and Generator to Extend the Built-in RAP Finders
This example shows how to register a structure type, such as Cascode, using the customization functions described in the previous section.
-
Register the args for this structure type:
ciSetStructArgs('Cascode append( append( append( append( list(list("Style" `enum "\"Auto SingleRow DoubleRow\"")) ciGetStructArgs('Dummies)) ciGetStructArgs('Abutment)) ciGetStructArgs('GuardRing)) "ciGetStructPDKMult('Default)" "ciGetStructPDKMult('Cascode)")))
-
Register the generator expressions for this structure type:
ciSetStructGeneratorExpressions('Cascode make_ciStructGeneratorExpressions(
?pattern “generateCascodeModgenPattern(devInfo args)"
?guardRing “when(args->\”Add GuardRing\” createCascodeGuardRing(cache modgen args)) ))
-
Register a constraint generator for the new structure:
ciRegisterConstraintGenerator(
list(nil
'name"Module (Cascode)"
'description "Generate Modgen Constraint for a Cascode"
'expression "ciCreateModgen(cache instsNetsPins 'Cascode args)"
'addToToolbar t
'iconName"Cascode"
'args"ciGetStructArgs('Cascode)”
'menu "Rapid Analog Prototype"
)
Constraint Generator Customization SKILL Commands
The following SKILL commands allow you to customize the available constraint generators:
|
Commands for the constraint generator structure argument expressions |
|
|
Commands for the constraint generator expressions associated with each type of structure |
|
ciAddStructArg
ciAddStructArg(s_structType l_newArg[?afterArgNameg_afterArgName] ) =>t/nil
Description
Adds a new constraint generator argument to the list of existing arguments registered for the passed structType. By default, the argument is appended to the current list of arguments for the structType. Optionally, the new argument can be inserted after the end of the argument or after a existing argument name.
Arguments
|
A list defining the new argument to be added in the form list ( |
|
|
Optionally insert the new argument after the existing named argument. |
Value Returned
|
Successfully added a new constraint generator argument to the list of existing arguments registered for the passed |
|
Example 1
ciAddStructArg('DiffPair '("newArg" 'double 0.0))
As per the above example a new argument is appended to the list of arguments for a DiffPair structure.
Example 2
ciAddStructArg('CurrentMirror '("newArg" 'string "aStringExpression") ?afterArgName "Guard Ring")
As per the above example a new argument is inserted in the list of arguments for a CurrentMirror structure after the existing argument named, Guard Ring.
ciCollectDeviceInfo
ciCollectDeviceInfo(g_cache l_devices[?devParamNamesl_devParamNames] [?devTerminalNamesl_devTerminalNames] [?warnParamUnfoundg_warnParamUnfound] [?warnUnmappedg_warnUnmapped] [?parentsg_parents] ) =>devs
Description
Returns a disembodied property list containing information collected about the passed devices in the generators instsNetsPins list.
info = ciCollectDeviceInfo(cache '(("M0" inst)("M1" inst)("agnd_h" net)))
The information is collected and returned in a PDK independent way so that all device information can be accessed in the same way regardless of PDK. For better performance, the collected information is cached. As a result, any warnings generated during the first call of ciCollectDeviceInfo are not displayed again as long as the function is called with the same arguments and the cached information is considered up to date.
This function has optional keyed arguments to specify the device parameters and device terminal connections for which information needs to be collected.
The ciCollectDeviceInfo function differentiates between the absolute and the relative path for the specified device. Dots (..) cannot be used in the object path to navigate in the hierarchy.
Arguments
|
A list of the lists where each sublist contains the device name and type for which information is to be collected. |
|
|
A list of PDK independent device parameter names for which the values should be returned. By default, this list is set to |
|
|
A list of PDK independent device terminal names for which connectivity information should be returned. By default, this list is set to |
|
|
Defaults to |
|
|
Defaults to |
|
|
Defaults to |
|
Value Returned
Info = ciCollectDeviceInfo(... ...)
Here, Info is a list of the following format:
list(nil
'devParamNames ( ("paramName1" valueIfNotFound1) ... ("paramNameN" valueIfNotFoundN))
'devTerminalNames ("net1" ... "netN")
'cache ci:0x26425c20
'uniqueNets ("uniqueNet1" ... "uniqueNetN")
'devs ( dev1 ... devN)
'net1Nets ("net1Name1" ... "net1NameN")
'net1NetsUnique ("uniqueNet1Name1" ... "uniqueNet1NameN")
...
'netNNets ("netNName1" ... "netNNameN")
'netNNetsUnique ("uniqueNetNName1" ... "uniqueNetNNameN")
)
The default format of info->devs is a list of the following format:
'(dev1 ... devX ... devN)
Where devX is a DPL of the following format:
list(nil
'termNets ("termNetName1" ... "termNetNameN")
'name <name>
'dbId <dbId>
'deviceTypes <("deviceTypeName1" ... "deviceTypeNameN")> | < ('default)>
'paramName1 <paramValue1>
...
'paramNameN <paramValueN>
'net1 <nethelem(1 dbId->instTerms)->net->name>
...
'netN <nethelem(N dbId->instTerms)->net->name>
'termNet1 <"termNet1Name1">
...
'termNetN <"termNet1NameN">
)
If a paramValueN is not found on the device, the default value specified for that parameter in the devParamNames list is used.
-
info->sourceNets: A list of the source net names attached to the devices. -
info->gateNets: A list of the gate net names attached to the devices. -
info->drainNets: A list of the drain net names attached to the devices. -
info->bulkNets: A list of the bulk net names attached to the devices. -
info->sourceNetsUnique: A list of the unique source net names attached to the devices. -
info->gateNetsUnique: A list of the unique gate net names attached to the devices. -
info->drainNetsUnique: A list of the unique drain net names attached to the devices. -
info->bulkNetsUnique: A list of the unique bulk net names attached to the devices. -
info->uniqueNets: A list of all the unique net names attached to the devices.
ciCollectDeviceInfo() has the following two optional keyed arguments that allow you to specify which device parameters and device terminal connections to collect.
-
The
devParamNamesparameter specifies the list of PDK independent device parameter names to be collected on each device. The PDK independent device parameter names are those that have been registered withciMapParam(). For example,"mFactor"and"fingerCount". -
Similarly, the
devTerminalNamesparameter specifies the list of PDK independent device terminal names for which connectivity (nets) are to be collected. The PDK independent device terminal names are those that have been registered withciMapTerm(). For example,"source"and"drain".
The DPL property names are added dynamically to match whatever device parameter or device terminal names have been specified. Therefore, if the devParamNames includes a parameter named YYY, the returned device information will have a YYY field, that is, car(info->devs)->YYY=> "value of YYY".
How ciCollectDeviceInfo uses the registered information?
The ciCollectDeviceInfo function uses any information registered with the following functions: ciDeviceInfoRegisterParams, ciDeviceInfoRegisterTerminals, ciMapParam, ciMapTerm, ciRegisterDevice, and so on.
If no parameters or terminals have been registered with the ciDeviceInfoRegisterParams or ciDeviceInfoRegisterTerminals function, the ciCollectDeviceInfo function works the same as described in the above section. This is the default behavior that has been provided for backward compatibility.
However, if the keyed argument devParamNames or devTerminalNames has been passed to ciCollectDeviceInfo, it overrides any registered parameters or terminals.
If you have registered parameter names or terminals for a device type with ciDeviceInfoRegisterParams or ciDeviceInfoRegisterTerminals, the following happens:
-
ciCollectDeviceInfogets all device types associated with the device cellview found for the given instance name. For example:ciRegisterDevice("passive" '(("myLib" "res" nil)))
ciRegisterDevice("resistor" '(("myLib" "res" nil)))
Let us consider"R0"is an instance that belongs to the library"myLib"and cell name"res". In that case, the function is passed as following:ciCollectDeviceInfo(ciGetCellView() '(("R0" inst)))
Here,ciCollectDeviceInfolooks for all device types of"R0"which are'(passive resistor). -
ciCollectDeviceInfogets all parameters or terminals information for all types of the instance. For example, for"R0", theciCollectDeviceInfofunction gets all parameters or terminals information for the"passive"and"resistor"types in theciDeviceInfoRegistryfunction.-
If nothing has been registered for all device types of the instance, the
ciCollectDeviceInfofunction gathers the information for the parameters or terminals returned by theciDeviceInfoGetRegisteredParams('default)orciDeviceInfoGetRegisteredTerminals('default)function, respectively.
Consider that Cadence-provided default parameters or terminals have not been overridden. That is,-
'(("mFactor" 1) ("fingerCount" 1) ("length" nil) ("width" nil) ("fingerWidth" nil))for parameters -
'("source" "gate" "drain" "bulk")for terminals
As a result, if these parameters are not mapped (usingciMapParam) to a parameter of the instance, a warning is displayed. -
-
If parameters have been registered for at least one device type of the instance device type, the
ciCollectDeviceInfofunction gathers information for the parameters found in the table returned by theciDeviceInfoRegistryfunction.
If terminals have been registered for at least one device type of the instance device type, theciCollectDeviceInfofunction gathers information for the terminals found in the table returned by theciDeviceInfoRegistryfunction.
For example, consider the following registration:ciDeviceInfoRegisterParams("passive" '(("segments" 1)))
Now if you call the following function, the parameters registered for"R0"are the ones registered for the"passive"device type:ciCollectDeviceInfo(ciGetCellView() '(("R0" inst)))
This means that"R0"is a device of type"passive"and"resistor". You have registered the parameters for"passive", but nothing has been registered for"resistor". As a result,ciCollectDeviceInfono longer uses the default parameter for"resistor".
If an instance has only been registered as a device of type"resistor",ciCollectDeviceInfogathers information for the"resistor"parameters, which are the default ones.ciDeviceInfoRegisterParams("resistor" '(("value" 1e-12)))
Now, if you calls the following:ciCollectDeviceInfo(ciGetCellView() '(("R0" inst)))
Then, the parameters registered for"R0"are the ones registered for"passive"and"resistor"device types. That is,"R0"is a device of type"passive"and"resistor", and you have registered parameters for"passive"and"resistor". As a result,ciCollectDeviceInfogathers information for both"passive"and"resistor"parameters.This same reasoning applies to terminals. Also, registering parameters for a device type means that the parameter must exist on all of devices of this type. UseciMapParamif the parameter has different names from device to device, but the same meaning. As a result, you might need to specify that a device type does not have any parameter registered on it. For example, it might be best to avoid registering any parameter for"passive"device types. To do this, you can call the following:ciDeviceInfoRegisterParams("passive" '(nil))
Now,ciDeviceInfoGetRegisteredParams("passive")returnsnil.
If you instead call the following:ciDeviceInfoRegisterParams("passive" nil)
Now,ciDeviceInfoGetRegisteredParams("passive")returns the default parameters.
-
If nothing has been registered for all device types of the instance, the
How ciCollectDeviceInfo handles schematic pcells?
By default, ciCollectDeviceInfo does not collect information about device inside a submaster view of a Pcell. If it is needed for some Pcell device types, you can register them as device of type pcellRetrieveSubmaster (see ciRegisterDevice). In this case, ciCollectDeviceInfo collects information about Pcell devices in the submaster cellview if it is found. For detailed information about pcells, see Virtuoso Parameterized Cell Reference.
For example, if you have a Pcell iterated device named R3<1:0> and its submaster cellview contains two resistors named R0 and R1, then by default (that is, R3<1:0> is not registered as a device of type pcellRetrieveSubmaster) the following command:
ciCollectDeviceInfo(cache '(("/R3<1:0>/R0" inst) ("/R3<1:0>/R1" inst)) ?warnUnmapped nil ?warnParamUnfound nil)
(nil devParamNames (
("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil)
) devTerminalNames ("source" "gate" "drain" "bulk")
cache ci:0x3dff6f30 uniqueNets ("MINUS" "PLUS" "B") devs
((nil termNets
("MINUS" "PLUS" "B") name "R3<1:0>/R0"
dbId db:0x3285849d deviceTypes
(default) numIter
2 mFactor 1 fingerCount 1
length 1.0185e-05 width 2e-06 fingerWidth
2e-06 source nil gate nil
drain nil bulk "B" termNet1
"MINUS" termNet2 "PLUS" termNet3 "B"
)
) sourceNets nil sourceNetsUnique nil
gateNets nil gateNetsUnique nil drainNets
nil drainNetsUnique nil bulkNets ("B")
bulkNetsUnique ("B")
)
If it has been registered as a device of type pcellRetrieveSubmaster, that is:
ciRegisterDevice("pcellRetrieveSubmaster" '(("gpdk090" "resnsppoly" nil)))
ciCollectDeviceInfo(cache '(("/R3<1:0>/R0" inst) ("/R3<1:0>/R1" inst)) ?warnUnmapped nil ?warnParamUnfound nil)
(nil devParamNames (
("mFactor" 1)
("fingerCount" 1)
("length" nil)
("width" nil)
("fingerWidth" nil)
) devTerminalNames ("source" "gate" "drain" "bulk")
cache ci:0x3dff6f30 uniqueNets ("MINUS" "PLUS" "B") devs
((nil termNets
("MINUS" "PLUS" "B") name "R3<1:0>/R0"
dbId db:0x3285869d deviceTypes
(default) numIter
2 mFactor 1 fingerCount 1
length 1.0185e-05 width 2e-06 fingerWidth
2e-06 source nil gate nil
drain nil bulk "B" termNet1
"MINUS" termNet2 "PLUS" termNet3 "B"
)
(nil termNets
("MINUS" "PLUS" "B") name "R3<1:0>/R1"
dbId db:0x3285869e deviceTypes
(default) numIter
2 mFactor 1 fingerCount 1
length 1.0185e-05 width 2e-06 fingerWidth
2e-06 source nil gate nil
drain nil bulk "B" termNet1
"MINUS" termNet2 "PLUS" termNet3 "B"
)
) sourceNets nil sourceNetsUnique nil
gateNets nil gateNetsUnique nil drainNets
nil drainNetsUnique nil bulkNets ("B" "B")
bulkNetsUnique ("B")
)
ciFindObjectInHier(objectFullPathName cache objectType)
ciGetObjectCellView(objectFullPathName cache)
ciGetCellViewForObjectPath(objectFullPathName currentHierPath)
Example
ciCollectDeviceInfo(ciGetCellView() '(("R0" inst) ("D0" inst)))
=>
list(nil
'devParamNames ( ("area" nil) ("segments" nil))
'devTerminalNames ("plus" "minus")
'cache ci:0x26425c20
'uniqueNets ("net049" "vdd!" "net070" "net071")
'devs
((nil 'termNets
("net049" "vdd!") 'name "R0"
'dbId db:0x1f22cd47 'deviceTypes
("resistor" "passive") 'numIter 1 'mFactor 1 'fingerCount 1
'fingerWidth nil 'segments 1 'plus
"vdd!" 'minus "net049" 'termNet1 "net049"
'termNet2 "vdd!"
)
(nil 'termNets
("net070" "net071") 'name "D0"
'dbId db:0x1f22cd4b 'deviceTypes
("passive" "diode") 'numIter 1 'mFactor 1 'fingerCount 1
'fingerWidth nil 'area 4e-14 plus
"net070" 'minus "net071" 'termNet1 "net070"
'termNet2 "net071"
)
)
'plusNets ("vdd!" "net070")
'plusNetsUnique ("vdd!" "net070")
'minusNets ("net049" "net071")
'minusNetsUnique ("net049" "net071")
)
ciConvertParamsDPLToParams
ciConvertParamsDPLToParams(l_paramsDPL) =>l_result
Description
Converts a disembodied property list of parameter names and values into the list format required for specifying constraint parameters and constraint member parameters. This function is the complement of ciConvertParamsToDPL.
Arguments
|
The disembodied property list of parameter names and values. |
Value Returned
|
A list of lists where each sublist contains the parameter name and value. |
Example
symmConParams = aSymmetryConnstraint->parameters (("mirror" 1) ("scope" "boundary")
("checkWithHalo" nil)
("allowedLayers" "N/A")
("allowedVias" "N/A")
("layerWidths" "N/A")
("viaNumCuts" "N/A")
("defSpacing" "N/A")
("refSpacing" "N/A")
("msTolerance" 20.0) <<<< Value to change
("tranSpacing" "N/A")
("hierarchicalScope" nil)
)
paramsDPL = ciConvertParamsToDPL(symmConParams) (nil mirror 1 scope "boundary" checkWithHalo nil allowedLayers "N/A" allowedVias "N/A" layerWidths "N/A" viaNumCuts "N/A" defSpacing "N/A" refSpacing "N/A" msTolerance 20.0 tranSpacing "N/A" hierarchicalScope nil
)
paramsDPL->msTolerance = 33.33
ciConvertParamsDPLToParams(paramsDPL) (("mirror" 1) ("scope" "boundary")
("checkWithHalo" nil)
("allowedLayers" "N/A")
("allowedVias" "N/A")
("layerWidths" "N/A")
("viaNumCuts" "N/A")
("defSpacing" "N/A")
("refSpacing" "N/A")
("msTolerance" 33.33) <<<< Value has changed
("tranSpacing" "N/A")
("hierarchicalScope" nil)
)
ciConvertParamsToDPL
ciConvertParamsToDPL(l_params[?filtert_filter] [?noTypesSpecg_noTypesSpec] ) =>l_result
Description
Converts a constraint parameter list into a disembodied property list of parameter names and values. This function is the complement of ciConvertParamsDPLToParams. Converting the parameter list into a DPL makes it easier to change values in the list.
Arguments
Value Returned
|
The disembodied property list of parameter names and values. |
Example
symm->parameters
(("mirror" boolean 1)
("scope" enum "boundary")
("checkWithHalo" enum "nil")
("allowedLayers" string "N/A")
("allowedVias" string "N/A")
("layerWidths" string "N/A")
("viaNumCuts" string "N/A")
("defSpacing" string "N/A")
("refSpacing" string "N/A")
("msTolerance" float 20.0) <<<< Value to change
("tranSpacing" string "N/A")
("hierarchicalScope" enumset nil)
)
paramsDPL = ciConvertParamsToDPL(symmConParams) (nil mirror 1
scope "boundary" checkWithHalo nil allowedLayers "N/A"
allowedVias "N/A" layerWidths "N/A" viaNumCuts "N/A"
defSpacing "N/A" refSpacing "N/A" msTolerance 20.0
tranSpacing "N/A" hierarchicalScope nil)
paramsDPL->msTolerance = 33.33
ciConvertParamsDPLToParams(paramsDPL)
(("mirror" 1)
("scope" "boundary")
("checkWithHalo" nil)
("allowedLayers" "N/A")
("allowedVias" "N/A")
("layerWidths" "N/A")
("viaNumCuts" "N/A")
("defSpacing" "N/A")
("refSpacing" "N/A")
("msTolerance" 33.33) <<<< Value has changed
("tranSpacing" "N/A") ("hierarchicalScope" nil)
)
ciConvertToConArg
ciConvertToConArg(t_guiArg) =>l_result
Description
Converts a GUI-friendly parameter name (which can contain spaces) into a legal constraint parameter name (must not contain spaces).
Arguments
Value Returned
Example
ciConvertToConArg(stringToSymbol("Add Guard Ring"))
=> "addGuardRing"
ciCreateGuardRing
ciCreateGuardRing(g_cache g_modgen l_args) =>t_result
Description
Default function used by the Rapid Analog Prototype constraint generators for creating guard rings. If the modgen is already associated with a guard ring, ciCreateGuardRing updates the parameters of the existing guard ring.
Arguments
Value Returned
Example
guardRingArgs = list( nil stringToSymbol("MPP") "Metal3" stringToSymbol("Net") "net101"
stringToSymbol("Type") "ring"
stringToSymbol("Shape") "rectilinear"
stringToSymbol("Spacing") 0.25
)
modgen = ciConFind(cache "myModgen")
guardRing = ciCreateGuardRing(cache modgen guardRingArgs)
ciCreateModgen
ciCreateModgen(g_cache l_instsNetsPins s_structType l_args[?createModgenTemplateg_createModgenTemplate] ) =>templateID/constraintID
Description
A constraint generation utility function, which simplifies the process of generating modgens for specified structure types. This function calls expressions to create the modgen device pattern and guard ring that have been pre-registered for the specified structure type. For example, DiffPair and CurrentMirror.
This function will evaluate modgen pattern expression that have been pre-registered for the specified structure type as well as handling device abutment, what type of guardringto add and whether to add dummies or not.
It is also possible to register alternative modgen pattern expression using ciSetStructGeneratorExpressions().
In addition, the argument list supplied to supports separators to make the popup constraint generator options dialog easier to read. This will be achieved by using the 'separator argument type, as shown in the example below:
args = ( …
list("Guard Ring Options" 'separator)
…)
The argument list also supports expandable/collapsable groups of arguments. This will be achieved by using 'beginExpandedOptions/'endExpandedOptions argument types, as shown in the example below:
args = ( …
list("Guard Ring Options" 'beginExpandedOptions)
… guard ring args specified between begin/end …
list("Guard Ring Options" 'endExpandedOptions)
…)
In addition, it supports the 'hide parameter (optional) on each argument to control the visibility of the argument on the dialog. This will allow you to trim down and simplify the dialogs where default values of arguments are deemed sufficient and/or you should be prevented from altering these values, as shown in the example below:
args = ( …
list("Guard Ring Type" 'enum list("none" "ring" "pane" "ring") 'hide)
)
Arguments
Value Returned
|
The ID of the template generated when the |
|
|
The ID of the constraint generated when the |
Examples
Example 1
ciRegisterConstraintGenerator(list(nil 'name "Module (Diff Pair)"
'description "Generate Modgen Constraint for a Differential Pair"
'expression "ciCreateModgen(cache instsNetsPins 'DiffPair args)" <<<<
'addToToolbar t
'iconName "DiffPair"
'args "ciGetStructArgs('DiffPair)"
'menu "Rapid Analog Prototype"
)
)
This function is typically used when registering a new constraint generator.
Example 2
As shown in the example below, the new Module (Current Mirror) constraint generator calls the new ciCreateModgen() function for generating the Current Mirror specific modgen:
ciRegisterConstraintGenerator( list(nil 'name "Module (Current Mirror)" 'description "Generate Modgen Constraint for a Current Mirror" 'expression "ciCreateModgen(cache instsNetsPins 'CurrentMirror args ?createModgenTemplate t)" 'addToToolbar t 'iconName "CurrentMirror" 'args "ciGetStructArgs(`CurrentMirror)"
)
where, ciGetStructArgs('CurrentMirror) is a new CP function that returns a pre-registered list of constraint generator arguments for a CurrentMirror. A new CP registration function, ciSetStructArgs(<structSymbolName> <argsList>) allows you to add/modify/delete your own specific arguments for their structures. Functions provided for adding/updating/deleting a specific argument in the argument list are mentioned below:
ciAddStructArg(<structSymbolName> <argDef> ?afterArgName nil) ;;; add a new arg to end of args or after specified argnName
argDef = ciGetStructArg(<structSymbolName> <argName>) ;;; get a specified argument
ciReplaceStructArg(<structSymbolName> <argName> <argDef>) ;;; replace a specified argument
ciDeleteStructArg(<structSymbolName> <argName> ) ;;; delete a specified argument
For example, to change the default for the “Add GuardRing” Boolean option from nil to t:
addGuardRingArg = ciGetStructArg('CurrentMirror “Add GuardRing”) ;;; ("Add GuardRing" bool nil)
addGuardRingArg = list(car(addGuardRingArg) cadr(addGuarRingArg) t)
ciReplaceStructArg(‘CurrentMirror “Add GuardRing” addGuardRingArg)
ciCreateModgenDummy
ciCreateModgenDummy(g_cache d_refDev x_row x_col g_abut[?dummyNetToUsex_dummyNetToUse] [?orients_orient] [?dummyParamsl_dummyParams] [?extraParamsl_extraParams] ) =>l_result
Description
A utility function for creating a modgen member parameter for specifying a dummy device.
Arguments
Value Returned
|
A list of lists where each sublist is a modgen member parameter for the dummy device. |
Example
cv = geGetEditCellView()
refDev = dbFindAnyInstByName(cv "NM1")
ciCreateModgenDummy(cache refDev 3 5 t ?dummyNetToUse 2 ?orient R270)
("gpdk045/nmos2v/layout" master
(("row" 3)
("col" 5)
("abutment" t)
("dummyNetToUse" 2)
("orient" 'R270)
("dummyParams" "((w 1.000000e-06) (l 5.400000e-07) (fingers 2)
(fw 5.000000e-07))")
)
)
ciCreateModgenForStructure
ciCreateModgenForStructure(g_cache l_instsNetsPins s_structType l_args) =>l_modgen
Description
A function performs the same basic function as ciCreateModgen, but does not have the createModgenTemplate argument.
Arguments
Value Returned
|
A list containing the generated modgen constraint and optionally a guardring constraint. |
Example
Typically used when registering a new constraint generator that does not require template constraints to be created:
ciRegisterConstraintGenerator(list(nil 'name "Module (Diff Pair)"
'description "Generate Modgen Constraint for a Differential Pair"
'expression "ciCreateModgenForStructure(cache instsNetsPins 'DiffPair
args)"
'addToToolbar t
'iconName "DiffPair"
'args "ciGetStructArgs('DiffPair)"
'menu "Rapid Analog Prototype"
)
)
ciCreateRoutingLayerEnumString
ciCreateRoutingLayerEnumString(x_defLayerIndx) =>t_result
Description
Utility function for creating layer name enums, which will retrieve the list of layer names from the technology file and make layerNumber the default by adding the associated layer name to the end of the list.
Arguments
|
The layer index to be used as the default layer in the string list. |
Value Returned
|
A string containing the list of routing layers where the routing layer for |
Example
ciCreateRoutingLayerEnumString(2)
=> list("Metal1" "Metal2" "Metal3" "Metal4" "Metal5" "Metal6" "Poly" "Metal2")
ciDeleteClusterMembersWithinModgens
ciDeleteClusterMembersWithinModgens(g_cache) =>t
Description
A utility function for removing devices from cluster constraints if those devices are also members of a modgen.
Arguments
Value Returned
|
Returns |
Example
cluster = ciConCreate(cache 'cluster ?members '(("NM1" inst) ("NM2" inst) ("NM3" inst) ("NM4" inst)))
modgen = ciConCreate(cache 'modgen ?members '(("NM1" inst) ("NM2" inst)))
ciDeleteClusterMembersWithinModgens(cache)
Deleting member "NM1" from cluster "Constr_4" since it is also a member of modgen: "Constr_5"
Deleting member "NM2" from cluster "Constr_4" since it is also a member of modgen: "Constr_5"
cluster->members
(("NM3" inst nil)
("NM4" inst nil)
)
ciDeleteGuardRing
ciDeleteGuardRing(g_modgen) =>t/nil
Description
If the passed modgen constraint has a Guard Ring constraint associated with it then delete it.
Arguments
|
The modgen constraint whose Guard Ring constraint is to be deleted. |
Value Returned
Example
guardRingArgs = list( nil stringToSymbol("MPP") "Metal3" stringToSymbol("Net") "net101"
stringToSymbol("Type") "ring"
stringToSymbol("Shape") "rectilinear"
stringToSymbol("Spacing") 0.25
)
modgen = ciConFind(cache "myModgen")
guardRing = ciCreateGuardRing(cache modgen guardRingArgs)
ciDeleteGuardRing(modgen)
ciDeleteStructArg
ciDeleteStructArg(s_structType t_argName) =>t/nil
Description
Deletes the named argument from the registered argument list for the passed structType. See also, ciGetStructArgs, ciSetStructArgs, ciRegexReplaceStructArgs, ciAddStructArg, ciReplaceStructArg, and ciGetStructArg.
Arguments
Value Returned
Example
ciDeleteStructArg('GuardRing "Guard Ring Settings")
This function removes the Guard Ring options expander button.
ciDeleteSymmetriesWithinModgens
ciDeleteSymmetriesWithinModgens(g_cache) =>t/nil
Description
Removes the devices from symmetry constraints if those devices are also members of a modgen.
Arguments
Value Returned
|
Returns |
|
Example
symmetry = ciConCreate(cache 'symmetry ?members '(("NM1" inst) ("NM4" inst)))
modgen = ciConCreate(cache 'modgen ?members '(("NM1" inst) ("NM2" inst)))
ciDeleteSymmetriesWithinModgens(cache)
Deleting symmetry constraint "Constr_6" ((("NM1" inst nil) ("NM4" inst nil))) since some of its members are contained within a modgen: ("Constr_7") [(("NM1" inst) ("NM2" inst))]
=> t
ciExpandAndRepeatName
ciExpandAndRepeatName(t_name x_numRepetitions s_type) =>t/nil
Description
Expands iterated device names and repeats the expanded name the required number of times. The repetition is necessary where the iterated device is also M factored.
Arguments
Value Returned
|
The iterated device names were expanded and repeated the required number of times. |
|
|
The iterated device names could not be expanded and repeated. |
Example
ciExpandAndRepeatName("MN1<3:5>" 2 'inst)
=>'("MN1<3>" "MN1<3>" "MN1<4>" "MN1<4>" "MN1<5>" "MN1<5>")
ciExtractRowNumber
ciExtractRowNumber(t_rowString[?rowPrefixt_rowPrefix] ) =>t/nil
Description
Extracts the row number from a string of the form row followed by a rowNumber.
Arguments
Value Returned
|
Returns |
Examples
The following examples illustrate different uses of the ciExtractRowNumber SKILL command:
ciExtractRowNumber("row3")
=> 3
ciExtractRowNumber("col4")
=> nil
ciExtractRowNumber("col4" ?rowPrefix "col")
=> 4
ciFindDeviceArraysForDev
ciFindDeviceArraysForDev(d_dev) =>t/nil
Description
This function is used for extracting the list of devices which have the same master and are connected in series or parallel chains. This can be used to identify series/parallel resistors/capacitors. The bulk connections of these devices are ignored.
Arguments
|
Specifies the database ID of the device for which the series/parallel connections are required. |
Value Returned
|
Returns the list of series/parallel devices connected to the device for which the connections are required. |
|
Example
res = dbFindAnyInstByName(geGetEditCellView() "res1")
ciFindDeviceArraysForDev(res)~>name
'("res1" "res2" "res3" "res4")
ciGenerateArrayChannelDesc
ciGenerateArrayChannelDesc(g_cache l_devInfo l_pattern args) =>t_channelDesc
Description
Generates the Pin To Trunk routing information for Passive Device Array structures. This function is called as part of the constraint generation process in the routing expression for Passive Device Array structures which is registered by ciSetStructGeneratorExpressions('PassiveDeviceArray ...).
Arguments
Value Returned
|
Returns the Pin To Trunk routing description for a Passive Device Array structure. |
Example
ciSetStructGeneratorExpressions('PassiveDeviceArray make_ciStructGeneratorExpressions( ?pattern "ciGenerateBestFitPattern(devInfo args)" ?routing "when(pattern && args->Route ciGenerateArrayChannelDesc(cache devInfo pattern args))"
?guardRing guardRingExpr
))
ciGenerateBestFitPattern
ciGenerateBestFitPattern(l_devInfo args[?expandInstsg_expandInsts] [?forcedRowsx_forcedRows] ) =>l_pattern
Description
Generates the modgen member pattern (interdigitation) information for a Passive Device Array structure. This function is called as part of the constraint generation process in the pattern expression for Passive Device Array structures that are registered by ciSetStructGeneratorExpressions('PassiveDeviceArray ...).
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
|
Value Returned
Example
ciSetStructGeneratorExpressions('PassiveDeviceArray make_ciStructGeneratorExpressions( ?pattern "ciGenerateBestFitPattern(devInfo args)" ?guardRing guardRingExpr
))
ciGenerateCascodedCurrentMirrorChannelDesc
ciGenerateCascodedCurrentMirrorChannelDesc(g_cache l_devInfo l_pattern args) =>t_channelDesc
Description
This function is called as part of the constraint generation process and generates the Pin To Trunk routing information for a Cascoded Current Mirror structure. This function is called in the routing expression for Cascoded Current Mirrors structures which is registered by ciSetStructGeneratorExpressions('CascodedCurrentMirror ...).
Arguments
Value Returned
|
Returns the Pin To Trunk routing description for a Cascoded Current Mirror. |
Example
ciSetStructGeneratorExpressions('CascodedCurrentMirror make_ciStructGeneratorExpressions( ?pattern "ciGenerateCascodedCurrentMirrorPattern(devInfo args)" ?routing "when(pattern && args->Route ciGenerateCascodedCurrentMirrorChannelDesc(cache devInfo pattern args))" ?guardRing guardRingExpr
))
ciGenerateCascodedCurrentMirrorPattern
ciGenerateCascodedCurrentMirrorPattern(l_devInfo args) =>l_pattern
Description
This function is called as part of the constraint generation process and generates the modgen member pattern (interdigitation) information for a Cascoded Current Mirror structure. This function is called in the pattern expression for Cascoded Current Mirror structures which is registered by ciSetStructGeneratorExpressions('CascodedCurrentMirror ...).
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
|
Value Returned
|
The modgen member pattern which is a list of sublists where each sublist represents a row in the modgen. The sublist contains the device name, type, and optionally the parameters. |
Example
ciSetStructGeneratorExpressions('PassiveDeviceArray make_ciStructGeneratorExpressions( ?pattern "ciGenerateBestFitPattern(devInfo args)" ?guardRing guardRingExpr
))
ciGenerateCurrentMirrorChannelDesc
ciGenerateCurrentMirrorChannelDesc(g_cache l_devInfo l_pattern args) =>t_channelDesc
Description
This function is called as part of the constraint generation process and generates the Pin To Trunk routing information for a Current Mirror structure. This function is called in the routing expression for Current Mirror structures, which is registered by ciSetStructGeneratorExpressions('CurrentMirror ...).
Arguments
|
The constraint generator device information disembodied property list as returned by ciCollectDeviceInfo. |
|
|
The modgen member pattern, which is a list of sublists where each sublist represents a row in the modgen. The sublist contains the device name, type, and parameters (optionally). |
|
Value Returned
|
Returns the Pin To Trunk routing description for a Current Mirror structure. |
Example
ciSetStructGeneratorExpressions('CurrentMirror make_ciStructGeneratorExpressions( ?pattern "ciGenerateCurrentMirrorPattern(devInfo args)" ?routing "when(pattern && args->Route ciGenerateCurrentMirrorChannelDesc(cache devInfo pattern args))" ?guardRing guardRingExpr
))
ciGenerateCurrentMirrorPattern
ciGenerateCurrentMirrorPattern(l_devInfo args) =>l_pattern
Description
This function is called as part of the constraint generation process and generates the modgen member pattern (interdigitation) information for a Current Mirror structure. This function is called in the pattern expression for Current Mirror structures, which is registered by ciSetStructGeneratorExpressions('CurrentMirror ...).
Arguments
|
The constraint generator device information disembodied property list as returned by ciCollectDeviceInfo. |
|
Value Returned
|
The modgen member pattern, which is a list of sublists where each sublist represents a row in the modgen. The sublist contains the device name, type, and parameters (optional). |
Example
ciSetStructGeneratorExpressions('CurrentMirror make_ciStructGeneratorExpressions( ?pattern "ciGenerateCurrentMirrorPattern(devInfo args)" ?guardRing guardRingExpr
))
ciGenerateDiffPairChannelDesc
ciGenerateDiffPairChannelDesc(g_cache l_devInfo l_pattern args) =>t_channelDesc
Description
This function is called as part of the constraint generation process and generates the Pin To Trunk routing information for a Diff Pair structure. This function is called in the routing expression for Diff Pair structures, which is registered by ciSetStructGeneratorExpressions('DiffPair ...).
Arguments
Value Returned
|
Returns the Pin To Trunk routing description for a Diff Pair structure. |
Example
ciSetStructGeneratorExpressions('DiffPair make_ciStructGeneratorExpressions( ?pattern "ciGenerateDiffPairPattern(devInfo args)" ?routing "when(pattern && args->Route ciGenerateDiffPairChannelDesc(cache devInfo pattern args))" ?guardRing guardRingExpr
))
ciGenerateDiffPairPattern
ciGenerateDiffPairPattern(l_devInfo args) =>l_pattern
Description
This function is called as part of the constraint generation process and generates the modgen member pattern (interdigitation) information for a Differential Pair structure. This function is called in the pattern expression for Differential Pair structures, which is registered by ciSetStructGeneratorExpressions('DiffPair ...).
Arguments
|
The constraint generator device information disembodied property list as returned by |
|
Value Returned
|
The modgen member pattern, which is a list of sublists where each sublist represents a row in the modgen. The sublist contains the device name, type, and optionally the parameters. |
Example
ciSetStructGeneratorExpressions('DiffPair make_ciStructGeneratorExpressions( ?pattern "ciGenerateDiffPairPattern(devInfo args)" ?guardRing guardRingExpr
))
ciGenerateLargeMfactorPattern
ciGenerateLargeMfactorPattern(l_devInfo args) =>l_pattern
Description
This function is called as part of the constraint generation process and generates the modgen member pattern (interdigitation) information for a Large Mfactor structure. This function is called in the pattern expression for Large Mfactor structures, which is registered by ciSetStructGeneratorExpressions('LargeMfactor ...).
Arguments
|
The constraint generator device information disembodied property list as returned by |
|
Value Returned
|
The modgen member pattern which is a list of sublists where each sublist represents a row in the modgen. The sublist contains the device name, type, and optionally the parameters. |
Example
ciSetStructGeneratorExpressions('LargeMfactor make_ciStructGeneratorExpressions( ?pattern "ciGenerateLargeMfactorPattern(devInfo args)" ?guardRing guardRingExpr
))
ciGetGuardRing
ciGetGuardRing(g_modgen) =>g_guardRing
Description
Returns the guard ring constraint associated with the passed modgen constraint, if it has one.
Arguments
|
The modgen constraint for which the guardring has to be determined. |
Value Returned
|
Returns the guard ring associated with the passed modgen or |
Example
guardRingArgs = list( nil stringToSymbol("MPP") "Metal3" stringToSymbol("Net") "net101" stringToSymbol("Type") "ring" stringToSymbol("Shape") "rectilinear" stringToSymbol("Spacing") 0.25
)
modgen = ciConFind(cache "myModgen")
guardRing = ciCreateGuardRing(cache modgen guardRingArgs)
ciGetGuardRing(modgen) == guardRing
t
ciGetGuardRingMPPName
ciGetGuardRingMPPName(d_dev) =>t_mppName
Description
This function returns the registered technology file Guard Ring MPP name for the passed device based on the device type (nfet or pfet).
The Guard Ring MPP name lists are by default registered as follows:
The "pfet" and "nfet" device name lists should be registered with ciRegisterDevice and this is normally loaded at PDK load time.
Arguments
Value Returned
|
The technology file MPP name string for this type of device (" |
Examples
ciGetGuardRingMPPName("NM1")
=> "N-Tap"
ciGetGuardRingMPPName("PM1")
=> "P-Tap"
ciGetParamValFromParameters
ciGetParamValFromParameters(t_paramName l_params[?valPosx_valPos] ) =>l_val/nil
Description
Retrieves the specified parameter value from a constraint parameter list. It can be used to retrieve values of constraint parameters or constraint member parameters.
Arguments
Value Returned
Example
symmCon = ciConFind("mySymmetryConstraint") ci:0x27a175f0 symmCon->parameters (("mirror" boolean 1) ("scope" enum "boundary")
("checkWithHalo" enum "nil")
("allowedLayers" string "N/A")
("allowedVias" string "N/A")
("layerWidths" string "N/A")
("viaNumCuts" string "N/A")
("defSpacing" string "N/A")
("refSpacing" string "N/A")
("msTolerance" float 20.0)
("tranSpacing" string "N/A")
("hierarchicalScope" enumset nil)
)
ciGetParamValFromParameters("msTolerance" symmCon->parameters)
20.0
ciGetRoutingLayer
ciGetRoutingLayer(t_layerName) =>d_layerId/nil
Description
Retrieves the named routing layer from the technology file associated with the current window. See also, ciGetTechFile, ciGetRoutingLayers, techGetLayerNum, techGetLayerMaskNumber, techFindLayer, and techGetLayerFunctions.
Arguments
Value Returned
Example
metal1 = ciGetRoutingLayer("Metal1")
metal1->number
30
ciGetRoutingLayers
ciGetRoutingLayers(
)
=> l_layerNames
Description
Retrieves the names of all the routing layers from the technology file associated with the current window. See also ciGetTechFile, ciGetRoutingLayer, techGetLayerNum, techGetLayerMaskNumber, techFindLayer, and techGetLayerFunctions.
Arguments
Value Returned
Example
ciGetRoutingLayers()
=> ("Metal1" "Metal2" "Metal3" "Metal4" "Metal5"
"Metal6" "Metal7" "Metal8" "Metal9" "Metal10"
"Metal11" "Poly"
)
ciGetRule
ciGetRule(t_layerName t_ruleName g_defVal) =>g_ruleValue/g_defVal
Description
Retrieves the required rule value from the technology file. If the rule cannot be found, then the default value is returned.
Arguments
|
A default value in case the rule is not found. If a default is not specified then an error will be reported if the rule is not found. |
Value Returned
Examples
-
Retrieves the named rule on the named layer.
ciGetRule("Metal1" "minWidth" 0.1)
=> 0.06
-
Returns the default value.
ciGetRule("Metal1" "minWidth" 0.123)
=> 0.123
-
Returns the default value.
ciGetRule("Metal2" "minWidth" 0.123)
=> 0.3
ciGetStructArg
ciGetStructArg(s_structType t_argName) =>l_argDef
Description
Retrieves the named structure argument for the specified structure type. See also, ciSetStructArgs, ciGetStructArgs, ciReplaceStructArg, ciAddStructArg, and ciDeleteStructArg.
Arguments
|
The structure type from which the named argument is retrieved. |
|
Value Returned
Example
ciGetStructArg('DiffPair "Gate Width")
("Gate Width" 'float "ciGetRule(cadr(ciGetRoutingLayers()) \"minWidth\" 0.1)*ciGetStructPDKMult('DiffPair)")
ciGetStructArgs
ciGetStructArgs(s_structType) =>l_argDef
Description
Retrieves all the structure arguments for the specified structure type. See also, ciSetStructArgs, ciGetStructArg, ciReplaceStructArg, ciAddStructArg, and ciDeleteStructArg.
Arguments
|
The structure type for which all arguments are to be retrieved. |
Value Returned
|
The list of registered arguments for the passed structure type. |
Example 1
ciGetStructArgs('DiffPair) (("Style" 'enum "\"Auto row1 row2symmetric MultiRowMatched\"") ("Add Dummies" 'bool nil)
("Abut All" 'bool t)
("Guard Ring" 'separator)
("Add GuardRing" 'bool nil)
("Settings" 'beginExpandedOptions nil)
("Type" 'enum "\"ring pane\"")
("Shape" 'enum "\"rectangular rectilinear\"")
....
Example 2
ciGetStructArgs(‘Dummies) ->
list( list("Add Dummies“ `bool nil))
ciGetStructArgs(‘Abutment) ->
list( list("Abut All" `bool t))
ciGetStructArgs(‘GuardRing) ->
list( list(“Guard Ring" `separator) ;;; Adds a separator into the GUI -- Guard Ring ---------- list("Add Guard Ring” `bool nil) list(“Settings" `beginExpandedOptions nil) ;; Adds an expander >>> into the GUI list(“Type” `enum “\“ring pane\””) list(“Shape” `enum “\”rectangular rectilinear\””) list(“Net” `enum “buildString(ciGetMembersOfType(instsNetsPins 'net ?includeType nil))”) list(“Spacing” `float “0.0”) list(“MPP” `enum "strcat(buildString(techGetMPPTemplateNames(ciGetTechFile())) \" \" ciGetGuardRingMPPName(car(ciInstsNetsPinsToDevInfo(cache instsNetsPins)-
>devs)->dbId))")
list("Fluid Guard Ring" `separator) ;;; Adds a separator into the GUI -- Fluid
Guard Ring ----------
list(“Use Fluid" `bool nil)
list(“Device” `enum "buildString(ciGetMembersOfType(instsNetsPins 'inst
?includeType nil))")
list(“Width” `float0.0)
list(“Use Min DRC For Spacing” `bool nil)
list(“Settings" `endExpandedOptions nil)
As shown above, ciGetStructPDKMult(structType) returns a PDK dependent multiplier, which can be applied to the values returned by ciGetRule(). This function returns 1.0 when called with structType set to default.
In addition, different multipliers can be set for different structTypes and PDKs using ciSetStructPDKMult(structType pdkName multiplier), for example, ciSetStructPDKMult('CurrentMirror "gpdk045" 1.0).
ciGetStructGeneratorExpressions
ciGetStructGeneratorExpressions(s_structType) =>r_expressions
Description
Retrieves the constraint generator expressions registered for the passed structure type. The generator expressions are returned within a ciStructGeneratorExpressions def struct. These expressions are evaluated by the ciCreateModgen SKILL function during modgen creation and modification. See also, ciSetStructGeneratorExpressions, ciListStructGeneratorExpressions, and ciCreateModgen.
Arguments
|
The structure type from which the expressions are retrieved. |
Value Returned
|
A |
Example
ciGetStructGeneratorExpressions('CurrentMirror)~>??
(
pattern "ciGenerateCurrentMirrorPattern(devInfo args)"
guardRing "when(args->\"Add GuardRing\" ciCreateGuardRing(cache modgen args))"
modgenPreCreateOrModify "modgenParams = ciMergeParams(modgenParams list(list(\"mergeLayer\" args->\"Merge Layer\")))"
modgenPostCreateOrModify "reorderModgenMembersByDeviceMapping(modgen args->\"Device Mapping\")"
)
For a complete description of these fields, see ciSetStructGeneratorExpressions.
ciGetStructPDKMult
ciGetStructPDKMult(s_structType) =>x_pdkMult
Description
Retrieves the PDK specific multiplier for the passed structure type. The PDK name is determined from the technology file associated with the current window. If multiplier has been registered then the default value of 1.0 will be returned. The PDK multipliers are typically used within constraint generator argument expressions to scale the values in a PDK independent way. See also, ciSetStructPDKMult.
Arguments
|
The structure type from which the PDK multiplier are retrieved. |
Value Returned
Examples
ciGetStructPDKMult('DiffPair)
=>1.25
ciGetStructPDKMult('CurrentMirror)
=>1.0
ciGUIArgsToConArgs
ciGUIArgsToConArgs(l_guiArgs) =>t_conArgs
Description
A simple wrapper around ciConvertToConArg for converting disembodied property lists of GUI args to a list of list of lists where each sublist is a constraint parameter list.
Arguments
Value Returned
|
Returns the list of lists where each sublist is a constraint parameter list. |
Example
ciGUIArgsToConArgs(list(nil stringToSymbol("Gate Layer") "Metal1"
stringToSymbol("Gate Width") 0.1))
=> list(list("gateLayer" "Metal1") list("gateWidth" 0.1))
ciHighestLevelNet
ciHighestLevelNet(t_lowerLevelNetName) =>l_higherLevelNetInfo
Description
This function returns the dbId of the highest level net associated with the passed lower level hierarchical net name. If the net is local to the cellview, which is contained within then the function returns info on that net. See also ciResolveNet.
Arguments
Value Returned
|
A disembodied property list containing the hierarchical path to the higher level net and the |
Example
netInfo = ciHighestLevelNet("/I60/IN")
netInfo~>??
(nil hierPath "" net db:0x2034f51c)
netInfo->net->name
"REF"
ciListStructGeneratorExpressions
ciListStructGeneratorExpressions(
)
=> l_structureExpressions
Description
Returns a list of all the registered structure generator expressions that are returned within a ciStructGeneratorExpressions def struct. These expressions are evaluated by the ciCreateModgen SKILL function during modgen creation and modification. See also, ciSetStructGeneratorExpressions, ciGetStructGeneratorExpressions, and ciCreateModgen.
For a full description of the fields of the ciStructGeneratorExpressions def struct, see ciSetStructGeneratorExpressions.
Arguments
Value Returned
|
A list of lists where each sub-list contains the structure type and its |
Example
ciListStructGeneratorExpressions() ((CascodedCurrentMirror ciStructGeneratorExpressions@0x224c3518) (CurrentMirror ciStructGeneratorExpressions@0x224c3500) (DiffPair ciStructGeneratorExpressions@0x224c34e8) (LargeMfactor ciStructGeneratorExpressions@0x224c34b8) (PassiveDeviceArray ciStructGeneratorExpressions@0x224c34d0)
)
ciListStructPDKMults
ciListStructPDKMults(
)
=> g_pdkMults
Description
This function prints a list of all the registered structure PDK multipliers and returns a table of the registered structure type/PDK combinations. See also, ciSetStructPDKMult and ciGetStructPDKMult.
Arguments
Value Returned
|
A table of PDK multipliers for each registered structure type/PDK combination. |
Example
pdkMultTable = ciListStructPDKMults() DiffPair.gpdk045 : 1.25
DiffPair.gpdk090 : 1.25
CurrentMirror.gpdk090 : 1.0
CurrentMirror.gpdk045 : 1.0
CascodedCurrentMirror.gpdk045 : 1.0 CascodedCurrentMirror.gpdk090 : 1.0 LargeMfactor.gpdk090 : 1.0
LargeMfactor.gpdk045 : 1.0
Default. : 1.0
ciListStructTypes
ciListStructTypes( [?excludel_exclude] ) =>l_structSymbols
Description
Returns a list of the registered structure types used by the Circuit Prospector. See also, ciSetStructArgs, ciGetStructArgs, ciReplaceStructArg, ciSetStructPDKMult ciAddStructArg, ciGetStructArg, ciReplaceStructArg, ciDeleteStructArg, and ciRegexReplaceStructArgs.
Arguments
Value Returned
Examples
ciListStructTypes()
=>
(Abutment CascodedCurrentMirror CurrentMirror DiffPair Dummies GuardRing LargeMfactor NegativeSupply OrientationVertical PassiveDeviceArray PositiveSupply Supply)
ciListStructTypes(?exclude '(Abutment Dummies GuardRing Supply))
=>
(CascodedCurrentMirror CurrentMirror DiffPair LargeMfactor NegativeSupply OrientationVertical PassiveDeviceArray PositiveSupply)
ciListTemplateTypes
ciListTemplateTypes(
)
=> l_templateTypeList
Description
Generates a list of the current constraint template types dictionary, outputs its details.
For each constraint template type is listed:
- The name of the type
-
A list of the legal template constraint parameters, which contains:
- The parameter name
- Its data type name
- A default value
- A range of allowed values that constraint the parameter's range of values for a given data type.
- SKILL Expressions (optional), and their current evaluation result: In the case of a parameter defined by SKILL expressions, a "dynamic parameter", its default value, or range of allowed values are defined dynamically, by SKILL expressions. These expressions can be currently evaluated or not yet evaluated.
The keyword evaluated or nonevaluated indicates whether the expressions are currently evaluated or at the opposite are not yet evaluated.
Arguments
Value Returned
Example
Prerequisite: Open a schematic with VSE XL or layout with Layout XL.
ciListTemplateTypes()
(("CurrentMirror" ;; template type name
(("Style" enum nil enum "\"Auto SingleRow DoubleRow\"" ;;example of enum
parameter with an enum choice definition.
unevaluated
)
("Add Dummies" boolean nil boolean "nil"
unevaluated
)
("Abut All" boolean nil boolean "t" ;; example of boolean type parameter,
with a nil default value
unevaluated
)
("Add GuardRing" boolean nil boolean "nil"
unevaluated
)
("Type" enum nil enum "\"ring pane\""
unevaluated
)
("Shape" enum nil enum "\"rectangular rectilinear\""
unevaluated
)
("Spacing" float nil float "0.0"
unevaluated
)
("Left Spacing" float nil float "0.0"
unevaluated
)
("Right Spacing" float nil float "0.0"
unevaluated
)
("Top Spacing" float nil float "0.0"
unevaluated
)
("Bottom Spacing" float nil float "0.0"
unevaluated
)
("MPP" enum nil enum "strcat(buildString(ciGetTechMPPNames()))" ;; example
of enum parameter whose enum choices are defined by a SKILL expression.
unevaluated ;; this parameter's expressions are currently unevaluated.
)
("Use Fluid" boolean nil boolean "nil"
unevaluated
)
("Width" float nil float "0.0"
unevaluated
)
("Use Min DRC for Spacing" boolean nil boolean "nil"
unevaluated
)
)
)
("matchNewCB"
(("strength" enum nil enum "\"low\""
"list(\"low\" \"medium\" \"high\")" unevaluated
)
("doubleNoDefault" float 0.0)
("doubleWDefault" float nil float "3.45"
"2.4" unevaluated
)
("doubleWDefault2" float nil float "1.4"
"0.2" "4.4" unevaluated
)
("intNoDefault" int 0)
("intWDefault" int nil int "4"
"2" unevaluated
)
("intWDefault2" int nil int "4"
"2" "7" unevaluated
)
) ))
ciMemberIndexToModgenPatternSymbol
ciMemberIndexToModgenPatternSymbol(x_memIndx) =>t_patternSymbol
Description
This function returns the modgen pattern symbol for a member where member index is the count of the number of unique member names that have so far been processed in the list of members.
Arguments
Value Returned
Examples
ciMemberIndexToModgenPatternSymbol(0)
=> "A"
ciMemberIndexToModgenPatternSymbol(1)
=> B
ciMemberIndexToModgenPatternSymbol(2)
=> C
ciMemberIndexToModgenPatternSymbol(26)
=> A1
ciMemberIndexToModgenPatternSymbol(55)
=> D2
ciMemberIndexToModgenPatternSymbol(500)
=> G19
ciModgenDummyNetName
ciModgenDummyNetName(l_devInfo) =>t_dummyNetName
Description
Determines the modgen dummy net name based on bulk connectivity of the specified devices or the power/ground nets in the design. See also, ciCreateModgenDummy.
Arguments
|
The modgen device information as created by ciCollectDeviceInfo. |
Value Returned
Example
devInfo = ciCollectDeviceInfo(cache '(("MN0" inst) ("MN1" inst)) )
dummyNetName = ciModgenDummyNetName(devInfo)
"VDD"
ciNumDevices
ciNumDevices(g_cache l_devPath) =>x_numDevs
Description
Returns the number of physical devices for a given device name in the schematic, which effectively retrieves the mfactor for the device.
Arguments
|
A list containing the full path to the device and the member type. |
Value Returned
Example
ciNumDevices(cache list("/I1/MN1" 'inst))
=> 4
ciPadModgenPattern
ciPadModgenPattern(l_pattern x_rowCount x_colCount[?addDummiesl_addDummies] ) =>l_pattern
Description
Adds any missing elements in the modgen pattern list for the specified row and column counts.
Arguments
|
The modgen pattern which is a list containing two sub-lists. The first sub-list represents the device pattern in each row and the second sub-list represents the device orientations in each row. |
|
Value Returned
Examples
ciPadModgenPattern( list(list( '( A B ) '( C D ) ) list( '( R0 R0 ) '( MX MX ))) 3 3)
=>(((A B \-) (C D \-) (\- \- \-)) ((R0 R0 \-) (MX MX \-) (\- \- \-)))
Modgen has 3 rows and 3 columns but the pattern only specifies 2 rows and 2 columns.
ciRegexReplaceStructArgs
ciRegexReplaceStructArgs(l_args t_regularExpr t_toStr) =>l_newArgs
Description
For the passed constraint generator argument list replace any strings matching the passed regular expression with the passed string replacement. This function is useful for customizing the default constraint generator arguments registered for a given structure. See also, ciGetStructArgs, ciSetStructArgs, ciReplaceStructArg, ciAddStructArg, ciDeleteStructArg, and ciGetStructArg.
Arguments
|
A regular expression to be matched within the passed constraint generator args. |
|
Value Returned
|
The updated constraint generator arguments (the original args are unchanged). |
Example
To update the current mirror structure args to use a current mirror specific PDK multiplier instead of the default:
ciRegexReplaceStructArgs(currentMirrorArgs "ciGetStructPDKMult('Default)" "ciGetStructPDKMult('CurrentMirror)")
ciReinitStructTemplateDefs
ciReinitStructTemplateDefs(
)
=> l_templateStructTypesInitialized
Description
Re-initializes the template definitions created by the Circuit Prospector for registered structures. This is necessary if any of the structure arguments are modified. Typically, these modifications will be in the libInit.il file loaded when the PDK library is loaded or in a .cdsinit file.
See also, ciListStructTypes, ciSetStructArgs, ciGetStructArgs, ciReplaceStructArg, ciSetStructPDKMult, ciAddStructArg, ciGetStructArg, ciReplaceStructArg, ciDeleteStructArg, and ciRegexReplaceStructArgs.
Arguments
Value Returned
|
A list of the structure type symbols that have had their template definitions re-initialized. |
|
Example
ciReinitStructTemplateDefs()
=>
(CascodedCurrentMirror CurrentMirror DiffPair LargeMfactor PassiveDeviceArray)
ciRemoveSymmetricPinAlignments
ciRemoveSymmetricPinAlignments(g_cache) =>t/nil
Description
This utility function used by the Rapid Analog Prototype Enforce Precedence constraint generator to remove alignment constraints on symmetric pins.
Arguments
|
The constraints cache for which alignment constraints are to be removed. |
Value Returned
Example
mapcar(lambda((con) list(con->type mapcar(lambda((mem) car(mem)) con->members) ) ) cache->constraints)
((alignment ("vcom:5" "vcop:3"))
(symmetry ("vcom:5" "vcop:3")))
ciRemoveSymmetricPinAlignments(cache)
mapcar(lambda((con) list(con->type mapcar(lambda((mem) car(mem)) con->members) ) ) cache->constraints)
((symmetry ("vcom:5" "vcop:3")))
ciReplaceStructArg
ciReplaceStructArg(s_structType t_argName l_newArg) =>t/nil
Description
For the passed structure type this function replaces the named constraint generator argument with a new argument definition. See also, ciGetStructArgs, ciSetStructArgs, ciRegexReplaceStructArgs, ciAddStructArg, ciDeleteStructArg, and ciGetStructArg.
Arguments
Value Returned
Examples
ciReplaceStructArg('DiffPair "Add GuardRing" list("GuardRing" `bool t)
Enables the addition of guard rings by default for DiffPair structures.
ciSaveConstraintGenerator
ciSaveConstraintGenerator(t_constraintGeneratorName) =>t/nil
Description
Saves a constraint generator in the .cadence/dfII/ci/generators directory with the name given to it. The spaces in the constraint generator’s name are replaced by underscores.
Arguments
Value Returned
|
The constraint generator was successfully saved in the default directory. |
|
Examples
To save constraint generator named Module (Current Mirror), use the following SKILL command:
ciSaveConstraintGenerator("Module (Current Mirror)")
This saves the given constraint generator at .cadence/dfII/ci/generators/Module_(Current_Mirror).il
ciSetStructArgs
ciSetStructArgs(s_structType l_args) =>t/nil
Description
Sets the constraint generator arguments for the passed structure type. See also, ciGetStructArgs, ciRegexReplaceStructArgs, ciAddStructArg, ciDeleteStructArg. ciReplaceStructArg, and ciGetStructArg.
Arguments
|
A list of lists defining the constraint generator arguments for the given structure where each sub-list is in the form list |
Value Returned
|
The constraint generator argument for the passed structure type successfully set. |
|
|
Failed to set the constraint generator argument for the passed structure type. |
Examples
The following examples illustrate the use of the ciSetStructArgs SKILL command:
Example 1
ciSetStructArgs('DiffPair append( append( append( append( list(list("Style" `enum "\"Auto row1 row2symmetric MultiRowMatched\""))
ciGetStructArgs('Dummies)) ciGetStructArgs('Abutment)) ciGetStructArgs('GuardRing)) "ciGetStructPDKMult('Default)" "ciGetStructPDKMult('DiffPair)")
)
)
To simplify the definition of structures that require dummies, abutment, and guardRings, sets of arguments are pre-registered for each of these using the struct types, Dummies, Abutment, and GuardRing. For example,
ciSetStructArgs('CurrentMirror append( append( append( append(list(list("Style" `enum "\"Auto SingleRowDoubleRow"\")) ciGetStructArgs(Dummies)) ciGetStructArgs(Abutment)) ciGetStructArgs(GuardRing)) )
)
Example 2
ciSetStructArgs('Cascode append( list( list("Style" `enum "\"Auto SingleRow DoubleRow\""))
append( ciGetStructArgs('Dummies)
append( ciGetStructArgs('Abutment)
append( ciGetStructArgs('GuardRing)
ciRegexReplaceStructArgs(ciGetStructArgs('"ciGetStructPDKMult
ciGetStructPDKMult( Default)" "ciGetStructPDKMult(‘Cascode)"))))
)
)
As shown above, this function registers the arguments for this structure type.
ciSetStructGeneratorExpressions
ciSetStructGeneratorExpressions(s_structType r_structExpressions) =>t/nil
Description
Sets the constraint generator expressions for the passed structure type. The generator expressions are specified within a ciStructGeneratorExpressions def struct. These expressions are evaluated by the ciCreateModgen function during modgen creation and modification. See also, ciGetStructGeneratorExpressions, ciListStructGeneratorExpressions, and ciCreateModgen.
Arguments
Value Returned
|
The constraint generator expressions for the passed structure type set successfully. |
|
|
Failed to set the constraint generator expressions for the passed structure type. |
Example
ciSetStructGeneratorExpressions('DiffPair
make_ciStructGeneratorExpressions(
?pattern "ciGenerateDiffPairPattern(devInfo args)"
?guardRing "ciCreateGuardRing(cache modgen args)"
?routing "args->Route"
?topology "topology = createDiffPairTopology(cv modgen devInfo modgenPattern modgenPatternColumnised)"
?modgenPreCreateOrModify "modgenParams = ciMergeParams(modgenParams list(list(\"mergeLayer\" args->\"Merge Layer\")))"
?modgenPostCreateOrModify "reorderModgenMembersByDeviceMapping(modgen args->\"Device Mapping\")"
))
-
?patternis an expression for generating the interdigitation pattern from the passed devices. The expression should return a list of lists where each sub-list represents a row in the pattern. The sub-list should be a list of device names for that row and optionally device modgen parameters. For example, to specify a"ABBA/BAAB"pattern, this function will return:'(
("MN0" "MN1" "MN1" "MN0")
("MN1" "MN0" "MN0" "MN1")
)
The device name in the list can be a simple string as above or it can be a list in normal constraint member form that can contain member parameters, for example,'(
(("MN0" 'inst (("horiCustomSpacing" 0.123))) "MN1" "MN1" "MN0")
("MN1" "MN0" "MN0" "MN1")
)
Dummies are represented by"*"and gaps are represented by"-".For example,'(
("*" "MN0" "MN1" "-" "MN1" "MN0" "*")
("*" "MN1" "MN0" "-" "MN0" "MN1" "*")
)
-
?guardRingis an expression for creating a guard ring for the modgen using the specified arguments, for example,ciCreateGuardRing(cache modgen args). -
?routingis an expression that should evaluate totornilto indicate whether modgen routing is required. -
?topologyis an expression that generates the database topology objects for a modgen. This expression will be evaluated only if the?routingexpression returnst. The expression should assign the topology to the topology variable. -
?modgenPreCreateOrModifyis an expression to be evaluated before modgen creation or modification. This is used for updating the modgen parameters. For example, supplying additional parameters such asmergeLayers.Therows,columns,pattern, androuteStyleparameters are automatically derived byciCreateModgen(). The expression should reference and updatemodgenParamsthat is the parameters list in the usual constraint parameter form, that is, a list of sub-lists where each sub-list is of the form(<paramName> <paramValue>). -
?modgenPostCreateOrModifyis an expression to be evaluated after the modgen has been created or modified, but before it has been routed. This allows for any final modgen modifications before it is routed. For example, the GenericModgen generator reorders members to match the symbol mapping, or the user-defined function,reorderModgenMembersByDevicMapping(), in the example code above has been written for reordering the members to achieve the desired device mapping in the modgen.
The ciCreateModgen() function will call expressions to create the modgen device pattern and guard ring. These expressions will be pre-registered for each of the structure types.
It is possible to register alternative modgen pattern, and guard ring expressions using ciSetStructGeneratorExpressions().
A SKILL structure ciStructGeneratorExpressions is defined with pattern and guard ring fields. These fields will be SKILL expressions that will be called to generate the modgen device pattern, and guardring.
By default, the MOS Current Mirror generator expressions will be registered as mentioned below:
ciSetStructGeneratorExpressions('CurrentMirror make_ciStructGeneratorExpressions( ?pattern "ciGenerateCurrentMirrorPattern(devInfo args)"
?guardRing "when(args->\"Add GuardRing\" ciCreateGuardRing(cache modgen
args))"
)
)
-
ciGenerateCurrentMirrorPattern()returns either single row or double row device pattern lists dependent on the settings in the generator arguments. -
ciCreateGuardRing()creates a guard ring for the modgen based on the guard ring settings in the passed generator arguments.
As shown above, the following function registers the generator expressions for this structure type:
ciSetStructGeneratorExpressions('Cascode make_ciStructGeneratorExpressions( ?pattern "generateCascodeModgenPattern(devInfo args)" ?guardRing "when(args->\”Add GuardRing\” createCascodeGuardRing(cache modgen args))"
)
)
Pattern Field Expression
The pattern field expression of the ciStructGeneratorExpressions structure should evaluate to a list of lists where each sub-list represents a row in the modgen and contains device names and optionally, a list of modgen device parameters.
The format of the device names and parameters is similar to that is used when specifying the members when calling ciConCreate(), although the member type is not required.
The registered pattern expression can reference the cache, devInfo, and arguments as variables where, devInfo is the device information DPL returned by the new ciCollectDeviceInfo() function and arguments are disembodied property list containing the constraint generator arguments and values specified when the constraint generator was run.
For example, to represent the pattern ABBA/BAAB for a diff pair with mfactor 4, with devices named MN1 and MN2, and custom spacings for some of the devices in the pattern the pattern list would be:
'( ((“MN1” ((“horizontalCustomSpacing” 0.2))) (“MN2” ((“horizontalCustomSpacing” 0.3))) (“MN2”) (“MN1”))
((“MN2” ((“horizontalCustomSpacing” 0.2))) (“MN1” ((“horizontalCustomSpacing” 0.3))) (“MN1”) (“MN2”)) )
The ciCreateModgen() function takes this information and assign the correct row/column numbers and modgen pattern string for the modgen being created.
The devs field of the devInfo variable is a list of disembodied property lists where each disembodied property list contains PDK independent information about a device in the structure. This information can be used to generate the required modgen pattern lists.
For example, to generate a single row modgen containing all devices in the structure you could write the following procedure:
procedure( createSingleRowPattern(cache devInfo args) let( (pattern row) row = list()
foreach(dev devInfo->devs
for(m 1 dev->mFactor
row = cons(dev->name row )
)
)
pattern = list(reverse(row))
)
)
Then, set the pattern expression field of the ciStructGeneratorExpressions structure to call this function, as shown below:
genExprs = ciGetStructGeneratorExpressions('CurrentMirror)
genExprs->pattern = “createSingleRowPattern(cache devInfo args)”
ciSetStructGeneratorExpressions('CurrentMirror genExprs)
You can also use of the devInfo disembodied property list, as shown in the example below:
;;; ABBA ;;; BAAB ;;; ;;; Note args contains user defined properties spacing1 g p p p g and spacing2 for specifying the device spacings ;;; procedure( ciDiffPairPatternMFactor4( cache devInfo args) prog( (devA devB row0 row1 pattern) unless(length(devInfo->devs) == 2 warn(“Wrong number of devices\n”)
return())
devA = car(devInfo->devs)
devB = car(devInfo->devs)
unless(devA->mFactor == 4 && devB->mFactor == 4 warn(“wrong mfactor”)
return())
row0 = list( list(devA->name args->spacing1) list(devB->name args
->spacing2)
list(devB->name) list(devA->name))
row1 = list( list(devB->name args->spacing1) list(devA->name args
->spacing2)
list(devA->name) list(devB->name))
pattern = list(row0 row1)
return(pattern)
)
)
GuardRing Field Expression
The guardRing field of the ciStructGeneratorExpressions structure should be an expression that generates a guard ring for the passed modgen based on the guard ring settings in the passed generator arguments.
By default, the guardRing expression for all structure types will be registered as:
"when(args->\"Add GuardRing\" ciCreateGuardRing(cache modgen args))"
The example below shows how to register alternative guard ring generator expressions for structure types:
procedure( createGuardRing(cache modgen args) let( (guardRingNet guardRingMembers guardRingParams guardRing) when(args->"Add GuardRing"
guardRingNet = list(args->Net 'net list( list("shape" args->Shape)
list("spacing" args->Spacing) list("mppName" args->MPP)))
guardRingMembers = list(list(modgen->name 'modgen) guardRingNet)
guardRingParams = list( list( "type" args->Type ) )
guardRing = ciConCreate(cache 'powerStructure ?members
guardRingMembers ?params
guardRingParams ?verbose nil)
)
)
)
genExprs = ciGetStructGeneratorExpressions(‘CurrentMirror)
genExprs->guardRing = "createGuardRing(cache modgen args)"
ciSetStructGeneratorExpressions(‘CurrentMirror genExprs)
ciSetStructPDKMult
ciSetStructPDKMult(s_structType t_pdkName f_pdkMultiplier) =>t
Description
Sets the PDK specific multiplier for the passed structure type and PDK name. The PDK multipliers are typically used within constraint generator argument expressions to scale the values in a PDK independent way. See also, ciGetStructPDKMult.
Arguments
|
The structure type for which the PDK multiplier is retrieved. |
|
Value Returned
|
Sets the PDK specific multiplier for the passed structure type and PDK name. |
Examples
ciSetStructPDKMult('DiffPair "gpdk090" 1.15)
ciSetStructPDKMult('DiffPair "gpdk045" 1.75)
ciSortDeviceInfoByFingerWidth
ciSortDeviceInfoByFingerWidth(l_devInfo) =>l_sortedDevInfo
Description
Returns devs ordered by finger width. The device with the largest finger width will appear first in the list.
A prerequisite for this to work is that the device finger width parameter name should have been registered using ciMapParam. To check the parameter has been registered type ciPrintMappedParams and look at the parameter names registered for fingerWidth.
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
Value Returned
|
Sorted device info where the device with the largest finger width will appear first in the list. |
Example
devInfo = ciCollectDeviceInfo(cache '(("MN1" inst) ("MN2" inst) ("MN3" inst)))->devs mapcar(lambda((dev) list(dev->name dev->fingerWidth)) devInfo) (("MN1" 1.1e-05) ("MN2" 1.8e-05) ("MN3" 1.4e-05)) sortedDevInfo = ciSortDeviceInfoByFingerWidth(devInfo) mapcar(lambda((dev) list(dev->name dev->mFactor)) sortedDevInfo) (("MN2" 1.8e-05) ("MN3" 1.4e-05) ("MN1" 1.1e-05))
ciSortDeviceInfoByMfactor
ciSortDeviceInfoByMfactor(l_devInfo) =>l_sortedDevInfo
Description
Returns devices ordered by mfactor. The device with the largest mfactor will appear first in the list.
A prerequisite for this to work is that the device mfactor parameter name should have been registered using ciMapParam. To check the parameter has been registered ciPrintMappedParams and look at the parameter names registered for mFactor.
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
Value Returned
|
The devices ordered by mfactor. The device with the largest mfactor will appear first in the list. |
Example
devInfo = ciCollectDeviceInfo(cache '(("MN1" inst) ("MN2" inst) ("MN3" inst)))-> devs mapcar(lambda((dev) list(dev->name dev->mFactor)) devInfo) (("MN1" 1) ("MN2" 8) ("MN3" 4)) sortedDevInfo = ciSortDeviceInfoByMfactor(devInfo) mapcar(lambda((dev) list(dev->name dev->mFactor)) sortedDevInfo) (("MN2" 8) ("MN3" 4) ("MN1" 1))
ciSortDeviceInfoByX
ciSortDeviceInfoByX(l_devInfo[?marginf_margin] ) =>l_sortedDevInfoDevs
Description
Returns devices ordered by increasing X. Margin defines the margin for equivalent X coordinates.
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
|
Value Returned
Example
devInfo = ciCollectDeviceInfo(cache '(("MN1" inst) ("MN2" inst) ("MN3" inst)))->devs mapcar(lambda((dev) list(dev->name car(dev->dbId->xy))) devInfo) (("MN3" 1.4) ("MN2" 1.8) ("MN1" 1.1)) sortedDevInfo = ciSortDeviceInfoByX(devInfo) mapcar(lambda((dev) list(dev->name car(dev->dbId->xy))) sortedDevInfo) (("MN1" 1.1) ("MN3" 1.4) ("MN2" 1.8))
ciSortDeviceInfoByXY
ciSortDeviceInfoByXY(l_devInfo[?marginf_margin] ) =>l_sortedDevInfoDevs
Description
Returns devices ordered by increasing X and increasing Y where, devices have same X. Margin defines the margin for equivalent X/Y coordinates.
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
|
Value Returned
|
Devices ordered by increasing |
Example
devInfo = ciCollectDeviceInfo(cache '(("MN1" inst) ("MN2" inst) ("MN3" inst)))->devs mapcar(lambda((dev) list(dev->name dev->dbId->xy)) devInfo) (("MN1" (-0.1875 1.1875)) ("MN2" (-0.1875 1.8125)) ("MN3" (-0.875 1.8125))) sortedDevInfo = ciSortDeviceInfoByXY(devInfo) mapcar(lambda((dev) list(dev->name dev->dbId->xy)) sortedDevInfo) (("MN3" (-0.875 1.8125)) ("MN1" (-0.1875 1.1875)) ("MN2" (-0.1875 1.8125)))
ciSortDeviceInfoByY
ciSortDeviceInfoByY(l_devInfo[?marginf_margin] ) =>l_sortedDevInfoDevs
Description
Returns devices ordered by increasing Y. Margin defines the margin for equivalent Y coordinates.
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
|
Value Returned
Example
devInfo = ciCollectDeviceInfo(cache '(("MN1" inst) ("MN2" inst) ("MN3" inst)))->devs mapcar(lambda((dev) list(dev->name cadr(dev->dbId->xy))) devInfo) (("MN1" 3.4) ("MN2" 3.8) ("MN3" 3.1)) sortedDevInfo = ciSortDeviceInfoByY(devInfo) mapcar(lambda((dev) list(dev->name cadr(dev->dbId->xy))) sortedDevInfo) (("MN3" 3.1) ("MN1" 3.4) ("MN2" 3.8))
ciSortDeviceInfoByYX
ciSortDeviceInfoByYX(l_devInfo[?marginf_margin] ) =>l_sortedDevInfoDevs
Description
Returns devices ordered by increasing Y and increasing X where devices have same Y. Margin defines the margin for equivalent X/Y coordinates.
Arguments
|
Specifies the constraint generator device information disembodied property list as returned by |
|
Value Returned
|
Devices ordered by increasing Y and increasing X where devices have same Y. |
Example
devInfo = ciCollectDeviceInfo(cache '(("MN1" inst) ("MN2" inst) ("MN3" inst)))->devs mapcar(lambda((dev) list(dev->name dev->dbId->xy)) devInfo) (("MN1" (-0.1875 1.1875)) ("MN2" (-0.1875 1.8125)) ("MN3" (-0.875 1.8125))) sortedDevInfo = ciSortDeviceInfoByYX(devInfo) mapcar(lambda((dev) list(dev->name dev->dbId->xy)) sortedDevInfo) (("MN1" (-0.1875 1.1875)) ("MN3" (-0.875 1.8125)) ("MN2" (-0.1875 1.8125)))
ciUnexpandPhysicalDeviceInfo
ciUnexpandPhysicalDeviceInfo(l_devInfo[?unexpandIteratedg_unexpandIterated] ) =>l_devInfo
Description
This is a utility function used in modgen generation for converting a physical devInfo disembodied property list into a logical devInfo disembodied property list. The devInfo disembodied property lists are created by calling for schematic (logical) and layout (physical) devices.
Modgens in layout have mFactor expanded physical names, such as |NM1.1 |M1.2 |NM1.3 each with an mFactor of 1. These names need to be unexpanded in the device info, in this case to |NM1 with an mFactor of 3. The function also handles the case where only a subset of the mfactored devices appear in the modgen, such as |NM1.1 |NM1.3. In this case, the mFactor is set to 2.
Arguments
Values Returned
Example
firstPhysDev = car(physDevInfo->devs)
firstPhysDev->name
"|NM1.1"
firstPhysDev->mFactor 1
logDevInfo = ciUnexpandPhysicalDeviceInfo(physDevInfo)
firstLogDev = car(logDevInfo->devs)
firstLogDev->name "|NM1"
firstPhysDev->mFactor 3
ciUpdateModgenParamsAndMembers
ciUpdateModgenParamsAndMembers(g_modgen l_newModgenParams l_newModgenMembers) =>t/nil
Description
A utility function, which updates the passed modgen constraint parameters and members.
Arguments
|
The modgen constraint for which the constraint parameters and members need to be updated. |
|
Value Returned
|
The passed modgen constraint parameters and members were updated successfully. |
|
|
Failed to update the passed modgen constraint parameters and members. |
Example
paramDPL = ciConvertParamsToDPL(modgen->parameters)
(nil numRows 1 numCols 4 addDummyRowCol nil pattern "interdigit 1" mergeLayer "default"
paramDPL->numRows = 2
paramDPL->numCols = 2
newParams = ciConvertParamsDPLToParams(paramDPL)
mapcar(lambda((mem) car(mem)) modgen->members)
("MP5" "MP6" "MP9" "MP10")
newMembers = '(("MP10" inst) ("MP9" inst) ("MP6" inst) ("MP5" inst))
ciUpdateModgenParamsAndMembers(modgen newParams newMembers)
newParamDPL = ciConvertParamsToDPL(modgen->parameters)
(nil numRows 2 numCols 2 addDummyRowCol nil pattern
"interdigit 1" mergeLayer "default")
mapcar(lambda((mem) car(mem)) modgen->members)
("MP10" "MP9" "MP6" "MP5")
ciUtilsGetArgVal
ciUtilsGetArgVal(l_args t_argName t_argAltName[?defValg_defVal] ) =>g_val
Description
This is a utility function for accessing constraint generator argument values from a disembodied property list where the argument names may take one of two forms.
Arguments
|
A disembodied property list containing argument names and values. |
|
|
The default value to use if an argument with |
Value Returned
|
The value associated with |
Examples
ciUtilsGetArgVal(args "Source Layer" "sourceLayer")
=> "Metal1"
ciUtilsGetArgVal(args "Gate Width" "gateWidth")
=> 0.1
ciUtilsGetArgVal(args "DrainNNNN Width" "drainNNNNNWidth" ?defVal 0.123)
=> 0.123
ciUtilsMakeNumberRange
ciUtilsMakeNumberRange(x_from x_to[?descendingg_descending] [?fmtt_fmt] ) =>l_result
Description
This function returns a list containing a sequence of numbers ranging from the passed from value to the passed to value. Optionally, this function reverses the list into descending order and applies a sprintf format to the numbers.
Arguments
Value Returned
|
A list containing the number sequence in the specified range. |
Examples
ciUtilsMakeNumberRange(1 10)
=> (1 2 3 4 5 6 7 8 9 10)
ciUtilsMakeNumberRange(1 5 ?descending t ?fmt "row%d" )
=> ("row5" "row4" "row3" "row2" "row1")
drvCheckLists
drvCheckLists(
)
=> l_checkListDefinitions
Description
Returns a list of the registered Design Review checklists. Each checklist is a disembodied property list of the form list(nil 'category <categoryName> 'checks list(<checkDescription1> ... <checkDescriptionN>).
Sample design review checklists are loaded from share/cdssetup/dfII/drv/drvCheckLists.il and can be overridden or updated by placing a file named drvCheckLists.il in a project or the local .cadence/dfII/drv directory.
Arguments
Value Returned
Examples
checkLists = drvCheckLists()
pprint(checkLists)
list(
list(nil category "Power review (Sample Checks)"
checks (
"Power Pins are on routing grid"
"Multiple voltage rails are well sequenced"
"Pin has decoupling cap attached"
"Low Inductance mounting used for decoupling"
"Sufficient width of rails for required current"
"Minimal slots in planes from via antipads"
)
)
list(nil category "DFM/Yield Scope (Sample Checks)"
checks (
"All design rules within manufacturer's capability"
"Minimize use of vias/traces that push fab limits"
"Substrate contacts (put as many as possible)"
"Controlled impedance specified in fab notes if applicable"
"Confirm impedance calculations include soldermask, or mask removed from RF traces"
"Stackup verified with manufacturer and specified in fab notes"
"(recommended) Layer number markers specified to ensure correct assembly"
)
)
)
drvGetReviewInfo
drvGetReviewInfo(d_cvId t_rname[?nameg_name] [?reviewTextg_reviewText] [?implStatusg_implStatus] [?signedOffg_signedOff] [?checkListg_checkList] [?defectsg_defects] ) =>l_propertynames
Description
Returns information for the specified review in the given cellview.
Arguments
Value Returned
|
Examples
(drvGetReviewInfo (geGetEditCellView) "review_name" ?name t ?reviewText t
?implStatus t ?signedOff t ?checkList t ?defects t)
=> (nil name "review_name"
reviewText "this a design review"
implStatus open
signedOff nil
checkList ("Power review (Sample Checks)" (("Power Pins are on routing grid" Closed)
("Multiple voltage rails are well sequenced" Closed)
("Pin has decoupling cap attached" Open)
("Low Inductance mounting used for decoupling" Open)
("Sufficient width of rails for required current" Open)
("Minimal slots in planes from via antipads" Open)))
defects ((nil description "defect_number_1"
status open
notes ((nil comment "check this area"
user "username"
time "2023-May-01 14:53:32")))))
Related Topics
drvListLayoutReviews
drvListLayoutReviews(d_cvId) =>l_designreviewnames/nil
Description
Returns the design review names for the specified layout cell view.
Arguments
Value Returned
|
Examples
(drvListLayoutReviews (geGetEditCellView)
=>("review1" "review2)
Related Topics
drvRegisterCheckLists
drvCheckLists(l_checkListDefinitions) =>t/nil
Description
Registers Design Review checklists. Each checklist is a disembodied property list of the form list(nil 'category <categoryName> 'checks list(<checkDescription1> ... <checkDescriptionN>).
Sample design review checklists are loaded from share/cdssetup/dfII/drv/drvCheckLists.il and can be overridden or updated by placing a file named drvCheckLists.il in a project or the local .cadence/dfII/drv directory.
Arguments
Value Returned
Examples
drvRegisterCheckLists(
'(
(nil category "Power review (Sample Checks)"
checks (
"Power Pins are on routing grid"
"Multiple voltage rails are well sequenced"
"Pin has decoupling cap attached"
"Low Inductance mounting used for decoupling"
"Sufficient width of rails for required current"
"Minimal slots in planes from via antipads"
)
)
(nil category "DFM/Yield Scope (Sample Checks)"
checks (
"All design rules within manufacturer's capability"
"Minimize use of vias/traces that push fab limits"
"Substrate contacts (put as many as possible)"
"Controlled impedance specified in fab notes if applicable"
"Confirm impedance calculations include soldermask, or mask removed from RF traces"
"Stackup verified with manufacturer and specified in fab notes"
"(recommended) Layer number markers specified to ensure correct assembly"
)
)
)
drvReviewSetCheckList
drvReviewSetCheckList(d_cvId t_reviewName g_checkList[ ?preserveUsedChecksg_preserveUsedChecks] ) => t / nil
Description
Resets a checklist in the specified review if the checklist name matches the given checklist. This function overwrites the checks, adding new ones, removing unlisted ones, and sorts them according to the specified list.
Checks used in the review that do not have a matching entry in given checklist may be removed from the review depending on value set for preserveUsedChecks.
This function is useful when a new checklist definition is registered to the session. Usually, when checks are used for a review, a copy of the encompassing checklist is saved with the review. If later the checklist definition changes to include more recent checks, or to remove irrelevant checks, you can use this function to streamline checks.
Arguments
Value Returned
Examples
;; Review "test review" was been saved with checklist, "Power review". Here are the details:
(drvGetReviewInfo (geGetEditCellView) "test review")
=> (nil reviewText "" implStatus open
signedOff nil checkLists (
("Power review"
(("Power Pins are on routing grid" Closed)
("Multiple voltage rails are well sequenced" Waived)
("Pin has decoupling cap attached" Closed)
("Low Inductance mounting used for decoupling" Open)
("Minimal slots in planes from via antipads" Open)
)
)
) defects
nil
)
;; Set the checklist "Power review" to an updated configuration.
drvReviewSetCheckList(geGetEditCellView() "test review"
'(nil category "Power review"
checks (
"Power Pins are on routing grid"
"Multiple voltage rails are well sequenced"
"Minimal slots in planes from via antipads"
)
))
=> t
;; Note that "Pin has decoupling cap attached" has not been removed as it is used by the review.
(drvGetReviewInfo (geGetEditCellView) "test review")
=> (nil reviewText "" implStatus open
signedOff nil checkLists (
("Power review"
(("Power Pins are on routing grid" Closed)
("Multiple voltage rails are well sequenced" Waived)
("Minimal slots in planes from via antipads" Open)
("Pin has decoupling cap attached" Closed)
)
)
) defects
nil
)
;; Set option 'preserveUsedChecks' to nil, to force removal of "Pin has decoupling cap attached"
drvReviewSetCheckList(geGetEditCellView() "test review"
'(nil category "Power review"
checks (
"Power Pins are on routing grid"
"Multiple voltage rails are well sequenced"
"Minimal slots in planes from via antipads"
)
)
?preserveUsedChecks nil)
=> t
(drvGetReviewInfo (geGetEditCellView) "test review")
=> (nil reviewText "" implStatus open
signedOff nil checkLists (
("Power review"
(("Power Pins are on routing grid" Closed)
("Multiple voltage rails are well sequenced" Waived)
("Minimal slots in planes from via antipads" Open)
)
)
) defects
nil
)
;; To bulk update all checklist definitions in a review
(defun exampleUpdateChecklists (cv reviewName "dt")
(foreach def (drvCheckLists)
(drvReviewSetCheckList cv reviewName def))
t
)
exampleUpdateChecklists(geGetEditCellView() "test review")
drvReportGenReport
drvReportGenReport( [ ?depthx_depth] [ ?titlet_title] [ ?patht_path] [ ?datet_date] [ ?cvd_cv] [ ?launchg_launch] [ ?dirNamet_dirName] ) => t / nil
Description
Generates a report summarizing the design intent in the current design based on the specified criteria and optionally opens the report in the browser.
Arguments
Value Returned
Examples
Generates a report for the specified cellview (gec) in the myReport directory, and automatically opens the report in the browser.
(drvReportGenReport
?depth 0
?cv (gec)
?dirName "myReport"
?launch t)
Table Editor SKILL Commands
The following SKILL commands are available for the Table Editor:
tedSaveCSV
tedSaveCSV(t_tedName t_FileName) =>t/nil
Description
Saves the specified Table Editor in a specified CSV file as comma-separated values.
Arguments
|
Name of the CSV file in which the Table Editor is saved in. If you only specify the filename of the CSV file, it is saved in the current directory. |
Value Returned
Examples
tedSaveCSV("ted_1" "/myDir/output_ted_1.csv")
tedSaveXML
tedSaveXML(t_tedName t_FileName) =>t/nil
Description
Saves the specified Table Editor in a specified XML file as comma-separated values.
Arguments
|
Name of the XML file in which the Table Editor is saved in. If you only specify the filename of the XML file, it is saved in the current directory. |
Value Returned
Examples
tedSaveXML("ted_1" "/myDir/output_ted_1.xml")
Custom Constraints Functions: Examples
This section contains SKILL function usage examples detailing how to:
- Print all Constraints on a Given Object (Sorted by Name)
- Print Context Status on a Given Object
- Print All Constraints (Sorted by Name) on all Objects (Sorted by Name)
- Print In-Context Status for all Objects (Sorted by Name)
- Print all Constraints Content (In Constraint Name Order)
- Get an Axis Parameter
- Get Parameters for Duplicating Constraints with Another Set of Members
- Print a Report File with all Constraints in the Cache
- Helper Functions for Sorting
Print all Constraints on a Given Object (Sorted by Name)
defun( ciTestPrintObjectConstraintsSorted (cache obj)
printf("Object %L has constraints %L.\n" obj
mapcar(’ciConGetName
sort( apply( ’ciObjectListCon
append( (list cache) obj))
’ciTestConstraintLessp))))
Print Context Status on a Given Object
defun( ciTestPrintObjectContextStatus (cache obj)
let( ((incxt apply( ’ciObjectIsInContext append( (list cache) o))) frase( "out-of-context"))
when( incxt frase = "in-context")
printf( "Object %L is %s.\n" obj frase)
))
Print All Constraints (Sorted by Name) on all Objects (Sorted by Name)
;; returns a list of objects sorted by name
defun( ciTestPrintAllObjectsAllCon (cache)
objects = sort( (ciCacheListConstrainedObjects cache) ’ciTestAssocListLessP)
foreach( o objects apply( ’ciTestPrintObjectConstraintsSorted
append( (list cache) (list o)))))
Print In-Context Status for all Objects (Sorted by Name)
;; returns a list of objects sorted by name
defun( ciTestPrintAllObjectsContextStatus (cache)
objects = sort( (ciCacheListConstrainedObjects cache) ’ciTestAssocListLessP)
foreach( o objects apply( ’ciTestPrintObjectContextStatus
append( (list cache) (list o))))
t
)
Print all Constraints Content (In Constraint Name Order)
;; returns t
defun( ciTestPrintAllConAllContent (cache)
objects = sort( (ciCacheListCon cache) ’ciTestConstraintLessp)
foreach( o objects (ciTestPrintConstraintContent o))
t)
defun( ciTestPrintConstraintContent (con)
printf( "\nConstraint named %s has:\n" (ciConGetName con))
printf( " Axis: %L\n" (ciConGetAxisName con))
printf( " Members (always ordered as set):\n")
pprint( (ciConListMembers con))
printf( "\n Parameters:\n")
pprint( (ciConListParams con))
t)
Get an Axis Parameter
defun( ciTestGetCiAxisCreateParams cache( axisName)
;; this returns a list of parameters that, if passed to ciAxisCreate,
;; would create a duplicate of the axis passed in
;; just add the cache in front of each of them
list( axisName (ciAxisListParams cache axisName))
)
Get Parameters for Duplicating Constraints with Another Set of Members
defun( ciTestGetCiConCreateParams (con)
;; this returns a list of parameters that, if passed to ciConCreate,
;; would create a cuplicate of the constraint passed in
;; just add the cache in front of each of them
let( (ret)
when( con
ret = list( (ciConGetType con)
?name (ciConGetName con)
?members (ciConListMembers con)
?params (ciConListParams con))
)
ret
))
Print a Report File with all Constraints in the Cache
defun( ciTestPrintReport (cache @key (fileName nil) (format ’skill))
let( (file)
when( fileName
file = (outfile fileName "w")
unless( file (warn "Cannot open file %L for writing" fileName))
)
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; all axes from this cache\n" )
fprintf( file "\n")
fprintf( file "ciAxes = list( \n")
foreach( axis sort( (ciCacheListAxesNames cache) ’alphalessp)
pprint( (ciTestGetCiAxisCreateParams cache axis) file)
fprintf( file "\n")
)
fprintf( file ") \n")
fprintf( file ";; finished printing all Axes \n")
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file "\n" )
fprintf( file "\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; all constraints from this cache\n" )
fprintf( file "\n")
fprintf( file "ciConstraints = (list \n")
objects = sort( (ciCacheListCon cache) ’ciTestConstraintLessp)
foreach( o objects
;; fprintf( file " %L\n" (ciTestGetCiConCreateParams o)))
pprint( (ciTestGetCiConCreateParams o) file)
fprintf( file "\n")
)
fprintf( file ") \n")
fprintf( file ";; finished printing all constraints \n")
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
fprintf( file ";; ===================================================\n" )
t
))
Helper Functions for Sorting
;; compare an association list (that is a list containing list( list(
;; "name1" ...) list( "name2" ...) ...)
defun( ciTestAssocListLessP (x y)
alphalessp( (car x) (car y)))
defun( ciTestConstraintLessp (x y)
alphalessp( (ciConGetName x) (ciConGetName y)))
Return to top