Cadence is frozen after execution of skill script

B

bu-bu

Guest
Hello ,

i have a problem with the following code.

This script traverses the schematic hierarchy. It creates a file that
contains schematic name for every instance (like |i1|I12)

For that, i have modified a script i have found on sourceLink.

This code works fine. The file is created correctly, but after
execution of the script on a "big" schematic (more than 1000
instances), my Cadence session is frozen during 5 minutes.

On a smaller schematic (100 instances) , the Cadence session is frozen
during few seconds only.

I would like to know how to improve this code to make it faster on big
schematics. Because waiting 5 minutes is very long!

And this function is a part of a script : I guess users could be
surprised if they run the whole script!

I use Cadence IC5.1.41 usr6 isr10.

Could you help me please?

Thanks and regards,

bubu

---------------------------


procedure(MyScript()
let((ResultFile cv cw)
cv = geGetWindowRep()
cw = hiGetCurrentWindow()

ResultFile= outfile("./Myfile.txt")
MyScriptSub(cv cw ResultFile)
close(ResultFile)
)) ;; let proc


procedure(MyScriptSub(cv cw ResultFile)
let(( viewList stopList ExcludeList switchedView Inst List)

viewList = "schematic cmos.sch symbol"
stopList = list("symbol")
List = list()
ExcludeList = list("basic" "analogLib")


foreach(Inst cv~>instances if(member(Inst~>libName ExcludeList) ==
nil then List=tconc(List Inst))) ;; foreach

foreach(Inst car(List)

switchedView = dbGetAnyInstSwitchMaster(Inst viewList)
geSwitch(cw "r" Inst 1 1 1 )

when(switchedView
unless(member(switchedView~>viewName stopList)
fprintf(ResultFile strcat(geGetInstHier(cw) "\n"))
MyScriptSub(switchedView cw ResultFile)
) ;; unless
) ;; when
geReturn()
) ;; foreach
)) ;; let proc
 
On 10 ÉŔÎ, 03:01, bu-bu <bedo...@gmail.com> wrote:
Hello ,

i have a problem with the following code.

This script traverses the schematic hierarchy. It creates a file that
contains schematic name for every instance (like |i1|I12)

For that, i have modified a script i have found on sourceLink.

This code works fine. The file is created correctly, but after
execution of the script on a "big" schematic (more than 1000
instances), my Cadence session is frozen during 5 minutes.

On a smaller schematic (100 instances) , the Cadence session is frozen
during few seconds only.

I would like to know how to improve this code to make it faster on big
schematics. Because waiting 5 minutes is very long!

And this function is a part of a script : I guess users could be
surprised if they run the whole script!

I use Cadence IC5.1.41 usr6 isr10.

Could you help me please?

Thanks and regards,

bubu

---------------------------

procedure(MyScript()
let((ResultFile cv cw)
cv = geGetWindowRep()
cw = hiGetCurrentWindow()

ResultFile= outfile("./Myfile.txt")
MyScriptSub(cv cw ResultFile)
close(ResultFile)
)) ;; let proc

procedure(MyScriptSub(cv cw ResultFile)
let(( viewList stopList ExcludeList switchedView Inst List)

viewList = "schematic cmos.sch symbol"
stopList = list("symbol")
List = list()
ExcludeList = list("basic" "analogLib")

foreach(Inst cv~>instances šif(member(Inst~>libName ExcludeList) => nil then List=tconc(List Inst))) ;; foreach

foreach(Inst car(List)

š š š š switchedView = dbGetAnyInstSwitchMaster(Inst viewList)
š š š š geSwitch(cw "r" Inst 1 1 1 )

š š š š when(switchedView
š š š š š š š š unless(member(switchedView~>viewName stopList)
š š š š š š š š š š š š fprintf(ResultFile strcat(geGetInstHier(cw) "\n"))
š š š š š š š š š š š š MyScriptSub(switchedView cw ResultFile)
š š š š š š š š ) ;; unless
š š š š ) ;; when
š š š š geReturn()
) ;; foreach
)) ;; let proc
Hi Bubu, try to check with a small design (~10~20 components) where
the skill code is cycling, for debuging, include "printf("<your
message>") and you will know what is happening ;)
 
