TRANSFERRING DATA BETWEEN A DISK AND A CENTRAL PROCESSING UNIT

Abstract: A method and apparatus for transferring data between a disk and a CPU is disclosed comprising a pair of toggling header buffers and a pair of toggling data buffers. In operation, data is transferred between a sector on a disk and one of the data buff­ ers under the control of one of the header buffers. While the data in the header buffer is being transferred between the data buffer and a CPU, data is transferred between an adjacent sec­ tor on the disk and the other data buffer under the control of the other header buffer. The rate of transfer of data between the data buffer and the CPU is higher than the rate of transfer of the data between the disk and the other data buffer. This provides sufficient time to check the data transferred from and to the CPU for errors and to address a new sector on the disk prior to the completion of the data transfer of the previous sector be­ tween the disk and the data buffer. By means of the method and apparatus disclosed, all sectors in a track on a disk can be transferred between a disk and a CPU within a single revolution of the disk.

Description: Data stored on a disk is typically stored in a plurality of addressable sectors which are located in a plurality of concentric tracks. To transfer data to or from the disk in a conventional manner, a CPU transfers a header to a disk controller (DC). The header contains information about the sector including its address or location on the disk. After receiving the header, the disk controller accesses the sector and transfers the data between the CPU or an intermediate data buffer and the disk. Each of the steps involved in accessing and reading data from or transferring data to a sector on a disk takes time. Additional time is required when the data being transferred to or from a disk is subjected to error detection and correction procedures. In relatively simple disk storage systems, the time required to address a sector, allow the addressing circuits to stabilize, retrieve data from or transfer data to the sector on the disk and to check the data for errors generally prevents the accessing of physically adjacent sectors within a single revolution of the disk. Apparatus capable of accessing physically adjacent sectors on a disk within a single revolution of the disk have been proposed; however, they are generally unsatisfactory for one reason or another. For example, in one such prior known apparatus, all sectors in a track are read by simply addressing the track and commencing the reading of the sectors upon the detection of an index mark on the track. In this apparatus, header information is not used and therefore the time required to set up and stabilize the sector addressing circuits is not required. However, because sectors are not individually addressed, conventional data processing, such as error detection and correction, is generally not possible or is impractical. In another prior known apparatus, a plurality of non-toggling header and data buffers were used for individually addressing successive sectors in a track. However, in this apparatus extra control lines and tracking information was required to be processed in order to synchronize the disk controller with the disk and the CPU operations. An article published in ELECTRONIC DESIGN, volume 32, No.8, 19 April 1984, pages 143-149, entitled "Controller implements faster Winchester interface" discloses a Winchester controller which offers high data transfer rates, fast access time and improved data integrity. An article published in COMPUTER DESIGN, volume 21, No.4 April 1982, pages 127-136 entitled "Interfacing intelligent peripherals" describes a single controller which performs offline data transfers between disk and tape, fault monitoring and diagnostics. In view of the foregoing, one object of the present invention is to provide an improved method and apparatus for transferring data between a disk and a CPU comprising a plurality of toggling header and data buffers A and B. This object is achieved with the method and apparatus as set out in claims 1 and 7, respectively. In an example of the operation of apparatus embodying the invention, data is transferred between a sector on the disk and a data buffer A under the control of a header in a header buffer A. While the data in data buffer A is being transferred between data buffer A and the CPU, data is transferred between a physically adjacent sector on the disk and a data buffer B under the control of a header in a header buffer B. The rate at which the contents of the data buffers is transferred between the data buffers and the CPU is preferably at a rate which is considerably higher than the rate at which the data is transferred between physically adjacent sectors on the disk and the data buffers. In the given example, when the transfer of data to or from the data buffer A has been completed, the header buffer A is free to accept a new header. By completing the transfer well before the completion of the transfer between the disk and data buffer B, sufficient time remains for the CPU to transfer header information relating to an adjacent sector on the disk to the header buffer A, to check the data transferred to or from the CPU for errors, to issue a READ or WRITE command to the disk controller and to allow the accessing circuits to stabilize before the addressed sector passes the disk read head. Thereafter, when the data transfer between the disk and the data buffer B is completed, the header and data buffers A and B are toggled to commence the transfer of data between the data buffer B and the CPU and data between the adjacent sector on the disk and the data buffer A. More specifically the rate of data transfer between the CPU and the data buffers is sufficiently different from the rate of data transfer between the disk and the data buffers so as to permit reading from or writing to all sectors from a disk within one revolution of the disk. In the accompanying drawings, by way of example only: Fig. 1 is a block diagram of an apparatus comprising toggling header and data buffers embodying the present invention; Fig. 2 is a more detailed block diagram of one of the header and data buffers of Fig. 1; Referring to Fig. 1, there is provided a data transfer apparatus designated generally as 1 . In the apparatus 1 there is provided a CPU 2, a header buffer A designated generally as 3, a header buffer B designated generally as 4, a data buffer A designated generally as 5, a data buffer B designated generally as 6, a disk data controller 7, a disk 8 and a pair of inverters 9 and 10. The CPU 2 is coupled to header and data buffers 3 and 5 and the input of inverters 9 and 10 by means of a toggle signal line 15, to header and data buffers 3-6 by means of a 3-wire control signal bus 16 and an N-wire address bus 17, where 2 N is equal to or greater than the buffer size, to header buffers 3 and 4 by means of an N-wire data bus 18 and to data buffers 5 and 6 by means of a 16-wire data bus 19. The outputs of the inverters 9 and 10 are coupled to header and data buffers 4 and 5 by means of a toggle signal line designated as 15'. The disk data controller 7 is coupled to the CPU by means of a status bus 20 and a command signal bus 21, to the header buffers 3 and 4 by means of a 3-wire control signal bus 30 and an N-wire address bus 31, to the data buffers 5 and 6 by means of a 3-wire control signal bus 32, an N-wire address signal bus 33, to the header and data buffers 3-6 by means of a 16-wire data bus 34 and to the disk 8 by means of an N-wire data bus 35. Referring to Fig. 2 there is provided in each of the buffers 3-6 a random access memory (RAM) 40 and a plurality of multiplexers 41, 42 and 43. The size of the RAM 40 and the number of address lines required to address it depends on whether it is located in header buffers 3 and 4 or data buffers 5 and 6. In practice, the size of the RAM 40 is smaller and the number of address lines are fewer when it is in header buffers 3 and 4 than when it is in data buffers 5 and 6. In each of the multiplexers 41-43 there is provided a plurality of ports 0, 1 and S and a control signal port C. In the multiplexer 41, port 0 is coupled to data bus 34. Port 1 is coupled to data bus 18 or 19, depending on whether RAM 40 is in header buffers 3 and 4 or in data buffers 5 and 6, respectively. Port S is coupled to RAM 40 by means of a data bus 45. Port C is coupled to toggle signal line 15 or 15', depending on whether RAM 40 is in header buffer 3 and data buffer 5 or in header buffer 4 and data buffer 6, respectively. In multiplexer 42, port 0 is coupled to control signal bus 30 or 32 depending on whether RAM 40 is in header buffer 3 and 4 or data buffer 5 and 6, respectively. Port 1 is coupled to control signal bus 16. Port S is coupled to RAM 40 by means of a control bus 46. Port C is coupled to toggle signal line 15 or 15' depending on whether RAM 40 is in header buffer 3 and data buffer 5 or header buffer 4 and data buffer 6, respectively. In multiplexer 43, port 0 is coupled to address bus 31 or 33 depending on whether RAM 40 is in header buffers 3 and 4 or in data buffers 5 and 6, respectively. Port 1 is coupled to control bus 16. Port S is coupled to RAM 40 by means of an address bus 47. Port C is coupled to toggle signal line 15 or 15' depending on whether RAM 40 is in header buffer 3 and data buffer 5 or header buffer 4 and data buffer 6, respectively. In the operation of the apparatus of Fig. 2, when a logical 0 is applied to port C of multiplexers 41, 42 and 43, the buffer RAM 40 is coupled to the control, address and data busses of the disk data controller 7. On the other hand, when a logical 1 is placed on the control port C of the multiplexers 41, 42 and 43, the buffer RAM 40 is coupled to the control, address and data busses of the CPU 2. In view of the foregoing and because of the inverters 9 and 10, it will be seen that whenever header buffer A and data buffer A are coupled to the control, address and data busses of the disk data controller 7, the header buffer B and data buffer B will be coupled to the control, address and data busses of the CPU 2 and vice versa. With the foregoing explanation of the operation of the apparatus of Fig. 2, the operation of apparatus 1 of Fig. 1 will now be described with regard to a transfer of data from the disk to the CPU, it being understood that a transfer of data from the CPU to the disk will involve the same procedures, but in a reverse direction. In the following description, a reference to the coupling of the CPU 2 and the disk data controller 7 to a particular buffer means that the control, address and data busses of the CPU 2 and the disk data controller 7 are being coupled to the buffer. Assuming it is desired to transfer the contents of a first sector from the disk 8 to data buffer A, the CPU 2 will place a logical 1 on the toggle signal line 15. With a logical 1 on the toggle signal line 15, header buffer A and data buffer A will be coupled to the CPU 2 and header buffer B and data buffer B will be coupled to the disk data controller 7. With the header buffer A and data buffer A coupled to the CPU 2, the CPU 2 transfers the header of the first sector on the disk 8 to the header buffer A and then toggles the buffers by placing a logical 0 on toggle signal line 15 and sends a READ command to the disk controller 7 on the line 21. With a logical 0 on the toggle signal line 15, header buffer A and data buffer A are now connected to the disk data controller 7 while the header buffer B and data buffer B are connected to the CPU 2. With the header buffer A coupled to the disk data controller 7 and under the control of the READ command, the contents of the first sector from the disk 8 are transferred to the data buffer A. During the time that the contents of the first sector on the disk 8 are being transferred to the data buffer A, the CPU 2, which is now connected to the header buffer B, transfers the header of a physically adjacent second sector to the header buffer B. When the transfer of the contents of the first sector from the disk 8 to the data buffer A has been completed, the CPU 2 places a logical 1 on the toggle signal line 15, toggling the header and data buffers, and sends another READ command to the disk controller 7. With the header and data buffers A coupled to the CPU and the header and data buffers B coupled to the disk data controller 7, the contents of the data buffer A are transferred to the CPU 2 while the contents of the second sector on the disk 8 is transferred to the data buffer B under the control of the READ command. An important feature of the present apparatus is that the transfer of the contents of a data buffer to the CPU 2 is at a higher rate than the transfer of the contents of a sector on the disk 8 to the data buffer. In practice, the rate of data transfer to the CPU 2 from a data buffer is high enough to permit the CPU 2 to subject the data transferred thereto to error detection procedures, the results of which are indicated on the status line 21, and to permit the CPU to transfer a new header to the header buffer A before the completion of a data transfer from the disk 8 to the data buffer B. When this occurs, as described above, it will be appreciated that all sectors in a track on the disk 8 can be transferred to data buffer A and data buffer B alternately within a single revolution of the disk.

Claims: A method of transferring data between a disk (8) and a central processing unit (CPU) (2) comprising the sequential steps of : a) transferring a first header for addressing a first sector on said disk from said CPU (2) to a header buffer A (3); b) transferring first data between said first sector on said disk addressed by said first header in said header buffer A (3) and a data buffer A (5); c) transferring a second header for addressing a second sector on said disk from said CPU (2) to a header buffer B (4) while said first data is being transferred between said first sector on said disk and said data buffer A (5); d) transferring second data between said second sector on said disk addressed by said second header in said header buffer B (4) and a data buffer B (6) after said transfer of said first data between said first sector on said disk and said data buffer A (5) is completed; e) transferring and completing the transfer of said first data between said data buffer A (5) and said CPU (2) before the transfer of said second data between said second sector on said disk and said data buffer B (6) is completed; f) transferring a third header for addressing a third sector on said disk from said CPU (2) to said header buffer A (3) after said transfer of said first data between said data buffer A (5) and said CPU (2) is completed and before the transfer of said second data between said second sector on said disk and said data buffer B (6) is completed; g) transferring third data between said third sector on said disk addressed by said third header in said header buffer A (3) and said data buffer A (5) after said transfer of said second data between said second sector on said disk and said data buffer B (6) is completed; h) transferring and completing the transfer of said second data between said data buffer B (6) and said CPU (2) before the transfer of said third data between said third sector on said disk and said data buffer A (5) is completed; i) transferring a fourth header for addressing a fourth sector on said disk from said CPU (2) to said header buffer B (4) after said transfer of said second data between said data buffer B (6) and said CPU (2) is completed and before the transfer of said third data between said third sector on said disk and said data buffer A (5) is completed; j) repeating steps (d) through (i) for all headers (third, fourth, fifth ...) transferred from said CPU (2) to said header buffers A and B (3,4). A method according to claim 1 wherein said sectors comprise physically adjacent sectors and all of said transferring steps occur within a single revolution of said disk (8). A method according to claim 1 wherein said transferring steps comprise the step of toggling said header and data buffers A and B (3,4,5,6) after each transfer of said data between a data buffer (5,6) and said CPU (2). A method according to claim 1 wherein said transferring steps to and from said data buffers A and B (5,6) comprises the steps of transferring said data between said data buffers and said CPU (2) at a predetermined rate which is higher than the rate at which said data is transferred between said disk and said data buffers. A method according to claim 4 wherein said predetermined rate comprises a rate which permits the CPU (2) to transfer a header to a header buffer (3,4), check the data transferred between a data buffer and the CPU (2) for errors and toggle said header and data buffers to commence transferring data between the next physically adjacent sector on said disk and a data buffer within the current revolution of the disk. A method according to claim 3 wherein said toggling step comprises the steps of switching said header buffer A (3) from said CPU (2) to a disk controller (7) and said header buffer B (4) from said disk controller (7) to said CPU (2) while at the same time switching said data buffer A (5) from said CPU (2) to said disk controller (7) and said data buffer B (6) from said disk controller (7) to said CPU (2) and vice versa sequentially. An apparatus for transferring data between a disk (8) and a central processing unit (CPU) (2) comprising: a) means for transferring a first header for addressing a first sector on said disk from said CPU (2) to a header buffer A (3); b) means for transferring first data between said first sector on said disk (8) addressed by said first header in said header buffer A (3) and a data buffer A (5); c) means for transferring a second header for addressing second sector on said disk from said CPU (2) to a header buffer B (4) while said first data is being transferred between said first sector on said disk and said data buffer A (5); d) means for transferring said second data between said second sector on said disk addressed by said second header in said header buffer B (4) and a data buffer B (6) after said transfer of said first data between said first sector on said disk and said data buffer A (5) is completed; e) means for transferring and completing the transfer of said first data between said data buffer A (5) and said CPU (2) before the transfer of said second data between said second sector on said disk and said data buffer B (6) is completed; f) means for transferring a third header for addressing a third sector on said disk (8) from said CPU (2) to said header buffer A (3) after said transfer of said first data between said data buffer A (5) and said CPU (2) is completed and before the transfer of said second data between said second sector on said disk and said data buffer B (6) is completed; g) means for transferring third data between said third sector on said disk (8) addressed by said third header in said header buffer A (3) and said data buffer A (5) after said transfer of said second data between said second sector on said disk and said data buffer B (6) is completed; h) means for transferring and completing the transfer of said second data between said data buffer B (6) and said CPU (2) before the transfer of said third data between said third sector on said disk and said data buffer A (5) is completed; i) means for transferring a fourth header for addressing a fourth sector on said disk (8) from said CPU (2) to said header buffer B (4) after said transfer of said second data between said data buffer B (6) and said CPU (2) is completed and before the transfer of said third data between said third sector on said disk and said data buffer A (5) is completed; j) means for repeating transfer operations (d) through (i) for all headers (third, fourth, fifth,...) transferred from said CPU (2) to said header buffers A and B (3, 4). An apparatus according to claim 7 wherein said sectors comprise physically adjacent sectors and said transferring means comprise means for transferring all of said sectors within a single revolution of said disk (8). An apparatus according to claim 7 wherein said transferring means comprise means for toggling said header and data buffers A and B (3,4,5,6) after each transfer of said data between a data buffer (5,6) and said CPU (2). An apparatus according to claim 7 wherein said transferring means for transferring data to and from said data buffers A and B (5,6) comprises means for transferring said data between said data buffers (5,6) and said CPU (2) at a predetermined rate which is higher than the rate at which said data is transferred between said disk (8) and said data buffers (5,6). An apparatus according to claim 10 wherein said predetermined rate comprises a rate which permits the CPU (2) to transfer a header to a header buffer (3,4), check the data transferred between a data buffer (5,6) and the CPU (2) for errors and toggle said header and data buffers (3,4,5,6) to commence transferring data between the next adjacent sector on said disk (8) and a data buffer (5,6) within the current revolution of the disk (8). An apparatus according to claim 9 wherein said toggling means comprises means for switching said header buffer A (3) from said CPU (2) to a disk controller (7) and said header buffer B (4) from said disk controller (7) to said CPU (2) while at the same time switching said data buffer A (5) from said CPU (2) to said disk controller (7) and said data buffer B (6) from said disk controller (7) to said CPU (2) and vice versa sequentially.

Inventors: DREW, JOHN, SHEBANOW, MICHAEL C., YOUNG, MARK S.
Applicants: ADVANCED MICRO DEVICES, INC.
Application year: 1985
Main classification: G06F3
IPC codes: G06F5, G06F3