Storage device and storage method

A storage device includes a data memory unit and a status memory unit. The data memory unit includes a pair of flash memory cells to be read by a complementary read mode, and 1-bit data is stored therein by the pair of flash memory cells. The status memory unit includes a flash memory cell to be read by a reference read mode, and a status flag is stored therein by the flash memory cell.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority from Japanese patent application No. 2017-054425, filed on Mar. 21, 2017, the disclosure of which is incorporated herein in its entirety by reference.

BACKGROUND

The present invention relates to a storage device and a storage method and, for example, relates to a storage device that stores a status flag and a storage method.

A complementary read flash memory is known as described in, for example, Japanese Unexamined Patent Application Publication No. 2008-117510. In the complementary read flash memory, two rewritable nonvolatile memory cells form a pair, and 1-bit information is stored in the one pair of memory cells (which can be also referred to hereinafter as a twin cell). The cells that constitute the twin cell can be in either a low threshold voltage state or a high threshold voltage state. The low threshold voltage state is a state where a threshold voltage (Vth) of a transistor that forms a cell is lower than a specified reference value. The high threshold voltage state is a state where a threshold voltage (Vth) of a transistor that forms a cell is equal to or higher than the specified reference value.

In the complementary read flash memory, information is stored by setting two memory cells that form a twin cell to threshold voltage states different from each other. Specifically, for example, a value of “0” is stored when a first memory cell of a twin cell is in the high threshold voltage state and a second memory cell of the twin cell is in the low threshold voltage state. On the other hand, a value of “1” is stored when the first memory cell is in the low threshold voltage state and the second memory cell is in the high threshold voltage state. Further, when both the first memory cell and the second memory cell are in the low threshold voltage state, they are in an erased state (which is also called an initialized state). In the case of the erased state, a read result from the twin cell is undefined. Specifically, a read value can be “1” or can be “0”, which is not a uniquely defined value.

SUMMARY

There is a case of storing a status flag indicating a data storage status or the like into a flash memory. In the case of storing the status flag into the above-described twin cell, a read result after erasing the value of the status flag, which is a read result after the twin cell enters into the erased state, is undefined.

The threshold voltages of the memory cells of the twin cell in the erased state tend to maintain the same relationship with each other as that before erasure. Thus, if the twin cell with the value “0” is erased and then this twin cell is read, a value of “0” is likely to be read. Likewise, if the twin cell with the value “1” is erased and then this twin cell is read, a value of “1” is likely to be read. Therefore, when the status flag is stored in the twin cell, there is a possibility that a value before erasure may be read even after erasure is done. Thus, there is a possibility that a false status flag value could be read.

The other problems and novel features of the present invention will become apparent from the description of the specification and the accompanying drawings.

According to one exemplary embodiment, a storage device includes a data memory unit that is read by a complementary read mode and stores data, and a status memory unit that is read by a reference read mode and stores a status flag.

According to the one exemplary embodiment described above, it is possible to store data by a complementary read mode and uniquely define a value of a status flag after erasure.

DETAILED DESCRIPTION

The following description and the attached drawings are appropriately shortened and simplified to clarify the explanation. In the figures, the identical reference symbols denote identical structural elements and the redundant explanation thereof is omitted.

Prior to describing the details of an exemplary embodiment, the overview of the exemplary embodiment is described first.FIG. 1is a block diagram showing one example of a storage device1according to the overview of the exemplary embodiment. As shown inFIG. 1, the storage device1includes a data memory unit (data memory circuit)2and a status memory unit (status memory circuit)3.

The data memory unit2includes a pair of flash memory cells4. The pair of flash memory cells4is read by a complementary read mode. 1-bit data is stored in this pair of flash memory cells4. Specifically, the pair of flash memory cells4is a twin cell where one flash memory cell4is in the low threshold voltage state and the other flash memory cell4is in the high threshold voltage state to thereby store 1-bit data. Because the data memory unit2is read by the complementary read mode, data is read by comparing a current flowing through one flash memory cell4of the twin cell with a current flowing through the other flash memory cell4of the twin cell. A current that flows through a memory cell differs according to a threshold voltage of the memory cell. Therefore, it is possible to detect the state of the threshold voltage of the twin cell by comparing the current flowing through the one flash memory cell4of the twin cell with the current flowing through the other flash memory card4of the twin cell, thereby enabling reading of data. Note that, although the storage device1includes one data memory unit2in the example shown inFIG. 1, the storage device1may include a plurality of data memory units2. Specifically, the storage device1may include a plurality of pairs of twin cells.

The status memory unit3includes at least one flash memory cell5. The flash memory cell5is read by a reference read mode. 1-bit information is stored in the one flash memory cell5. Note that a status flag is stored in the flash memory cell5of the status memory unit3. The status flag is a flag indicating the status of an arbitrary specified target.

In the reference read mode also, information is stored by changing the threshold voltage of the flash memory cell5. Specifically, 1-bit information is stored depending on whether the threshold voltage is equal to or higher than a reference value (i.e., in the high threshold voltage state) or lower than a reference value (i.e., in the low threshold voltage state). For example, a value of “0” is stored when the flash memory cell5is in the high threshold voltage state, and a value of “1” is stored when the flash memory cell5is in the low threshold voltage state. In the case of the reference read mode, the threshold voltage is changed to a predetermined voltage after erasing is carried out. More specifically, the flash memory cell5is set, for example, to the low threshold voltage state by erasing. Therefore, in the reference read mode, a read result after erasing is a uniquely determined one. Specifically, a read result is a value of “1”, for example, in the case where the flash memory cell5is set to the low threshold voltage state by erasing.

The status memory unit3is read by the reference read mode, and the status flag is read by comparing a current flowing through the flash memory cell5with a reference current. Because the reference current has a constant current value, it is possible to detect the state of the threshold voltage of the flash memory cell5by comparing a current flowing through the flash memory cell5with the reference current, thereby enabling reading of data. Note that, although the storage device1includes one status memory unit3in the example shown inFIG. 1, the storage device1may include a plurality of status memory units3.

In the storage device1, data, which is information other than the status flag, is stored in the data memory unit2that is read by the complementary read mode, and the status flag is stored in the status memory unit3that is read by the reference read mode. Therefore, a read result of the status flag after erasing is a uniquely defined one. It is thereby possible in the storage device1to store data by the complementary read mode and uniquely define the value of the status flag after erasure.

Details of the exemplary embodiment are described hereinbelow.FIG. 2is a block diagram showing a configuration example of a flash memory100according to a first exemplary embodiment. Note that the flash memory100corresponds to the storage device1shown inFIG. 1. As shown inFIG. 2, the flash memory100includes a power supply circuit101, a write circuit102, an address buffer103, a predecode circuit104, a decoder105, a WL driver106, a sense amplifier circuit107, a sense amplifier control circuit108, an output driver109, and a memory cell array110.

The power supply circuit101is a circuit that supplies power to be used for writing, erasing and reading. The write circuit102is a circuit that supplies, to the memory cell array110, information to be written. The address buffer103is a circuit that receives an address for access (write access, erase access, and read access) to the memory cell array110.

The predecode circuit104is a circuit that pre-decodes an address that is output from the address buffer103. The decoder105is a circuit that generates a line selection signal for selecting a word line WL to be accessed in accordance with a line predecode signal that is output from the predecode circuit104. The WL driver106is a circuit that drives the word line WL in accordance with the line predecode signal.

The word line WL is a signal line for selecting one arbitrary line in the memory cell array110. A bit line BL is a signal line for outputting a memory cell current of a flash memory cell that is connected with the selected word line WL.

The sense amplifier circuit107is a circuit that senses the current of the bit line BL and outputs a value that is read from the memory cell array110, and it includes sense amplifiers SA1and SA2and a transistor Tr. The transistor Tr is a switch that switches the connection state with the bit line BL that is input to the sense amplifier SA1or SA2. Note that, although one pair of bit lines is selected from a plurality of pairs of bit lines by specifying an address and connected to the sense amplifier in an actual configuration, a bit line selection circuit is shown as a switch in a representative manner inFIG. 2for the sake of simplifying the figure. The sense amplifier control circuit108is a control circuit that controls the operation of the sense amplifier circuit107. Note that the sense amplifier circuit107and the sense amplifier control circuit108can also be referred to as a determination circuit.

The output driver109is a circuit that latches a value that is output from the sense amplifier circuit107by a latch circuit L and then outputs the value as a read result to the outside of the flash memory100.

The memory cell array110includes a plurality of flash memory cells, which are rewritable nonvolatile memory cells, whose positions are specified by the word line WL and the bit line BL. The flash memory cells included in the memory cell array110are classified into flash memory cells that form a data memory unit150and flash memory cells that form a status memory unit151.

The data memory unit150corresponds to the data memory unit2inFIG. 1. The data memory unit150is a memory cell area that includes a pair of memory cells composed of a memory cell M1aand a memory cell M1b. The data memory unit150stores 1-bit data by the two memory cells: the memory cell M1aand the memory cell M1b. For example, when storing data “0” in the data memory unit150, the memory cell M1ais set to the high threshold voltage state, and the memory cell M1bis set to the low threshold voltage state, and when storing data “1” in the data memory unit150, the memory cell M1ais set to the low threshold voltage state, and the memory cell M1bis set to the high threshold voltage state.

In the example shown inFIG. 2, 32 data memory units150are placed for each word line WL. Specifically, for each word line WL, 64 memory cells are used as memory cells for the data memory unit150. Note that those numbers are just an example, and an arbitrary number of data memory units150may be placed for each word line WL as a matter of course. In the example shown inFIG. 2, the 32 data memory units150store data D31to D0, respectively. Each of the data D31to D0is 1-bit data.

Data stored in the data memory unit150is read by the complementary read mode. Therefore, two bit lines BL, i.e., the bit line BL of the memory cell M1aand the bit line BL of the memory cell M1b, of the data memory unit150are connected to the sense amplifier SA1. Specifically, the both bit lines BL are connected to the sense amplifier SA1so as to sense a current difference between the memory cell M1aand the memory cell M1b. To be more specific, the bit line BL is connected to the input side of the sense amplifier SA1through the transistor Tr.

The sense amplifier SA1is a circuit that determines the value of data stored in the data memory unit150by comparing a current (memory cell current) flowing through one memory cell M1aof the data memory unit150and a current (memory cell current) flowing through the other memory cell M1bof the data memory unit150. The sense amplifier SA1outputs the determined data value as a read result to the output driver109. As a result, the data D31to D0are output from the output driver109.

The status memory unit151corresponds to the status memory unit3inFIG. 1. In this exemplary embodiment, the status memory unit151is a memory cell area that includes four memory cells M2a, M2b, M2cand M2d. The status memory unit151stores a status flag and is read by the reference read mode. Note that status flag write control may be performed by an arbitrary control circuit. For example, control may be carried out by the write circuit102or by a control circuit such as a flash sequencer. Each of the memory cells M2a, M2b, M2cand M2dcan store 1-bit information. In this exemplary embodiment, the status flag having the same value is stored in each of the memory cells M2a, M2b, M2cand M2d. Specifically, the value of the status flag, which is 1-bit information, is stored in all of the memory cells M2a, M2b, M2cand M2d. Therefore, in this exemplary embodiment, substantially the same status flag is stored in each memory cell of the status memory unit151.

In this exemplary embodiment, the status flag that is stored in each memory cell of the status memory unit151is a flag indicating a data write status of the data memory unit150. To be more specific, it is a flag indicating whether the data memory unit150is in the state where data is written or in the state where data is erased for each of the 32 data memory units150connected to the same word line WL. The state where data is written is, in other words, the state where data is stored or data is valid. Likewise, the state where data is erased is, in other words, the state where data is not written or data is invalid.

In this exemplary embodiment, when the data memory unit150is in the erased state, the status flag value “1” is stored in each of the memory cells M2a, M2b, M2cand M2d. Thus, each of the memory cells M2a, M2b, M2cand M2dis set to the low threshold voltage state, for example. On the other hand, when the data memory unit150is in the state where data is written, the status flag value “0” is stored in each of the memory cells M2a, M2b, M2cand M2d. Thus, each of the memory cells M2a, M2b, M2cand M2dis set to the high threshold voltage state, for example.

Although the status memory unit151is composed of four memory cells in this exemplary embodiment, this is merely an example, and the status memory unit151may be composed of one or more memory cells. Further, although one status memory unit151is placed as the status flag indicating the write status of the 32 data memory units150connected to the same word line WL in this exemplary embodiment, one status memory unit151may be placed for N (N is an integer of one or more) number of data memory units150.

