求大家帮帮忙~~~我没查出来
procedure(p()
enterBox(?prompts
list("enter a Bbox")
?doneProc "pointdonehw"
) ;enterBox end
) ;p() end
procedure(pointdonehw(w done pts)
if(done then
xl=xCoord(lowerLeft(pts))
yl=yCoord(lowerLeft(pts))
xu=xCoord(upperRight(pts))
yu=yCoord(upperRight(pts))
) ;if end
) ;pointdonehw end
for(i 0 (length(w)-1)
if((nth(i w)~>layerName=="M1"&&nth(i w)~>purpose=="logic")!=nil
then
list_m1=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M2"&&nth(i w)~>purpose=="logic")!=nil
then
list_m2=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M3"&&nth(i w)~>purpose=="logic")!=nil
then
list_m3=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M4"&&nth(i w)~>purpose=="logic")!=nil
then
list_m4=nth(i w)~>bBox
)
)
if(list_m1!=nil then
list_bottom=list_m1
bottom=1
else if(list_m2!=nil then
list_bottom=list_m2
bottom=2
else if(list_m3!=nil then
list_bottom=list_m3
bottom=3
else printf("no bottom layer")
)
)
)
if(list_m4!=nil then
list_bottom=list_m1
top=4
else if(list_m3!=nil then
list_bottom=list_m3
bottom=3
else if(list_m2!=nil then
list_bottom=list_m2
bottom=2
else printf("no top layer")
)
)
)
if(
caar(list_bottom)>caar(list_top)
then
contact_xl=caar(list_bottom)
else
contact_xl=caar(list_top)
)
if(
caadr(list_bottom)>caadr(list_top)
then
contact_yl=caadr(list_bottom)
else
contact_yl=caadr(list_top)
)
if(
cadar(list_bottom)>cadar(list_top)
then
contact_yl=cadar(list_bottom)
else
contact_yl=cadar(list_top)
)
if(
cadadr(list_bottom)>cadadr(list_top)
then
contact_yl=cadadr(list_bottom)
else
contact_yl=cadadr(list_top)
)
procedure(p()
enterBox(?prompts
list("enter a Bbox")
?doneProc "pointdonehw"
) ;enterBox end
) ;p() end
procedure(pointdonehw(w done pts)
if(done then
xl=xCoord(lowerLeft(pts))
yl=yCoord(lowerLeft(pts))
xu=xCoord(upperRight(pts))
yu=yCoord(upperRight(pts))
) ;if end
) ;pointdonehw end
for(i 0 (length(w)-1)
if((nth(i w)~>layerName=="M1"&&nth(i w)~>purpose=="logic")!=nil
then
list_m1=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M2"&&nth(i w)~>purpose=="logic")!=nil
then
list_m2=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M3"&&nth(i w)~>purpose=="logic")!=nil
then
list_m3=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M4"&&nth(i w)~>purpose=="logic")!=nil
then
list_m4=nth(i w)~>bBox
)
)
if(list_m1!=nil then
list_bottom=list_m1
bottom=1
else if(list_m2!=nil then
list_bottom=list_m2
bottom=2
else if(list_m3!=nil then
list_bottom=list_m3
bottom=3
else printf("no bottom layer")
)
)
)
if(list_m4!=nil then
list_top=list_m4
top=4
else if(list_m3!=nil then
list_top=list_m3
top=3
else if(list_m2!=nil then
list_bottom=list_m2
top=2
else printf("no top layer")
)
)
)
if(
caar(list_bottom)>caar(list_top)
then
contact_xl=caar(list_bottom)
else
contact_xl=caar(list_top)
)
if(
caadr(list_bottom)>caadr(list_top)
then
contact_xu=caadr(list_bottom)
else
contact_xu=caadr(list_top)
)
if(
cadar(list_bottom)>cadar(list_top)
then
contact_yl=cadar(list_bottom)
else
contact_yl=cadar(list_top)
)
if(
cadadr(list_bottom)>cadadr(list_top)
then
contact_yu=cadadr(list_bottom)
else
contact_yu=cadadr(list_top)
)
这个改好了,但是在执行后出现这样的错误
*Error* leCreateContact: shoul be an integer (type template = "dtltnnxxnnt") -4489.0
请你帮我看看我的数值取整哪里出问题了??作者: deargds 时间: 2012-2-24 21:59
kingzhaon 发表于 2012-2-24 16:21
这个改好了,但是在执行后出现这样的错误
*Error* leCreateContact: shoul be an integer (type templat ...
这个程序应该是Cadance IC Layout环境中应用的,我没有leCreateContact这个函数的定义,不过根据错误提示应该是参数不匹配,rows cols应该为整数,
问题可能出在下面两句
rows=float(truncate((yabs-0.14+1e-6)/0.22)+1)
cols=float(truncate((xabs-0.14+1e-6)/0.22)+1)
复制代码
改为
rows=round(truncate((yabs-0.14+1e-6)/0.22)+1)
cols=round(truncate((xabs-0.14+1e-6)/0.22)+1)
复制代码
作者: kingzhaon 时间: 2012-2-27 09:06
deargds 发表于 2012-2-24 21:59
这个程序应该是Cadance IC Layout环境中应用的,我没有leCreateContact这个函数的定义,不过根据错误提示 ...
改了,但是还是不好用,难道是我的row和col值求错了?作者: kingzhaon 时间: 2012-2-27 09:15
我把row和col的值直接改成了1,但是还是出不来孔作者: kingzhaon 时间: 2012-2-27 11:19
已经修改好了,谢谢版主大哥。另外我把正确的贴一下吧,需要的童鞋可能会用到。
procedure(p()
enterBox(?prompts
list("enter a Bbox")
?doneProc "pointdonehw"
) ;enterBox end
) ;p() end
procedure(pointdonehw(w done pts)
if(done then
xl=xCoord(lowerLeft(pts))
yl=yCoord(lowerLeft(pts))
xu=xCoord(upperRight(pts))
yu=yCoord(upperRight(pts))
) ;if end
) ;pointdonehw end
for(i 0 (length(w)-1)
if((nth(i w)~>layerName=="M1"&&nth(i w)~>purpose=="logic")!=nil
then
list_m1=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M2"&&nth(i w)~>purpose=="logic")!=nil
then
list_m2=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M3"&&nth(i w)~>purpose=="logic")!=nil
then
list_m3=nth(i w)~>bBox
)
if((nth(i w)~>layerName=="M4"&&nth(i w)~>purpose=="logic")!=nil
then
list_m4=nth(i w)~>bBox
)
)
if(list_m1!=nil then
list_bottom=list_m1
bottom=1
else if(list_m2!=nil then
list_bottom=list_m2
bottom=2
else if(list_m3!=nil then
list_bottom=list_m3
bottom=3
else printf("no bottom layer")
)
)
)
if(list_m4!=nil then
list_top=list_m4
top=4
else if(list_m3!=nil then
list_top=list_m3
top=3
else if(list_m2!=nil then
list_bottom=list_m2
top=2
else printf("no top layer")
)
)
)
if(
caar(list_bottom)>caar(list_top)
then
contact_xl=caar(list_bottom)
else
contact_xl=caar(list_top)
)
if(
caadr(list_bottom)<caadr(list_top)
then
contact_xu=caadr(list_bottom)
else
contact_xu=caadr(list_top)
)
if(
cadar(list_bottom)>cadar(list_top)
then
contact_yl=cadar(list_bottom)
else
contact_yl=cadar(list_top)
)
if(
cadadr(list_bottom)<cadadr(list_top)
then
contact_yu=cadadr(list_bottom)
else
contact_yu=cadadr(list_top)
)