Hello All,
I wrote short code to calculate the biggest the value for upper right x y and lowest vale of x y and then do subtraction to get the width and height:
my code is like:
procedure(math(bBox corner)
let((x y tx ty)
x = car(caar(bBox))
y = cadr(caar(bBox))
case(corner
("lower"
foreach(s bBox
tx = caar(s)
ty = cadar(s)
if(tx<x
then
x=tx
);if-tx
if(ty<y
then
y=ty
);if-ty
);foreach
result = list(x y)
);lower
("upper"
foreach(s bBox
tx = caar(s)
ty = cadar(s)
if(tx>x
then
x=tx
);if-tx
if(ty>y
then
y=ty
);if-ty
);foreach
result = list(x y)
);upper
return(result)
);case
) ; let
) ; procedure
ll = math(cellView~>instances~>bBox "lower")
ur = math(cellView~>instances~>bBox "upper")
w = car(ur) - car(ll) ;Width
h = cadr(ur) - cadr(ll) ; height
viaParams = list(list("cutWidth" w) list("cutHeight" h) list("originOffset" list(w/2 h/2)))
b_db = dbCreateVia(cellView viaDef ll "R0" viaParams)
dbCreateStdVia: Zero width and/or height value(s) specified for a via cut
and then error:
dbTransformPoint: Invalid point - nil
What I think that SKILL is code is so fast that it doesn't wait for the conversion of all layouts and move to math function and since there is no layout there so It's not calculating width and height, If I manually creat layout and then just run the part of code where its calculating width and height, then its working fine , even This code is working fine with 1 technology (32nm) but not with 14nm.
any suggestion on this ?
Thanks!