• 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
  • ssarik
    ssarik over 9 years ago

    Thanks Andrew.

    Another query.

    Say my cellview has two instances I1 and I2. I want to flatten them and store the dbIds of the resulting shapes in two different variables.

    dbIdI1 = All from I1

    dbId2 = All from I2

    How can I do this because dbflatten returns t/nil?

    Thanks,

    Shahbaz

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ssarik
    ssarik over 9 years ago

    Thanks Andrew.

    Another query.

    Say my cellview has two instances I1 and I2. I want to flatten them and store the dbIds of the resulting shapes in two different variables.

    dbIdI1 = All from I1

    dbId2 = All from I2

    How can I do this because dbflatten returns t/nil?

    Thanks,

    Shahbaz

    • 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