• 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. flattening an instance and then removing certain layers

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 18220
  • 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

flattening an instance and then removing certain layers

ssarik
ssarik over 9 years ago

Hi,

I am trying to create an instance of a cellview in my layout (the cel view can contain one or more pcells) and then remove certain layers from it (like all the metal 2 and metal 3 layers).

The process which I am following is as follows:

1. Create an instance of the object in my cellview

2. Flatten the instance till 10 level of hierarchy (10 is a randomly chosen number, my hierarchy will not exceed 10)

3. Get the list of all the db objects in the cellview

4. delete all the shapes with layer type as metal2 or metal3

5. save and close

I am able to create the instance in my cell view and it is flattened but the shapes are not removed.

I get the following error in the console window:

.

.

dbGetq: object is a purged/freed object - db:0x21776ca2
type: nil
dbGetq: object is a purged/freed object - db:0x21776ca3
*WARNING* (DB-270063): dbDeleteObject: Invalid database object 0
dbGetq: object is a purged/freed object - db:0x21776ca3
type: nil
dbGetq: object is a purged/freed object - db:0x21776ca4
*WARNING* (DB-270063): dbDeleteObject: Invalid database object 0
dbGetq: object is a purged/freed object - db:0x21776ca4

.

.

.

Below is my code:


cellview = dbOpenCellViewByType( libraryName viewname1 "layout" "maskLayout" "w")

instA2 = dbOpenCellViewByType( libraryName viewname2 "layout" "maskLayout" "r" )

instIdA2 = dbCreateInst(cellview instA2 "inst1" list(0 0) "R0" 1)

dbFlattenInst(instIdA2 10 t t)


allShapes = cellview~>shapes

(foreach shape all_shapes

   if((member(shape~>layerName toRetain) == nil) then
       dbDeleteObject(shape)

)
)

dbClose(inst)
dbSave(cellview)
dbClose(cellview)

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

    The likely cause of this is that your code is using inconsistent variables:

    allShapes = cellview~>shapes

    (foreach shape all_shapes

    As you can see, the variable names are different... so probably all_shapes contains a different list?

    Your code is not the most efficient either - it would be better to iterate through the layer purpose pairs (cellView~>lpps), and then see if that lpp is one to be retained or not, and if not then iterate through all the shapes on that lpp and delete them.

    Regards,

    Andrew.

     

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

    The likely cause of this is that your code is using inconsistent variables:

    allShapes = cellview~>shapes

    (foreach shape all_shapes

    As you can see, the variable names are different... so probably all_shapes contains a different list?

    Your code is not the most efficient either - it would be better to iterate through the layer purpose pairs (cellView~>lpps), and then see if that lpp is one to be retained or not, and if not then iterate through all the shapes on that lpp and delete them.

    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