• 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 Design
  3. Shortcut to Open Layout View of Currently Open Cell in New...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 10414
  • 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

Shortcut to Open Layout View of Currently Open Cell in New Tab

sgcad
sgcad over 3 years ago

Hi

I'd like to add a shortcut (say F12) to Virtuoso such that when I have an arbitrary view (in particular schematic or symbol) open, the corresponding layout view opens in a new tab. As I'm new to skill, I only managed to get to the point where F12 opens a specific cell view in a new tab from a schematic:

hiSetBindKey("Schematics" "<Key>F12" "geOpen(?window hiGetCurrentWindow()~>sessionWindow ?lib \"basic\" ?cell \"GND\" ?view \"symbol\" ?viewType \"schematicSymbol\" ?mode \"r\")")

Could you help me with the following next steps:

  • How can I modify the command such that the shortcut also works from views other than schematic? Do I have to repeat the hiSetBindKey command for every view type that I'd like to support, or is there a more elegant way?
  • How can I modify the command such that it opens a specific view (in particular: layout) of the current cell?

Thanks very much!

  • Cancel
Parents
  • RicardoGV1
    RicardoGV1 over 3 years ago

    Hi Sgcad,

    There was a post about changing between schematic and layout views, so maybe this will help you as an starting point. 

    /**********CHANGE BETWEEN SCHEMATIC AND LAYOUT (bindkeys on bottom)*********/

    ;also asks to create the cell in case don't exists.

    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




    hiSetBindKey("Layout" "Shift<Key>w" "myOpenOtherView()")

    hiSetBindKey("Schematics" "Shift<Key>w" "myOpenOtherView()")



    Also, if this wasn't what you were looking for, please, add your Cadence Version with: getVersion() and getVersion("virtuoso")
    This in case somebody needs it.

    Regards,
    R. Gómez

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sgcad
    sgcad over 3 years ago in reply to RicardoGV1

    Thanks, that helped. For completeness, the post you mentioned is here: How to open a schematic window from a layout window and the resulting code (for Virtuoso 6.1.8) as follows:

    hiSetBindKey("Schematics" "<key>F12"
      "geOpen(
        ?window hiGetCurrentWindow()~>sessionWindow
        ?lib geGetEditCellView()~>libName
        ?cell geGetEditCellView()~>cellName
        ?view \"symbol\"
        ?mode \"r\"
      )"
    )

    I still wonder if there's a simple way to replace the first line with something that allows this shortcut to work also from other views, instead of repeating the hiSetBindKey many times for every view type I'd like to support?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to sgcad

    You could add a simple loop around this to define it for more than one application:

    foreach(application '("Schematics" "Symbol" "Layout")
      hiSetBindKey(application "<key>F12"
        "geOpen(
          ?window hiGetCurrentWindow()~>sessionWindow
          ?lib geGetEditCellView()~>libName
          ?cell geGetEditCellView()~>cellName
          ?view \"symbol\"
          ?mode \"r\"
        )"
      )
    )

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RicardoGV1
    RicardoGV1 over 3 years ago in reply to sgcad

    Adding to what Andrew said, you could use deGetAllRootTypes() to get all View-types an iterate over that.

    Also there is a post Method for raising a specific design window from a list in which they list and raise opened windows. This as another workaround where you can choose which one to open.

    Regards,
    R.Gómez

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • RicardoGV1
    RicardoGV1 over 3 years ago in reply to sgcad

    Adding to what Andrew said, you could use deGetAllRootTypes() to get all View-types an iterate over that.

    Also there is a post Method for raising a specific design window from a list in which they list and raise opened windows. This as another workaround where you can choose which one to open.

    Regards,
    R.Gómez

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to RicardoGV1
    RicardoGV1 said:
    Adding to what Andrew said, you could use deGetAllRootTypes() to get all View-types an iterate over that.

    Although most of those applications wouldn't make sense given that geGetEditCellView() wouldn't work on them all. So buyer beware...

    Andrew

    • Cancel
    • Vote Up +1 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