• 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. How to change from one layer to other layer

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 146
  • Views 22708
  • 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

How to change from one layer to other layer

sailesh
sailesh over 15 years ago

 HI ,

      i need the code to change the metal layers in layout, EX: when the code is loaded all the M1 layers in layout should be replaced by M2 automatically. iam able to do till gettin the available layers..but iam not able to replace them 

  • Cancel
  • Rahul Biradar
    Rahul Biradar over 9 years ago
    I'm not able to write the code for the hierarchical layer replacement please help me as I'm a beginner with skill programming..
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 9 years ago

    You can use leSearchHierarchy to find the objects and leReplace to update the layer.

    Andrew may have some hierarchy parsing code which he shares.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Some untested code showing the idea of a recursive layer replacement rather than leReplace:

    procedure(CCFreplaceLayersHier(cv @optional (done makeTable('visited nil)))
     let((LP)
      done[cv]=t
      LP=car(exists(lpp cv~>lpps lpp~>layerName=="M1" && lpp~>purpose=="drawing"))
      ; if there are shapes, and this isn't a pcell submaster, and it can be reopened in edit mode
      when(LP~>shapes && !(cv~>superMaster) && dbReopen(cv "a")
        LP~>shapes~>lpp=list("M2" "drawing")
      )
      ; recursively visit all the child masters
      foreach(master cv~>instanceMasters
        unless(done[master]
          CCFreplaceLayersHier(master done)
        )
      )
      t
     )
    )

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Rahul Biradar
    Rahul Biradar over 9 years ago

    Thank you for your replies 

    hi Andrew Beckett

    the below code is not working but it's executing...... please help me with this

    procedure(CCFreplaceLayersHier(cv @optional (done makeTable('visited nil)))
     let((LP)
      done[cv]=t
      LP=car(exists(lpp cv~>lpps lpp~>layerName=="M1" && lpp~>purpose=="drawing"))
      ; if there are shapes, and this isn't a pcell submaster, and it can be reopened in edit mode
      when(LP~>shapes && !(cv~>superMaster) && dbReopen(cv "a")
        LP~>shapes~>lpp=list("M2" "drawing")
      )
      ; recursively visit all the child masters
      foreach(master cv~>instanceMasters
        unless(done[master]
          CCFreplaceLayersHier(master done)
        )
      )
      t
     )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I just tried the code above, and it worked for me. I have a technology where the layers are called M1, M2 etc - you'd obviously have to change the layer names in the code if they're called something different.

    Then I opened the top level layout, and used:

    CCFreplaceLayersHier(geGetEditCellView())

    Note however that the code won't replace M1 used in MPP (multi-part path) or in vias, or inside PCells. Of course, I have no idea what the extent of what you're trying to do is...

    Regards,

    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