• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to open a schematic window from a layout window

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 143
  • Views 22247
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to open a schematic window from a layout window

blankman
blankman over 12 years ago

 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))")

  • Cancel
  • dmay
    dmay over 12 years ago

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

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 12 years ago

    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))")

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 12 years ago

     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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 12 years ago

     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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 12 years ago

    Lawrence, this works a charm. Thanks again all.

    Rgds,

    Brian.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 12 years ago

    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

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • blankman
    blankman over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 12 years ago

    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.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
>

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information