SECTION 4 INTERNAL REGISTERS 4.0 GENERAL The NCR SCSI Protocol Controller has a set of internal registers which are used by the microprocessor to direct the operation of the SCSI bus. These registers are read (written) by activating CS with an ad- dress on A3-AO and then issuing a RD/(WR) pulse. They can be made to appear to a microprocessor as standard I/O ports or as memory-mapped I/O ports depending on the external circuitry that controls CS. The following sections describe the operation of these internal registers.
REGISTER SUMMARY A3 A2 A1 AO RIW REGISTER NAME 0 0 0 0 R/W Data Register 0 0 0 1 R/W Command Register 0 0 1 0 R/W Control Register 0 0 1 1 R/W Destination 10 0 1 0 0 R Auxiliary Status 0 1 0 1 R 10 Register 0 1 1 0 R Interrupt Register 0 1 1 1 R Source 10 1 0 0 1 R Diagnostic Status 1 1 0 0 R/W Transfer Counter (MSB) 1 1 0 1 R/W Transfer Counter (2nd BYTE) 1 1 1 0 R/W Transfer Counter (LSB) 1 1 1 1 R/W Reserved for Testability 4.1 DATA REGISTERS The Data Registers are used to transfer SCSI commands, data, status and message bytes between the microprocessor data bus and the SCSI bus. These are eight-bit registers which are doubly-buffered in order to support maximum throughput.
In the non-DMA mode, the microErocessor reads from (writes to) Data Register 1 by activating 'CS'" with A3-AO = 0000 and issuing a RD/(WR) pulse. Two bits have been provided in the Auxiliary Status Register to indicate the status of both Data Register 1 and Data Register 2. In the DMA mode, the DMA logic reads from (writes to) Data Register 1 by responding to DREQ with DACR and issuing a RD/(WR) pulse. The SCSI bus reads from or writes to Data Register 2 when the chip is connected as an Initiator or Target and the bus is in one of the Information Transfer Phases. 4.2 COMMAND REGISTER The Command Register is an eight-bit register used to give commands to the SCSI chip.
The micro- processor can write to (read from) the Command Register by activating CS with A3-AO = 0001 and issuing a WR/(RD) pulse. Writing to the Command Register causes the chip to execute the command that is written. The Command Register can be read; however, the chip resets the Command Register when the SPC sets an Interrupt. Therefore, one cannot guarantee that the data in the register will be correct after loading an interrupting command or enabling selection or reselection. To be safe, a copy of the last command issued should be stored in the microprocessor's memory. Immediate commands are not stored. 7