Many users of the Allegro, APD, and SiP tools are familiar with the great flexibility that allows them to extend and modify the tool to meet their specific requirements. This might mean custom SKILL tools developed in-house, scripts/macros to automate repetitive tasks, or the integration of third-party tools.
Whatever scenarios you may use, it is normally desirable to place these extensions in the tool menus. Doing this removes the necessity to remember and manually enter command names on the command line. It can also allow you to highlight what base commands the feature works with - locating a command under the shapes menu, for example, can highlight that it should be used when defining your split planes.
Modifying the original menu files that ship with your tool has, for years, been the standard way to achieve this. The customized menu could then be placed in your own personal environment or in your corporate site environment for access by the entire team.
However, by overriding the original menu files in this way, you risked missing the appearance of new commands released by Cadence. You might not realize that a new command was available that could dramatically simplify your life. But, those days are behind you now. If you have the most rudimentary knowledge of SKILL coding, you have all the tools you need.
Continue reading to learn how you can apply menu customizations dynamically using a few easy-to-use SKILL API routines. Never again will you miss out on a new feature released by Cadence or get frustrated trying to manage multiple third-party tools for modifying your menus!
Let's tackle the most basic item first: adding a new menu item. Whether this is a new top level next to the Edit menu, a new set of commands in a sub-menu under the Shapes menu, or a single helpful script under the Route menu, the procedure is the same.
The SKILL family of functions that will be used in this section are the axlUIMenu* functions. Documentation for these are found in your Cadence installation hierarchy in the following directory:
For the sake of brevity here, we will not go through a full description of each function. Instead, let us look briefly at the two functions you are most likely to need:
There exist many other axlUIMenu* functions, and we encourage you to check them out. With them, you can change menus, delete items, and even write the current menu file to disk or load an entirely new one - though we know, now, that is likely not our best course of action!
Now that you know a bit about the functions to manipulate the menus, the next tool we need is a way to dynamically cause these menu changes to happen for the user. After all, making them run a script or otherwise manually force the menus to update doesn't represent a convenient, well-integrated solution. It is certainly not a step forward from editing the .men files themselves.
Enter the axlTriggerSet function. This function allows you to register a skill function to be called whenever certain events happen. And, one of those events just happens to be when the menu is loaded!
Because you might want this to appear only for certain designers, in certain product/license combinations, or when editing specific file types (like BRD files, but not DRA files), you will also want to familiarize yourself with the axlVersion and axlDesignType functions, which respectively give you the ability to determine the product in use and the drawing type under edit.
Once your menus look the way you want them, those of you who work in your team's centralized standards group may want to push them out to be seen and used by all your designers. Fortunately, doing so is as easy as can be. This time, it is not the SKILL customization language we need so much as a few key files and installation paths.
First up, the ilinit file. This file allows you to initialize things like your SKILL environment whenever you launch a tool. If you want a single ilinit file common to all your tools, you can name the file allegro.ilinit. APD and SiP will, if they don't find a file named to match their executable name (apd.ilinit/cdnsip.ilinit), default to running the commands in allegro.ilinit if it is present. You can find an example ilinit file in your installation path here:
The last piece of the puzzle is where to locate your newly created/updated ilinit file. You have two choices. While you are testing things and only want to load the file on your specific workstation, place it in your personal home directory's pcbenv folder:
Once you are ready for everyone at your site to use this, move the file to:
Below is a simple example which brings everything together. Try it for yourself with a command you've created. And be creative!
Place your SKILL code into a file, and locate that file in your pcbenv folder. For our example, let's assume the file is named custom_menu.il and our pcbenv is located in the D:/home directory. Let's also assume you only want to register these menu items in your SiP Layout tools, not for any Allegro or APD users at your company. In your SKILL function, add the following code:
(defun loadMyMenu (t_menuName) (when (axlVersion ‘isSIP) (axlUIMenuFind nil "copy") (axlUIMenuInsert nil "My Command" "my_command_name") (axlUIMenuInsert nil "My Script" "replay my_script.scr") );when );defun (axlTriggerSet ‘menu ‘loadMyMenu)
In your allegro.ilinit (or apd.ilinit / cdnsip.ilinit, depending on your product), add:
Shut down your tool and restart it. You should see your newly added menu items just above the copy command in the Edit menu!
With limited time and space here, we clearly cannot cover all the possible ways to customization your menus. For more examples of using these powerful SKILL tools, check out this file in your installation:
And, as mentioned earlier, read the documentation files for the commands we discussed previously. Should you have questions, reach out to your Cadence Customer Support experts to help put you on the right path, or talk with your peers in the online forums.
Do you have a suggestion for an improvement that would make your life easier? Be sure to let your Cadence Customer Support representative know about those as well, so that the suggestion gets passed along to the engineering team. Just don't be surprised if, when you upgrade to the next Cadence software release, you see your idea in the tools. And see it you will, now that your menu files will see any changes put forth by the Cadence engineering team!