[USRP-users] Accessing the cycle counter on the E1XX

Philip Balister philip at balister.org
Fri Jun 15 14:59:14 EDT 2012

With the 003 image for the USRP-E1XX, the kernel was updated to allow
user space to access a cycle counter in the ARM. This is useful for
timing short sections of code in order to speed them up by fiddling with
the code. I have a (terse) write up on the wiki:


The basic method show on stack overflow is fine, but I had trouble with
the compiler moving code out from between the two cycle counter reads,
so I had to adjust the argument constraints on the asm.

The constraint thing can be pretty tricky at times, so try this on small
test programs that are easy to compile to asm to get a feel for how
things work before inserting this in something complicated :)


More information about the USRP-users mailing list