beautypg.com

Figure11.16 scripts source code–request sense, 16 scripts source code–request sense – Avago Technologies LSI53C1010 User Manual

Page 261

background image

Using SCRIPTS for Target Operation

11-11

Request Sense,

Figure 11.16

, sends the sense, inquiry, or capacity data

requested by the initiator. The SCRIPTS processor moves the data and
checks to see which Test Unit Ready command to use next.

Figure 11.16 SCRIPTS Source Code–Request Sense

The

read

label,

Figure 11.17

, is the starting point for all read commands.

If disconnects are allowed, the chip jumps to the

read_disconnect

label.

Read return is used after read information is set up in the data buffer. A
series of commands determine if the transfer is finished. If finished, the
SCRIPTS processor goes to Test Unit Ready or tries to disconnect
again.

request_sense:

move from sense_data_buf, with data_in

;move the sense data from the buffer

move scratcha2 to sfbr

;get the stopped/busy flag

jump rel(tur) if 0x00

;go to the appropriate status and
;message phases

jump rel(stopped_busy_tur)

inquiry:

move from inquiry_data_buf, with data_in

;move out inquiry data

move scratcha2 to sfbr

;get the stopped/busy flag

jump rel(tur) if 0x00

;go to the appropriate status and
;message phases

jump rel(stopped_busy_tur)

read_capacity:

move from capacity_data_buf, with data_in

;move out read capacity data

move scratcha2 to sfbr

;get the stopped/busy flag

jump rel(tur) if 0x00

;go to the appropriate status and
;message phases

jump rel(stopped_busy_tur)

This manual is related to the following products: