Home > Community > Forums > Custom IC SKILL > swap instances given instance name.

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

 swap instances given instance name.  

Last post Mon, Dec 28 2009 3:20 AM by marbs. 5 replies.
Started by marbs 11 Dec 2009 03:23 AM. Topic has 5 replies and 1913 views
Page 1 of 1 (6 items)
Sort Posts:
  • Fri, Dec 11 2009 3:23 AM

    • marbs
    • Top 100 Contributor
    • Joined on Mon, Jun 15 2009
    • Posts 60
    • Points 750
    swap instances given instance name. Reply

    Hi all,

    I would like to ask, how to swap instances in layout,

    given the instance's name.  For example,  I would like to

    swap the instances |M34  to |M335, how to do that in SKILL ?  

     

    Thanks in advance,

    Marbs

    • Post Points: 20
  • Fri, Dec 11 2009 3:59 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,022
    • Points 15,575
    Re: swap instances given instance name. Reply

    Hi Marbs

    A simple way to do it would be as follows:

    CCSswapInst("|M34" "|M335")

     procedure( CCSswapInst(inst1 inst2)
       let( (cv id1 id2 temp)
          cv=geGetWindowCellView()
          id1=dbFindAnyInstByName(cv inst1)
          id2=dbFindAnyInstByName(cv inst2)
          if( id1 && id2 then
             temp=id1~>xy
             id1~>xy=id2~>xy
             id2~>xy=temp
             printf("%s and %s have been swapped\n" inst1 inst2)
          else
             printf("Instances not found\n")
          ) ;if
       ) ;let
    ) ;procedure


    Best regards
    Quek

    • Post Points: 20
  • Fri, Dec 11 2009 4:25 AM

    • marbs
    • Top 100 Contributor
    • Joined on Mon, Jun 15 2009
    • Posts 60
    • Points 750
    Re: swap instances given instance name. Reply

    Thank you for the code sir,

    but how can I run this code in CIW ?

    • Post Points: 20
  • Fri, Dec 11 2009 4:46 AM

    • Quek
    • Top 10 Contributor
    • Joined on Wed, Oct 14 2009
    • Singapore, 00-SG
    • Posts 1,022
    • Points 15,575
    Re: swap instances given instance name. Reply

    Hi Marbs

    Please load it in ciw using:

    load "swapinst.il"

    After loading it, enter the following in ciw:

    CCSswapInst("|M123" "|M456")

    By the way, when posting a question, it would be great if you can state the specific version of software which you are using so that we can come up with the best solution for you. : )  Tool versions can be obtained using commands such as:

    unix>icfb -W
    unix>icms -W
    unix>virtuoso -W
    unix>assura -W
    unix>spectre -W
    unix>ultrasim -W
    unix>vcar -W
    unix>qrc -version
    unix>ncsim -version
    unix>encounter -version
    unix>eps -version

    Best regards
    Quek

    • Post Points: 35
  • Fri, Dec 11 2009 7:56 AM

    Re: swap instances given instance name. Reply

    Also, in Layout XL there is Edit->Other->Swap Components. In IC613 it is Edit->Advanced->Swap Components (again, in VLS XL).

    So it's a built-in capability if you want to do it interactively.

    Regards,

    Andrew.

     

    • Post Points: 5
  • Mon, Dec 28 2009 3:20 AM

    • marbs
    • Top 100 Contributor
    • Joined on Mon, Jun 15 2009
    • Posts 60
    • Points 750
    Re: swap instances given instance name. Reply
    Thank you very much sir,
    I am now able to run the skill code you have given.
     
    Sorry for my late reply because I am very busy for the last week.  I will follow your instruction about posting a question next time.
     
    Regards,
    Marbs
    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by marbs at 11 Dec 2009 03:23 AM. Topic has 5 replies.