Next Patent: Memory pools with moving memory blocks
Next Patent: Memory pools with moving memory blocks
Plaque It!
Sponsored by: Flash of Genius |
[0001] The present invention relates to a flash memory system comprising flash memories and, in particular, a method for merging data items stored in each of the flash memories.
[0002] A portable information processing appliance, such as a notebook computer, a personal digital assistant (PDA), and a digital camera, records large quantities of digital data such as image data in the internal recording media. As the recording medium, a large-recording-capacity, compact, and lightweight one is desirable. In particular, a portable information processing appliance, such as a digital video camera (DVC) and an audio player, records or reproduces large quantities of data in or from the recording media in real time. Accordingly, as the above-mentioned recording medium, the one that can manipulate large quantities of data at high speed is desirable. Furthermore, the portable information processing appliance operates for a long time only on its internal power supply such as a battery. Accordingly, as the above-mentioned recording medium, the one reducing the power consumption in input/output and holding of data is desirable. In addition, data that the portable information processing appliances handle is exchanged among the other various information processing appliances. For example, the image data taken with a digital still-video camera (DSC) is printed with a printer, subjected to digital processing with a personal computer, transmitted over a cellular phone, or reproduced on the television screen. Accordingly, as the above-mentioned recording medium, the one that can be shared among the various information processing appliances is desirable.
[0003] Semiconductor memories are in extensive use as the recording media that meet the above-mentioned requirements, as well as conventional flexible disks, hard disks, optical disks, and so on. In particular, card-type recording media with built-in flash memories, such as PC cards, (which are hereafter referred to as flash memory cards) are typical. A flash memory card is inserted into the specific slot of the information processing appliance, and exchanges data with the information processing appliance. The specific slot complies with a predetermined standard for flash memory cards. The information processing appliances with the specific slots can exchange data with each other through the same flash memory card.
[0004] A flash memory can hold data once stored therein for a long time without power consumption, in contrast to a RAM. Furthermore, it can electrically rewrite data in contrast to a ROM. In those respects, the flash memory has advantages as the above-mentioned recording medium over a RAM and a ROM.
[0005] A flash memory is generally divided into more than one page each having a fixed number of memory cells, and further divided into more than one physical block each having a fixed number of the pages. Each of the memory cells can take two states, “1” and “0”. Thereby, one of the memory cells can store one-bit data therein. The memory cell of the flash memory, for example, the NAND-type flash memory, comprises the following characteristics related to the transition between two states, “1” and “0”: The memory cells in the “1” state can change into the “0” state one by one. On the other hand, the memory cells in the “0” state can change into the “1” state only when all the cells belonging to the same physical block change collectively. Therefore, data stored in the flash memory can only be erased collectively in each of the physical blocks. Here, the data erasing means the initializing of all the memory cells inside the physical block into the “1” state. On the other hand, the data writing into the flash memory is enabled on the data-erased pages. Here, the data writing means causing some of the memory cells to change from the “1” state to the “0” state.
[0006] The flash memory cannot overwrite data with new data on the page in which data has already been stored. The reason is as follows: in the NAND-type flash memory, for example, the memory cells in the “0” state cannot individually change into the “1” state. Accordingly, overwriting of data with another data on the same page requires prior erasing of data in the whole of the physical block including the page. Accordingly, the overwriting duration of the flash memory is longer than that of a RAM, generally by the erasing duration.
[0007] For example, Published Japanese patent application No. H6-301601 gazette discloses a storage device that achieves high-speed data writing into flash memories. As the storage device, a conventional flash memory system writes data into more than one flash memory or more than one physical block in parallel, thereby shortening the writing duration.
[0008]
[0009] A host interface
[0010] In the flash memory controller
[0011] A write section
[0012] A flash memory
[0013] The address conversion section
[0014] As described above, the conventional flash memory card
[0015] In the conventional flash memory system like the above-described one, each of the overwriting operations at the same logical address entails the disabling of the enabled area in which the original data is stored, and then the number of the disabled areas increases. Accordingly, when the overwriting operation is repeated many times at the same logical address, the number of the disabled areas seriously increases compared with that of the enabled areas. Among the conventional flash memory systems, the one capable of managing links between the enabled areas belonging to the separate physical blocks, fragments data streams such as files into areas, and writes them discretely and randomly in the blank areas scattered across the various physical blocks. Especially, in such a flash memory system, the per-physical-block rate of the disabled areas to the enabled areas is generally high because of the repetition of the overwriting operation.
[0016] In a flash memory, data items are erased only collectively in each of the physical blocks. Therefore, the conventional flash memory system cannot perform the data erasing for many disabled areas inside the erasing target physical block when the physical block includes even one enabled area. Accordingly, the rate of the disabled areas to the enabled areas cannot be reduced. As a result of the above description, in the conventional flash memory system, the repetition of the overwriting operation seriously reduces the amount of data that can be stored in the flash memory compared with the storage capacity of the flash memory.
[0017] An object of the present invention is to provide a flash memory system that reduces the rate of the disabled pages to the enabled pages, thereby achieving an increase of the amounts of data that can be stored therein.
[0018] A flash memory system according to the present invention comprising:
[0019] (A) a flash memory comprising more than one physical block including more than one page having (a) a fixed memory capacity and (b) three states, namely, blank, enabled, and disabled states;
[0020] (B) an address conversion section for converting a logical address entered from the outside into one of the corresponding physical addresses of the pages;
[0021] (C) a read section for reading data from the enabled page;
[0022] (D) a write section for writing data onto each of the blank pages;
[0023] (E) an erase section for collectively erasing data in each of the physical blocks;
[0024] (F) a page-disabling section for disabling the enabled pages; and
[0025] (G) a merge control section for (a) selecting a source among the physical blocks, and (b) copying data on a predetermined number of the enabled pages belonging to the source physical block onto the blank pages using the read and write sections.
[0026] Here, the three states of the page are defined as follows: The blank state represents that data have not yet been written in the page after erasure of data. On the other hand, the enabled and disabled states are the states of the page in which data is written. The enabled and disabled states represent that the read section is allowed to read and prohibited from reading data from the page, respectively.
[0027] The above-described flash memory system particularly performs the overwriting of data at a logical address received from the outside as follows: At the time of a writing operation, the address conversion section converts the above-mentioned logical address into the physical address of a blank page. The write section writes new data received from the outside onto the page at the physical address. On the other hand, the page-disabling section disables the enabled page on which the original data is stored. Thereby, when reading data from the above-mentioned logical address, the read section accesses the page in which the new data is written in place of the above-mentioned disabled page. Thus, the above-described flash memory system realizes the overwriting of data at the same logical address without performing erasure of data. Therefore, the overwriting duration shortens by the duration required to erase data.
[0028] Furthermore, in the above-described flash memory system, the merge control section reads data on enabled pages from a predetermined physical block using the read section, and writes the data onto separate blank pages using the write section. Thereby, data on enabled pages inside the predetermined physical block can be copied into other physical blocks. In particular, when the data copying is finished on all the enabled pages inside the predetermined physical block, the erase section collectively erases data in the physical block. Hereafter, the copying of data on the enabled pages and the following erasure of data in the physical block are referred to as a merge process. The above-described flash memory system can erase data through the merge process on the disabled pages in the physical block that includes enabled pages, in contrast to conventional systems. Accordingly, the above-described flash memory system can reduce the rate of the disabled pages to the enabled pages. As a result, the amount of data that can be stored when overwriting is repeated is larger than that in the conventional systems.
[0029] The following may characterize the above-descried flash memory system:
[0030] when the write section writes new data, the merge control section
[0031] (A) counts the number of the physical blocks including only the blank pages;
[0032] (B) when obtaining a count equal to or smaller than a first threshold value, selects the source physical block;
[0033] (C) selects, as a source page, the enabled page (a) belonging to the source physical block and (b) at least, as many as the pages on which the new data is written;
[0034] (D) copies data on the source page onto the blank page;
[0035] (E) disables the source page using the page-disabling section; and
[0036] (F) performs erasing of data using the erase section for the physical block including none of the enabled pages. If the merge process is performed at every time of the writing of new data, the writing duration is longer by the duration of the merge process than that in the conventional flash memory system. Thus, when new data is written in the above-described flash memory system, the merge control section counts the number of the physical blocks that include only blank pages (which are hereafter referred to as blank physical blocks). When the count is smaller than the first threshold value, that is, the area available for the data writing is smaller than a predetermined size, the merge control section performs the merge process. Thus, the above-described flash memory system can reduce the extension of the writing duration due to the merge process by the restriction on the execution timing of the merge process.
[0037] Furthermore, the amount of data objects to be written is generally equal to the storage capacity on the order of the integral multiple of the physical block. Then, the merge control section adjusts the number of the source pages to the number equal to or more than the number of the pages on which new data is written. Thereby, when data is overwritten at the same logical address, the number of the physical blocks erased through the merge process can be adjusted to the number on the order of or more than the number of the blank physical blocks consumed by writing of new data. As a result, the above-described flash memory system avoids an increase in the rate of the disabled pages to the enabled pages when the overwriting of data is repeated.
[0038] The following may characterize the above-described flash memory system:
[0039] when the write section writes new data, the merge control section
[0040] (A) counts the number of the physical blocks including only the blank pages (namely, the blank physical blocks);
[0041] (B) when obtaining the count equal to or smaller than a second threshold value, prohibits the write section from writing new data and selects the source physical block;
[0042] (C) copies all data on the enabled pages belonging to the source physical block onto the blank pages belonging to one of the physical blocks different from the source physical block; and
[0043] (D) erases the data in the source physical block using the erase section. This flash memory system provides the merge process with a higher priority than the writing operation of new data when the remaining number of the physical blocks is smaller than the second threshold value. Thereby, the rate of the disabled pages to the enabled pages is reduced so that the number of the blank physical blocks is secured on or beyond the order of the second threshold value. As a result, the above-described flash memory system may increase the amounts of data that can be stored.
[0044] When the above-described flash memory system performs both of the above-described operation in the case of the remaining number of the blank physical blocks equal to or smaller than the first threshold value and the above-described operation in the case of the remaining number equal to or smaller than the second threshold value, the second threshold value is smaller than the first threshold value. Thereby, the merge process does not take precedence over the writing operation of new data until the blank physical blocks are too small in number to allow the writing of new data therein. As a result, the extension of the writing duration due to the merge process can be reduced.
[0045] The above-described flash memory system may further comprise an address memory for storing a list of the addresses of the physical blocks and the numbers of the disabled pages belonging to the physical blocks. The merge control section, when selecting the source physical block, accesses the address memory and consults the above-mentioned list. Thereby, the section can select the source physical blocks easily and quickly in decreasing order of the number of the disabled pages that the physical blocks include. As a result, the time required to the above-described merge process can shorten since the number of the enabled pages whose data should be copied is minimized.
[0046] The following may characterize the above-described flash memory system:
[0047] (A) a predetermined number of the pages belonging to each of the separate physical blocks are assigned to one area;
[0048] (B) the read section reads data from more than one of the enabled pages belonging to the same area in parallel;
[0049] (C) the write section writes data onto more than one of the blank pages belonging to the same area in parallel; and
[0050] (D) the page-disabling section disables all of the enabled pages belonging to the same area. This flash memory system always performs input and output of data to and from the flash memory on an area-by-area basis, that is, more than one page in parallel. Accordingly, the system operates at speeds faster than that of the flash memory system performing input and output of data to and from the flash memory on a page-by-page basis.
[0051] The following may further characterize the above-described flash memory system:
[0052] (A) the flash memory system comprises two or more of the flash memories; and
[0053] (B) at least two of the read section, the write section, the erase section, the page-disabling section, and the merge control section operate in parallel with each other for the respective flash memories. In this flash memory system, for example, the write section writes new data in one of the flash memories. In parallel with that, the merge control section performs the merge process in another of the flash memories. Thereby, the extension of the writing duration due to the merge process can be reduced compared to that of the flash memory system that includes only one flash memory.
[0054] According to one aspect of the present invention, a method for merging data items stored in a flash memory is the method for merging data items stored in the flash memory comprising more than one physical block including more than one page having (a) a fixed memory capacity and (b) three states, namely, blank, enabled, and disabled states, and comprises the steps of:
[0055] (A) selecting a source among the physical blocks;
[0056] (B) copying data on a predetermined number of the enabled pages belonging to the source physical block onto the blank pages; and
[0057] (C) erasing data in each of the physical blocks. This method for merging copies data on the enabled pages inside a predetermined physical block into other physical block and erases data in the physical block collectively. Through such a merge process, data on the disabled pages of the physical blocks including enabled pages can be erased. Therefore, the above-described method for merging can reduce the rate of the disabled pages to the enabled pages. As a result, the amounts of data that can be stored in the flash memory can increase.
[0058] According to another aspect of the present invention, a method for merging data items stored in a flash memory is the method for merging data items stored in the flash memory comprising more than one physical block including more than one page having (a) a fixed memory capacity and (b) three states, namely, blank, enabled, and disabled states, and comprises the steps of:
[0059] (A) counting the number of the physical blocks including only the blank pages;
[0060] (B) comparing the count with a first threshold value;
[0061] (C) performing writing of new data and obtaining the number of the target pages of the writing when the count is equal to or smaller than the first threshold value;
[0062] (D) selecting a source among the physical blocks;
[0063] (E) selecting, as a source page, the enabled page (a) belonging to the source physical block, and (b) at least, as many as the pages on which the new data is written;
[0064] (F) copying data on the source page onto the blank page;
[0065] (G) disabling the source page;
[0066] (H) selecting the physical block including none of the enabled pages as an erasing target physical block; and
[0067] (I) erasing data in the erasing target physical block. This method for merging performs the merge process when the number of the blank physical blocks is smaller than the first threshold value, in other words, when the area available for the data writing is smaller than a predetermined size. Accordingly, the restriction on the execution timing of the merge process can reduce the extension of the writing duration due to the merge process.
[0068] Furthermore, the amount of data objects to be written is generally equal to the storage capacity on the order of the integral multiple of the physical block. In the above-described method for merging, the number of the source pages is equal to or more than the number of the target pages of writing of new data. Accordingly, the physical blocks that become erasable by the copy of the data on the enabled pages can increase in number to the order of or more than the number of the blank physical blocks consumed by the writing of new data, especially when data is overwritten at the same logical address. As a result, the above-described method for merging can avoid the increase in the rate of the disabled pages to the enabled pages when the overwriting of data is repeated.
[0069] According to still another aspect of the present invention, a method for merging data items stored in a flash memory is the method for merging data items stored in the flash memory comprising more than one physical block including more than one page having (a) a fixed memory capacity and (b) three states, namely, blank, enabled, and disabled states, comprises the steps of:
[0070] (A) counting the-number of the physical blocks including only the blank pages (namely, the blank physical blocks);
[0071] (B) comparing the count with a second threshold value;
[0072] (C) prohibiting writing of new data when the count is equal to or smaller than the second threshold value;
[0073] (D) selecting a source among the physical blocks;
[0074] (E) selecting, as source pages, all data items on the enabled pages belonging to the source physical block;
[0075] (F) copying the data item on the source page onto the blank page belonging to the physical block different from the source physical block; and
[0076] (G) erasing data in the source physical block. This method for merging provides the merge process with a higher priority than the writing operation of new data, when the remaining number of the blank physical blocks is smaller than the second threshold value. Thereby, the rate of the disabled pages to the enabled pages is reduced so that the number of the blank physical blocks is secured on or beyond the order of the second threshold value. As a result, the amounts of data that can be stored in the flash memory can increase in the above-described method for merging.
[0077] When the above-described method for merging includes both of the above-described merge process in the case of the remaining number of the blank physical blocks equal to or smaller than the first threshold value and the above-described merge process in the case of the remaining number equal to or smaller than the second threshold value, the second threshold value is smaller than the first threshold value. Thereby, the merge process does not take precedence over the writing operation of new data until the blank physical blocks are too small in number to allow the writing of new data therein. As a result, the extension of the writing duration due to the merge process can be reduced.
[0078] In the above-described method for merging, the step of selecting the source physical block may comprise the substep of consulting a list of the addresses of the physical blocks and the numbers of the disabled pages that belong to the physical blocks. Thereby, the source physical block can be selected easily and quickly in decreasing order of the number of the disabled pages that the physical blocks include. As a result, the time required to the above-described merge process can shorten since the number of the enabled pages whose data should be copied is minimized.
[0079] While the novel features of the invention are set forth particularly in the appended claims, the invention, both as to organization and content, will be better understood and appreciated, along with other objects and features thereof, from the following detailed description taken in conjunction with the drawings.
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090] It will be recognized that some or all of the Figures are schematic representations for purposes of illustration and do not necessarily depict the actual relative sizes or locations of the elements shown.
[0091] The following explains the best mode for carrying out the present invention with describing some preferable Embodiments and referring to the drawings.
[0092]
[0093] A host interface
[0094] The buffer
[0095] Flash memories
[0096]
[0097] The flash memory
[0098] Two target pages of writing or reading are selected from separate physical blocks. For example, the two pages hatched in
[0099] The erasing circuit
[0100] The flash memory controller
[0101] An address conversion section
[0102] The blank state represents that data has not yet been written in the area after the erasure of data. On the other hand, the enabled and disabled states are the states of the area in which data is written. The enabled and disabled states represent that the read section
[0103] Information about the state of each area is stored in the redundant area added to each page of the flash memory
[0104] The address conversion section
[0105] When a logical address AL shows a target of reading data, the address conversion section
[0106] When a logical address AL shows a target of writing data, the address conversion section
[0107] As described above, the writing and reading of data into and from the flash memory
[0108] When a logical address AL shows a target of erasing data, the address conversion section
[0109] At the time of the data writing, the address conversion section
[0110] The page-disabling section
[0111] As described above, the flash memory card
[0112] The flash memory card
[0113]
[0114] The merge control section
[0115] Step S
[0116] The merge control section
[0117] Step S
[0118] The number N of the blank physical blocks counted in Step S
[0119] Through Step S
[0120] <The First Merge Process S
[0121]
[0122]
[0123] Substep S
[0124] As shown in (a) of
[0125] Substep S
[0126] The merge control section
[0127] Substep S
[0128] The merge control section
[0129] Substep S
[0130] The merge control section
[0131] Substep S
[0132] The merge control section
[0133] Substep S
[0134] The merge control section
[0135] Substep S
[0136] The merge control section
[0137] Substep S
[0138] It is checked whether an erasing target physical block BE can be selected in Substep S
[0139] Substep S
[0140] The merge control section
[0141] As described above, the first merge process S
[0142] <The Second Merge Process S
[0143]
[0144] Substep S
[0145] The merge control section
[0146] Substep S
[0147] The merge control section
[0148] Substep S
[0149] The merge control section
[0150] Substep S
[0151] The merge control section
[0152] Substep S
[0153] The merge control section
[0154] Substep S
[0155] The merge control section
[0156] As described above, the second merge process S
[0157] The flash memory
[0158]
[0159] A flash memory controller
[0160] The duration of data transfer between the flash memory controller
[0161] For example, when writing data into the first flash memory
[0162] <The First Merge Process S
[0163] In the first merge process S
[0164] <The Second Merge Process S
[0165] In the second merge process S
[0166]
[0167] The two flash memories
[0168] A flash memory controller
[0169] As described above, the flash memory system according to the present invention can copy data on the enabled pages inside a predetermined physical block into other physical blocks. Furthermore, at the end of the copying of data on all the enabled pages inside the predetermined physical block, the system can erase collectively data in the physical block. Through such a merge process, the flash memory system according to the present invention can erase data on the disabled pages inside the physical block including enabled pages, in contrast to conventional systems. Accordingly, the flash memory system according to the present invention can reduce the rate of the disabled pages to the enabled pages. As a result, the amount of data that can be stored at the time of the repetition of the overwriting of data is larger than those of the conventional systems.
[0170] The flash memory system according to the present invention may further perform the above-described merge process when new data is written therein and the number of blank physical blocks is smaller than the first threshold value. Thus, the above-described flash memory system can reduce the extension of the writing duration due to the copying of data by the restriction of the execution timing of the merge process.
[0171] The flash memory system according to the present invention may adjust the number of the source pages to be equal to or more than the number of the pages on which new data is written. Thereby, when data is overwritten at the same logical address, the system can adjust the number of the physical blocks erased in the above-described merge process to be on or beyond the order of the number of the blank physical blocks consumed by the writing of new data. As a result, the system can avoid an increase in the rate of the disabled pages to the enabled pages at the time of the repetition of the overwriting of data. Therefore, the system can increase the amounts of data that can be stored.
[0172] The flash memory system according to the present invention may provide the above-described merge process with a higher priority than the writing operation of new data when the number of the blank physical blocks is smaller than the second threshold value. Thereby, the system can reduce the rate of the disabled pages to the enabled pages so as to secure the number of the blank physical blocks on or beyond the order of the second threshold value. As a result, the system can increase the amounts of data that can be stored.
[0173] The second threshold value is smaller than the first threshold value when the above-described flash memory system performs both of the operation in the case of the number of the blank physical blocks equal to or smaller than the first threshold value and the operation in the case of the number equal to or smaller than the second threshold value. Thereby, the merge process does not take precedence over the writing operation of new data until the blank physical blocks are too small in number to allow the writing of new data therein. As a result, the extension of the writing duration due to the merge process can be reduced.
[0174] The flash memory system according to the present invention may comprise a list of the addresses of the physical blocks and the numbers of the disabled pages belonging to the physical blocks. The above-mentioned list is consulted at the time of the selection of the source physical block in the above-described merge process. Thereby, the source physical block is selected easily and quickly in decreasing order of the number of the disabled areas, the physical block including the largest number of the disabled areas first. As a result, the time required to the above-described merge process shortens since the number of the enabled pages targeted for the above-described merge process is minimized.
[0175] The above-described disclosure of the invention in terms of the presently preferred embodiments is not to be interpreted as intended for limiting. Various alterations and modifications will no doubt become apparent to those skilled in the art to which the invention pertains, after having read the disclosure. As a corollary to that, such alterations and modifications apparently fall within the true spirit and scope of the invention. Furthermore, it is to be understood that the appended claims be intended as covering the alterations and modifications.
[0176] Industrial Applicability
[0177] According to the present invention, for flash memories, the per-physical-block rate of the disabled pages to the enabled pages can be maintained low enough. Thereby, a substantial increase in the storage capacity can be achieved for the flash memories. Therefore, the industrial applicability in the present invention is very high.