SKILL go into all instances and do something:

R

raf

Guest
Hi,

I have this piece of skill code someone provided me with:

cv = geGetEditCellView()
leLayerSize(cv, list("via12" "drawing") 0.05 list("via12" "drawing"))
leLayerSize(cv, list("via12" "drawing") 0.2 list("metal1" "drawing"))

and I'm wondering if there is a way I can apply it to every level of
hierarchy in my layout.

-Raf
 
how about the following?


;; call a given function on every level of the hierarchy
;; if the same cv appears twice then only apply the function to it once.
(defun do_something_to_hierarchy ( d_cv u_fun done_cvs)

;; call the function on this level
(funcall u_fun d_cv)

;; remember the cellview so we don't call the function twice on it
;; in case it appears multiple times in the hierarchy
(tconc done_cvs d_cv)

;; if there are any instances, take a look at their masters
(foreach d_im (or d_cv~>instanceMasters
d_cv~>instMasters)
(cond
;; if we have already examined the cv then simply skip it
((member d_im (car done_cvs)))

;; if it is a pcell then also skip it
((is_pcell d_im))

;; otherwise descend into this cellview recursively
(t
(do_something_to_hierarchy d_im u_fun done_cvs)))))

(defun is_pcell ( d_cv)
(or master~>superMaster
master~>isParamCell))

(defun the_layer_operation ( d_cv)
(leLayerSize d_cv '("via12" "drawing") 0.05 '("via12" "drawing"))
(leLayerSize d_cv '("via12" "drawing") 0.2 '("metal1" "drawing")))

(defun layer_op_on_hier ( d_cv)
(do_something_to_hierarchy d_cv 'the_layer_operation (list nil)))



Diva Physical Verification wrote:
procedure( AddReps(rep repss)
prog( (masters master reps)
reps = cons(rep repss)
masters = rep~>instHeaders~>master
while(masters
master = car(masters)
masters = cdr(masters)
unless(master~>superMaster || master~>isParamCell ||
member(master reps)
reps = AddReps(master reps)
)
)
return(reps)
)
)

procedure( doSomething( (rootrep getEditRep()) )
prog( (reps rep)
reps = AddReps(rootrep nil)
while( reps && result
rep = car(reps)
reps = cdr(reps)
leLayerSize(rep, list("via12" "drawing") 0.05 list("via12"
"drawing"))
leLayerSize(rep, list("via12" "drawing") 0.2 list("metal1"
"drawing"))
)
)
)

On Sun, 24 Oct 2004 10:00:09 -0400, raf
rafal_REMOVETHIS_@eecg.utoronto.ca> wrote:


Hi,

I have this piece of skill code someone provided me with:

cv = geGetEditCellView()
leLayerSize(cv, list("via12" "drawing") 0.05 list("via12" "drawing"))
leLayerSize(cv, list("via12" "drawing") 0.2 list("metal1" "drawing"))

and I'm wondering if there is a way I can apply it to every level of
hierarchy in my layout.

-Raf
 
procedure( AddReps(rep repss)
prog( (masters master reps)
reps = cons(rep repss)
masters = rep~>instHeaders~>master
while(masters
master = car(masters)
masters = cdr(masters)
unless(master~>superMaster || master~>isParamCell ||
member(master reps)
reps = AddReps(master reps)
)
)
return(reps)
)
)

procedure( doSomething( (rootrep getEditRep()) )
prog( (reps rep)
reps = AddReps(rootrep nil)
while( reps && result
rep = car(reps)
reps = cdr(reps)
leLayerSize(rep, list("via12" "drawing") 0.05 list("via12"
"drawing"))
leLayerSize(rep, list("via12" "drawing") 0.2 list("metal1"
"drawing"))
)
)
)

On Sun, 24 Oct 2004 10:00:09 -0400, raf
<rafal_REMOVETHIS_@eecg.utoronto.ca> wrote:

Hi,

I have this piece of skill code someone provided me with:

cv = geGetEditCellView()
leLayerSize(cv, list("via12" "drawing") 0.05 list("via12" "drawing"))
leLayerSize(cv, list("via12" "drawing") 0.2 list("metal1" "drawing"))

and I'm wondering if there is a way I can apply it to every level of
hierarchy in my layout.

-Raf
 

Welcome to EDABoard.com

Sponsor

Back
Top