Avago Technologies LSI53C1010 User Manual
Page 48

3-8
The SCSI SCRIPTS Processor Instruction Set
Description
The SCSI CALL instruction is a conditional subroutine call that fetches
the next SCRIPTS instruction from memory at either the 32-bit call
address or 24-bit offset. It is invoked if all conditions in the instruction or
data are met. If the comparison is false, the SCRIPTS processor does
not branch to the destination but instead fetches the next inline
instruction and continues execution. If the subroutine is called, the next
inline instruction address is stored in the chip's Temporary (TEMP)
register, and is restored to the DMA SCRIPTS Pointer (DSP) register in
response to a RETURN instruction following the CALL.
When the optional data field is used, it is compared to the first byte of
the most recent asynchronous data, message, command, or status byte
received. The user's SCSI SCRIPTS program can determine which
routine to execute next based on actual data values received. Using a
series of these compares, the algorithm can process complex sequences
without intervention by the external processor.
When the optional MASK keyword and its associated value are specified,
the SCRIPTS processor allows selective comparisons of bits within the
data byte. This comparison is illustrated in
. During the
comparison, any bits that are set in the mask data will cause the
corresponding bit in the data byte to be ignored for the comparison.
Wait
Wait for valid phase. This bit is set by the WHEN operand in
the instruction, and cleared by the IF operand.
0 - Perform comparison immediately
1 - Wait for valid phase (SREQ/ asserted by target)
Mask
An 8-bit field that masks the value in SFBR before the
comparison with the data field in the instruction takes place.
As a result, any bits in the data byte that correspond to set
bits in the mask field are ignored. If this field is not specified,
a mask of 0x00 is used.
Data
An 8-bit field that is compared with the incoming data in
SFBR after the mask operation of the mask byte takes place.
Comparison indicates either an equal or not equal condition.
If the Data field is not specified, the compare data bit is
cleared and 0x00 is coded for both the mask and data bytes.
Call Address
A 32-bit address (or 24-bit offset, if relative addressing is
used) where execution continues if the subroutine is called.