
2-4
Functional Description
Figure 2.2 shows how data is moved to/from the SCSI bus in each of the
different modes. To determine if any bytes remain in the data path when
the chip halts an operation, follow the detailed instructions in the next
sections.
Asynchronous SCSI Send – Follow these steps for asynchronous
SCSI send operations:
Step 1.
To calculate DMA FIFO size:
If the DMA FIFO size is set to 112 bytes, look at the DMA FIFO
(DFIFO) and DMA Byte Counter (DBC) registers and calculate
if there are bytes left in the DMA FIFO. To make this calculation,
subtract the seven least signicant bits of the DBC register from
the 7-bit value of the DFIFO register. AND the result with 0x7F
for a byte count between zero and 112.
If the DMA FIFO size is set to 816 bytes (using bit 5 of the Chip
Test Five (CTEST5) register), subtract the 10 least signicant
bits of the DMA Byte Counter (DBC) register from the 10-bit
value of the DMA FIFO Byte Offset Counter, which consists of
bits [1:0] in the CTEST5 register and bits [7:0] of the DMA FIFO
register. AND the result with 0x3FF for a byte count between
0 and 816.
Step 2.
To determine if any bytes are left in the SCSI Output Data Latch
(SODL) register, read bit 5 in the SCSI Status Zero (SSTAT0)
and SCSI Status Two (SSTAT2) registers.
If bit 5 is set in the SSTAT0 or SSTAT2, then the least signicant
byte or the most signicant byte in the SODL register is full,
respectively. Checking this bit also reveals bytes left in the
SODL register from a Chained Move operation with an odd byte
count.
Synchronous SCSI Send – Follow these steps for synchronous SCSI
send:
Step 1.
To calculate DMA FIFO size:
If the DMA FIFO size is set to 112 bytes, look at the DMA FIFO
(DFIFO) and DMA Byte Counter (DBC) registers and calculate
if there are bytes left in the DMA FIFO. To make this calculation,