beautypg.com

Figure11.7 scripts source code–cdb functions, Figure11.8 scripts source code–message out phase, Scripts source code–cdb functions – Avago Technologies LSI53C1010 User Manual

Page 258: Scripts source code–message out phase

background image

11-8

Using the SCRIPTS Processor in Target Applications

Figure 11.7 SCRIPTS Source Code–CDB Functions

command_phase:

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(read), if 0x08

;jump to set up read (6-byte read)

int write_access_medium, if 0x0a

;interrupt to set up write (6-byte write)

int seek_command, if 0x0b

;interrupt to perform seek

int seek_command, if 0x2b

;interrupt to perform seek

jump rel(read), if 0x28

;jump to set up read (10-byte read)

int write_access_medium, if 0x2a

;interrupt to set up write (10-byte write)

jump rel(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

int start_stop_command, if 0x1b

;interrupt to set up start/stop unit command

jump rel(tur), if 0x2f

;verify command, go to tur

jump rel(reserve_unit), if 0x16

;jump to reserve unit

jump rel(release_unit), if 0x17

;jump to release unit

int send_diagnostic, if 0x1d

;interrupt to set up send diagnostic

int format_unit, if 0x04

;interrupt to set up format unit

int illegal_cmd

;interrupt on any other command

In Message Out phase, the initiator moves other types of messages,
such as wide or synchronous negotiation, or NOPs. See

Figure 11.8

for

an example.

Figure 11.8 SCRIPTS Source Code–Message Out Phase

If the chip receives a byte in the message phase indicating an extended
message, then it jumps to these commands as shown in

Figure 11.9

.

msg_out_phase:

return, if not atn

;return if atn gone

move from msg_out_buf, with msg_out

;get message byte

jump rel(extended_msg), if 0x01

;jump if extended message

jump rel(abort), if 0x06

;jump if abort message

jump rel(msg_out_phase), if 0x08

;jump back if nop message

int non_handled_msg

;interrupt if can't handle message

This manual is related to the following products: