CN101369462A - Dynamic compensation method and device used for flawed flash memory - Google Patents

Dynamic compensation method and device used for flawed flash memory Download PDF

Info

Publication number
CN101369462A
CN101369462A CN 200710075783 CN200710075783A CN101369462A CN 101369462 A CN101369462 A CN 101369462A CN 200710075783 CN200710075783 CN 200710075783 CN 200710075783 A CN200710075783 A CN 200710075783A CN 101369462 A CN101369462 A CN 101369462A
Authority
CN
China
Prior art keywords
block
flash memory
blocks
replacement
good
Prior art date
Application number
CN 200710075783
Other languages
Chinese (zh)
Inventor
勤 范
Original Assignee
芯邦科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 芯邦科技(深圳)有限公司 filed Critical 芯邦科技(深圳)有限公司
Priority to CN 200710075783 priority Critical patent/CN101369462A/en
Publication of CN101369462A publication Critical patent/CN101369462A/en

Links

Abstract

The invention discloses a method for dynamically compensating a flaw flash memory, which comprises obligating a set of good blocks in the flash memory as replacing blocks; if finding destroyed blocks by detection, replacing the destroyed block with a block in the set of good blocks; placing the replaced destroyed block at the back of the good blocks; based on the technical proposal provided by the invention, the invention can perform dynamical compensation using the method of replacing the destroyed block, can reduce error probability of the flash memory for classified flash memories, and the flash memory can be better used.

Description

一种用于瑕疯闪存动态补偿方法及装置 A method for dynamic compensation flaw mad flash method and apparatus

技术领域 FIELD

本发明涉及闪存存储领域,尤指一种瑕疯闪存动态补偿方法及装置。 The present invention relates to the field of flash memory, particularly to a dynamic compensation Flaws mad flash method and apparatus. 背景技术 Background technique

闪存:闪存是Flash Ram的音译。 Flash: Flash is Flash Ram transliteration. 闪存作为一种非挥发性(简单说就是在不加电的情况下数据也不会丢失,区别于目前常用的计算机内存)的半导体存储芯片,具有体积小、功耗低、不易受物理破坏的优点,是移动数码产品的理想存储介质,目前,其普遍应用在数码电视、数码便携式摄像机、移动电话、数码相机、掌上电脑(PDA)、游戏机、MP3播放器等设备中,闪存的种类大致分为:储存容量大的数据存储型(NAND)和处理速度快的代码存储型(NOR)两种。 As a non-volatile flash memory (in the case is simply unpowered data is not lost, different from the currently used computer memory) semiconductor memory chip, a small size, low power consumption, less susceptible to physical damage the advantages of mobile digital products is an ideal storage medium, at present, its widely used in digital TVs, digital camcorders, mobile phones, digital cameras, handheld computers (PDA), game consoles, MP3 players and other devices, the type of flash memory generally divided into: fast storage capacity of data storage type (the NAND) type code memory and processing speed (NOR) two kinds.

闪存的结构特点,其是由很多个块(block)组成,每个块(block)包括64页(page),每一个页(page)包括4个扇区(sector )。 The structural characteristics of flash memory, which is composed of many blocks (block), each block (block) comprises 64 (page), every page (page) comprises four sectors (sector).

闪存的写入操作必须在空白区域进行,如果目标区域已经有数据,必须先擦除后写入,因此当对闪存进行读写的次数多了, 一个块中就可能出现坏扇区。 Flash memory write operations must be carried out in the blank area, if the target area has the data must be written after the first erasing, and therefore when the number of read and write more flash memory, a block may occur in a bad sector. 为了防止由于将数据写到坏扇区,而造成数据的丟失,通常采用的方法为:在使用闪存前,对闪存先进行初始化扫描,只要一个块中出现一个坏扇区,即将整个块标记为坏块,然后将数据存储到好块中,该方法通过防止将数据写到坏扇区来实现数据的安全存储。 In order to prevent the write data to the bad sector, causing loss of data, as commonly used method: before use flash memory, the flash memory is initialized before scanning occurs as long as a bad sector in a block, the entire block is marked as coming bad block, and stores the data in a good block, the method for secure storage of data by writing data to prevent bad sectors.

但是,即使这样,也还是会有一些坏块,如果在使用时发现坏块的话, 会影响闪存的使用。 But, even so, there will be some bad blocks, if it is found when using the bad block, it will affect the use of flash memory. 发明内容 SUMMARY

本发明的目的在于提供了一种瑕疯闪存的动态补偿方法,其可克服现有闪存的缺陷,对存在坏块的闪存进行动态补偿,确保数据安全。 Object of the present invention to provide a method for dynamic compensation flaw mad flash memory, which can overcome the drawbacks of the conventional flash memory, the flash memory of the bad blocks for motion compensation, to ensure data security.

为了实现上述发明的目的,本发明所采用的技术方案为: 一种用于瑕疵闪存的动态补偿办法,包括以下步骤: 将闪存中预留一组好块设置为替换块; 扫描闪存; To achieve the above object of the invention, the technical solutions used in the present invention are: a dynamic approach to compensating for defective flash memory, comprising the steps of: reserving a set of good blocks set in the replacement block flash memory; flash scan;

利用替换块中的块替换坏块。 Alternatively bad block using the block replacement block.

所述的用于瑕疵闪存的动态补偿办法,其还包括以下步骤:将被替换的坏块放在该组好块后面。 The remedies for dynamically defective flash memory, further comprising the steps of: a bad block to be replaced on the back of the set of good blocks.

一种用于瑕疯闪存的动态补偿装置,其包括: 设置单元,将闪存中预留一组好块设置为替换块; 扫描单元,用于扫描闪存; A dynamic defect compensating apparatus for a flash memory mad, comprising: a setting unit, a set of flash memory will be reserved for a good block to the replacement block; scanning unit for scanning a flash memory;

替换单元,利用替换块中的好块,替换扫描出来的坏块。 Replacement unit, the replacement block using a good block, a scanned replace bad blocks. 所述的替换单元,其将替换出来的块坏放在该组好块后面。 Said replacement unit which replaces the bad block on the back out of a good block of the group. 由以上本发明提供的技术方案可见,本发明利用替换块的方法进行动态补偿,可以减少闪存出错的机率,更好的使用闪存。 Provided by the above aspect of the present invention can be seen, the present invention performs motion compensation using the method of replacement blocks, the flash memory can reduce the probability of error, and better use of flash memory.

附图说明 BRIEF DESCRIPTION

图1为本发明方法的流程图; 图2为本发明装置的结构示意图。 1 is a flowchart of a method of the present invention; Figure 2 is a schematic configuration of the apparatus of the present invention.

具体实施方式 detailed description

本发明提供一种用于瑕疵闪存动态补偿方法,包括步骤:将闪存中预 The present invention provides a method for dynamic compensation defective flash memory, comprising the steps of: pre-flash

留一组好块作为替换块;通过扫描,若发现有坏块,则将该组好块中的一 Leaving group as a good block replacement blocks; by scanning If there is a bad block, the set of a good block

块把坏块替换;将被替换的坏块放在该组好块后面。 The bad block replacement block; bad block will be replaced with a good block on the back of the set.

在该动态补偿方法中,其主要是在在闪存被分类后,本领域的技术人 In this motion compensation process, which is primarily in the flash memory after being classified, those skilled in the art

员都知道,闪存的坏块虽然4皮屏蔽掉,但是,性能的不稳定性,在使用过 Members are aware, although bad blocks of the flash memory 4 skin masked, however, the instability of performance, during use

程中,还是会出现坏块,如果能在使用过程中,重新扫描闪存,如果发现 Process, or there will be a bad block, if in the course of re-scanning flash memory, if found

坏块,再利用闪存中预留的替换块来替换坏块,以此可以更好地利用闪存。 Bad block, the bad block and then replaced with a replacement block reserved in flash memory, in order to better utilize the flash memory. 为了使本技术领域的人员更好地理解本发明方案,下面结合附图和实 In order to make those skilled in the art a better understanding of the invention, the accompanying drawings and the following solid

施方式对本发明作进一步的详细说明。 Application embodiment of the present invention will be further described in detail.

图1出示了本发明的流程图,如图所示,包括: Figure 1 show a flow chart of the present invention, as shown, comprising:

步骤101:首先在闪存中预留一组好块,将其定义为替换块。 Step 101: First, a set of reserved good block in the flash memory, which is defined as the replacement block.

步骤102:通过EDC(误码检测单元)及ECC (纠错单元)对闪存进行 Step 102: the flash memory by EDC (error detection means), and ECC (error correcting unit)

扫描,然后将信息反馈回来,将两种信息进行对比,即可发现其中是否有 Scan, then the information is fed back, comparing the two types of information, which can be found if there are

坏块; Bad block;

步骤103:如果有,则用该组好块中的一个替换该坏块。 Step 103: If there is to replace the bad block, a good block in the set is used.

步骤104:被替换后的坏块,其可放置在该组好块后面。 Step 104: After the bad block is replaced, which can be placed behind a good block of the group.

若不断发现有坏块,当所有的好块替换完后,再将第一次被替换的坏块当作好块去替换,以此类推。 If ever you find bad blocks, when all the good blocks to replace exhausted, and then for the first time replaced the bad block as a good block to replace, and so on.

采用这种方法,因为该闪存芯片已被精确分过类,因此其坏块数并不会很多,只是为了应付突然发现在的坏块数,并且,因为闪存本来的性能不稳定,有时其发现的坏块并不是真正的坏块,只是在扫描时认为的坏块, 所以将坏块i文在替换块后面,当下次有坏块时,就可以当作好块使用。 With this method, because the flash memory chip has been divided over the exact type, number of bad blocks, and therefore not much, just to cope with a sudden found in the number of bad blocks, and, since the original flash unstable, which sometimes found the bad blocks are not really bad block, just think of when scanning for bad blocks, bad blocks so i will replace the text block in the back, next time there is a bad block, you can use as a good block.

本发明还提供了一种闪存数据存储装置,如图4所示,该用于瑕疵闪存的动态补偿装置包括: The present invention also provides a flash memory data storage device shown in Figure 4, the dynamic compensation for defective flash memory device comprising:

设置单元201,将闪存中预留一组好块设置为替换块; Setting unit 201 will be reserved for a group of good blocks set in the replacement block flash memory;

扫描单元202,用于扫描闪存; The scanning unit 202 for scanning a flash memory;

替换单元203,利用替换块中的好块,替换扫描出来的坏块,然后将被替换的坏块放置在好块的后面。 Replacement unit 203, the block with a replacement block of good, bad block replacement scanned, then a bad block to be replaced is placed behind the good block.

使用时,若所有的替换块都用完以后,再用第一次被替换的坏块当作好块去替换,以此类推。 When used, after all, if the replacement block is used up, and then for the first time replaced the bad block as a good block to replace, and so on. 虽然通过实施例描绘了本发明,本领域普通技术人员知道,本发明有许多变形和变化而不脱离本发明的精神,希望所附的权利要求包括这些变形和变化而不脱离本发明的精神。 Although the present invention is depicted by way of example, those of ordinary skill in the art know that there are many modifications and variations of the present invention without departing from the spirit of the invention, intended that the appended claims cover such modifications and variations without departing from the spirit of the invention.

Claims (4)

1.一种用于瑕疵闪存的动态补偿办法,其特征在于:包括以下步骤:将闪存中预留一组好块设置为替换块;扫描闪存;利用替换块中的块替换坏块。 A dynamic compensation approach for defective flash memory, characterized by: comprising the steps of: reserving a set of good flash block as the replacement blocks; flash scan; bad block replacement block using the block replacement.
2、 如权利要求1所述的用于瑕疵闪存的动态补偿办法,其特征在于:将被替换的坏块放在该组好块后面。 2, as claimed in dynamic compensation approach for defective flash memory according to claim 1, wherein: the bad block to be replaced on the back of the set of good blocks.
3、 一种用于瑕疵闪存的动态补偿装置,其特征在于:包括: 设置单元,将闪存中预留一组好块设置为替换块; 扫描单元,用于扫描闪存;替换单元,利用替换块中的好块,替换扫描出来的坏块。 3, a dynamic defect compensating apparatus for a flash memory, characterized by: comprising: a setting unit to set aside a group of good blocks set in the replacement block flash memory; scanning unit for scanning a flash memory; replaceable unit with a replacement block the good block, the bad block replacement scanned.
4、 如权利要求3所述的用于瑕疵闪存的动态补偿装置,其特征在于:所述的替换单元,其将替换出来的块坏放在该组好块后面。 4. The apparatus as claimed in dynamic compensation for defective flash memory according to claim 3, wherein: said replacement unit which replaces the bad block on the back out of a good block of the group.
CN 200710075783 2007-08-17 2007-08-17 Dynamic compensation method and device used for flawed flash memory CN101369462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710075783 CN101369462A (en) 2007-08-17 2007-08-17 Dynamic compensation method and device used for flawed flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710075783 CN101369462A (en) 2007-08-17 2007-08-17 Dynamic compensation method and device used for flawed flash memory

