we are trying to find the overlapping area of adjacent metals(i.e metal1 to metal2, and metal2 to metal3 and so on ) in a single hierarchy.
we are using "dbLayerStraddl()" function but it is creating a new shape over the first input layer list. but we required the only common area between the two layers.
please help with this problem .
foreach(a cv~>shapes when(a~>layerName == "MET2"layer1=cons(a layer1))when(a~>layerName == "MET3"layer2=cons(a layer2)))ov=dbLayerStraddl(cv "POLY" layer1 layer2)))hiSetBindKey("Layout" "ShiftCtrl<Key>q" "metalOverlap()")
You can try with Advanced Boolean engine functions which have far better outcome. You can control which hierarchy layer you need to process. Check abeLayerFromCellView()
Thank you for your replay,
our layout cell view has only one hierarchy, but we want to get the overlapping area with coordinates, could you help me with more details?
I will give you some ideas with the following. It doesn't handle metal in vias or other non-metal shapes.
;get met1 shapesmet1list = list() (foreach shape (setof s dbGetOverlaps(cellView cellView~>bBox) car(s~>lpp)=="METAL1") met1list = cons(shape met1list))
;get met2 shapesmet2list = list() (foreach shape (setof s dbGetOverlaps(cellView cellView~>bBox) car(s~>lpp)=="METAL2") met2list = cons(shape met2list)) ;create scratchcell for dbLayerAnd - you can use the existing cellView if it is editable but you; have to keep track of the created shapes and remove them. Using a scratchcell is easier. scratchcell = dbOpenCellViewByType(cellLib cellName "layout_scratch" "maskLayout" "s"); find overlaps and create a TEXT layer for each overlapnewlayers = dbLayerAnd(scratchcell list("TEXT" "drawing") met1list met2list)(foreach shape newlayers (printf "%L\n" shape~>bBox)) ;delete scratch cellddDeleteObj(ddGetObj(scratchcell~>libName scratchcell~>cellName scratchcell~>viewName))
Try this to implement using ABE. I copied this script from cadence documentation and modified
abeInit( geGetEditCellView() )
M1 = abeLayerFromCellView( "Metal1" ?startLevel 0 ?stopLevel 1 )
M2 = abeLayerFromCellView( "Metal2" ?purpose "drawing" ?startLevel 0 ?stopLevel 1)
overlapLayer = abeNewLayer()
abeLayerAnd( M1 M2 overlapLayer)
abeLayerToCellView( overlapLayer "marker" ?purpose "error" )
You can iterate over the overlapLayer and get all shapes coordinates. Modify the layer names as per your need.