This message is from the T13 list server.

A U-DMA quiz...

=== Question #1

The "write" command tells the device to transfer 510 (0x1fe)
bytes.  The host DMA engine is programmed to transfer 510 (0x1fe)
bytes.  Three DMA bursts are required and the U-DMA speed is such
that when the receiver (device) says stop the sender (host) will
send 4 bytes before stopping.

1st DMA burst: The host has sent 200 bytes when the device says stop.
The host sends 4 more bytes before stopping.

2nd DMA burst: The host has sent 200 bytes when the device says stop.
The host sends 4 more bytes before stopping.

3rd DMA burst: The host sends the last 102 bytes. The host and device
stop at the "same time".

Question: Are there any "extra bytes"?
Answer below.

=== Question #2

The "write" command tells the device to transfer 510 (0x1fe)
bytes.  The host DMA engine is programmed to transfer 1024
(0x400) bytes (this is a broken host!).  Three DMA bursts are
required and the U-DMA speed is such that the that when the
receiver (device) says stop the sender (host) will send 4 bytes
before stopping.

1st DMA burst:  The host has sent 200 bytes when the device says
stop.  The host sends 4 more bytes before stopping.

2nd DMA burst:  The host has sent 200 bytes when the device says
stop.  The host sends 4 more bytes before stopping.

3rd DMA burst:  The host has sent 106 bytes when the device says
stop.  The host sends 4 more bytes before stopping.

Question: Are there any "extra bytes"?
Answer below.

Answers below... Scroll down...































=== Answers

Question #1:  No, there are no "extra bytes".  The command said
to transfer 510 bytes.  The host DMA engine transferred 510
bytes. The device received 510 bytes.

Question #2:  Yes, there are "extra bytes" transferred because
the host is broken.  The host DMA engine thinks it needs to send
1024 bytes but the command and the device only want 510 bytes.
As soon as the device has received those 510 bytes
is tells the host to stop but by the time the host stops the host
has sent 8 "extra bytes".  These 8 "extra bytes" in the last DMA
burst are included in the CRC of the last DMA burst but are
otherwise ignored by the device.

(Wasn't that fun?)



*** Hale Landis *** www.ata-atapi.com ***



Subscribe/Unsubscribe instructions can be found at www.t13.org.

Reply via email to