• 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 exchange layers safely?

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 12911
  • 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 exchange layers safely?

tribotree
tribotree over 8 years ago

Hello,

I want to exchange layers in layout, for example, swap "M1" and "M2" , here is my code:

layer1Obj = car(exists(lpp pcCellView~>lpps lpp~>layerName == "M1"))

layer2Obj = car(exists(lpp pcCellView~>lpps lpp~>layerName == "M2"))

layer1Obj~>shapes~>layerName = "M2"

layer2Obj~>shapes~>layerName = "M1"

But this does not work, both layers change to M1 actually. Providing the layout contains lots of shapes, Is there a more efficient and safe way to change layers? 



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

    That's not really surprising, because you've stored in layer1Obj and layer2Obj the LPP object, not the shapes. So what happens is that you access the LPP object for M2, change all the associated shapes to be on M1, and so those shapes will now be part of layer2Obj~>shapes along with all the original M2 shapes; then you change all the M2 shapes (including the newly converted shapes) to M1.

    Instead, do this:

    layer1Shapes=layer1Obj~>shapes
    layer2Shapes=layer2Obj~>shapes
    layer1Shapes~>layerName="M2"
    layer2Shapes~>layerName="M1"

    By doing this, you've captured the list of shapes for each layer before you start changing layers, and those lists won't change.

    Regards,

    Andrew.

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

    That's not really surprising, because you've stored in layer1Obj and layer2Obj the LPP object, not the shapes. So what happens is that you access the LPP object for M2, change all the associated shapes to be on M1, and so those shapes will now be part of layer2Obj~>shapes along with all the original M2 shapes; then you change all the M2 shapes (including the newly converted shapes) to M1.

    Instead, do this:

    layer1Shapes=layer1Obj~>shapes
    layer2Shapes=layer2Obj~>shapes
    layer1Shapes~>layerName="M2"
    layer2Shapes~>layerName="M1"

    By doing this, you've captured the list of shapes for each layer before you start changing layers, and those lists won't change.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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