Publications (1)

Publication Number Publication Date
CN101369462A true CN101369462A (en) 2009-02-18

Family

ID=40413230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710075783 CN101369462A (en) 2007-08-17 2007-08-17 Dynamic compensation method and device used for flawed flash memory

Country Status (1)

Country Link
CN (1) CN101369462A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010115332A1 (en) * 2009-04-10 2010-10-14 国民技术股份有限公司 Method for using bad blocks of flash memory
CN103309816A (en) * 2013-05-31 2013-09-18 苏州亮智科技有限公司 Solid hard disk, electronic device with solid hard disk and dynamic capacity control method of solid hard disk
CN105513630A (en) * 2015-11-30 2016-04-20 深圳市江波龙电子有限公司 DRAM initialization method and device thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010115332A1 (en) * 2009-04-10 2010-10-14 国民技术股份有限公司 Method for using bad blocks of flash memory
CN101859604B (en) * 2009-04-10 2012-10-24 国民技术股份有限公司 Utilization method of flash memory bad block
CN103309816A (en) * 2013-05-31 2013-09-18 苏州亮智科技有限公司 Solid hard disk, electronic device with solid hard disk and dynamic capacity control method of solid hard disk
CN105513630A (en) * 2015-11-30 2016-04-20 深圳市江波龙电子有限公司 DRAM initialization method and device thereof
CN105513630B (en) * 2015-11-30 2019-08-13 深圳市江波龙电子股份有限公司 The initial method and device of DRAM

Similar Documents

Publication Publication Date Title
US9817711B2 (en) Memory controller
US9229853B2 (en) Method and system for data de-duplication
US9116792B2 (en) Data storage device and method for flash block management
US8223544B2 (en) Memory system, program method thereof, and computing system including the same
US10482011B2 (en) Method for managing a memory apparatus
US10127166B2 (en) Data storage controller with multiple pipelines
US7477547B2 (en) Flash memory refresh techniques triggered by controlled scrub data reads
US7882299B2 (en) System and method for use of on-chip non-volatile memory write cache
CN100433192C (en) System and method for using dynamic random access memory and flash memory
KR100904758B1 (en) Flash memory device and system including buffer memory, and data updating method of the flash memory device
KR101613678B1 (en) Recovery for non-volatile memory after power loss
US8898424B2 (en) Memory address translation
KR101087308B1 (en) Initiative wear leveling for non-volatile memory
CN103038830B (en) Irregular parity checking distribution by metadata tag detects
US8046645B2 (en) Bad block identifying method for flash memory, storage system, and controller thereof
US7295470B2 (en) Non-volatile memory device including multi-page copyback system and method
TWI358068B (en) Writing method for non-volatile memory and control
EP2115594B1 (en) Memory system
US7814276B2 (en) Data cache architecture and cache algorithm used therein
TWI527037B (en) Data storing method, memory control circuit unit and memory storage apparatus
US8650463B2 (en) Solid state drive and method of controlling an error thereof
KR101425957B1 (en) Ecc control circuit and multi channel memory system icluding the same
TWI444825B (en) Memory storage device, memory controller thereof, and method for programming data thereof
US8312248B2 (en) Methods and apparatus for reallocating addressable spaces within memory devices
US8131911B2 (en) Data writing method, and flash storage system and controller using the same

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C12 Rejection of an application for a patent