
5-2
SYM53C876/876E Data Manual
SCSI SCRIPTS Instruction Set
SCSI SCRIPTS
Move instruction, the first two 32-bit op code
fetches are followed by one or two more 32-bit
fetch cycles.
Sample Operation
The following example describes execution of a
SCRIPTS Block Move instruction.
1. The host CPU, through programmed I/O,
gives the DMA SCRIPTS Pointer (DSP)
register (in the Operating Register file) the
starting address in main memory that points
to a SCSI SCRIPTS program for execution.
2. Loading the DSP register causes the
SYM53C876 to fetch its first instruction at
the address just loaded. This fetch is from
main memory or the internal RAM,
depending on the address.
3. The SYM53C876 typically fetches two
dwords (64 bits) and decodes the high order
byte of the first dword as a SCRIPTS
instruction. If the instruction is a Block Move,
the lower three bytes of the first dword are
stored and interpreted as the number of bytes
to move. The second dword is stored and
interpreted as the 32-bit beginning address in
main memory to which the move is directed.
4. For a SCSI send operation, the SYM53C876
waits until there is enough space in the DMA
FIFO to transfer a programmable size block of
data. For a SCSI receive operation, it waits
until enough data is collected in the DMA
FIFO for transfer to memory. At this point,
the SYM53C876 requests use of the PCI bus
again to transfer the data.
5. When the SYM53C876 is granted the PCI
bus, it executes (as a bus master) a burst
transfer (programmable size) of data,
decrements the internally stored remaining
byte count, increments the address pointer,
and then releases the PCI bus. The
SYM53C876 stays off the PCI bus until the
FIFO can again hold (for a write) or has
collected (for a read) enough data to repeat
the process.
The process repeats until the internally stored
byte count has reached zero. The SYM53C876
releases the PCI bus and then performs another
SCRIPTS instruction fetch cycle, using the incre-
mented stored address maintained in the DMA
SCRIPTS Pointer register. Execution of
SCRIPTS instructions continues until an error
condition occurs or an interrupt SCRIPTS
instruction is received. At this point, the
SYM53C876 interrupts the host CPU and waits
for further servicing by the host system. It can
execute independent Block Move instructions
specifying new byte counts and starting locations
in main memory. In this manner, the
SYM53C876 performs scatter/gather operations
on data without requiring help from the host pro-
gram, generating a host interrupt, or program-
ming of an external DMA controller.