The status flag that is stored in the status memory unit151is read by the reference read mode. Thus, the bit line BL of the status memory unit151is connected to the sense amplifier SA2where the signal line IL through which the reference current Iref can flow is connected to the input side. Specifically, the bit line BL and the signal line IL are connected to the sense amplifier SA2so as to sense a current difference between the current of the status memory unit151and the reference current. To be specific, the bit lines BL of the memory cells M2a, M2b, M2cand M2dare connected to the sense amplifier SA2in this exemplary embodiment. Note that, to be more specific, the bit lines BL are connected to the sense amplifier SA2through the transistor Tr.

The sense amplifier SA2is a circuit that determines the value of the status flag that is stored in the status memory unit151by comparing the sum of currents (memory cell currents) flowing through the memory cells of the status memory unit151with the reference current. Specifically, the sense amplifier SA2determines the value of the status flag by comparing the sum current of the memory cell current of the memory cell M2a, the memory cell current of the memory cell M2b, the memory cell current of the memory cell M2cand the memory cell current of the memory cell M2dwith the reference current. Thus, the signal line IL through which the reference current Iref to be compared with the memory cell current flows is connected to the input side of the sense amplifier SA2. The signal line IL is connected to a constant current source CCS1that supplies the reference current Iref. The sense amplifier SA2outputs the determined status flag value as a read result to the output driver109. The status flag is thereby output from the output driver109.

As described above, the flash memory100can output the data D31to D0and the status flag in response to a read request from the outside.

The operation of the sense amplifier SA2that performs reading by the reference read mode and the operation of the sense amplifier SA1that performs reading by the complementary read mode are described hereinafter. First, the operation of the sense amplifier SA2is described.FIG. 3is a view to explain the sense amplifier SA2that performs reading by the reference read mode. InFIG. 3, the upper view is a schematic view illustrating the input/output relationship of the sense amplifier SA2, and the lower view is a graph illustrating the temporal transition of a voltage of a signal line that is input to the sense amplifier SA2. Note thatFIG. 3illustrates the case where the status memory unit151includes only one memory cell for easier understanding of the effect of a difference in the number of memory cells that constitute the status memory unit151. Specifically, in the example ofFIG. 3, the bit line BL of the memory cell M2aand the signal line IL through which the reference current Iref can flow are connected to the input side of the sense amplifier SA2.

As shown in the graph ofFIG. 3, in the reference read mode, the bit line BL connected to the memory cell M2aand the signal line IL are pre-charged to reach a specified voltage by control of the sense amplifier control circuit108. After that, at specified discharge start timing t1, discharge of the bit line BL by the memory cell current flowing through the memory cell M2aand discharge of the signal line IL by the reference current Iref are carried out by control of the sense amplifier control circuit108. Then, at specified sense timing t2, the sense amplifier SA2senses a voltage difference between the voltage of the bit line BL and the voltage of the signal line IL and thereby determines the value stored in the memory cell M2a. Note that a voltage drop of the bit line BL during discharge depends on the current value flowing through the bit line BL (the current value of the memory cell current), and the voltage drop increases as the current increases. Further, the current value of the memory cell current depends on the threshold voltage of the memory cell. On the other hand, a voltage drop of the signal line IL during discharge depends on the current value of the reference current flowing through the signal line IL. Therefore, the sense amplifier SA2compares the memory cell current and the reference current by comparing the voltage of the bit line BL and the voltage of the signal line IL after discharge. The sense amplifier SA2determines the stored value based on a result of the comparison.

To read a stored value correctly, a difference between the voltage of the signal line IL and the voltage of the bit line BL of the memory cell M2aneeds to be equal to or more than a sensible voltage difference. To be more specific, in order to correctly read the value of the memory cell M2ain the high threshold voltage state, which is “0”, for example, a difference between the voltage of the signal line IL and the voltage of the bit line BL of the memory cell M2aneeds to be equal to or more than a sensible voltage difference at the sense timing t2as shown in the graph ofFIG. 3(first condition). Likewise, in order to correctly read the value of the memory cell M2ain the low threshold voltage state, which is “1”, for example, a difference between the voltage of the signal line IL and the voltage of the bit line BL of the memory cell M2aneeds to be equal to or more than a sensible voltage difference at the sense timing t2as shown in the graph ofFIG. 3(second condition). Because it is required to correctly read both of the value of the memory cell M2awhere the data write status is in the high threshold voltage state and the value of the memory cell M2awhere it is in the low threshold voltage state, both of the first condition and the second condition need to be satisfied.

Next, the operation of the sense amplifier SA1is described hereinafter.FIG. 4is a view to explain the sense amplifier SA1that performs reading by the complementary read mode. InFIG. 4, the upper view is a schematic view illustrating the input/output relationship of the sense amplifier SA1, and the lower view is a graph illustrating the temporal transition of a voltage of a signal line that is input to the sense amplifier SA1.

As shown in the graph ofFIG. 4, in the complementary read mode, the bit line BL connected to the memory cell M1aand the bit line BL connected to the memory cell M1bare pre-charged to reach a specified voltage by control of the sense amplifier control circuit108. After that, at specified discharge start timing t1, discharge of the bit line BL by the memory cell current flowing through the memory cell M1aand discharge of the bit line BL by the memory cell current flowing through the memory cell M1bare carried out by control of the sense amplifier control circuit108. Then, at specified sense timing t2, the sense amplifier SA1senses a voltage difference between the both bit lines BL and thereby determines the value stored in the data memory unit150. In this manner, the sense amplifier SA1compares the memory cell currents of the memory cells M1aand M1bby comparing the voltages of the both bit lines BL after discharge. The sense amplifier SA1determines the stored value based on a result of the comparison.

In the state where a value is stored in the memory cell in the complementary read mode, one memory cell of the memory cells M1aand M1bis in the high threshold voltage state, and the other memory cell is in the low threshold voltage state. Thus, to correctly read the stored value in the complementary read mode, it is only necessary that a difference between the voltage of the bit line BL of the memory cell in the high threshold voltage state and the voltage of the bit line BL of the memory cell in the low threshold voltage state is equal to or more than a sensible voltage difference. Therefore, a difference between the voltage of the bit line BL when the memory cell is in the high threshold voltage state and the voltage of the bit line BL when the memory cell is in the low threshold voltage state can be smaller than that in the reference read mode.

