Method for Extending the Lifetime of EEPROM through Bit Operations

By dividing memory areas in EEPROM and using bit operations to balance the erase probability, the problem of shortening the EEPROM life is solved, and the life of EEPROM and the accurate data restoration of the EEPROM is achieved.

CN119649881BActive Publication Date: 2025-08-01RICE MICROELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411708531.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-08-01
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

The prior art has shortened the life of the EEPROM due to the uneven bit erase probability, which cannot effectively extend the overall service life of the EEPROM.

Method used

By dividing the EEPROM into a user storage area and a conversion information storage area, and balancing the erase probability of data through bit operations, the data is processed using the conversion module and the functional module to ensure that the number of erases of each bit is consistent.

Benefits of technology

Without reducing the total number of erases, the service life of the EEPROM is extended, and the accurate restoration of data is ensured through data conversion. It can be combined with other methods to further extend the service life of the EEPROM.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649881B_ABST
    Figure CN119649881B_ABST
Patent Text Reader

Abstract

The present invention discloses a system and method for extending the lifespan of an EEPROM through bit operations. The system includes a conversion module, a function module, and an EEPROM. The method includes the following steps: dividing the EEPROM into different storage areas, including a user storage area for storing user data and a conversion information storage area for storing conversion information, so that the erasure and writing of data are evenly distributed to each cell of the EEPROM. The present invention solves the problem of limited lifespan of the EEPROM caused by different bit erasure probabilities during the erasure and writing process, and achieves a better effect of extending the lifespan of the EEPROM.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of storage devices, and more particularly, to a method for extending the life of an EEPROM through bit operations. Background Art

[0002] As Figure 1 shown, it shows a schematic diagram of a commonly used floating gate transistor structure in an EEPROM (Electrically Erasable Programmable Read Only Memory). The basic working principle of a floating gate type EEPROM memory is based on different amounts of stored charge on the gate dielectric, thereby distinguishing its stored information "0" and "1", and finally converting it into digital "0" and "1" via a reading circuit for distinction and reading.

[0003] The basic operation of an EEPROM for data processing is erasing and writing. Before each programming, an erasing "clearing" operation is required, and then the storage units that need to be written as "1" are programmed, while the storage units written as "0" remain unchanged.

[0004] When operating on a single bit, according to the original data storage and the subsequent results to be modified, it can be divided into 4 cases:

[0005] The first case is that originally it is 1 and needs to be changed to 1, and the internal storage area will change twice;

[0006] The second case is that originally it is 1 and needs to be changed to 0, and the internal storage area will change once;

[0007] The third case is that originally it is 0 and needs to be changed to 0, and the internal storage area will not change;

[0008] The fourth case is that originally it is 0 and needs to be changed to 1, and the internal storage area will change once.

[0009] The more the internal storage area changes, the faster its life is consumed, and when the life of one bit is consumed, the entire byte will become unusable.

[0010] Since the erasing and writing of an EEPROM is in units of bytes, existing technical solutions all extend the life in units of bytes. However, in fact, there are different bit erasing probabilities during the erasing and writing process. If these bit erasing probabilities can be balanced, the effect of extending the life of the EEPROM can be achieved. Summary of the Invention

[0011] In order to solve the above problems, the present invention proposes a method for extending the life of an EEPROM through bit operations for the above-mentioned existing technologies, which equalizes the life of each bit inside each byte, thereby achieving the effect of extending the life of the EEPROM.

[0012] To achieve the above object, according to one aspect of the present invention, there is provided a system for extending the life of an EEPROM through bit operations.

[0013] It includes: a conversion module, a function module, and an EEPROM.

[0014] The conversion module is used to read the data in the conversion information storage area of the EEPROM and perform conversion.

[0015] The function module is used to read the data of the conversion module and interact with the EPROM.

[0016] The EEPROM is used to receive the data of the function module and store the data.

[0017] According to another aspect of the present invention, there is provided a method for extending the life of an EEPROM through bit operations, which is characterized by including the following steps:

