This invention relates to memories, and more particularly to memories that have a portion that can be switched between use as data and use as ECC.
One of the techniques used in computing systems is error correction. Error correction, however, is not used in all computing systems because some applications are much more error tolerant than others. There have been attempts to make a memory system more flexible by having a mode for error correction and a mode that does not use error correction. In the case of no error correction, the portion of the memory system used for storing the error correction code (ECC) is used as general purpose (data) memory.
One of the difficulties has been applying this type of approach to a single integrated circuit, especially when the memory is a non-volatile memory (NVM).
Thus there is a need for an approach for switching a memory between use in storing ECC and in storing data that overcomes or reduces the adverse effects of these issues.
The foregoing and further and more specific objects and advantages of the instant invention will become readily apparent to those skilled in the art from the following detailed description of a preferred embodiment thereof taken in conjunction with the following drawings:
In one aspect, a memory has an ECC-enabled mode and an ECC-disabled mode in which the portion of the memory dedicated to use as storing ECC in the ECC-enabled mode is used for storing general purpose information (data) in the ECC-disabled mode. This is achieved in a non-volatile memory (NVM) by having the data and the portion of the memory with the corresponding ECC on the same word line. This is particularly important in an NVM because of complications relating to erase. In the ECC-enabled mode the ECC and corresponding data should be erased, programmed, and read together to avoid a significant layout and performance penalty. This is best achieved by having the ECC and the data on the same word line. This is better understood with reference to the drawings and the following description.
Shown in
Address mapper 14 has a first input for receiving an address from an address bus, and a second input for receiving an ECC-enable signal, a first output coupled to select logic 22, a second output coupled to column decoder 26, and a third output connected to row decoder 21. ECC encoder 16 has an input for receiving data from a data-in bus and an output coupled to column decoder 26. ECC decoder 18 has a first input coupled to select logic 22, a second input coupled to select logic 22, and an output coupled to mux 20. Mux 20 has a first input coupled to select logic 22, a second input coupled to the output of ECC decoder 18, a third input for receiving the ECC enable signal, and an output for providing data to a data-out bus. Row decoder 21 has an input connected to the third output of address mapper 14 and outputs connected to sectors 28-34. Select logic 22, which is coupled to plurality of sense amplifiers 24, has a first input connected to the first output of address mapper 14, a first output coupled to the first input of ECC decoder 18, and a second output connected to the second input of ECC decoder 18 and to the first input of mux 20. Plurality of sense amplifiers 24 is connected between column decoder 26 and select logic 22. Column decoder 26, which is coupled to array 12 and plurality of sense amplifiers 24, has a first input connected to the second output of address mapper 14, a second input connected to the data-in bus, and third input connected to the output of ECC encoder 16.
Although only four sectors are actually shown in
Sector 28 is shown in
Shown in
Also shown in
In operation memory 10 has two modes of operation concerning the use of ECC; an ECC-enabled mode and an ECC-disabled mode. For a read in the ECC-enabled mode, a row is selected by row decoder 21 by enabling the word line, and a data byte and the corresponding ECC information in the selected row are coupled by column decoder 26 and select logic 22 to ECC decoder 18. Mux 20 then couples the output received from ECC decoder 18 onto the data-out bus. Address mapper 14 couples the row address portion of the address to row decoder 21 and the column portion of the address to column decoder 26 and select logic 22. Sense amplifiers 24 comprise a total of 24 sense amplifiers. Eight of the sense amplifiers are for sensing the logic state of memory cells from the group of sub-sectors comprising sub-sectors 36, 44, 52, and 60. Eight of the sense amplifiers are for sensing the logic state of memory cells from the group of sub-sectors comprising sub-sectors 38, 46, 54, and 62. Four of the sense amplifiers are for detecting the logic state of memory cells from the group of sub-sectors comprising sub-sectors 40, 48, 56, and 64. Four of the sense amplifiers are for detecting the logic state of memory cells of the group of sub-sectors comprising sub-sectors 42, 50, 58, and 66.
Using a selection from sub-sector 36 as an example, row decoder 21 selects a row from sector 28 by enabling a word line such as word line 94 shown in
Thus, it is seen that the memory cells that provide the eight data bits are connected to the same word line as the memory cells that provide the corresponding four ECC information bits. Also there are eight bits of data from each of the data sub-sectors from a selected sector and a total of eight bits of ECC from two sub-sectors from the selected sector. During erase, a sector is selected for being erased by row decoder 21 selecting all word lines in the sector to be erased. Thus, for example, if sector 28 is to be erased, row decoder 21 in response to address mapper 14 enables all of the word lines of sector 28. Since all of the memory cells of a sector are erased at the same time, the data and the corresponding ECC information is similarly erased at the same time. It is useful to avoid having a different word line for the data than for the corresponding ECC information because that would increase both circuit and layout to achieve reading, programming, and erase.
For programming in the ECC-enabled mode, data comes to ECC encoder 16 from the data-in bus. ECC encoder 16 provides the ECC information to column decoder 26 based on the data on the data bus. Row decoder 21 selects a row by enabling the word line of the selected row and that causes the corresponding source driver to be activated to supply a programming voltage. Column decoder 26 sinks the needed programming current on the selected bit lines for the data portion of the memory and for the ECC portion. For example, for the case of writing data into sub-sector 36 of sector 28, a row is selected in sector 28, eight bit lines that run through sub-sector 36 carry the program levels for data on the selected bit lines as driven by column decoder 26, and the four bit lines that run through sub-sector 40 carry the program levels for ECC information as driven by column decoder 26. Thus, the same column decoder and row decoder are used for programming both the selected data location and the ECC information location. This helps avoid excessive layout and circuit complexities.
The eight bits used for ECC information in the ECC-enabled mode are available for data in the ECC-disabled mode. For example, the memory cells in sub-sectors 40, 42, 48, 50, 56, 58, 64, and 66 are available for use as data. There are eight sense amplifiers committed to those sub-sectors so that a full byte of data from a given word line access is available from the portion of the memory that was used for ECC information in the ECC-enabled mode. This is achieved by configuring the address mapper to recognize a different address for a given word line. Thus, for example, a particular address on the address bus, may result in a different row in memory 10 being selected. A given address that would select word line 96 during the ECC-enabled mode, would result in a different word line being selected during the ECC-disabled mode. In effect, there is a decode for three bytes on a given word line instead of two bytes. Another difference is that all eight of the sense amplifiers that are coupled to the bit lines that run through the ECC portion of the memory are enabled when that portion of the memory is selected during the ECC-enabled mode. The erase operation is the same for both the ECC-enabled and ECC-disabled mode.
Using a selection of a byte from sub-sectors 40 and 42 as an example, address mapper 14 provides the address to row decoder 21 that causes a word line passing through sub-sectors 40 and 42 to be enabled. Similarly, column decoder 26 couples the selected bit lines that pass through sub-sectors 40 and 42 to the eight sense amplifiers for ECC information bits. All eight of the sense amplifiers for ECC information bits are enabled and they detect the logic state of memory cells that are connected to the selected word line and eight selected bit lines. Select logic passes the output of these eight sense amplifiers to mux 20. Mux 20 then provides the output of the sense amplifiers to the data-out bus.
For the program operation, the column decoder 26 provides the appropriate program levels to the selected eight bit lines that pass through sub-sectors 40 and 42. Select logic 22 provides the necessary signals to column decoder 26 to select eight bit lines instead of just four that are selected in the ECC-enabled mode. This remapping of the address scheme provides for an effective use of the ECC portion of the memory as a data memory while maintaining the layout and circuit simplicity of having the data and corresponding ECC portions in the same row.
Shown in
Shown in
Various changes and modifications to the embodiments herein chosen for purposes of illustration will readily occur to those skilled in the art. For example, although an NVM was discussed that used a source driver for programming was described and that there are particular benefits for NVM, that does not preclude the possibility that other memories may be used. In this example, specific numbers of memory cells, word lines, and bit lines were described, but these were given as an example and other size memories with other arrangements may also be used. The specifics of the memory mapping are a further example of the specific size being given as an example and that other sizes may be used. To the extent that such modifications and variations do not depart from the spirit of the invention, they are intended to be included within the scope thereof which is assessed only by a fair interpretation of the following claims.