beautypg.com

Figure11.9 scripts source code–extended message, Figure11.11 scripts source code–wide negotiation, Scripts source code–extended message – Avago Technologies LSI53C1010 User Manual

Page 259: 10 scripts source code–synchronous negotiation, 11 scripts source code–wide negotiation, 12 scripts source code–return negotiation

background image

Using SCRIPTS for Target Operation

11-9

Figure 11.9 SCRIPTS Source Code–Extended Message

In synchronous negotiation,

Figure 11.10

, the SCRIPTS processor

moves synchronous period and offset data from the synchronous
negotiation message and interrupts to set up the synchronous operation
and return message.

Figure 11.10 SCRIPTS Source Code–Synchronous Negotiation

If the extended message indicates wide negotiation, the SCRIPTS
processor expects one more byte with SCSI bus width information, as
shown in

Figure 11.11

. After receiving the byte, it interrupts to set up the

answer.

Figure 11.11 SCRIPTS Source Code–Wide Negotiation

After the interrupt service routine executes, the SCRIPTS processor
sends its return negotiation message. See

Figure 11.12

for an example.

Figure 11.12 SCRIPTS Source Code–Return Negotiation

extended_msg:

int bad_extended_msg, if not atn

;if atn gone, extended message was bad

move from msg_out_buf, with msg_out

;get next message byte

int bad_extended_msg, if not atn

;if atn gone, extended message was bad

move from msg_out_buf, with msg_out

;this byte shows type of message

jump rel(synch_neg), if 0x01

;0x01 is a synchronous negotiation message

jump rel(wide_neg), if 0x03

;0x03 is a wide negotiation message

int bad_extended_msg

;interrupt on any other type

synch_neg:

move from synch_neg_msg_out, with msg_out

;move in the period and offset

int set_up_synch_neg

;interrupt to set up synchronous and
;message

wide_neg:

move from wide_neg_msg_out, with msg_out

;move in the width

int set_up_wide_neg

;interrupt to set up answer

synch_wide_neg_return:

move from neg_msg_in, with msg_in

;move out our answer to the negotiation

jump rel(command_phase), if not atn

;jump to command_phase if atn gone

jump rel(msg_out_phase)

;jump to msg_out_phse if atn still active

This manual is related to the following products: