Home > Community > Forums > Custom IC SKILL > add instance from library via pulldown menu.

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

 add instance from library via pulldown menu. 

Last post Mon, Jan 21 2013 11:23 AM by dmay. 2 replies.
Started by flintae32 20 Jan 2013 12:15 PM. Topic has 2 replies and 812 views
Page 1 of 1 (3 items)
Sort Posts:
  • Sun, Jan 20 2013 12:15 PM

    • flintae32
    • Not Ranked
    • Joined on Tue, Nov 25 2008
    • Posts 4
    • Points 65
    add instance from library via pulldown menu. Reply
    Hi IC Community

    My experience with Cadence’s Skill is very limited. I have created a pull down menu with sliders in the upper layout editor banner window with some success. My question is, how do I utilize the callback function to place an instance from a cell library into the layout editor window, when selected.

    software version: 5.1.41

    Example below:

    mlf_frame = hiCreatePulldownMenu( 'editMenu "edit"

    list(

    hiCreateMenuItem(

                               ?name `3x3

                               ?itemText "M_3X3"

                               ?callback  "??????()"

    What command should I place here in the callback function ??????. Any help would be greatly

    appreciated.

     
    Thanks

    Johnny
    Filed under:
    • Post Points: 20
  • Mon, Jan 21 2013 10:15 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,598
    • Points 16,075
    Re: add instance from library via pulldown menu. Reply

    Hi Johnny,

    This is slightly tricky - if you don't want to have to enter the lib/cell/view in a form (as initiated by a call to leHiCreateInst() ) then you would need to call something like dbCreateInstByMasterName() - the problem is that this function needs a location (origin) to place the instance at.  I would use something like "enterPoint" or "enterPoints" to gather the instance location(s) and use the addPointProc to place the instance at the most recently provided coordinate (which would be something like car(last(pts)), assuming "pts" was the argument used for the addPointProc function).  The following is an approximation of what you need:

    
    procedure(CCFeditMenuCB()
      enterPoints(?prompts list("Point at the location for the instance")
        ?addPointProc "CCFcreateInstAtPoint"
      )
    )
    
    procedure(CCFcreateInstAtPoint(win pts)
      dbCreateInstByMasterName(
        geGetEditCellView(win)
        <libNameHere>   ;; this is where you hard-code the library, cell and view names
        <cellNameHere>
        <viewNameHere>
        nil             ;; let the editor choose the instance name
        car(last(pts))
        "R0"            ;; hard-code orientation of R0
      )
    ) 

    The name that you put in the edit menu item callback is "CCFeditMenuCB". Once you call this it starts a call to enterPoints that allows you to place one or more instances, and when you are doing you just hit the Escape key.

    I hope that this helps you.

    Regards,

    Lawrence.

    • Post Points: 20
  • Mon, Jan 21 2013 11:23 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,445
    Re: add instance from library via pulldown menu. Reply

    It's easier to just preset the create instance form:

    procedure(MYleHiCreateInst(lib cell view)
        leCreateInstForm->libName->value = lib
        leCreateInstForm->cellName->value = cell
        leCreateInstForm->viewName->value = view
        leHiCreateInst()
    )

    Derek

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by flintae32 at 20 Jan 2013 12:15 PM. Topic has 2 replies.