There's an example from back in the 80's that still probably serves as a good
engineering reference for people working on
hardware/
software driver issues.
In those days of
yore (only in the computer industry can one refer to something 20 years ago as "yore"...) there was the
Commodore 64. It retains its place as a pioneering home computer in that it offered very good (for the time) graphics and sound capability in an inexpensive unit. But then came its bastard son...
The
1541 floppy disk drive. It became
the storage option for a home user once they became infuriated enough with the capabilites of cassette-tape backup to pony up for storage on a real medium. Unfortunately, the 1541 was
slow. Unbelievably slow. Slow enough to think, just maybe, there were little
dwarven people in your
serial interface cable running your bits back and forth by hand.
Now, a
very unique attribute of the 1541 drive was that it had its own
6502 processor and
firmware. Plausibly, having in effect a "disk-drive-
coprocessor" would accelerate your data transfer. It did not. Not remotely. Running through a
disassembly of the 6502 firmware revealed endless, meandering
code to provide what would appear, on the surface, to be a pretty straightforward piece of functionality: send data
bits over the data
pin and
handshake it over the handshake signal pin.
As the market forces of installed base and demand for faster speed imposed themselves, solutions to the 1541 speed problem were found by third party companies. Software was released which performed such functions as loading from disk and backing up floppies as speeds that were many, many times faster than the 1541's base hardware and firmware could offer.
The top of this particular speed-enhancement heap was a nice
strategy involving utilizing
both the Commodore 64's and the 1541's processors, and the serial connection,
optimally.
Literally optimally.
Assembly routines were written to run on the 64 and the 1541 side to exactly
synchronize the sending and receiving of bits on a
clock-cycle by clock-cycle basis. Taking advantage of the fact both 6502's were running at 1
Mhz, the 1541's code would start blasting the data across the
serial line to the corresponding 64 code, which would pull it off the
serial bus within a 3-clock-cycle window (you could not write the two routines to be any more in sync than a couple 6502
instructions). This method used
no handshaking whatsoever for large blocks of data being sent from the drive to the computer, and so, in an added speed
coup, the handshaking line was
also used for data, doubling the effective speed.
The 1541 still seems pertinent as an example of a computer function that one would probably think would best be done primarily on a software level (running on the Commodore 64), but was engineered instead to utilize a more-hardware approach (on the 1541), only to be rescued by better software to utilize the hardware (on both).
There's probably still a few
design lessons from the "ancient" 1541, for both the hardware and the software guys.
(Adapted for e2 from a Slashdot posting of mine)