CN102956267A - Memory programming method and flash memory device using same - Google Patents
Memory programming method and flash memory device using same Download PDFInfo
- Publication number
- CN102956267A CN102956267A CN2011102541978A CN201110254197A CN102956267A CN 102956267 A CN102956267 A CN 102956267A CN 2011102541978 A CN2011102541978 A CN 2011102541978A CN 201110254197 A CN201110254197 A CN 201110254197A CN 102956267 A CN102956267 A CN 102956267A
- Authority
- CN
- China
- Prior art keywords
- memory
- storage space
- programming
- main storage
- flash memory
- 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.)
- Granted
Links
- 230000015654 memory Effects 0.000 title claims abstract description 187
- 238000000034 method Methods 0.000 title claims abstract description 27
- 230000004044 response Effects 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000013507 mapping Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
Images
Landscapes
- Read Only Memory (AREA)
Abstract
Description
技术领域 technical field
本发明是有关于一种存储器编程方法及应用其的闪存装置,且特别是有关于一种针对数据编程错误进行错误回复的存储器编程方法及应用其的闪存装置。The present invention relates to a memory programming method and a flash memory device using the same, and in particular to a memory programming method for performing error recovery against data programming errors and a flash memory device using the same.
背景技术 Background technique
在科技发展日新月异的现今时代,非易失性存储器装置被广泛地应用在多种电子产品中;举例来说,闪存为最为广泛使用的非易失性存储器之一。一般来说,闪存中的存储单元具有可编程的阈值电压,此可编程的阈值电压用以指示此存储单元中储存的数据数值。In today's era of rapid technological development, non-volatile memory devices are widely used in various electronic products; for example, flash memory is one of the most widely used non-volatile memories. Generally, a memory cell in a flash memory has a programmable threshold voltage, and the programmable threshold voltage is used to indicate the data value stored in the memory cell.
在闪存的数据编程操作中,偶发地会发生编程失败的情形。据此,需执行诸如错误更正码(Error Correction Code,ECC),以进行相关的回复操作。然而在一些严重的编程错误中,即便执行ECC仍无法对编程失败的数据进行回复,而将导致数据损失。据此,如何针对闪存提出更完善的编程方法,以在编程失败发生时有效地对编程失败的数据进行回复,为业界不断致力方向之一。In the data programming operation of the flash memory, a program failure situation occasionally occurs. Accordingly, it is necessary to implement such as Error Correction Code (Error Correction Code, ECC) to perform related reply operations. However, in some serious programming errors, even if the ECC is executed, the failed data cannot be recovered, which will result in data loss. Accordingly, how to propose a more complete programming method for the flash memory to effectively recover the data of the programming failure when the programming failure occurs is one of the continuous efforts of the industry.
发明内容 Contents of the invention
本发明有关于一种存储器编程方法及应用其的闪存装置,其是应用于具有第一及第二存储器层面(Memory Plane)的闪存中。本发明相关的存储器编程方法及应用其的闪存装置更在此闪存操作于随取操作(RandomAccess)模式时,则建立第一逻辑至实体(Logic-to-Physical,L2P)对照表来将接收的编程逻辑地址对应至第一存储器层面中的主存储空间、建立第二L2P对照表来将编程逻辑地址对应至第二存储器层面中的备份存储空间并据以同时将编程数据写入此主存储空间及此备份存储空间中。当主存储空间发生编程失败时,本发明相关的存储器编程方法及应用其的闪存装置可将对应至主存储空间的地址指向备份存储空间,以此对闪存进行错误修补。据此,相较于传统闪存,本发明相关的存储器编程方法及应用其的闪存装置据此可有效地对编程失败的数据进行回复的优点。The present invention relates to a memory programming method and a flash memory device using the same, which is applied to a flash memory with first and second memory planes (Memory Plane). The memory programming method related to the present invention and the flash memory device using it further set up a first Logic-to-Physical (L2P) comparison table to receive received data when the flash memory operates in the random access mode The programming logical address is corresponding to the main storage space in the first memory level, and the second L2P comparison table is established to correspond the programming logical address to the backup storage space in the second memory level, so as to write the programming data into the main storage space at the same time and this backup storage space. When programming failure occurs in the main storage space, the related memory programming method of the present invention and the flash memory device using it can point the address corresponding to the main storage space to the backup storage space, so as to repair the flash memory. Accordingly, compared with the traditional flash memory, the related memory programming method and the flash memory device applied thereto of the present invention can effectively restore the data of programming failure.
根据本发明的第一方面,提出一种存储器编程方法,应用于闪存,其中闪存包括第一及第二存储器层面(Plane),存储器编程方法包括下列步骤:首先接收包括编程逻辑地址的编程指令;接着建立第一逻辑至实体(Logic-to-Physical,L2P)对照表将编程逻辑地址对应至第一存储器层面中的主存储空间;然后判断闪存是否操作于随取操作(Random Access)模式;若是,建立第二L2P对照表将编程逻辑地址对应至第二存储器层面中的备份存储空间;接着对第一及第二存储器层面同时进行编程以将编程数据写入主存储空间及第二存储器层面的备份存储空间;然后判断主存储空间是否编程成功;若否,将对应至主存储空间的地址指向备份存储空间。According to a first aspect of the present invention, a memory programming method is proposed, which is applied to a flash memory, wherein the flash memory includes a first and a second memory layer (Plane), and the memory programming method includes the following steps: first receiving a programming instruction including a programming logic address; Then establish a first logic-to-physical (Logic-to-Physical, L2P) comparison table to correspond the programming logic address to the main storage space in the first storage layer; then determine whether the flash memory is operated in the Random Access mode; if , establish a second L2P comparison table to correspond the programming logic address to the backup storage space in the second memory level; then program the first and second memory levels simultaneously to write programming data into the main storage space and the second memory level backup storage space; then judge whether the programming of the main storage space is successful; if not, point the address corresponding to the main storage space to the backup storage space.
根据本发明的第二方面,提出一种闪存装置,响应于编程指令进行数据编程操作,编程指令包括编程逻辑地址。闪存装置包括闪存、缓存器及存储器控制器。闪存包括第一及第二存储器层面。缓存器暂存对应至编程指令的编程数据。存储器控制器响应于编程指令建立第一L2P对照表,以将编程逻辑地址对应至第一存储器层面的主存储空间;存储器控制器更判断该闪存是否操作于随取操作模式;若是,则建立第二L2P对照表,将编程逻辑地址对应至第二存储器层面的备份存储空间。存储器控制器更对第一及第二存储器层面同时进行编程,以将编程数据写入主存储空间及备份存储空间。存储器控制器更判断主存储空间是否编程成功,若否,则将对应至主存储空间的地址指向备份存储空间。According to a second aspect of the present invention, a flash memory device is provided, which performs a data programming operation in response to a programming instruction, and the programming instruction includes a programming logic address. The flash memory device includes a flash memory, a register and a memory controller. The flash memory includes first and second memory levels. The register temporarily stores programming data corresponding to the programming instruction. The memory controller establishes the first L2P comparison table in response to the programming instruction, so as to correspond the programming logic address to the main storage space of the first memory level; the memory controller further judges whether the flash memory is operated in the fetch operation mode; if so, then establishes the second The second L2P comparison table corresponds the programming logic address to the backup storage space of the second memory level. The memory controller further programs the first and second memory levels simultaneously to write programming data into the main storage space and the backup storage space. The memory controller further determines whether the programming of the main storage space is successful, and if not, points the address corresponding to the main storage space to the backup storage space.
为了对本发明的上述及其它方面有更佳的了解,下文特举较佳实施例,并配合所附图式,作详细说明如下。In order to have a better understanding of the above and other aspects of the present invention, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明 Description of drawings
图1绘示依照本发明实施例的闪存装置的方块图。FIG. 1 is a block diagram of a flash memory device according to an embodiment of the present invention.
图2绘示依照逻辑至实体对照表L2P_1的操作示意图。FIG. 2 is a schematic diagram of operations according to the logic to the entity mapping table L2P_1.
图3绘示依照逻辑至实体对照表L2P_2的操作示意图。FIG. 3 is a schematic diagram illustrating operations according to the logic to the entity mapping table L2P_2.
图4绘示依照本发明实施例的存储器编程方法的流程图。FIG. 4 is a flowchart of a memory programming method according to an embodiment of the present invention.
图5绘示依照本发明实施例的存储器编程方法的部份流程图。FIG. 5 shows a partial flowchart of a memory programming method according to an embodiment of the present invention.
【主要元件符号说明】[Description of main component symbols]
1:闪存装置1: Flash memory device
2:主机2: Host
10:闪存10: Flash memory
20:缓存器20: buffer
30:存储器控制器30: memory controller
10_P1、10_P2:存储器层面10_P1, 10_P2: memory level
Page_M:主存储分页Page_M: main storage paging
Page_T:备份存储分页Page_T: backup storage paging
B(L):逻辑存储器区块B(L): Logical memory block
P(L_N)-P(L_N+M):逻辑存储器分页P(L_N)-P(L_N+M): logical memory paging
B(P)、B(P_X)-B(P_Z):物理存储器区块B(P), B(P_X)-B(P_Z): physical memory block
P(P_N)-P(P_N+M):物理存储器分页P(P_N)-P(P_N+M): Physical memory paging
具体实施方式 Detailed ways
请参照图1,其绘示依照本发明实施例的闪存装置的方块图。本实施例的闪存装置1响应于主机2提供的编程指令CMD进行数据编程操作,编程指令CMD包括编程逻辑地址Addr_P。闪存装置1包括闪存10、缓存器20及存储器控制器30。缓存器20暂存对应至编程指令CMD的编程数据Data。Please refer to FIG. 1 , which shows a block diagram of a flash memory device according to an embodiment of the present invention. The
闪存10包括存储器层面(Plane)10_P1及10_P2。举例来说,存储器层面10_P1包括多个存储区块(Block),而各存储区块包括存储分页(Page);存储器层面10_P2包括备份存储区块。进一步来说,存储区块为与非门(NAND)闪存的清除操作(Erase)的操作单位,而存储分页为NAND闪存的编程操作(Program)及读取操作(Read)的操作单元。The
存储器控制器30响应于编程指令CMD建立逻辑至实体(Logic-to-Physical,L2P)对照表L2P_1,以将编程逻辑地址Addr_P对应至存储器层面10_P1中的主存储空间。举例来说,L2P对照表L2P_1对应至区块操作模式(Block Mode),其用以将编程逻辑地址Addr_P对应至特定的存储区块中的主存储分页Page_M。The
举例来说,对应至区块操作模式的L2P对照表L2P_1是以区块为单位,来将逻辑层面的分页地址对应至物理存储器分页,如图2所示。进一步来说,对于逻辑层面同属一个逻辑存储器区块B(L)的多个逻辑存储器分页P(L_N)、P(L_N+1)、...、P(L_N+M)来说,其于实体层面中亦对应至一个相同的物理存储器区块B(P)中的多个物理存储器分页P(P_N)、P(P_N+1)、...、P(P_N+M),其中N及M为自然数。For example, the L2P comparison table L2P_1 corresponding to the block operation mode uses a block as a unit to map a logical level page address to a physical memory page, as shown in FIG. 2 . Furthermore, for multiple logical memory pages P(L_N), P(L_N+1), . The entity level also corresponds to multiple physical memory pages P(P_N), P(P_N+1), . . . , P(P_N+M) in the same physical memory block B(P), where N and M is a natural number.
存储器控制器30更判断闪存10是否操作于随取操作(Random Access)模式。举例来说,存储器控制器30是参考编程指令CMD及存储器层面10_P1及10_P2的容量,来判断闪存10是否操作于随取操作模式中。The
当闪存10操作于随取操作模式时,存储器控制器30建立L2P对照表L2P_2,以将编程逻辑地址CMD对应至存储器层面10_P2中的备份存储空间。举例来说,L2P对照表L2P_2是对应至分页操作模式(Page Mode),其用以将编程逻辑地址Addr_P对应至存储器层面10_P2中一个暂存区块Block_T中的暂存存储分页Page_T。在建立L2P对照表L2P_1及LTP_2之后,存储器控制器30更对存储器层面10_P1及10_P2同时进行编程,以将编程数据Data写入存储器层面10_P1的主存储分页Page_M及写入存储器层面10_p2的备份存储分页Page_T。When the
举例来说,对应至分页操作模式的L2P对照表L2P_2是以分页为单位,来将逻辑层面的分页地址对应至物理存储器分页,如图3所示。进一步来说,对于逻辑层面同属一个逻辑存储器区块B_L的多个逻辑存储器分页P(L_N)、P(L_N+1)、...、P(L_N+M)来说,其于实体层面中可能对应至不同的存储器区块B(P_X)、B(P_Y)及B(P_Z)中的部份分页P(L_N+1)、P(L_N+2)、...、P(L_N+M),其中N及M为自然数。For example, the L2P comparison table L2P_2 corresponding to the paging operation mode uses a page as a unit to map the logical level paging address to the physical memory page, as shown in FIG. 3 . Furthermore, for multiple logical memory pages P(L_N), P(L_N+1), . May correspond to some pages P(L_N+1), P(L_N+2), . . . , P(L_N+M) in different memory blocks B(P_X), B(P_Y) and B(P_Z) ), where N and M are natural numbers.
在对主存储分页Page_M及备份存储分页Page_T的编程操作后,存储器控制器30更判断主存储分页Page_M是否编程成功。举例来说,存储器控制器30参考状态标识Status,以判断主存储空间Page_M及备份存储空间Page_T的编程操作是否失败。当状态标识Status指示主存储空间Page_M及备份存储空间Page_T其中的部分或全部的编程操作为失败时,存储器控制器30进一步判断主存储空间Page_M的操作是否失败。After programming the main memory page Page_M and the backup memory page Page_T, the
当主存储分页Page_M编程失败时,存储器控制器30将对应至主存储分页Page_T的地址指向备份存储分页Page_T。换言之,存储器控制器30是在主存储分页Page_M的编程操作失败时,将存取主存储分页的指令对应至存取备份存储分页Page_T的指令,以此提供备份存储分页Page_T中储存的编程数据Data来对闪存10进行错误修补。When the programming of the main storage page Page_M fails, the
相似于前述的操作,存储器控制器30可根据L2P对照表L2P_1及L2p_2,来对存储器层面10_P1及10_P2同时进行编程,以将对应至存储器层面10_P1的其它主存储分页的编程数据Data同时写入此其它主存储分页及对应的备份存储分页中,并于此其它主存储分页发生编程失败时,以对应的备份存储分页中储存的数据来对其进行错误修补。Similar to the aforementioned operations, the
在其它操作实例中,当闪存10非操作于随取操作模式,而例如操作于序列操作(Sequential Access)模式时,存储器控制器30将编程数据Data写入存储器层面10_P1的主存储空间Page_M,而不执行针对备份存储分页进行编程的操作。In other operation examples, when the
请参照图4,其绘示依照本发明实施例的存储器编程方法的流程图。首先如步骤(a),存储器控制器30接收编程指令CMD,其中包括编程逻辑地址Addr_P。接着如步骤(b),存储器控制器30建立L2P对照表L2P_1,以将编程逻辑地址CMD对应至存储器层面10_P1中的主存储分页Page_M。Please refer to FIG. 4 , which shows a flowchart of a memory programming method according to an embodiment of the present invention. First, as in step (a), the
然后如步骤(c),存储器控制器30判断闪存10是否操作于随取操作模式;若是执行步骤(d),存储器控制器30建立L2P对照表L2P_2,以将编程逻辑地址Addr_P对应至存储器层面10_P2中的备份存储分页Page_T。Then as in step (c), the
接着如步骤(e),存储器控制器30对存储器层面10_P1及10_P2同时进行编程,以将编程数据Data写入存储器层面10_P1的主存储分页Page_M及写入存储器层面10_P2的备份存储分页Page_T。Then in step (e), the
然后如步骤(f),存储器控制器30判断主存储分页Page_M是否编程成功。举例来说,步骤(f)包括子步骤(f1)及(f2),如图5所示。于步骤(f1)中,存储器控制器30参考状态标识Status,判断主存储分页Page_M及备份存储分页Page_T的编程操作是否失败;若是执行步骤(f2),存储器控制器30进一步地判断主存储分页Page_M的操作是否失败。Then in step (f), the
当主存储分页Page_M编程失败时执行步骤(g),存储器控制器30将对应至主存储分页Page_M的地址指向备份存储分页Page_T,以此对闪存10进行错误修补。Step (g) is executed when the programming of the main storage page Page_M fails, and the
在步骤(c)之后,当闪存10非操作于随取操作模式时,执行步骤(h),存储器控制器30将编程数据Data写入存储器层面10_P1的主存储分页Page_M中,而不执行对备份存储分页Page_T编程的操作。After step (c), when the
本发明实施例的存储器编程方法及应用其的闪存装置是应用于具有第一及第二存储器层面的闪存中。本发明实施例的存储器编程方法及应用其的闪存装置更在此闪存操作于随取操作模式时,则建立第一L2P对照表来将接收的编程逻辑地址对应至第一存储器层面中的主存储空间、建立第二L2P对照表来将编程逻辑地址对应至第二存储器层面中的备份存储空间并据以同时将编程数据写入此主存储空间及此备份存储空间中。当主存储空间发生编程失败时,本发明实施例的存储器编程方法及应用其的闪存装置可将对应至主存储空间的地址指向备份存储空间,以此对闪存进行错误修补。据此,相较于传统闪存,本发明实施例的存储器编程方法及应用其的闪存装置据此可有效地对编程失败的数据进行回复的优点。The memory programming method and the flash memory device using the memory programming method in the embodiment of the present invention are applied in the flash memory having the first and the second memory levels. The memory programming method and the flash memory device using it in the embodiment of the present invention further establish a first L2P comparison table to correspond the received programming logic address to the main memory in the first memory level when the flash memory operates in the random access mode. space, establishing a second L2P comparison table to map the programming logic address to the backup storage space in the second memory level, and accordingly write programming data into the main storage space and the backup storage space at the same time. When programming failure occurs in the main storage space, the memory programming method of the embodiment of the present invention and the flash memory device using it can point the address corresponding to the main storage space to the backup storage space, so as to repair the flash memory. Accordingly, compared with the traditional flash memory, the memory programming method of the embodiment of the present invention and the flash memory device using the same can effectively recover the data that fails to be programmed.
综上所述,虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明。本发明所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作各种的更动与润饰。因此,本发明的保护范围当视随附的权利要求范围所界定的为准。To sum up, although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Those skilled in the art of the present invention can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention should be defined by the appended claims.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110254197.8A CN102956267B (en) | 2011-08-30 | 2011-08-30 | Memory programming method and flash memory device using same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110254197.8A CN102956267B (en) | 2011-08-30 | 2011-08-30 | Memory programming method and flash memory device using same |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102956267A true CN102956267A (en) | 2013-03-06 |
CN102956267B CN102956267B (en) | 2016-04-27 |
Family
ID=47764976
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110254197.8A Active CN102956267B (en) | 2011-08-30 | 2011-08-30 | Memory programming method and flash memory device using same |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102956267B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105551523A (en) * | 2015-12-10 | 2016-05-04 | 北京兆易创新科技股份有限公司 | NAND memory and device thereof for balancing WL voltage establishment time |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050030791A1 (en) * | 2003-08-04 | 2005-02-10 | Phison Electronics Corp. | Method writing data to a large block of a flash memory cell |
CN101241769A (en) * | 2007-02-08 | 2008-08-13 | 三星电子株式会社 | A repairable semiconductor memory device and method of repairing the same |
CN101561749A (en) * | 2008-04-17 | 2009-10-21 | 旺玖科技股份有限公司 | Control circuit and control method of flash memory |
CN101872644A (en) * | 2009-04-24 | 2010-10-27 | 威刚科技(苏州)有限公司 | Electronic storage device and storage method thereof |
-
2011
- 2011-08-30 CN CN201110254197.8A patent/CN102956267B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050030791A1 (en) * | 2003-08-04 | 2005-02-10 | Phison Electronics Corp. | Method writing data to a large block of a flash memory cell |
CN101241769A (en) * | 2007-02-08 | 2008-08-13 | 三星电子株式会社 | A repairable semiconductor memory device and method of repairing the same |
CN101561749A (en) * | 2008-04-17 | 2009-10-21 | 旺玖科技股份有限公司 | Control circuit and control method of flash memory |
CN101872644A (en) * | 2009-04-24 | 2010-10-27 | 威刚科技(苏州)有限公司 | Electronic storage device and storage method thereof |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105551523A (en) * | 2015-12-10 | 2016-05-04 | 北京兆易创新科技股份有限公司 | NAND memory and device thereof for balancing WL voltage establishment time |
Also Published As
Publication number | Publication date |
---|---|
CN102956267B (en) | 2016-04-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI522804B (en) | Flash memory controller and data storage device and flash memory control method | |
CN109582217B (en) | Data storage device and method for writing data into memory device | |
US8046528B2 (en) | Data writing method for flash memory, and flash memory controller and storage device thereof | |
CN105740157B (en) | data storage device and flash memory control method | |
KR101375992B1 (en) | Handling errors during device bootup from a non-volatile memory | |
TWI527037B (en) | Data storing method, memory control circuit unit and memory storage apparatus | |
US20070170268A1 (en) | Memory cards, nonvolatile memories and methods for copy-back operations thereof | |
TWI470433B (en) | Method for dodging bad page and bad block caused by suddenly power off | |
TWI512742B (en) | Non-volatile memory flash memory erase-abnormal block repair method and device applying the same | |
JP2008198310A (en) | Method for repairing bit error and information processing system | |
US10635527B2 (en) | Method for processing data stored in a memory device and a data storage device utilizing the same | |
CN101625897B (en) | Data writing method, storage system and controller for flash memory | |
CN104765568A (en) | Data storage method, memory control circuit unit and memory storage device | |
CN104699413A (en) | Data management method, memory storage device and memory control circuit unit | |
CN111142781B (en) | Data storage device and data processing method | |
US20130346674A1 (en) | Data writing method, memory controller and memory storage device | |
CN103377129A (en) | Data writing method, memory controller and memory storage device | |
US9383929B2 (en) | Data storing method and memory controller and memory storage device using the same | |
JP2004220068A (en) | Memory card and method for writing data in memory | |
JP2006004367A (en) | Memory card and semiconductor device | |
JP2008191701A (en) | Method of recovery from error and information processor | |
JP4357305B2 (en) | External storage device | |
CN107193485B (en) | Storage device, control unit thereof and data storage method for storage device | |
US20130067141A1 (en) | Data writing method, and memory controller and memory storage apparatus using the same | |
CN102956267B (en) | Memory programming method and flash memory device using same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |