Abstract:
A method and apparatus for effecting a transfer of data between different areas of a memory. Memory reading circuitry and memory writing circuitry are both connected to loopback switching apparatus. The loopback switching apparatus is controllably operable to interconnect the read circuitry with the write circuitry. This permits the data read out of a first memory area to be extended to the write circuitry for entry into a second memory area.

Description:
FIELD OF THE INVENTION 
     This invention relates to a method and apparatus for effecting a transfer of data between different locations of a cache memory. This invention more particularly relates to method and apparatus for effecting an intra-cache transfer over a path that is devoid of buffers or external storage means such as an auxiliary memory. 
     BACKGROUND OF THE INVENTION 
     Cache memories are not designed to perform intra-cache data transfers because this mode of operation is not needed during normal operation. However, there are situations, such as during diagnostic activity or when data errors are detected, in which an intra-cache transfer is desirable. At the present time, moving data between different portions of a cache memory may require transferring the data from a first cache memory location to an auxiliary data storage device, and then transferring the data back to a second location in the cache memory. Another alternative is the transferring of data a few bits at a time through a cache control processor between a first and second cache memory location. Both of these alternatives are undesirable. The first alternative is often not available since a given cache system may not have an auxiliary memory. The alternative of transferring a few bits at a time through a control processor is inefficient and undesirable since it may degrade the real time capability of the processor. 
     It can therefore be seen that no efficient method currently exists for effecting an intra-cache data transfer. 
     SUMMARY OF THE INVENTION 
     The present invention solves the above discussed problem and achieves an advance in the art by providing a method and apparatus for transferring data between different portions of a cache memory at high data rates without the use of auxiliary facilities such as a peripheral memory or data processing operations by the cache processor. 
     The cache memory is connected between the host system and the peripheral devices with which the host system has occasion to exchange data. In accordance with the invention, the cache memory has a plurality of ports each of which has a read and a write interface. Each port is connectable with any peripheral device by means of data buses and loopback circuitry and a switching network intermediate the port and the peripheral device. The cache memory is connected by a plurality of high speed data channels to a host system or, if desired, to a plurality of host systems. 
     The purpose of the cache memory is to facilitate the exchange of data between the host and the peripheral devices. This is accomplished in the conventional manner by retaining data that is frequently accessed by the host in the cache memory. In this manner, when the data is needed by the host system, it is currently available in the cache memory which is able to transmit the data to the host without accessing a peripheral device and at a higher data rate than that at which the data could be transferred directly between the peripheral device and the host. Also, the cache memory and an associated cache processor gives the cache system the capability of anticipating the data the host will need and of making this data available to the host by transferring the data from the peripheral device to the cache memory well in advance of the time it is needed by the host. 
     The system of the present invention normally operates in the above discussed manner by permitting the cache memory to facilitate the exchange of data between peripheral devices and the host at a far greater data rate than would be possible without the use of the cache memory. The efficiency of data transfer in the opposite direction is also enhanced. Namely, the host can transmit a block of data to the cache memory at a high speed and instruct the cache memory to transfer the data to a designated peripheral device. The cache memory receives this data over the high speed channel from the host and then subsequently transmits the data to the designated peripheral device at the lower data rate at which the peripheral device is capable of operating. This mode of operation permits the host to operate at maximum efficiency by communicating with the cache memory at high data rates rather than by communicating at lower data rates directly with the peripheral devices. 
     The operation of the cache memory is controlled by the cache processor, which is connected by a control bus to the cache memory as well as to interface circuits connected to the cache memory. The normal operation of the cache processor is to control the cache memory in the transfer of data between the host system and the peripheral devices. The cache processor also performs routine diagnostic operations and other control operations to determine the operational capability of each element comprising the cache memory system. During these operations, the processor may determine that problems exist in the cache memory or in the circuits associated with the cache memory and that it is desirable to transfer information from one area of the cache memory to another. An example of this would be to transfer information between the volatile and non-volatile portions of the cache. This intra-cache transfer operation can be conveniently and advantageously performed by the method and apparatus of the present invention. 
     In accordance with the invention, a pair of data buses extending from each cache memory port towards the peripheral devices are connected to a multiplexor unique to the port which can be controlled to interconnect the two buses. When the multiplexor interconnects the two data buses of a port, the output of the read interface of the port is connected to the input of the write interface of the port. With this loopback connection established, the processor issues a command over the control bus to the read interface commanding it to read a block of data from a specified area of the cache memory. The data is read out and applied over one bus of the bus pair extending towards the peripheral devices. With the multiplexor activated, the data received on the first bus is applied by the multiplexor to the second bus of the bus pair. This bus extends back to the write interface of the same port. The data read out of the first area of the cache memory by the read interface of a port is thus looped back by the multiplexor and applied to the input of the write interface of the same port. At the same time, the cache processor sends a command via the control bus to this write interface causing it to write the data it is currently receiving into a portion of the cache memory specified by the cache processor. This loopback connection permits data to be transferred between different portions of the cache memory at high data rates without the use of an auxiliary memory and without the use of the cache processor other than to issue the necessary commands to the read and write interfaces and to the multiplexor. 
     The method and apparatus of the invention is a significant improvement over the currently available arrangements wherein an intra-cache transfer can only be accomplished by the use of an auxiliary memory or by the use of the cache processor itself wherein its data processing capabilities are used to transfer data from the read interface back to the write interface. 
     It can therefore be seen that the method and apparatus of the present invention solves the above discussed problems of the prior art by providing an advantageous method and apparatus for transferring data between the different portions of the cache memory on an economically basis without the use of expensive and complex apparatus. 
    
    
     DESCRIPTION OF THE DRAWING 
     The above and other advantages of the invention may better be understood from a reading of the following description thereof taken in conjunction with the drawings and which: 
     FIG. 1 illustrates a system embodying one possible illustrative exemplary embodiment of the invention; 
     FIG. 2 illustrates further details of the circuitry interconnecting the cache memory and the peripheral devices; and 
     FIG. 3 comprises a flow chart illustrating the manner in which the cache processor operates to effect an intra-cache data transfer. 
    
    
     DETAILED DESCRIPTION 
     Description of FIG. 1--The system of FIG. 1 comprises a host system 4, a plurality of peripheral devices 15-0 through 15-1 and a cache memory positioned intermediate host system 4 and peripheral devices 15. Cache memory 1 is connected to host system 4 by a plurality of high speed channels 5-0 through 5-n and an associated plurality of channel interfaces 6-0 through 6-n. Cache memory 1 is connected to peripheral devices 15 via a plurality of ports 20-0 through 20-m. Each port has a read interface and a write interface. Thus, port 20-0 has read interface 7-0 and write interface 8-0. The ports 20-0 through 20-m are connected to a corresponding paired number of unidirectional data buses 9-0 through 9-m and 10-0 through 10-m, which, in turn are connected to a plurality of loopback circuits 11-0 through 11-m. The loopback circuits are connected by paired data buses 13-0 through 13-m and 14-0 through 14-m, switching network 57 to peripheral devices 15-0 through 15-m. 
     Each port 20 is connectable to any peripheral device 15 via network 57. The details of network 57 comprise no part of the invention. Network 57 may be of any type known in the art that can connect any circuit on its left side with any circuit on its right side. If desired, network 57 may be dispensed with and each port 20 connected to a unique one of peripheral devices 15 via buses 9 and 10, loopback circuit 11 and buses 13 and 14. Each loopback circuit comprises a multiplexor such as multiplexor 12-0 for loopback circuit 11-0. The entire subsystem comprising the cache memory 1, ports 20, loopback circuits 11, and network 57 is controlled by cache processor 2 which is connected by control bus 3 to cache memory 1 and its ports 20 as well as to loopback circuits 11 and network 57. 
     The normal operation of the system of FIG. 1 is for the cache memory to facilitate the exchange of data between host 4 and peripheral devices 15 at higher data rates than would be the case if host 4 were connected directly to peripheral devices 15. Cache memory 1 contains enough high speed memory and has enough bandwidth to handle data transfers from multiple ports concurrently. Cache memory 1 also contains arbitration logic for handling the scheduling of requests for data transfers from each of a plurality of concurrently requesting ports. The control circuitry internal to the cache memory schedules on a time sliced basis requests for concurrent use of the cache memory in such a manner that the transfers of data between multiple interfaces appear to be essentially on a simultaneous basis. 
     The details of cache memory 1 and ports 20 comprise no part of the present invention. The cache memory and the ports may be any one of a plurality of currently available devices. One such device which may be advantageously used is the cache memory in IBM 3990 Model 3 Storage Control which is currently commercially available from the International Business Machines Corporation. 
     Data is exchanged on a high speed basis between host system 4 and cache memory 1 by means of the high speed data channels 5 and the associated channel interfaces 6. Data is exchanged between host 4 and cache memory 1 on a high speed basis commensurate with the capabilities of data channels 5. The cache memory communicates with the peripheral devices 15 by means of the circuitry shown on the right side of the cache memory on FIG. 1. 
     The normal mode of operation to send data to a peripheral device 15 is for cache read interface 7-0, for example, to read data under control of cache processor 2 out of a specified portion of cache memory 1 and to apply the read out data via bus 9-0 to loopback circuit 11-0. The received data is extended by loopback circuit 11-0 over bus 13-0 to switching network 57 which then establishes a connection to any specified peripheral device, such as device 15-1. In the return direction, the peripheral device 15-1 can apply data through network 57, over bus 14-0, to loopback circuit 11-0 and to the lower input of multiplexor 12-0. The data received on bus 14-0 is normally extended through multiplexor 12-0 and via bus 10-0 to cache write interface 8-0. The data received by write interface 8-0 is written under control of cache processor 2 into a specified area of the cache memory 1. 
     The above described facilities permit cache memory 1 to receive information at a high data rate from host system 4 and subsequently to enter it at a lower data rate into a peripheral device 15. In a reverse direction, the cache memory permits data to be transferred at a relatively low rate from a peripheral device 15 and, after being stored in the cache memory 1, to be subsequently made available to the host system 4 on a high speed basis via a data channel 5. Multiplexor 12-0 within loopback circuit 11-0 permits data applied by bus 9-0 to loopback circuit 11-0 to be looped back and extended over data bus 10-0 to write interface 8-0. This connection is implemented when cache processor 2 determines that an intra-cache transfer should be effected to transfer data from one portion of the cache memory to another portion. At such times, cache processor 2 transmits a signal over control bus 3 to the control input of multiplexor 12-0 so that the upper input on the right side of multiplexor 12-0 is interconnected signal-wise with its output on the left side of multiplexor 12-0. At this time, bus 10-0 is effectively disconnected signal-wise from bus 14-0 on the lower right hand input of the multiplexor and is connected signal-wise with bus 9-0 connected to the upper right hand input of the multiplexor. 
     Cache processor 2 then transmits information to read interface 7-0 commanding it to read a data block out of a specified portion of cache memory 1. Read interface 7-0 performs this operation and applies the data read out of the cache memory to bus 9-0. This information is received by loopback circuit 11-0 over bus 9-0 and applied to the upper right hand input of multiplexor 12-0. Since this upper right hand input is now connected signal wise with bus 10-0 on the output of the multiplexor, the data received by loopback circuit 11-0 over data bus 9-0 is looped back and applied via bus 10-0 to write interface 8-0. Write interface 8-0 is controlled over bus 3 by cache processor 2 which commands interface 8-0 to write the data it has received on bus 10-0 into a specified portion of the cache memory 1. 
     In the same manner, other ports on the peripheral device side of cache memory 1 may be operated by cache processor 2 to effect an intra-cache data transfer operation. Thus, port 20-m which comprises read interface 7-m and write interface 8-m, may be commanded by cache processor 2 to perform an intra- cache data transfer operation. This is done when read interface 7-m reads data out of a portion of the cache specified by cache processor 2. This information is applied over bus 9-m to loopback circuit 11-m which loops the data back to data bus 10-m. The looped back data is received by write interface 8-m and written into a portion of cache memory 1 specified by cache processor 2. 
     Description of FIG. 2--FIG. 2 discloses further details of the system of FIG. 1. In particular, FIG. 2 discloses further details of a typical port circuit such as 20-0 and it associated loopback circuit 11-0. The other port circuits 20 and the other loopback circuits 11 are identical to that shown in detail on FIG. 2. 
     Port 20-0 includes read interface 7-0 and write interface 8-0. The read interface contains circuits that control the reading of data from the cache memory and apply the read data to data bus 9-0. The control information needed by read interface 7-0 to perform this function is stored in a number of processor writable registers including a memory address register 16 that points to the beginning location of the data that is to be read, a byte count register 17 which indicates how much data is to be read, and an operation register 18 which defines the mode of operation of read interface 7-0. These registers are loaded with this information when cache processor 2 transmits the appropriate signals over control bus 3 to interface 7-0. 
     Read interface 7-0 further includes a data sequencer 19, a path 29, and a driver 21. The data sequencer 19 operates under control of signals from the operation register 18 and, in turn, applies the necessary signals to the cache memory to control a read operation in which the specified data is read out of the memory by data sequencer 19 and then extended over path 29 to driver 21. Driver 21 converts the received signals to a format required by data bus 9-0. These signals are applied over data bus 9-0 to the loopback circuit 11-0 which, in a manner subsequently described, returns the data that was received on bus 9-0 back to write interface 8-0 over bus 10-0. 
     Write interface 8-0 contains the circuits that write the data received from bus 10-0 into the cache memory. The control information needed by write interface 8-0 is contained in a number of processor writable registers including a memory address register 22 whose contents point to the beginning of the area of the cache memory into which the data is to be written. The byte count register 23 indicates the size of the data that is to be written, and the operation register 24 controls the mode of operation of write interface 8-0. Registers 22, 23 and 24 are loaded under control of cache processor 2 when it applies the necessary control signals to control bus 3 for transmission to write interface 8-0. Write interface 8-0 also contains data detector 25 which receives a signal from receiver 27 indicating when data is being received on bus 10-0. Data detector applies a signal over bus 3 to processor 2 to indicate when data is being received. 
     Receiver 27 of write interface 8-0 receives data from bus 10-0 and extends the data over path 28 to data sequencer 26. Data sequencer 26 communicates with the cache memory and applies the necessary signals to the cache memory to write the data received over path 10-0 into the cache memory location specified by memory address register 22 and byte count register 23. Data sequencer 26 and receiver 27 are cooperatively controlled during this operation by signals received from the operation register 24. The details of read interface 7-0 and write interface 8-0 are known and comprise no part of the invention. 
     Loopback circuit 11-0 comprises controller 31, packetizer 32, depacketizer 33, packet transmitter 34, packet receiver 36 and multiplexor 12-0. Controller 31 is connected to these various elements over paths 37, 38, 39, 41 and 42 to control their operation. Controller 31, in turn, is controlled by signals applied by cache processor 2 to control bus 3. Packetizer 32 converts the signals received over data bus 9-0 into a format suitable for packet transmission. The packetized data generated by element 32 is applied to bus 43 which extends from the output of packetizer 32 to the inputs of packet transmitter 34 as well as to the upper input of multiplexor 12-0. In normal operation, i.e., when a data loopback operation is not under way, the packetized data on bus 43 is applied to packet transmitter 34 which augments the packet with the identifier of the desired peripheral device and extends the packet over data bus 13-0 (FIG. 1) through network 57 to the identified peripheral device such as device 15-1. In a reverse direction, and in normal operation, peripheral device 15-1 applies packetized data through network 57 over bus 14-0 (FIG. 1) to packet receiver 36 of loopback circuit 11-0. Packet receiver 36 removes the device identification header from the packet and extends this data over path 46 to the lower input of multiplexor 12-0. 
     The above has described how network 57 can be controlled by device identities augmented to each packet. If desired, and since the details of the network comprise no part of the invention, the network can also be controlled by processor 2 via bus 3. Or the network can be eliminated and each peripheral device 15 can be connected on a one-to-one basis with a unique loopback circuit 11 via buses 13 and 14 (FIG. 1). 
     During normal operation in which a loopback operation is not in effect, the lower input of multiplexor 12-0 is connected signal-wise to the output of the multiplexor on path 44 (FIG. 2). Therefore, data normally received by the multiplexor on path 46 is extended through the multiplexor and over path 44 to depacketizer 33. This element depacketizes the received data and applies it via path 10-0 to receiver 27 of write interface 8-0. The received information is written into the cache memory location specified by memory address register 22 and byte count register 23 as priorly described. 
     A data loopback operation is initiated by cache processor 2 when it applies the necessary control signals over bus 3 to controller 31. Controller 31, in turn, applies the necessary signals over path 39 to multiplexor 12-0 to cause the multiplexor to disconnect its lower right hand input on path 46 from its output 44 signal-wise and to connect its upper right hand input on path 43 with its output on path 44. With the establishment of this connection, the data that is received by loopback circuit 11-0 on path 9-0 is converted to a packet format by packetizer 32, applied via bus 43 to the upper right hand input of multiplexor 12-0. This data is extended through the multiplexor to bus 44 and depacketizer 33 which depacketizes the data and applies it to bus 10-0. This is now the same data that was received by loopback circuit 12-0 on bus 9-0. The looped back data on bus 10-0 is applied to the input of receiver 27 of write interface 8-0 which applies it over path 28 to data sequencer 26. This causes the received data to be written into the cache memory under control of registers 22, 23, and 24 of write interface 8-0. Detector 25 notifies processor 2 when all of the looped back data has been received. 
     Description of FIG. 3--FIG. 3 discloses the cache processor 2 operations associated with the establishment of a data loopback operation. In element 301 the processor determines from the programs running in it that data needs to be moved from one location of the cache memory to another. An example of this would occur when the cache memory is made up of some volatile memory and some non-volatile memory. The complete copy of the data is normally kept in the volatile memory and only the modifications to this data are stored redundantly in the non-volatile memory. The volatile memory contains the original data file that was originally received from the associated peripheral device. The modifications or update to this file are then subsequently received from the host system and written redundantly into both the volatile and non-volatile memory portions. If the original file in the volatile memory is lost, the old copy of this file must be retrieved from the associated peripheral device. This is accomplished by the cache processor and when the original data file is retrieved from the peripheral device, it is written back into the volatile portion of the cache memory. However, this file must now be updated with the update information stored in the non-volatile portion of the memory. This requires an intra-cache data transfer using the loopback facilities of the present invention. 
     The process of FIG. 3 now advances over path 302 to element 303 in which cache processor 2 determines the portion of the cache memory that is to be read in connection with this data loopback operation. This operation is performed and the process advances over path 304 to element 306 in which the cache processor 2 applies the necessary signals to control bus 3 to cause registers 16, 17 and 18 of read interface 7-0 to be loaded with the information needed for a memory read operation. These registers comprise memory address register 16, byte count register 17, and operation register 18. The loading of these registers prepares read interface 7-0 for the initiation of a data loopback operation. 
     The process then advances over path 307 to element 308 in which the cache processor determines the area of the cache memory into which the looped back data is to be written. The process now extends over path 309 to element 310 in which cache processor 2 applies the necessary signals to control bus 3 to load registers 22, 23 and 24 of write interface 8-0. The information loaded into these registers specifies the portion of the cache memory into which the looped back data is to be written. These registers apply the necessary control signals to data sequencer 26 and receiver 27 of write interface 8-0 to cause the data that is received on bus 10-0 to be written into the specified portion of the cache memory. 
     The process extends via path 311 to element 312 in which processor 2 applies signals over control bus 3 to controller 31 of loopback circuit 11-0. These signals cause controller 31 to control multiplexor 12-0 so that its output on path 44 is disconnected from its lower input on path 46 and is connected signalwise to its upper input on path 43. 
     The process now advances over path 313 to element 314 in which cache processor 2 applies the necessary signals to control bus 3 to cause the specified data to be read out of a first location of the cache memory, to be applied by bus 9-0 to loopback circuit 11-0, to be returned by loopback circuit 11-0 to data bus 10-0, and to be received by write interface 8-0 and written into a second location of the cache memory as specified by memory address register 22 and byte count register 23. 
     This operation continues until the entirety of the data in the first memory location is transferred to the second memory location. The process advances over path 316 to element 317 which determines that the entirety of the loopback data has been received and written into the specified location of the cache memory. This detection that the entirety of the information has been transferred and written is made by data detector 25 of write interface 8-0. The process then advances over path 318 element 319 in which data detector 25 signals cache processor 2 that all of the specified data has been received and written into the cache memory. The process now advances over path 321 to element 322 in which the cache processor applies the necessary signals to control bus 3 to restore the elements of FIG. 2 to a normal operation in which the cache memory and its port 20-0 can exchange data with peripheral devices 15 over the circuity of FIG. 2. The process then advances over path 323 to element 324 which ends the processing steps associated with the present invention and frees up the cache processor 2 to perform normal host system to peripheral device data transfers. 
     In summary, it may be seen that the method and apparatus of the present invention provides improved facilities for permitting data to be transferred between a first location and a second location of a cache memory. This transfer is accomplished in a manner that does not require the use of an auxiliary memory or buffer, that does not require the addition of complex and expensive facilities, and that does not require extensive data processing operations by the cache processor. 
     It is to be expressly understood that the claimed invention is not to be limited to the description of the preferred embodiment but encompasses other modifications and alterations within the scope and spirit of the inventive concept.