Figure9.1 scatter/gather operation, Scatter/gather operation – Avago Technologies LSI53C1010 User Manual
Page 200
9-2
SCRIPTS Programming Topics
With SCSI SCRIPTS, it is possible for you to set up multiple data buffer
areas and then fill them rapidly without interrupting the host processor.
This allows faster and more efficient scatter/gather operations. Block
move data can come from any memory address, so scatter/gather
operations for user data are transparent to the chip and the host
processor. With the technique illustrated in
, a number of data
buffers (pages, or gather table entries) are defined in advance and each
is associated with a Block Move instruction. Any number of Block Moves
can be hardcoded into the buffers. If the scatter/gather list requested has
more entries than have been defined for the buffer, then an interrupt after
the last entry in the series can inform the firmware it needs to set up the
remaining scatter/gather entries after the first group is complete.
Figure 9.1
Scatter/Gather Operation
RW_Offset_patch_do:
;Relative offset will be changed so that we jump into the
;proper place in the scatter gather list
JUMP REL(Data_Out_xfer); Data_Out_xfer:
CHMOV FROM data_buf1, WHEN DATA_OUT CHMOV FROM data_buf2,
WHEN
; 16 moves to support Scatter Gather
DATA_OUT
CHMOV FROM data_buf3, WHEN DATA_OUT
CHMOV FROM data_buf4, WHEN DATA_OUT
CHMOV FROM data_buf5, WHEN DATA_OUT
CHMOV FROM data_buf6, WHEN DATA_OUT
CHMOV FROM data_buf7, WHEN DATA_OUT
CHMOV FROM data_buf8, WHEN DATA_OUT
CHMOV FROM data_buf9, WHEN DATA_OUT
CHMOV FROM data_buf10, WHEN DATA_OUT
CHMOV FROM data_buf11, WHEN DATA_OUT
CHMOV FROM data_buf12, WHEN DATA_OUT
CHMOV FROM data_buf13, WHEN DATA_OUT
CHMOV FROM data_buf14, WHEN DATA_OUT
CHMOV FROM data_buf15, WHEN DATA_OUT
CHMOV FROM data_buf16, WHEN DATA_OUT
; Check to see if we need more SG list entries
MOVE DWT & RW_NEED_MORE_SG_ENTRIES to SFBR
INT RW_Need_More_SG, if not 0
; If we are here then all the data was transferred
; so we set a flag to indicate that
MOVE SBR | RW_ALL_DATA_TRANSFERRED to DWT
JUMP REL(RW_Handle_Phase)
; *** Script move data ENTRY