3 scripts areas, 4 multithreaded scripts example, Scripts areas – Avago Technologies LSI53C1010 User Manual
Page 240: Multithreaded scripts example

10-4
Multithreaded I/O
scheduled, the chip executes the JUMP instruction in the scheduler entry
that corresponds to the SCSI ID of the target device to go to the main
SCRIPTS area.
If the chip’s operation halts until another peripheral device retrieves data,
a Wait RESELECT SCRIPT is executed. When the chip is reselected by
the target, it resumes execution of the main I/O routine while the chip
waits to be reselected by the target device. The CPU may call the chip
by setting the SIGP bit. The SCRIPTS processor schedules a new I/O
and repeats the cycle described above.
10.3 SCRIPTS Areas
SCRIPTS code is subdivided into three functional areas: main, scheduler
and reselect.
The main SCRIPTS area contains the SCRIPTS necessary for the
standard operations associated with a SCSI command, such as
transferring messages, commands, and data. The scheduler SCRIPTS
area contains a three SCRIPTS entry for each job the CPU schedules.
The scheduler is modified at run time. When the operating system
interface receives an I/O request, it creates an area in host memory for
the corresponding scheduler information, and then tracks each request it
receives. New requests are classified as outstanding when they are
processed and performed. Upon completion of the I/O request, the
hardware interface returns a completed status to the operating system
interface which updates the status of the request. The reselect SCRIPTS
area is the portion of SCRIPTS code that is used after the target
disconnects and the SCRIPTS processor is waiting to be reselected.
10.4 Multithreaded SCRIPTS Example
An example operation for the SCRIPTS processor is illustrated below.
Steps
through
and Figures
through
make up the example.
This example demonstrates multithreaded I/O where only one command
is sent to each target at a time. To send more than one command to any
target, you must use tagged command queueing. For more complex
situations such as this, it may be preferable to use “C” code for
scheduling I/Os. The SCRIPTS program must be modified to look at the