From: sc@idec02inf.uni-jena.de (Sebastian Schmidt)
Subject: Re: better real time clock resolution on Alpha?
Date: 18 Jul 1994 08:27:24 GMT [thread overview]
Message-ID: <30dedc$l4k@hpux.rz.uni-jena.de> (raw)
In-Reply-To: 30416i$5lo@rebold.regent.e-technik.tu-muenchen.de
In article <30416i$5lo@rebold.regent.e-technik.tu-muenchen.de>, pak@regent.e-technik.tu-muenchen.de (Peter A Krauss) writes:
>
> How do I obtain a better real time clock resolution
> than 976 usec on a Alpha?
>
The highest resolution you get by using the process cycle counter (PCC),
which runs with a fraction from N=1..16 of the CPU clock. For the
21064 N is 1. For more information see pg. (I) 4-118 of the Alpha
Architecture Reference Manual. Here is a little example, I use to time
short code sequences (using the extended asm features of GCC):
register unsigned long start, stop;
unsigned time;
asm ("rpcc %0" : "=r" (start));
/* insert the instructions you want to time here */
asm ("rpcc %0" : "=r" (stop));
time= (stop&0xffffffff)-(start&0xffffffff);
--
May your disk buffers flush before powerdown!
Sebastian
prev parent reply other threads:[~1994-07-18 8:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-07-14 18:46 better real time clock resolution on Alpha? Peter A Krauss
1994-07-18 8:27 ` Sebastian Schmidt [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox