This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2009-141583, filed Jun. 12, 2009, the entire contents of which are incorporated herein by reference.
1. Field
One embodiment of the invention relates to a controller that manages data and redundant information related to the data, a storage medium, and an information control method.
2. Description of the Related Art
Hard disk drive (HDD) devices have been provided with a memory to temporarily store data to be written to a magnetic disk. With the improvement of computer technology, the memory tends to have a larger capacity and be smaller in size.
When data is stored in the memory, an error is increasingly likely to occur. The use of an error correcting code (ECC) has been proposed to prevent such an error. Besides, there it a tendency that, to prevent an error from occurring in data received from a host system connected to the HDD device or in data read from a magnetic disk, various types of information such as a cyclic redundancy check (CRC) and a parity is assigned in advance to the data. Further, information that the user can handle or the like is sometimes assigned to the data. Hereinafter, such information assigned to data to be read/written will be referred to as redundant information.
For fast access to a memory such as a dynamic random access memory (DRAM) commonly used as a buffer memory, in general, the hard disk controller continuously performs burst access in the column direction. Data read by the burst access in the column direction is generally 512 bytes or a multiple thereof in length.
Since the size of data transferred between the hard disk controller and the host of the hard disk has been fixed to 512 bytes, data transfer to the DRAM can be achieved easily by the burst access.
However, as described above, it is a recent tendency that the size of data transferred from the host is not fixed to 512 bytes, but redundant information is attached to the data. In this case, if data of a fixed data length and the redundant information are continuously written to the DRAM, the data is stored in an odd form as crossing a row address or the like. This makes it difficult to manage an address pointer. Besides, the access speed to the memory decreases.
For example, Japanese Patent Application Publication (KOKAI) No. 2007-115390 discloses a conventional technology in which an error correcting code and data are stored in different memory banks. With the conventional technology, the error correcting code and the data can be read in parallel from the different memory banks. Thus, a decrease in access speed can be prevented.
In to the conventional technology, the location of the error correcting code varies according to the memory bank. This necessitates to control processing such as masking when data is read from/written to the memory with respect to each memory bank.
A general architecture that implements the various features of the invention will now be described with reference to the drawings. The drawings and the associated descriptions are provided to illustrate embodiments of the invention and not to limit the scope of the invention.
Various embodiments according to the invention will be described hereinafter with reference to the accompanying drawings. In general, according to one embodiment of the invention, a controller comprises a receiver, an acquisition module, an information writer, and a redundant information writer. The receiver is configured to receive information. The acquisition module is configured to acquire redundant information for correcting an error in the information. The information writer is configured to write, upon receipt of the information, the information to at least a first memory bank of a plurality of memory banks of a storage module from the start address to a predetermined address of the first memory bank. The redundant information writer is configured to write, upon receipt of the information, the redundant information to a second memory bank other than the first memory bank from the predetermined address to the end address of the second memory bank.
According to another embodiment of the invention, a storage medium comprises a first memory bank and a second memory bank. The first memory bank is configured to store information from the start address to a predetermined address. The second memory bank is configured to store redundant information for correcting an error in the information from the predetermined address to the end address.
According to still another embodiment of the invention, there is provided an information control method comprising: a receiver receiving information; an acquisition module acquiring redundant information for correcting an error in the information; an information writer writing, upon receipt of the information, the information to at least a first memory bank of a plurality of memory banks of a storage module from the start address to a predetermined address of the first memory bank; and a redundant information writer writing, upon receipt of the information, the redundant information to a second memory bank other than the first memory bank from the predetermined address to the end address of the second memory bank.
The SPM 8 is a motor that steadily rotates the magnetic disk 9. The VCM 7 comprises a magnet and a drive coil (both not illustrated), and is driven by power supplied from the motor driver 6 to move the magnetic head 13 to a desired position.
The motor driver 6 controls current that flows through the SPM 8 and the VCM 7 to drive them.
The magnetic disk 9 is provided with a track that is formed thereon with respect to each of the different radii. Each track has an area (data area) to store data received from the host system 21. The data area includes a plurality of readable/writable sectors. With this configuration of the magnetic disk 9, when moving along the radial direction of the magnetic disk 9, the magnetic head 13 can scan a sector of a track. While scanning the sector on the magnetic disk 9, the magnetic head 13 reads data from or writes data to the sector.
The magnetic head 13 is supported by the arm 14. The magnetic head 13 reads the position information of a track from servo data and also scans the magnetic disk 9 to read or write data. The arm 14 is driven by the VCM 7 and rotates about the spindle 12 to move the magnetic head 13 in the radial direction of the magnetic disk 9.
The head IC 3 has the function of, for example, amplifying a weak signal read by the magnetic head 13.
The ROM 11 stores a control program used by the HDC 1 (for example, a microprocessing unit (MPU) 41). The RAM 10 is used as a work area where the HDC 1 (for example, the MPU 41) stores a variable prime number and the like.
The HDC 1 is an integrated circuit (IC) designed to control the HDD device 100. The HDC 1 comprises a reader/writer 4 and a main controller 5.
The reader/writer 4 comprises a servo block 31 and a read/write block 32. The servo block 31 mainly performs signal processing necessary to position the magnetic head 13. The read/write block 32 performs signal processing necessary for a read/write operation.
The main controller 5 comprises the MPU 41, a buffer block 42, and a host block 43.
The host block 43 controls an interface to the host system 21. It is assumed herein that the host block 43 transmits data to/receives data from the host system 21 in units of 512 bytes.
The MPU 41 performs a read/write operation. The MPU 41 searches for a track to read data from or write data to the track, and manages the position where the data is to be read/written. To write data to or read data from a track obtained by the search, the MPU 41 issues an instruction to the reader/writer 4.
Described below is control based on a read request. An analog signal is read from the magnetic head 13 when the servo block 31 positions the magnetic head 13. The analog signal is amplified by the head IC 3 and is sent to the reader/writer 4 of the HDC 1. The reader/writer 4 decodes the amplified analog signal. The main controller 5 generates data to be transferred to the host system 21 from the decoded analog signal. The data is once stored in the buffer RAM 2, and then transferred to the host system 21.
Described below is control based on a write request. Data transferred from the host system 21 to the main controller 5 is once stored in the buffer RAM 2, and then is sent to the reader/writer 4 by the main controller 5. The reader/writer 4 encodes the data to be written. The data is written to the magnetic disk 9 by the magnetic head 13 through the head IC 3.
The buffer RAM 2 temporarily stores data read from the magnetic disk 9, data received from the host system 21, and the like. The data stored in the buffer RAM 2 is output to the reader/writer 4 or the host system 21.
The HDD device 100 of the embodiment uses a synchronous dynamic random access memory (SDRAM) as the buffer RAM 2. The buffer RAM 2 is assumed to comprise four memory banks. In each of the memory banks of the buffer RAM 2, the storage location of data can be specified by a row address and a column address.
High-speed burst access is performed continuously in the column direction in the buffer RAM 2. The size of the buffer RAM 2 is a multiple of 512 bytes in the column direction. Note that the buffer RAM 2 is not limited to SDRAM, and may be other memory units such as DRAM.
In the HDD device 100 of the embodiment, upon accessing to the buffer RAM 2, the plurality of memory banks can be accessed simultaneously in parallel (continuously) through memory interleave.
The buffer block 42 controls the buffer RAM 2. The configuration of the buffer block 42 will be described in detail below.
According to conventional technologies, data is transferred between the HDD device and the host system in units of 512 bytes. Since the size of the buffer RAM is a multiple of 512 bytes in the column direction, data transfer to the buffer RAM can be achieved easily by the burst access.
However, in recent years, the host system transfers data to which is attached data (redundant information) such as a parity, a cyclic redundancy check (CRC), and an error correcting code (ECC). Consequently, if the data is directly written to the buffer RAM, the data is stored in an odd location as crossing a bank address or a row address. This makes it difficult to manage an address pointer, and also reduces the access speed.
Therefore, in the HDD device 100 of the embodiment, redundant information such as a parity, CRC, ECC, etc. are stored all together in a memory bank other than the one that stores user data. With this, the user data can be managed in the same manner as the conventional technologies. In addition, both the user data and the redundant information can be accessed simultaneously in parallel (continuously) through memory interleave. Thus, a high-speed read/write operation can be achieved.
In the following, each element of the buffer block 42 will be described.
The receive controller 201 receives data from the host system. 21 through the host block 43. The receive controller 201 also receives data read from the magnetic disk 9 by the reader/writer 4. The received data is assumed to contain redundant information and user data.
The user data is data actually used in the host system 21 or the like. Examples of the user data include, in addition to text data, image data, and moving image data, software and the like. The user data has a structure in units of 512 bytes.
The redundant information is information related to the user data, and may be, for example, data assigned to the user data when the HDD device 100 and the host system 21 communicate the user data. Specific examples of the redundant information include a parity, CRC, ECC, and the like. The redundant information may also be a code or the like generated to correct an error in the user data in the HDC 1.
The receive controller 201 receives a read command to read data from the buffer RAM 2 from the reader/writer 4 or the host block 43. Upon receipt of the read command, a data read controller 213 determines that the reader/writer 4 is ready to write user data to the magnetic disk 9 or that the host block 43 is ready to transmit data to the host system 21. Accordingly, the data read controller 213 reads the user data from the buffer RAM 2.
The redundant information acquisition module 202 acquires redundant information from received data. While the redundant information acquisition module 202 of the embodiment acquires redundant information from received data, it is not so limited. For example, the redundant information acquisition module 202 may generate an error correcting code to correct an error in the user data, and use the error correcting code as redundant information.
The memory access controller 203 comprises a dada write controller 211, a redundant information write controller 212, the dada read controller 213, a redundant information read controller 214, and an address specifying module 215.
The memory access controller 203 of the embodiment enables user data and redundant information to be read simultaneously in parallel (continuously) from different memory banks of the buffer RAM 2 through memory interleave.
The address specifying module 215 specifies, based on the logical address of user data to be written/read, a logical address to/from which redundant information corresponding to the user data is to be written/read. How to specify the logical address will be described later.
In the embodiment, digits of a logical address are assigned to a row address, a memory bank, and a column address of the buffer RAM 2, respectively, in this order.
The address specifying module 215 of the embodiment specifies a logical address of redundant information such that a row address assigned thereto starts from a predetermined address to the end address and the redundant information is stored in a memory bank other than the one that stores user data.
Incidentally, it is assumed herein that the row address is 12 bits in length, and the predetermined address is “111111110000”.
Each time the receive controller 201 receives data, the dada write controller 211 writes user data contained in the data to at least one of the memory banks of the buffer RAM 2 from the start address to the predetermined address of the memory bank. While the dada write controller 211 is described above as writing user data each time data is received, it is not so limited. The dada write controller 211 may write user data according to the receipt of data.
Each time the receive controller 201 receives data, the redundant information write controller 212 writes redundant information acquired by the redundant information acquisition module 202 to an address specified by the address specifying module 215. Thus, the redundant information is written from the predetermined address to the end address in a memory bank other than the one to which user data is written. While the redundant information write controller 212 is described above as writing redundant information each time data is received, it is not so limited. The redundant information write controller 212 may write redundant information according to the receipt of data.
As illustrated in
In the embodiment, an example is described in which the buffer RAM 2 is a 64-Mbit SDRAM, user data is 512 bytes in length, and redundant information is 16 bits in length; however, the embodiment is not so limited. A modification of the embodiment will be described below.
A description will be given of the case where user data is written with burst access according to the embodiment. The dada write controller 211 first writes user data to a memory cell specified by a column address in the first memory bank of a row address. The dada write controller 211 then writes the user data to a memory cell specified by a column address in the second memory bank of the row address. By repeating the write operation, after writing the user data to all memory cells each specified by a column address in the fourth memory bank of the row address, the dada write controller 211 writes the user data to a memory cell specified by a column address in the first memory bank of the next row address. In this manner, the dada write controller 211 can continuously write user data to a plurality of row addresses or memory banks.
After the dada write controller 211 writes user data to each of memory cells 301 in
More specifically, the address specifying module 215 fixes the upper digits orbits of the logical address of the redundant information to 1. The redundant information write controller 212 assigns digits of the specified logical address to a row address of the buffer RAM 2, a memory bank, and a column address, respectively, in this order. With this, the redundant information is stored as a whole in the end area (the memory area 302 in
A specific description will be given of how the address specifying module 215 specifies the logical address of redundant information.
Different process is required to assign a digit to a bank address among digits of the logical address of the redundant information. Specifically, the address specifying module 215 sets the values of two digits (two bits) to be assigned to the bank address in the logical address of the redundant information based on the values of digits assigned to the bank address of the user data. More specifically, the address specifying module 215 sets the value of the upper one bit of the address of the user data as the upper one bit, while it sets the inverted value of the lower one bit of the address of the user data as the lower one bit. With this, the redundant information is written to a memory bank other than the one to which the data is written.
The address specifying module 215 then assigns the values of digits assigned to other row addresses and column addresses of the user data to other digits thereafter in the logical address of the redundant information. Depending on the data size of the buffer RAM 2 and redundant information, as illustrated in
The predetermined address to the end address of a row address are secured as an address to store redundant information. In the embodiment, a row address “11111111????” (?: 0 or 1) is used as an address to store redundant information, and it is forbidden to write user data and the like to the address.
A description will be given of an equation for converting the logical address of user data to the logical address of redundant information related to the user data.
The conversion equation 701 in
Other equations in
As illustrated in
The redundant information write controller 212 assigns, among the digits of the logical address of the redundant information, A′21 to A′10 to a row address, A′9 and A′8 to a memory bank, and A′7 and A′0 to a column address, thereby controlling writing of the redundant information.
The address specifying module 215 of the embodiment can specify a logical address to which redundant information is to be written by the simple calculation as described above. Thus, the operational load to specify an address can be reduced.
In the embodiment, an example is described with reference to
According to the embodiment, by the write control as described above, redundant information is stored in a memory bank other than the one that stores user data. This prevents a plurality of times of SDRAM accesses (active to precharge) to write user data that occur when the user data and redundant information are stored in the same memory bank. Thus, it is possible to improve the use efficiency of the buffer RAM 2.
The data read controller 213 reads user data from at least one of the four memory banks of the buffer RAM 2.
Simultaneously in parallel (continuously), with that the data read controller 213 reads user data, the redundant information read controller 214 reads redundant information corresponding to the user data read by the data read controller 213 from an address specified by the address specifying module 215. Since the data read controller 213 and the redundant information read controller 214 reads data from different memory banks, they can read the data simultaneously in parallel (continuously). Thus, less time is taken to read the data.
When redundant information read by the redundant information read controller 214 contains a code or the like to correct an error, the error corrector 204 corrects user data read by the data read controller 213 using the code.
The transmit controller 205 sends read user data, and redundant information if required, to the reader/writer 4 or the host block 43.
A description will be given of the operation of the HDD device 100 to store data received from the host system 21 in the buffer RAM 2.
First, the receive controller 201 receives data from the host system 21 (S1101). Then, the redundant information acquisition module 202 acquires redundant information from the received data (S1102). Incidentally, the redundant information acquisition module 202 need not necessarily acquire the redundant information from the received data. For example, from user data contained in the received data, the redundant information acquisition module 202 may generate an error correcting code to correct an error in the user data, and use the error correcting code as redundant information.
Thereafter, the dada write controller 211 writes user data contained in the received data to the buffer RAM 2 (S1103).
The address specifying module 215 converts the address where the user data is written at S1103 using the conversion equation as illustrated in
After that, the redundant information write controller 212 writes the redundant information acquired at S1102 to the address specified at S1104 (S1105).
With the process as described above, the redundant information and the user data can be stored in different memory banks, and thereby can be read simultaneously in parallel (continuously).
A description will be given of the operation of the HDD device 100 to read user data from the buffer RAM 2 to send it to the reader/writer 4.
First, the receive controller 201 receives a read command to read user data from the reader/writer 4 (S1201).
The address specifying module 215 specifies an address of redundant information corresponding to the user data to be read in response to the read command from an address where the user data is stored using the conversion equation as illustrated in
The data read controller 213 then reads the user data from a memory bank of the buffer RAM 2 according to the read command (S1203).
Through memory interleave, the redundant information read controller 214 reads the redundant information stored in the specified address from a different memory bank than the one that stores the user data in parallel (continuously) to reading of the user data (S1204).
After that, the error corrector 204 corrects an error in the read user data, if necessary, based on the read redundant information (an error correcting code, etc. contained therein) (S1205). The error correction may be performed in any way including commonly known ones, and it will not be described herein.
The transmit controller 205 sends the read user data, and the redundant information if required, to the reader/writer 4 (S1206).
As described above, the user data and the redundant information are stored in different memory banks, and therefore can be continuously accessed simultaneously in parallel (continuously). Thus, less time is taken to read the data.
The HDD device 100 of the embodiment provides an address offset algorithm that allows user data and redundant information to be stored in different memory banks so that they can be continuously accessed through bank interleave.
Moreover, according to the embodiment, along with access to user data, fast access to redundant information can be achieved through bank interleave.
Furthermore, according to the embodiment, with the use of the conversion equation (algorithm) as described above, user data is stored according to the column address of the buffer RAM 2. Thus, DRAM access as in conventional technologies is ensured to user data, and also fast or high-speed access is achieved to redundant information through memory interleave.
With this, in the HDD device 100 of the embodiment, it is possible to prevent the difficulty in managing an address pointer caused by that redundant information and user data are stored in the same storage area. In addition, extra accesses to data of small size, such as redundant information, can be prevented. This prevents the use efficiency of the buffer RAM 2 from being reduced.
Further, in the HDD device 100 of the embodiment, a different area than an area for storing user data is set to store redundant information. This facilitates the management of an address pointer.
According to the embodiment, each bit of a logical address is assigned to a row address, a memory bank, and a column address, and thereby the storage location of user data is uniquely determined. Therefore, address management is facilitated, which implements simple circuit mounting. Similarly, each bit of the logical address of redundant information is assigned to a row address, a memory bank, and a column address, and thereby the storage location of the redundant information is uniquely determined. Therefore, address management is facilitated, which also implements simple circuit mounting.
A computer program (hereinafter, “data processing program”) may be executed on a computer to realize the same function as the HDD device 100. The data processing program may be executed by the buffer block 42 in the HDC 1 and is provided as being stored in advance in ROM or the like.
The data processing program may be provided as being stored in a computer-readable storage medium, such as a CD-ROM, a flexible disk (FD), a compact disc-recordable (CD-R), or a digital versatile disc (DVD), in an installable or executable format.
The data processing program may also be stored in a computer connected via a network such as the Internet so that it can be downloaded therefrom via the network. Further, the data processing program may be provided or distributed via a network such as the Internet.
The data processing program comprises modules that implement the above constituent elements (the receive controller 201, the redundant information acquisition module 202, the memory access controller 203, the error corrector 204, and the transmit controller 205). As real hardware, the MPU 41 loads the data processing program from the ROM into the main memory and executes it. With this, the constituent elements, such as the receive controller 201, the redundant information acquisition module 202, the memory access controller 203, the error corrector 204, and the transmit controller 205, may be implemented on the main memory.
The various modules of the systems described herein can be implemented as software applications, hardware and/or software modules, or components on one or more computers, such as servers. While the various modules are illustrated separately, they may share some or all of the same underlying logic or code.
While certain embodiments of the inventions have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel methods and systems described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the methods and systems described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2009-141583 | Jun 2009 | JP | national |