• 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. Skill Code to seperate layers

Stats

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

Skill Code to seperate layers

atiwari
atiwari over 2 years ago

I am designing some metal layer shape with a list of layer in cadence. there is a list of layers some of them are present in cadence layer list but some of them are not present. i need help with writing skill code which can create a list of the layers which are not in the layer list of cadence environment. 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago

    First of all, the purposes you have in your list look suspiciously like the abbreviated purpose names that you see in the layer palette - whereas normally the purpose names would be "drawing" not "drw" for example. Although you've edited your post so you're no longer showing that - you've removed some of the relevant information, so I'll make a stab at answering your rather vague question.

    tf=techGetTechFile(cv)
    purposeMap=foreach(mapcar purpose tf~>purposes list(techGetPurposeAbbrev(tf purpose) purpose))
    ; assuming your original list of layers is called layerList (it was called shape in your original post, which was a rather confusing name)
    expandedLayerList=foreach(mapcar lpp layerList
      cond(
        (!cdr(lpp) list(car(lpp) "drawing")) ; purpose is not specified
        (exists(purpMap purposeMap cadr(purpMap)==cadr(lpp)) lpp) ; if a valid purpose is given as the second element, leave it alone
        (match=assoc(cadr(lpp) purposeMap) list(car(lpp) cadr(match))) ; if it was an abbreviated purpose
        (t lpp) ; just in case
      )
    )
    ; now find those which exist in the technology
    existingLayerList=setof(lpp expandedLayerList
      techGetLP(tf lpp)
    )
    ; now find those which do not exist in the technology (invert the condition)
    missingLayerList=setof(lpp expandedLayerList
      !techGetLP(tf lpp)
    )

    The first block of code deals with expanding abbreviated purpose names (the tech file contains information on the abbreviations), and then after that it is checking to see whether the expanded names exist or not.

    Andrew

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

    Hello Andrew

    Thank You for your response,  I was very confused before how to explain my question so i just choose some random layers and some layers which was in the layer pallet in the environment i was working on. I am sorry if that was confusing. But your response helps a lot.

    Thank You

    • 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