[0018] The EEPROM is divided into different storage areas, including a user storage area for storing user data and a conversion information storage area for storing conversion information, so that the erasing and writing of data are evenly distributed to each cell of the EEPROM.

[0019] Further, in the user storage area, a physical address is assigned to each Byte.

[0020] Further, in the conversion information storage area, each address stores a page of conversion information.

[0021] Further, the data storage steps are as follows:

[0022] S1. Let the data to be stored be data_in. The conversion module reads the data y1 in the corresponding position of the conversion information storage area in the EEPROM. The conversion module takes the data in data_in as a whole for each byte, and shifts the data in the single byte by y1 bits, that is, shifts the first y1 bits of the data to the back of the data to form a new data.

[0023] S2. Increase y1 by 1 to become y2, and output the modified data and y2. After the modified data is output, it is operated in the function module.

[0024] Further, the data reading steps are: S3. After being processed by the function module, it is data_out1.

[0025] Restore it through the conversion module.

[0026] S4. The conversion module reads the data y3 in the conversion information storage area at the corresponding position, and then displaces the data of data_out1 in the opposite direction to that during writing, that is, y3 - 1 bits, so as to restore the original number data_out.

[0027] According to another aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps in the method for extending the life of an EEPROM by bit operations according to the present invention are implemented.

[0028] According to still another aspect of the present invention, there is provided a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the steps in the method for extending the life of an EEPROM by bit operations according to the present invention are implemented.

[0029] Compared with the prior art, the present invention has at least the following beneficial effects:

[0030] 1. Without reducing the total number of erase / write cycles and without changing the erase / write frequency, data conversion is used to ensure that the erase probability of each bit of data is equalized, thereby extending the life of the EEPROM;

[0031] 2. When reading data, the original data can be accurately restored through the stored data conversion information;

[0032] 3. It can be combined with other methods for extending the life of an EEPROM to extend the life of the EEPROM to a greater extent;

[0033] 4. The data conversion information reduces the number of bit erasures through a special coding representation method to ensure the service life of the data conversion storage area. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only relate to some embodiments of the present invention and do not limit the present invention.

[0035] Figure 1 is a schematic diagram of a common floating gate transistor structure in an EEPROM;

[0036] Figure 2 is a general framework diagram in a preferred embodiment of the present invention;

[0037] Figure 3 is an internal storage schematic diagram of an EEPROM in a preferred embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions of the embodiments of the present invention with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention.

[0039] Unless otherwise defined, the technical terms or scientific terms used herein shall have the ordinary meanings as understood by those of ordinary skill in the art to which the present invention pertains.

[0040] The following will detail the specific implementation manners of the present invention in conjunction with the Figure 2-3 accompanying drawings and embodiments.

[0041] Embodiment 1: As Figure 2 shown, the present invention provides a system for extending the lifespan of an EEPROM through bit operations,

[0042] including a conversion module 201, a function module 202, and an EEPROM 203.

[0043] The conversion module 201 is configured to read the data in the conversion information storage area of the EEPROM 203 and perform conversion;

[0044] The function module 202 is configured to read the data of the conversion module 201 and interact with the EPROM 203;

[0045] The EEPROM 203 is configured to receive the data of the function module 202 and store the data.

[0046] The following will introduce its implementation principles separately for storage and reading.

[0047] Among them, the storage steps include:

[0048] Step 1: Assume the data to be stored is data_in. The conversion module 201 processes it. The principle is that the conversion module 201 reads the data y1 in the corresponding position of the conversion information storage area of the EEPROM 203. The conversion module 201 takes the data in data_in as a whole for each byte, and shifts the data in a single byte by y1 bits (shifts the first y1 bits of the data to the back to form a new data).

[0049] Step 2: Increase y1 by 1 to become y2, and output the modified data and y2. After the modified data is output, it can be operated on in the function module 202, such as comparing with the data currently stored in the EEPROM 203 to avoid repeated modification and performing other shift operations to extend the lifespan, etc. The modified y2 value can be directly written into the corresponding position of the conversion information storage area.

[0050] The reading steps include:

[0051] Step 3: After being processed by the functional module 202, it becomes data_out1, which is restored by the conversion module 201.

[0052] Step 4: The conversion module 201 reads the data y3 in the conversion information storage area at the corresponding position, and then shifts the data of data_out1 by (y3 - 1) bits in the opposite direction to the writing direction, and the original data data_out can be restored.

[0053] As Figure 3 shown, it shows the internal storage of the EEPROM of the present invention. The EEPROM memory is divided into three areas, namely the user storage area, the conversion information storage area, and the other information storage area.

[0054] In the user storage area, a physical address is assigned to each Byte. The size of the user storage area in the figure is 256 Byte. Every 4 Byte is divided into 1 page (the number of Byte divided into 1 page can be modified according to the actual application scenario). In particular, the address 0x00 - 0x03 is divided into one page.

[0055] Each address in the conversion information storage area stores the conversion information of one page. The specific representation form is exemplified as follows: The data at the address 0x100 represents the conversion information of the first page. The data form is that the y-th bit is 1 and the rest of the bits are 0. After reading this information, it can be operated to make it represent the decimal number y (which can be achieved through a simple digital logic). This data form can reduce the number of erase / write operations each time it is modified, taking into account the lifespan of the conversion information storage area.

[0056] In summary, by adding a conversion module to perform displacement operations on the original data, for each data input, the number of bits it is displaced is random, which can ensure that in a large sample, each bit of the EEPROM tends to have the same number of erase / write operations, that is, the lifespan is roughly the same.

[0057] The following uses a model to exemplarily illustrate how much the lifespan of the EEPROM can be extended by the present invention: Suppose a series of numbers need to be recorded, and the decimal numbers in reality are converted to binary using the BCD code. For each user storage address, it is only modified when it changes (this can reduce the number of erasures and prolong the lifespan). Considering a two-digit decimal number, it will be converted into an eight-digit binary number. Suppose this decimal number is not greater than 40 in real life, then the 7th and 8th bits (from low to high) of its binary are constantly 0. Additionally, assuming a uniform situation, the probability that the highest bit of the BCD code is 1 is 0.2. Therefore, the probability that the 4th bit is 0 is 0.8. Assuming that the other bits are evenly distributed between 0 and 1, through displacement transformation, it is expected that 2.7 bits of the original 8 bits will be erased and 2.7 bits will be programmed. So the probability that a single bit is erased or written is 33.8%. If bit operations are not performed, the erasure probability of the most frequently erased bit is 50%. From this, it can be calculated that the lifespan of the EEPROM is extended by approximately 48%. In fact, there are many situations such as using ASCII code to record English (the probabilities of different English letters are different in actual use), etc., which can also cause the erasure probability of each bit in the EEPROM to be different. The essential reason for this is the uneven data used in the real world and the uneven use of bits in the encoding method itself.

[0058] Embodiment 2:

[0059] The computer-readable storage medium of this embodiment stores a computer program, and when the program is executed by a processor, it implements the steps in the method of extending the lifespan of the EEPROM through bit operations in Embodiment 1.

[0060] The computer-readable storage medium of this embodiment can be an internal storage unit of the terminal, such as the hard disk or memory of the terminal; the computer-readable storage medium of this embodiment can also be an external storage device of the terminal, such as a plug-in hard disk, smart memory card, secure digital card, flash card, etc. equipped on the terminal; further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the terminal.

[0061] The computer-readable storage medium of this embodiment is used to store the computer program and other programs and data required by the terminal, and the computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.

[0062] Embodiment 3:

[0063] The computer device of this embodiment includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps of the method of extending the lifespan of the EEPROM through bit operations based on RANSAC in Embodiment 1.

