The present invention relates to a semiconductor memory and a method for controlling the same and, specifically, to a semiconductor memory capable of storing multi-value data in each memory cell and a method for controlling the same.
The NAND flash memory has been known as an electrically-rewritable nonvolatile semiconductor device. The NAND flash memory includes transistors connected in series to constitute memory cells, these serially-connected memory cells being connected to a bit line as a single unit. In this NAND flash memory, a write or read operation is performed simultaneously on all or a half of a plurality of cells aligned in a row direction.
Recently, multivalued memories have been developed wherein a plurality of bits are stored in one cell of a NAND flash memory. For example, Japanese Laid-Open Patent Publication No.2001-93288 discloses a method for writing data in a multivalued NAND flash memory.
As shown in
First, data of the first page is written in a memory cell. If the written data is “1”, the data of the memory cell stays in State “0”. If the written data is “0”, the data of the memory cell changes into State “1”. Then, data of the second page is written in the memory cell. If the memory cell in State “1” as a result of the writing of the first page data is externally supplied with data “0”, the memory cell enters State “2”. If the memory cell staying in State “0” even after the writing of the first page data is externally supplied with data “0”, the memory cell enters State “3”.
Thus, in the case of writing the first page in a memory cell being in the erased state (State “0”), if the written data is “1” or “0”, the state of the memory cell enters State “0” or State “1”, respectively. Then, the second page is written, so that the state of the memory cell enters any of State “0”, State “1”, State “2”, and State “3”.
Where the second page is written in a memory cell being in the erased state before writing of the first page, if the written data of the second page is “1” or “0”, the state of the memory cell enters State “0” or State “3”, respectively.
In the floating gate type memory cell, such as a NAND flash memory, or the like, the threshold voltage of a memory cell is increased by writing but decreased by erasing. Therefore, the memory cell in the state of the highest threshold voltage among the four states, i.e., State “3”, cannot be restored to State “1” or State “2” by a write operation. That is, if the second page data is written first, the first page data cannot be written, so that it cannot work as a multivalued memory.
The order of writing in the multivalued memory is limited to the order of the first page and then the second page, and therefore, the write operation cannot be carried out with randomly designated addresses.
An objective of the present invention is to enable random designation of addresses for writing of data in a multi-value storable memory cell.
Specifically, the first control method of the present invention is a method for controlling a semiconductor memory which includes a memory cell array including a plurality of multivalued memory cells where, in each of the memory cells, a first write operation allows storage of data in a first page address and a second write operation allows storage of data in a second page address, the method comprising: an address conversion table processing step of generating an address conversion table for address conversion by, in each of the plurality of multivalued memory cells, allocating addresses in which writing is to be performed to addresses such that data is written in a second page address after writing of data in a first page address; an address scramble step of performing address conversion on an input address according to the address conversion table; and a data write step of writing data in an address obtained by the address conversion of the address scramble step.
With this method, an input address is converted such that writing of data in first page addresses of a memory space is performed by priority. Therefore, writing of data in a second page address does not occur prior to the first page addresses.
The second control method of the present invention is a method for controlling a semiconductor memory which includes a memory cell array including a plurality of multivalued memory cells where, in each of the memory cells, a first write operation allows storage of data in a first page address and a second write operation allows storage of data in a second page address, the method comprising: an address replacement step of, if a given address is a first page address, replacing the first page address with a corresponding second page address, and if a given address is a second page address, replacing the second page address with a corresponding first page address; a flag determination step of, if address replacement has occurred, generating an address replacement flag indicative of the occurrence of the address replacement in association with an input address; a flag storage step of storing the address replacement flag; and a data write step of writing data in the memory cell array, wherein if the input address is a second page address and writing of data has not occurred in a first page address corresponding to the second page address, or if the input address is a first page address and writing of data has occurred in this first page address, the address replacement step is performed on the input address, and the data write step is performed using the address obtained by the address replacement, and if otherwise, the data write step is performed using the input address without performing the address replacement step.
With this method, even when an address is input such that writing of data in a second page address may occur prior to first page addresses, writing of data actually occurs in the first page addresses prior to the second page address.
According to the present invention, writing of data occurs in the first page addresses prior to the second page addresses irrespective of the order of input addresses. Therefore, storage of data in a multivalued memory cell can be normally carried out.
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
The memory cell array 22 includes a plurality of bit lines, a plurality of word lines, a common source line, and a plurality of memory cells arranged in a matrix which are capable of electrically rewriting data. In this example, each memory cell is capable of storing four-value data (2 bits). The bit line control circuit 26 includes a plurality of data storage circuits and operates through bit lines to read memory cell data from the memory cell array 22, to detect the state of the memory cells, and to apply a write control voltage to the memory cells for writing of data.
The column decoder 28 selects a data storage circuit in the bit line control circuit 26. The selected data storage circuit receives memory cell data from the memory cell array 22 and outputs the memory cell data through the data input/output circuit 24 and a data input/output terminal to the outside. Write data externally input at the data input/output terminal is input through the data input/output circuit 24 to a data storage circuit selected by the column decoder 28.
The control signal generation circuit 12 and the control voltage generation circuit 14 are controlled according to a control signal externally input through a control signal input terminal. The control signal generation circuit 12 controls the memory cell array 22, the data input/output circuit 24, the bit line control circuit 26, the column decoder 28, and the word line control circuit 36. The control voltage generation circuit 14 generates voltages necessary for writing, verifying, reading, and erasing of data, and supplies the generated voltages to the memory cell array 22, the data input/output circuit 24, the bit line control circuit 26, the column decoder 28, and the word line control circuit 36. The word line control circuit 36 selects a word line in the memory cell array 22 to supply the selected word line with a voltage necessary for reading, writing, or erasing of data.
At step S12, the control signal generation circuit 12 determines whether to perform a read process or write process according to a control signal input at the control signal input terminal. If the write process is selected, the operation proceeds to step S14. If the read process is selected, the operation proceeds to step S42.
At step S14, the address of data which is to be written is input to the data input/output circuit 24 through the data input/output terminal. The data input/output circuit 24 forwards the input address to the address conversion table processing circuit 32 and the address scramble circuit 34.
At step S16, the bit line control circuit 26 retrieves an address conversion table from the memory cell array 22 and forwards the retrieved table to the address conversion table processing circuit 32 though the data input/output circuit 24.
At step S18, the address conversion table processing circuit 32 refers to the address conversion table to check whether or not the first page includes a writable address. The writable address is a physical address which is not associated with any input address in the address conversion table and in which data has not been written. If the first page includes a writable address, the operation proceeds to step S22. If not, i.e., if all the physical addresses of the first page of the memory cell array 22 have been allocated, the operation proceeds to step S26.
At step S22, the address conversion table processing circuit 32 determines the minimum address among the writable addresses of the first page. At step S24, the address conversion table processing circuit 32 allocates the physical address determined at step S22 to the input address. For example, in
At step S26, the address conversion table processing circuit 32 determines the minimum address among the writable addresses of the second page. At step S28, the address conversion table processing circuit 32 allocates the physical address determined at step S26 to the input address.
At step S32, the address conversion table processing circuit 32 adds the correspondence between the input address and the physical address newly established at step S24 or step S28 to the address conversion table retrieved at step S16, thereby generating a new address conversion table. The address conversion table processing circuit 32 records the new address conversion table in the memory cell array 22 and, meanwhile, forwards the new address conversion table to address scramble circuit 34.
At step S34, the address scramble circuit 34 uses the address conversion table to convert the input address to a corresponding physical address. At step S36, the address scramble circuit 34 outputs the obtained physical address to the bit line control circuit 26 and the word line control circuit 36 and writes input data in this physical address of the memory cell array 22.
At step S42, the address of data which is to be read is input to the data input/output circuit 24 through the data input/output terminal. The data input/output circuit 24 forwards the input address to the address scramble circuit 34. At step S44, the bit line control circuit 26 reads the address conversion table from the memory cell array 22 and forwards this table to the address conversion table processing circuit 32 though the data input/output circuit 24. The address conversion table processing circuit 32 forwards the address conversion table to the address scramble circuit 34.
At step S46, the address scramble circuit 34 uses the address conversion table to convert the input address to a physical address. At step S48, the address scramble circuit 34 outputs the obtained physical address to the bit line control circuit 26 and the word line control circuit 36 and transfers the data of this physical address from the memory cell array 22 to the data input/output circuit 24.
Thus, the semiconductor memory of
At step S52, the address conversion table processing circuit 32 determines whether or not the address in which immediately-previous writing has occurred is a first page address. If it is a first page address, the operation proceeds to step S54. If it is not a first page address, the operation proceeds to step S22.
At step S54, the address conversion table processing circuit 32 identifies a second page address which is the counterpart of the first page address of the immediately-previous writing, i.e., an address of the second page of the memory cell in which the immediately-previous writing has occurred. For example, where the address in which the immediately-previous writing has occurred is address 0003H of the first page, and address 0003H corresponds to physical address 0000H, the address conversion table processing circuit 32 operates for input address 0006H to identify address 0001H of the second page which is the counterpart of physical address 0000H (see
In the process of
The memory cell array 222 has n blocks, Block 1 to Block n, which are connected to the word line control circuits 36A, . . . 36N, respectively. The word line control circuits 36A, . . . 36N are connected to the address scramble circuits 34A, . . . 34N, respectively.
The predecoder 38 outputs an input address to any of the n address scramble circuits 34A, . . . 34N according to the input address. When receiving the address, the selected one of the address scramble circuits 34A, . . . 34N uses a corresponding one of the word line control circuits 36A, . . . 36N to write data in or read data from a corresponding block of the memory cell array 222. In the other respects, the semiconductor memory of
Thus, according to the semiconductor memory of
In the case of a write process, after the process of step S32 of
In the case of a read process, after the process of step S44, the address conversion table processing circuit 332 determines, at step S45, whether or not an input address has been address-converted in a write process according to the address conversion table.
If address-converted, the address conversion table processing circuit 332 controls the selector 342 to output the input address to the address scramble circuit 334, and then, the operation proceeds to step S46. If not address-converted, the address conversion table processing circuit 332 controls the selector 342 to output the input address to the word line control circuit 336, and then, the operation proceeds to step S48. In the other respects, the address conversion table processing circuit 332, the address scramble circuit 334, and the word line control circuit 336 operate in the same way as the corresponding circuits of
Thus, according to the semiconductor memory of
When powering on, the bit line control circuit 26 retrieves the address conversion table from the memory cell array 22 and forwards the retrieved address conversion table to the volatile memory 444 through the data input/output circuit 24. The address conversion table processing circuit 432 reads the address conversion table from and writes the address conversion table in the volatile memory 444 instead of the memory cell array 22. When powering off, the address conversion table processing circuit 432 retrieves the address conversion table from the volatile memory 444 and writes the retrieved address conversion table in the memory cell array 22.
According to the semiconductor memory of
When powering on, the address conversion table processing circuit 532 retrieves the address conversion table from the nonvolatile memory 546 and forwards the retrieved address conversion table to the volatile memory 444. The address conversion table processing circuit 532 reads the address conversion table from and writes the address conversion table in the volatile memory 444. The address conversion table processing circuit 532 operates such that the address conversion table of the volatile memory 444 is forwarded to and stored in the nonvolatile memory 546 on the background.
According to the semiconductor memory of
According to the semiconductor memory of
In a write operation, the semiconductor memory of
At step S64, the selector 742 determines whether or not writing of data has occurred in a first page address corresponding to the input address. If writing of data has occurred there, the operation proceeds to step S36. If writing of data has not occurred there, the operation proceeds to step S66. The determination of step S64 may be realized by actually reading data from the memory cell and determining the state of the memory cell or by retrieving from a separate memory for address management the data indicative of the state of the memory cell as to writing of data.
At step S70, the selector 742 determines whether or not writing of data has occurred in the input address (first page address). If writing of data has occurred there, the operation proceeds to step S66. If writing of data has not occurred there, the operation proceeds to step S36.
At step S66, the selector 742 outputs the input address to the address replacement circuit 748. If the address received from the selector 742 is a second page address, the address replacement circuit 748 replaces the second page address with a corresponding first page address and outputs this first page address to the word line control circuit 36. If the address received from the selector 742 is a first page address, the address replacement circuit 748 replaces the first page address with a corresponding second page address and outputs this second page address to the word line control circuit 36.
The corresponding first and second page addresses are different only in that, normally, the least significant bit of the first page address is “0” and the least significant bit of the second page address is “1”. Thus, the address replacement circuit 748 only needs to change the least significant bit of the input address from “1” to “0” or from “0” to “1”.
At step S68, the flag determination circuit 752 writes an address replacement flag indicative that address replacement has occurred in the flag storage circuit 754 in association with the input address. The process of step S36 is the same as that performed in the flowchart of
In a read operation, the semiconductor memory of
At step S72, the flag determination circuit 752 retrieves from the flag storage circuit 754 an address replacement flag corresponding to the input address. At step S74, if the address replacement flag indicates that address replacement has occurred, the operation proceeds to step S76. If not, the operation proceeds to step S48.
At step S76, the selector 742 outputs the input address to the address replacement circuit 748. The address replacement circuit 748 performs address replacement on the input address in the same way as step S66 and outputs the resultant address to the word line control circuit 36. The process of step S48 is the same as that performed in the flowchart of
Thus, according to the semiconductor memory of
The flag determination circuit 852 stores the address replacement flag in the memory cells of column exBL and retrieves the address replacement flag from these memory cells, although in the circuit of
The semiconductor memory of
(1) address replacement occurs in all the pages in the block;
(2) address replacement does not occur in any page in the block; and
(3) the block includes both an address-replaced page and an address-unreplaced page.
In
At step S12, the control signal generation circuit 12 determines, based on a control signal input to the control signal input terminal, which of read and write processes is to be performed. If the write process is to be performed, the operation proceeds to step S114. If the read process is to be performed, the operation proceeds to step SI32. At step Si14, the control circuit 956 determines the number of a block corresponding to an input address.
At step S116, the control circuit 956 retrieves from the flag storage circuit 954 block information BLI of that block. At step S118, the control circuit 956 determines based on block information BLI whether or not the block includes an address-replaced page. If the block includes an address-replaced page, the operation proceeds to step S126. If the block does not include any address-replaced page, the operation proceeds to step S120.
At step S120, the control circuit 956 determines whether or not the retrieved block information BLI is identical with block information BLI which is going to be written. If identical, the operation is ended because the states of the pages are definite. If not identical, the operation proceeds to step S122. At step S122, the control circuit 956 writes in the flag storage circuit 954 block information BLI indicative that the block includes an address-replaced page.
At step S124, the control circuit 956 writes in the flag storage circuit 954 address pointer information API indicative of the location where page information PGI which is going to be written at step S126 is stored. At step S126, the control circuit 956 writes in the flag storage circuit 954 page information PGI indicative of the status of address replacement in each page. As a result of such a process, the states of the pages are definite.
The processes of step S132 and step S134 are the same as those of step S114 and step S116, respectively. At step S136, the control circuit 956 determines based on block information BLI whether or not the block includes an address-replaced page. If the block includes an address-replaced page, the operation proceeds to step S138. If the block does not include any address-replaced page, the operation is ended because the states of the pages are definite.
At step S138, the control circuit 956 retrieves from the flag storage circuit 954 address pointer information API of a block in which reading of data is going to be carried out. At step S140, the control circuit 956 performs an address calculation to determine the address of data which is to be read.
At step S142, the control circuit 956 retrieves from the flag storage circuit 954 page information PGI of the block in which reading of data is going to be carried out. As a result of such a process, the states of the pages are definite.
The semiconductor memory of
Now consider, for example, a multivalued memory which has 2048 pages. In the semiconductor memory of
In the semiconductor memory of
It is assumed herein that the capacity of the flag storage circuit 954 is, for example, 544 bits, and the capacity of eight (8) bits is necessary for storage of the block size. It is also assumed herein that one block consists of 32 pages and accordingly the number of blocks is 64, and therefore, the capacity of 64 bits is necessary for the block information. Under these conditions, the allowable number of blocks which include both an address-replaced page and an address-unreplaced page is (544−64−8)+32=14 (truncated to an integer).
Thus, the allowable number of blocks which include both an address-replaced page and an address-unreplaced page can be increased by changing the block size. Therefore, the capacity of the flag storage circuit 954 can be decreased while maintaining the randomness in data written in the memory cell array 22.
As described above, the present invention is useful for a semiconductor memory having a multi-value storable memory cell.
Number | Date | Country | Kind |
---|---|---|---|
2005-334610 | Nov 2005 | JP | national |