chen9771的个人空间 https://blog.eetop.cn/?15885 [收藏] [复制] [分享] [RSS]

日志

面积

已有 203 次阅读| 2025-8-22 14:25 |系统分类:其他


procedure(paibu(box num)

let((dx dy insts inst instname x y xlist ylist instlb l h yymax libname lx ly mp mark  numx numy instll spx spy cv tecName inst1)


cv=geGetEditCellView(hiGetCurrentWindow())

techName= techGetTechLibName(cv)

pts1=geWindowToEditPoint(hiGetCurrentWindow(),car(box))

pts2=geWindowToEditPoint(hiGetCurrentWindow(),cadr(box))

box=list(pts1 pts2)

dx=car(pts2)-car(pts1)

dy=cadr(pts2)-cadr(pts1)


l=0 h=0 yymax=list(0) ylist=list()


libname=ciUtilsMakeUnique(geGetSelSet()~>libName )


inst1=setof(x geGetSelSet() (x~>objType =="inst"||x~>objType == "mosaic")&&x~>libName!=techName)

;mp mn cap


for(i 0 length(libname)-1

insts=setof(x geGetSelSet() (x~>objType =="inst"||x~>objType == "mosaic")&&x~>libName==nth(i,libname))

xlist=sort(ciUtilsMakeUnique(insts~>cellName ) nil)

ylist=append(ylist xlist)

)

;

instname=ylist

;mp mn logic


insts=setof(x geGetSelSet() x~>objType =="inst"||x~>objType == "mosaic")


mp=setof(x geGetSelSet() x~>cellName=="mp"||x~>cellName=="mn"|| x~>cellName=="n50iso" ||x~>cellName=="nld40g5h_2")

 for(i 1 length(mp) 

cond(

(nth(i-1 mp)~>objType=="inst" 

nth(i-1 mp)~>orient="R90")

))

foreach(x instname

instll=setof(z insts z~>cellName==x)

numx=0

numy=0

case(num

(1


instlb=sort(instll

(lambda (f1 f2)

if( equal((cadadr(f1~>bBox)-cadar(f1~>bBox) )   (cadadr(f2~>bBox)-cadar(f2~>bBox))    ) then

lessp((caadr(f1~>bBox)-caar(f1~>bBox) ) (caadr(f2~>bBox)-caar(f2~>bBox)))

else

lessp( (cadadr(f1~>bBox)-cadar(f1~>bBox))  (cadadr(f2~>bBox)-cadar(f2~>bBox)) )

)

)


)

)

(2

instlb=geGetSelSet()

)

)

      

case(x

(t lx=0 ly=0                                   spx=0        spy=0                    mx=100                 my=100)

);csae

 foreach(u instlb

 xx=caadr(u~>bBox)-caar(u~>bBox)

 yy=cadadr(u~>bBox)-cadar(u~>bBox)

 yymax=append1(yymax yy)

 

dbMoveFig(u geGetEditCellView() list(car(pts1)+l-caar(u~>bBox):cadr(pts1)+h-cadar(u~>bBox) "R0"))

;if(u~>objType =="inst" u~>orient car(u~>tileArray))

if(l+xx+lx<dx then

l=l+xx+lx

numx=numx+1

if(mod(numx mx)==0 l=l+spx )

else

l=0

yymax=sort(yymax 'greaterp)

h=h+car(yymax)+ly

yymax=list(0)

numy=numy+1

if(mod(numy my)==0 h=h+spy )

numx=0

);if


);foreach


if(exists(c ddGetObj(techName)~>cells~>name c==x) then

yymax=sort(yymax 'greaterp)

h=h+car(yymax)

l=0

yymax=list(0)

)


);foreach


);let

);procedure


hiSetBindKey("layout" "<Key>F6" "paibu(enterBox() 1)")



点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 12

    周排名
  • 0

    月排名
  • 0

    总排名
  • 1

    关注
  • 1

    粉丝
  • 2

    好友
  • 1

    获赞
  • 2

    评论
  • 24

    访问数
关闭

站长推荐 上一条 /1 下一条


手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-8-28 12:10 , Processed in 0.016453 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部