Patent Publication Number: US-3972030-A

Title: Peripheral control capable of dynamically executing command sequences

Description:
DOCUMENTS INCORPORATED BY REFERENCE 
     1. Copending patent application of Myrl Kennedy Bailey, Jr. and George J. Barlow titled &#34;Retry Method and Apparatus for Use In A Magnetic Recording and Reproducing System&#34; bearing Ser. No. 536,281 filed on Dec. 24, 1974 and assigned to the same assignee as named herein. 
     2. Copending patent application of Myrl Kennedy Bailey, Jr. titled &#34;Improved Microprocessing Method and Apparatus&#34; bearing Ser. No. 536,126 filed on Dec. 24, 1974 and assigned to the same assignee as named herein. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to peripheral controllers and more specifically to microprogrammed peripheral controllers. 
     2. Prior Art 
     In carrying out certain types of input/output operations, it becomes necessary for a peripheral controller of a subsystem to execute a series of commands in order to complete the particular operation. For example, during system initialization, a peripheral controller can be selected as a &#34;bootload device&#34;. When selected, the peripheral controller is required to execute those operations for reading in resident programs and data into the main store of a data processing system. In addition to this, the peripheral controller may be required to execute a series of commands as part of diagnostic or test operations. 
     In general, systems have included special routines in either the data processing system or in the peripheral subsystem for generating the commands necessary for carrying out operations involving execution of a series of commands. When these routines are required to be included in the peripheral controller, this results in considerable increase in the control storage, requirements of the controller. In addition to increasing control storage requirements, these arrangements can be inefficient particularly when either a number of large routines required is high or when the routines involved include a considerable number of instructions. 
     According, it is a primary object of the present invention to provide a method and apparatus for enabling a peripheral subsystem to execute a series of operations efficiently. 
     It is a further object of the present invention to provide an apparatus for enabling a microprogrammed controller to execute a sequence of commands with minimum increase in its control storage requirements. 
     SUMMARY OF THE INVENTION 
     The above objects of the present invention are achieved in a preferred embodiment which includes a peripheral controller coupled to control the operation of a selected one of a plurality of magnetic storage devices. The controller includes a read only memory which stores a plurality of microprograms required for executing commands received from a data processing system involving a selected one of the plurality of devices. The peripheral controller also includes storage for indicating the status of the device in addition to the status results of operation performed by the controller. Storage is also included for indicating the particular phase of an operation being executed by the controller. In the preferred embodiment, an operation phase code consisting of a plurality of bits is initially stored in response to a command and modified by the controller during the execution of a sequence of microprograms normally used to execute commands received from the data processing system. When the operation phase code reaches a predetermined value, the controller is signalled that it can terminate the operation. 
     By employing such a code, the controller is able to share all of the microprograms normally required thereby reducing to a minimum the storage requirements of the controller. Only those microinstructions required for initializing, modifying and testing the operation phase code are required to be included in the control store. 
     These and the other objects, advantages and features of the present invention will become readily apparent from the following description when considered in connection with the drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows in block diagram from a peripheral subsystem which employs the principles of the present invention. 
     FIG. 2 is a flow chart showing a first type of operation used in illustrating the operation of the system of FIG. 1. 
     FIG. 3 is a flow chart showing a second type of operation used in illustrating the operation of the system of FIG. 1. 
     FIG. 4 is a flow chart showing a portion of one of the routines employed by the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 shows a peripheral processor or peripheral controller 100 which couples to a central processing unit of a data processing system via an input/output processor (IOC) 200. The peripheral controller 100 in response to commands received from the IOC 200 processes data characters received from any one of a number of magnetic tape devices/drives 204-1 through 204-8 via a selector circuit 108. The information characters or frames read from a selected magnetic tape device is processed by a data recovery unit 105. Information to be written on the magnetic tape device is transferred via the ALU 104-2 to a write buffer 109 and thereafter applied to the selected drive via selector circuit 108. 
     Commands and data are transferred between the IOC 200 and the peripheral controller 100 via a peripheral subsystem interface (PSI) 202. Such transfers are made in response to control signals generated by circuits included within the IOC 200 and the PSI control 102. For the purpose of the present invention, the circuits can be considered conventional in design. For example, the circuits may take the form of the circuits described in a copending patent application titled &#34;Microprogrammable Peripheral Processing System&#34; invented by John A. Recks, et al. bearing Ser. No. 425,760 which was filed Dec. 18, 1973, now U.S. Pat. No. 3,909,799 and is assigned to the same assignee as named herein. 
     The PSI 202 includes an OPERATIONAL IN (OPI) line which is normally set to a binary ONE state whenever the peripheral controller is powered up and operational. The state of the OPI line signals the IOC 200 that the controller 100 is capable of accepting commands. 
     Similar to the PSI, commands and data are transferred between the tape devices and peripheral controller 100 via a device level interface (DLI). The tape devices can be considered conventional in design and include circuits to perform read and write operations. 
     As seen from FIG. 1, the controller 100 includes a microprogram processing unit 104 which under the control of microinstructions stored a programmable read only memory 104-1 performs the necessary operations for transferring information between a selected magnetic tape drive and the IOC 200. For example, in response to command code bytes received from the IOC 200, applied via the PSI control 102, PSI register 103 and an arithmetic and logic unit (ALU) 104-2, microinstructions are read out into a memory register 104-5 and decoded by decoder circuits 104-6 and 104-7. The decoder circuits cause a generation of various control signals which condition certain other portions of the controller 100 to perform operations necessary for executing the type of command specified. 
     Additionally, as seen from FIG. 1, signals from the memory register 104-5 are also applied to multiplexer circuits 104-10, conventional in design, which additionally receive control and status signals from other portions of the system such as the data recovery unit 105 and device for testing the results or progress of the particular operation as explained herein. Actual testing is accomplished by the branch logic circuits 104-12 which for the purpose of the present invention can be considered conventional in design. Also, signals representative of addresses contained within various types of microinstructions are applied from register 104-5 to a register 104-14 and an index counter 104-16. The register 104-14 is an index register which is loaded via register 104-5 in response to a subcommand signal RDLIR10 or via the ALU 104-2 in response to subcommand signal RDT410. The register 104-14 couples to an index counter 104-16 and is used to provide the required timing strobe signals necessary for writing or reading information characters to and from the write buffer 109 and the data recovery unit 105 respectively. The index counter 104-16 is decremented in response to PDA clocking signals generated by multi frequency system clock circuits 104-20. For the purpose of the present invention, these circuits can be considered conventional in design. 
     The register 104-17 is used as a history address register which allows proper sequencing through microinstructions stored in memory 104-1. For example, the history register 104-17 is operative to store a return branch address from the memory local register 104-5 until such time that the address is to be transferred to the read only memory address register 104-4. This address when transferred causes the register 104-4 to condition the memory 104-1 to select again a previous location within the memory allowing the continuance of a particular operation as explained herein. 
     As seen from FIG. 1, the ALU 104-2 receives and delivers signals to the registers shown. The signals which are to be applied as operand inputs to the ALU 104-2 are selected via multiplexer circuits included therein. The ALU 104-2 and multiplexer circuits can be considered conventional in design and may for example take the form of circuits disclosed in a text titled &#34;The Integrated Circuits Catalog for Design Engineers&#34;, published by Texas Instrument, Inc., dated 1972. 
     The ALU 104-2 is connected to provide output signals to a plurality of functional path registers 104-22 which are used for control purposes such as for providing control signals to the data recovery unit 105 and storing hardware error conditions as explained herein. Each bit in each of the individual registers is used to indicate or to initiate a specific event or operation. The contents of these registers are examined by the microprogram processing unit via branch circuits in order to ascertain the state of the controller during an operation as well as being used for internal timing and for enabling the execution of commands. 
     Additionally, the ALU 104-2 is also connected to transmit and receive signals to and from a plurality of general registers 104-8 (i.e. registers GR0 through GR2) which are used for storage of certain record processing information. More specifically, register GR0 is used to control the transfer of input and output data signal to and from a scratch pad memory 107. Hence, it serves as a memory local register for scratch pad memory 107. Register GR1 serves as an input buffer register for the scratch pad memory 107. Also, register GR2, similar to register GR0, provides a temporary storage of information to be stored in the scratch pad memory 107. 
     The scratch pad memory 107 provides temporary storage for data, various control information and parameters required for executing read and write operations. As seen from FIG. 1 and mentioned above, both address and data are transmitted to and from the scratch pad memory 107 via the ALU 104-2 and general registers. The scratch pad memory 107 is of solid state construction and has 512 storage locations each containing 10 bit positions. The first 32 storage locations serve as a data buffer when the controller 100 is operating in a data mode (i.e. transferring or receiving data characters of a block). When in this mode, addressing of the scratch pad memory 107 takes place via a pair of address counter, write and read counters not shown. The contents of the read address counter are used to read out information from the locations on the scratch pad memory while the contents of the write address counter are used to write information into the scratch pad memory. For the purposes of the present invention, the operation of these counters for addressing the scratch pad memory 107 can be considered conventional in design. 
     The remaining storage locations of the scratch pad memory 107 are used for storage of device constants, control parameters for control of the controller and associated tape drives. More specifically, storage locations 020-03F hexidecimal are reserved, storage locations OEO-1FF serve as a device control block and are used to store control parameters in the form of device control block bytes including a retry count received from the data processing system, storage locations 080-OAF serve as a program block, storage locations OBO-OCF serve as register storage including temporary storage locations TS1, TS2, TS3 etc., and storage locations 06B-07F are used to store device constants (e.g. device 25 foot timer). 
     Additionally, the scratch pad memory can be addressed by a scratch pad address register which receives information from the ALU 104-2 and the register is used when either control constants and parameters are to be sent to portions of the controller 100 or used for updating certain status information previously stored in scratch pad memory 107. 
     DESCRIPTION OF OPERATION 
     As part of a system initialization procedure, the controller 100 is required to perform a boot load operation specified by a predetermined type of data transfer command (i.e. CCE). In carrying out the boot load operation, the controller is required to position the &#34;loader&#34; tape at the beginning of tape (BOT), space over the first tape mark and read the block folllowing the tape mark into the main store of the data processing system, not shown, via PSI bus 200. 
     In accordance with the present invention, the controller 100 performs the operations indicated in the flow chart of FIG. 2. Before describing the operations, first the significance of various control bytes storage locations pertinent to processing commands in accordance with the present invention will be described. 
     As mentioned previously, certain ones of the storage locations of scratch pad memory 107 store status information which is referenced by the controller during the execution of commands. A first plurality of locations corresponds to the device status byte locations (e.g. 049-060 hexidecimal) which store information indicative of the status of the selected device. For example, the state of bit positions 6 and 4 of byte DSSB0 in location 049 indicates whether the device is in a standby state and at the beginning of tape (BOT) position respectively. The state of bit positions 0 and 1 of byte DSSB1 in location 04A indicate whether the device is loaded (i.e. tape reel has been placed on tape device) and whether the last command executed was a write command respectively. 
     A second plurality of scratch pad memory locations (e.g. 040-048) store detailed status bytes (e.g. DSB8 etc.). The three high order bit positions (i.e. bits  0, 1, 2) of the detailed status byte DSB8 store the operation phase code bits utilized in accordance with the present invention. As explained herein, these bits are modified by the controller 100 durings its execution of command routines and used to signal the controller when it has completed a particular operation. 
     Referring to FIG. 2, it is seen that the boot load routine controls selection of a plurality of routines which are as follows: 
     1. EULD = unload device if in standby and loaded; 
     2. ELOD = load device if in standby and not loaded; 
     3. EXWM:FJE -- forward jog erase if last command = write; 
     4. ERWD = rewind if not at BOT; 
     5. exrm:bl1 = space to tape mark; and, 
     6. EXRM:BL2 = read block. 
     As explained herein, the operation phase code for the various operations performed by different ones of these routines are as follows: 
     1. 110 = unload; 
     2. 110 = load; 
     3. 100 = rewind; 
     4. 010 = space to tape mark; and 
     5. 000 = read. 
     The controller 100 unpon receipt of a command code byte from IOC 200 executes a command decode routine MCMD of FIG. 4 in which it references a command decode table in read only memory using the command code. This causes the read only store to branch to the bootload routine EBLI of FIG. 2 when the command code has a value of hexidecimal 04. The controller 100 executes microinstructions 03-04B which test status bytes DSSB0 and DSSB1 for ascertaining the state of the tape device selected. Based upon the state of the device, the controller executes a microinstruction 04C which loads the history register with starting location in the load routine ELOD when the device is in the standby state but not loaded. As seen from FIG. 2, the controller 100 executes microinstruction 07 which causes an operation phase code of 110 to be loaded into general register GR2 and then branches to a sequence of microinstructions 11-14 for loading the new op phase code into the high order three bit positions of DSB8. 
     Following the writing of DSB8 into scratch pad memory 107, the controller executes a branch microinstruction 15 which causes the previously loaded contents of the history register to be loaded into ROM address register for execution of the selected one of the routines EULD or ELOD. 
     Assuming that routine EULD of FIG. 3 is selected, the controller 100 executes a sequence of microinstructions which test status byte DSSB1 to ascertain that the last command was not a write command in which case the routine proceeds in a conventional fashion (i.e. without reference to the operation phase code). 
     Assuming that it was a write command, the routine then checks the operation phase code to ascertain which routine or phase the controller 100 is to perform next (i.e. checks to establish what operations it has already performed). Specifically, when bit position 0 of the operation phase code is a binary ZERO, this indicates that the controller 100 has to perform a forward jog erase operation in which it executes routine EXWM:FJE. When bit position 0 of the operation phase code is a binary ONE indicating that routine EXWM:FJE had been performed, the routine EULD tests the state of bit position 1. If bit position 1 is in a binary ZERO, the routine sets the phase bits to binary ZEROS indicating that the next phase to be performed is a final phase. When bit position 1 is a binary ONE indicating that the controller 100 is performing an unload operation as part of a bootload operation, the operation phase code is not modified. The routine EULD then causes the read only memory to branch to a common rewind, load, unload command routine which causes the appropriate command to be transferred to the device followed by a branch to the command termination routine MCMT of FIG. 4. As explained herein, this routine examines the operation phase code bits to ascertain whether the controller 100 has completed the operation. 
     Referring again to FIG. 2, it is seen that when the device is not in a standby state, the controller 100 executes microinstruction 08 which tests the state of bit 4 of status byte DSSB0 to ascertain whether the device is at BOT. When the device is not at BOT, the controller 100 executes microinstructions 08A-08E which test bit positions 0 and 1 of the operation phase code in addition to the last command. As seen from FIG. 2, when the operation phase code is 00, the routine tests bit 1 of byte DSSB1 to ascertain whether the last command was a write command. If it was not, the controller 100 loads the starting location of rewind routine ERWD into history register 104-17 and sets the operation phase code bits to 110. If it was a write command, the controller 100 branches to routine EXWM:FJE of FIG. 3. This form part of the executive write routine EXWM. The routine also includes at least one microinstruction which inserts a new operation phase code into scratch pad memory 107. This corresponds to a code of 10X which signals the controller 100 that the operation is not completed following execution of the write as explained herein. When the operation phase code has a value X1, the controller 100 branches to microinstructions 17-19 as discussed herein. 
     When the controller 100 is at the beginning of tape BOT position, it branches to microinstructions 17-19 for testing the operation phase code bits to ascertain which of the two read routines EXRM:BL2 or EXRM:B1 are are to be selected for execution. When bits 0 and 1 of the operation phase code have a value 01, the controller 100 loads the starting location of routine EXRM:BL2 into history register 104-17 and sets the operation phase code bits to ZEROS. When the bits 0 and 1 have a value 1X or 00, the controller 100 loads the starting location of routine EXRM:BL1 into history register 104-17 and sets the operation phase code bits to 01. Thereafter, the controller executes microinstructions 12-16 which load the operation phase code bits into scratch pad memory 107 and then branch the read only memory to the selected routine. 
     As indicated by the designations, both routines EXRM:BL1 and EXRM:BL2 form part of a single read executive or main routine EXRM. The routine EXRM includes microinstructions which test the state of the operation phase code bits. However, these microinstructions will only be executed when the controller 100 is performing a read or space operation directed by routine EXRM. Since the bootload routine EBLI is directing the operation of controller 100, the routine EXRM does not normally test and modify the phase operation code bits (i.e. tested and modified during retry operations). 
     The routine EXRM in addition to other ones of the routines mentioned above upon being completed cause the read only memory to enter command termination routine MCMT illustrated to FIG. 4. As shown, this routine ascertains whether the controller 100 has completed the operation. Additionally, this routine includes a sequence of microinstructions for initiating a retry of commands when indicated, with provision for modifying the operation phase code bits preventing the controller 100 from terminating its operation. For further details regarding the manner in which the controller 100 performs a retry operation, reference may be made to the aforementioned copending patent application of Myrl Kennedy Bailey, Jr. and George J. Barlow. 
     When no retry is required, the routine MCMT executes microinstructions for testing the two high order operation phase code bits. When the bits are ZERO, the controller 100 terminates operation in a conventional manner (i.e. low order bit used to identify retry operation from other types of operations). When the two operation phase code bits are not ZERO, the controller 100 returns to the command decode routine which decodes again the same command byte. 
     From the foregoing, it is seen that through the use of an operation phase code, the controller 100 is able to execute a series of operations required to complete a given operation. It is able to accomplish this with introduction of a small number of microinstructions to the routines normally stored in read only memory used to execute commands. Further, this arrangement enables the controller to start a multiphase operation or a series of operations when in any given state since the operation phase code bits signal the controller automatically of its status. Also, certain bits may be used to identify special types of operations, e.g. retry operation. 
     For the purpose of simplification, the operation of the present invention has been illustrated through flow charts which disclose the sequences of microinstructions and the various operations performed by such microinstructions. The exact coding pattern for individual microinstructions were not disclosed since the engineer is free to select alternate forms of coding. For further details and insight into techniques for deriving such coding and to provide additional background information concerning the system and component features, reference may be made to the documents mentioned in addition to the following texts: Computer Organization and Microprogramming by Yoahan Chu published by Prentice-Hall Inc., copyrighted 1972; Microprogramming Principles and Practice of Samir S. Husson published by Prentice-Hall Inc., copyrighted 1970; and Digital Systems: Hardware Organization and Design by Frederick J. Hill and Gerald R. Peterson published by John Wiley &amp; Sons, Inc., copyrighted 1973. 
     It will be appreciated to those skilled in the art that many changes may be made to the present invention. For example, while the invention has been described with respect to several specific types of operations, it should be clear that the invention is applicable to other types of operations. Also, the invention has applicability to other types of peripheral controllers or units. 
     While in accordance with the provisions and statutes there has been illustrated and described the best form of the invention known, certain changes may be made to the system described without departing from the spirit of the invention as set forth in the appended claims and that in some cases, certain features of the invention may be used to advantage without a corresponding use of other features.