[SOLVED] Skill code to test a metal's path resistor

Status
Not open for further replies.

SpringWeng

Newbie level 5
Joined
Aug 16, 2012
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,335
Hi All,

I want to use skill code to test some path resistor, can anybody tell me with details?
eg, there has a path in my virtuoso layout, I need a skill procedure and load it in CIW, and then just use a bindkey that I can caculate its resistor automatic.

Thank you all in advance.
 

I wrote a skill code this morning to test metal line's resistor as below,
hiSetBindKey("Layout" "<Key>0" "Path_resistor()")
procedure(Path_resistor()
prog((winId cvId selObj shape llx lly urx ury x y Z)
winId=hiGetCurrentWindow()
cvId=getEditRep(winId)
selObj=geGetSelSet(cvId)
pathObj=setof(x selObj x~>objType=="Path")
foreach(shape pathObj
Box=shape~>bBox
llx=car(car(Box))
lly=cadr(car(Box))
urx=car(cadr(Box))
ury=cadr(cadr(Box))
x=(urx-llx)
y=(ury-lly)
Z = (x/y) *0.28)
printf( "Path_resistor = %f"Z)
);prog
);procedure

Bur when I ran it, I saw "Undefined Path_resistor" in CIW, maybe my code is not right, can anyone know how to fix it?
Thanks
 

In this what do u mean by path_resistor?

is it a procedure or layout path?

Thanks...
 

Thanks for your reply.

"Path_resistor" is just the procedure's name. Use this skill procedure, I can caculate metal path's resistor automatic, sometimes I am so care about the path's IR drop, so I want to know its resistor. I will use a shortcut key to call this procedure, so a name is must.

Have you got that? Can you find something wrong with my code?
 

i think you should declare the variable "Z" in the procedure also.....

The procedure returns nothing.....

sorry this is my try.... please try and let me know the result..

Thanks for ur quick reply..
 

Hi SpringWeng,
Please check below corrections made for your code,
1. cvId=getEditRep(winId) -> cvId=geGetEditRep(winId) # function geGetEditRep was missing prefix of "ge"
2. pathObj=setof(x selObj x~>objType=="Path") -> pathObj=setof(x selObj x~>objType=="path") #Alphabet P was capital in "Path" your code
3. Z variable caluculates for very foreach. So we need to close the bracket after the print statement and remove it from this line
4. printf( "Path_resistor = %f"Z) -> printf( "Path_resistor = %f" Z) # requires a space after closing the quotes
Included these modification and pasted below :

procedure(Path_resistor()
prog((winId cvId selObj shape llx lly urx ury x y Z)
winId=hiGetCurrentWindow()
cvId=geGetEditRep(winId)
selObj=geGetSelSet(cvId)
pathObj=setof(x selObj x~>objType=="path")
foreach(shape pathObj
Box=shape~>bBox
llx=car(car(Box))
lly=cadr(car(Box))
urx=car(cadr(Box))
ury=cadr(cadr(Box))
x=(urx-llx)
y=(ury-lly)
Z = (x/y) *0.28
printf( "\nPath_resistor = %f" Z)
); foreach close
);prog close
);procedure close

Let me know if this works for you!
Subhash
 

Hi Subhash

Sorry for the later reply.
Yes, it is works successfully . It will tell me the path_resistor in CIW. But it is better if all the result can be displayed in the layout window, so I will add some codes based on yours.
Thank you so much!

Spring
 

You can change the number according to your foundry documents. In my code, it is just a sample to test.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…