|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 杨原仪 于 2023-7-24 10:23 编辑
抱歉没注意到下载要积分 下面时源代码
procedure(back1()
if(cdfid~>dum_l~>display=="nil"
then
cdfid~>dum_l~>value=cdfid~>L~>value
else
cdfid~>dum_l~>value=cdfid~>L~>value
)
if(atoi(cdfid~>finger~>value)<4
cdfid~>finger~>value="4"
)
cdfid~>dum_l~>display=sprintf(nil,"%N" cdfid~>dum_t~>value)
cdfid~>widthq~>display=sprintf(nil,"%N" cdfid~>dum_t~>value)
)
pcDefinePCell(
list( ddGetObj("pecll_tsmc") "NOS_CHAFEN" "layout"
) ; end of list for first argument
(
(width string "1u" )
(L string "0.8u")
(finger string "6" )
(dummy string "1" )
(dum_l string "0.8u")
(width string "1u")
(dum_t boolean nil)
) ; end of pcell parameters
let(() ; no local variables in this example
display1=sprintf(nil,"%N" dum_t)
if(cdfGetBaseCellCDF(ddGetObj("pecll_tsmc" "NOS_CHAFEN"))
then
cdfDeleteCDF(cdfid)
cdfid=cdfCreateBaseCellCDF(ddGetObj("pecll_tsmc" "NOS_CHAFEN"))
else
cdfid=cdfCreateBaseCellCDF(ddGetObj("pecll_tsmc" "NOS_CHAFEN" ))
)
cdfCreateParam(cdfid
?name "width"
?prompt "width"
?type "string"
?defValue "1u"
?display "t"
?storeDefault "yes"
?callback "back1()"
)
cdfCreateParam(cdfid
?name "L"
?prompt "L"
?type "string"
?defValue "0.8u"
?display "t"
?storeDefault "yes"
?callback "back1()"
)
cdfCreateParam(cdfid
?name "finger"
?prompt "finger"
?type "string"
?defValue "10"
?display "t"
?storeDefault "yes"
?callback "back1()"
)
cdfCreateParam(cdfid
?name "dummy"
?prompt "dummy"
?type "string"
?defValue "1"
?display "t"
?storeDefault "yes"
?callback "back1()"
)
cdfCreateParam(cdfid
?name "dum_t"
?prompt "dum_t"
?type "boolean"
?display "t"
?storeDefault "yes"
?callback "back1()"
)
cdfCreateParam(cdfid
?name "dum_l"
?prompt "dum_l"
?type "string"
?defValue "0.8u"
?display display1
?storeDefault "yes"
)
cv=pcCellView
layout=dbOpenCellViewByType("tsmc18rf" "nmos3vdnw" "layout")
;--------------------Create int1 and dummy----------------------
int1_dum_r=dbCreateParamInst(cv layout nil list(0 0) "R0" 1
list(
list("w" "string" width)
list("l" "string" dum_l)
list("fingers" "string" dummy)
)
)
int1=dbCreateParamInst(cv layout nil list(atof(dum_l)*atof(dummy)+atof(dummy)*0.54 0) "R0" 1
list(
list("w" "string" width)
list("l" "string" L)
list("fingers" "string" finger)
)
)
int1_dum_l=dbCreateParamInst(cv layout nil list(atof(int1_dum_r~>l)*atof(int1_dum_r~>fingers)+atof(int1_dum_r~>fingers)*0.54+atof(int1~>l)*atof(int1~>fingers)+atof(int1~>fingers)*0.54 0) "R0" 1
list(
list("w" "string" width)
list("l" "string" dum_l)
list("fingers" "string" dummy)
)
)
if(atof(int1~>w)>=220.0
then
w1=atof(int1~>w)/1000
else
w1=atof(int1~>w)
)
if(atof(int1~>l)>=220.0
then
l1=atof(int1~>l)/1000
else
l1=atof(int1~>l)
)
space=w1+1.55
;--------------------Create int2 and dummy----------------------
int2_dum_r=dbCreateParamInst(cv layout nil list(0 space) "R0" 1
list(
list("w" "string" width)
list("l" "string" dum_l)
list("fingers" "string" dummy)
)
)
int2=dbCreateParamInst(cv layout nil list(atof(int2_dum_r~>l)*atof(int2_dum_r~>fingers)+atof(int2_dum_r~>fingers)*0.54 space) "R0" 1
list(
list("w" "string" width)
list("l" "string" L)
list("fingers" "string" finger)
)
)
int2_dum_l=dbCreateParamInst(cv layout nil list(atof(int2_dum_r~>l)*atof(int2_dum_r~>fingers)+atof(int2_dum_r~>fingers)*0.54+atof(int2~>l)*atof(int2~>fingers)+atof(int2~>fingers)*0.54 space) "R0" 1
list(
list("w" "string" width)
list("l" "string" dum_l)
list("fingers" "string" dummy)
)
)
)
) ; end of pcDefinePCell |
-
-
PCELL.txt
4.06 KB, 下载次数: 0
, 下载积分:
资产 -2 信元, 下载支出 2 信元
|