Abstract:
Bus interfacing circuitry provides for high speed communication of signals on a bus by using circuitry that synchronizes data transfers to a single reference point, executes commands from a dual-ranked buffer in order to reduce time consumed by external interrupts, and stores multiple bytes in a FIFO buffer to allow rapid sequential transfers; while also providing a flexible input/output configuration allowing both single-ended and differential mode connections.

Description:
This is a continuation of copending application Ser. No. 07/037,739 filed on Apr. 13, 1987, now abandoned. 
    
    
     FIELD OF THE INVENTION 
     This invention is generally related to the field of electronic computer systems, and more particularly pertains to circuitry for transferring information to and from computer communications buses. 
     BACKGROUND OF THE INVENTION 
     Modern computer systems have evolved so that different circuitry components may be connected to a common bus which allows information to be passed back and forth as electrical signals between the components. The design of the bus, and the format and meaning assigned to bus signals is set by a bus protocol, which may be formalized as an industry standard adopted by manufacturers. One such industry standard protocol is the Small Computer System Interface (SCSI) protocol that provides for a nine bit parallel bus which includes one parity bit, and nine control lines, which combined are referred to as a &#34;SCSI bus&#34; and which has a total of eighteen lines. That standard is a draft standard proposed by the ANSI X3T9.2 task group. 
     A known method of connecting to a SCSI bus is to connect a microprocessor to SCSI interfacing circuitry, which typically consists of discrete devices, external drivers, and a SCSI interface integrated circuit chip. Typically, the microprocessor performs various functions to control the interfacing circuitry in accordance with the SCSI protocol. 
     A problem encountered with prior SCSI interfacing circuitry is the limited rate at which large amounts of data may be transferred from point to point through a SCSI bus. 
     Another problem encountered with prior SCSI interfacing circuitry is the large amount of time and instruction storage required by the microprocessor to perform various SCSI protocol functions in controlling the SCSI interfacing circuitry. 
     OBJECTS OF THE INVENTION 
     It is therefore an object of this invention to provide bus interfacing circuitry having a bus protocol processor for use in high performance SCSI interfacing circuitry. 
     Another object of the invention is to provide bus interfacing circuitry adapted to provide an increased rate of data transfer on a bus. 
     A further object of this invention is to provide bus interfacing circuitry which performs complicated bus protocol operations and sequences without requiring intervention by an external microprocessor, thus avoiding time delays and program storage requirements associated with such intervention. 
     SUMMARY OF THE INVENTION 
     The bus interfacing circuitry of this invention has a bus protocol processor which performs sequences of operations. When used for asynchronous communications on the bus, synchronization is achieved using only one synchronization point, thus saving synchronization time, and a delay line storage technique is used for asynchronous parity checking. The bus control processor also incorporates a FIFO buffer which is large enough to store multi-byte bus protocol sequences and thus allows bus transfers without external microprocessor intervention. The bus control processor has a ranked command buffer capable of executing commands in a sequence, including commands requiring interrupts of an external processor, and has latched buffer circuitry for storing the contents of condition registers after such interrupts. The processor further includes output pin function selection circuitry allowing processor chip output pins to function either as single-ended or differential circuit controlling outputs. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is an electrical block diagram of a computer disk and tape controller which includes the bus interfacing circuitry of this invention; 
     FIG. 2 is an electrical block diagram of the bus protocol processor used in the bus interfacing circuitry of this invention; 
     FIGS. 3 and 4 show electrical block diagrams of a pair of interfaces each including the bus interfacing circuitry of this invention, and connected together by a SCSI bus; with FIG. 3 showing a &#34;DATA-IN&#34; configuration and FIG. 4 showing a &#34;DATA-OUT&#34; configuration; 
     FIGS. 5(a) and 5(b) show electrical timing waveforms for asynchronous transfers during &#34;DATA-IN&#34; and &#34;DATA-OUT&#34; configurations; and 
     FIGS. 6 through 15 are state diagrams illustrating the sequence of states for the bus protocol processor used in the bus interfacing circuitry of this invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring first to FIG. 1, a disk and tape controller 10 is a programmed electronic controller for connecting a computer tape drive 11 and disk drive 13 to the SCSI bus 12. The SCSI bus 12 is an electrical cable with at least eighteen conductors which is used for connecting a plurality of electronic devices together in parallel to the bus 12. For example, a central computer (not shown) may be connected to the bus 12 in order to exchange electrical data bit signals with the disk and tape controller 10. 
     The controller 10 includes a disk formatter 14, a tape formatter 16, a buffer controller 18, buffer memory (DRAMs) 20, an external microprocessor 22, and a program memory (EPROM) 24, each of which are known, conventional electronic devices. The EPROM 24 is programmed with instructions specifically tailored to the type of disk drive and tape drive to be controlled, and the desired operation of the controller 10. The microprocessor 22 uses instructions from the EPROM 24 to control the operation of the controller 10. The controller 10 also includes a SCSI processor 26 and connector 28 which electrically interface the controller 10 to the bus 12 in accordance with the standard SCSI protocol. The controller 10 is representative of the types of devices which may be connected to the bus 12; and the SCSI processor 26 and connector 28 may be used to connect other types of devices, such as computers or other data storage devices, to the bus 12. 
     The SCSI processor 26 has a processor bus 30 which has eight parallel lines which carry data bit signals to and from the SCSI processor 26 inside the controller 10. Digital data received on the bus 12 for storage on the tape drive 11 or disk drive 13 passes through the SCSI processor 26 and is placed on the bus 30 for transfer to the formatter 16 and DRAMs 20. Similarly, digital data for transmission on the bus 12 from the tape drive 11 or disk drive 13 passes from the bus 30 to the SCSI processor 26. The buffer controller 18 also has a control connection 32 through which the microprocessor 22 exchanges signals with the buffer controller 18 for controlling the operation of processor 26 and monitoring its operation through the processor bus 30. 
     The SCSI processor 26 has a SCSI connection 34 which carries electrical signals between the processor 26 and the connector 28 for communication with the SCSI bus 12. The connector 28 is preferably a known, conventional electronic circuit for connecting to the SCSI bus 12 and may contain line drivers or transceivers of the single-ended or differential type. 
     Because the SCSI bus 12 is often used as the interconnection for communications between two or more electronic devices, and the same conductors are used for transferring signals to and from each device, it is important that the time between sequential signals be kept as short as possible. The proportion of time that signals are on the bus 12 in comparison to the total time is referred to as the bus &#34;utilization&#34;. It is important that the bus utilization be high in order to allow for transfers of large amounts of data in the shortest possible time. The SCSI processor 26 operates to improve the utilization of the bus 12 by assuring that signals are placed on the bus as promptly as possible, and unnecessary delays are avoided. In particular, under asynchronous operations provided for by the SCSI protocol, the SCSI processor 26 operates to assure that signal bytes are transferred through the bus 12 with minimum delays for synchronization and minimum times between sequential bytes. 
     Referring next to FIG. 2, the SCSI processor 26 is preferably constructed as a single digital integrated circuit chip, and is preferably made as an interconnection of gates with a plurality of pin-outs for connection to external circuitry. The processor 26 has a connection to the processor bus 30 through a driver 36 and latch 38 to an input of a FIFO input multiplexer 40. The processor 26 also has a transfer bus 42 which connects to the processor bus 30 through a driver 44. The processor 26 has a first-in first-out (FIFO) buffer 46 with one end 48 connected to the output of multiplexer 40 and the other end 50 connected to the bus 42. The FIFO 46 is preferably eight bits wide and 16 locations deep; thus having a storage capacity of 16 bytes with eight data bits per byte stored. A parity check circuit 52 is connected to the end 48 of the FIFO 46. The end 50 of the FIFO 46 is a latched register which is coupled to receive and provide signals to the bus 42. A parity generator circuit 54 has its input coupled to a location inside FIFO 46 adjacent the latched end 50, and its output coupled to the latched end 50. 
     Processor 26 has a command decoder 56 having an input coupled to the end 48 of FIFO 46, and an output which controls the transfer counter input multiplexer 58. The multiplexer 58 has its output connected to the transfer counter 60 which has its output connected to the bus 42. 
     The processor 26 also has a status register 62 and interrupt status register 64 coupled to the bus 42. A sequence step register 66 has its output coupled to the bus 42 and its input coupled to sequencers 68. The sequencer mode register 70 is connected to sequencers 68. 
     The processor 26 has a read/write control module 72 which is connected through drivers 74 and 76 to the control connection 32. The control 72 is coupled to a configuration register 78, a transfer count low register 80, a transfer count high register 82, a synchronous transfer period register 84, a synchronous offset register 86, a select/reselect timeout register 88, a select/reselect bus ID register 90, and a clock conversion factor register 92. A synchronous transfer period timer 94 is connected to register 84, a synchronous offset counter 96 is connected to the register 86, and a select/reselect timer 98 is connected to the register 88. 
     The processor 26 has a double-ranked command register 100 which is used to give commands to the SCSI processor 26. The register 100 has a top rank 102 and a bottom rank 104. The top rank 102 is coupled to the latch 38 and the read/write control 72. The bottom rank 104 is coupled to the transfer bus 42. 
     The SCSI processor 26 also has an ID module 106 and a SCSI output control 108. The SCSI connection 34 is shown as four groups of conductors: a data in bus 34a, a data out bus 34b, control line outputs 34c, and control line inputs 34d. Driver 110 connects the bus 34a to inputs of the multiplexer 40 and ID module 106. Driver 112 connects the bus 34a to the output of multiplexer 114 which has an input connected to the end of 50 of FIFO 46. Driver 116 connects the bus 34b to the output of multiplexer 118 which has an input connected to the end 50 of FIFO 46. Drivers 120, 122 and 124 couple outputs 34c to outputs of sequencers 68 and are controlled by control 108. Receivers 126 and 128 couple inputs 34d to sequencers 68. Receiver 130 has its input connected to differential mode enable pin 132. 
     The FIFO buffer 46 is loaded at its top end 48 and unloaded at its bottom end 50. The FIFO 46 may contain up to sixteen bytes of information received from or for transfer to the SCSI bus 12. The FIFO 46 is deep enough so that the multi-byte command sequences defined by the standard SCSI protocol may be accommodated inside the FIFO 46 without requiring multiple interrupts or interventions by the microprocessor 22. This ability to avoid creating interrupts saves much time on the SCSI bus, and increases its utilization, by avoiding delays due to time consuming operations by the relatively low speed microprocessor 22. 
     The dual-ranked command register 100 is arranged so that the microprocessor 22 may stack commands in the SCSI processor 26. The top rank 102 may be loaded through the latch 38 under the supervision of control 72. Commands may be placed in both the top rank 102 and the bottom rank 104. After the command in the bottom rank 104 has been completed and reported, the command (if present) in the top rank 102 will automatically fall to the bottom rank 104 and execute. When no command is executing in the bottom rank 104, the command register 100 is empty and the bottom rank 104 contains the last command executed. Many commands executed from the command register 100 cause interrupts of the microprocessor 72 through the read/write control 72. When such an interrupt producing command is executed in the bottom rank 104, the processor 26 automatically causes the contents of the status register 62, interrupt status register 64, and sequence step counter 66 to be transferred to latches in those same registers. While the interrupt of processor 22 is pending, the command in the top rank 102 automatically drops into the bottom rank 104 and executes, and uses working (non-latched) portions of the registers 62, 64 and 66. Upon return from the interrupt, the microprocessor 22 may use the latched contents of the registers 62, 64 and 66 for further directing the operation of the SCSI processor 26. The operational speed of the processor 26, and the utilization of the SCSI bus 12, is improved by the use of the double-ranked command buffer 100 which allows the processor 26 to execute the next instruction from the top rank 102 while the microprocessor 22 is responding to an interrupt produced by the command immediately previously executed from the bottom rank 104. This use of command register 100 with dual ranks allows the SCSI processor 26 and microprocessor 22 to operate simultaneously, with the microprocessor 22 responding to interrupts from the SCSI processor 26. 
     The differential mode enable pin 132 alters the data paths through the multiplexers 114 and 118. When the pin 132 is grounded, the bus 34a is used for input signals from the SCSI bus 12 and bus 34b is used for output signals to the SCSI bus 12. The buses 34a and 34b may be connected together to make a bi-directional single-ended connection to the SCSI bus 12. Alternatively, the buses 34a and 34b may be connected to external driver and receiver circuits inside the connector 28 which are connected together to make a bi-directional single-ended connection to the SCSI bus 12. 
     If the pin 132 is connected to a high electrical level (above ground), the multiplexers 114 and 118 are controlled such that the bus 34a acts as a bi-directional single-ended bus for the data bit signals with inputs through receiver 110 and outputs through driver 112, and bus 34b acts as a set of control lines for controlling the operation of bi-directional differential transceivers in the connector 28. 
     Referring next to FIG. 3, simplified block diagrams are shown for a Initiator processor 26 and Target processor 26a, both of which are simplified from, and are identical in construction to the SCSI processor 26 of FIGS. 1 and 2. The terms &#34;Initiator&#34; and &#34;Target&#34; are standard terms in the SCSI protocol, and refer to operating modes for devices connected to the SCSI bus 12. The processors 26 and 26a are shown operating in a &#34;DATA IN&#34; mode, another standard SCSI protocol term, which refers to the condition when the Target processor 26a is sending bytes of data bit signals to the Initiator processor 26. The labeling of reference numbers with a letter a in FIGS. 3 and 4 indicates the particular SCSI processor 26 which is operating as a Target. 
     Referring next to FIG. 4, the same pair of SCSI processors, Initiator 26 and Target 26a, as in FIG. 3 are shown, but in a &#34;DATA-OUT&#34; mode in which bytes of data bit signals are being sent from the Initiator 26 to the Target 26a. 
     Referring next to FIG. 5a, waveforms for the DATA IN mode as presented in FIG. 3 are shown. The CLOCK waveform W1 is for the clock inside the SCSI processor 26a, and is preferably approximately 24 MHz. The BUS waveform W2 represents signals on the nine bit parallel bus lines of the SCSI bus 12, with the X-shaped markings indicating the times when signal level changes are occurring. The REQ waveform W3 represents the request SCSI protocol signal sent on the SCSI bus 12 by the Target processor 26a. The ACK waveform W4 represents the acknowledgement SCSI protocol signal sent on the SCSI bus 12 by the Initiator processor 26. The ATN waveform W5 represents the attention SCSI protocol signal sent on the SCSI bus 12 by the Initiator processor 26. 
     The transfer of signals during the DATA IN mode proceeds as follows. 
     The SCSI processor 26a which is configured as the Target places signals on the SCSI bus 12 at the time T1, as shown in point a on waveform W2. The point a shown on waveform W2 is used as the synchronization point for the SCSI processor 26a, and this point a is keyed by the processor 26a to start usage of the clock waveform W1 to control the internal operations of the processor 26a. The point a initiates the sequencing of commands through the processor 26a. Once synchronization with the point a has occurred, the processor 26a pulls down the REQ waveform W3 at a point b and time T2 as a signal to the Initiator SCSI processor 26 that the data bit signals in BUS waveform W2 are valid, stable and ready to be read from the SCSI bus 12. The Target processor 26a sets the time duration between times T1 and T2 to be at least the amount required by the SCSI protocol, which in the processor 26a is at least two cycles of the CLOCK waveform W1. 
     The Initiator processor 26 responds to the reception of point b on waveform W3 by reading data bit signals from the bus waveform W2 and by pulling down the ACK waveform W4 at point c ant time T3. Note that the production of the point c at time T3 is asynchronous, and results from the time when the Initiator processor 26 receives point b on waveform W3 and the time when the Initiator processor 26 is able to receive the data bit signals from the SCSI bus 12 as in waveform W2. 
     Next, the Target processor 26a pulls up the waveform W3 at the point d and time T4. When data bit signals are available for the Target processor 26a to transmit, it places the next sequential data bit signals on the parallel bus waveform W2 at the point e and time T5. The action at T5 is asynchronous, and results from the receipt of the point c on waveform W4 by the Target processor 26a and the availability of data bit signals to be transmitted. After the Initiator processor 26 reads the data bit signals from the SCSI bus 12, waveform W2, at time T3, the processor 26 begins checking the parity of the received data. The parity check circuit 52 requires a predetermined amount of time to perform its operation and produce a parity check indication output for each received byte of data from the SCSI input lines 34a. To avoid requiring another clock synchronization, Initiator processor 26 incorporates an internal delay circuit in the end 48 of FIFO 46, so that data signals are loaded into FIFO 46 after the parity check circuit 52 has completed its work. If Initiator processor 26 determines that the parity of the data bits received was not correct, as determined by parity check circuitry 52, the attention ATN waveform W5 is pulled down at point l, which indicates back to the Target processor 26a that a parity error was detected. After another internal time delay long enough to assure that ATN waveform W5 is stable after the point l, Initiator processor 26 pulls up the waveform W4 at the point f and time T6 provided that the Target processor 26a pulls up the REQ waveform W3 at T4 prior to T6. If the parity check circuit 52 determines that the parity of the data bit signals received by the Initiator processor 26 is correct, then no change in the ATN waveform W5 is made at point l. The Target processor 26a resynchronizes itself at the point e and time T5 so that all internal operations are keyed to start the usage of CLOCK waveform W1 at the time T5. The point e initiates the sequencing of commands through the processor 26a. Synchronization of the processor 26a at a single point (in this case, point e) during the transfer of a single asynchronous byte on the SCSI bus 12 insures that the time which would be required for more than one synchronization is saved, and the maximum utilization of the SCSI bus 12 is achieved. 
     The Target processor 26a will pull down the REQ waveform W3 at the point g and time T7 provided that the Initiator processor pulls up the ACK waveform W4 at the point f and time T6 prior to time T7. The production of the point f at time T7 is asynchronous, and results from the time when the Initiator processor 26 receives point d on waveform W3. The points b, c, d and f on waveforms W3 and W4 complete the asynchronous handshake between the Target processor 26 and Initiator processor 26a. 
     Referring next to FIG. 5b, the timing relations for the DATA-OUT mode are shown for the Initiator processor 26 and Target processor 26a, with the analogous timing and waveform points labeled similarly to those in FIG. 5a but with a prime superscript to distinguish them from the DATA IN situation shown in FIG. 5a. 
     Referring next to FIGS. 6 and 7, bus initiated sequences are shown for the internal operations of the SCSI processor 26 under the control of sequencers 68 due to the presence of signals, such as REQ, BSY, ACK, ATN, SEL, MSG, CD, or IO, on control line inputs 34d. The labeling of the sequencer states in FIGS. 6 through 15 is in accordance with the structure of SCSI processor 26, as previously described, and the standard SCSI protocol. 
     FIG. 8 shows command sequences; FIGS. 9, 10 and 11 show disconnected state commands; FIG. 12 shows the bus arbitration operation; FIG. 13 shows the bus selection and reselection operations; FIG. 14 shows Target mode commands; and FIG. 15 shows Initiator mode commands.