beautypg.com

Figure9.2 alternate scatter/gather operation, 2 loopback mode, Loopback mode – Avago Technologies LSI53C1010 User Manual

Page 202: Alternate scatter/gather operation

background image

9-4

SCRIPTS Programming Topics

Figure 9.2

Alternate Scatter/Gather Operation

9.2 Loopback Mode

Loopback mode provides advanced diagnostic and testing capabilities. It
allows the SCRIPTS processor to control and test all signals, regardless
of mode, Initiator or Target, virtually by talking to itself. Loopback Mode
also provides the ability to check the functionality of the part, ensuring
proper SCRIPTS instruction fetches, checking bad parity procedures,
and ensuring all data paths work properly. The SCRIPTS processor
usually executes initiator instructions through the SCRIPTS program and
the host CPU implements the Target Mode by asserting and polling the
appropriate SCSI signals in the SOCL, SODL, SBCL, and SBDL
registers. The Initiator Mode is accomplished using SCSI SCRIPTS and
the Target Mode is implemented using “C” code to access the chip
registers. The modes could be switched to test the Target Mode
applications of the SCRIPTS processor.

To run the Loopback Mode correctly, the following registers must be
initialized to the proper values.

Move_Data:
MOVE MEMORY 4, DSA_addr, ScratchB_addr

; save DSA

address
JUMP REL(Data_In_Loop), WHEN DATA_IN
Data_Out_Loop:
MOVE FROM io_data_buf, WHEN DATA_OUT
MOVE DSA0 + 8 to DSA0 ; Update DSA for scatter gather
JUMP REL(Skip_Carry_Adds_DO), IF NOT CARRY; operations
MOVE DSA1 + 0 to DSA1 WITH CARRY
MOVE DSA2 + 0 to DSA2 WITH CARRY
MOVE DSA3 + 0 to DSA3 WITH CARRY
Skip_Carry_Adds_DO:
JUMP REL(Data_Out_Loop), WHEN DATA_OUT
MOVE MEMORY 4, ScratchB_addr, DSA_addr ; restore DSA

;

address
JUMP REL(Get_Status), WHEN STATUS
JUMP REL(Handle_Message), WHEN MSG_IN
INT Unexpected_Phase

This manual is related to the following products: