• 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. Use abe function to do layer XOR for two instances

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 3355
  • 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

Use abe function to do layer XOR for two instances

Martinsh
Martinsh over 1 year ago

There are two instances inst1 and inst2 in current cellview (cv). I'd like to do XOR for layer M1 in inst1 and inst2. After that, highlight the XOR result on inst1.

How to realize this with the abe functions?

Thanks.

Martin 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago

    Martin,

    This should do what you want:

    /*************************************************************************
    *                                                                        *
    * CCFxorLayerInTwoInsts(i1 i2 layerName [?hilightLPP '("y0" "drawing")]) *
    *                                                                        *
    *   Given two instance ids, XOR the two (uses a scratch cellView) and    *
    *     create a hilight set with the differences at the i1 location.      *
    *                        Returns the hilight set.                        *
    *                                                                        *
    *************************************************************************/
    
    procedure(CCFxorLayerInTwoInsts(i1 i2 layerName @key 
          (hilightLPP '("y0" "drawing")))
      letseq((
          (cv i1~>cellView)
          (scr dbOpenScratchDesign(cv~>libName "maskLayout"))
          i1temp l1 l2 xor hs
          )
        ; copy first instance and get abeLayer
        i1temp=dbCopyFig(i1 scr)
        abeInit(scr)
        ; just in case something goes wrong, ensure
        ; that abeDone is always called
        unwindProtect(
          {
            l1=abeLayerFromCellView(layerName)
            ; delete first instance and create second instance at
            ; same origin/orientation, and get abeLayer
            dbDeleteObject(i1temp)
            dbCreateInst(scr i2~>master "" i1~>xy i1~>orient)
            l2=abeLayerFromCellView(layerName)
            ; xor and output hilightSet in original cellView
            xor=abeNewLayer()
            abeLayerXor(l1 l2 xor)
            hs=geCreateHilightSet(cv hilightLPP)
            hs~>enable=t
            abeLayerToHilightSet(xor hs)
          }
          abeDone()
        )
        hs
      )
    )

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Martinsh
    Martinsh over 1 year ago in reply to Andrew Beckett

    Andrew,

    Good idea. Thanks!

    Martin

    • 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