x y coordinates

Discussion in 'Cadence' started by sajin, Jun 11, 2007.

  1. sajin

    sajin Guest

    Hi all
    I have a doubt in getting the x y coordinates of
    instances down the heirarchy in a layout view. I have to find out the
    x y coordinates w.r.t the top level, of some 100 instances
    instantiated in it. Is there an easy way to find out this, with all
    the orientations and all are taken care.

    Thanking all in advance
    Sajin
     
    sajin, Jun 11, 2007
    #1
  2. sajin

    S. Badel Guest

    Hi all
    If you have the instIds for the different levels of the hierarchy, then pass this list to
    geGetInstTransform (or recursively apply dbConcatTransform) to get the resulting overall transform.


    Then, use dbTranformPoint to get the transformed xy coordinate.


    i.e: if there's an instance hierarchy inst1->inst2->inst3->inst4, then the coordinates of inst4 with
    respect to inst1 are given by

    dbTransformPoint( inst4~>xy geGetInstTransform(list(inst1 inst2 inst3)) )

    Stéphane
     
    S. Badel, Jun 11, 2007
    #2
  3. sajin

    noopster Guest

    Try This, I hacked it up from something else I had.

    ;***************************************************************************
    ; Scan the layout hierarchy for instances
    ; and list it's placement origin in the current coordinate system
    ; Warning: uses recursion
    ;***************************************************************************

    procedure( GetInstOrigin( @key
    (cv (geGetEditCellView))
    (transform list(0:0 "R0" 1))
    cellname)

    let( (origin)
    printf( "cell:%s transform is :%L\n" cv~>cellName transform)
    ;--------------------------------------------------------
    ; Decend the hierarchy updating the transform
    ;--------------------------------------------------------
    foreach( inst cv~>instances
    if( inst~>objType == "inst" then
    newTransform = dbConcatTransform( inst~>transform
    transform)
    GetInstOrigin(
    ?cellname cellname
    ?cv (inst~>master)
    ?transform newTransform
    )
    )
    )
    t
    )
    )
     
    noopster, Jun 12, 2007
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.