This application claims a priority based on Japanese Patent Application No. 2000-169289 filed on Jun. 6, 2000, the entire contents of which are incorporated herein by reference for all purposes.
The present invention relates to a semiconductor memory device, more particularly to a semiconductor memory device using a storage medium which requires data erasion for each predetermined block in writing data thereto.
As an external storage device for such as a portable terminal device, a semiconductor memory device mounting a semiconductor memory has been rapidly spread. In such semiconductor memory device, generally, a flash memory has been used as the semiconductor memory, which is capable of performing simultaneous erasing/rewriting of data electrically, and which is non-volatile, shows low power consumption, and can store a large capacity of data.
With such flash memory, in order to deal with a recent demand for storing a large capacity of data, a flash memory adopting multi-valued structure capable of storing two or more bit data in one cell has been introduced instead of a flash memory adopting a binary-valued structure storing one bit data in one cell.
Since such a flash memory adopting the multi-valued structure can store the two or more bit data in one cell, storage capacity per unit area increases. However, since a cell adopting the multi-valued structure takes more processing time for data erasing/writing than a cell adopting the binary-valued structure, the flash memory adopting the multi-valued structure, the flash memory adopting the multi-valued structure shows lowered writing processing performance than the flash memory adopting the binary-valued structure, in the case that the size of a unit block (hereinafter referred to as an erase block) of the flash memory adopting the multi-valued structure, for erasing/writing of batch data is the same as that of the flash memory adopting the binary-valued structure.
Accordingly, a countermeasure to expand the size of the erase block has been taken. With this countermeasure, the number of times (the number of erase blocks) or erasing/writing batch data simultaneously can be reduced in writing a certain quantity of data, and hence lowering of data processing performance can be prevented.
Furthermore, when the erase block is subdivided and the erase block increase in number, more peripheral circuits coping with the increase of the number of erase blocks is required, and a chip area is expanded as a whole, resulting in a decrease in a yield rate in manufacturing the flash memory. However, the expansion of the chip area is controlled by expanding the size of the erase blocks and by decreasing the number of erase blocks, leading to an improvement of the yield rate.
On the other hand, when a host system reads out file data from such an external storage device and writes it thereinto, the host system generally uses a sector as a unit of access similarly to a hard disc device, or the like. A size of one sector is, for example, 512 bytes.
In the semiconductor memory device which has the flash memory adopting the binary-valued structure, generally, the size of this sector and the size of the erase block are made to be coincident with each other. On the other hand, in the semiconductor memory device which has the flash memory adopting the multi-level structure, the size of the erase block is expanded as described above, and the plurality of sectors are collected into one as the erase block. Thus, when the host system sends a command to the semiconductor memory device so as to write batch data into the plurality of sectors thereof simultaneously, it is possible to erase the batch data from the plurality of sectors and write the data thereinto simultaneously. Therefore, the semiconductor memory device which has the flash memory adopting the multi-valued structure can more shorten the processing time compared to the semiconductor memory device which has the flash memory adopting the binary-valued structure.
Furthermore, when the semiconductor memory devices having the flash memory are used, the host system often executes a file data management according to file allocation table (hereinafter referred to as FAT) file system, which is the commonest as a file management system for the hard disc device.
A partition in which the FAT file system is constructed (hereinafter referred to as a FAT partition) has a management data area (a partition boot record (hereinafter referred to as a PBR) area, a FAT area and the like), which is for storing management data, and a FAT file area for storing file data. The FAT file area among these areas is managed using each cluster composed of the plurality of sectors amounting to 4, 8, 16, 32 sectors in number and the like as a unit.
In a situation where the host system stores the file data in the FAT file area, a writing operation using each cluster as a unit is frequently performed. In the flash memory adopting the multi-valued structure the number K (K: an integer equal to two or more) of the sectors constituting the erase block is normally set to a number so as to be able to divide the number J of the sectors constituting the cluster. Specifically, the number J of the sectors constituting the cluster is equal to Kxc3x97L pieces (L: a positive integer).
Consideration will be given to the case where the host system allocates FAT partitions onto the flash memory mounted on the semiconductor memory device for managing file data using the FAT file system.
In the semiconductor memory device mounting the conventional flash memory, the host system allocated a logical address, which is used for the host system to manage a sector number, to a physical address having an equal value of the flash memory.
When such an allocation is performed, the following two cases are conceived with respect to a correlation between the cluster and the erase block in the FAT area.
In the case 1, the logical address of a head sector of a cluster and the physical address of a head sector of an eraser block correspond to each other. In the case 2, the logical address of the head sector of the cluster and the physical address of the head sector of the erase block do not correspond to each other.
For example, when the erase block consists of four sectors (K=4) and the cluster consists of eight sectors (J=8, L=2), one cluster consists of eight sectors included in continuous two erase blocks in the case 1 without any surplus or shortage. However, since the head of the cluster and the head of the erase block disagree with each other, one cluster consists of the middle eight sectors among the twelve sectors included in the three continuous erase blocks.
To be specific, in the case 2, the clusters adjacent to each other (hereinafter referred to as clusters A and B) share one erase block (hereinafter referred to as a block M).
Here, among the four sectors constituting the block M, a sector portion included in the cluster A is set as a sector portion X, and a sector portion included in the cluster B is set as a sector Y. When the host system writes data into the cluster A, the data of the sector portion Y is erased as batch data of the block M irrespective of no necessity to rewrite the data of the sector portion Y, and the original data is written thereinto again. Furthermore, also when the host system writes data into the cluster B, the data of the sector portion X is erased as batch data of the block M irrespective of no necessity to rewrite the data of the sector portion X, and the original data is written thereinto again.
Accordingly, when the data is written into each cluster of the FAT file area evenly, the number of times of erasing/writing operations performed for each erase block shared by the clusters adjacent to each other such as the block M must be twice the number of times of erasing/writing operations performed for an erase block included in a single cluster (hereinafter referred to as a block N), and hence a life of a memory element in the block M is reduced by half compared to that in the block N in terms of probability.
Furthermore, though erasing and writing operations for the two erase blocks is necessary to write the data into one cluster in the case 1, erasing and writing operations for the three erase blocks is required to write the data into one cluster in the case 2. Accordingly, the speed of the writing operation is slower compared to that in the case 1.
The object of the present invention is to provide a semiconductor memory device capable of reducing the number of times of an erasing operation for each block or the number of blocks erased by one writing operation to the minimum.
The semiconductor memory device according to the present invention is accessed by using logical addresses from a host system which divides and manages file data by using clusters each of which is composed of a plurality of sectors and is a unit for dividing a managing, and the semiconductor memory device comprises: a memory section composed of the plurality of sectors, which is capable of erasing data for each block; and a control section for transforming a logical address to a physical address so that the logical address of a head sector of the cluster corresponds to the physical address of a head sector of the block, and for accessing the memory section by using the physical address thus transformed.
In this case, the logical address may be transformed to the physical address by applying an address offset value to the logical address.
A computation of the address offset value may be executed by the use of total storage capacity information of the memory section immediately after beginning power supply.
Furthermore, by the use of information concerning a partition made on the memory section, the computation of the address offset value may be executed when the information concerning the partition is written. The information concerning the partition is, for example, data written into an address xe2x80x9c0xe2x80x9d of the logical address.
In a file system made on the memory section, the computation of the address offset value may be executed, by the use of management information used to manage the file data, when the management information is written.
The management information is, for example, data written into a logical address range occupied by a management data area of the file system. In a case where a file system is, for example, the FAT file system, the management information is data of the PBR.
An information processing device according to the present invention has a feature in that this device includes the semiconductor memory device as described above.
A host system according to the present invention divides and manages file data by using clusters each of which is composed of a plurality of sectors and is a unit for dividing and managing. When the host system accesses a memory section composed of the plurality of sectors which is capable of erasing data for each block, the host system transforms a logical address to a physical address so that the logical address of a head sector of the cluster corresponds to the physical address of a head sector of the block and accesses the memory section by using the physical address thus transformed
USPTO Backgrounds
USPTO Backgrounds