A difference between the reference read mode and the complementary read mode when focusing on variation in memory cell current caused by temperature conditions and voltage conditions is described hereinafter. The amount of current in the memory cell tends to vary depending on temperature conditions and voltage conditions.FIG. 5is a view to explain the effect of variation in the amount of current in the sense amplifier SA2that performs reading by the reference read mode. InFIG. 5, the upper view is a schematic view illustrating the input/output relationship of the sense amplifier SA2, and the lower view is a graph illustrating the temporal transition of the voltage of the signal line that is input to the sense amplifier SA2. Note thatFIG. 5, just likeFIG. 3, illustrates the case where the status memory unit151includes only one memory cell.

In the reference read mode, it is necessary to satisfy both of the first condition and the second condition as described above. Therefore, a difference between the lower limit of variation in the voltage of the bit line BL when the memory cell M2ais in the high threshold voltage state and the voltage of the signal line IL needs to be equal to or more than a sensible voltage difference, and a difference between the upper limit of variation in the voltage of the bit line BL when the memory cell M2ais in the low threshold voltage state and the voltage of the signal line IL needs to be equal to or more than a sensible voltage difference. Thus, in the reference read mode, a larger voltage difference is required when taking variation in memory cell current into consideration compared with when not taking it into consideration.

FIG. 6is a view to explain the effect of variation in the amount of current in the sense amplifier SA1that performs reading by the complementary read mode. InFIG. 6, the upper view is a schematic view illustrating the input/output relationship of the sense amplifier SA1, and the lower view is a graph illustrating the temporal transition of the voltage of the signal line that is input to the sense amplifier SA1. Variation in memory cell current that depends on temperature conditions and voltage conditions has the same characteristics for the memory cell in the high threshold voltage state and the memory cell in the low threshold voltage state. Specifically, at the sense timing t2, when the voltage of the bit line BL of the memory cell Mia is affected by variation, the voltage of the bit line BL of the memory cell M1bis also affected in the same way. Thus, in the complementary read mode, data can be read correctly if a voltage difference between the upper limit of variation in the voltage of the bit line BL of the memory cell in the high threshold voltage state and the upper limit of variation in the voltage of the bit line BL of the memory cell in the low threshold voltage state or a voltage difference between the lower limit of variation in the voltage of the bit line BL of the memory cell in the high threshold voltage state and the lower limit of variation in the voltage of the bit line BL of the memory cell in the low threshold voltage state is equal to or more than a sensible voltage difference. Thus, in the complementary read mode, there is no effect of variation in memory cell current by temperature conditions and voltage conditions due to such principles.

As described above, when taking variation into account, it is possible to further reduce a difference between the voltage of the bit line BL when the memory cell is in the high threshold voltage state and the voltage of the bit line BL when the memory cell is in the low threshold voltage state in the complementary read mode compared with the difference in the reference read mode. The fact that it is possible to reduce a voltage difference between the voltage of the bit line BL in the high threshold voltage state and the voltage of the bit line BL in the low threshold voltage state means that it is possible to reduce a difference between the threshold voltage in the high threshold voltage state and the threshold voltage in the low threshold voltage state. Therefore, in general, it is possible in the complementary read mode to read data correctly even when a difference in threshold voltage between the memory cell that is set to the high threshold voltage state and the memory cell that is set to the low threshold voltage state decreases with an increase in the number of times of writing and the number of times of erasing or with an increase in the data retention period. Thus, in general, the complementary read mode has better data retention properties than the reference read mode.

Although the complementary read mode has such an advantage, a read result after erasure is undefined as described earlier. On the other hand, in the reference read mode, a value after erasure can be defined because it is read by comparison using a reference current. This is because the voltage of the bit line BL of the memory cell that is set to the high threshold voltage state by erasure is lower than the voltage of the signal line IL. The flash memory100according to this exemplary embodiment includes the data memory unit150that is read by the complementary read mode and the status memory unit151that is read by the reference read mode. It is thereby possible in the flash memory100to uniquely define the value of the status flag after erasure and to store data by the complementary read mode.

It is preferred that the status memory unit151that is read by the reference read mode can achieve equal retention properties to the complementary read mode. Equal retention properties to the complementary read mode can be achieved by increasing a difference between the voltage of the bit line BL of the memory cell that constitutes the status memory unit151and the voltage of the signal line IL at the sense timing. This can be achieved by connecting a plurality of memory cells having the same value to the bit line BL to obtains a larger memory cell current. Therefore, in the flash memory100according to this exemplary embodiment, the status memory unit151includes a plurality of flash memory cells in which the status value of the same value is stored.

A difference between the case where one memory cell M2aretains a value and four memory cells M2ato M2dretain the same value in the reference read mode is described as an example.FIG. 7is a view to explain the sense amplifier SA2in the case of retaining a value in one memory cell M2aby the reference read mode. InFIG. 7, the upper view is a schematic view illustrating the input/output relationship of the sense amplifier SA2, and the lower view is a graph illustrating the temporal transition of the voltage of the signal line that is input to the sense amplifier SA2. Note that the graph takes variation in memory cell current into consideration. In the example shown inFIG. 7, a voltage difference that is required for sensing is not achieved at the sense timing t2.

FIG. 8is a view to explain the sense amplifier SA2in the case of retaining the same value in four memory cells M2ato M2dby the reference read mode. InFIG. 8, the upper view is a schematic view illustrating the input/output relationship of the sense amplifier SA2, and the lower view is a graph illustrating the temporal transition of the voltage of the signal line that is input to the sense amplifier SA2. Note that the graph takes variation in memory cell current into consideration. By connecting the four memory cells in parallel to the sense amplifier SA2, it is possible to increase a difference between the voltage of the bit line BL in the high threshold voltage state and the voltage of the bit line BL in the low threshold voltage state. Note that, in the graph ofFIG. 8, the current value of the reference current is set so that the voltage of the signal line IL is a voltage between the voltage of the bit line BL in the high threshold voltage state and the voltage of the bit line BL in the low threshold voltage state.

