
AMD
P R E L I M I N A R Y
78
Am79C974
Command Register (CMD)
The upper 3 bytes of Command register are reserved,
the remaining (LSB) byte is defined as follows:
Address (B)+40h, LSB
7
6
READ/WRITE
1
DIR
INTE_D
INTE_P
MDL
Reserved Reserved
CMD1
CMD0
5
4
3
2
0
DIR:
Data transfer direction bit. When this bit is set, the direc-
tion of transfer is from SCSI to memory.
INTE_D:
DMA transfer active interrupt enable bit. When this bit is
set, the ERROR or DONE condition will cause
INTA
to
be asserted.
INTE_P:
Page transfer active interrupt bit.
MDL:
Memory Descriptor List (MDL) SPA enable bit.
RESERVED:
Reserved for future expansion. The zero value must be
written in these bits.
CMD1-0:
These two bits are encoded to represent four com-
mands: IDLE, BLAST, START, and ABORT.
CMD1
0
CMD0
0
Command
IDLE
Description
Resets the DMA block to the IDLE state. Stops any current transfer. Does not
affect status bits or cause an interrupt.
Empties all data bytes in DMA FIFO to memory during a DMA
write operation. Upon completion, the ‘BCMPLT’ bit will be set
in the DMA Status register. This command should not be used
during a DMA read operation.
Terminates the current DMA transfer. Restores the DMA engine to the IDLE
state. Sets the ABORT bit (bit 2) in the status register.
Note: This is only valid after a ‘START’ command is issued.
Initiates a new DMA transfer. These bits must remain set
throughout the DMA operation until the ‘DONE’ bit in the DMA
Status Register is set.
Note: This command should be issued only after all other
control bits have been initialized.
0
1
BLAST
1
0
ABORT
1
1
START
DMA Scatter-Gather Mechanism
The Am79C974 controller contains a scatter-gather
translation mechanism which facilitates faster data
transfers. This feature uses a
M
emory
D
escriptor
L
ist
which is stored in system memory. Use of the Memory
Descriptor List allows a single SCSI transfer to be read
from (or written to) non-contiguous physical memory lo-
cations. This mechanism avoids copying the transfer
data and MDL list, which was previously required for
conventional DMA operations.
Memory Descriptor List (MDL)
The MDL is a non-terminated (no End Of File marker)
list of 32-bit page frame addresses, which is always
aligned on a Double Word boundary. The format is
shown below:
31
12 11
0
Page Frame Address
Ignored
DMA Scatter-Gather Operation
(4k aligned elements)
The scatter-gather mechanism described below
assumes 4k page alignment and size for all MDL entries
except the first and last entry. This feature is enabled by
setting the MDL bit in the DMA Command register (Bit 4,
Address (B)+40h).
1. a) Prepare the Memory Descriptor List (MDL)
through software and store it in system
memory.
b) Load the address of the starting entry in the
Memory Descriptor List (MDL) into the Start
Memory Descriptor List Address (SMDLA)
register. This value is automatically copied into
the Working MDL Address Counter (WMAC).
c) Program the Starting Transfer Count (STC)
register with the total transfer length (i.e., # of
bytes). Also program the Starting Physical
Address (SPA) register (bits 11:0) with the
starting offset of the first entry.
Note
: The value in the SMDLA register must be double
word aligned. Therefore, read/write transactions will al-
ways begin on a double word boundary.