Non-volatile memory
The non-volatile memory system with current and substitute sectors and an erasure counter addresses the issue of sector aging by reducing unnecessary write/erase cycles, enhancing memory longevity and efficiency.
Patent Information
- Application Number
- FR2022012578
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing non-volatile memory technologies require significant physical footprint and high write/erase cycles, leading to accelerated aging due to the need to erase entire sectors, even when only partial data updates are needed.
Implementing a non-volatile memory system with current and substitute memory sectors, where valid data is copied to a substitute sector before erasing the current sector, and using an erasure counter to manage sector usage and reduce unnecessary write/erase cycles.
This approach reduces the number of write/erase cycles, thereby minimizing memory aging and maintaining performance by optimizing sector utilization and extending the lifespan of the memory.
Smart Images

Figure 00000017_0000 
Figure 00000018_0000 
Figure 00000019_0000
Abstract
Description
Title of the invention: Non-volatile memory Technical field
[0001] The present description relates generally to non-volatile memories and in particular FLASH type memories. Prior art
[0002] It has been proposed to emulate an electrically erasable reprogrammable read-only memory (EEPROM), or other low access granularity memory, by a sector erasable memory, such as a FLASH memory.
[0003] In sector-erasable memories, addresses can be written a first time but, before a second writing to the same address, it is generally necessary to first erase the sector comprising the target address. If a sector contains both current data and obsolete data, before being able to reuse the addresses which contain the obsolete data, it is therefore necessary to proceed with the saving of the current data, the erasure of the entire sector, and the rewriting of the current data in the sector.
[0004] A mechanism is generally implemented to not lose the current data in case the process of writing the current data to the sector cannot be completed, for example if the power is cut off during the write operation.
[0005] However, existing mechanisms impose a significant physical footprint in the circuits as well as a high number of write or erase cycles, accelerating the aging of memories. Summary of the invention
[0006] One embodiment overcomes all or part of the drawbacks of existing solutions.
[0007] One embodiment provides a non-volatile memory comprising: - a plurality of common memory sectors; - at least one substitute memory sector; and - a non-volatile memory control circuit configured to store data in the sectors and to erase data stored in one of the sectors by erasing all data stored in said sector at once; a first current memory sector comprising at least one first valid data and a second current sector comprising at least one second valid data; the memory control circuit being configured to: - determine that one of the current sectors is to be erased, and accordingly select a sector from among the first and second current sectors; - copy at least the valid data from the selected current sector into the substitute memory sector, the substitute memory sector becoming a current sector; and - erase all data in the currently selected sector, with the currently selected sector becoming the replacement sector.
[0008] Another embodiment provides a method of operating a non-volatile memory comprising: - determining, by a memory control circuit, that one of a plurality of current memory sectors of the memory is to be erased, and accordingly selecting, with the memory control circuit, one of the first and second current sectors, the non-volatile memory control circuit being configured to sequentially store data in the sectors and to erase data stored in one of the sectors by erasing all the data stored in said sector at once, a first current memory sector comprising at least one first valid data item and a second current sector comprising at least one second valid data item; - copying, with the memory control circuit, at least the valid data of the selected current sector into the substitute memory sector, the substitute memory sector becoming a current sector; and - erase, with the memory control circuit, all data in the currently selected sector, the currently selected sector becoming the replacement sector.
[0009] According to one embodiment, the control circuit is configured to select the current sector having the least space occupied by valid data.
[0010] According to one embodiment, an erasure counter counts, for each memory sector, a number of times it is erased, and the control circuit is configured so that, if the number counted by the erasure counter for one of the memory sectors is greater than a first threshold, it is copied to the replacement sector.
[0011] According to one embodiment, the largest data to be written has a first size, the size of each memory sector being greater than or equal to said first size.
[0012] According to one embodiment, a writeable space of the current memory sectors of the plurality, added to a writeable space of the substitute memory sector, is greater than or equal to the quantity of data to be written in the memory.
[0013] According to one embodiment, the plurality comprises a third current memory sector, the memory control circuit being configured to determine that one of the current sectors is to be renewed, and accordingly select a current sector from among the first, second or third current sectors.
[0014] According to one embodiment, the non-volatile memory control circuit is configured to sequentially store data in the sectors.
[0015] According to one embodiment, the memory control circuit is configured to copy only the valid data or data from the selected current sector into the substitute memory sector.
[0016] According to one embodiment, the control circuit is configured to select the current sector having a space occupied by valid data that can be contained in the substitution sector. Brief description of the drawings
[0017] These characteristics and advantages, as well as others, will be explained in detail in the following description of particular embodiments given without limitation in relation to the attached figures among which:
[0018] [Fig.l] schematically represents an example of a non-volatile memory device according to an embodiment of the present description;
[0019] [Fig.2] schematically represents an example of a data element which is written into an address of the non-volatile memory of [Fig.l];
[0020] [Fig.3] is a schematic view illustrating operating steps of a non-volatile memory according to an example;
[0021] [Fig.4] is a schematic view illustrating an example of the operating steps of a non-volatile memory according to an embodiment of the present description;
[0022] [Fig.5] is a schematic view illustrating another example of the operating steps of a non-volatile memory according to an embodiment of the present description; and
[0023] [Fig.6] illustrates, in block form, a method of operating a non-volatile memory according to an embodiment of the present description. Description of the embodiments
[0024] The same elements have been designated by the same references in the different figures. In particular, the structural and / or functional elements common to the different embodiments may have the same references and may have identical structural, dimensional and material properties.
[0025] For the sake of clarity, only the steps and elements useful for understanding the described embodiments have been shown and are detailed.
[0026] Unless otherwise specified, when referring to two elements connected between them, it means directly connected without intermediate elements other than conductors, and when we refer to two elements connected (in English "coupled") between them, it means that these two elements can be connected or be linked by means of one or more other elements.
[0027] In the following description, when reference is made to absolute position qualifiers, such as the terms "front", "back", "top", "bottom", "left", "right", etc., or relative position qualifiers, such as the terms "above", "below", "upper", "lower", etc., or to orientation qualifiers, such as the terms "horizontal", "vertical", etc., reference is made unless otherwise specified to the orientation of the figures.
[0028] Unless otherwise specified, the expressions "about", "approximately", "substantially", and "of the order of" mean to within 10%, preferably to within 5%.
[0029] [Fig. 1] schematically represents an example of a non-volatile memory device 13 according to an embodiment of the present description.
[0030] The non-volatile memory device 13 comprises a non-volatile memory 10, for example of the FLASH type (FLASH MEMORY). The non-volatile memory 10 is for example connected to a system bus of the device 13 via a non-volatile memory interface 12 (FLASH INTERFACE). The non-volatile memory interface 12 is connected, for example, to the non-volatile memory 10 via a communication bus 11 and is configured, for example, to ensure in particular the management of writing and reading data to and from the FLASH memory 10.
[0031] The device 13 further comprises, for example, a processing unit 15 (CPU) comprising one or more processors under the control of instructions stored in an instruction memory 17 (INSTR MEM). The instruction memory 17 is, for example, of the random access type (Random Access Memory, RAM). The processing unit 15 and the memory 10 communicate, for example, via the system bus 16. In one example, the device 13 further comprises an input / output interface 14 (I / O INTERFACE) connected to the system bus 16. Although the memories 10 and 17 are represented by separate memory devices, in another example, the memories 10 and 17 are implemented by the same memory device. This memory device contains, for example, both the code to be executed and is also used to store EPPROM type data.
[0032] The memory 10 is a memory divided into several sectors in which data, represented by data elements, is stored. In this type of sector memory, data can be written into empty areas of each sector with a fairly low granularity, for example by words of 16, 32 or 64 bits. However, it is generally not possible to rewrite into an area already programmed without first erasing the area. In certain embodiments, it is however possible to change bits from the state “1” to the state “0”, but a limited number of times for the same address. In addition, since it is not possible to erase only part of a sector, the erase operation is applied to an entire sector at a time.
[0033] [Fig. 2] is an example of a data element which is, for example, written into the non-volatile memory 10 of [Fig. 1]. A data element is, for example, formed of a sequence of bits. These bits represent, for example, a set of a first field comprising an identifier x (ID: x) and a second field comprising a data value Dx (DATA VALUE: Dx). The data value Dx is, for example, composed of one or more bytes having a value which can be updated and for which the last update is sought when the memory 10 is accessed. The identifier x is, for example, an integer indicating the identifier of the data value.
[0034] In the following, the data elements are represented by Dx_y, where x is the identifier of the data value and where y is an integer indicating an index of the version of the value of the data element. For a data identifier x, -that is to say with fixed x-, the highest index y corresponds to the data element with identifier x which is valid, that is to say which is up to date. The index y is not part, for example, of the data elements stored in the non-volatile memory 10, because the valid data element is for example indicated by the order of storage of the data in the memory. For example, the data element with identifier x which is valid is the one having the most important address (with the highest value).
[0035] [Fig. 3] is a schematic view of operating steps of the non-volatile memory 10 according to a non-optimal example.
[0036] In the example of [Fig. 3], the memory 10 comprises two data banks 110, 112. The bank 110 comprises two memory sectors S1, S2 and the data bank 112 comprises two memory sectors S3, S4. In the example of [Fig. 3], the memory sectors S1, S2, S3, S4 each have a capacity of 8 kilobytes. In another example, the memory capacity of the sectors is greater than 8 kilobytes, for example 16 or 32 kilobytes, or even several hundred or thousands of kilobytes. In yet another example, the memory capacity of the sectors is less than 8 kilobytes, for example, 1 kilobyte.
[0037] The memory 10 is controlled, for example, by a control circuit 104. In the example of [Fig. 3], the control circuit 104 is included in the memory 10. In another example not shown, the control circuit 104 is outside the non-volatile memory 10, and is part, for example, of the non-volatile memory interface 12. The control circuit 104 of the memory 10 is configured to sequentially store data in the sectors, that is, for example, one by one, or two by two, or more generally n by n, where n is a positive integer. The control circuit 104 is also configured to erase the data stored in one of the sectors by erasing all the data stored in the sector at once. In other words, all the data in a sector is erased at once without it being possible to erase only part of the data in the same sector.
[0038] In the example of [Fig. 3], prior to an operating step 130, data D1_0, D2_0, D3_0, D4_0 and D5_0 are written in the sector S1. The sectors S2, S3, S4 are initially empty.
[0039] In step 130, the data Dl_0 is updated by storing a new data item Dl_1, then the data item D2_0 is updated three times by sequentially storing new data items D2_1, D2_2 and D2_3, and finally the data item D5_0 is updated by storing a new data item D5_1. To do this, since the sector S1 is full, the updated data items Dl_1, D2_1, D2_2, D2_3, and D5_1 are written to the next free sector, i.e., the sector S2. The sector S2 becomes full in turn. The bank 110 is therefore full. The sectors S1 and S2 contain valid data: D3_0 and D4_0 for S1, and Dl_1, D2_3 and D5_1 for S2.
[0040] In a step 140, the data item Dl_l is updated by storing a new data item Dl_2, then the data item D2_3 is updated three times by sequentially storing new data items D2_4, D2_5 and D2_6 and finally the data item D5_l is updated by storing a new data item D5_2. The sectors S1 and S2, and the bank 110, being full, the data item Dl_2 is stored in the sector S3. This storage causes, for example, a switchover of the banks 110, 112 in order to be able to continue storing the updated data. In particular, it is necessary to free up space, which involves freeing bank 110. To do this, all valid data to be stored and those contained in sectors SI and S2 are copied, i.e. transferred, from sectors SI and S2 to sector S3, then to sector S4 when sector S3 is full. In the example of [Fig.3], after copying valid data and updating data in S3 and S4 sectors, there is 1 kilobyte of unwritten space left.
[0041] In a step 150, the data item Dl_2 is updated by storing a new data item Dl_3, then the data item D2_6 is updated three times by storing new data items D2_7, D2_8 and D2_9, and finally the data item D5_2 is updated by storing a new data item D5_3.
[0042] To do this, the data D1_3 is written in the remaining 1 kilobyte space free of sector S4. Sector S4 is then full. To be able to write the updated data D2_7, it is necessary to change banks and write in sector S1 which was erased in step 140. The valid data of sectors S3 and S4 are then copied into sector S1, then bank 112 is erased. The successively updated data D2_8, D2_9 and D5_3 are then stored in the remaining space of bank 110, i.e. in sector S2. In the example of [Fig.2], there then remain 2 kilobytes free in sector S2.
[0043] In a step 160, the data item Dl_3 is updated by storing a new data item Dl_4, then the data item D2_9 is updated by storing a new data item D2_10, which itself is updated by storing a new data item D2_11, which itself is updated by storing a new data item D2_12 and finally the data item D5_3 is updated by storing the new data item D5_4.
[0044] To do this, the data D1_4 and then the data D2_10 are written in the remaining 2 kilobytes of free space in sector S2. Sector S2 is then full. To be able to write the updated data D2_11, it is necessary to change banks and write in sector S3 which was erased in step 150. The valid data of S1 and S2 are then copied into sector S3, then bank 110 is erased. To do this, the data D2_11 is written in sector S3 which was erased previously in step 150. The valid data of S1 and S2 (i.e. D3_0, D4_0, D5_3 and D1_4) are then copied into sector S3, then bank 110 is erased. The updated data D2_12 and D5_4 are then stored in the remaining space of bank 112, i.e. in sector S4. In the example in [Fig.3] there are then 3 kilobytes free in S4.
[0045] In the example of [Fig.3], the data D3_0 and D4_0 are static or almost so, that is to say they are not updated often, while the data D1, D2 and D5 are updated regularly. In the case where the data D3_0 and D4_0 are larger than the data D1, D2 and D5, the recopying of the valid data D3_0 and D4_0 after the memory bank change consumes energy that it is interesting to limit. In addition, this increases the aging of the memory sectors, the total number of write and erase cycles of the same sector before this sector becomes defective being limited. To limit these effects, the size of the bank sectors can be increased, but this results in a larger footprint on the circuit which is expensive.
[0046] [Fig. 4] is a schematic view illustrating operating steps of a non-volatile memory 10 according to an embodiment of the present description.
[0047] The memory 10 comprises four memory sectors S1, S2, S3 and S4. The sectors S1, S2, S3 and S4 each have, for example, a storage capacity as described above in relation to [Fig. 3].
[0048] The memory 10 is controlled, for example, by a control circuit 204. In the example of [Fig. 4], the control circuit 204 is included in the memory 10. In another example not shown, the control circuit 104 is outside the non-volatile memory 10, and is part, for example, of the non-volatile memory interface 12. As for the control circuit 104 of [Fig. 3], the control circuit 204 of the memory 10 is configured to sequentially store data in the sectors, that is, for example, one by one, or two by two, or more generally n by n, where n is a positive integer. The control circuit 204 is also configured to erase the data stored in one of the sectors by erasing all the data stored in the sector at once. In other words, all the data in a sector is erased at once without it being possible to erase only part of the data in the same sector.
[0049] In the example of [Fig. 4], prior to an operating step 220, data D1_0, D2_0, D3_0, D4_0 and D5_0 are written in the sector S1. The sectors S2, S3, S4 are initially empty. In step 220, the sectors S1, S2 and S3 are so-called current memory sectors and the sector S4 is a so-called substitution memory sector.
[0050] In step 220, the data Dl_0 is updated by storing a new data Dl_1, then the data D2_0 is updated three times by sequentially storing new data D2_1 then D2_2 and D2_3, and finally the data D5_0 is updated and must be stored. To do this, since the sector S1 is full, the updated data Dl_1, D2_1, D2_2, D2_3, and D5_1 are written in the next free sector, i.e., the sector S2. The sector S2 becomes full in turn. The sectors S1 and S2 then contain the following valid data: D3_0, D4_0 for the sector S1 and Dl_1, D2_3, D5_1 for the sector S2.
[0051] In a step 230, the data item Dl_l is updated by storing a new data item Dl_2, then the data item D2_3 is updated by sequentially storing three times new data items D2_4, D2_5 and D2_6, and finally the data item D5_l is updated by storing a new data item D5_2. To do this, since the sector S2 is full, the updated data items Dl_2, D2_4, D2_5, D2_6, and D5_2 are written in the next free sector, i.e. the sector S3. The sector S3 becomes full in turn. The sectors S1 and S3 contain valid data: D3_0, D4_0 for the sector S1 and Dl_2, D2_6, D5_2 for the sector S3. The sector S2 no longer contains valid data.
[0052] In a step 240, the data item D1_2 is updated by storing a new data item D1_3, then the data item D2_6 is updated three times by sequentially storing new data items D2_7, then D2_8 and D2_9, and finally the data item D5_2 is updated by storing a new data item D5_3. To do this, the valid data item D1_3 is written into the sector S4. The memory control circuit 204 is configured to determine which of the current memory sectors S1, S2 and S3 is to be erased. In one example, the sector S2 is selected because it contains, for example, less valid data than the sector S1 or the sector S3. Once the sector S2 is selected, only the valid data of the sector S2 is copied into the substitute memory sector, i.e. the sector S4. In the example of the [Fig.4], sector S2 has no valid data and therefore no data is copied. All data in the currently selected sector S2 is then erased. The substitute memory sector S4 then becomes a current sector and the currently selected sector S2 becomes the substitute memory sector. The updated data D2_7, D2_8 and D2_9 are written successively as they are updated respectively. Then, the data D5_3 is written to sector S4.
[0053] At the end of step 240, sectors S1 and S4 contain valid data: D3_0, D4_0 for sector S1 and D1_3, D2_9, D5_3 for sector S4. Sector S3 no longer contains valid data.
[0054] In a step 250, the data item D1_3 is updated by storing a new data item D1_4, then the data item D2_9 is updated by sequentially storing new data items D2_10, D2_11 and D2_12, and finally the data item D5_3 is updated by storing a new data item D5_4. To do this, the valid data item D1_4 is written into the substitution sector, i.e. S2. The memory control circuit 204 is configured to determine which of the current memory sectors S1, S3 and S4 is to be erased. In one example, the sector S3 is selected because it contains, for example, less valid data than the sector S1 or the sector S4. Once sector S3 is selected, at least the valid data in sector S3, if any, is copied to the substitute memory sector, i.e. sector S2.In another example not shown, once sector S3 is selected, the valid data in sector S3 and one or more invalid data are copied into the substitute memory sector S2. In the example of [Fig.4], sector S3 has no valid data and therefore none is copied. All data in the currently selected sector S3 is then erased. The substitute memory sector S2 then becomes a current sector and the currently selected sector S3 becomes the substitute memory sector. The updated data D2_10, D2_11 and D2_12 are written successively as they are respectively updated in sector S2. Then, the data D5_4 is written into sector S2.
[0055] In the example of [Fig. 4], the memory 10 includes an optional erase counter 206 that counts, for each memory sector, a number of times it is erased. In this example, the control circuit 204 is configured so that, if the number counted by the erase counter for one of the memory sectors is greater than a first threshold, the sector that is determined by the control circuit 204 is copied into the replacement sector to then be erased and become the new replacement sector. This makes it possible to average the aging of the sectors in the case where, as in the example of [Fig. 4], a sector contains static data such as data D3_0 and D4_0.
[0056] An advantage of the example in [Fig.4] is that the valid data of a sector does not are not copied if no update occurs on them. This limits the number of memory write / erase cycles. The optional implementation of the erase counter also improves the aging of memory sectors by reintroducing an underused sector into the mechanism.
[0057] [Fig. 5] is a schematic view illustrating steps of operation of the non-volatile memory 10 according to another example of the embodiment of [Fig. 4] of the present description.
[0058] The memory 10 of the example of [Fig. 5] comprises three memory sectors S1, S2, S3. The sectors S1, S2 and S3 for example each have a storage capacity as described above in relation to [Fig. 3].
[0059] The memory 10 is coupled to a control circuit 204, which is similar to that described in connection with [Fig. 4], and will not be described again in detail.
[0060] In the example of [Fig. 5], prior to an operating step 520, a data item D1_0, for example of 6 kilobytes, is written in the sector SL. A data item D2_0, for example of 4 kilobytes, is written in the sector S2 because the sector S1 does not have the free space necessary for writing the data item D2_0. A data item D3_0, for example of 4 kilobytes, is written in the remaining part of the sector S2. The sector S2 becomes full in turn. The sector S3 is for example initially empty.
[0061] In step 520, sectors S1 and S2 are so-called current memory sectors and sector S3 is a so-called substitution memory sector.
[0062] In step 520, the data item D2_0 is updated by storing a new data item D2_1. To do this, since the sectors S1 and S2 do not have the free space necessary for writing the data item D2_1, the data item D2_1 is written in the next free sector, i.e. sector S3. The sectors S1 and S2 then contain the following valid data: D1_0 for the sector S1 and D3_0 for the sector S2.
[0063] In a step 530, the control circuit 204 of the memory 10 determines which of the current memory sectors S1 and S2 is to be erased, for example before storing a new data item D2_2, which is the update of the data item D2_1. In the example of [Fig. 5], the sector S2 is selected because all of the valid data can be copied into the sector S3. More generally, the sector S2 is selected because it contains, for example, less quantity of valid data than the sector S1, because the data item D3_0 is smaller than the data item D1_0 and the data item D2_0 is not valid. Once the sector S2 is selected, only the valid data of the sector S2 is copied into the substitute memory sector, i.e. the sector S3. The data item D3_0 is therefore copied into the sector S3.
[0064] In a step 540, all data in the selected current sector S2 is then erased. The substitute memory sector S3 then becomes a current sector and the selected current sector S2 becomes the new sub- memory sector. institution.
[0065] In a step 550, the data D2_2 is stored. To do this, since the sector S3 is full, the data D2_2 is written into the new substitution sector S2. The sectors S1 and S3 then contain the following valid data: D1_0 for the sector S1 and D3_0 for the sector S3.
[0066] In a step 560, the memory control circuit 10 determines which of the current memory sectors S1 and S3 is to be renewed, for example before being able to store a new data item D2_3, which is the update of the data item D2_2. In one example, the sector S3 is selected because it contains, for example, less amount of valid data than the sector S1, because the data item D3_0 is smaller in size than the data item D1_0. Once the sector S3 is selected, only the valid data of the sector S3 is copied into the current substitute memory sector, i.e. the sector S2. The data item D3_0 is therefore copied into the sector S2.
[0067] In a step 570, all data in the selected current sector S3 is then erased. The substitute memory sector S2 then becomes a current sector and the selected current sector S3 becomes the new substitute memory sector.
[0068] In a step 580, the data item D2_2 is updated by storing a new data item D2_3. To do this, since the sectors S1 and S2 do not have the free space necessary for writing the data item D2_3, the data item D2_3 is written in the next free sector, i.e. the sector S3. The sectors S1 and S2 then contain the following valid data: D1_0 for the sector S1 and D3_0 for the sector S2.
[0069] In a step 590, the control circuit 204 of the memory 10 determines which of the current memory sectors S1 and S2 is to be renewed, for example before storing the new data item D2_3. In one example, the sector S2 is selected because it contains, for example, less amount of valid data than the sector S1, because the data item D3_0 is smaller in size than the data item D1_0. Once the sector S2 is selected, only the valid data of the sector S2 is copied into the current substitute memory sector, i.e. the sector S3. The data item D3_0 is therefore copied into the sector S3.
[0070] In a step 598, all data in the selected current sector S2 is then erased. The substitute memory sector S3 then becomes a current sector and the selected current sector S2 becomes the new substitute memory sector.
[0071] In the example of [Fig.5], the memory 10 includes the optional erase counter 206, as described in connection with [Fig.4].
[0072] An advantage of the example of [Fig.5] is that it requires the use of one less sector, for example three sectors, compared to the operation which is described in the example of [Fig.3] which requires at least the use of four sectors.
[0073] [Fig.6] is a block view of a method of operating a non-volatile memory. volatile according to an embodiment of the present description. This method is implemented for example by the control circuit 204 of [Fig.4] or [Fig.5].
[0074] In a step 600 (DETERMINE A CURRENT SECTOR TO ERASE), it is determined that one of the current sectors is to be erased, for example because there is no more free space in the current sectors. The current sector to be renewed is determined, for example, by the control circuit 204. The current sector to be renewed is, for example, the one with the smallest amount of valid data.
[0075] In a step 602 (SELECT CURRENT SECTOR), the current sector which is to be renewed is selected.
[0076] In a step 604 (COPY VALID DATA OF SELECTED SECTOR TO SUBSTITUTION SECTOR), the valid data of the sector selected in step 602 is copied and written to the current substitution sector.
[0077] In a step 606 (ERASE ALL DATA OF SELECTED SECTOR), all the data of the current sector that has been selected is erased.
[0078] In a step 608 (SELECTED SECTOR BECOMES THE SUBSTITUTION SECTOR), the sector whose data was erased becomes the new substitution sector.
[0079] Various embodiments and variations have been described. Those skilled in the art will understand that certain features of these various embodiments and variations could be combined, and other variations will occur to those skilled in the art. In particular, in the examples of [Fig. 4] or 5, the determination by the control circuit 204 of the sector to be renewed is in one example independent of the amount of valid data that the current sectors contain.
[0080] In one example, one skilled in the art will understand that the operation of the non-volatile memory may be adjusted by implementing more than one substitute memory sector. For example, the non-volatile memory would perform well with more than four common sectors, e.g., eight, and two or more substitute sectors.
[0081] In another example, the person skilled in the art will understand that the operation of the non-volatile memory may be adjusted by partitioning the sectors into several sections and the control circuit 204 will for example be configured to store data in any free section of the selected sector.
[0082] In an additional example, in the case where the size of the data is greater than one current sector, for example equal to two sectors, the person skilled in the art will understand that two current sectors could be considered as one sector "virtual" sector with double storage capacity and apply the same processes as for figures 4 and 5. In this case, erasing a virtual sector will involve erasing the two physical sectors that compose it.
[0083] Finally, the practical implementation of the embodiments and variants described is within the reach of the person skilled in the art from the functional indications given above. In particular, the example of [Fig.4] is limited to step 250, however, it is obvious that the person skilled in the art will be able to implement a repetition of operations 240 and 250 as many times as necessary during the life of the memory. Similarly, the example of [Fig.5] is limited to step 598, however, it is obvious that the person skilled in the art will be able to implement a repetition of operations 520 to 598 as many times as necessary during the life of the memory.
Claims
Claims
1. Non-volatile memory comprising: - a plurality of current memory sectors (S1, S2); - at least one substitute memory sector (S3); and - a non-volatile memory control circuit configured to store data, in the current sectors or in the at least one substitute memory sector, and to erase data stored in one of the current sectors or in one of the at least one substitute memory sector, by erasing all the data stored, in said one of the current sectors or one of the at least one substitute sector, at once; a first current memory sector comprising at least one first valid data item (D1_0) and a second current sector comprising at least one second valid data item (D2_0);the memory control circuit being configured to: - determine that one of the current sectors is to be erased, and accordingly select a sector from among the first and second current sectors; - copy at least the first or second valid data, depending on the selected current sector, into the substitute memory sector, the substitute memory sector becoming a current sector; and - erase all the data in the selected current sector, the selected current sector becoming the substitute sector; an erase counter counting, for each memory sector, a number of times it is erased, the control circuit being configured so that, if the number counted by the erase counter for one of the memory sectors is greater than a first threshold, copy it to the substitute sector to then be erased and become the new substitute sector.;
2. The memory of claim 1, wherein the control circuit is configured to select the current sector having the least space occupied by the at least one first or second valid data.
3. A memory according to any one of claims 1 or 2, wherein the largest data to be written has a first size, the size of each memory sector being greater than or equal to said first size.
4. A memory according to any one of claims 1 to 3, wherein a remaining free space of the current memory sectors of the plurality, added to a remaining free space of the substitute memory sector, is greater than or equal to the amount of data to be written into the memory.
5. A memory according to any one of claims 1 to 4, wherein the plurality of current sectors comprises a third current memory sector (S4), the memory control circuit being configured to determine that one of the current sectors is to be renewed, and accordingly select a current sector from among the first, second or third current sectors.
6. A memory according to any one of claims 1 to 5, wherein the control circuit of the non-volatile memory is configured to sequentially store data in the sectors.
7. A memory according to any one of claims 1 to 6, wherein the memory control circuit is configured to copy only the valid data or data from the selected current sector into the substitute memory sector.
8. A memory according to any one of claims 1 to 7, wherein the control circuit is configured to select the current sector having space occupied by valid data that can be contained in the substitute sector.
9. A method of operating a non-volatile memory according to any one of the preceding claims, the method comprising: - determining, by the memory control circuit, that one of the current sectors of the plurality of current memory sectors (S1, S2) of the memory is to be erased, and accordingly selecting, with the memory control circuit, one sector from among the first and second current sectors, the non-volatile memory control circuit being configured to sequentially store data in the sectors and to erase data stored in one of the sectors by erasing all the data stored in said sector at once; - copying, with the memory control circuit, at least the valid data or data of the selected current sector, according to the selected sector, into the substitute memory sector, the substitute memory sector becoming a current sector; - erase, with the memory control circuit, all data in the currently selected sector, the currently selected sector becoming the replacement sector; and - counting, with an erasure counter, for each memory sector, a number of times it is erased, the control circuit being configured so that, if the number counted by the erasure counter for one of the memory sectors is greater than a first threshold, copying it to the replacement sector to then be erased and become the new replacement sector.