Therefore, both a difference between the lower limit of variation in the voltage of the bit line BL of the memory cells M2ato M2din the high threshold voltage state and the voltage of the signal line IL and a difference between the upper limit of variation in the voltage of the bit line BL of the memory cells M2ato M2din the low threshold voltage state and the voltage of the signal line IL can be equal to or more than a voltage difference that is required for sensing. It is thereby possible to read the value correctly. In this manner, because the status memory unit151that is read by the reference read mode includes a plurality of flash memory cells in this exemplary embodiment, it is possible to improve the retention properties compared with the case where the status memory unit151includes only one flash memory. Note that, although four memory cells are used as one set for the status memory unit151as an example in this exemplary embodiment, this number is merely an example. The number may be determined on the basis of experiment, simulation or the like so as to generate a sufficient voltage difference even with the number of times of writing and the number of times of erasing or after the retention period which are the same as those of the data memory unit150in the complementary read mode.

Therefore, in the flash memory100according to this exemplary embodiment, the status memory unit151is read as follows. First, by control of the sense amplifier control circuit108, the bit lines BL connected respectively to the memory cells M2ato M2dand the signal line IL are pre-charged to reach a specified voltage. After that, at the specified discharge start timing t1, discharge of the bit line BL by the sum current of the currents flowing through the memory cells M2ato M2dand discharge of the signal line IL by the reference current Iref are carried out by control of the sense amplifier control circuit108. Then, at the specified sense timing t2, the sense amplifier SA2determines the value stored in the status memory unit151by comparing the voltage of the bit line BL and the voltage of the signal line IL after discharge. In other words, the sense amplifier SA2achieves comparison between the sum current and the reference current by comparing the voltage of the bit line BL and the voltage of the signal line IL after discharge and thereby determines the value.

In the flash memory100according to this exemplary embodiment, the data memory unit150and the status memory unit151on the same word line WL are preferably erased at the same time. This is because, when the data memory unit150is in the erased state, it is guaranteed to obtain the status flag value indicating the erased state as a read result of the status memory unit151. Further, the flash memory100according to this exemplary embodiment is configured so that writing of the status memory unit151is carried out separately from writing of the data memory unit150on the same word line WL as the status memory unit151. Thus, by performing writing to the status memory unit151after writing to the data memory unit150, it is guaranteed that valid data is stored in the data memory unit150when a value indicating the state where data is written in the data memory unit150is obtained as a read result of the status flag value. Note that the data memory unit150and the status memory unit151on the same word line WL may be erased independently of one another, or writing may be carried out simultaneously with each other. This may be selected as appropriate based on a status which the status flag is used to indicate.

The flash memory100according to the first exemplary embodiment is described above. The flash memory100includes the status memory unit3that is read by the reference read mode. Thus, a read result of the status flag after erasing is defined uniquely. Further, in this exemplary embodiment, the status flag is a flag indicating the data write status of the data memory unit150. Therefore, even after erasing, the flash memory100can accurately determine whether the data memory unit150is in the state where data is written or in the state where data is erased.

Further, the status memory unit151that is read by the reference read mode includes a plurality of flash memory cells where the status value of the same value is stored. It is thereby possible to improve the retention properties of the status memory unit151that is read by the reference read mode.

Furthermore, according to the flash memory100, it is possible to create a flash memory having good retention properties at low costs. To describe this point, assume the case of reading 32-bit data by the reference read mode, which is different from the flash memory100according to this exemplary embodiment. It is assumed that, in the reference read mode, equal retention properties to the complementary read mode are obtained by using four memory cells. In this case, twice the number of memory cells are required compared with the case of implementing the data memory unit150in the complementary read mode. Specifically, in this case, 128 (=32×4) memory cells for the data memory unit150are required. On the other hand, the flash memory100according to this exemplary embodiment can be implemented with total 68 memory cells, which is the sum of 64 (=32×2) memory cells for the data memory unit150and 4 memory cells for the status memory unit151. It is thus possible to obtain good retention properties with a smaller number of memory cells.

A second exemplary embodiment is described hereinbelow.FIG. 9is a block diagram showing a configuration example of a flash memory200according to the second exemplary embodiment. The flash memory200is different from the flash memory100according to the first exemplary embodiment in that the output driver109is replaced by an output driver111. Note that, in this exemplary embodiment, it is assumed that erasing is carried out simultaneously and also writing is carried out simultaneously in the data memory unit150and the status memory unit151on the same word line WL.

The output driver111is different from the output driver109in that a logical sum circuit OR that carries out the logical OR between a read value from the data memory unit150and a read value from the status memory unit151is added. In this configuration, the output driver111can carry out the logical OR between a read value from the data memory unit150and a read value from the status memory unit151and outputs a result as a read result of the data memory unit150. Specifically, the logical OR between the data D31to D0read by the sense amplifier SA1and the status flag is carried out. Then, data E31to E0, which is a result of the logical OR operation, is output as a read result of the data memory unit150. Note that the output drive111can be also referred to as an output unit (output circuit).

Because the data memory unit150is read by the complementary read mode, a read value in the erased state is undefined. On the other hand, because the status memory unit151is read by the reference read mode, a read value of the status memory unit151where erasing is carried out together with erasing of the data memory unit150is “1”. Thus, when the data memory unit150is in the erased state, the values of data E31to E0that are obtained as a read result after the logical operation are all “1”. On the other hand, when data is written in the data memory unit150, a read value of the status memory unit151where writing is carried out together with writing to the data memory unit150is “0”. Accordingly, when data is written in the data memory unit150, the values of data E31to E0that are obtained as a read result after the logical operation are the same as the values of data D31to D0.

Algorithms or software developed for reference read flash memory often determine the status of data based on the assumption that a data read result when a memory cell is in the erased state is fixed to “1”. In the flash memory200according to this exemplary embodiment, the logical OR between a read value from the data memory unit150and a status flag is output as a read result of the data memory unit150. Thus, as a read result of the memory cell in the erased state, the same result as in the flash memory where reading is done only in the reference read mode can be obtained. Therefore, according to this exemplary embodiment, it is possible to use algorithms or software developed for reference read flash memory also for the flash memory200, which is a flash memory including the complementary read mode.

