Help Required

S

sesi

Guest
Hi,

I am trying a procedure in layout , Given a top level cell name say
"TOP_ALL" from library "TEMP" , what I am checking is that all the
heirarchy instances in this "TOP_ALL" cell has to be referred only
from the "TEMP" library or any other standard libraries
(analogLib,standardLib) but no cell in the hierarchy list of
"TOP_ALL" has tobe referred from local libraries.
To do this I have few issues:

1)How to save Design->Hierarchy->Tree->Top to bottom information to a
file using skill.
For this I am using leHiTree() but its just opening the form.
(I am using this hierarchy list to know the reference of all the
instances in "TOP_ALL" cell).

2)Say the hierarchy information is stored in a file /temp/exp1.il.
Then I am using linux command for processing.

awk ' $1 !~ /TEMP|analogLib|standardLib/ {print $1, $2, $3, $4, $5 }' /
temp/exp1.il

The above command prints all the lines from the file /tmp/exp1.il
which
doesnot refer to the libraries "TEMP" "analogLib" "standardLib". So
that by seeing the list I can correct my layout.

The issue here is I cannot execute this command from icfb.

system("awk ' $1 !~ /TEMP|analogLib|standardLib/ {print $1, $2, $3,
$4, $5 }' /temp/exp1.il")
returning a value nil.

Regards,
Sesi.
 
Hi Sesi,

I think there is simpler to deal with your task.
Here is a quick file I just written while waiting for my simulation to
finish:

/*
Function : RKcheckLibRefFromTopLayout
1. load
2. run RKcheckLibRefFromTopLayout("libName" "cellName" "layout")
*/
procedure( RKcheckLibRefFromTopLayout(libName cellName viewName
@optional (cellListSoFar nil))
let((cv libRef)
libRef=list("myPdkLib" "mytechLib1" "myDigitalLib" )
;printf("Processing %s - %s - %s ...\n" libName cellName viewName)
cv=dbOpenCellViewByType(libName cellName viewName "maskLayout"
"r")
foreach(inst cv~>instances
unless(member(inst~>master~>libName libRef)
printf("Instance %s of %s/%s in cell %s/%s is not allowed\n"
inst~>name inst~>master~>libName inst~>master~>cellName
libName cellName)
)
unless(member(inst~>master cellListSoFar)
foreach(view inst~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj(inst~>master~>libName
inst~>master~>cellName view "*")) == "maskLayout"
then
cellListSoFar = cons( inst~>master cellListSoFar)
RKcheckLibRefFromTopLayout(inst~>master~>libName
inst~>master~>cellName view cellListSoFar)
)
)
);if
);foreach
dbClose(cv)
);let
);proc

You could enhance the above at your convenience.
I'm pretty much sure somebody has already written something to deal
with this. Andrew may have posted something in here or Sourcelink ...
One needs to search a bit I suppose.

Cheers,
Riad.
 
Hello Riad,

First of all thanks for your reply,

This script is nice one , but I didnot get the usage of
"cellListSoFar" in the above script.
To be curious can you also please help me how can I solve my procedure
stated above.

Regards,
Sesi.
 
Hi,

I'm not really sure what is expected in the file '/temp/exp1.il' & am
working on a digital design at the moment but I see that the command
being used is:
system("awk ' $1 !~ /TEMP|analogLib|standardLib/ {print $1, $2,
$3, $4, $5 }' /temp/exp1.il")

I've used the function system() before & had difficulty with escape
characters so may be you might try experimenting with some
backslashes.

Best regards,
I-FAB
 
sesi wrote, on 09/30/09 06:08:
Hello Riad,

First of all thanks for your reply,

This script is nice one , but I didnot get the usage of
"cellListSoFar" in the above script.
To be curious can you also please help me how can I solve my procedure
stated above.

Regards,
Sesi.
Riad's function is recursive. As it traverses the hierarchy, it collects the
list of cells it has visited, and then passes that into each lower level call.
The reason for doing this is to avoid descending the same cell twice.

When you call the function from the top level, you would not pass this argument
(it's optional, as you'll see), and it's really only intended to be used when
the function is called recursively from within.

Regards,

Andrew.
 
Hello Riad/Andrew

I had tried implementing this using windows(graphical interface)
but I have got two issues here

When I click the button "CLICK" its entering into infinite loop how to
avoid this.
And I want to view the o/p in a window for which I had open a file and
renamed printf statement in the foreach loop to fprintf(op "Instance
%s of ...)
and finally when i view the file using view command only one level
information is shown its not checking hierarchichly.

Thanks in Advance.



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SSreferenceChecker()
;let((Count libName cellName viewName libRef browse check)
myTable=makeTable("refgentable")
Count=1
for(Count 1 24
myTable[Count]= hiCreateSeparatorField(?name gensym('s))
)
libName=hiCreateStringField(
?name 'libName
?prompt "Library Name"
?callback "ddsUpdateSyncWithForm()"
)
cellName=hiCreateStringField(
?name 'cellName
?prompt "Cell Name"
?callback "ddsUpdateSyncWithForm()"
)
viewName=hiCreateStringField(
?name 'viewName
?prompt "View Name"
?callback "ddsUpdateSyncWithForm()"
)
libRef=hiCreateStringField(
?name 'libRef
?prompt "Library References"
?editable nil
;?callback ""
)
browse=hiCreateButton(
?name 'browse
?buttonText "Browse"
?callback "SyncLibmanager()"
)

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName cellName
viewName)"
)
refcheck1form = hiCreateAppForm(
?name gensym('refcheck1form)
?formTitle "Instance Reference Checker"
?fields
list(
list(libRef 0:0 600:30 200)
list(libName 0:40 600:30 200)
list(cellName 0:70 600:30 200)
list(viewName 0:100 600:30 200)
list(browse 200:130 100:25)
list(myTable[1] (0:160) (600:0) 0)
list(check 150:170 300:30)
list(myTable[2] (0:205) (600:0) 0)
)
)
hiDisplayForm(refcheck1form list(200 100))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SyncLibmanager()
ddsSyncWithForm(
refcheck1form
'browse
'libName
'cellName
'viewName
)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName
@optional (cellListSoFar nil))
let((cv libRef)
libRef=list("PRIMLIB" "SKill" "TEMP")
;filename="/tmp/info.il"
;op=outfile(filename)
;printf("Processing %s - %s - %s ...\n" libName cellName viewName)
cv=dbOpenCellViewByType(refcheck1form->libName->value
refcheck1form->cellName->value refcheck1form->viewName->value
"maskLayout" "r")
foreach(inst cv~>instances
unless(member(inst~>master~>libName libRef)
printf("Instance %s of %s/%s in cell %s/%s is not allowed\n"
inst~>name inst~>master~>libName inst~>master~>cellName
libName cellName)
)
unless(member(inst~>master cellListSoFar)
foreach(view inst~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj(inst~>master~>libName
inst~>master~>cellName view "*")) == "maskLayout"
then
cellListSoFar = cons( inst~>master cellListSoFar)
RKcheckLibRefFromTopLayout(inst~>master~>libName
inst~>master~>cellName view cellListSoFar)
)
)
);if
);foreach
dbClose(cv)
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Hello Riad/Andrew

I had tried implementing this using windows(graphical interface)
but I have got two issues here

When I click the button "CLICK" its entering into infinite loop how to
avoid this.
And I want to view the o/p in a window for which I had open a file and
renamed printf statement in the foreach loop to fprintf(op "Instance
%s of ...)
and finally when i view the file using view command only one level
information is shown its not checking hierarchichly.

Thanks in Advance.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SSreferenceChecker()
;let((Count libName cellName viewName libRef browse check)
myTable=makeTable("refgentable")
Count=1
for(Count 1 24
myTable[Count]= hiCreateSeparatorField(?name gensym('s))
)
libName=hiCreateStringField(
?name 'libName
?prompt "Library Name"
?callback "ddsUpdateSyncWithForm()"
)
cellName=hiCreateStringField(
?name 'cellName
?prompt "Cell Name"
?callback "ddsUpdateSyncWithForm()"
)
viewName=hiCreateStringField(
?name 'viewName
?prompt "View Name"
?callback "ddsUpdateSyncWithForm()"
)
libRef=hiCreateStringField(
?name 'libRef
?prompt "Library References"
?editable nil
;?callback ""
)
browse=hiCreateButton(
?name 'browse
?buttonText "Browse"
?callback "SyncLibmanager()"
)

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName cellName
viewName)"
)
refcheck1form = hiCreateAppForm(
?name gensym('refcheck1form)
?formTitle "Instance Reference Checker"
?fields
list(
list(libRef 0:0 600:30 200)
list(libName 0:40 600:30 200)
list(cellName 0:70 600:30 200)
list(viewName 0:100 600:30 200)
list(browse 200:130 100:25)
list(myTable[1] (0:160) (600:0) 0)
list(check 150:170 300:30)
list(myTable[2] (0:205) (600:0) 0)
)
)
hiDisplayForm(refcheck1form list(200 100))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SyncLibmanager()
ddsSyncWithForm(
refcheck1form
'browse
'libName
'cellName
'viewName
)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName
@optional (cellListSoFar nil))
let((cv libRef)
libRef=list("PRIMLIB" "SKill" "TEMP")
;filename="/tmp/info.il"
;op=outfile(filename)
;printf("Processing %s - %s - %s ...\n" libName cellName viewName)
cv=dbOpenCellViewByType(refcheck1form->libName->value
refcheck1form->cellName->value refcheck1form->viewName->value
"maskLayout" "r")
foreach(inst cv~>instances
unless(member(inst~>master~>libName libRef)
printf("Instance %s of %s/%s in cell %s/%s is not allowed\n"
inst~>name inst~>master~>libName inst~>master~>cellName
refcheck1form->libName->value refcheck1form->cellName-
unless(member(inst~>master cellListSoFar)
foreach(view inst~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj(inst~>master~>libName
inst~>master~>cellName view "*")) == "maskLayout"
then
cellListSoFar = cons( inst~>master cellListSoFar)
RKcheckLibRefFromTopLayout(inst~>master~>libName
inst~>master~>cellName view cellListSoFar)
)
)
);if
);foreach
dbClose(cv)
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Hello Riad/Andrew

I had tried implementing this using windows(graphical interface)
but I have got two issues here

When I click the button "CLICK" its entering into infinite loop how to
avoid this.
And I want to view the o/p in a window for which I had open a file and
renamed printf statement in the foreach loop to fprintf(op "Instance
%s of ...)
and finally when i view the file using view command only one level
information is shown its not checking hierarchichly.

Thanks in Advance.



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SSreferenceChecker()
;let((Count libName cellName viewName libRef browse check)
myTable=makeTable("refgentable")
Count=1
for(Count 1 24
myTable[Count]= hiCreateSeparatorField(?name gensym('s))
)
libName=hiCreateStringField(
?name 'libName
?prompt "Library Name"
?callback "ddsUpdateSyncWithForm()"
)
cellName=hiCreateStringField(
?name 'cellName
?prompt "Cell Name"
?callback "ddsUpdateSyncWithForm()"
)
viewName=hiCreateStringField(
?name 'viewName
?prompt "View Name"
?callback "ddsUpdateSyncWithForm()"
)
libRef=hiCreateStringField(
?name 'libRef
?prompt "Library References"
?editable nil
;?callback ""
)
browse=hiCreateButton(
?name 'browse
?buttonText "Browse"
?callback "SyncLibmanager()"
)

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName cellName
viewName)"
)
refcheck1form = hiCreateAppForm(
?name gensym('refcheck1form)
?formTitle "Instance Reference Checker"
?fields
list(
list(libRef 0:0 600:30 200)
list(libName 0:40 600:30 200)
list(cellName 0:70 600:30 200)
list(viewName 0:100 600:30 200)
list(browse 200:130 100:25)
list(myTable[1] (0:160) (600:0) 0)
list(check 150:170 300:30)
list(myTable[2] (0:205) (600:0) 0)
)
)
hiDisplayForm(refcheck1form list(200 100))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SyncLibmanager()
ddsSyncWithForm(
refcheck1form
'browse
'libName
'cellName
'viewName
)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName
@optional (cellListSoFar nil))
let((cv libRef)
libRef=list("PRIMLIB" "SKill" "TEMP")
;filename="/tmp/info.il"
;op=outfile(filename)
;printf("Processing %s - %s - %s ...\n" libName cellName viewName)
cv=dbOpenCellViewByType(refcheck1form->libName->value
refcheck1form->cellName->value refcheck1form->viewName->value
"maskLayout" "r")
foreach(inst cv~>instances
unless(member(inst~>master~>libName libRef)
printf("Instance %s of %s/%s in cell %s/%s is not allowed\n"
inst~>name inst~>master~>libName inst~>master~>cellName
refcheck1form->libName->value refcheck1form->cellName-
unless(member(inst~>master cellListSoFar)
foreach(view inst~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj(inst~>master~>libName
inst~>master~>cellName view "*")) == "maskLayout"
then
cellListSoFar = cons( inst~>master cellListSoFar)
RKcheckLibRefFromTopLayout(inst~>master~>libName
inst~>master~>cellName view cellListSoFar)
)
)
);if
);foreach
dbClose(cv)
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Hello,


I could solve the first problem by changing
check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName cellName
viewName)"

to

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName->value
cellName->value viewName->value)"


Earlier I have passed the structure info as arguments now I passed
the actual names , and the problem is solved.
But I have got the problem with storing the o/p to a file and viewing
it in a window.
 
Hello,

I could solve the first problem by changing
check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName cellName
viewName)"

to

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName->value
cellName->value viewName->value)"

