• 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. Automatic load user-defined calculator functions

Stats

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

Automatic load user-defined calculator functions

jorgevdelacruzN
jorgevdelacruzN over 4 years ago

Hi,

I have some user-defined calculator functions Ex. "aaa.il" and "bbb.il". I would like to add these functions to the function panel in the calculator. I'm able to do it by using the fx button but I would like to know if there is a way to automatic define it in the "Skill User Defined Functions" (Function Panel) by using .cdsinit or .cdsenv.

Regards,

Jorge

  • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago

    Dear jorgevdelacruzNm

    jorgevdelacruzN said:
    but I would like to know if there is a way to automatic define it in the "Skill User Defined Functions" (Function Panel) by using .cdsinit or .cdsenv.

    The following On-line support document details how to automatically add a custom SKILL function by placing a load statement in one's active .csdinit and then registering it as a Calculator special function.

    https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1Od0000000nVbJEAU&pageName=ArticleContent

    Does this help?

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to ShawnLogan

    Hi Shawn, Jorge,

    The method that Shawn pointed to is the old (now obsolete) method of doing this (I've asked for the article to be retired). Whilst it still works, a far better way is to use the "fx" button in the calculator function panel or Explorer/Assembler expression builder. This allows you to build a form that appears just like all the others in the calculator (if a form is needed) and takes care of automatic loading of the code too without needing to add anything into the .cdsinit.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ShawnLogan
    ShawnLogan over 4 years ago in reply to Andrew Beckett

    Dear Andrew,

    As usual, I thank you for your added insight and directions!

    I actually do use the fx button to add custom functions to the Calculator. I only referenced the prior article as I was not sure if the "fx" procedure registers the custom function for only the current Virttuoso session or for all future Virtuoso sessions. I just checked and, as you correctly stated, it does. Thank you!

    Shawn

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jorgevdelacruzN
    jorgevdelacruzN over 4 years ago in reply to Andrew Beckett

    Hi Shawn, Andrew,

    Thank you for your answers.

    Using the fx button works and keeps the function on the calculator for all the cadence sessions in the same working directory. But I'm looking for a solution where I can keep the function on the calculator for several projects on different working directories.

    For example, I've tried adding the following lines:

    procedure( abMovingAvgSpecialFunctionCB()
       calSpecialFunctionInput( 'abMovingAvg '(timeWindow gain))
        )

     calRegisterSpecialFunction( list( "abMovingAvg" 'abMovingAvgSpecialFunctionCB))

    at the end of the abMovingAvg.il function posted on: https://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin%3AViewSolution%3BsolutionNumber%3D11613392

    and load the function in the .cdsinit with load(abMovingAvg.il) but the gui of the function doesn't appear as when I add the function with the fx button.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to jorgevdelacruzN

    Hi Jorge,

    It's not surprising that the calRegisterSpecialFunction doesn't add the UI part - there's a completely different set of functions to add the UI when using the "cal" function to do this, and the UI is not integrated with the calculator, so it's really not a good idea. So don't go down this route - as I said, it's obsolete.

    When you use the "fx" button it actually adds it into your home directory's .cadence dir, not the working directory, so it should be visible across multiple workspaces for then same user. You could move the files into a central shared .cadence directory, or there are some functions to help share the setup - see Virtuoso Analog Design Environment XL Signals, Expressions & the Calculator slides 30-36, particularly slides 34-36.

    Andrew.

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

    This blog might be useful too (although it doesn't cover the loading of central files):  Virtuosity: Sharing Custom SKILL Calculator Functions 

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jorgevdelacruzN
    jorgevdelacruzN over 4 years ago in reply to Andrew Beckett

    Hi Andrew,

    Thank you. I used the awvLoadSharedCustomFunctionsFile command in the .cdsinit file and now I can see the custom functions on all my projects.

    Regards,

    Jorge

    • 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