Customize Calculator

G

Gunnar Munder

Guest
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
 
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

Gunnar Munder wrote:
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
 
See also this example:
http://groups.google.co.uk/groups?q=calSpecialFunctionInput&hl=en&lr=&group=comp.cad.cadence&selm=4rc1d0ph3v8uepbjink8gn8pgtrtpit3v1%404ax.com&rnum=1

Andrew.

On Thu, 10 Feb 2005 12:06:52 +0100, "S.Badel"
<stephane.badel@REMOVETHISepfl.ch> wrote:

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

Gunnar Munder wrote:
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
 

Welcome to EDABoard.com

Sponsor

Back
Top