Schematic Tree with view names

P

PolyPusher

Guest
Hi All,

I found this code from Andrew/Cadence to create a hierarchical tree
from schematic. Instead of having a view list passed, is it possible
to get the actual view name? For example, what if a symbol is
calling(not sure if that is the right way to describe it) a schematic
view name "schematic_not_used" where the Library Cell View would be
"bgap_work bandgap shematic_not_used".

Thank you in advance for any help,
Eric


/* abSchTree.il
Author A.D.Beckett
Group Structured Custom, Cadence Design Systems Ltd.
Machine SUN
Date Oct 30, 1995
Modified
By
Function to perform the equivalent of the "tree" function
for schematics
There are two entry points in this file:
(abSchTree [optional key arguments])
Low level entry point - no form. Just uses arguments to define how
and
where the tree gets created
(abHiSchTree)
Form interface to abSchTree.
***************************************************
SCCS Info: @(#) abSchTree.il 08/07/01.15:31:07 1.1
*/
/***************************************************************
* *
* (abCompareCellName inst1 inst2) *
* *
* Comparison function when sorting the instHeaders *
* *
***************************************************************/
(procedure (abCompareCellName inst1 inst2)
(let (result)
(forall property '(libName cellName viewName)
(equal (setq result (strcmp (dbGet inst1 property)
(dbGet inst2 property))) 0))
(lessp result 0)))
/
************************************************************************
*
*
* (abSchTree @key (cellView
(geGetEditCellView)) *
* (viewList "schematic cmos.sch
symbol") *
* (stopList
"symbol") *
* (port
poport) *
* (displayPins
nil) *
* (indent
0)) *
*
*
* Recursive function to output a "tree" like display from the
specified *
* cellView downwards using the specified view and stop lists. The
pins *
* can be displayed as well if desired. The indent is for internal
use *
* only and controls the indent level that this cellView's
instances *
* are printed
at. *
*
*
************************************************************************/
(procedure (abSchTree @key (cellView (geGetEditCellView))
(viewList "schematic cmos.sch symbol")
(stopList "symbol")
(port poport)
(displayPins nil)
(indent 0))
(let (sortedHeaders formatString count stopAtList)
(setq stopAtList (parseString stopList))
(setq sortedHeaders (sort (dbGetq cellView instHeaders)
'abCompareCellName))
(foreach header sortedHeaders
/* count the number of instances */
(setq count (length
(if displayPins
/* if we're displaying pins, count
them all regardless */
(dbGetq header instances)
/* otherwise only count those without
purpose pin */
(setof inst
(dbGetq header instances)
(nequal (dbGetq inst purpose)
"pin")))))
/* when there was at least one (so that pins can be
filtered out) */
(when (greaterp count 0)
(sprintf formatString "%%%ds %%s %%s %%s (%%d)
\n" indent)
(fprintf port formatString ""
(dbGetq header libName)
(dbGetq header cellName)
(dbGetq header viewName)
count)
/* switch views */
(setq switchedView (dbGetAnyInstSwitchMaster
(car (dbGetq header
instances))
viewList))
(when switchedView
(unless (member (dbGetq switchedView
viewName) stopAtList)
(abSchTree ?cellView switchedView
?viewList viewList
?stopList stopList
?port port
?displayPins
displayPins
?indent (plus indent
2)))
/* I did try closing the switched cell,
but it
didn't work properly. Have to live with
this, I suppose! */
)
)
)
t))
/***************************************************************
* *
* (abCreateHiSchTreeForm) *
* *
* Create the form for the schematic tree function *
* *
***************************************************************/
(procedure (abCreateHiSchTreeForm)
(let (topOrCurrent viewList stopList displayPins)
(setq topOrCurrent
(hiCreateRadioField
?name 'topOrCurrent
?prompt "Starting cell"
?choices '("current" "top")))
(setq viewList
(hiCreateStringField
?name 'viewList
?prompt "View list"
?value "schematic cmos.sch symbol"))
(setq stopList
(hiCreateStringField
?name 'stopList
?prompt "Stop list"
?value "symbol"))
(setq displayPins
(hiCreateBooleanButton
?name 'displayPins
?buttonText "Display pins"
?value nil))
(setq abHiSchTreeForm
(hiCreateAppForm
?name 'abHiSchTreeForm
?formTitle "Schematic Tree"
?callback 'abHiSchTreeCB
?fields (list
topOrCurrent viewList stopList displayPins)))
abHiSchTreeForm))
/***************************************************************
* *
* (abHiSchTreeCB form) *
* *
* Callback for the schematic tree form. *
* Opens the file, outputs the header information and *
* then calls abSchTree to recursively descend down the *
* hierarchy. *
* Then the output file is viewed and deleted. *
* *
***************************************************************/
(procedure (abHiSchTreeCB form)
(let (cellView port fileName)
(setq cellView
(if (equal (getq (getq form topOrCurrent) value) "top")
(geGetTopLevelCellView (getq form treeWindow))
(geGetEditCellView (getq form treeWindow))))
(if cellView
(progn
(setq oport (outfile (setq fileName (makeTempFileName "/
tmp/schTree"))))
(if oport
(progn
(fprintf oport "%40s\n","Design Hierarchy")
(fprintf oport
"*******************************************************\n")
(fprintf oport "Library : %s\n" (dbGetq cellView
libName))
(fprintf oport "Cell : %s\n" (dbGetq cellView
cellName))
(fprintf oport "View : %s\n" (dbGetq cellView
viewName))
(fprintf oport "Option : %s to bottom\n" (getq (getq
form topOrCurrent) value))
(fprintf oport
"*******************************************************\n\n")
(abSchTree ?cellView cellView
?viewList (getq (getq form viewList)
value)
?stopList (getq (getq form stopList)
value)
?displayPins (getq (getq form displayPins)
value)
?port oport
)
(close oport)
(view fileName nil "Tree")
(deleteFile fileName)
)
(error "Couldn't open output file"))
)
(error "Couldn't find cellView"))
))
/***************************************************************
* *
* (abHiSchTree) *
* *
* Display a form controlling the tree generation *
* *
***************************************************************/
(procedure (abHiSchTree)
/* create the form if it doesn't exist */
(unless (and (boundp 'abHiSchTreeForm) abHiSchTreeForm)
(abCreateHiSchTreeForm))
/* store the window on the form so that it will always use the
window
that was current when the command was invoked */
(putpropq abHiSchTreeForm (hiGetCurrentWindow) treeWindow)
(hiDisplayForm abHiSchTreeForm))
 
PolyPusher <eric.d.fitzsimmons@gmail.com> writes:

I found this code from Andrew/Cadence to create a hierarchical tree
from schematic. Instead of having a view list passed, is it possible
to get the actual view name? For example, what if a symbol is
calling(not sure if that is the right way to describe it) a schematic
view name "schematic_not_used" where the Library Cell View would be
"bgap_work bandgap shematic_not_used".
The schematic is referencing the view symbol and none other. You need a
way to "switch" from the symbol to another view and to know when to
stop. The way Andrew did (with a viewlist and stoplist) it is the most
common one (configurations are more powerfull, but I'm not sure there is
a SKILL API allowing to use them easily, and they are a way to provide
exceptions to the viewlist/stoplist method).

Yours,

--
Jean-Marc
 
PolyPusher <eric.d.fitzsimmons@gmail.com> writes:

On May 30, 8:08 am, Jean-Marc Bourguet <j...@bourguet.org> wrote:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:
I found this code from Andrew/Cadence to create a hierarchical tree
from schematic.  Instead of having a view list passed, is it possible
to get the actual view name?  For example, what if a symbol is
calling(not sure if that is the right way to describe it) a schematic
view name "schematic_not_used" where the Library Cell View would be
"bgap_work bandgap shematic_not_used".

The schematic is referencing the view symbol and none other.  You need a
way to "switch" from the symbol to another view and to know when to
stop.  The way Andrew did (with a viewlist and stoplist) it is the most
common one (configurations are more powerfull, but I'm not sure there is
a SKILL API allowing to use them easily, and they are a way to provide
exceptions to the viewlist/stoplist method).

Yours,

--
Jean-Marc

Hi Jean-Marc,

So, you are saying that when making a symbol from schematic type,
there is no linkage "on" the symbol of the actual view name of the
schematic?
Indeed. There may be no schematic view associated to the symbol and there
may be several.

Seems like it must be there, but not available? When you push into
the symbol, how does the code know which view to use?
There are envVar (whose names I've forgotten, they are probably accessible
through a menu somewhere) which are equivalent to the viewlist/stoplist
taken as parameter by Andrew's function.

Yours,

--
Jean-Marc
 
On May 30, 8:08 am, Jean-Marc Bourguet <j...@bourguet.org> wrote:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:
I found this code from Andrew/Cadence to create a hierarchical tree
from schematic.  Instead of having a view list passed, is it possible
to get the actual view name?  For example, what if a symbol is
calling(not sure if that is the right way to describe it) a schematic
view name "schematic_not_used" where the Library Cell View would be
"bgap_work bandgap shematic_not_used".

The schematic is referencing the view symbol and none other.  You need a
way to "switch" from the symbol to another view and to know when to
stop.  The way Andrew did (with a viewlist and stoplist) it is the most
common one (configurations are more powerfull, but I'm not sure there is
a SKILL API allowing to use them easily, and they are a way to provide
exceptions to the viewlist/stoplist method).

Yours,

--
Jean-Marc
Hi Jean-Marc,

So, you are saying that when making a symbol from schematic type,
there is no linkage "on" the symbol of the actual view name of the
schematic?
Seems like it must be there, but not available? When you push into
the symbol, how does the code know which view to use?

Thank you for your reply,
Eric
 
On May 30, 12:49 pm, Jean-Marc Bourguet <j...@bourguet.org> wrote:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:
On May 30, 8:08 am, Jean-Marc Bourguet <j...@bourguet.org> wrote:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:
I found this code from Andrew/Cadence to create a hierarchical tree
from schematic. Instead of having a view list passed, is it possible
to get the actual view name? For example, what if a symbol is
calling(not sure if that is the right way to describe it) a schematic
view name "schematic_not_used" where the Library Cell View would be
"bgap_work bandgap shematic_not_used".

The schematic is referencing the view symbol and none other. You need a
way to "switch" from the symbol to another view and to know when to
stop. The way Andrew did (with a viewlist and stoplist) it is the most
common one (configurations are more powerfull, but I'm not sure there is
a SKILL API allowing to use them easily, and they are a way to provide
exceptions to the viewlist/stoplist method).

Yours,

--
Jean-Marc

Hi Jean-Marc,

So, you are saying that when making a symbol from schematic type,
there is no linkage "on" the symbol of the actual view name of the
schematic?

Indeed. There may be no schematic view associated to the symbol and there
may be several.

Seems like it must be there, but not available?   When you push into
the symbol, how does the code know which view to use?

There are envVar (whose names I've forgotten, they are probably accessible
through a menu somewhere) which are equivalent to the viewlist/stoplist
taken as parameter by Andrew's function.

Yours,

--
Jean-Marc
If I figured out a way to expand the view list to include all
schematic viewtypes true view names(ie, schematic, schematic_alt) that
seems to be a way to do this, right?
Thank you for your help,
Eric
 
PolyPusher <eric.d.fitzsimmons@gmail.com> writes:

If I figured out a way to expand the view list to include all
schematic viewtypes true view names(ie, schematic, schematic_alt) that
seems to be a way to do this, right?
Thank you for your help,
Eric
There are two reasons for which there is a viewlist and not simply
check which schematic views are present:
- allow to ignore some (backup for instance)
- give a way to choose when there are several

Yours.

--
Jean-Marc
 
On Jun 1, 1:39 am, Jean-Marc Bourguet <j...@bourguet.org> wrote:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:
If I figured out a way to expand the view list to include all
schematic viewtypes true view names(ie, schematic, schematic_alt) that
seems to be a way to do this, right?
Thank you for your help,
Eric

There are two reasons for which there is a viewlist and not simply
check which schematic views are present:
- allow to ignore some (backup for instance)
- give a way to choose when there are several

Yours.

--
Jean-Marc
Really appreciate your help. Have a nice weekend!
Eric
 
On 06/01/12 14:04, PolyPusher wrote:
On Jun 1, 1:39 am, Jean-Marc Bourguet<j...@bourguet.org> wrote:
PolyPusher<eric.d.fitzsimm...@gmail.com> writes:
If I figured out a way to expand the view list to include all
schematic viewtypes true view names(ie, schematic, schematic_alt) that
seems to be a way to do this, right?
Thank you for your help,
Eric

There are two reasons for which there is a viewlist and not simply
check which schematic views are present:
- allow to ignore some (backup for instance)
- give a way to choose when there are several

Yours.

--
Jean-Marc

Really appreciate your help. Have a nice weekend!
Eric
Not checked the news group for a bit (sorry)

There's also a new version of the code at
http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11300048
which shows the view used. It also handles config files...

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top