On Tue, Feb 25, 2014 at 10:56 AM, liyaoshi <[email protected]> wrote:
> From this link , you can see > > readtsc() means this only support on x86 ,tsc register is 64bit register > and clock with main clock , on x86/64 this is can very precise > > On ARM, use generic PIT,(maybe you should write your own driver ) , > > only limit is almost PIT register is 32bit > > I think on Linux, you can only use gperf and _hope_ it will fully utilize the hardware resources. The timers on AM335X is connected to asynchronous bus which is much slower than the CPU cycle. If you want to measure cycles, PMU is almost the only and _right_ thing to do. Chapter C12 in ARM ARM describe how to use PMU. > > 2014-02-25 10:49 GMT+08:00 Grissiom <[email protected]>: > >> On Mon, Feb 24, 2014 at 10:26 PM, Paddu <[email protected]>wrote: >> >>> Hi, >>> >>> We need some advice in measuring Beaglebone CPU(Cortex-A8) clock cycles. >>> Is there any way to measure the CPU cycles and use it inside the program? >>> I have heard about "ccnt" register but don't know how exactly could we >>> use that in the program. >>> Please let me know if there is a reference or pointers on how to >>> implement the code. >>> >>> >> Do you want to measure cycles in Linux program or baremetal program? If >> you are on Linux, this link: >> >> http://halobates.de/modern-pmus-yokohama.pdf >> >> may help you. If not, read the PMU section in the ARM ARM. >> >> -- >> Cheers, >> Grissiom >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Cheers, Grissiom -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
