• 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. How to create personalized menu in virtuoso layout edit...

Stats

  • Locked Locked
  • Replies 29
  • Subscribers 130
  • Views 34526
  • 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 create personalized menu in virtuoso layout editor

AmitBiswas
AmitBiswas over 14 years ago
Hi, I have written few scripts in skill language. I want group all the scripts together into a single menu in virtuoso layout editor. Like in the layout editor window there are several menus at the top containing multiple functions, I want to create my personalized menu in the layout editor window. I also want to put that script in the .cdsinit file, so that when cadence will be started the menus will be loaded automatically in the layout editor window like the other menus. Thanks in advance, Amit
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Amit,

    I should point out that the way that Lawrence suggested doing this is the wrong way to add a banner menu (sorry Lawrence). Adding a pulldown banner menu in a post install trigger is likely to cause trouble (I've seen this happen numerous times), and since there is a userMenuTrigger available (this is the third argument to deRegUserTriggers). In fact it makes it simpler, because all your function has to do is return a list of pulldown menus to add, and does not need to worry itself with inserting them in the banner - that is done by the Design Editor infrastructure. So it would be something like:

    procedure(AmitAddMenu(_args)
    let( (item1 item2)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "My First Item"
    ?callback "AmitFunctionOne()"
    )
    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "My Second Item"
    ?callback "AmitFunctionTwo()"
    )
    ;; create a menu that includes the menu items and return a list of the
    ;; pulldown menus
    list(hiCreatePulldownMenu('AmitMenu "Amit Menu" list(item1 item2)))
    );let
    ); procedure
    ;; create a userMenuTrigger trigger that automatically adds the menu

    deRegUserTriggers("maskLayout" nil 'AmitAddMenu)

    Note this is untested - and in practice you would add code to avoid redefining the pulldown menu each time (e.g. unless(boundp('AmitMenu) ...) but hopefully you get the principle.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    Amit,

    I should point out that the way that Lawrence suggested doing this is the wrong way to add a banner menu (sorry Lawrence). Adding a pulldown banner menu in a post install trigger is likely to cause trouble (I've seen this happen numerous times), and since there is a userMenuTrigger available (this is the third argument to deRegUserTriggers). In fact it makes it simpler, because all your function has to do is return a list of pulldown menus to add, and does not need to worry itself with inserting them in the banner - that is done by the Design Editor infrastructure. So it would be something like:

    procedure(AmitAddMenu(_args)
    let( (item1 item2)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "My First Item"
    ?callback "AmitFunctionOne()"
    )
    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "My Second Item"
    ?callback "AmitFunctionTwo()"
    )
    ;; create a menu that includes the menu items and return a list of the
    ;; pulldown menus
    list(hiCreatePulldownMenu('AmitMenu "Amit Menu" list(item1 item2)))
    );let
    ); procedure
    ;; create a userMenuTrigger trigger that automatically adds the menu

    deRegUserTriggers("maskLayout" nil 'AmitAddMenu)

    Note this is untested - and in practice you would add code to avoid redefining the pulldown menu each time (e.g. unless(boundp('AmitMenu) ...) but hopefully you get the principle.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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