[movitz-devel] Re: HD driver

peter.minten at wanadoo.nl peter.minten at wanadoo.nl
Thu Apr 22 08:03:24 UTC 2004

Citeren Frode Vatvedt Fjeld <ffjeld at common-lisp.net>:

> Peter Minten <peter.minten at wanadoo.nl> writes:
> > The only thing is to insert a delay of about 500 nanoseconds. I
> > tried using sleep for it but according to grep it wasn't implemented
> > yet, so for the moment I'm using (loop for x from 1 to 1000
> > collecting x).
> Ok. First of all I'd suggest not to use consing as a delay
> mechanism. Secondly, if I'm not much mistaken, 500 nanoseconds is 500
> cycles on a 1 GHz machine, so that loop expression is probably off by
> a factor of about 100 to 1000.
> Hm.. are you sure it's nanoseconds? I mean, 500 nanseconds is so
> little it's getting complicated to measure with any accuracy, not the
> least on older CPUs, or across the PCI bus.

This is what the spec says:

Upon receipt of a Class 1 command, the drive sets BSY within 400 nsec.

But if it's only 400 cycles then it's likely enough that BSY is not read before 
it gets set (and possibly reset) in all cases (at least for testing). So I'll 
remove the loop.



More information about the movitz-devel mailing list