Home > Community > Forums > Custom IC SKILL > How to open a schematic window from a layout window

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 open a schematic window from a layout window 

Last post Fri, Jan 25 2013 10:09 AM by skillUser. 10 replies.
Started by blankman 30 Nov 2012 08:17 AM. Topic has 10 replies and 1950 views
Page 1 of 1 (11 items)
Sort Posts:
  • Fri, Nov 30 2012 8:17 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 70
    • Points 1,175
    How to open a schematic window from a layout window Reply

     Hi All,

    Im looking to write code to open a corresponding schematic view from a layout window. I have the command below, (which uses predefined variables BSlibname1, BSblockname1 and BSviewname1 to call the cell info) but I'm hoping to extract this info from the open layout window. Would anyone know how to go about this?

    Thanks,
    Brian.

    BSlibname1="adf4355_1"
    BSblockname1="adf4355_1_r0"
    BSviewname1="schematic"

    hiSetBindKey("Layout" "Ctrl Alt Shift<key>1" "win1=hiCreateWindow('((0 248) (1410 1175)) \"graphics\" \"schematic_win\" \"\" t) geOpen(?window win1 ?lib BSlibname1 ?cell BSblockname1 ?view BSviewname1 ?mode \"r\") hiResizeWindow(win1 list(0:248 1410:1175))")

    • Post Points: 20
  • Fri, Nov 30 2012 8:25 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: How to open a schematic window from a layout window Reply

    BSlibname1=geGetEditCellView()~>libName
    BSblockname1=geGetEditCellView()~>cellName

    Derek

    • Post Points: 20
  • Fri, Nov 30 2012 8:43 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 70
    • Points 1,175
    Re: How to open a schematic window from a layout window Reply

    Thanks Derek, so simple. I have the code below now, but am still seeing an error. Im guessing improper syntax. Is there anything im missing?

     

    hiSetBindKey("Layout" "Ctrl Alt Shift<key>1" "win1=hiCreateWindow('((0 248) (1410 1175)) \"graphics\" \"schematic_win\" \"\" t) geOpen(?window win1 ?lib \"geGetEditCellView()~>libName\" ?cell \"geGetEditCellView()~>cellName\" ?view \"geGetEditCellView()~>viewName\" ?mode \"r\") hiResizeWindow(win1 list(0:248 1410:1175))")

    • Post Points: 20
  • Fri, Nov 30 2012 8:47 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,576
    • Points 15,725
    Re: How to open a schematic window from a layout window Reply

     Hi Brian,

    There is a small mistake in the syntax in that you do not need quotes around the SKILL expressions that are getting the library and cell names, so the code below should work (not tested):

    hiSetBindKey("Layout" "Ctrl Alt Shift<key>1"
      "win1=hiCreateWindow('((0 248) (1410 1175)) \"graphics\" \"schematic_win\" \"\" t) 
    geOpen(?window win1 ?lib geGetEditCellView()~>libName
        ?cell geGetEditCellView()~>cellName ?view \"schematic\" ?mode \"r\") 
    hiResizeWindow(win1 list(0:248 1410:1175))"
    )

    Also note that since you want to open the schematic for the layout, I fixed the last argument as "schematic".

    Regards,

    Lawrence.

    • Post Points: 20
  • Fri, Nov 30 2012 8:54 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 70
    • Points 1,175
    Re: How to open a schematic window from a layout window Reply

     Lawrence, thanks, however I am still seeing an error, as below...

     

     *WARNING* geGetEditCellView: Invalid graphics editor window.

     *Error* geOpen: argument for keyword ?lib should be a string (type template = "gttttt") - nil

    • Post Points: 50
  • Fri, Nov 30 2012 9:05 AM

    Re: How to open a schematic window from a layout window Reply

    geOpen will open a new window if you don't pass ?window - and returns the window id (there appears to be an error in the documentation, but it's always done this).

    So using the hiCreateWindow is a bit unnecessary - and I think that's why it's failing because the hiGetCurrentWindow() will be returning the new window, not the source window.

    Andrew.

    • Post Points: 5
  • Fri, Nov 30 2012 9:11 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,576
    • Points 15,725
    Re: How to open a schematic window from a layout window Reply

    Hi Brian,

    Sorry, I've tested and modified the code, try the following instead:

    
    hiSetBindKey("Layout" "Ctrl Alt Shift<key>1" 
      "hiResizeWindow(geOpen(
        ?lib geGetEditCellView()~>libName
        ?cell geGetEditCellView()~>cellName
        ?view \"schematic\"
        ?mode \"r\")
      list(0:248 1410:1175))")
    

    Hopefully this will work for you also.

    Regards,

    Lawrence.

    • Post Points: 20
  • Fri, Nov 30 2012 9:25 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 70
    • Points 1,175
    Re: How to open a schematic window from a layout window Reply

    Lawrence, this works a charm. Thanks again all.

    Rgds,

    Brian.

    • Post Points: 5
  • Fri, Nov 30 2012 9:31 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: How to open a schematic window from a layout window Reply

    Here is how I do it. This routine will work on both layouts and schematics. It will raise an already open window and prompt you to create cells that don't yet exist.

    hiSetBindKey("Layout" "Ctrl Alt Shift1" "myOpenOtherView()")
    hiSetBindKey("Schematics" "Ctrl Alt Shift1" "myOpenOtherView()") 

    procedure(myOpenOtherView(@optional (viewName nil) (cv geGetEditCellView()))
      let((cellWin otherCv msg dbox viewType)
        unless(stringp(viewName)
            if(cv~>viewName=="schematic" then
                viewName="layout"
                viewType="maskLayout"
            else
                viewName="schematic"
                viewType="schematic"
            )
        )
        otherCv = dbOpenCellViewByType(cv~>libName cv~>cellName viewName)
        if(otherCv then
            unless(geGetCellViewWindow(otherCv)
                deOpenCellView(otherCv~>libName otherCv~>cellName otherCv~>viewName viewType nil "r")
            ) ;unless
            cellWin=geGetCellViewWindow(otherCv)
            hiDeiconifyWindow(cellWin)
            hiSetCurrentWindow(cellWin)
            hiRaiseWindow(cellWin)
        else
            hiGetAttention()
            sprintf(msg "**WARNING: Could not open %s %s %L\n" cv~>libName cv~>cellName viewName)
            sprintf(msg "%s           Would you like to create this view?\n" msg)          
            dbox=hiDisplayAppDBox(?name 'dBox ?buttonLayout 'YesNo ?dboxText msg ?dboxBanner "Create this view?")
            if(dbox then
                printf("Creating: %s %s %L\n" cv~>libName cv~>cellName viewName)
                if(otherCv = dbOpenCellViewByType(cv~>libName cv~>cellName viewName viewType "a") then
                    deOpenCellView(otherCv~>libName otherCv~>cellName otherCv~>viewName viewType nil "a")
                else
                    hiGetAttention()
                    printf("**ERROR: Could not create %s %s %L\n" cv~>libName cv~>cellName viewName)
                )
            else
                printf("Cell view %s %s %L does not exist and was not created\n" cv~>libName cv~>cellName viewName)
            )
        )
        otherCv
      ) ;let
    ) ;proc

    Derek

    • Post Points: 20
  • Fri, Jan 25 2013 7:18 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 70
    • Points 1,175
    Re: How to open a schematic window from a layout window Reply

    Hi all, another quick request; is there a means of calling up the library manager directly from a layout or schematic window and have that windows library/cell information auto stuffed into the library manager?

    Brian.

    • Post Points: 20
  • Fri, Jan 25 2013 10:09 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,576
    • Points 15,725
    Re: How to open a schematic window from a layout window Reply

    Hi Brian,

    I'm not sure if we can interact with the Library Manager, but there is a Library Browser which you can set the library, cell and view to - the ddsSyncWithForm() command links the Library Browser to a form with fields for library cell and view.  I am not sure if the Library Browser can be set directly, or only from the linked form - for the latter you could create a form that is not displayed, just for the purpose of setting the Library Browser.  You would need to call ddsEndSyncWithForm when done.  This seems a bit clunky though.   The Library Manager is a separate process, I don't think there is a public way to select a library/cell/view from the Virtuoso process.  What are you trying to achieve?

    Regards,

    Lawrence.

    • Post Points: 5
Page 1 of 1 (11 items)
Sort Posts:
Started by blankman at 30 Nov 2012 08:17 AM. Topic has 10 replies.