Home > Community > Forums > Custom IC SKILL > instance->master != dbOpenCellViewByType()

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 instance->master != dbOpenCellViewByType() 

Last post Mon, Aug 4 2008 12:56 PM by tweeksold. 5 replies.
Started by tweeksold 04 Aug 2008 10:02 AM. Topic has 5 replies and 6267 views
Page 1 of 1 (6 items)
Sort Posts:
  • Mon, Aug 4 2008 10:02 AM

    • tweeksold
    • Not Ranked
    • Joined on Mon, Aug 4 2008
    • Bloomington, MN
    • Posts 7
    • Points 110
    instance->master != dbOpenCellViewByType() Reply

    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

    • Post Points: 20
  • Mon, Aug 4 2008 10:10 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: instance->master != dbOpenCellViewByType() Reply

    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

    • Post Points: 20
  • Mon, Aug 4 2008 11:20 AM

    • tweeksold
    • Not Ranked
    • Joined on Mon, Aug 4 2008
    • Bloomington, MN
    • Posts 7
    • Points 110
    Re: instance->master != dbOpenCellViewByType() Reply

    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
    • Post Points: 5
  • Mon, Aug 4 2008 11:28 AM

    • tweeksold
    • Not Ranked
    • Joined on Mon, Aug 4 2008
    • Bloomington, MN
    • Posts 7
    • Points 110
    Re: instance->master != dbOpenCellViewByType() Reply

    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
    • Post Points: 20
  • Mon, Aug 4 2008 12:41 PM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: instance->master != dbOpenCellViewByType() Reply

    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

    • Post Points: 20
  • Mon, Aug 4 2008 12:56 PM

    • tweeksold
    • Not Ranked
    • Joined on Mon, Aug 4 2008
    • Bloomington, MN
    • Posts 7
    • Points 110
    Re: instance->master != dbOpenCellViewByType() Reply

    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
    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by tweeksold at 04 Aug 2008 10:02 AM. Topic has 5 replies.