Customize Calculator

Discussion in 'Cadence' started by Gunnar Munder, Feb 10, 2005.

  1. Hi all,

    is there a chance to add a function to the cadence calculator? I have
    to manipulate single waves from the waveform window and do the same
    calculation over and over again. It would be desirable to add a
    function button or a selection into the "special funtions" menu. Does
    anybody have an idea?

    Thanks
    Gunnar
     
    Gunnar Munder, Feb 10, 2005
    #1
  2. Gunnar Munder

    S.Badel Guest

    More that ideas : a complete manual - Waveform Calculator User Guide,
    Chapter 2 - Using the calculator, Last section - defining functions and
    function keys, specifically deals with this.

    basically, you have to write skill code to define a form (UI) and a
    callback function, then register your new special functions by calling
    calRegisterSpecialFunction(), giving it a name and your function.

    if you do not need a form for your function, you can do this

    ; this examples implements sum
    procedure( my_sum(a b) a+b )

    procedure( my_sum_callback()
    ; the nil here specifies that we don't use a form
    calSpecialFunctionInput( 'myFunct nil )
    ) ; procedure

    calRegisterSpecialFunction( list( "my_sum 'my_sum_callback ) )

    this will add my_sum in the special functions and whenever used will two
    argument it will return their sum.


    if you need a form it's abit more coding- refer to example in the manual.

    good luck with your calculations,

    stéphane
     
    S.Badel, Feb 10, 2005
    #2
  3. Andrew Beckett, Feb 10, 2005
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.