How to remove a metal layer '("M2" "D0") recursively in a to

D

davidncw

Guest
Please Help because i'm new here.

How do i use dbOpenCellViewByType() to remove a metal layer in a top
level block which contents a lot of subblocks(also remove the layer
from the sub-blocks)?
Can anyone tell me how to write procedure to recursively use
dbOpenCellViewByType() and dbDeleteObj() in DFII virtorso layout to
remove the layer in every subblocks in the toplevel?

Thanks,
david
 
here is a function that will descend the layout hierarchy
and apply a function to every cellview encountered.

note that it will also traverse into pcells!

you have to supply a function to call at each level.
that function could, for example, delete shapes on
the top metal layer.



(defun traverse (d_cv u_fun)
(funcall u_fun d_cv)
(foreach d_inst d_cv~>instances
(dbOpenCellViewByType d_inst~>libName
d_inst~>cellName
d_inst~>viewName
nil
"a")
(traverse d_inst~>master u_fun)))

;; example usage.
;; remove all M6 drawing in the hierarchy
(traverse (geGetEditCellView)
(lambda (d_cv)
(unless (d_cv~>mode == "r")
(foreach shape d_cv~>shapes
(when shape~>lpp == '("M6" "drawing")
(dbDeleteObject shape))))))
 
Jimka,
Something confusing me.
Do we need to add dbSave(d_cv) and dbClose(d_cv)?
What is the purpose of "u_fun" parameter?
For example: traverse d_inst~>master u_fun

Thanks,
david
 
u_fun can be any function object or a symbol naming a function
which you would like to be called at each level of the hierarchy.
Find the call to FUNCALL in the function traverse which calls
the given function on the cellview object.

Yes, that function needs to save the cellview if it has modified it
and wants to save it.


for example if you would like to simply call dbSave on every cell in a
hierarchy
you call use the above function and simply pass the dbSave function.

(traverse (geGetEditCellView) 'dbSave)

this will traverse the hierarchy and call dbSave on all the cellviews
encountered.
 
Hi Jimka,
Can you tell me what's wrong with the below code?
I only able to create a rectancle('("M4" "D0") at instances below the
top level. That's mean only 1 level down from top level. How about the
most subblocks or another bottom levels subblocks? Look like, it didn't
actioned recursively.

Please help. Thanks.

In CIW:
I type: mytraverse(geGetEditCellView())

procedure(mytraverse(d_cv)
let(()
;cv = geGetEditCellView()
foreach(d_inst d_cv~>instances
d_cv = dbOpenCellViewByType(d_inst~>libName
d_inst~>cellName d_inst~>viewName nil "a")
dbCreateRect(d_cv list("M4" "D0") list(0:0
5:5))
dbSave(d_cv)
mytraverse(d_inst~>master)
)
)
)





Jimka wrote:
u_fun can be any function object or a symbol naming a function
which you would like to be called at each level of the hierarchy.
Find the call to FUNCALL in the function traverse which calls
the given function on the cellview object.

Yes, that function needs to save the cellview if it has modified it
and wants to save it.


for example if you would like to simply call dbSave on every cell in a
hierarchy
you call use the above function and simply pass the dbSave function.

(traverse (geGetEditCellView) 'dbSave)

this will traverse the hierarchy and call dbSave on all the cellviews
encountered.
 

Welcome to EDABoard.com

Sponsor

Back
Top