[comp.realtime] Microsecond Resolution Clock for Sun Workstations Available

danzig@ucbarpa.Berkeley.EDU (Peter Danzig) (08/05/89)

 We have produced a microsecond resolution timer board for Sun workstations 
and are distributing them through a company in Berkeley.  We have distributed 
over sixteen boards now.  The board works with Sun 3/50, 3/60, 3/75, 3/160, 
3/260, and 4/280 workstations.  You must leave the VME card adjacent 
to the processor vacant in the VME based workstations (We may be able to
cook up a tiny one for you if it's really important).  If your machine is not 
listed, ask us about it.  

 The board usurps the DES socket.  Just plug it in as if it were a chip.   
On 3/75, 3/160, 3/260, 4/280 systems you must also plug in a few PAL and buffer
chips that we provide.  Sun chose not to support the DES socket in these
workstations.  Tell us what machines your want to use it with.

 On a 3/50 with the screen blanked you can generate a 32 bit timestamp inside 
the kernel in about 20 microseconds and about 11 microseconds from user 
space (the difference is because you can't call splimp() and splx()
from user space).  For 64 bit timestamps, expect 30 microseconds and 23 
microseconds.  On a 3/60, 64 bit timestamps take 29 and 20 
microseconds.  You can set the time between clock ticks with the timer 
library call tmrPrescaleBy(x) to be as high as four ticks per microsecond.  
The can timer initialize itself to 32 or 64 bit mode.  A call to tmrTimeval() 
will set the time to the UNIX gettimeofday value.  To open and initialize the 
timer, call tmrOpen().  To map the timer into user space, call tmrMap().  To 
read a 32 bit timestamp call getTS().  To read a UNIX timeval structure, call 
getTV().  Here is a summary of the timer library:
 
	int fd = tmrOpen ()   
	void tmrMap ()
	void tmrPrescaleBy (int x)
	void tmrTimeval ()
	getTS (long *x)   
	getTV (struct timeval *tv)  

 The board doesn't generate an interrupt.  

  We can distribute the device driver on an IBM PC diskette or email it
to you.  The device driver works under SunOS 3.5 and SunOS 4.0.  It 
has been ported to other operating systems: Dash, Sprite, and the V-system.

  The board costs $125.  For 3/75, 3/160, 3/260, 4/280 systems
add $25 for the PALs and buffers chips.  If you want one, contact us 
by phone or electronic mail.  Shipping in the US through FED Express
is $9.50 for standard air delivery of any number of boards and through
US mail is $2.00.  Shipping outside the US is by US Postal Service 
airmail for $15.

gnu@hoptoad.uucp (John Gilmore) (08/07/89)

> We have produced a microsecond resolution timer board for Sun workstations...

FYI, the SPARCstation-1 come standard with pair of microsecond
resolution timers as its main system clocks.  Gate arrays are wonderful
things.  (It also has a battery backup TOD clock.)  This is not to
disparage the work done to bring high resolution timing to the other
models.  (The Sun-1 and Sun-2 had an AMD timer chip whose spare timers
could be set up as a 64-bit high resolution clock, too, by the way.)

> On a 3/50 with the screen blanked...

It may surprise some people, but blanking the screen on a 3/50 speeds
it up by up to 40%, since refreshing the video from main memory burns
about 40% of the memory bandwidth.  If you have a 3/50 doing some
dedicated job, and need the cycles, attach a terminal as the
console.  Without the video overhead, it's about as fast as a 3/160.
(15 MHz 1 wait state, versus 16.67 MHz 1.5 wait states).
-- 
John Gilmore      {sun,pacbell,uunet,pyramid}!hoptoad!gnu      gnu@toad.com
      "And if there's danger don't you try to overlook it,
       Because you knew the job was dangerous when you took it"