3 system overview, System overview – Avago Technologies LSI53C1010 User Manual
Page 28
1-8
Using the Programming Guide
1.3 System Overview
To execute SCSI SCRIPTS programs, only a SCSI SCRIPTS starting
address is required. All subsequent instructions are fetched from external
memory or internal SCRIPTS RAM (when supported). Depending on the
chip, up to eight Dwords at a time are fetched across the DMA interface
and loaded into the internal chip registers. When the chip is operating at
its highest frequency, instruction fetching and decoding take as little as
500 ns. The chip fetches instructions until a SCRIPTS interrupt occurs or
until an external, unexpected event (such as a hardware error) causes
an interrupt. The full set of SCSI features in the instruction set allows
re-entry to the algorithm at any point. This high level interface can be
used for both normal operation and exception conditions.
A typical SCRIPTS operation is illustrated in
. Before SCRIPTS
operation begins, the host processor writes the Data Structure Address
register value to initialize the pointer for table indirect operations. To
begin SCRIPTS operation, the host processor writes the starting address
of the SCRIPTS instructions into the chip’s DMA SCRIPTS Pointer
Register. Once it receives this address, the chip becomes a bus master
and fetches the first SCRIPTS instruction. The chip executes all steps of
the instruction, moving through the appropriate bus phases, interrupting
only on completion of SCRIPTS operation or when service from the
external processor is required. This leaves the host processor free for
other tasks.
Software developers can create SCSI SCRIPTS source code in any text
editor. The LSI Logic Assembler, NASM, is discussed in
“Using the LSI Logic Assembler NASM™.”
NASM assembles SCRIPTS
code into an array of assembled SCRIPTS instructions that can be
included in the main “C” language program and linked together to create
an executable driver. When compiled, these programs control chip
operation.