• 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. layout shape migration

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 144
  • Views 14968
  • 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

layout shape migration

stuso
stuso over 14 years ago

Hi All, i've written a simple script that grabs all shapes and changes the layerName and purpose as required (to map from one PDK to another). It works fine on small test cells. However i tried it out on a larger layout that has 52000 shapes (MPP's guard rings, looks llike each contact is a shape) & cadence crashes complaining of memory stack.

I think the code itself is efficient, but perhaps not:

foreach( shape_item cv~>shapes

 cond(
  (( nth( 0 shape_item~>lpp ) == "VTLN" && nth( 1 shape_item~>lpp )) == "drawing"
  shape_item~>layerName="OD" 
  shape_item~>purpose="drawing"
  )

nth( 0 shape_item~>lpp ) == "OD" && nth( 1 shape_item~>lpp )) == "drawing"

  shape_item~>layerName="NWELL" 
  shape_item~>purpose="drawing"
  )

...etc

 );end cond

);end foreach

So it sticks all the shapes in a list and then with the foreach it goes through each element of the list and change its layerName and purpose accordingly. If its not ok to have such a large list is it trivial to handle a list in say 500 elements at a time?

Or could it be that in layout land i am changing all these thousands of layer properties without a save and its too much data for the cadence to handle (or the undo stack becomes massive)?

Many thanks

Stu 

 

 

 

  • Cancel
Parents
  • dmay
    dmay over 14 years ago

    I'm surprised you are running out of memory, since 52,000 doesn't seem that huge, but I do have several suggestions for performance improvement and simplicity of code.

    If your conditional is quite large (I'm assuming it is filled with many layer mappings), then you are making too many accesses to shape_item~>lpp. For example, if there are 20 checks in your conditional, they you are accessing this attribute 40 times if only the last item in the conditional matches. Generally speaking, try using car instead of nth(0 and cadr instead of nth(1. However, in this case I wouldn't do either. First of all, if you are not changing the purpose, then just check the layer name and save some trouble.

    (shape_item~>layerName == "VTLN" 
      shape_item~>layerName = "OD"
    )

    Again, you don't want to access that attribute more time than necessary, so try a case statement:

    case(shape_item~>layerName
      ("VTLN" 
        shape_item~>layerName = "OD")
      ("OD"
        shape_item~>layerName = "NWELL")
    )

    You could also loop through the cellview lpps attribute and then process the shapes one lpp at a time. Looks like Ted posted before me, so check out his solution.

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 14 years ago

    I'm surprised you are running out of memory, since 52,000 doesn't seem that huge, but I do have several suggestions for performance improvement and simplicity of code.

    If your conditional is quite large (I'm assuming it is filled with many layer mappings), then you are making too many accesses to shape_item~>lpp. For example, if there are 20 checks in your conditional, they you are accessing this attribute 40 times if only the last item in the conditional matches. Generally speaking, try using car instead of nth(0 and cadr instead of nth(1. However, in this case I wouldn't do either. First of all, if you are not changing the purpose, then just check the layer name and save some trouble.

    (shape_item~>layerName == "VTLN" 
      shape_item~>layerName = "OD"
    )

    Again, you don't want to access that attribute more time than necessary, so try a case statement:

    case(shape_item~>layerName
      ("VTLN" 
        shape_item~>layerName = "OD")
      ("OD"
        shape_item~>layerName = "NWELL")
    )

    You could also loop through the cellview lpps attribute and then process the shapes one lpp at a time. Looks like Ted posted before me, so check out his solution.

    Derek

    • 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