A third exemplary embodiment is described hereinbelow. The third exemplary embodiment is different from the second exemplary embodiment in that an interrupt detection flag indicating that writing to the data memory unit150has been interrupted due to an error or the like can be stored in a flash memory.FIG. 10is a block diagram showing a configuration example of a micro controller10on which a flash memory300according to the third exemplary embodiment is mounted. The micro controller10can be also referred to as a storage device.

As shown inFIG. 10, the micro controller10includes a CPU (Central Processing Unit)400, a RAM (Random Access Memory)500, a flash memory300, a voltage monitoring circuit600, a flash sequencer700, and a peripheral bus800. The peripheral bus800is a bus to which the CPU400, the voltage monitoring circuit600and the flash sequencer700are connected.

The CPU400executes processing based on a program (software) and data stored in the flash memory300or the RAM500. Note that, when reading of the flash memory300cannot be executed due to during writing or erasing of the flash memory300or the like, the CPU400can continue processing based on the program by copying the program from the flash memory300to the RAM500in advance. The RAM500is a volatile memory in which data or the like to be used by the CPU400is stored. The flash memory300is substantially the same as the flash memory200according to the second exemplary embodiment, and it is different in having a memory area to store the interrupt detection flag. The details of the flash memory300are described later.

The voltage monitoring circuit600is a circuit that monitors a power supply voltage supplied to the micro controller10. The voltage monitoring circuit600can be also referred to as a voltage detection unit (voltage detection circuit). Note that the power supply voltage supplied to the micro controller10is a voltage of a power supply that is needed for the elements of the micro controller10to operate, and it includes a power supply voltage supplied to the flash memory300, for example. The voltage monitoring circuit600detects that the power supply voltage becomes equal to or lower than a specified value. When the voltage monitoring circuit600detects that the power supply voltage becomes equal to or lower than a specified value, it outputs a voltage decrease detection signal to the flash sequencer700. In the following description, this specified value is referred to as a voltage decrease detection level. Note that, in this exemplary embodiment, the voltage monitoring circuit600includes a storage unit (e.g., register) for storing the above-described voltage decrease detection level that is used to determine whether or not to output the voltage decrease detection signal, and the voltage decrease detection level can be changed by rewriting the content of the storage unit. It is thereby possible to flexibly change a threshold for determining the output of the voltage decrease detection signal. To be specific, to make the change, the CPU400can rewrite the stored content of the storage unit of the voltage monitoring circuit600connected to the peripheral bus800. Note that the voltage monitoring circuit600may include a storage unit that stores a set value for determining a voltage monitoring target.

In this exemplary embodiment, writing and erasing of the flash memory300by the CPU400are performed through the flash sequencer700. Note that data reading from the flash memory300by the CPU400may be performed through the flash sequencer700or may be performed directly without through the flash sequencer700.

The flash sequencer700is a circuit that controls writing, erasing or the like of the flash memory300. The flash sequencer700can be also referred to as a control unit (control circuit). The flash sequencer700includes an address specification register to store address data for specifying an address of the flash memory300where writing or erasing is to be carried out. In the address specification register, address data transmitted from the CPU400is stored. Further, the flash sequencer700includes a command specification register to store a command indicating writing, erasing or the like. In the command specification register, command data transmitted from the CPU400is stored.

The CPU400writes command data to the flash sequencer700in a predetermined sequence and thereby specifies the details of control to be performed by the flash sequencer700. The flash sequencer700performs control corresponding to a series of command data written to the command specification register on the address in the flash memory300which is indicated by the address data written to the address specification register.

Commands of the flash sequencer700are described with reference toFIG. 11as a specific example. As shown inFIG. 11, a data write command and a data erase command are prepared as the commands to control the flash sequencer700.

In the case of writing data to the flash memory300, the CPU400writes address data to the address specification register through the peripheral bus800and thereby specifies the address in the flash memory300to which data is to be written. Then, the CPU400writes command data indicating write commands sequentially to the command specification register. To be more specific, when writing 4-byte data to the flash memory300, the CPU400writes the command data H′E8, H′02, 4-byte data (2-byte data×2) and H′D0sequentially to the command specification register as shown inFIG. 11. Further, when writing 16-byte data to the flash memory300, the CPU400writes the command data H′E8, H′08, 16-byte data (2-byte data×8) and H′D0sequentially to the command specification register as shown inFIG. 11. Note that “H′” means that the following numerical value is in hexadecimal notation.

In response thereto, the flash sequencer700writes the data written in the command specification register to the address in the flash memory300which is indicated by the address data written in the address specification register. Specifically, when H′02is written in the second writing, the flash sequencer700writes 4-byte data written in the third to fourth writing to the 4-byte area starting from the address specified by the address data. On the other hand, when H′08is written in the second writing, the flash sequencer700writes 16-byte data written in the third to tenth writing to the 16-byte area starting from the address specified by the address data.

In the case of erasing data in the flash memory300, the CPU400writes address data to the address specification register through the peripheral bus800and thereby specifies the address of a block in the flash memory300from which data is to be erased. Then, the CPU400writes command data indicating data erase commands sequentially to the command specification register. To be more specific, the CPU400writes the command data H′20and H′D0sequentially to the command specification register. In response thereto, the flash sequencer700erases the data of the block in the address in the flash memory300which is indicated by the address data written in the address specification register.

The flash memory300according to this exemplary embodiment is described hereinbelow.FIG. 12is a block diagram showing a configuration example of the flash memory300according to the third exemplary embodiment. The flash memory300is different from the flash memory200according to the second exemplary embodiment in that the memory cell array110includes an interrupt detection memory unit (interrupt detection memory circuit)152. Thus, in the flash memory300, the configurations and operations of the data memory unit150and the status memory unit151are the same as those of the flash memory200according to the second exemplary embodiment. The configurations and operations different from those in the second exemplary embodiment are described hereinbelow. Note that it is assumed in this exemplary embodiment that the interrupt detection memory unit152is erased simultaneously with the data memory unit150and the status memory unit151on the same word line WL as an example. It is also assumed that the interrupt detection memory unit152can execute writing at different timing from the data memory unit150and the status memory unit151on the same word line WL.

The flash memory cells included in the memory cell array110according to this exemplary embodiment are classified into flash memory cells that form the data memory unit150, flash memory cells that form the status memory unit151, and flash memory cells that form the interrupt detection memory unit152.

In this exemplary embodiment, the interrupt detection memory unit152is a memory cell area that includes four memory cells M3a, M3b, M3cand M3d. Although the interrupt detection memory unit152is different from the status memory unit151in that it stores the interrupt detection flag, it has the same configuration as the status memory unit151. Thus, the interrupt detection memory unit152includes flash memory cells that are read by the reference read mode. By those flash memory cells, the interrupt detection flag indicating whether there is an interruption of writing or not is stored.

Because the interrupt detection memory unit152is a memory cell that is read by the reference read mode, each of the memory cells M3a, M3b, M3cand M3dcan store 1-bit information. However, the interrupt detection flag having the same value is stored in each of the memory cells M3a, M3b, M3cand M3d, just like the status memory unit151. Specifically, the value of the interrupt detection flag, which is 1-bit information, is stored in all of the memory cells M3a, M3b, M3cand M3d. Therefore, in this exemplary embodiment, the interrupt detection memory unit152stores substantially 1-bit information.

As described above, the interrupt detection flag that is stored in the interrupt detection memory unit152is a flag indicating that writing to the data memory unit150has been interrupted. To be more specific, it is a flag indicating whether or not an interruption of writing occurs during writing in the 32 data memory units150connected to the same word line WL.

In this exemplary embodiment, when writing to the data memory unit150is not interrupted, “1” is stored as the interrupt detection flag value in each of the memory cells M3a, M3b, M3cand M3d. Thus, each of the memory cells M3a, M3b, M3cand M3dis set to the low threshold voltage state, for example. On the other hand, when writing to the data memory unit150is interrupted, “0” is stored as the interrupt detection flag value in each of the memory cells M3a, M3b, M3cand M3d. Thus, each of the memory cells M3a, M3b, M3cand M3dis set to the high threshold voltage state, for example.

Although the interrupt detection memory unit152is composed of four memory cells in this exemplary embodiment, this is merely an example, and the interrupt detection memory unit152may be composed of one or more memory cells. Note that, however, to obtain desired retention properties, the interrupt detection memory unit152is preferably composed of a plurality of memory cells, just like the status memory unit151. Further, although one interrupt detection memory unit152is placed as the interrupt detection flag indicating the status of the 32 data memory units150connected to the same word line WL in this exemplary embodiment, one interrupt detection memory unit152may be placed for N (N is an integer of one or more) number of data memory units150.

The interrupt detection flag that is stored in the interrupt detection memory unit152is read by the reference read mode. Thus, the bit line BL of the interrupt detection memory unit152is connected to a sense amplifier SA3where the signal line IL through which the reference current Iref can flow is connected to the input side. Specifically, the bit line BL and the signal line IL are connected to the sense amplifier SA3so as to sense a current difference between the current of the interrupt detection memory unit152and the reference current. To be specific, the bit lines BL of the memory cells Mia, M3b, M3cand M3dare connected to the sense amplifier SA3in this exemplary embodiment. Note that, to be more specific, the bit line BL is connected to the sense amplifier SA3through the transistor Tr.

The sense amplifier SA3, like the sense amplifier SA2, is a circuit that determines the value of the interrupt detection flag that is stored in the interrupt detection memory unit152by comparing the sum of currents (memory cell currents) flowing through the memory cells of the interrupt detection memory unit152with the reference current. Thus, the signal line IL through which the reference current Iref to be compared with the memory cell current flows is connected to the input side of the sense amplifier SA3. The signal line IL is connected to a constant current source CCS2that supplies the reference current Iref. The sense amplifier SA3outputs the determined interrupt detection flag value as a read result to the output driver109. The interrupt detection flag is thereby output from the output driver109.

As described above, the flash memory300can output the data D31to D0, the status flag and the interrupt detection flag in response to a read request from the outside.

The case where the power supply voltage that is supplied to the micro controller10decreases to be lower than a specified voltage for some reasons is described hereinafter in detail. When the power supply voltage decreases during writing to the data memory unit150and the status memory unit151, writing is not completed normally within a time period during which the voltage at which writing can be executed normally can be maintained, and there arises a possibility that a false value is stored in the memory cells. The data memory unit150and the status memory unit151are composed of 68 memory cells in total. On the other hand, the interrupt detection memory unit152is composed of 4 memory cells. Thus, the number of memory cells that constitute the interrupt detection memory unit152is smaller than the number of memory cells that constitute the data memory unit150and the status memory unit151. Further, the number of memory cells that constitute the interrupt detection memory unit152is smaller than the number of memory cells in the data memory unit150. In the case where the current value of a write current that is used for writing to the memory cell is the same, writing is completed in a shorter time when the number of memory cells to be written is smaller. Therefore, writing of the interrupt detection flag can be completed in a shorter time than writing to the data memory unit150and the status memory unit151.

In this exemplary embodiment, when it is detected by the voltage monitoring circuit600that the power supply voltage becomes equal to or lower than the voltage decrease detection level during writing to the data memory unit150, the flash sequencer700performs control to interrupt writing to the data memory unit150and write the interrupt detection flag value indicating an interruption to the interrupt detection memory unit152. Thus, after the power supply voltage decreases, before the voltage becomes lower than the level at which writing can be executed normally, the write processing is interrupted and writing of the interrupt detection flag is carried out. Because writing of the interrupt detection flag can be completed in a short time as described above, the writing of the interrupt detection flag can be finished normally. Further, particularly, the flash sequencer700performs control to write the interrupt detection flag indicating an interruption to the interrupt detection memory unit152after interrupting writing to the data memory unit150in this exemplary embodiment. It is thereby possible to maximize the write current for the interrupt detection memory unit152. In the case of performing writing to the interrupt detection memory unit152while continuing writing to the data memory unit150, the write current is used in a distributed fashion for both of writing to the data memory unit150and writing to the interrupt detection memory unit152. On the other hand, in this exemplary embodiment, writing to the interrupt detection memory unit152is carried out after interrupting writing to the data memory unit150, and it is thereby possible to use the write current only for writing to the interrupt detection memory unit152. It is thereby possible to further reduce the write time to the interrupt detection memory unit152.

