SKILL Q: Cycling through all open schematics and do somethin

Guest
Hi,

after reading a bit in the skcompref.pdf I find that there are many
functions that work on the current window or d_cvId. So far I havent't
found how to get all open d_cvId's as a list and then do something
with the schematics in all of them. Purpose is to have two or more
schematics side-by-side and then execute a command in CIW that
extracts a textual list of transistors and geometries of all open
windows and put them in a comma-separated list for Excel import. (or
whatever)

--
Svenn
 
Hi Svenn,

Well, the functions you'll need are probably hiGetWindowList() and
dbGetOpenCellViews()

If you're looking for just those in windows, you'd use something like:

foreach(win hiGetWindowList()
when(win~>cellView
... do something...
)
)

Or if you want to be good and use the API:

foreach(win hiGetWindowList()
cv=geGetEditCellView(win)
getWarn() ; to swallow warnings about windows without cellViews
when(cv
... do something...
)
)

Andrew.

On 25 Sep 2003 23:36:34 -0700, svenn.are@bjerkem.de wrote:

Hi,

after reading a bit in the skcompref.pdf I find that there are many
functions that work on the current window or d_cvId. So far I havent't
found how to get all open d_cvId's as a list and then do something
with the schematics in all of them. Purpose is to have two or more
schematics side-by-side and then execute a command in CIW that
extracts a textual list of transistors and geometries of all open
windows and put them in a comma-separated list for Excel import. (or
whatever)
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 
svenn.are@bjerkem.de wrote in message news:<5fb00e69.0309252236.2cf2493a@posting.google.com>...
Hi,

after reading a bit in the skcompref.pdf I find that there are many
after a while the first idea came like this:

(setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic" nil "r"))
(setq instList (schGetMatchingObjects cv "cellName" "==" "*" nil))
(foreach cell instList
(setq symbol (car cell))
(println (dbSearchPropByName symbol "w")))

This way I get at least a nil for those symbols not having any w
property, but I can't get the value of that w. I just get a
db:12343213 reference back, and I can't say if it is a ddId a cvId a
bagId or whatever SKILL is calling these things. It seems to me that
there are many functions to set and change properties, but very few to
list them.

I tried to use some of the Bag functions or the ddGetObj, but they
complained that that the symbol above was not of kind ddId. This is
slowly getting on my nerves.

--
Svenn
 
Hi Svenn,

What you get back is easily identifiable - use

(setq propId (dbSearchPropByName symbol "w"))

Then propId~>objType will tell you what kind of object it is.
Since this is a prop object, you can do propId~>name propId~>value etc.

Alternatively you could do:

(setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic" nil "r"))
(foreach inst (dbGetq cv instances)
(when (setq value (dbGetq inst w))
(printf "Width of %s is %L" (dbGetq inst name) value)
)
)

or something like that (off the top of my head). (dbGetq a b) is the same
as a~>b for a dbObject, but in LISP-speak.

Look in the Design Framework II SKILL functions manual, and it covers the
database in a lot of detail, especially how the db object model works
with the attributes of each db object.

Regards,

Andrew.


On 26 Sep 2003 06:26:32 -0700, svenn.are@bjerkem.de wrote:

svenn.are@bjerkem.de wrote in message news:<5fb00e69.0309252236.2cf2493a@posting.google.com>...
Hi,

after reading a bit in the skcompref.pdf I find that there are many

after a while the first idea came like this:

(setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic" nil "r"))
(setq instList (schGetMatchingObjects cv "cellName" "==" "*" nil))
(foreach cell instList
(setq symbol (car cell))
(println (dbSearchPropByName symbol "w")))

This way I get at least a nil for those symbols not having any w
property, but I can't get the value of that w. I just get a
db:12343213 reference back, and I can't say if it is a ddId a cvId a
bagId or whatever SKILL is calling these things. It seems to me that
there are many functions to set and change properties, but very few to
list them.

I tried to use some of the Bag functions or the ddGetObj, but they
complained that that the symbol above was not of kind ddId. This is
slowly getting on my nerves.
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 
"svenn" == svenn are <svenn.are@bjerkem.de> writes:
svenn> svenn.are@bjerkem.de wrote in message
svenn> news:<5fb00e69.0309252236.2cf2493a@posting.google.com>...
Hi,

after reading a bit in the skcompref.pdf I find that there are
many
svenn> after a while the first idea came like this:

svenn> (setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic"
svenn> nil "r")) (setq instList (schGetMatchingObjects cv "cellName"
svenn> "==" "*" nil)) (foreach cell instList
svenn> (setq symbol (car cell)) (println (dbSearchPropByName
svenn> symbol "w")))

svenn> This way I get at least a nil for those symbols not having
svenn> any w property, but I can't get the value of that w. I just
svenn> get a db:12343213 reference back, and I can't say if it is a
svenn> ddId a cvId a bagId or whatever SKILL is calling these
svenn> things. It seems to me that there are many functions to set
svenn> and change properties, but very few to list them.

svenn> I tried to use some of the Bag functions or the ddGetObj, but
svenn> they complained that that the symbol above was not of kind
svenn> ddId. This is slowly getting on my nerves.

svenn> -- Svenn

Hi Svenn

I think w is usually in the cdf and not a part of the properties of the
cellView. Some thing like this might do the job for you:

(setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic" nil "r"))
(mapc
(lambda (instance)
(println (getq (getq (cdfGetInstCDF instance) "m") value)))
(dbGetq cv instances))


--
Remove XXX and YYY to get my address
 
On 26 Sep 2003 10:25:34 -0600, snmishra@XXXhotYYYpop.com wrote:

Hi Svenn

I think w is usually in the cdf and not a part of the properties of the
cellView. Some thing like this might do the job for you:

(setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic" nil "r"))
(mapc
(lambda (instance)
(println (getq (getq (cdfGetInstCDF instance) "m") value)))
(dbGetq cv instances))
Actually there's not really any point getting the cdf for the instance, at least
when you're in CDS_Netlisting_Mode set to Analog, because doing a
(dbGetq instance "m") or instance~>m will return either the instance property
or if it is not there, the default value from the CDF. Strictly speaking there
isn't such thing as an instance CDF - it's just a "virtual" structure which is a
combination of the instance properties overlaid on the cell CDF.

Regards,

Andrew.

--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 
"Andrew" == Andrew Beckett <andrewb@DELETETHISBITcadence.com> writes:
Andrew> On 26 Sep 2003 10:25:34 -0600, snmishra@XXXhotYYYpop.com
Andrew> wrote:
Hi Svenn

I think w is usually in the cdf and not a part of the
properties of the cellView. Some thing like this might do the
job for you:

(setq cv (dbOpenCellViewByType "LIBRARY" "CELL" "schematic" nil
"r")) (mapc (lambda (instance) (println (getq (getq
(cdfGetInstCDF instance) "m") value))) (dbGetq cv instances))
Andrew> Actually there's not really any point getting the cdf for
Andrew> the instance, at least when you're in CDS_Netlisting_Mode
Andrew> set to Analog, because doing a (dbGetq instance "m") or
Andrew> instance~>m will return either the instance property or if
Andrew> it is not there, the default value from the CDF. Strictly
Andrew> speaking there isn't such thing as an instance CDF - it's
Andrew> just a "virtual" structure which is a combination of the
Andrew> instance properties overlaid on the cell CDF.

Andrew> Regards,

Andrew> Andrew.
Andrew,

Thanks for the clarification. I will fix my existing SKILL code to
use dbGetq instead of cdfGetInstCDF.

Satya

Andrew> -- Andrew Beckett Senior Technical Leader Custom IC
Andrew> Solutions Cadence Design Systems Ltd
 

Welcome to EDABoard.com

Sponsor

Back
Top