Home > Community > Forums > Custom IC SKILL > How to get coordinates of layers

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: *

 How to get coordinates of layers 

Last post Thu, Jan 16 2014 3:41 AM by Andrew Beckett. 4 replies.
Started by PDCHino 09 Oct 2012 06:50 PM. Topic has 4 replies and 4399 views
Page 1 of 1 (5 items)
Sort Posts:
  • Tue, Oct 9 2012 6:50 PM

    • PDCHino
    • Not Ranked
    • Joined on Wed, May 23 2012
    • Tarlac, Philippines
    • Posts 2
    • Points 25
    How to get coordinates of layers Reply
    Greetings!

    I want to get coordinates of layers of the selected object.

    What what SKILL commands or program will I use?

    For example:

    I have a resistor in a layout, I select it then execute a SKILL commands or program.

    The result will be the x and y coordinates of the layers of the resistor I selected.
    • Post Points: 20
  • Tue, Oct 9 2012 7:24 PM

    • psill
    • Top 500 Contributor
    • Joined on Sun, Mar 25 2012
    • Posts 24
    • Points 420
    Re: How to get coordinates of layers Reply

    I am assuming you the layout is flat data or shapes, not instances or pcells

    This might get you some info to start.

    load the script 

    Select your shapes then excute the script.

     procedure(printPts()
    let(    (type
        (cnt 0)
        (objList geGetSelSet()))

    foreach(obj objList
        ++cnt
        type = obj~>objType
        case(type
            ("inst"
                printf("%s %L at %L\n" type obj~>xy))
            ("rect"
                printf("%s on layer %L at %L\n" type obj~>lpp obj~>bBox))
            ("polygon"
                printf("%s on layer %L at %L\n" type obj~>lpp obj~>points))
            ("path"
                printf("%s on layer %L at %L\n" type obj~>lpp obj~>points))
            ("pathSeg"
                printf("%s on layer %L at %L\n" type obj~>lpp list(obj~>beginPt obj~>endPt)))
            ("label"
                printf("%s on layer %L at %L\n" type obj~>lpp obj~>xy))
            (t    printf("%s not defined\n" type))
        )
    )
    printf("%n objects selected\n" cnt)
    ); end of let
    ); end of printPts

    You can find more about the objects from selecting an object/s then executing in the ciw the command geGetSelSet()~>? this will output the variables to the object or geGetSelSet()~>?? will output the variables and values.

    psill 

    • Post Points: 35
  • Tue, Oct 9 2012 7:39 PM

    • PDCHino
    • Not Ranked
    • Joined on Wed, May 23 2012
    • Tarlac, Philippines
    • Posts 2
    • Points 25
    Re: How to get coordinates of layers Reply

    Thanks psill!

     It works.

    • Post Points: 5
  • Thu, Jan 16 2014 3:35 AM

    • Binoy CK
    • Not Ranked
    • Joined on Thu, Jan 16 2014
    • Posts 1
    • Points 20
    Re: How to get coordinates of layers Reply

    Hi , 

     

    I want to get the code for finding the coordinates of a Layer which is inside a Pcell ?  

    And it is not flattened .

    Regards,

    Binoy 

    • Post Points: 20
  • Thu, Jan 16 2014 3:41 AM

    Re: How to get coordinates of layers Reply

    Hi Binoy,

    If you have the instance id of the instance, you can access all the shapes by doing:

    instId~>master~>shapes

    or on each layer purpose pair by doing:

    M1=car(exists(lpp instId~>master~>lpps lpp~>layerName=="Metal1" && lpp~>purpose=="drawing"))
    M1~>shapes

    of course, having got the shapes, you can find out the ~>bBox of each or whatever you want. The "coordinates of a layer" is a bit vague, so it's not obvious what you want to do with them.

    You might need to use dbTransformPoint or dbTransformBBox of points or bounding box with instId~>transform as the second argument if you want the coordinates referred to the cellView the pcell is instantiated in, otherwise they are relative to the origin of the pcell.

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by PDCHino at 09 Oct 2012 06:50 PM. Topic has 4 replies.