cdsCopy SKILL Examples
Example 1
The following SKILL .il file copies library myLib to myLibCopy:
viewtypeList = '(maskLayout schematicSymbol)
srcList = gdmCreateSpecList()
src = gdmCreateSpec("myLib" "" "" "" "CDBA")
gdmAddSpecToSpecList(src srcList)
destList = gdmCreateSpecList()
dest = gdmCreateSpec("myLibCopy" "" "" "" "CDBA")
gdmAddSpecToSpecList(dest destList)
ccpCopy(srcList destList nil 'CCP_EXPAND_ALL viewtypeList nil)
Example 2
The following SKILL .il file creates and registers a copy monitor and a copy trigger function and uses them in a copy operation:
;; An example copy monitor function, which prints some of its arguments
procedure(copyMonitor(copyFn copyPhase fromPath toPath fromSpec toSpec numCount numTotal "ttttggxx" )
if(geqp(numCount 0) then
if(neq(fromSpec nil) then
printf("Monitor: %s %L -> %L, %d of %d files.\n"
copyFn
gdmInspectSpec(fromSpec "CDBA")
gdmInspectSpec(toSpec "CDBA")
numCount numTotal)
))
nil
)
; An example copy trigger function, which prints some of its arguments
procedure(copyTriggerPrint(myFunction copyPhaseStr checkOffList supplementList otherFromSpecs otherToSpecs updateList retHint
ctxList reserved "stgggggggx")
let((retOK)
retOK = t
printf("Copy phase is '%s'\n" copyPhaseStr)
printf("Calling options were %L\n", ctxList)
printf("Pre copy set is %L\n", checkOffList)
printf("Post copy is from %L\n", otherFromSpecs)
printf(" to %L\n", otherToSpecs)
retOK
)
)
; Registering the copy monitor and copy trigger functions
crm_ret = ccpRegMonitor('copyMonitor)
printf("ccpRegMonitor('symbol) returned '%L'\n" crm_ret)
ccpRegTrigger("ccpPostExpandTrigger" 'copyTriggerPrint nil)
ccpRegTrigger("ccpPostCopyTrigger" 'copyTriggerPrint nil)
; Copy
testLib = "MonitorTestLib"
srcList = gdmCreateSpecList()
src = gdmCreateSpec("analogLib" "cap" "" "" "CDBA" 0)
gdmAddSpecToSpecList(src srcList)
destList = gdmCreateSpecList()
dest = gdmCreateSpec(testLib "" "" "" "CDBA" 0)
gdmAddSpecToSpecList(dest destList)
updList = gdmCreateSpecList()
upd = gdmCreateSpec(testLib "" "" "" "CDBA" 0)
gdmAddSpecToSpecList(upd updList)
upd = gdmCreateSpec("CadenceBasic" "" "" "" "CDBA" 0)
gdmAddSpecToSpecList(upd updList)
tlib = ddGetObj(testLib)
vnList = '(schematic cmos_sch symbol)
vtList = '(ComposerSymbol ComposerSchematic)
if(neq(tlib nil) then
printf("Preparing by deleting test library '%s'\n" testLib)
ddDeleteObj(tlib))
ccpCopy(srcList destList nil 'CCP_EXPAND_ALL vtList vnList "s* v*" "CDBA" 'CCP_UPDATE_FROM_LIBLIST destList)
printf("Cleaning up by deleting test library '%s'\n" testLib)
ddDeleteObj(ddGetObj(testLib))
Return to top