could you perhaps use a crude way of estimating it (in case you can't find
out exact number of cycles)?
call the function in a loop for a large number of iterations. compute the
total run time (jiffies?) and divide that by the clock freq * iterations to
give you an estimate. you could also subtract the effect of the surrounding
iteration loop by running an empty loop for the same number of iterations
and subtracting its run time from the original...
Pablo Yanez Trujillo-2 wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> i'm currently working on a realtime microkernel (edf + dynamic voltage
> scaling) and I want to simulate runtime through
> the number of cycles. I'm written a simple consume_instructions function:
> ;@ void consume_instructions(uint32_t x)
> subs r0, r0, #1
> bpl consume_instructions
> mov pc, lr
> The problem is, I don't know how to calculate the number of cycles of this
> functions. I've already checked the ARM
> developers manual and the Intel Xscale documentation as well (I'm running
> my os on a gumstix connex 400xm with Intel
> PXA255) but I didn't find a place where I find the actual number of cacles
> needed for those operations. Who knows what
> can I calculate them?
> best regards
> - --
> Pablo Yanez Trujillo
> My public key: http://www.sakuranohana.org/gpg/shaoran.asc
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> -----END PGP SIGNATURE-----
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> gumstix-users mailing list
View this message in context: http://www.nabble.com/estimating-the-number-of-cycles-tp22683894p22707816.html
Sent from the Gumstix mailing list archive at Nabble.com.