• 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
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Stu,

    Not sure - 52000 should be simple to handle. I can't really see why you're doing all those nth() calls - surely it would be easier to do:

    cond(
      (shape_item~>layerName=="VTLN" && shape_item~>purpose=="drawing"
        shape_item~>layerName="OD" ...

    That would cut down the garbage created. But I doubt that's the problem.

    It would also be more efficient to do:

    shapeTable=makeTable('shapeTable nil)
    foreach(lpp cv~>lpps
      shapeTable[list(lpp~>layerName lpp~>purpose)]=lpp~>shapes
    )
    foreach(lpp shapeTable
      cond(
        (car(lpp)=="VTLN" && cadr(lpp)=="drawing"
          shapeTable[lpp]~>layerName="OD"
        )
        (car(lpp)=="OD" && cadr(lpp)=="drawing"
          shapeTable[lpp]~>layerName="NWELL"
        )
     )
    )
    shapeTable=nil

    The reason for storing it all in a table first is because if you update the lpps as you go along, you'll be modifying lpps that you've not got to yet - so if I store the list of the original shapes for each layer purpose pair, they won't clobber each other. Also directly updating the layerName or purpose of a list of shapes in one go should be more efficient.

    Regards,

    Andrew.

     

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

    Stu,

    Not sure - 52000 should be simple to handle. I can't really see why you're doing all those nth() calls - surely it would be easier to do:

    cond(
      (shape_item~>layerName=="VTLN" && shape_item~>purpose=="drawing"
        shape_item~>layerName="OD" ...

    That would cut down the garbage created. But I doubt that's the problem.

    It would also be more efficient to do:

    shapeTable=makeTable('shapeTable nil)
    foreach(lpp cv~>lpps
      shapeTable[list(lpp~>layerName lpp~>purpose)]=lpp~>shapes
    )
    foreach(lpp shapeTable
      cond(
        (car(lpp)=="VTLN" && cadr(lpp)=="drawing"
          shapeTable[lpp]~>layerName="OD"
        )
        (car(lpp)=="OD" && cadr(lpp)=="drawing"
          shapeTable[lpp]~>layerName="NWELL"
        )
     )
    )
    shapeTable=nil

    The reason for storing it all in a table first is because if you update the lpps as you go along, you'll be modifying lpps that you've not got to yet - so if I store the list of the original shapes for each layer purpose pair, they won't clobber each other. Also directly updating the layerName or purpose of a list of shapes in one go should be more efficient.

    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