avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] floating point calculations - How many cycles


From: Benjamin Titzer
Subject: Re: [avr-gcc-list] floating point calculations - How many cycles
Date: Sat, 25 Jun 2005 21:47:14 -0700 (PDT)

Avrora's instrumentation can easily do this. You can use the profiler
monitor or the trip time monitor. For example, you can identify the start
and end of the code in question by adding a few labels with inline
assembly and then look at where those occur in the generated code. Then
run the machine code in simulation and use one of the profiling monitors.

http://compilers.cs.ucla.edu/avrora

Hope this helps,
-B

On Sat, 25 Jun 2005, intiha Ho gai wrote:

> Hi,
> I know this is a kinda elementary question, but i am not sure how to
> calcuate the number of clock cycles on an Atmel 128L (7.3Mhz) would
> the following line of code doing floating point multiplication take.
>
> currTime = (uint32_t)(skew_*(double)currTime + offset_);//compensation
> over here!!
>
> here the currTime and offset are 32 bit integers, while the skew is a
> floating point with value very close to zero (0.999987 therof).
> If some one can tell me how to do this clacuation, I would be grateful.
>
> Thank you.
> Affan
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]