CN105489246B - NOR flash memory and its repair method - Google Patents
NOR flash memory and its repair method Download PDFInfo
- Publication number
- CN105489246B CN105489246B CN201410471290.8A CN201410471290A CN105489246B CN 105489246 B CN105489246 B CN 105489246B CN 201410471290 A CN201410471290 A CN 201410471290A CN 105489246 B CN105489246 B CN 105489246B
- Authority
- CN
- China
- Prior art keywords
- block
- memory
- memory block
- programmed
- less
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000012795 verification Methods 0.000 claims description 14
- 238000012163 sequencing technique Methods 0.000 claims 4
- 238000007689 inspection Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Read Only Memory (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
技术领域technical field
本发明是有关于一种NOR闪存,且特别是有关于一种NOR闪存的修补方法。The present invention relates to a NOR flash memory, and in particular to a repair method for a NOR flash memory.
背景技术Background technique
随着闪存制作规格的持续演进,闪存芯片的耐用度的下滑,会是成本考量下所必然要面对的重要课题。在NOR闪存中,由于其应用环境与NAND闪存大不相同。在成本的考量下,NOR闪存并没有外加的控制芯片可以配合,也因此,通过复杂的算法来提升NOR闪存的使用寿命,具有一定的难度。With the continuous evolution of flash memory manufacturing specifications, the decline in the durability of flash memory chips will be an important issue that must be faced under cost considerations. In NOR flash memory, its application environment is quite different from that of NAND flash memory. In consideration of cost, NOR flash memory does not have an external control chip to cooperate with. Therefore, it is difficult to increase the service life of NOR flash memory through complex algorithms.
通常,NOR闪存被应用在存储例如开机码等重要数据。而这类型的数据通常无法容忍任何一个比特发生错误。因此,在现有的NOR闪存的技艺中,从设计端到制造端都需要应用最严谨的方法来从事生产。然而,随着制作的演进以及成本的考量,要使NOR闪存可以满足所有的元件特性越来越困难。也因此,如何有效提升NOR闪存的性能,是本领域设计者的一大难题。Usually, NOR flash memory is used to store important data such as boot codes. And this type of data usually cannot tolerate any single bit error. Therefore, in the existing technology of NOR flash memory, it is necessary to apply the most rigorous method for production from the design end to the manufacturing end. However, with the evolution of manufacturing and cost considerations, it is becoming more and more difficult to make NOR flash memory satisfy all device characteristics. Therefore, how to effectively improve the performance of NOR flash memory is a major problem for designers in this field.
发明内容Contents of the invention
本发明提供一种NOR闪存及其修补方法,以加强NOR闪存的使用效率。The invention provides a NOR flash memory and a repair method thereof to enhance the use efficiency of the NOR flash memory.
本发明的NOR闪存的修补方法,包括判断是否具有至少一备用存储区块未被使用;计数各存储区块的一被程序化次数以及各存储区块的一被抹除次数;判别被程序化次数是否不小于一第一预设临界值,及被抹除次数是否不小于一第二预设临界值;以及当存储区块的一选中存储区块对应的被程序化次数不小于第一预设临界值或被抹除次数不小于第二预设临界值时,使至少一备用存储区块与选中存储区块进行置换。The repairing method of NOR flash memory of the present invention comprises judging whether there is at least one spare storage block unused; Counting a programmed number of times of each storage block and a wiped number of times of each storage block; judging that it is programmed Whether the number of times is not less than a first preset critical value, and whether the number of erasing times is not less than a second preset critical value; When the critical value is set or the erasing times are not less than a second preset critical value, at least one spare memory block is replaced with the selected memory block.
本发明的NOR闪存,包括多数个存储区块、多数个备用存储区块以及存储器控制器。存储器控制器耦接存储区块以及备用存储区块,存储器控制器判断备用存储区块中是否具有至少一未被使用,并计数各存储区块的被程序化次数以及各存储区块的被抹除次数。存储器控制器并判别被程序化次数是否不小于第一预设临界值,及被抹除次数是否不小于第二预设临界值。且当存储区块的选中存储区块对应的被程序化次数不小于第一预设临界值或被抹除次数不小于第二预设临界值时,存储器控制器使备用存储区块未被使用的其中之一与选中存储区块进行置换。The NOR flash memory of the present invention includes a plurality of storage blocks, a plurality of spare storage blocks and a memory controller. The memory controller is coupled to the memory blocks and the spare memory blocks. The memory controller judges whether at least one of the spare memory blocks is unused, and counts the number of times each memory block is programmed and the number of times each memory block is erased. number of divisions. The memory controller also judges whether the number of times of being programmed is not less than a first preset threshold, and whether the number of times of erasing is not less than a second preset threshold. And when the number of times of being programmed corresponding to the selected memory block of the memory block is not less than the first preset threshold or the number of times of being erased is not less than the second preset threshold, the memory controller makes the spare memory block unused One of them is replaced with the selected memory block.
基于上述,本发明通过计数NOR闪存各存储区块的被程序化次数以及被抹除次数,并在当存储区块的被程序化次数或被抹除次数超过预设的次数限制时,将对应的该存储区块与备用存储区块进行置换动作。藉此,有效确保使用中的存储器区块是具有高可靠度的存储区块,以维持NOR闪存的数据存取的品质。并且,通过提供备用存储区块,NOR闪存的使用寿命也得以延长。Based on the above, the present invention counts the programmed times and erased times of each memory block of the NOR flash memory, and when the programmed times or erased times of the memory blocks exceed the preset number of times limit, the corresponding The memory block and the spare memory block are replaced. Thereby, it is effectively ensured that the memory block in use is a memory block with high reliability, so as to maintain the data access quality of the NOR flash memory. Also, by providing spare memory blocks, the lifespan of NOR flash memory is also extended.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.
附图说明Description of drawings
图1绘示本发明一实施例的NOR闪存的修补方法;Fig. 1 depicts the repairing method of the NOR flash memory of an embodiment of the present invention;
图2A绘示本发明另一实施例的NOR闪存的修补方法;FIG. 2A shows a repair method of a NOR flash memory according to another embodiment of the present invention;
图2B绘示本发明再一实施例的NOR闪存的修补方法;FIG. 2B shows a repairing method of a NOR flash memory according to yet another embodiment of the present invention;
图3绘示本发明实施例的存储区块与备用存储区块的置换的实施方式的示意图;FIG. 3 is a schematic diagram illustrating an implementation manner of replacement of a storage block and a spare storage block according to an embodiment of the present invention;
图4绘示本发明一实施例的NOR闪存的示意图。FIG. 4 is a schematic diagram of a NOR flash memory according to an embodiment of the present invention.
附图标记说明:Explanation of reference signs:
S110~S140、S211~S219、S2110~S2111、S221~S229、S2210~S2211:修补方法的步骤;S110~S140, S211~S219, S2110~S2111, S221~S229, S2210~S2211: the steps of the repair method;
A1~AM:存储区块;A1~AM: storage block;
BA1~BAN:备用存储区块;BA1~BAN: spare storage block;
AS:选中存储区块;AS: select the storage block;
400:NOR闪存;400: NOR flash memory;
410:存储区块;410: storage block;
420:备用存储区块;420: spare storage block;
430:存储器控制器。430: Memory controller.
具体实施方式Detailed ways
请参照图1,图1绘示本发明一实施例的NOR闪存的修补方法。分析NOR闪存所应用的层面,较常见的为用来存储开机码的基本输入输出系统(Basic Input Output System,简称BIOS)。由NOR闪存所可能应用的各种电子装置来看,NOR闪存的使用者并不会针对NOR闪存存储区块来进行程序化(program)以及抹除(erase)的动作。通常,以开机码为范例,主程序化会被放置在固定的地址的存储区块上,并且,主程序化仅有在进行固件更新时才会有所更动。也就是说,主程序化所占有的存储区块所可能产生的程序化抹除的机率相对是很低的。Please refer to FIG. 1 . FIG. 1 illustrates a repairing method of a NOR flash memory according to an embodiment of the present invention. Analyzing the application level of NOR flash memory, the more common one is the Basic Input Output System (BIOS) used to store boot codes. From the perspective of various electronic devices that NOR flash memory may be applied to, users of NOR flash memory do not perform programming (program) and erasing (erase) actions on NOR flash memory storage blocks. Usually, taking the boot code as an example, the main program will be placed on a memory block with a fixed address, and the main program will only be changed when the firmware is updated. That is to say, the probability of program erasure that may occur in the memory block occupied by the main program is relatively low.
由上述的说明可以得知,NOR闪存仅有部分用以运算以及记录的存储区块会较时常进行程序化以及抹除的动作,也就是说,针对这些常进行程序化以及抹除的动作的存储区块进行修补,就可以有效提升NOR闪存的整体寿命。It can be seen from the above description that only some of the storage blocks of NOR flash memory used for calculation and recording will be programmed and erased more often, that is, for these frequently programmed and erased operations Repairing the storage block can effectively improve the overall lifespan of the NOR flash memory.
因此,本发明在存储区块中增加设置一个或多数个备用存储区块来配合修补动作的进行。其中,在步骤S110中,先判断是否具有至少一备用存储区块未被使用。在当步骤S110判断出有一个或多个的备用存储区块未被使用时,表示NOR闪存的修补动作可以被进行。据此,在步骤S120中,则执行针对各存储区块执行被程序化动作以及被抹除动作的次数的计数动作。上述步骤S120的计数动作是随着NOR闪存被使用的状态下所进行的。其中,各个执行过被程序化动作的存储器区块可产生对应的被程序化次数的计数值,而各个执行过被抹除动作的存储器区块可产生对应的被抹除次数的计数值。当然,执行过被抹除动作且也被执行过被程序化动作的存储区块,则产生对应的被程序化次数的计数值以及被抹除次数的计数值。Therefore, the present invention adds one or more spare storage blocks to the storage block to cooperate with the repairing operation. Wherein, in step S110, it is first determined whether there is at least one spare storage block that is not used. When it is determined in step S110 that one or more spare storage blocks are not used, it means that the NOR flash memory repair operation can be performed. Accordingly, in step S120 , a counting operation of the number of times the programming operation and the erasing operation are performed for each memory block is performed. The above-mentioned counting operation in step S120 is performed while the NOR flash memory is being used. Wherein, each memory block that has been programmed can generate a corresponding count value of programmed times, and each memory block that has been erased can generate a corresponding count value of erased times. Of course, for the memory block that has been erased and programmed, a corresponding count value of programmed times and a count value of erased times is generated.
关于步骤S120的实施细节,举例来说明,当NOR闪存接收到程序化命令以对存储区块A1进行首次的程序化动作时,存储区块A1的地址Fi可以被记录在一个存储装置中,并设定存储区块A1对应的被程序化次数为1,当后续又有程序化命令要对存储区块A1进行程序化动作时,由于存储区块A1的地址Fi已被记录在存储装置中,因此,NOR闪存可直接使存储区块A1对应的被程序化次数进行递增(+1)。同理,当NOR闪存接收到程序化命令以对存储区块A1进行首次的抹除动作时,存储区块A1的地址Fi可以被记录在一个存储装置中,并设定存储区块A1对应的被抹除次数为1,当后续又有程序化命令要对存储区块A1进行抹除动作时,由于存储区块A1的地址Fi已被记录在存储装置中,因此,NOR闪存可直接使存储区块A1对应的被抹除次数进行递增(+1)。Regarding the implementation details of step S120, for example, when the NOR flash memory receives a programming command to perform the first programming action on the memory block A1, the address Fi of the memory block A1 can be recorded in a storage device, and Set the number of times corresponding to the memory block A1 to be programmed as 1. When there is a subsequent programming command to perform a programming operation on the memory block A1, since the address Fi of the memory block A1 has been recorded in the storage device, Therefore, the NOR flash memory can directly increment (+1) the programmed times corresponding to the memory block A1. Similarly, when the NOR flash memory receives a programming command to erase the memory block A1 for the first time, the address Fi of the memory block A1 can be recorded in a storage device, and the corresponding address of the memory block A1 can be set. The number of erasures is 1. When there is another programming command to erase the memory block A1, the address Fi of the memory block A1 has been recorded in the storage device. Therefore, the NOR flash memory can directly make the memory block A1 erase. The erasure count corresponding to the block A1 is incremented (+1).
在步骤S130中,则进行各存储区块的被程序化次数以及被抹除次数的判断。其中,各存储区块的被程序化次数可与第一预设临界值进行比对,各存储区块的被抹除次数则可与第二预设临界值进行比对。上述的第一预设临界值以及第二预设临界值可以由设计者依据存储区块的特性进行设定。其中,第一预设临界值以及第二预设临界值可以相同,也可以不相同。In step S130, the program times and erase times of each memory block are determined. Wherein, the programmed times of each memory block can be compared with a first preset threshold, and the erased times of each memory block can be compared with a second preset threshold. The above-mentioned first preset threshold value and the second preset threshold value can be set by the designer according to the characteristics of the memory block. Wherein, the first preset critical value and the second preset critical value may be the same or different.
在步骤S140中,在当存储区块的被程序化次数大于或等于第一预设临界值时,表示该存储区块的被程序化次数已超过安全使用范围。NOR闪存则可以执行该存储区块与备用存储区块的置换动作,以完成NOR闪存的修补动作。同理,当存储区块的被抹除次数大于或等于第二预设临界值时,则表示该存储区块的被抹除次数已超过安全使用范围,而NOR闪存则也可以执行该存储区块与备用存储区块的置换动作,并藉此完成NOR闪存的修补动作。In step S140, when the programmed times of the storage block is greater than or equal to the first preset threshold, it means that the programmed times of the storage block has exceeded the safe use range. The NOR flash memory can perform the replacement operation of the storage block and the spare storage block, so as to complete the repair operation of the NOR flash memory. Similarly, when the number of erasing times of the storage block is greater than or equal to the second preset critical value, it means that the number of erasing of the storage block has exceeded the safe use range, and the NOR flash memory can also execute the storage area block and spare storage block, and thereby complete the repair operation of NOR flash memory.
关于步骤S140的实施细节,举例来说,NOR闪存在判断出存储区块A1的被程序化次数大于或等于第一预设临界值时,则可选择未被使用的备用存储区块中的其中之一(备用存储区块B1)来与存储区块A1进行置换动作。具体来说明,假设在初始条件下,逻辑地址LA1对应至存储区块A1的实体地址,而在进行存储区块A1与备用存储区块B1的置换动作时,则使逻辑地址LA1变更对应至备用存储区块B1的实体地址。Regarding the implementation details of step S140, for example, when the NOR flash memory determines that the number of times the memory block A1 has been programmed is greater than or equal to the first preset threshold value, it can select one of the unused spare memory blocks One of them (the spare memory block B1) is used to replace the memory block A1. Specifically, assuming that under the initial conditions, the logical address LA1 corresponds to the physical address of the storage block A1, and when the replacement operation of the storage block A1 and the spare storage block B1 is performed, the logical address LA1 is changed to correspond to the spare The physical address of block B1 is stored.
附带一提的,在当存储区块A1与备用存储区块B1的置换动作完成后,记录在存储装置中的存储区块A1的地址以及对应的被程序化次数及被抹除次数都可以被舍弃。Incidentally, after the replacement operation of the memory block A1 and the spare memory block B1 is completed, the address of the memory block A1 recorded in the storage device and the corresponding times of being programmed and times of being erased can be give up.
另外,本发明实施例的各备用存储区块都具有相对应的使用状态标记。当各备用存储区块未被使用与任一存储区块进行置换时,其所对应的使用状态标记皆表示为未被使用状态。当备用存储区块(例如备用存储区块B1)被使用与一存储区块进行置换后,备用存储区块B1的使用状态标记可被设定为已被使用状态。In addition, each spare storage block in the embodiment of the present invention has a corresponding usage status mark. When each spare memory block is not used and is replaced with any memory block, its corresponding usage state flags are all indicated as unused state. When the spare storage block (for example, the spare storage block B1 ) is used to replace a storage block, the use status flag of the spare storage block B1 can be set as a used state.
也就是说,当要进行如步骤S110的备用存储区块的使用状态的检查时,只要简单的针对所有的使用状态标记进行检查即可。若使用状态标记中的至少其中之一表示为未被使用状态,表示存储区块的修补动作仍可进行。相对的,若所有的使用状态标记都表示为已被使用状态,则表示存储区块的修补动作无法被进行。That is to say, when checking the use status of the spare storage block as in step S110, it is only necessary to simply check all the use status flags. If at least one of the usage status flags indicates an unused status, it means that the repair operation of the storage block can still be performed. On the contrary, if all the usage status flags are indicated as being used, it means that the repair operation of the storage block cannot be performed.
上述的使用状态标记可以利用逻辑值来表示为未被使用状态或已被使用状态。举例来说,使用状态标记等于逻辑值1时可以表示对应的备用存储区块为未被使用状态,使用状态标记等于逻辑值0时可以表示对应的备用存储区块为已被使用状态。当然,逻辑值与未被使用状态及已被使用状态的对应关系可以任意变更,上述的范例并不用以限缩本发明。The above usage status flag can be expressed as an unused status or a used status by using a logical value. For example, when the use state flag is equal to a logic value of 1, it may indicate that the corresponding spare storage block is in an unused state, and when the use state flag is equal to a logic value of 0, it may indicate that the corresponding spare storage block is in a used state. Of course, the corresponding relationship between the logical value and the unused state and the used state can be changed arbitrarily, and the above examples are not intended to limit the present invention.
请参照图2A,图2A绘示本发明另一实施例的NOR闪存的修补方法。在步骤S211中,接收程序化命令,并在步骤S212中依据所接收的程序化命令并将要进行程序化的存储区块的地址Fi进行存储。在步骤S213中,判断是否有至少一备用存储区块未被使用,若步骤S213的判断结果为是时,进行步骤S214以执行程序化及验证(program and verify)动作。通过对该存储区块被程序化的次数L1进行计数,并且在步骤S215中进行该存储区块的被程序化的次数L1与预设临界值N1进行比较。当被程序化的次数L1小于N1时,表示该存储区块可继续提供进行程序化,并在步骤S216中的验证动作通过时,结束程序化的动作。相对的,当步骤S216中的验证动作无法通过时,则需重新执行步骤S214再次进行程序化的动作。Please refer to FIG. 2A . FIG. 2A illustrates a NOR flash memory repair method according to another embodiment of the present invention. In step S211, a programming command is received, and in step S212, the address Fi of the memory block to be programmed is stored according to the received programming command. In step S213, it is determined whether there is at least one spare storage block that is not used. If the determination result of step S213 is yes, proceed to step S214 to perform program and verify actions. By counting the times L1 of programming of the memory block, and comparing the number of times L1 of programming of the memory block with a preset threshold N1 in step S215 . When the times L1 of being programmed is less than N1, it means that the storage block can continue to be provided for programming, and when the verifying operation in step S216 is passed, the programming operation ends. In contrast, when the verification action in step S216 fails, step S214 needs to be re-executed to perform the programmed action again.
承上述,若在步骤S215中判断出存储区块被程序化的次数L1大于或等于预设临界值N1时,则进行步骤S217以记录存储区块的地址Fi,并启动备用存储区块的置换动作。在存储区块被备用存储区块所置换后,则可以继续提供存储区块以进行程序化以及验证的动作(步骤S219)。并且,步骤S2110判断存储区块程序化以及验证的动作的次数是否已超过设定的最大次数,若判断的结果已超过最大次数(最大安全值),则表示程序化验证动作失败。相对的,若判断的结果未超过最大次数,且步骤S2111判断程序化以及验证动作通过时,则表示程序化动作完成。若判断的结果未超过最大次数,且步骤S2111判断程序化以及验证动作未通过时,重新执行步骤S219。Based on the above, if it is determined in step S215 that the number of times L1 of the memory block being programmed is greater than or equal to the preset threshold N1, then proceed to step S217 to record the address Fi of the memory block, and start the replacement of the spare memory block action. After the memory block is replaced by the spare memory block, the memory block can be continuously provided for programming and verification (step S219 ). Moreover, step S2110 judges whether the number of memory block programming and verification operations has exceeded the set maximum number of times. If the result of the judgment has exceeded the maximum number of times (maximum security value), it indicates that the programming verification operation has failed. In contrast, if the result of the judgment does not exceed the maximum number of times, and step S2111 judges that the programming and verification actions are passed, it means that the programming action is completed. If the judging result does not exceed the maximum number of times, and step S2111 judges that the programming and verification actions are not passed, re-execute step S219.
在另一方面,若当步骤S213的判断结果显示所有的备用存储区块都已被使用,则无法针对该存储区块进行修补。在此状态下,仅能提供此存储区块继续进行程序化以及验证的动作,直至该存储区块的被程序化次数超过最大安全值为止。On the other hand, if the judgment result of step S213 shows that all spare storage blocks have been used, then the storage block cannot be repaired. In this state, the memory block can only be programmed and verified until the number of times the memory block has been programmed exceeds the maximum security value.
请参照图2B,图2B绘示本发明再一实施例的NOR闪存的修补方法。在步骤S221中,接收抹除命令,在步骤S222中判断是否有至少一备用存储区块未被使用,若步骤S222的判断结果为是时,执行步骤S223并判断有无备用存储区块被致能。当有备用存储区块被致能,则可执行步骤S226以依据存储区块的地址Fi启动备用存储区块的置换。Please refer to FIG. 2B . FIG. 2B illustrates a NOR flash memory repair method according to another embodiment of the present invention. In step S221, an erasing command is received, and in step S222 it is judged whether at least one spare storage block is unused, if the judgment result of step S222 is yes, step S223 is executed and it is judged whether there is a spare storage block that has been used can. When a spare memory block is enabled, step S226 can be executed to start replacement of the spare memory block according to the address Fi of the memory block.
若步骤S223判断的结果为否,则进行步骤S224。步骤S224执行抹除及验证(eraseand verify)动作。通过对该存储区块被抹除的次数L2进行计数,以在步骤S225中进行该存储区块的被抹除的次数L2与预设临界值N2进行比较。当被抹除的次数L2小于N2时,表示该存储区块可继续提供进行抹除,并在步骤S227中的验证动作通过时,结束程序化的动作。相对的,当步骤S229中的验证动作无法通过时,则需重新执行步骤S224再次进行程序化的动作。If the determined result of step S223 is negative, proceed to step S224. Step S224 performs erase and verify operations. By counting the erasing times L2 of the memory block, the erasing times L2 of the memory block is compared with a preset threshold N2 in step S225 . When the number of erasing times L2 is less than N2, it means that the storage block can continue to be provided for erasing, and when the verifying action in step S227 is passed, the programming action is ended. In contrast, when the verification action in step S229 fails, step S224 needs to be re-executed to perform the programmed action again.
承上述,若在步骤S225中判断出存储区块被抹除的次数L2大于或等于预设临界值N2时,则进行步骤S226以依据步骤S223所存储的存储区块的地址Fi来启动备用存储区块的置换。Based on the above, if it is determined in step S225 that the number of times L2 of the memory block being erased is greater than or equal to the preset critical value N2, then step S226 is performed to start the backup storage according to the address Fi of the memory block stored in step S223. block replacement.
在另一方面,若当步骤S222的判断结果显示所有的备用存储区块都已被使用,则无法针对该存储区块进行修补。在此状态下,仅能提供此存储区块继续进行程序化以及验证的动作(步骤S229),直至该存储区块的被程序化次数超过最大安全值为止。On the other hand, if the determination result of step S222 shows that all the spare storage blocks have been used, then the storage block cannot be repaired. In this state, only the storage block can be programmed and verified (step S229 ), until the number of times the storage block has been programmed exceeds the maximum security value.
其中,步骤S2210判断存储区块抹除以及验证的动作的次数是否已超过设定的最大次数,若判断的结果已超过最大次数(最大安全值),则表示程序化验证动作失败。相对的,若判断的结果未超过最大次数,且步骤S2211判断程序化以及验证动作通过时,则表示程序化动作完成。若判断的结果未超过最大次数,且步骤S2111判断程序化以及验证动作未通过时,重新执行步骤S229。Wherein, step S2210 judges whether the times of erasing and verifying the storage block have exceeded the set maximum times, and if the judgment result has exceeded the maximum times (maximum security value), it indicates that the programmed verification has failed. In contrast, if the result of the judgment does not exceed the maximum number of times, and step S2211 judges that the programming and verification actions are passed, it means that the programming action is completed. If the judging result does not exceed the maximum number of times, and step S2111 judges that the programming and verification actions are not passed, re-execute step S229.
在关于存储区块与备用存储区块的置换方面,请参照图3,其中,图3绘示本发明实施例的存储区块与备用存储区块的置换的实施方式的示意图。在图3中,NOR闪存包括多个存储区块A1~AM以及备用存储区块BA1~BAN。其中,备用存储区块BA1为未被使用的状态,且选中存储区块AS的被抹除次数不小于第二预设临界值或被程序化次数不小于第一预设临界值时,备用存储区块BA1可取代选中存储区块AS,并使备用存储区块BA1作为存储数据的存储器区块。原先的选中存储区块AS则被闲置。Regarding the replacement of the storage block and the spare storage block, please refer to FIG. 3 , wherein FIG. 3 is a schematic diagram of an implementation manner of the replacement of the storage block and the spare storage block according to the embodiment of the present invention. In FIG. 3, the NOR flash memory includes a plurality of memory blocks A1-AM and spare memory blocks BA1-BAN. Wherein, when the spare memory block BA1 is in an unused state, and the erasing times of the selected memory block AS are not less than the second preset threshold or the times of being programmed are not less than the first preset threshold, the spare storage The block BA1 can replace the selected storage block AS, and make the spare storage block BA1 a memory block for storing data. The original selected storage block AS is left idle.
以下请参照图4,图4绘示本发明一实施例的NOR闪存的示意图。NOR闪存400包括存储区块410、备用存储区块420以及存储器控制器430。存储区块410中具有多个相同存储容量的存储区块。备用存储区块420则包括至少一个存储区块。存储器控制器430为内建在NOR闪存400中的逻辑电路。存储器控制器430可执行如图1绘示的修补方法的各步骤,并藉此进行修补动作。Please refer to FIG. 4 below. FIG. 4 is a schematic diagram of a NOR flash memory according to an embodiment of the present invention. The NOR flash memory 400 includes a memory block 410 , a spare memory block 420 and a memory controller 430 . There are multiple storage blocks with the same storage capacity in the storage block 410 . The spare storage block 420 includes at least one storage block. The memory controller 430 is a logic circuit built in the NOR flash memory 400 . The memory controller 430 can execute each step of the repair method as shown in FIG. 1 , and thereby perform repair operations.
关于存储器控制器430所执行的各步骤的动作细节,在前述的实施例及实施方式都有详细的说明,以下恕不多赘述。The action details of each step performed by the memory controller 430 have been described in detail in the above-mentioned embodiments and implementations, and will not be described in detail below.
综上所述,本发明通过在NOR闪存中设置备用存储区块,并通过计数存储区块的被程序化或被抹除的次数,来进行备用存储区块与存储区块的置换动作,藉此完成NOR闪存的修补动作,提升NOR闪存的使用寿命。To sum up, the present invention sets a spare storage block in the NOR flash memory, and by counting the number of times the storage block is programmed or erased, the replacement action between the spare storage block and the storage block is performed. This completes the repair action of the NOR flash memory and improves the service life of the NOR flash memory.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410471290.8A CN105489246B (en) | 2014-09-16 | 2014-09-16 | NOR flash memory and its repair method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410471290.8A CN105489246B (en) | 2014-09-16 | 2014-09-16 | NOR flash memory and its repair method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105489246A CN105489246A (en) | 2016-04-13 |
| CN105489246B true CN105489246B (en) | 2018-10-19 |
Family
ID=55676186
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410471290.8A Active CN105489246B (en) | 2014-09-16 | 2014-09-16 | NOR flash memory and its repair method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105489246B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108573735B (en) * | 2017-03-08 | 2020-12-11 | 北京兆易创新科技股份有限公司 | NAND-FLASH block repair method and device |
| US10866747B2 (en) | 2019-02-10 | 2020-12-15 | Hewlett Packard Enterprise Development Lp | Securing a memory drive |
| CN119536633A (en) * | 2024-10-14 | 2025-02-28 | 深圳市奋达科技股份有限公司 | Flash memory management method, flash memory management device and computer readable storage medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1571069A (en) * | 2003-02-07 | 2005-01-26 | 株式会社瑞萨科技 | Nonvolatile memory system |
| US7287118B2 (en) * | 2002-10-28 | 2007-10-23 | Sandisk Corporation | Maintaining an average erase count in a non-volatile storage system |
| CN101458658A (en) * | 2007-12-13 | 2009-06-17 | 中芯国际集成电路制造(上海)有限公司 | Data storage method and apparatus for flash memory |
| CN101458956A (en) * | 2007-12-14 | 2009-06-17 | 慧荣科技股份有限公司 | Apparatus and method for accessing a flash memory and method for averagely using blocks of the flash memory |
| TW201015565A (en) * | 2008-10-03 | 2010-04-16 | Via Telecom Inc | Memory wear leveling method, system and device |
| CN102789423A (en) * | 2012-07-11 | 2012-11-21 | 山东华芯半导体有限公司 | Four-pool flash wear leveling method |
| CN103425597A (en) * | 2012-05-18 | 2013-12-04 | 慧荣科技股份有限公司 | Block management method of data storage device and flash memory |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI475564B (en) * | 2010-04-21 | 2015-03-01 | Silicon Motion Inc | Data storage device and data writing method for a memory |
-
2014
- 2014-09-16 CN CN201410471290.8A patent/CN105489246B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7287118B2 (en) * | 2002-10-28 | 2007-10-23 | Sandisk Corporation | Maintaining an average erase count in a non-volatile storage system |
| CN1571069A (en) * | 2003-02-07 | 2005-01-26 | 株式会社瑞萨科技 | Nonvolatile memory system |
| CN101458658A (en) * | 2007-12-13 | 2009-06-17 | 中芯国际集成电路制造(上海)有限公司 | Data storage method and apparatus for flash memory |
| CN101458956A (en) * | 2007-12-14 | 2009-06-17 | 慧荣科技股份有限公司 | Apparatus and method for accessing a flash memory and method for averagely using blocks of the flash memory |
| TW201015565A (en) * | 2008-10-03 | 2010-04-16 | Via Telecom Inc | Memory wear leveling method, system and device |
| CN103425597A (en) * | 2012-05-18 | 2013-12-04 | 慧荣科技股份有限公司 | Block management method of data storage device and flash memory |
| CN102789423A (en) * | 2012-07-11 | 2012-11-21 | 山东华芯半导体有限公司 | Four-pool flash wear leveling method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105489246A (en) | 2016-04-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107977161B (en) | Data storage device and data writing method thereof | |
| TWI607312B (en) | Data storage device and data writing method thereof | |
| TWI490871B (en) | Method for preventing read-disturb, memory control circuit unit and memory storage apparatus | |
| US8832527B2 (en) | Method of storing system data, and memory controller and memory storage apparatus using the same | |
| US9875812B2 (en) | Health state of non-volatile memory | |
| US20150262677A1 (en) | Data storing method, memory control circuit unit and memory storage apparatus | |
| US20170010961A1 (en) | Wear leveling method, memory storage device and memory control circuit unit | |
| CN107436847B (en) | System, method and computer program product for extending the lifespan of non-volatile memory | |
| CN107918523B (en) | Data storage device and data writing method thereof | |
| US9236148B2 (en) | Memory management method, memory control circuit unit and memory storage apparatus | |
| CN101615427A (en) | Memory management method of nonvolatile memory and controller using the same | |
| CN103871480B (en) | Memory repair method, memory controller and memory storage device | |
| TW201329992A (en) | Non-volatile flash memory erasure abnormal memory block repairing method and device | |
| CN105320464A (en) | Method for preventing read interference, memory control circuit unit and memory device | |
| US20120185740A1 (en) | Data writing method for non-volatile memory module and memory controller and memory storage apparatus using the same | |
| CN105489246B (en) | NOR flash memory and its repair method | |
| TW201351137A (en) | Memory management method, memory controller and memory storage device using the same | |
| US8868978B2 (en) | Reclaiming discarded solid state devices | |
| TWI509615B (en) | Data storing method, and memory controller and memory storage apparatus using the same | |
| TWI640868B (en) | Data storage device and data writing method thereof | |
| TWI540580B (en) | Nor flash and repairing method thereof | |
| US9007829B2 (en) | Memory repairing method, and memory controller and memory storage apparatus using the same | |
| CN114121110A (en) | NAND flash management with pre-learned endurance | |
| CN101853693A (en) | Storage device and method for extending the service life of the storage device | |
| CN102141944A (en) | Method for reducing uncorrectable errors and memory device and controller thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |