Abstract:
Diagnostic apparatus and method are disclosed for testing a Small Computer System Interface (SCSI), by passively monitoring the interface between initiator and target devices or systems, upon sensing a user-selected phase of operation at the interface, disconnecting the initiator and target devices from one another, forcing a user-selected fault for the appropriate time, and reverting to a passive monitor. A pair of analog switches are provided for each line of the interface. The switches selectively connect the initiator system and the target system to each other or to a set of line drivers for providing high or low SCSI signals. A set of sense lines are connected to the initiator and the target for monitoring so as to sense the phase of operation of the initiator and target and to sense the response of the interface to the forced fault.

Description:
TECHNICAL FIELD 
     This invention relates to a Small Computer System Interface (SCSI) and, more particularly, the invention relates to a diagnostic subsystem and method for testing a target system at the Interface. 
     BACKGROUND OF THE INVENTION 
     The Small Computer System Interface (SCSI) comprises a generic interface architecture with a standard signaling protocol. The interface operates as a low cost network for supporting devices such as hard disk drives, diskette drives, optical disk drives, CD ROM drives, tape drives, printers, etc., and connecting the devices to a host computer or network. 
     Demands on such host computers and networks has required that data integrity and availability be of utmost importance. As the result, data storage devices, such as those mentioned above, have become far more reliable and fault tolerant, and data storage subsystems have been developed that are available continuously without interruption, such as RAID. In order to enhance the capabilities of such data storage devices without using host resources, many data storage devices have the capability of communicating directly with each other, called &#34;peer-to-peer&#34; operations, for example, to directly back up a hard drive to tape, without transmitting the data through the host. The interfaces linking the various components of a subsystem are now typically its most failure prone aspect. 
     The SCSI is an important example of the open systems environment which is replacing the proprietary systems environment, in which an interface is specifically designed to provide efficient and reliable communication between a specific host and a specific device or device family, usually of a single manufacturer. In the open systems environment represented by the SCSI standard, the resultant interface is a compromise among many different requirements and is even more failure prone. 
     In the past, SCSI fault testing was accomplished by replacing either the initiator or target with an emulator, which not only created the desired fault, but also acted as one end of the initiator-target pair. The initiator or the target could thus be tested, but not the system as a whole. 
     One approach to testing a network controller for a SCSI subsystem is illustrated in U.S. Pat. No. 5,033,049, assigned to the same assignee as the present invention. It provides &#34;on-board&#34; diagnostic hardware intended for manufacturing test and power on self test. It will not function in an operating subsystem environment as the hardware is contained in the initiator. 
     Another approach is represented by U.S. Pat. No. 5,257,393, J. R. Miller, assigned to JRM Consultants, Inc. It refers to a network of SCSI devices linked together via a serial interface with error simulation capability through use of a diagnostic latch with open cable drivers. The test device replaces the initiator for the purpose of testing the target device. 
     With the advent of RAID subsystems and peer-to-peer operations, it is not practical to simulate component malfunctions with an emulator replacing an initiator or target as part of the subsystem. 
     What is needed is the ability to provide SCSI fault simulation within a complete system or subsystem. 
     SUMMARY OF THE INVENTION 
     Disclosed are diagnostic apparatus and method for passively monitoring the SCSI interface, upon sensing a user-selected phase of operation at the interface, disconnecting the initiator and target devices from one another, forcing a user-selected fault for the appropriate time, and reverting to a passive monitor. A pair of analog switches are provided for each line of the interface. The switches selectively connect the initiator system and the target system to each other or to a set of line drivers for providing high or low SCSI signals. A set of sense lines are connected to the initiator and the target for monitoring so as to sense the phase of operation of the initiator and target and to sense the response of the interface to the forced fault. 
     Other than conducting fault simulation, the diagnostic apparatus and method do not alter the behavior of the subsystem. 
     For a fuller understanding of the present invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a diagrammatic representation of a SCSI network system and of the diagnostic subsystem of the present invention; 
     FIG. 2 is a block diagram of the network and subsystem of FIG. 1; 
     FIG. 3 is a block diagram of one set of switches and line drivers of the diagnostic subsystem of FIGS. 1 and 2; 
     FIG. 4 is a flow chart depicting the method of the present invention; 
     FIG. 5 is an illustration of the data flow of the diagnostic subsystem of FIGS. 1 and 2; and 
     FIG. 6 is a block and diagrammatic representation of an alternative embodiment of a SCSI network system and of the diagnostic subsystem of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     Referring to FIGS. 1 and 2, a Small Computer System Interface (SCSI) is shown, connecting at least an initiator device or subsystem 10 and a target device or subsystem 11. A SCSI interface comprises a generic interface architecture with a standard signaling protocol. The interface operates as a low cost network for supporting devices such as hard disk drives, diskette drives, optical disk drives, CD ROM drives, tape drives, printers, etc., and connecting the devices to a host computer or network. In FIGS. 1 and 2, the initiator 10 and the target 11 may each comprise any of the listed devices or hosts, or any other suitable device or subsystem connectable over a SCSI interface. 
     As discussed above, data integrity and availability have become of utmost importance. As the result, devices and subsystems attached by means of SCSI interfaces, particularly data storage devices and data storage subsystems, are required to be available continuously without interruption. In addition, many data storage devices have the capability of communicating directly with each other, called &#34;peer-to-peer&#34; operations, for example, to directly back up a hard drive to tape, without transmitting the data through the host. The interfaces linking the various components of a subsystem are now typically its most failure prone aspect. 
     The SCSI interface is an important example of the open systems environment which is replacing the proprietary systems environment, but the resultant interface is a compromise among many different requirements and is even more failure prone. 
     In the past, SCSI fault testing was accomplished by replacing either the initiator or target with an emulator, which not only created the desired fault, but also acted as one end of the initiator-target pair. The initiator or the target could thus be tested, but not the system as a whole. 
     Still referring to FIGS. 1 and 2, a SCSI error forcer or fault simulator 15 and controller 16 are shown which have the ability to provide SCSI fault simulation within a complete system or subsystem. The controller 16 may comprise a suitably programmed small computer, such as a PC, where a user may enter desired testing parameters, as will be explained. 
     Referring to FIG. 2, one preferred embodiment of the invention employs single ended connections. The SCSI interface employs differential connections, requiring SCSI differential to single ended converters 18 and 19 for interconnection therebetween. 
     FIG. 3 is a block diagram of the circuitry for forcing one bit of the diagnostic subsystem of FIGS. 1 and 2 onto the SCSI interface. For example, the circuitry of FIG. 3 may be repeated 26 times to provide the 27 bit capability of a SCSI-II interface. 
     The circuitry for each bit includes analog switches 20 and 21, connected to each other by line 25. Analog switch 20 is connected to one SCSI connector by line 30, and analog switch 21 is connected to the other SCSI connector by line 31. The SCSI connectors are not shown and are standard connectors for connection to cables 40 and 41, respectively, in FIG. 1. Alternatively, lines 30 and 31, may be connected to, respectively, SCSI differential to single ended converters 18 and 19, in FIG. 2. 
     Analog switches 20 and 21 normally connect line 30 to line 31 through line 25, allowing the initiator 10 and target 11 to operate normally over the SCSI interface. Lines 50 and 51 connect the respective lines 30 and 31 from the initiator and the target to sensors or comparing circuitry. The sensors or comparing circuitry are not shown, and are typical as used in the art. An exemplary device incorporating such circuitry will be described with respect to FIG. 6, hereinafter. 
     Still referring to FIG. 3, switches 20 and 21 are also connected to line drivers 60 and 61, respectively. Line drivers 60 and 61 are conventional and may be those used in SCSI interfaces for supplying high or low SCSI signals, or may be of a type suitable for supplying a full range of signal levels. The line drivers are both connected to line 65, which supplies the appropriate signal to cause both line drivers to supply the described high or low SCSI signal, or other signal levels. 
     Analog switches are operated by activation signals on line 66 to switch from the normal connection at line 25 to connect instead to line drivers 60 and 61, respectively. When so switched, the SCSI initiator and target are no longer connected to each other through line 25, but rather are connected to line drivers 60 and 61, respectively. 
     As an alternative, line drivers 60 and 61 may be provided with separate lines 65 for receiving appropriate signals causing the line drivers to provide the same or different high or low SCSI signals thereby. 
     The operation of the subsystem of FIGS. 1 and 2, and of the circuitry of FIG. 3, are described with reference to FIGS. 4 and 5. FIG. 4 is a flow chart depicting the method of the present invention, and FIG. 5 is an illustration of the data flow of the present invention. 
     The first decision block in FIG. 4, &#34;PHASE=P?&#34;, is whether the phase of operation of the SCSI interface, or the pattern of bits at the interface, match that supplied by the user at controller 16. The bits appearing on each of the lines 50 and 51 for all of the circuits representing the full 27 bits of the interface are compared to the pattern of bits designated by the user. If no match occurs, the comparison continues at the next clock cycle. 
     If the comparison indicates a match, the &#34;YES&#34; branch of the decision block leads to the next decision block. The next decision block &#34;REQ?&#34; is whether a &#34;request&#34; signal has been provided at the interface by the initiator or the target systems on the sense lines. If &#34;NO&#34; the comparison again continues at the next clock cycle. 
     The user may supply a number indicating that the &#34;request&#34; signal must occur a designated number of times. Thus, when the &#34;YES&#34; branch is taken, the next step is to increment a counter by 1 to indicate that a requested signal has been generated. 
     The resultant count is then compared in the next decision block &#34;COUNTER=n?&#34; to the designated number of requests. If the counter is less than the designated number of requests, the &#34;NO&#34; branch leads back to the start. If the counter is equal to or exceeds the designated number of requests, the &#34;YES&#34; branch is taken. 
     The &#34;YES&#34; branch from the &#34;COUNTER =n?&#34; indicates that an error is to be forced to simulate a fault. 
     Two major types of error forcing is provided. One type is a timed error, called &#34;TYPE 0&#34;, and the other is a phase error, called &#34;TYPE 1&#34;. The timed error is to be maintained for a predetermined time. A phase error is to be maintained until a predetermined state of operation of the interface is reached, as will be explained hereinafter. 
     The first decision block reached is &#34;TYPE=0?&#34;. If the user has designated that the forced error is a timed error, the &#34;YES&#34; branch is taken, leading to the &#34;Assert Trigger&#34; step. 
     The &#34;Assert Trigger&#34; step is best explained with reference to FIG. 5. The 27 lines of the SCSI interface are designated by a conventional combination of mask and bus bits. An example is illustrated in the &#39;049 patent. 
     Here, each bus comprises 9 bits as shown by the &#34;mask bits (0-8)&#34; register 75. The three busses are designated by the &#34;bus # (0-2)&#34; register 76. 
     The &#34;Assert Trigger&#34; step in FIG. 4 causes an error enable (trigger) signal to be supplied on line 77 to logical AND gates 80. Registers 75 and 76 then sequence through the three busses of the SCSI interface, providing masking signals to selected ones of the AND circuits. Upon register 76 and the error enable signal gating the AND circuits 80 for bit lines 0-8, register 75 supplies trigger signals to selected ones of the nine bit lines. 
     Each of the nine bit lines corresponds to the force activate line 66 in FIG. 3 for that bit of the interface. 
     Referring again to FIG. 5, a value register 85 is provided for each of the nine bits of the interface. Each bit of the register corresponds to an AND circuit 80 and is preset by the user to provide a &#34;one&#34; or &#34;zero&#34; signal to force value line 65 in FIG. 3. The value signal operates line drivers 60 and 61 to provide the designated &#34;one&#34; or &#34;zero&#34; signal through, respectively, switches 20 and 21 to the respective SCSI devices or systems. 
     The process continues for each of the other two busses. Alternatively, registers 75 and 76 and register 85 may each comprise 3 nine-bit registers, each bit corresponding to one of the force bit circuits of FIG. 3. 
     Referring again to FIG. 4, in the TYPE 0 (timed error) sequence, after the trigger is asserted, a timer is compared to a time &#34;t&#34; preselected by the user. The &#34;NO&#34; branch is a loop which continues until the timeout, when the timer is equal to or greater than &#34;t&#34;. The trigger is then unasserted (turned off) and the counter is reset to 0. 
     The &#34;NO&#34; branch from the &#34;TYPE =0&#34; block indicates that one of three &#34;phase&#34; errors are to be forced. 
     The first type of phase error is to insert the error only so long as the interface remains in the current phase of operation with the same pattern of bits. Decision block &#34;TYPE=1?&#34; detects whether the user has designated this phase error. If so, the &#34;YES&#34; branch is taken and the trigger asserted until the next decision block indicates the phase of operation has changed. Then, as with the timed error, the trigger is unasserted and counter reset to 0. 
     If the phase error is not a type 1, the error will be maintained until either a predetermined number of request signals or a predetermined number of acknowledgement signals have been received from the initiator or the target. Thus, the first steps are to set the counter to 0 and to assert the trigger. 
     The phase error is only to be continued if the interface remains in the same phase of operation, as determined at decision block &#34;PHASE=P&#34;. If not, the trigger is again unasserted and the counter reset to 0. If so, the next decision is whether the designated phase error is to be terminated after a preselected number of request signals or a preselected number of acknowledgement signals. The decision block &#34;TYPE=2&#34; responds to the user designation, type 2 being the request signal, and type 3, or the &#34;NO&#34; branch, being the acknowledgement signal. 
     The &#34;REQ?&#34; and &#34;ACK?&#34; decision blocks loop until the respective signal is received and the counter incremented. Until last decision block indicates that the preselected number has been reached, the &#34;NO&#34; branch loops back to again check the phase and whether the respective signal has been received. When the counter reaches the preselected number, the trigger is unasserted and the counter reset to 0. 
     An alternative preferred embodiment of the invention is illustrated in FIG. 6. A commercially available logical analyzer 90, such as the Tektronix DAS 9200, is connected to the sense lines 50 and 51 in FIG. 3 through the logical analyzer probe 91. The compare circuitry of the logic analyzer is preset in accordance with the steps of FIG. 4 to sense the pattern of bits appearing on the sense lines of the interface and provide the assert trigger signals. The commercially available logical analyzers comprise at least one microprocessor and normally provide the trigger signals at an output port to activate an external measurement module, such as an oscilloscope. On the Tektronix DAS 9200, the output port is the &#34;Port-Out&#34; BNC. 
     SCSI error injector 95 thus comprises the circuitry of FIG. 3 for connection to the SCSI initiator 10 and the target 11 under test. 
     While the method of the present invention has been described with respect to the SCSI interface only, the inventors contemplate that the present invention may be equally well employed with other interfaces having multiple lines and high and low signals for each line. 
     While the preferred embodiments of the present invention have been illustrated in detail, it should be apparent that modifications and adaptations to those embodiments may occur to one skilled in the art without departing from the scope of the present invention as set forth in the following claims.