[0064] In this embodiment, the processor can be a central processing unit, or it can also be other general-purpose processors, digital signal processors, application-specific integrated circuits, off-the-shelf programmable gate arrays, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor, etc.; the memory can include read-only memory and random access memory, and provide instructions and data to the processor. A part of the memory can also include non-volatile random access memory. For example, the memory can also store information about the device type.

[0065] Those skilled in the art should understand that the content disclosed in the embodiments can be provided as a method, a system, or a computer program product. Therefore, the present solution can be implemented in the form of a hardware embodiment, a software embodiment, or a form combining software and hardware embodiments. Moreover, the present solution can be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0066] This solution is described with reference to the flowcharts and / or block diagrams of the methods and computer program products according to the embodiments of this solution. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions; these computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementing in the process Figure 1 one process or multiple processes and / or block diagram Figure 1 a device for the functions specified in one block or multiple blocks.

[0067] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements in the process Figure 1 one process or multiple processes and / or block diagram Figure 1 the functions specified in one block or multiple blocks.

[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing in the process Figure 1 one process or multiple processes and / or block diagram Figure 1Steps of the functions specified in one or more boxes.

[0069] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0070] The examples described in the present invention are only descriptions of the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention. Without departing from the design idea of the present invention, various deformations and improvements made by those skilled in the art to the technical solutions of the present invention should fall within the protection scope of the present invention.

Claims

1. A system for extending the lifespan of an EEPROM through bit operations, characterized in that, It includes: a conversion module, a function module, and an EEPROM; The conversion module is used to read and convert the data in the conversion information storage area of the EEPROM; The function module is used to read the data of the conversion module and interact with the EPROM; The EEPROM is used to receive the data of the function module and store the data; Among them, the storage process is as follows: Suppose the data to be stored is data_in, and the conversion module processes it. The principle is that the conversion module reads the data y1 in the conversion information storage area at the corresponding position in the EEPROM. The conversion module takes the data in data_in as a whole for each byte and shifts the data in a single byte by y1 bits; increases y1 by 1 to become y2, and outputs the modified data and y2. After the modified data is output, it can be operated in the function module, and the modified y2 value is directly written into the conversion information storage area at the corresponding position; Among them, the reading process is as follows: After being processed by the function module, it becomes data_out1, and it is restored by the conversion module; the conversion module reads the data y3 in the conversion information storage area at the corresponding position, and then shifts the data of data_out1 in the opposite direction to the writing direction, that is, y3 - 1 bits, to restore the original data data_out.

2. A method for extending the lifespan of an EEPROM through bit operations, characterized in that, It includes the following steps: The EEPROM is divided into different storage areas, including a user storage area for storing user data and a conversion information storage area for storing conversion information, so that the erasing and writing of data are evenly distributed to each cell of the EEPROM; Among them, the data storage steps are as follows: S1. Suppose the data to be stored is data_in, the conversion module reads the data y1 in the conversion information storage area at the corresponding position in the EEPROM. The conversion module takes the data in data_in as a whole for each byte and shifts the data in a single byte by y1 bits, that is, moves the first y1 bits of the data to the back of the data to form a new data; S2. Increase y1 by 1 to become y2, and output the modified data and y2. After the modified data is output, it is operated in the function module; Among them, the data reading steps are as follows: S3. After being processed by the function module, it becomes data_out1, and it is restored by the conversion module; S4. The conversion module reads the data y3 in the conversion information storage area at the corresponding position, and then shifts the data of data_out1 in the opposite direction to the writing direction, that is, y3 - 1 bits, to restore the original number data_out.

3. The method according to claim 2, wherein In the user storage area, a physical address is assigned to each Byte.

4. The method according to claim 3, wherein In the conversion information storage area, each address stores one page of conversion information.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it implements the steps in the method for extending the life of the EEPROM by bit operation described in any one of claims 2 to 4.

6. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the method for extending the life of the EEPROM by bit operation described in any one of claims 2 to 4.

Citation Information

Patent Citations

  • Storage device and method of operating the same

    CN111312305A

  • Memory device using eeprom

    JP1999260074A