• 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. instance->master != dbOpenCellViewByType()

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 4411
  • 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

instance->master != dbOpenCellViewByType()

tweeksold
tweeksold over 17 years ago

First post on the newfangled board! (I hope I'm not the only one who figured out how to get here...).

My question is simple: why are these not eq()?

    
    cellView = dbOpenCellViewByType("someLib" "someCell" "schematic")
    instance = car(cellView->instances)
    instance->objType
=> "inst"
    eq(instance->master dbOpenCellViewByType(instance->master->libName
                                                instance->master->cellName
                                                instance->master->viewName))
=> nil

--tom

  • Cancel
  • dmay
    dmay over 17 years ago

    instance->master is the master cellview for the instance.

    instance->cellView is the cellview in which the instance is placed.

    If instance is a nand placed in a cell called someCell, then instance->master->cellName will be "nand" and instance->cellView->cellName will be "someCell".

    -Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeksold
    tweeksold over 17 years ago

    Hi Derek!

    Hey, thanks for reading, man. I get the part about instance->master vs. instance->cellView.  This is the part that confuses me:

    eq(instance->master dbOpenCellViewByType(instance->master->libName
                                             instance->master->cellName 
                                             instance->master->viewName))
    => nil
    

    Call me crazy, but shouldn't this return t, since they're the same cellView?

      --tom
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeksold
    tweeksold over 17 years ago

    But wait--there's more!

    ; Select an instance in a layout window.
    eq(css()->master dbOpenCellViewByType(css()->master->libName css()->master->cellName css()->master->viewName))
    => t
    
    ; Select an instance in a schematic window.
    eq(css()->master dbOpenCellViewByType(css()->master->libName css()->master->cellName css()->master->viewName))
    => nil
    

    So this weirdness only happens in schematics.

      --tom
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 17 years ago

    Sorry for my quick and inaccurate response last time. I thought you were checking equality between the cellview and the instance master.

    I think the problem is likely that you have selected a pcell. Check to see if the instance has a superMaster: css()->master->superMaster

    I tried your statement in a schematic and I got t for a non-pcell and nil  for a pcell. The reason is because pcell instances have a subMaster created at evaluation time. The dbOpenCellViewByType command will open the superMaster out of the library. When you instantiate a pcell, the parameters are evaluated and a subMaster of the pcell is created. If you create another instance with the same parameters, they will reference the same master (subMaster). However, if you change the parameter on one instance, a new subMaster will be created, althouth both subMasters will reference the same superMaster.

    -Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • tweeksold
    tweeksold over 17 years ago

    D'oh--I forgot about pcells!!

    ; With a schematic pcell selected...
    eq(css()->master->superMaster dbOpenCellViewByType(css()->master->libName 
                                                       css()->master->cellName 
                                                       css()->master->viewName))
    => t
    

    Thanks Derek!!

      --tom
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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