beautypg.com

Figure11.20 scripts source code–write, 19 scripts source code–read_reconnect label, 20 scripts source code–write – Avago Technologies LSI53C1010 User Manual

Page 263: 21 scripts source code–write_disconnect label

background image

Using SCRIPTS for Target Operation

11-13

Figure 11.19 SCRIPTS Source Code–read_reconnect Label

On a write, the SCRIPTS processor interrupts immediately to set up
counts for moving data, as shown in

Figure 11.20

. It takes data from the

initiator, then begins the write. When the writing is complete, control
jumps to the Test Unit Ready label.

Figure 11.20 SCRIPTS Source Code–Write

The

write_disconnect

label,

Figure 11.21

, does all the same things as

the

read_ disconnect

. It sets the semaphore bit and issues one of two

interrupts, depending on whether or not this is the last write of the
transfer.

Figure 11.21 SCRIPTS Source Code–write_disconnect Label

an

read_reconnect:

reselect from selector_id, rel(alt_got_selected ;reselect the initiator
move scntl1 & 0xdf to scntl1

;turns on the halt on parity
;error or atn

move from identify_msg_in_buf, with msg_in

;move in identify message

jump rel(read_return)

;jump to send data

write_return:

move from data_buf, with data_out

;move the data into the buffer

move scratchb0 to sfbr

;get identify message

jump rel(write_disconnect) if 0x40 and mask 0xbf

;jump to disconnect if disconnects allowed

move scratchb1 to sfbr

;get the 'finished' flag

jump rel(tur) if 0x10

;jump to status and message if transfer done

move from save_pointers, with msg_in ;move out the save pointers message
call rel(msg_out_phase) if atn

;jump to message out if atn active

int write_access_medium

;interrupt to read data from medium

write_disconnect:

move from disconnect_msg, with msg_in ;move out the disconnect message
call rel(msg_out_phase) if atn

;jump to message out if atn active

move 0x20 to scntl1

;turns off the halt on parity error or atn

disconnect

;disconnect from the bus

move 0x10 to istat

;set the semaphore bit to say we are
;disconnected

move scratchb1 to sfbr ;get the 'finished' flag
int last_write_disconnect if 0x10

;special interrupt after last data phase

int write_access_medium

;interrupt to read data from medium

This manual is related to the following products: