Re: [Gumstix-users] estimating the number of cycles From: Pablo Yanez Trujillo - 2009-03-25 22:10 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi hypo さんは書きました: > > 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. this could work, I didn't think about it. Thanks. Anyway, it would be nice if some can tell where I can find more detailed information about the maximal number of cycles that a/every ARM command needs to perform. The Intel documentation covers only a few. best regards Pablo - -- Pablo Yanez Trujillo http://www.sakuranohana.org My public key: http://www.sakuranohana.org/gpg/shaoran.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (GNU/Linux) iEYEARECAAYFAknKq78ACgkQDzf8xo+0xRUXCQCfYujgXgkJNrp2t04s7rqPGxID sfMAoMu4+QCth1VtaHzONk7feyo9cPjJ =G6Dq -----END PGP SIGNATURE----- ```

[Gumstix-users] estimating the number of cycles Pablo Yanez Trujillo <shaoran@sa...>
 Re: [Gumstix-users] estimating the number of cycles From: hypo - 2009-03-25 18:51 ```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... hth, hypo Pablo Yanez Trujillo-2 wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > > 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) > consume_instructions: > 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? > > Thanks > best regards > Pablo > > - -- > Pablo Yanez Trujillo > http://www.sakuranohana.org > 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 > > iEYEARECAAYFAknI/5wACgkQDzf8xo+0xRVfMACg2fOgSgcovDa/E5AOlYGi7B2t > /JAAoLZV2grad0Z1JS6LxaviafD9G9A9 > =VO4J > -----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 > gumstix-users@... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > -- 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. ```

 Re: [Gumstix-users] estimating the number of cycles From: Pablo Yanez Trujillo - 2009-03-25 22:10 ```-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi hypo さんは書きました: > > 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. this could work, I didn't think about it. Thanks. Anyway, it would be nice if some can tell where I can find more detailed information about the maximal number of cycles that a/every ARM command needs to perform. The Intel documentation covers only a few. best regards Pablo - -- Pablo Yanez Trujillo http://www.sakuranohana.org My public key: http://www.sakuranohana.org/gpg/shaoran.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (GNU/Linux) iEYEARECAAYFAknKq78ACgkQDzf8xo+0xRUXCQCfYujgXgkJNrp2t04s7rqPGxID sfMAoMu4+QCth1VtaHzONk7feyo9cPjJ =G6Dq -----END PGP SIGNATURE----- ```