In this exemplary embodiment, the voltage monitoring circuit600performs detection so as to ensure a sufficient time for the writing to the interrupt detection memory unit152to end normally after detecting a decrease in the power supply voltage. A method of deciding the voltage decrease detection level that is set to the voltage monitoring circuit600is described hereinafter with reference toFIG. 13. A power supply voltage decrease rate per unit time can be obtained by the consumed current in the micro controller10and the capability on the power supply side such as the capacity of a capacitor added to the power supply line or the like. Thus, the voltage decrease detection level can be obtained by calculating a voltage value ΔV that decreases during the processing time required for writing of the interrupt detection flag according to this decrease rate and adding the voltage value ΔV to the lower limit of the writable voltage.

Note that, because a write time to the data memory unit150and the status memory unit151is longer than a write time to the interrupt detection memory unit152, the voltage value (which is referred to as AVds) that decreases during the processing time required for writing to the data memory unit150and the status memory unit151is greater than the value ΔV described above. Thus, if AVds is added to the lower limit of the writable voltage, it exceeds a normal operating voltage, which can make it unable to set the voltage decrease detection level. Further, if writing to the data memory unit150and the status memory unit151continues after the power supply voltage reaches the voltage decrease detection level that is set based on ΔV, there is a possibility that writing cannot be completed at the time when the power supply voltage reaches the lower limit of the writable voltage. To avoid this, the voltage decrease detection level is set and write interrupt control is performed as described above in this exemplary embodiment.

The write operation in the micro controller10according to this exemplary embodiment is described hereinafter.FIG. 14is a flowchart showing an example of the operation of the flash sequencer700during writing to the data memory unit150. The operation is described by reference toFIG. 14. It is assumed that erasing of the interrupt detection memory unit152has been performed prior to the operation of the flowchart shown inFIG. 14, and “1” that is set during the erasing is stored as the interrupt detection flag value.

In Step10(S10), the flash sequencer700receives a write command to the data memory unit150and starts writing to the data memory unit150. To be specific, in this exemplary embodiment, writing of the status flag of the status memory unit151is carried out simultaneously with writing to the data memory unit150.

When the voltage decrease detection signal from the voltage monitoring circuit600is not received, the flash sequencer700continues processing until data writing is completed. When, on the other hand, the voltage decrease detection signal from the voltage monitoring circuit600is received during writing, the flash sequencer700starts writing of the interrupt detection flag.

In this processing, the flash sequencer700first interrupts writing to the data memory unit150in Step11(S11). To be specific, in this exemplary embodiment, the flash sequencer700interrupts writing to the data memory unit150and writing of the status memory unit151. Next, in Step12(S12), the flash sequencer700performs writing of the interrupt detection flag. To be more specific, writing of the interrupt detection flag is carried out in the interrupt detection memory unit152corresponding to the data memory unit150where writing has been performed in Step10. When writing of the interrupt detection flag is completed, “0” is stored as the interrupt detection flag value into the interrupt detection memory unit152.

The third exemplary embodiment is described above. In this exemplary embodiment, the interrupt detection memory unit152that is read by the reference read mode and that stores the interrupt detection flag indicating whether an interruption of writing occurs or not is placed. It is thereby possible to determine whether there is an interruption of writing in the data memory unit150and the status memory unit151. If the interrupt detection flag is read by the complementary read mode, when an interruption is detected and the interrupt detection flag is written in the past, “0” can be read even after erasing in the interrupt detection memory unit152. This can cause a failure to determine the presence or absence of an interruption. On the other hand, because the interrupt detection memory unit152is read by the reference read mode in this exemplary embodiment, the value in the erased state is uniquely defined, thus preventing the above problem.

It should be noted that, although writing is performed simultaneously and erasing is also performed simultaneously in the data memory unit150and the status memory unit151in this exemplary embodiment, writing may be performed separately, and erasing may be performed separately.

Further, in this exemplary embodiment, the case where a decrease in voltage is notified from the voltage monitoring circuit600included in the micro controller10to the flash sequencer700, and the flash sequencer700controls processing after the notification is described as an example. However, this may be implemented by another configuration. For example, a method for notifying a decrease in voltage may be any of the following three methods.

Notification method 1: Detection is done by a voltage monitoring circuit inside the micro controller10, and notification is given by an internal signal (the notification method described as the third exemplary embodiment).

Notification method 2: Detection is done by a power supply control circuit outside the micro controller10, and notification is given through an interrupt terminal of the micro controller10.

Notification method 3: Detection is done by a power supply control circuit outside the micro controller10, and notification is given through a reset terminal of the micro controller10.

The voltage monitoring circuit and the power supply control circuit can be also referred to as a voltage detection unit (voltage detection circuit). Further, a destination of notification about a decrease in voltage and a processing method after notification may be any of the following three methods, for example.

Control method 1: Notification about a decrease in voltage is given to the flash sequencer700. The flash sequencer700interrupts data writing and carries out writing of the interrupt detection flag (the control method described as the third exemplary embodiment).

Control method 2: Notification about a decrease in voltage is given to an interrupt controller (not shown) of the micro controller10. Interruption of data writing and writing of the interrupt detection flag are instructed to the flash sequencer700by software processing of the CPU400, and writing of the interrupt detection flag is carried out.

Control method 3: Notification about a decrease in voltage is given to a system control unit (not shown) of the micro controller10. In the state where the elements other than the flash sequencer700and the flash memory100are reset, a signal indicating writing of the interrupt detection flag is output from the system control unit to the flash sequencer700, and the flash sequencer700interrupts data writing and carries out writing of the interrupt detection flag.

Combinations of the notification methods and the control methods described above may be the following five combinations, for example. Specifically, an exemplary embodiment that combines the notification method 1 and the control method 1, an exemplary embodiment that combines the notification method 1 and the control method 2, an exemplary embodiment that combines the notification method 2 and the control method 1, an exemplary embodiment that combines the notification method 2 and the control method 2, an exemplary embodiment that combines the notification method 3 and the control method 3 may be implemented as an example of combinations.

Although the invention accomplished by the present inventor is specifically described using several exemplary embodiments in the foregoing, the present invention is not restricted to the above-described exemplary embodiments, and various changes and modifications may be made without departing from the scope of the invention. For example, although the interrupt detection memory unit152is added to the flash memory200according to the second exemplary embodiment in the third exemplary embodiment, the interrupt detection memory unit152may be added to the flash memory100according to the first exemplary embodiment.

The first to third embodiments can be combined as desirable by one of ordinary skill in the art.