• 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. Calculator special function Forms

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 144
  • Views 17964
  • 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

Calculator special function Forms

Curtisma
Curtisma over 7 years ago

I am trying to make a calculator function with a form.  However I am finding the documentation to do this lacking and have some questions about setting up the form and about setting the buffer.

The example provided uses a function "ahiCreateStringField" which is otherwise undocumented.  It seems to act exactly the same as "hiCreateStringField" (no "a" at the start")  However when I define a field using a function without the a and one using the function with the a in the same calculator form it doesn't display the form when you click on the function in the calculator.  I also noticed that I seem to be able to add other types of fields by taking a normal form function and appending "a" on the front.  However none of theses other functions are mentioned at all in the documentation.  

Form Questions

1. What is the functional difference between "ahiCreateStringField" and "hiCreateStringField"?

2. Do all of the form functions have an "a" equivalent?  Is there a way to check what arguments they accept?

Buffer Questions

3. Currently I am using "calCreateSpecialFunctionsForm"  to set the calculator buffer.  However this automatically puts the current buffer value as the first argument to my function. It seems like I could write my own CB function using "calSetBuffer" to set the buffer,  Is there anything else I need to take care of when I do this? 

4.  Also I am using "calCreateSpecialFunctionsForm"  but it seems like it would be more flexible to perform it's function myself to make a more advanced form. I could use "calRegisterSpecialFunction" to register the function, and "hiCreateForm" to open the form.  Is there anything else I need to take care of when I do this?  Would I then need to use the form functions without "a" appended?

  • Cancel
Parents
  • drdanmc
    drdanmc over 7 years ago

    Did you ever find good resolution to more dynamic forms for calculator functions?  I ran into that myself and ended up with a form that is probably more complicated than it needs to be.  What is interesting is there are even some built-in calculator functions that could benefit from this.  For example the psd function has a text box for entering a smoothing parameter which is only actually used by psd() when the window is set to Kaiser.  I had a case where you could enter something in one of two ways but not both.  An example would be entering a frequency or a period.  I ended up using tooltips to say users should enter "nil" in either the "frequency" box or the "period" box.  I would have preferred to have a cyclic to pick which and then have the form reflect that.  I noticed that the documentation for the ahiCreate* functions all vanished in 617 so perhaps they are headed for removal at some point.  Even if the form couldn't show/hide items, toggling the sensitivity would be helpful.

    Another example of the UI builder (which I basically like) limitations is a keyword argument that should always be set to a particular value when the function is used for the waveform calculator (causes it to return a waveform instead of a DPL which has the waveform and some key parameters).  The more full version is useful in ocean.  I could add a wrapper I suppose and just pass down all inputs and select the right output.  That just gives one more thing to maintain.  

    I did file a SR with some of this.  

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

    Hi Dan,

    I don't think the ahi.* functions have ever been properly documented; they've been alluded to in the documentation (e.g. for the examples related to the "old" way of adding calculator forms with the calCreateSpecialFunctionsForm), but never properly documented. That example is there in IC617 and IC616.

    I've been gradually working through my many calculator function examples and updating them to use the new UI builder capability. I agree that there are things that could be made more powerful here - I've filed a couple of enhancements for this even in the last week as I've been doing some pre-Christmas updating of some of my code and articles (not got through them all yet!) as we're building up a page which will be a library of custom calculator functions.

    So please do file those cases, and hopefully we can get this improved further. If you have a case number, I can check into it and add some weight to the CCR that gets filed.

    Thanks,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to drdanmc

    Hi Dan,

    I don't think the ahi.* functions have ever been properly documented; they've been alluded to in the documentation (e.g. for the examples related to the "old" way of adding calculator forms with the calCreateSpecialFunctionsForm), but never properly documented. That example is there in IC617 and IC616.

    I've been gradually working through my many calculator function examples and updating them to use the new UI builder capability. I agree that there are things that could be made more powerful here - I've filed a couple of enhancements for this even in the last week as I've been doing some pre-Christmas updating of some of my code and articles (not got through them all yet!) as we're building up a page which will be a library of custom calculator functions.

    So please do file those cases, and hopefully we can get this improved further. If you have a case number, I can check into it and add some weight to the CCR that gets filed.

    Thanks,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • drdanmc
    drdanmc over 7 years ago in reply to Andrew Beckett

    Case 46230572 is what I filed.  

    To be sure, there are some aspects which are nice.  The GUI makes it faster to build the form, the forms have a more consistent look and feel, and the preview button is pretty nice.   I found the descriptions of best practices ways of deploying for multiple users a big vague and the interactions between awvLoadCustomCalcFunction and the .ini files wasn't so clear. 

    -Dan

    • 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