• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. layer cut on hierarchy

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 6371
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

layer cut on hierarchy

akman
akman over 2 years ago

hi 

here this code only scans for NWELL on top level but not on all levels(hierarchical ). the instances don't get recognized.

is this because of the list shp or dblayerAndNot, any alternative function to be used for hierarchy?

code is attached below as txt file .

Fullscreen cutpsub2.txt Download
cv=geGetWindowCellView()
procedure(cutpsub(layer slotLayer  @optional (cv geGetEditCellView()))
 let((shp ovShpList ov)

 shp=setof(sh cv~>shapes sh~>lpp==slotLayer)


ovShpList=list()

foreach(sh shp 


	ov=dbGetTrueOverlaps(cv sh~>bBox layer 0)


	when(ov && listp(ov)
		foreach(ovsh ov
		unless(member(ovsh ovShpList) ovShpList=cons(ovsh ovShpList))
			)
		)
	)


dbLayerAndNot(cv layer ovShpList shp)


;foreach(sh shp dbDeleteObject(sh))

foreach(sh ovShpList dbDeleteObject(sh))
t

	))
;cutpsub(list("PSUB2" "drawing") list("NWELL" "drawing") )

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    The abeLayer* functions work through the hierarchy, and you can do an andnot easily that way. The challenge is going to be deleting the original shapes - that would mean traversing the hierarchy (a simple recursive function would do this) and deleting all the PSUB2 in any of the cells (your PSUB2 would all end up in the top-level cell from the abeLayerAndNot).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    The abeLayer* functions work through the hierarchy, and you can do an andnot easily that way. The challenge is going to be deleting the original shapes - that would mean traversing the hierarchy (a simple recursive function would do this) and deleting all the PSUB2 in any of the cells (your PSUB2 would all end up in the top-level cell from the abeLayerAndNot).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • akman
    akman over 2 years ago in reply to Andrew Beckett

    hey andrew 

    1.im applying PSUB2 all over pr boundary and then just deleting psub2 wherever psub2 is overlapping with NWELL 

      but the thing is that nwell's that are inside instances are not getting recognised and psub2's are not chopping over there .

      you mean by just using abeLayerAndNot would fix it? insted of dbLayerAndNot()

    2.also this line recognises only top layer

       shp=setof(sh cv~>shapes sh~>lpp==slotLayer)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to akman

    No, you'd need to use a different approach. I'd suggest something like this:

    cv=geGetEditCellView()
    abeInit(cv)
    nwell=abeLayerFromCellView("NWELL")
    psub2=abeLayerFromCellView("PSUB2")
    psub2new=abeNewLayer()
    abeLayerAndNot(psub2 nwell psub2new)
    ; delete existing psub2 (only in the top cellView)
    psub2lpp=car(exists(lpp cv~>lpps lpp~>layerName=="PSUB2" && lpp~>purpose=="drawing"))
    foreach(shape psub2lpp~>shapes
        printf("deleting\n")
        dbDeleteObject(shape)
    )
    ; now add the newly generated layer back and finish the abe session
    abeLayerToCellView(psub2new "PSUB2")
    abeDone()

    The idea is that you generate the new AndNot data, and then delete all the PSUB2 in the cellView and replace it with the newly generated shapes. This assumes that there is no PSUB2 in lower level cells, as this is not trying to touch those, but by default the abe* functions will deal with shapes through the hierarchy in terms of finding and performing logical operations on those layers

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • akman
    akman over 2 years ago in reply to Andrew Beckett

    hi andrew

    just tried the above code its works fine . thanks 

    but after refining the area (trying to reduce PSUB2 wherever it is only required)

    i have encountered a case where the LVS has errors 

    any idea how to approach or solve these case, where half of the std cell can be covered with PSUB2?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to akman

    There's not enough info to be able to help with this - this is rather dependent upon what the LVS rules are checking, what the meaning of the PSUB2 layer is, and what exactly it's doing in your technology. This is a PDK-specific and rule deck-specific issue. Maybe somebody familiar with the technology you're using can help, but for that you'd have had to have said which technology you're using (so far you've not said).

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information