Home > Community > Forums > Custom IC SKILL > Skill code to apply instance orientation to a cordinate

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

 Skill code to apply instance orientation to a cordinate 

Last post Wed, Jan 16 2013 12:04 PM by shajujan. 3 replies.
Started by shajujan 15 Jan 2013 06:06 PM. Topic has 3 replies and 1007 views
Page 1 of 1 (4 items)
Sort Posts:
  • Tue, Jan 15 2013 6:06 PM

    • shajujan
    • Not Ranked
    • Joined on Fri, Jan 4 2013
    • Posts 8
    • Points 115
    Skill code to apply instance orientation to a cordinate Reply

    Hi,

    I'm looking to extract label cordinates of an instance based on how the instance is placed, i.e, after factoring in the orientation of the instance. Has anyone written code like this? For eg. x:y = 10:20 would become -10:20 after MY, 20:10 after MYR90

    Thanks,

    Shaju

    • Post Points: 20
  • Tue, Jan 15 2013 6:28 PM

    • kb how
    • Top 100 Contributor
    • Joined on Fri, May 6 2011
    • Melaka, Melaka
    • Posts 76
    • Points 1,030
    Re: Skill code to apply instance orientation to a cordinate Reply

    You can use dbTransformPoint to transform the point.

    -How-
    • Post Points: 20
  • Wed, Jan 16 2013 11:47 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Skill code to apply instance orientation to a cordinate Reply

    More specifically:

    xy=10:20
    dbTransformPoint(xy list(0:0 "MY"))
    dbTransformPoint(xy list(0:0 "MXR90"))

    Derek

    • Post Points: 20
  • Wed, Jan 16 2013 12:04 PM

    • shajujan
    • Not Ranked
    • Joined on Fri, Jan 4 2013
    • Posts 8
    • Points 115
    Re: Skill code to apply instance orientation to a cordinate Reply

    Thanks Derek. I got it to work.

     procedure( dumpPins( file )
            let( (inst cv fp x pins pin)

            inst = car(geGetSelSet())
            ;Required because I want to open the layout view, if instance is xform
            cv = dbOpenCellViewByType(inst~>master~>libName inst~>master~>cellName "layout")
            if( cv then
                fp = outfile(file)

                pins = setof( x cv~>shapes (x~>objType=="label" && x~>lpp=='("AP" "pin")) )
                foreach( pin pins
                         ;Displacement occurs after mag is applied
                         xy = dbTransformPoint(pin~>xy list(inst~>xy inst~>orient inst~>mag))
                         fprintf( fp "%s\t%f\t%f\n" pin~>theLabel float(round(car(xy))) float(round(cadr(xy))) )
                )
                dbClose(cv)
                close(fp)
                printf( "dumpPins: found %d pins in %L\n" length(pins) cv~>cellName )
            else
                printf( "dumpPins: ERROR: Could not open %s/layout\n" cv~>cellName )
            )
    ))

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by shajujan at 15 Jan 2013 06:06 PM. Topic has 3 replies.