beautypg.com

Figure11.25 scripts source code–abort label, 25 scripts source code–abort label, 26 scripts source code–stopped_busy_wait_select – Avago Technologies LSI53C1010 User Manual

Page 265: Command, Figure 11.25

background image

Using SCRIPTS for Target Operation

11-15

Figure 11.25 SCRIPTS Source Code–abort Label

The SCRIPTS processor only performs the

stopped_busy_wait_select

,

Figure 11.26

, if it is selected while stopped or busy working on another

command. The Request Sense, Test Unit Ready, Inquiry, and Read
Capacity commands are valid while the target device is busy or stopped
and the chip must respond to them. If the chip is stopped, it only
responds to one of these commands or to a Start command.

Figure 11.26 SCRIPTS Source Code–stopped_busy_wait_select Command

stopped_busy_wait_select:

wait select rel(SIGP_set)

;wait to be selected

move from msg_out_buf, with msg_out

;get message byte

call rel(msg_out_phase), if atn

;stay in message if atn still active

move from cmd_buf, with cmd

;get SCSI command

move scntl1 & 0xdf to scntl1

;turns on the halt on parity error or atn

jump rel(stopped_busy_tur), if 0x00

;jump to test unit ready

int request_sense_command, if 0x03

;interrupt to set up request sense command

int inquiry_command, if 0x12

;interrupt to set up inquiry command

int read_capacity_command, if 0x25

;interrupt to set up read capacity command

move sfbr to scratcha3

;save the first byte of the command

move scratcha1 to sfbr

;get the busy flag

jump rel(stopped_busy_tur), if 0x01

;if busy, go right to status and message

move scratcha3 to sfbr

;restore the first byte of the command

int start_stop_command, if 0x1b

;interrupt to set up start/stop unit command

jump rel(stopped_busy_tur)

;go to status and message for any other
;command

alt_got_selected:

int got_selected

;interrupt because got selected during
;reselect attempt

SIGP_set:

int got_SIGP

;taking interrupt because got SIGP

copy_data:

move memory count, source_address, destination_address

;memory move to write SCRIPTS RAM and to
;transfer data to and from upper memory

int done_with_copy

;signal completion of memory move

abort:

move 0x20 to scntl1

;turns off the halt on parity error or atn

disconnect

;go to bus free

int command_aborted

;int to notify driver that command was aborted

This manual is related to the following products: