| |
 |
|
| Computers Forum Index » Computer - Cadence » Help Required... |
|
Page 2 of 2 Goto page Previous 1, 2 |
|
| Author |
Message |
| Andrew Beckett... |
Posted: Fri Oct 16, 2009 3:05 am |
|
|
|
Guest
|
Jean-Marc Bourguet wrote, on 10/15/09 09:06:
Quote: sesi <sesikala540 at (no spam) 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. |
|
|
| Back to top |
|
|
|
| BUS... |
Posted: Mon Oct 19, 2009 7:52 am |
|
|
|
Guest
|
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. |
|
|
| Back to top |
|
|
|
| sesi... |
Posted: Mon Oct 19, 2009 8:00 am |
|
|
|
Guest
|
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. |
|
|
| Back to top |
|
|
|
| Andrew Beckett... |
Posted: Mon Oct 19, 2009 12:49 pm |
|
|
|
Guest
|
sesi wrote, on 10/19/09 09:00:
Quote: 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. |
|
|
| Back to top |
|
|
|
| sesi... |
Posted: Mon Oct 19, 2009 12:59 pm |
|
|
|
Guest
|
Hello Andrew,
This is my present code which I am working on.
/
***********************************************************************
ReferenceChecker.il
************************************************************************/
;Create the main form
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
)
label_rev=hiCreateLabel(
?name 'label_rev
?labelText "Reference Checker"
)
label_time=hiCreateLabel(
?name 'label_time
?labelText getCurrentTime()
)
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)
list(label_rev (0:220) (600:0) 0)
list(label_time (440:220) (0:0) 0)
)
)
hiDisplayForm(refcheck1form list(200 100))
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Use a Interface function to run the RKcheckLibRefFromTopLayout()
function
procedure(SSrefCheckCB(form)
let((prt)
prt=outfile("/tmp/info.il") ;open the port
fprintf(prt "\n
************************************************************************
\n
Reference Check Information \n
************************************************************************
\n
--------------------------
\n Date:
%s
\n
--------------------------
\n****************************************************\
\nLibrary : %s\
\nCell : %s\
\nView : %s\
\n****************************************************\n\n\n
Library References : %L\n\n\n"
getCurrentTime()
form->libName->value
form->cellName->value
form->viewName->value
parseString(form->libRef->value)
)
RKcheckLibRefFromTopLayout(
form->libName->value
form->cellName->value
form->viewName->value
parseString(form->libRef->value)
prt
)
close(prt)
view("/tmp/info.il")
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;To sync with Lib manager
procedure(SyncLibmanager()
ddsSyncWithForm(
hiGetCurrentForm()
'browse
'libName
'cellName
'viewName
)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName libRef
at (no spam) optional (prt poport) (cellListSoFar nil))
let((cv Stdliblay Stdlibsch)
if(ddMapGetFileViewType(ddGetObj(libName cellName viewName "*"))
== "maskLayout"
then
Stdliblay=parseString("StandardLib AnaLib DigLib")
libRef=append(libRef Stdliblay)
cv=dbOpenCellViewByType(libName cellName viewName "maskLayout"
"r")
foreach(instHeader cv~>instHeaders ;First Level
unless(member(instHeader~>master~>libName libRef)
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\" is
not allowed\n" libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
) ;Now go deep and check
unless(member(instHeader~>master cellListSoFar)
foreach(view instHeader~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj
(instHeader~>master~>libName instHeader~>master~>cellName view "*"))
== "maskLayout"
then ; Run recursively until everything completes
cellListSoFar = cons( instHeader~>master cellListSoFar)
RKcheckLibRefFromTopLayout(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt cellListSoFar)
);if
);foreach
);unless
);foreach
);layout if
if(ddMapGetFileViewType(ddGetObj(libName cellName viewName "*")) ==
"schematic"
then
Stdlibsch=parseString("BORDERS analogLib basic StandardLib AnaLib
DigLib")
libRef=append(libRef Stdlibsch)
cv=dbOpenCellViewByType(libName cellName viewName "schematic"
"r")
foreach(instHeader cv~>instHeaders ;First level
unless(member(instHeader~>master~>libName libRef)
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\" is
not allowed\n" libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
) ;Now go deep and check
unless(member(instHeader~>master
cellListSoFar)
foreach(view instHeader~>master~>cell~>views~>name
if(ddMapGetFileViewType(ddGetObj
(instHeader~>master~>libName instHeader~>master~>cellName view "*"))
== "schematic"
then ; Run recursively until everything completes
cellListSoFar = cons( instHeader~>master cellListSoFar)
RKcheckLibRefFromTopLayout(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt cellListSoFar)
);if
);foreach
);unless
);foreach
);Schematic if
dbClose(cv)
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
| Back to top |
|
|
|
| Andrew Beckett... |
Posted: Mon Oct 19, 2009 6:23 pm |
|
|
|
Guest
|
Your code is rather messy and hard to read. It's also not entirely clear what
you're actually trying to do - you seem to be looking at lots of views alongside
each view in the layout hierarchy.
Anyway, I took your code and unwrapped the lines (it's still messy, but you
can sort that out).
The first problem was that the cellListSoFar was being updated too often - the
same master was being added more than once for each view being processed. Anyway,
I fixed that (original lines commented out, new moved up a couple of lines).
Also, it only built cellListSoFar on the way down the hierarchy, and didn't
collect it on the way back up - so I changed that. The recursive function
now returns cellListSoFar, and you'll see that is assigned in each
call to RKcheckLibRefFromTopLayout().
By doing this, it massively reduces the re-work, and makes it significantly
faster.
I'm not convinced all this ddMapGetFileViewType is necessary - it might be
better to use the opened cellView object and look at master~>cellViewType ,
since that saves looking at disk again.
Anyway, the code with these changes in is as follows:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName libRef
at (no spam) optional (prt poport) (cellListSoFar nil))
let((cv Stdliblay Stdlibsch masterObj)
if(ddMapGetFileViewType(ddGetObj(libName cellName viewName "*")) == "maskLayout"
then
Stdliblay=parseString("StandardLib AnaLib DigLib")
libRef=append(libRef Stdliblay)
cv=dbOpenCellViewByType(libName cellName viewName "maskLayout" "r")
foreach(instHeader cv~>instHeaders ;First Level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\" is not allowed\n"
libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(member(instHeader~>master cellListSoFar)
cellListSoFar = cons( instHeader~>master cellListSoFar)
foreach(view instHeader~>master~>cell~>views~>name
masterObj=ddGetObj(instHeader~>master~>libName instHeader~>master~>cellName view "*")
if(masterObj && ddMapGetFileViewType(masterObj) == "maskLayout"
then ; Run recursively until everything completes
; cellListSoFar = cons( instHeader~>master cellListSoFar)
cellListSoFar=RKcheckLibRefFromTopLayout(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt cellListSoFar)
);if
);foreach
);unless
);foreach
);layout if
if(ddMapGetFileViewType(ddGetObj(libName cellName viewName "*")) == "schematic"
then
Stdlibsch=parseString("BORDERS analogLib basic StandardLib AnaLib DigLib")
libRef=append(libRef Stdlibsch)
cv=dbOpenCellViewByType(libName cellName viewName "schematic" "r")
foreach(instHeader cv~>instHeaders ;First level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\" is not allowed\n"
libName cellName instHeader~>master~>libName instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(member(instHeader~>master cellListSoFar)
cellListSoFar = cons( instHeader~>master cellListSoFar)
foreach(view instHeader~>master~>cell~>views~>name
masterObj=ddGetObj(instHeader~>master~>libName instHeader~>master~>cellName view "*")
if(masterObj && ddMapGetFileViewType(masterObj) == "schematic"
then ; Run recursively until everything completes
; cellListSoFar = cons( instHeader~>master cellListSoFar)
cellListSoFar=RKcheckLibRefFromTopLayout(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt cellListSoFar)
);if
);foreach
);unless
);foreach
);Schematic if
dbClose(cv)
cellListSoFar
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
I also added a bunch of code in there to check for cellViews with missing data - because
my example kept breaking because of old views lying around with missing masters.
Now, having done this, in my example (with over 3000 different masters) it took around 7 seconds.
You could change the code to use tables instead of a list for cellListSoFar:
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName libRef
at (no spam) optional (prt poport) (cellListSoFar nil))
let((cv Stdliblay Stdlibsch masterObj)
; create a table to record where we've been
unless(cellListSoFar cellListSoFar=makeTable('masterTable nil))
if(ddMapGetFileViewType(ddGetObj(libName cellName viewName "*")) == "maskLayout"
then
Stdliblay=parseString("StandardLib AnaLib DigLib")
libRef=append(libRef Stdliblay)
cv=dbOpenCellViewByType(libName cellName viewName "maskLayout" "r")
foreach(instHeader cv~>instHeaders ;First Level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\" is not allowed\n"
libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(cellListSoFar[instHeader~>master]
cellListSoFar[instHeader~>master]=t
foreach(view instHeader~>master~>cell~>views~>name
masterObj=ddGetObj(instHeader~>master~>libName instHeader~>master~>cellName view "*")
if(masterObj && ddMapGetFileViewType(masterObj) == "maskLayout"
then ; Run recursively until everything completes
cellListSoFar=RKcheckLibRefFromTopLayout(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt cellListSoFar)
);if
);foreach
);unless
);foreach
);layout if
if(ddMapGetFileViewType(ddGetObj(libName cellName viewName "*")) == "schematic"
then
Stdlibsch=parseString("BORDERS analogLib basic StandardLib AnaLib DigLib")
libRef=append(libRef Stdlibsch)
cv=dbOpenCellViewByType(libName cellName viewName "schematic" "r")
foreach(instHeader cv~>instHeaders ;First level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\" is not allowed\n"
libName cellName instHeader~>master~>libName instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(cellListSoFar[instHeader~>master]
cellListSoFar[instHeader~>master]=t
foreach(view instHeader~>master~>cell~>views~>name
masterObj=ddGetObj(instHeader~>master~>libName instHeader~>master~>cellName view "*")
if(masterObj && ddMapGetFileViewType(masterObj) == "schematic"
then ; Run recursively until everything completes
cellListSoFar=RKcheckLibRefFromTopLayout(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt cellListSoFar)
);if
);foreach
);unless
);foreach
);Schematic if
dbClose(cv)
cellListSoFar
);let
);proc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
This could make a difference if you have a huge number of cells, but in my case it made no noticeable
difference.
I'd suggest you use the SKILL Profiler (Tools->SKILL Development) to see where your bottlenecks are.
Also, printing out information to see if it is visiting the same cells twice is a good idea.
Overall, the objectives of your code still aren't clear to me. A few comments wouldn't go amiss!
Regards,
Andrew. |
|
|
| Back to top |
|
|
|
| sesi... |
Posted: Tue Oct 20, 2009 6:44 am |
|
|
|
Guest
|
Hi Andrew,
Thanks alot,
Now its taking around 5 min for layout for the first run and 2 min for
the second and further runs.
For schematic its taking only 3 to 4 seconds.
The major problem was with cellListSoFar and using cv~>instances
instead of cv~>instHeaders.
Still I will try to implement makeTable instead of using lists and try
to debug using SKILL profiler whether any cell is being visited twice. |
|
|
| Back to top |
|
|
|
| sesi... |
Posted: Wed Oct 21, 2009 10:18 am |
|
|
|
Guest
|
Hello Andrew,
Using Skill Profiler I could find the amount of memory used for the
functions and
the time taken for each function.
But How can I print the information of the function being visted to
the cells as you said.
I didnot get any option for printing out the cells to which the
function has visted. |
|
|
| Back to top |
|
|
|
| Andrew Beckett... |
Posted: Fri Oct 23, 2009 2:22 am |
|
|
|
Guest
|
sesi wrote, on 10/21/09 11:18:
Quote: Hello Andrew,
Using Skill Profiler I could find the amount of memory used for the
functions and
the time taken for each function.
But How can I print the information of the function being visted to
the cells as you said.
I didnot get any option for printing out the cells to which the
function has visted.
For that you'll need to add additional debug print statements in the code, I
think. There's certainly nothing a general profiler can do to print specific
debug information such as this.
Potentially you could use tracev() to trace particular variable assignments -
provided you can pick a unique variable that is not used elsewhere in your code
or the Cadence tools.
Regards,
Andrew. |
|
|
| Back to top |
|
|
|
| sesi... |
Posted: Fri Oct 23, 2009 9:35 am |
|
|
|
Guest
|
Hello Andrew,
Thanks for the information regarding skillProfiler.
May be the last query from my side , I have finally got three choices
Script 1 which uses ddMapGetFileViewType() ,this is a bit slow in
execution.
Script 2 which uses dbOpenCellViewByType() , instead of
ddMapGetFileViewType() to check the condition
for checking "maskLayout" , this is faster compared to script1.
Script 3 where the condition is checked using the member function ,
this is alot faster compared to the above scripts
but the problem is I am checking only for the view "layout" how to
give the condition for other views like hsimD,hsim,auLvs,eldo,eldoD
which also belongs to cellview type "maskLayout".
But for schematic section I see that only the view "schematic"
belongs to cellview type "schematic" still I am getting incorrect
result what could be the reason.
Script1 and Script2 lines are commented.
Stdliblay is used to add the list of standard libraries to libRef (so
that they are ignored).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName libRef
at (no spam) optional (prt poport) (cellListSoFar nil))
let((cv Stdliblay Stdlibsch masterObj)
; create a table to record where we've been
unless(cellListSoFar cellListSoFar=makeTable('masterTable
nil));Create Table cellListSoFar during the first loop
cv=dbOpenCellViewByType(libName cellName viewName)
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
; if(ddMapGetFileViewType(ddGetObj(libName cellName viewName
"*")) == "maskLayout"
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
if(cv~>cellViewType == "maskLayout"
then ;list of Standard Libraries
Stdliblay=parseString("StandardLib AnaLib DigLib")
libRef=append(libRef Stdliblay)
foreach(instHeader cv~>instHeaders ;First Level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\"
is not allowed\n"
libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(cellListSoFar[instHeader~>master]
cellListSoFar[instHeader~>master]=t
foreach(view instHeader~>master~>cell~>views~>name
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
; masterObj=ddGetObj(instHeader~>master~>libName
instHeader~>master~>cellName view "*")
; if(masterObj && ddMapGetFileViewType(masterObj) ==
"maskLayout"
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; Script 2 ;;;;;;;;;;;;;;;;;;
; masterObj=dbOpenCellViewByType(instHeader~>master~>libName
instHeader~>master~>cellName view)
; if(masterObj~>cellViewType == "maskLayout"
;;;;;;;;;;;;;;;;;;;;;;;;; Script 2 ;;;;;;;;;;;;;;;;;;
if( member("layout" list(view))
then ; Run recursively until everything completes
cellListSoFar=SScheckLibRefFromTopLayout
(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt
cellListSoFar)
);if
);foreach
);unless
);foreach
);layout if
if(cv~>cellViewType == "schematic"
then
Stdlibsch=parseString("BORDERS analogLib basic StandardLib
AnaLib DigLib")
libRef=append(libRef Stdlibsch)
foreach(instHeader cv~>instHeaders ;First level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\"
is not allowed\n"
libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(cellListSoFar[instHeader~>master]
cellListSoFar[instHeader~>master]=t
foreach(view instHeader~>master~>cell~>views~>name
;masterObj=dbOpenCellViewByType
(instHeader~>master~>libName instHeader~>master~>cellName view)
;if(masterObj~>cellViewType == "schematic"
if( member( list("schematic") list(view))
then ; Run recursively until everything completes
cellListSoFar=SScheckLibRefFromTopLayout
(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt
cellListSoFar)
);if
);foreach
);unless
);foreach
);Schematic if
dbClose(cv)
cellListSoFar
);let
);proc |
|
|
| Back to top |
|
|
|
| sesi... |
Posted: Fri Oct 23, 2009 11:11 am |
|
|
|
Guest
|
Hello Andrew,
Thanks for the information regarding skillProfiler.
May be the last queries from my side ,
1)How to zoom to a instance when its LibName , CellName and viewName
is known.(I want this option so that I can zoom to incorrect reference
instances).
2)Ingeneral how to run a script in the backGround (ex may be this
script).
3)
Regarding this Script-
I have finally got three choices
Script 1 which uses ddMapGetFileViewType() ,this is a bit slow in
execution.
Script 2 which uses dbOpenCellViewByType() , instead of
ddMapGetFileViewType() to check the condition
for checking "maskLayout" , this is faster compared to script1.
Script 3 where the condition is checked using the member function ,
this is alot faster compared to the above scripts
but the problem is I am checking only for the view "layout" how to
give the condition for other views like hsimD,hsim,auLvs,eldo,eldoD
which also belongs to cellview type "maskLayout".
But for schematic section I see that only the view "schematic"
belongs to cellview type "schematic" still I am getting incorrect
result what could be the reason.
Info:
Script1 and Script2 lines are commented.
Stdliblay is used to add the list of standard libraries to libRef (so
that they are ignored).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
procedure(RKcheckLibRefFromTopLayout(libName cellName viewName libRef
at (no spam) optional (prt poport) (cellListSoFar nil))
let((cv Stdliblay Stdlibsch masterObj)
; create a table to record where we've been
unless(cellListSoFar cellListSoFar=makeTable('masterTable
nil));Create Table cellListSoFar during the first loop
cv=dbOpenCellViewByType(libName cellName viewName)
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
; if(ddMapGetFileViewType(ddGetObj(libName cellName viewName
"*")) == "maskLayout"
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
if(cv~>cellViewType == "maskLayout"
then ;list of Standard Libraries
Stdliblay=parseString("StandardLib AnaLib DigLib")
libRef=append(libRef Stdliblay)
foreach(instHeader cv~>instHeaders ;First Level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\"
is not allowed\n"
libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(cellListSoFar[instHeader~>master]
cellListSoFar[instHeader~>master]=t
foreach(view instHeader~>master~>cell~>views~>name
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
; masterObj=ddGetObj(instHeader~>master~>libName
instHeader~>master~>cellName view "*")
; if(masterObj && ddMapGetFileViewType(masterObj) ==
"maskLayout"
;;;;;;;;;;;;;;;;;;;;;;;;; Script 1 ;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; Script 2 ;;;;;;;;;;;;;;;;;;
; masterObj=dbOpenCellViewByType(instHeader~>master~>libName
instHeader~>master~>cellName view)
; if(masterObj~>cellViewType == "maskLayout"
;;;;;;;;;;;;;;;;;;;;;;;;; Script 2 ;;;;;;;;;;;;;;;;;;
if( member("layout" list(view)) ; Script 3
then ; Run recursively until everything completes
cellListSoFar=SScheckLibRefFromTopLayout
(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt
cellListSoFar)
);if
);foreach
);unless
);foreach
);layout if
if(cv~>cellViewType == "schematic"
then
Stdlibsch=parseString("BORDERS analogLib basic StandardLib
AnaLib DigLib")
libRef=append(libRef Stdlibsch)
foreach(instHeader cv~>instHeaders ;First level
unless(member(instHeader~>master~>libName libRef)
when(instHeader~>master
fprintf(prt "In the Cell: \"%s/%s\" the Cell: \"%s/%s\"
is not allowed\n"
libName cellName instHeader~>master~>libName
instHeader~>master~>cellName)
)
) ;Now go deep and check
unless(cellListSoFar[instHeader~>master]
cellListSoFar[instHeader~>master]=t
foreach(view instHeader~>master~>cell~>views~>name
;masterObj=dbOpenCellViewByType
(instHeader~>master~>libName instHeader~>master~>cellName view)
;if(masterObj~>cellViewType == "schematic"
if( member( list("schematic") list(view))
then ; Run recursively until everything completes
cellListSoFar=SScheckLibRefFromTopLayout
(instHeader~>master~>libName
instHeader~>master~>cellName view libRef prt
cellListSoFar)
);if
);foreach
);unless
);foreach
);Schematic if
dbClose(cv)
cellListSoFar
);let
);proc |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Sun Nov 22, 2009 12:18 pm
|
|