Earlier I have passed the structure info as arguments now I passed
the actual names , and the problem is solved.
But I have got the problem with storing the o/p to a file and viewing
it in a window.
And also I want to take the the libRef from the user for which I have
created a
prompt LIBRARY REFERENCES but I could not get the procedure of taking
the i/p in the list form.
 
sesi wrote, on 10/13/09 15:00:
Hello,

I could solve the first problem by changing
check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName cellName
viewName)"

to

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "RKcheckLibRefFromTopLayout(libName->value
cellName->value viewName->value)"

Earlier I have passed the structure info as arguments now I passed
the actual names , and the problem is solved.
But I have got the problem with storing the o/p to a file and viewing
it in a window.
And also I want to take the the libRef from the user for which I have
created a
prompt LIBRARY REFERENCES but I could not get the procedure of taking
the i/p in the list form.
In order to pass the library references to the hierarchical traversal function,
you need to pass another argument to the function. I did the same to pass an
open port, and then opened the port in the form callback function. So now it
writes to a file in /tmp - but I guess you could always add a field on the form
to specify the filename.

I fixed all your unnecessary global variables, and corrected the opening of the
cellView inside your version of Riad's function (you were always opening the top
level cellview, despite traversing hierarchically - this would have caused your
infinite loop - I suspect you had probably fixed that, but since you did not
re-post the code, I had to fix it anyway).

Regards,

Andrew.

procedure(SSreferenceChecker()
let((libName cellName viewName libRef browse check myTable refcheck1form)
myTable=makeTable("refgentable")
for(Count 1 24
myTable[Count]= hiCreateSeparatorField(?name gensym('s))
)
libName=hiCreateStringField(
?name 'libName
?prompt "Library Name"
?callback "ddsUpdateSyncWithForm()"
)
cellName=hiCreateStringField(
?name 'cellName
?prompt "Cell Name"
?callback "ddsUpdateSyncWithForm()"
)
viewName=hiCreateStringField(
?name 'viewName
?prompt "View Name"
?callback "ddsUpdateSyncWithForm()"
)
libRef=hiCreateStringField(
?name 'libRef
?prompt "Library References"
?editable t
;?callback ""
)
browse=hiCreateButton(
?name 'browse
?buttonText "Browse"
?callback "SyncLibmanager()"
)

check=hiCreateButton(
?name 'check
?buttonText "CHECK"
?callback "SSrefCheckCB(hiGetCurrentForm())"
)
refcheck1form = hiCreateAppForm(
?name gensym('refcheck1form)
?formTitle "Instance Reference Checker"
?fields
list(
list(libRef 0:0 600:30 200)
list(libName 0:40 600:30 200)
list(cellName 0:70 600:30 200)
list(viewName 0:100 600:30 200)
list(browse 200:130 100:25)
list(myTable[1] (0:160) (600:0) 0)
list(check 150:170 300:30)
list(myTable[2] (0:205) (600:0) 0)
)
)
hiDisplayForm(refcheck1form list(200 100))
)
)

procedure(SSrefCheckCB(form)
let((prt)
prt=outfile("/tmp/info.il")
RKcheckLibRefFromTopLayout(
form->libName->value
form->cellName->value
form->viewName->value
parseString(form->libRef->value)
prt
)
close(prt)
)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(SyncLibmanager()
ddsSyncWithForm(
hiGetCurrentForm()
'browse
'libName
'cellName
'viewName
)
)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName libRef
@optional (prt poport) (cellListSoFar nil))
let((cv)
cv=dbOpenCellViewByType(libName cellName viewName "maskLayout" "r")
foreach(inst cv~>instances
unless(member(inst~>master~>libName libRef)
fprintf(prt "Instance %s of %s/%s in cell %s/%s is not allowed\n"
inst~>name inst~>master~>libName inst~>master~>cellName
libName cellName
)
)
unless(member(inst~>master cellListSoFar)
foreach(view inst~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj(inst~>master~>libName
inst~>master~>cellName view "*")) == "maskLayout"
then
cellListSoFar = cons( inst~>master cellListSoFar)
RKcheckLibRefFromTopLayout(inst~>master~>libName
inst~>master~>cellName view libRef prt cellListSoFar)
)
)
);if
);foreach
dbClose(cv)
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
Hello Andrew,

I am facing one more problem here its really taking lot of time for
checking the top level layouts.
Whether there is any procedure to reduce the execution time.
I think the option cellListSofar can save the time by not checking the
instances with same cellname.
I have created a cell called "testcell"(Which contains same pmos
instance copies 1000 times) and copied the cell "testcell" 100times
in the topcell "Temp" and when I execute

RKcheckLibRefFromTopLayout("Test" "Temp" "layout" list("testcell"))

Now the script is checking for all the 100 instances of copies of
"testcell" even though I have given "testcell" as the argument for
cellListSoFar.
Whether itis the correct way to give the argument in the function
RKcheckLibRefFromTopLayout.
And is there any other procedure to reduce the execution time.


Thanks in advance
 
sesi <sesikala540@gmail.com> writes:

And is there any other procedure to reduce the execution time.
If I'm correctly understanding your problem -- I didn't look at the code
you or Andrew posted --, I think using cv->instHeaders instead of
cv->instances~>instHeader should help you. You wouldn't have to filter
out duplicate as each master will be present once.

Yours,

--
Jean-Marc
 
Hello Andrew,

I am facing one more problem here its really taking lot of time
for
checking the top level layouts.
Whether there is any procedure to reduce the execution time.
I think the option cellListSofar can save the time by not checking
the
instances with same cellname.
I have created a cell called "testcell"(Which contains same pmos
instance copies 1000 times) and copied the cell "testcell" 100times
in the topcell "Temp" and when I execute


RKcheckLibRefFromTopLayout("Test" "Temp" "layout" list("testcell"))


Now the script is checking for all the 100 instances of copies of
"testcell" even though I have given "testcell" as the argument for
cellListSoFar.
Whether itis the correct way to give the argument in the function
RKcheckLibRefFromTopLayout.
And is there any other procedure to reduce the execution time.

One more thing is How can I run this script in the background
like calibre so that I can do my Work in the meanwhile.

Thanks in advance
 
sesi <sesikala540@gmail.com> writes:

Hello Marc,
Sorry, i didnot get that.
Reading your messages -- but skipping the code -- I've the impression that
you are doing something like

(foreach inst cv->instances
(unless (member inst->master seenCVs)
(setq seenCVs (cons inst->master seenCVs))
(doSomethingOn master->libName master->cellName master->viewName)))

I'd suggesting

(foreach instHeader cv->instHeaders
(doSomethingOn instHeader->libName instHeader->cellName instHeader->viewName))

as equivalent and more efficient.

My second point was that

(setq seenCVs (makeTable "seenCVs" nil))
(foreach inst cv->instances
(unless (arrayref seenCVs inst->master)
(setarray seenCVs inst->master t)
(doSomethingOn master->libName master->cellName master->viewName)))

is better than using a list for the same purpose if there is potentially a
lot of objects put in the set.

Yours,

--
Jean-Marc
 
Jean-Marc Bourguet wrote, on 10/15/09 09:06:
sesi <sesikala540@gmail.com> writes:

Hello Marc,
Sorry, i didnot get that.

Reading your messages -- but skipping the code -- I've the impression that
you are doing something like

(foreach inst cv->instances
(unless (member inst->master seenCVs)
(setq seenCVs (cons inst->master seenCVs))
(doSomethingOn master->libName master->cellName master->viewName)))

I'd suggesting

(foreach instHeader cv->instHeaders
(doSomethingOn instHeader->libName instHeader->cellName instHeader->viewName))

as equivalent and more efficient.

My second point was that

(setq seenCVs (makeTable "seenCVs" nil))
(foreach inst cv->instances
(unless (arrayref seenCVs inst->master)
(setarray seenCVs inst->master t)
(doSomethingOn master->libName master->cellName master->viewName)))

is better than using a list for the same purpose if there is potentially a
lot of objects put in the set.

Yours,
In addition to what Jean-Marc suggests, using a table (created with makeTable)
rather than a list to contain the "cellsSoFar" is a good idea. If you have a lot
of cells, this can make a massive improvement.

I did not try to optimize the code - more keep it simple to illustrate the
point. I had no idea what volume of data you were dealing with.

Regards,

Andrew.
 
sesi wrote, on 10/19/09 09:00:
Hi Andrew,

I will try to work on Yours and Jean-Marc suggestions.
But when I run this script on my toplevel layout(Size 3000 mic x 3000
mic) x and y dim i.e approx 9 sq mm its taking about 30 min to
generate the output.
But I could get the complete hierarchy information from the leHiTree
()
command with in seconds, how this function is searching the hierarchy
Andrew , How can I modify my script so that it generates the o/p as
quick as the leHiTree() command .
Thanks for the support.
Well, it would help if you could give the latest version of your code, so we
don't have to guess what you've currently got.

Also, the area is not what matters - it's almost certainly the number of
instances. It's definitely beneficial to look at the cv~>instanceMasters or
~>instHeaders to ensure you don't have to even worry about the case where there
are 10,000 instances of one master (~>instanceMasters will get them only once).
And tables will definitely help over lists when trying to avoid visiting a
cellView more than once.

If you post the current code, then one of us can hack it so it is more efficient
(when we have a moment).

Regards,

Andrew.
 
Hi Andrew,

I will try to work on Yours and Jean-Marc suggestions.
But when I run this script on my toplevel layout(Size 3000 mic x 3000
mic) x and y dim i.e approx 9 sq mm its taking about 30 min to
generate the output.
But I could get the complete hierarchy information from the leHiTree()
command with in seconds, how this function is searching the hierarchy
Andrew.
Thanks for the support.
 

Welcome to EDABoard.com

Sponsor

Back
Top