Hello Vitalie,

Thanks a lot for your reply.
I think my code is working because the output file is created
correctly and quiclky.
The problem happens when the function returns : it freezes Cadence
during few minutes.

Thanks and regards,

bubu
 
bu-bu wrote, on 06/10/09 18:09:
Hello Vitalie,

Thanks a lot for your reply.
I think my code is working because the output file is created
correctly and quiclky.
The problem happens when the function returns : it freezes Cadence
during few minutes.

Thanks and regards,

bubu
Does your code really need to keep switching the hierarchy with geSwitch and
geReturn? It seems you're just producing some kind of "tree" type output - you
ought to be able to do that more efficiently with something like sourcelink
solution number 11300048. This uses db functions to traverse the hierarchy, and
avoids switching graphically, which is what you are doing.

Best Regards,

Andrew.
 
Hello Andrew,

Thanks a lot for the solution.
The reason why i switch graphically is simple: i would like to use the
function geGetInstHier() to write in my file the hierarchy path. (like
|I1|I12|X23)
This is possible only if i use the same window to open all my cells.
The only function i have found for that is geswitch().

The solution you have provided me is useful (i have modified this one
to write the code above) but i can not see how to get the hierarchy
path without graphically switching ?

Thanks and regards,

bubu
 
On Jun 11, 8:16 pm, bu-bu <bedo...@gmail.com> wrote:
Hello Andrew,

Thanks a lot for the solution.
The reason why i switch graphically is simple: i would like to use the
function geGetInstHier() to write in my file the hierarchy path. (like
|I1|I12|X23)
This is possible only if i use the same window to open all my cells.
The only function i have found for that is geswitch().

The solution you have provided me is useful (i have modified this one
to write the code above) but i can not see how to get the hierarchy
path without graphically switching ?

Thanks and regards,

bubu
Hi Bubu,

Here an improved version of your original script, it should do the job
in few seconds.

Two differences in the code:
- do not build a new list with the insts that you want to traverse,
just traverse them when you do the test on ignoreLibs
- a new param 'hierStr' was added on MyScriptSub()
it keeps the hierarchPath as string, so you do not have to
geGetInstHier()/geReturn for every single inst

BR,
Marcel

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure(MyScript()
let((ResultFile cv cw)
cv = geGetWindowRep()
cw = hiGetCurrentWindow()

ResultFile= outfile("./Myfile.txt")
MyScriptSub(cv cw ResultFile)
close(ResultFile)
)) ;; let proc

procedure(MyScriptSub(cv cw ResultFile @optional (hierStr geGetInstHier
()))
let(( viewList stopList ExcludeList switchedView Inst List)

;; if last char is not "/", add it
unless(substring(hierStr -1) == "/"
hierStr = strcat(hierStr "/")
)

viewList = "schematic cmos.sch symbol"
stopList = list("symbol")
List = list()
ExcludeList = list("basic" "analogLib")

foreach(Inst cv~>instances
if(member(Inst~>libName ExcludeList) == nil then
switchedView = dbGetAnyInstSwitchMaster(Inst viewList)

when(switchedView
unless(member(switchedView~>viewName stopList)
fprintf(ResultFile strcat(hierStr Inst->name
"\n"))
MyScriptSub(switchedView cw ResultFile strcat
(hierStr Inst->name "/"))
) ;; unless
) ;; when
)
) ;; foreach

)) ;; let proc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Hello Marcel,

Thanks a lot for your improvments. It's amazing how it's fast now !

i did not think at all about strcat a variable with the name of the
instance.

Thanks and regards,

bubu
 

Welcome to EDABoard.com

Sponsor

Back
Top