1. Field of the Invention
The invention relates to a nonvolatile storage device including a nonvolatile memory device and capable of storing data in a safe condition, an information recording system including a nonvolatile storage device, and an information recording method.
2. Description of the Related Art
Recently, auxiliary storage devices such as memory cards have been produced as media used to record file data which was usually stored in media such as magnetic disks, as the storage capacity of nonvolatile storage devices (called “media” hereinafter) including semiconductor memory devices and being electrically rewritable has increased. Especially, since NAND-type flash memories having a large storage capacity can be produced at low cost, NAND-type flash memories are used in digital cameras and mobile-phone units.
The storage system includes a host 400 and a medium 300. The medium 300 includes a medium controller 310 and a nonvolatile memory device (NVM: Non-Volatile Memory) 350. The medium controller 310 includes a host interface 320, a NVM control section 330, and a NVM INTERFACE 340. On the basis of information included in predetermined protocol data received through the host interface 320, the medium controller 310 controls the nonvolatile memory device 350 with the NVM control section 330 and realizes a function as a storage device.
The host 400 includes a buffer section for buffering user data and management information used to control the storage device and outputs the buffered user data and the buffered management information to the medium 300. At this time, the host 400 outputs the buffered user data and the buffered management information to the medium 300 by using the same method (the same protocol), the protocol having no means for discriminating the user data from the management information. Various kinds of information recording apparatuses such as the above-described digital camera, the above-described mobile-phone unit, and a personal computer are applied to the host 400.
In the storage system, the host 400 uses a predetermined protocol used to access the medium 300.
As shown in
Data in the medium 300, which the host 400 accesses by using the file system 460, includes two types of data such as user data and management information used by the file system. The user data is data file created by a user using an application. On the other hand, the management information is important data used to manage all the user data stored in the medium. At present, a FAT (File Allocation Tables) file system is known as a file system, for example. Taking the example of a FAT file system, the management information includes BPB (BIOS Parameter Block), PBR (Partition Boot Record), FAT1, FAT2, a root directory, and a directory. The two types of data are allocated in one storage space in relation to the host.
The file system 460 includes a management-information control section 461 and a user-data access section 462. The management-information control section 461 and the user-data access section 462 perform control (access control) of the management information and the user data, respectively. Then, the file system 460 outputs a data-access instruction to the medium-control driver 470.
The medium-control driver 470 is software that controls a medium control section not shown in
The medium interface 480 outputs medium-access protocol data to the medium 300 in response to a data-access instruction supplied from the medium-control driver 470. Data output to the medium 300 is output according to a transmission pattern (sequence) of a read/write command used by an application.
For example, a transmission pattern (sequence) of a read/write command transmitted from the host 400 includes READ_DATA as a command used to read data from the medium 300 or WRITE_DATA as a command used to write data to the medium 300.
Here,
While the directory is a part of the management information, the directory is management information generated in response to a user's instruction. Then, an address to which the directory is allocated is determined on the basis of timing at which the directory is actually generated. While the FAT 2 exists as a copy of the FAT1, management information other than the FAT1 has no copy on the storage space. Therefore, when data errors occur, the management information other than the FAT1 may be lost and the file system may not normally function as a storage system.
In addition, the management information is stored in a smaller storage capacity than the user data and is accessed in a small amount. For example, in the case of file system FAT32, the size of FAT information necessary for managing 4 M bytes of the user data is 512 bytes (in the case that a cluster size is 32 K bytes).
Read-file access processing corresponding to the example of the file access shown in
Next, read-file access processing corresponding to the example of the data access shown in
Next, write-file access processing corresponding to the example of the data access shown in
The FAT information is managed by allocating up to 32 bits to a cluster which is a management unit for data (in the case of FAT32). Therefore, in one sector in which the same FAT information is stored, 4096 bits (=32 bits×128; corresponding to 512 bytes) of data is managed. Then, every time these clusters are accessed, the FAT information stored in the sector is accessed once or more than once.
A specific example of the medium control and the parameter shown in
Recently, a page size of a flash memory has been expanded to a size of 2 K to 4 K bytes. When such a memory is used, it is assumed that the number of accesses is further four to eight times higher on the basis of one page corresponding to four to eight sectors. In this way, since the number of accesses from the host to the management information in the file system is higher than the user data, the management information has a tendency to cause data errors in view of a data-retention characteristic.
In this situation, when electric power supply of the system is shut down during storing data from the host 400 to the medium 300, the interruption of data store causes a state that the data being under the data-store processing introduces a data error. In the case of a removable medium, when the removable medium is pulled out during data store, the same state arises.
Next, the case that read processing is executed under the state in which data errors occur in the user data 2 will be described.
Next, the case that power-off arises during data-store processing for a directory will be described.
Next, the case that read processing is executed after data errors occur in the directory will be described.
Since the number of accesses to the management information is higher than the user data, the management information, in view of a data-retention characteristic, has higher probability to cause data errors than the user data according to the above-mentioned contributing factor. When data errors occur in the management information, the data errors cause a larger confusion and larger damage to a user than data errors occurring in a user data. Therefore, it is necessary to more securely record and store management information in a medium than user data and to prevent data errors from occurring so that a storage system having high reliability for a user may be realized.
While recently storage capacity of a memory device has become large with the development of semiconductor process, a characteristic of a memory cell has become deteriorated. The deteriorated characteristic of the memory cell is one of contributing factors which raise the probability of soft errors or data errors occurring during the above-mentioned concentration of access.
However, it is difficult for the technologies shown in
By the way, a patent document 1 (see Japanese Unexamined Patent Application Publication No. 2008-176677) describes a technology which, in order to prevent power-off from causing data errors, switches between two nonvolatile memory control means on the basis of whether or not a countermeasure against power-off is implemented.
However, the technology described in the patent document 1 is not an adequate countermeasure against concentrated access to management information and a deteriorated characteristic of a memory cell. In addition, there is a problem that formats and contents of data stored in a memory are, as a result, different on the basis of whether or not a countermeasure against power-off is implemented.
In view of the above-identified circumstances, it is therefore desirable to take adequate countermeasures against concentrated access to management information and a deteriorated characteristic of a memory cell, more securely record and store management information in a medium than user data, and prevent data errors from occurring.
According to an embodiment of the present invention, a command input from a host device is received, the command describing whether data to be a processing object is user data or management information, and it is determined whether the received command is used for the user data or the management information. Switching between control methods used for nonvolatile memory means is performed on the basis of the determination result, the nonvolatile memory means storing the user data and the management information used to manage the user data on a file system. Then, the user data or the management information is recorded in the nonvolatile memory means according to the control method switched to.
In the above-mentioned configuration, since it can be prescribed that the command transmitted from the host device to a nonvolatile storage device is used for the management information, the nonvolatile storage device detects the prescription and switches to a control method capable of surely storing the management information in a safe condition.
In addition, in the above-mentioned configuration, the nonvolatile storage device includes a first nonvolatile memory configured to store the user data and a second nonvolatile memory configured to be more reliable at storing data than the first nonvolatile memory and store the management information used to manage the user data on the file system. Then, on the basis of the command which is input from the host device and describes whether data to be a processing object is the user data or the management information, a medium controller controls switching between the first nonvolatile memory and the second nonvolatile memory and storing data.
In the above-mentioned configuration, since a high-reliable nonvolatile memory is provided for the management information, the probability of data errors occurring in the management information is reduced.
In addition, in the above-mentioned configuration, by using a command describing whether data to be a processing object is the user data or the management information, the medium controller determines whether or not data input from the host is used for the management information. When the data is used for the management information, the medium controller controls appending of an error-correcting code to the management information and storing the management information in the nonvolatile memory, the error-correcting code having higher error correcting capability than the user data.
In the above-mentioned configuration, since the error-correcting code with higher error correcting capability is appended to the management information, the probability of data errors occurring in the management information is reduced.
In addition, in the above-mentioned configuration, by using a command describing whether data to be a processing object is the user data or the management information, the medium controller determines whether or not data input from the host is used for the management information. When the data is used for the management information, the medium controller controls writing of the management information twice in the nonvolatile memory.
In the above-mentioned configuration, since the same management information is written at two points (double writing), the management information may be stored in a safe condition at either of the two points and data errors may be prevented from occurring.
Hereinafter, preferred embodiments of the present invention will be described with reference to figures. In addition, the preferred embodiments will be described in the sequence as below.
1. a first embodiment (memory device: an example including two types of memory devices used for user data and management information respectively)
2. a second embodiment (memory device: an example including one memory device used for both user data and management information)
3. a third embodiment (NVM control section: an example including a nonvolatile cache area)
4. a fourth embodiment (NVM control section: an example including a volatile cache area used for user data)
5. a fifth embodiment (an example including switching between NVM control algorithms)
6. a sixth embodiment (an example relating to a configuration in which a host and a medium are integrated)
An information recording apparatus (called “host” hereinafter), functioning as a host device that reads and writes data from and onto a medium, and a storage system including a medium will be described. The medium is a nonvolatile storage device including a semiconductor memory device and being electrically rewritable. Various kinds of information recording apparatuses such as the aforementioned digital camera, the aforementioned mobile-phone unit, and the aforementioned personal computer are applied to the host.
According to an embodiment of the present invention, whether data in the medium, which the host accesses, is user data or management information can be determined by the medium. The medium includes a section configured to store data while switching between two types of memory devices, namely, a large-capacity memory device used for the user data and a small-capacity memory device used for the management information. In addition, a nonvolatile memory device may be called “NVM” hereinafter.
The protocol discrimination section 30 determines a protocol to be used for data received from the host 100 through the host interface 20 and outputs the determination result to the NVM-control selection section 40. The NVM-control selection section 40 selects one of the two NVM control sections for use on the basis of the determination result and switches between the two NVM control sections. The selected NVM control section controls a corresponding memory device and reads or writes data on the memory device. In this way, operation as a storage device is realized. The operation of the protocol discrimination section 30 will be described hereinafter.
The NVM control algorithm section 50A includes an empty block management section 50A1, a logical-to-physical address translation section 50A2, and a defective block management section 50A3. The empty block management section 50A1 manages the status of use in the nonvolatile memory device. Then, the logical-to-physical address translation section 50A2 translates a logical address to a physical address with reference to a logical-to-physical address translation table which translates a logical address specified by the host 100 to a physical address used in the nonvolatile memory device. In addition, the defective block management section 50A3 manages defective blocks occurring in the nonvolatile memory device. The defective blocks are controlled in the medium 1 in order not to be utilized as areas used to store data transmitted from the host 100.
In addition, the NVM control circuit 50B includes a NVM command control circuit 50B1 and an ECC (Error Correcting Code) circuit 50B2. The NVM control section is different according to the nonvolatile memory device. Furthermore, the NVM control section is different according to user-data use, management-information use, and cache use. The NVM command control circuit 50B1 performs read/write processing on the nonvolatile memory device on the basis of content of processing described by a command. The ECC circuit 50B2 appends an error-correcting code (called “ECC data” hereinafter), which is used to correct errors, to data received from the host 100.
Data in the medium 1, which the host 100 accesses by using the file system 160, includes two types of data such as user data and management information used for a file system. The user data is a data file created by a user utilizing an application. On the other hand, the management information is important data used to manage all user data stored on the medium. At present, taking the example of the FAT file system, the management information includes BPB (BIOS Parameter Block), PBR (Partition Boot Record), FAT1, FAT2, a root directory, and a directory. The two types of data are allocated in one storage space from the standpoint of the host.
In the file system 160, a management-information control section 161 and a user-data access section 162 control (access control) the management information and the user data, respectively. Then, the file system 160 outputs respective data-access instructions used for the management information and the user data to the medium-control driver 170.
The medium-control driver 170 is software that controls the medium control section 130. Then, when the medium-control driver 170 receives the data-access instruction from the file system 160, the medium-control driver 170 outputs a medium-control command and a parameter to the medium interface 140. According to an embodiment of the present invention, the management information and the user data are, as data having different protocols respectively, output to the medium-control driver 170 and the medium 1 can determine whether data is the management information or the user data.
When the medium interface 140 receives a data-access instruction from the medium-control driver 170, the medium interface 140 outputs data having a medium-access protocol to the medium 1. Namely, the medium interface 140 outputs the management information and the user data, which are buffered by the management-information buffer section 131-1 and the user-data buffer section 131-2 respectively, to the medium 1 in synchronization. The data output to the medium 1 includes a transmission pattern (sequence) of a read/write command used in an application.
According to an embodiment of the present invention, as a protocol used to store data from the host to the medium, specific forms of two types of protocols used for the user data and the management information are as follows:
(1) an example of a command used to set or cancel the condition that data is the management information (in
Without changing data in a designated sector area, the condition that data is the management information can be set or cancelled.
(2) while the management information and the user data use a common command, the condition that data is the management information is specified with a parameter (in
Setting of the condition and storing of actual data can be performed simultaneously.
(3) an example in which the management information and the user data use dedicated access commands respectively (in
While this case (3) has the same advantage as the case (2), a command format is different between the case (2) and the case (3).
(4) an example of a command used to set the condition that a command to be executed next is a management-information access (in
Processing for changing a data attribute from the user data to the management information (processing for medium performed in response to SET_MNG command) will be described with reference to a flowchart shown in
Processing for changing a data attribute from the management information to the user data (processing for medium performed in response to CLR_MNG command) will be described with reference to a flowchart shown in
In an actual access to a sector, a command which is the same as a command of the related art can be used for the management information and the user data. In the protocol, an attribute of data can be changed after the data is stored and using the protocol in combination with other protocol is effective.
In the past, there has been no way for the medium to surely determine whether data transmitted from the host is the user data or the management information. Then, as shown in
On the other hand, in the above-mentioned first embodiment, the medium includes a function to determine whether a protocol received from the host corresponds to the user data or the management information. Then, the medium selects a corresponding NVM control section on the basis of the determination result so as to access the nonvolatile memory device. Therefore, the host can specify whether the protocol corresponds to the user data or the management information. Accordingly, when important information dependent on an application exists in the user data, the medium can securely store the important information in the same way as the management information.
In the first embodiment according to the present invention, the probability of data errors occurring in the management information is reduced by taking adequate countermeasures against concentrated access to management information. In addition, while recently storage capacity of a memory device has become large with the development of semiconductor process, a data-retention characteristic of a memory has become deteriorated. Then, for example, even when the memory with the deteriorated data-retention characteristic is adopted as a memory used for the user data, a small-capacity memory device with a superior data-retention characteristic is adopted as a memory used for the management information. Therefore, data errors occurring in the management information is reduced. Specifically, a NOR-type memory is used for the management information and a NAND-type memory is used for the user data. In addition, a SLC (Single-Level-Cell) memory may be used for the management information and a MLC (Multi-Level Cell) memory may be used for the user data. Generally, a memory device used for the management information is more expensive than a memory device used for the user data.
In the first embodiment, in terms of storing the management information, a memory device used for the management information has a better characteristic than a memory device used for the user data. For example, a memory device with a superior data-retention characteristic, a memory device with a high guaranteed-rewrite count, or a memory device with a short program time or a short erase time is used for the management information. Then, a NVM control circuit used for a large capacity nonvolatile memory device is provided as a user-data-use NVM control section and a NVM control circuit used for a high-reliability nonvolatile memory device is provided as a management-information-use NVM control section.
In a second embodiment, a same nonvolatile memory device is used for user data and management information. In addition, the size of area in which an error-correcting code used for the management information is stored is extended. Then, the management information to which an error-correcting code is appended is stored, the error-correcting code having a higher error correcting capability than that appended to the user data.
In this way, in the second embodiment, the probability of data errors occurring in the management information is reduced by taking an adequate countermeasure against concentrated access to the management information, the countermeasure being that the management information, to which the error-correcting code having a higher error correcting capability than that appended to the user data is appended, is stored. As a result, the second embodiment has a similar function and an effect as the first embodiment.
In a third embodiment, NVM control sections in the medium controller include nonvolatile cache areas respectively.
In the third embodiment, while the cache area may include a nonvolatile memory device in the same way as a memory for the user data, the installation of the nonvolatile memory device is aimed at speeding up access form the host and a control method used for the nonvolatile memory device is different from that used for the user data. The control method used for the nonvolatile memory device will be described hereinafter. Other sections in the third embodiment have similar functions and effects as the first embodiment.
In the fourth embodiment, NVM control sections in the medium controller include cache areas respectively. However, a high-speed accessible volatile memory with large capacity is adopted as the cache area used for the user data.
In the fourth embodiment, compared with the third embodiment, security of the management information is retained and higher speed access to the user data can be performed. In this case, however, when power-off arises, user data yet to be written into a nonvolatile memory device disappears.
Next, operations of media shown in
When in Step S61 the command does not correspond to the protocol used for the management information, whether or not target data is data on the user-data cache memory is determined (Step S62). When the target data is not data on the user-data cache memory, the user-data-use NVM control section controls the nonvolatile memory device 80 (Step S63). On the other hand, when the target data is data on the user-data cache memory, the user-data-cache-use NVM control section reads the target data from the user-data cache memory (Step S64).
On the other hand, when in Step S61 the command corresponds to the protocol used for the management information, whether or not target data is data on the management-information cache memory is determined (Step S65). When the target data is not data on the management-information cache memory, the management-information-use NVM control section controls the high-reliability nonvolatile memory device 90 (Step S66). On the other hand, when the target data is data on the management-information cache memory, the management-information-cache-use NVM control section reads the target data from the management-information cache memory (Step S67).
When the command does not correspond to the protocol used for the management information in Step S71, the medium determines whether or not free space used to write target data exists in the user-data cache memory (Step S72). When no free space exists in the user-data cache memory, the user-data-use NVM control section makes free space in the cache area (Step S73) and the processing proceeds to Step S74. On the other hand, when free space exists in the cache area, the user-data-use NVM control section writes the target data in the cache area (Step S74).
On the other hand, when in Step S71 the command corresponds to the protocol used for the management information, the medium determines whether or not free space used to write target data exists in the management-information cache memory (Step S75). When no free space exists in the management-information cache memory, the management-information-use NVM control section makes free space in the cache area (Step S76) and the processing proceeds to Step S77. On the other hand, when free space exists in the cache area, the management-information-cache-use NVM control section writes the target data in the cache area (Step S77).
Next, the user-data-use NVM control section controls read processing for the user data (Step S82). Then, the user-data-cache-use NVM control section controls read processing for the user data (Step S83). Next, the NVM-control selection section switches to the management-information-cache-use NVM control section and the management-information-cache-use NVM control section controls write processing for the management information (Step S84). Finally, while the user-data-cache-use NVM control section controls erase processing for the user data (Step S85), the NVM-control selection section switches to the user-data-use NVM control section and the user-data-use NVM control section controls erase processing for the user data (Step S86).
When the medium detects a CLR_MNG command transmitted from the host 100, whether or not target data is data on the management-information cache memory is determined (Step S91). When the target data is not data on the management-information cache memory, the processing proceeds to Step S92. On the other hand, when the target data is data on the management-information cache memory, the processing proceeds to Step S93.
Next, the management-information-use NVM control section controls read processing for the management information (Step S92). Then, the management-information-cache-use NVM control section controls read processing for the management information (Step S93). Next, the NVM-control selection section switches to the user-data-cache-use NVM control section and the user-data-cache-use NVM control section controls write processing for the user data (Step S94). Finally, while the management-information-cache-use NVM control section controls erase processing for the management information (Step S95), the NVM-control selection section switches to the management-information-use NVM control section and the management-information-use NVM control section controls erase processing for the management information (Step S96).
In the third and fourth embodiments, the user-data-use NVM control section and the management-information-use NVM control section include cache memories respectively. Optimum cache algorithms can be selected for the user data and the management information respectively. As a result, the third and fourth embodiments have similar functions and effects as the first embodiment.
In the fifth embodiment, a same nonvolatile memory device (refer to
(1) NVM Control Algorithm-1: Double Writing
When data (one page) is updated, one page in each of block A and block B is updated. In the method, the size of area is doubled and area to be stored is stored in two pages every update.
(2) NVM Control Algorithm-2: Alternate Writing
Every time data (one page) is updated, one page in block A and one page in block B are alternately updated. In the method, the size of area is doubled so as to store data doubly and one page in block A and one page in block B are alternately selected.
In either algorithm, after data is stored to up to final page, two new blocks are assigned and data in old blocks are erased.
There is assumed a case that power-off arises in the condition that a page address of a write destination corresponds to “m”.
(1) a case that power-off arises in Step S122:
A data error occurs in a read-source page m in the block A.
Data read succeeds in a read-source page m−1 in the block B (old management information before being updated).
(2) a case that power-off arises in Step S123:
Data read succeeds in a read-source page m in the block A.
A read-source page m in the block B is in an erased state (new management information after being updated).
(3) a case that power-off arises in Step S124:
Data read succeeds in a read-source page m in the block A.
A data error occurs in a read-source page m in the block B (new management information after being updated).
There is assumed a case that power-off arises in the condition that an address of write-destination page corresponds to “m”.
The case that power-off arises in Step S153:
(1) a case that a write-destination block is block A A data error occurs in a read-source page m in the block A.
Data read succeeds in a read-source page m−1 in the block B.
(2) a case that a write-destination block is block B
A data error occurs in a read-source page m in the block B.
Data read succeeds in a read-source page m in the block A.
In either case, old management information before being updated is read.
In the above-mentioned embodiment, the probability of data errors occurring in the management information is reduced by taking an adequate countermeasure against concentrated access to management information, the countermeasure being to disperse concentrated access to the management information. In addition, during store processing for the management information, power-off may arise or a medium may be pulled out. Even in such a case, since the same management information is written at two points (double writing), the management information may be stored in a safe condition at either of the two points and data errors are prevented from occurring.
The medium corresponding to an embodiment of the present invention can be realized by using one of the above-mentioned embodiments or combining more than one of the above-mentioned embodiments.
In the sixth embodiment, a host includes a medium, so that the host and the medium are integrated.
Series of processing performed in the above-mentioned information processing apparatus can be performed with hardware or software. Needless to say, the function for performing the series of processing is realized by combining hardware with software. When the series of processing is performed with software, a program including the software is installed from a program record medium into a computer embedded in dedicated hardware or a computer, in which various functions can be executed by installing various programs, for example, a general-purpose personal computer.
Then, the processing performed in each step described in the specification includes not only processing performed in temporal sequence along the order described in the specification but, instead of being performed in temporal sequence, processing performed in parallel, in a different order, or individually.
Since the above-mentioned embodiments are specific examples according to embodiments of the present invention, various sorts of technically desirable limitations are added to the above-mentioned embodiments. However, unless limiting the embodiments is described in the descriptions of the above-mentioned embodiments, embodiments of the present invention are not confined to the above-mentioned embodiments. For example, processing time, sequences of processing, and numerical condition of parameters described in the above-mentioned descriptions are just desirable examples. In addition, dimensions, configurations, and arrangements in figures used for descriptions are just used to schematically show an example of the embodiment.
The present application contains subject matter related to that disclosed in Japanese Priority Patent Application JP 2008-330883 filed in the Japan Patent Office on Dec. 25, 2008, the entire content of which is hereby incorporated by reference.
It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and alterations may occur depending on design requirements and other factors insofar as they are within the scope of the appended claims or the equivalents thereof.
Number | Date | Country | Kind |
---|---|---|---|
2008-330883 | Dec 2008 | JP | national |