
Interrupts
2-25
if a DMA interrupt occurs and the DMA FIFO Empty (DFE) bit is not set.
This is because any future SCSI interrupts are not posted until the DMA
FIFO is cleared of data. These ‘locked out’ SCSI interrupts are posted
as soon as the DMA FIFO is empty.
2.6.6 Halting in an Orderly Fashion
When an interrupt occurs, the SYM53C710 attempts to halt in an orderly
fashion.
If the interrupt occurs in the middle of an instruction fetch, the fetch
is completed, except in the case of a Bus Fault or Watchdog
Time-out. Execution does not begin, but the DSP points to the next
instruction since it is updated when the current SCRIPTS is fetched.
If the DMA direction is a write to memory and a SCSI interrupt
occurs, the SYM53C710 attempts to flush the DMA FIFO to memory
before halting. Under any other circumstances only the current cycle
is completed before halting, so the DFE bit in
DMA Status (DSTAT)
should be checked to see if any data remains in the DMA FIFO.
SCSI REQ/ACK handshakes that have begun are completed before
halting.
The SYM53C710 attempts to clean up any outstanding synchronous
offset before halting.
In the case of Transfer Control Instructions, once instruction
execution begins it continues to completion before halting.
If the instruction is a JUMP/CALL WHEN <phase>, the
DMA
SCRIPTS Pointer (DSP)
is updated to the transfer address before
halting.
All other instructions may halt before completion.
2.6.7 Sample Interrupt Service Routine
The following is a sample of an ISR for the SYM53C710. It can be
repeated if polling is used, or should be called when the IRQ/ pin is
asserted if hardware interrupts are used.
1.
Read
Interrupt Status (ISTAT)
.
2.
If only the SIP bit is set, read
SCSI Status Zero (SSTAT0)
to clear
the SCSI interrupt condition and get the SCSI interrupt status. The