SKILL在virtuoso里自动生成版图对应的symbol和schematic
一些在virtuoso里面用skill生成symbol和schematic的一些操作手法和api的调用技巧,日常记录。

procedure(parsemycellName(mycellName)
let((type l w nf typePattern lPattern wPattern nfPattern)
if(rexMatchp("_nch_" mycellName) then
type = "nch"
else
if(rexMatchp("_cap_" mycellName) then
type = "cap"
else
if(rexMatchp("_pch_" mycellName) then
type = "pch"
else
if(rexMatchp("_res_" mycellName) then
type = "res"
else
type = "unkonwn"
)
)
)
)
lPattern = "_l[0-9]+[a-zA-Z]*_"
rexCompile(lPattern)
if(rexMatchp(lPattern mycellName) then
rexExecute(mycellName)
l = rexSubstitute( "\\0" )
startPos = nindex(l, "l")+ 1
len = strlen(l)
endPos = len - 3
l = substring( l startPos endPos)
else
l = "unknown"
)
wPattern = "_w[0-9]+[a-zA-Z]*_"
rexCompile(wPattern)
if(rexMatchp(wPattern mycellName) then
rexExecute(mycellName)
w = rexSubstitute( "\\0" )
startPos = nindex(w, "w")+ 1
len = strlen(w)
endPos = len - 3
w = substring( w startPos endPos)
else
w = "unknown"
)
nfPattern = "_nf[0-9]+$"
rexCompile(nfPattern)
if(rexMatchp(nfPattern mycellName) then
rexExecute(mycellName)
nf = rexSubstitute( "\\0" )
startPos = nindex(nf, "f") + 1
len = strlen(l)
endPos = len - 1
nf = substring( nf startPos endPos)
else
nf = "unknown"
)
printf("type = %s, l = %s, w = %s, nf = %s\n" type l w nf)
paramData = list(type l w nf)
)
)
procedure( pchProc(newInst paramData)
newInst~>l = nth(1 paramData)
newInst~>w = nth(2 paramData)
newInst~>nf = nth(3 paramData)
locSPin = '(0 0)
locBPin = '(0 0)
locDPin = '(0 0)
locGPin = '(0 0)
;I don't konw why need this code, but if not, no instTerms in the schematic, fuck!
wire = schCreateWire( schView "draw" "full" list(0:0 1:0) 0.0625 0.0625 0.0 )
dbDeleteObject(car(wire))
;;; end fuck.
foreach( instTerm newInst~>instTerms
case( instTerm~>name
("S" locSPin = centerBox</
10万+



被折叠的 条评论
为什么被折叠?



