CN107301873A - Decoding method, memory storage device and memory control circuit unit - Google Patents
Decoding method, memory storage device and memory control circuit unit Download PDFInfo
- Publication number
- CN107301873A CN107301873A CN201610229969.5A CN201610229969A CN107301873A CN 107301873 A CN107301873 A CN 107301873A CN 201610229969 A CN201610229969 A CN 201610229969A CN 107301873 A CN107301873 A CN 107301873A
- Authority
- CN
- China
- Prior art keywords
- data
- decoding
- bit
- memory
- error
- 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
- 230000005055 memory storage Effects 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 title claims abstract description 26
- 208000011580 syndromic disease Diseases 0.000 claims description 87
- 230000000875 corresponding effect Effects 0.000 claims description 43
- 238000012937 correction Methods 0.000 claims description 36
- 230000002596 correlated effect Effects 0.000 claims description 15
- 238000012795 verification Methods 0.000 claims description 9
- 230000001276 controlling effect Effects 0.000 claims description 3
- 238000004422 calculation algorithm Methods 0.000 description 35
- 239000011159 matrix material Substances 0.000 description 26
- 238000010586 diagram Methods 0.000 description 16
- 230000005540 biological transmission Effects 0.000 description 12
- 230000008859 change Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000013507 mapping Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C8/00—Arrangements for selecting an address in a digital store
- G11C8/10—Decoders
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
- G11C16/08—Address circuits; Decoders; Word-line control circuits
Landscapes
- Engineering & Computer Science (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Read Only Memory (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
技术领域technical field
本发明涉及一种译码技术,尤其涉及一种译码方法、内存储存装置及内存控制电路单元。The invention relates to a decoding technology, in particular to a decoding method, a memory storage device and a memory control circuit unit.
背景技术Background technique
数码相机、移动电话与MP3播放器在这几年来的成长十分迅速,使得消费者对储存媒体的需求也急速增加。由于可复写式非易失性内存模块(例如,闪存)具有数据非易失性、省电、体积小,以及无机械结构等特性,所以非常适合内建于上述所举例的各种可携式多媒体装置中。Digital cameras, mobile phones, and MP3 players have grown rapidly in recent years, making consumers' demand for storage media also increase rapidly. Since the rewritable non-volatile memory module (for example, flash memory) has the characteristics of data non-volatility, power saving, small size, and no mechanical structure, it is very suitable for being built in various portable memory modules listed above. in the multimedia device.
一般来说,内存装置会内建有一或多种译码机制,其用以更正从内存装置读取的数据中可能具有的错误。例如,此些译码机制可能包括位翻转(Bit-Flipping)算法、最小-总合(Min-Sum)算法及总和-乘积(Sum-Product)算法等译码算法。在内存装置出厂时,内存装置内建的译码算法会被配置为使用优化的操作参数。但是,随着内存装置的使用时间和/或使用频率增加,内存装置的信道状态也会发生变化。若内存装置的信道状态变化太大,即便使用优化的操作参数也往往导致内存装置的译码效率低。Generally, a memory device has one or more built-in decoding mechanisms for correcting possible errors in data read from the memory device. For example, these decoding mechanisms may include decoding algorithms such as Bit-Flipping algorithm, Min-Sum algorithm and Sum-Product algorithm. When the memory device leaves the factory, the built-in decoding algorithm of the memory device will be configured to use optimized operating parameters. However, as the use time and/or frequency of use of the memory device increase, the channel status of the memory device will also change. If the channel state of the memory device changes too much, even with optimized operating parameters, the decoding efficiency of the memory device will often be low.
发明内容Contents of the invention
有鉴于此,本发明提供一种译码方法、内存储存装置及内存控制电路单元,可提升内存储存装置的译码效率。In view of this, the present invention provides a decoding method, a memory storage device and a memory control circuit unit, which can improve the decoding efficiency of the memory storage device.
本发明的一范例实施例提供一种译码方法,其用于包括多个记忆胞的可复写式非易失性内存模块,所述译码方法包括:从所述记忆胞中的多个第一记忆胞读取数据;在对所述数据执行第一译码操作之前,评估所述数据的错误位发生率;以及根据所评估的错误位发生率使用第一译码参数来对所述数据执行所述第一译码操作,其中所述第一译码参数对应于在所述第一译码操作中定位错误位的一严谨度(strict level)。An exemplary embodiment of the present invention provides a decoding method for a rewritable non-volatile memory module including a plurality of memory cells, the decoding method comprising: extracting from the plurality of memory cells A memory cell reads data; before performing a first decoding operation on the data, evaluating an error bit occurrence rate of the data; and using a first decoding parameter to process the data according to the estimated error bit occurrence rate The first decoding operation is performed, wherein the first decoding parameter corresponds to a strict level for locating erroneous bits in the first decoding operation.
在本发明的一范例实施例中,评估所述数据的所述错误位发生率的步骤包括:获得所述第一记忆胞的临界电压分布,其中所述临界电压分布包括第一状态与第二状态,其中所述第一状态对应至第一位值,其中所述第二状态对应至第二位值,其中所述第一位值与所述第二位值不同;以及根据所述第一状态与所述第二状态之间的重叠区域所对应的记忆胞总数来评估所述数据的所述错误位发生率。In an exemplary embodiment of the present invention, the step of evaluating the bit error rate of the data includes: obtaining a threshold voltage distribution of the first memory cell, wherein the threshold voltage distribution includes a first state and a second state state, wherein the first state corresponds to a first bit value, wherein the second state corresponds to a second bit value, wherein the first bit value is different from the second bit value; and according to the first The total number of memory cells corresponding to the overlapping area between the state and the second state is used to evaluate the error bit occurrence rate of the data.
在本发明的一范例实施例中,评估所述数据的所述错误位发生率的步骤包括:对所述数据执行奇偶检查操作以获得多个校验子;累加所述校验子以获得校验子总合;以及根据所述校验子总合评估所述数据的所述错误位发生率,其中所评估的错误位发生率正相关于所述校验子总合。In an exemplary embodiment of the present invention, the step of evaluating the error bit occurrence rate of the data includes: performing a parity check operation on the data to obtain a plurality of syndromes; accumulating the syndromes to obtain a parity a syndrome sum; and evaluating the error bit occurrence rate of the data based on the syndrome sum, wherein the estimated error bit incidence is positively correlated with the syndrome sum.
在本发明的一范例实施例中,所述第一译码参数为翻转门槛值,所述第一译码操作包括:获得对应于所述数据中的每一个位的校验权重;以及翻转所述数据中校验权重大于所述翻转门槛值的至少一位。In an exemplary embodiment of the present invention, the first decoding parameter is an inversion threshold, and the first decoding operation includes: obtaining a check weight corresponding to each bit in the data; and inverting the At least one bit whose verification weight is greater than the flipping threshold in the data.
在本发明的一范例实施例中,所述译码方法更包括:判断所述第一译码操作是否失败;若所述第一译码操作失败,根据所述第一译码操作的执行结果重新评估所述数据的所述错误位发生率;以及根据重新评估的错误位发生率使用第二译码参数来对所述数据执行第二译码操作,其中所述第二译码参数对应于在所述第二译码操作中定位错误位的严谨度。In an exemplary embodiment of the present invention, the decoding method further includes: judging whether the first decoding operation fails; if the first decoding operation fails, according to the execution result of the first decoding operation re-evaluating the bit error rate of the data; and performing a second decoding operation on the data using second decoding parameters according to the re-evaluated bit error rate, wherein the second decoding parameters correspond to The degree of precision with which erroneous bits are located in the second decoding operation.
本发明的另一范例实施例提供一种内存储存装置,其包括连接接口单元、可复写式非易失性内存模块及内存控制电路单元。所述连接接口单元用以连接至主机系统。所述可复写式非易失性内存模块包括多个记忆胞。所述内存控制电路单元连接至所述连接接口单元与所述可复写式非易失性内存模块,其中所述内存控制电路单元用以发送读取指令序列,以指示从所述记忆胞中的多个第一记忆胞读取数据,其中在对所述数据执行第一译码操作之前,所述内存控制电路单元更用以评估所述数据的错误位发生率,其中所述内存控制电路单元更用以根据所评估的错误位发生率使用第一译码参数来对所述数据执行所述第一译码操作,其中所述第一译码参数对应于在所述第一译码操作中定位错误位的严谨度。Another exemplary embodiment of the present invention provides a memory storage device, which includes a connection interface unit, a rewritable non-volatile memory module, and a memory control circuit unit. The connection interface unit is used for connecting to a host system. The rewritable non-volatile memory module includes a plurality of memory cells. The memory control circuit unit is connected to the connection interface unit and the rewritable non-volatile memory module, wherein the memory control circuit unit is used to send a read command sequence to instruct the Reading data from a plurality of first memory cells, wherein before performing a first decoding operation on the data, the memory control circuit unit is further used to evaluate an error bit occurrence rate of the data, wherein the memory control circuit unit further for performing the first decoding operation on the data according to the estimated erroneous bit occurrence rate using first decoding parameters, wherein the first decoding parameters correspond to The degree of rigor with which the error bits are located.
在本发明的一范例实施例中,所述内存控制电路单元评估所述数据的所述错误位发生率的操作包括:获得所述第一记忆胞的临界电压分布,其中所述临界电压分布包括第一状态与第二状态,其中所述第一状态对应至第一位值,其中所述第二状态对应至第二位值,其中所述第一位值与所述第二位值不同;以及根据所述第一状态与所述第二状态之间的重叠区域所对应的记忆胞总数来评估所述数据的所述错误位发生率。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit evaluating the error bit occurrence rate of the data includes: obtaining a threshold voltage distribution of the first memory cell, wherein the threshold voltage distribution includes a first state and a second state, wherein the first state corresponds to a first bit value, wherein the second state corresponds to a second bit value, wherein the first bit value is different from the second bit value; and evaluating the error bit occurrence rate of the data according to the total number of memory cells corresponding to the overlapping area between the first state and the second state.
在本发明的一范例实施例中,所述内存控制电路单元评估所述数据的所述错误位发生率的操作包括:对所述数据执行奇偶检查操作以获得多个校验子;累加所述校验子以获得校验子总合;以及根据所述校验子总合评估所述数据的所述错误位发生率,其中所评估的错误位发生率正相关于所述校验子总合。In an exemplary embodiment of the present invention, the operation of the memory control circuit unit evaluating the error bit occurrence rate of the data includes: performing a parity check operation on the data to obtain a plurality of syndromes; accumulating the obtaining a syndrome sum; and estimating the bit error rate of the data based on the syndrome sum, wherein the estimated bit error rate is positively correlated with the syndrome sum .
在本发明的一范例实施例中,所述第一译码参数为翻转门槛值,其中所述第一译码操作包括:获得对应于所述数据中的每一个位的校验权重;以及翻转所述数据中校验权重大于所述翻转门槛值的至少一位。In an exemplary embodiment of the present invention, the first decoding parameter is an inversion threshold, wherein the first decoding operation includes: obtaining a check weight corresponding to each bit in the data; and inverting At least one bit whose verification weight is greater than the flipping threshold in the data.
在本发明的一范例实施例中,所述内存控制电路单元更用以判断所述第一译码操作是否失败,其中若所述第一译码操作失败,所述内存控制电路单元更用以根据所述第一译码操作的执行结果重新评估所述数据的所述错误位发生率,其中所述内存控制电路单元更用以根据重新评估的错误位发生率使用第二译码参数来对所述数据执行第二译码操作,其中所述第二译码参数对应于在所述第二译码操作中定位错误位的严谨度。In an exemplary embodiment of the present invention, the memory control circuit unit is further used for judging whether the first decoding operation fails, wherein if the first decoding operation fails, the memory control circuit unit is further used for Re-evaluate the error bit occurrence rate of the data according to the execution result of the first decoding operation, wherein the memory control circuit unit is further configured to use a second decoding parameter according to the re-evaluated error bit occurrence rate A second decoding operation is performed on the data, wherein the second decoding parameter corresponds to a degree of precision with which erroneous bits are located in the second decoding operation.
本发明的另一范例实施例提供一种内存控制电路单元,其用以控制可复写式非易失性内存模块,其中所述可复写式非易失性内存模块包括多个记忆胞,所述内存控制电路单元包括主机接口、内存接口、错误检查与校正电路及内存管理电路。所述主机接口用以连接至主机系统。所述内存接口用以连接至所述可复写式非易失性内存模块。所述内存管理电路连接至所述主机接口、所述内存接口及所述错误检查与校正电路,其中所述内存管理电路用以发送读取指令序列,以指示从所述记忆胞中的多个第一记忆胞读取数据,其中在对所述数据执行第一译码操作之前,所述内存管理电路更用以评估所述数据的错误位发生率,其中所述错误检查与校正电路用以根据所评估的错误位发生率使用第一译码参数来对所述数据执行所述第一译码操作,其中所述第一译码参数对应于在所述第一译码操作中定位错误位的严谨度。Another exemplary embodiment of the present invention provides a memory control circuit unit for controlling a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module includes a plurality of memory cells, the The memory control circuit unit includes a host interface, a memory interface, an error checking and correction circuit and a memory management circuit. The host interface is used for connecting to a host system. The memory interface is used for connecting to the rewritable non-volatile memory module. The memory management circuit is connected to the host interface, the memory interface and the error checking and correction circuit, wherein the memory management circuit is used to send a read command sequence to instruct multiple The first memory cell reads data, wherein before performing a first decoding operation on the data, the memory management circuit is further used to evaluate an error bit occurrence rate of the data, wherein the error checking and correction circuit is used for performing the first decoding operation on the data using first decoding parameters based on the estimated occurrence of erroneous bits, wherein the first decoding parameters correspond to locating erroneous bits in the first decoding operation rigor.
在本发明的一范例实施例中,所述内存管理电路评估所述数据的所述错误位发生率的操作包括:获得所述第一记忆胞的临界电压分布,其中所述临界电压分布包括第一状态与第二状态,其中所述第一状态对应至第一位值,其中所述第二状态对应至第二位值,其中所述第一位值与所述第二位值不同;以及根据所述第一状态与所述第二状态之间的重叠区域所对应的记忆胞总数来评估所述数据的所述错误位发生率。In an exemplary embodiment of the present invention, the operation of the memory management circuit for evaluating the error bit occurrence rate of the data includes: obtaining a threshold voltage distribution of the first memory cell, wherein the threshold voltage distribution includes a first memory cell distribution. a state and a second state, wherein the first state corresponds to a first bit value, wherein the second state corresponds to a second bit value, wherein the first bit value is different from the second bit value; and The error bit occurrence rate of the data is estimated according to the total number of memory cells corresponding to the overlapping area between the first state and the second state.
在本发明的一范例实施例中,所述内存管理电路评估所述数据的所述错误位发生率的操作包括:对所述数据执行奇偶检查操作以获得多个校验子;累加所述校验子以获得校验子总合;以及根据所述校验子总合评估所述数据的所述错误位发生率,其中所评估的错误位发生率正相关于所述校验子总合。In an exemplary embodiment of the present invention, the operation of the memory management circuit to evaluate the error bit occurrence rate of the data includes: performing a parity check operation on the data to obtain a plurality of syndromes; accumulating the parity obtaining a syndrome sum; and evaluating the error bit occurrence rate of the data according to the syndrome sum, wherein the estimated error bit occurrence rate is positively correlated with the syndrome sum.
在本发明的一范例实施例中,所述严谨度正相关于所评估的错误位发生率。In an exemplary embodiment of the invention, the stringency is positively related to the estimated bit error rate.
在本发明的一范例实施例中,所述严谨度正相关于所述第一译码参数。In an exemplary embodiment of the present invention, the strictness is positively correlated with the first decoding parameter.
在本发明的一范例实施例中,所述第一译码参数正相关于所评估的错误位发生率。In an exemplary embodiment of the present invention, the first decoding parameter is positively correlated with the estimated bit error rate.
在本发明的一范例实施例中,所述第一译码参数为翻转门槛值,其中所述第一译码操作包括:获得对应于所述数据中的每一个位的校验权重;以及翻转所述数据中校验权重大于所述翻转门槛值的至少一位。In an exemplary embodiment of the present invention, the first decoding parameter is an inversion threshold, wherein the first decoding operation includes: obtaining a check weight corresponding to each bit in the data; and inverting At least one bit whose verification weight is greater than the flipping threshold in the data.
在本发明的一范例实施例中,所述内存管理电路更用以判断所述第一译码操作是否失败,其中若所述第一译码操作失败,所述内存管理电路更用以根据所述第一译码操作的执行结果重新评估所述数据的所述错误位发生率,其中所述错误检查与校正电路更用以根据重新评估的错误位发生率使用第二译码参数来对所述数据执行第二译码操作,其中所述第二译码参数对应于在所述第二译码操作中定位错误位的严谨度。In an exemplary embodiment of the present invention, the memory management circuit is further configured to determine whether the first decoding operation fails, wherein if the first decoding operation fails, the memory management circuit is further configured to re-evaluating the bit error rate of the data as a result of the first decoding operation, wherein the error checking and correction circuit is further configured to use a second decoding parameter according to the re-evaluated bit error rate performing a second decoding operation on the data, wherein the second decoding parameter corresponds to a degree of precision with which erroneous bits are located in the second decoding operation.
基于上述,根据待译码的数据的错误位发生率,错误检查与校正电路可弹性地基于一个特定的译码参数来执行相应的译码操作。其中,此译码参数会对应于在相应的译码操作中定位错误位的严谨度。藉此,可在提高每一次的译码操作的译码成功率与提高整体译码速度之间取得平衡,从而提高内存储存装置的译码效率。Based on the above, according to the bit error occurrence rate of the data to be decoded, the error checking and correction circuit can flexibly perform a corresponding decoding operation based on a specific decoding parameter. Wherein, the decoding parameter corresponds to the precision of locating error bits in the corresponding decoding operation. Thereby, a balance can be achieved between improving the decoding success rate of each decoding operation and increasing the overall decoding speed, thereby improving the decoding efficiency of the memory storage device.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。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是根据本发明的一范例实施例所显示的主机系统、内存储存装置及输入/输出(I/O)装置的示意图;1 is a schematic diagram of a host system, a memory storage device and an input/output (I/O) device according to an exemplary embodiment of the present invention;
图2是根据本发明的另一范例实施例所显示的主机系统、内存储存装置及I/O装置的示意图;2 is a schematic diagram of a host system, a memory storage device and an I/O device according to another exemplary embodiment of the present invention;
图3是根据本发明的另一范例实施例所显示的主机系统与内存储存装置的示意图;3 is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention;
图4是根据本发明的一范例实施例所显示的内存储存装置的概要方框图;FIG. 4 is a schematic block diagram of a memory storage device according to an exemplary embodiment of the present invention;
图5是根据本发明的一范例实施例所显示的内存控制电路单元的概要方框图;5 is a schematic block diagram of a memory control circuit unit shown according to an exemplary embodiment of the present invention;
图6是根据本发明的一范例实施例所显示的奇偶检查矩阵的示意图;FIG. 6 is a schematic diagram of a parity check matrix displayed according to an exemplary embodiment of the present invention;
图7是根据本发明的一范例实施例所显示的记忆胞的临界电压分布的示意图;FIG. 7 is a schematic diagram showing a threshold voltage distribution of a memory cell according to an exemplary embodiment of the present invention;
图8是根据本发明的一范例实施例所显示的奇偶检查操作的示意图;FIG. 8 is a schematic diagram showing a parity check operation according to an exemplary embodiment of the present invention;
图9是根据本发明的一范例实施例所显示的译码方法的流程图;FIG. 9 is a flowchart of a decoding method according to an exemplary embodiment of the present invention;
图10是根据本发明的另一范例实施例所显示的译码方法的流程图;FIG. 10 is a flowchart of a decoding method according to another exemplary embodiment of the present invention;
图11是根据本发明的另一范例实施例所显示的译码方法的流程图。FIG. 11 is a flowchart of a decoding method according to another exemplary embodiment of the present invention.
附图标记:Reference signs:
10、30:内存储存装置10, 30: memory storage device
11、31:主机系统11, 31: host system
110:系统总线110: System bus
111:处理器111: Processor
112:随机存取内存112: random access memory
113:只读存储器113: ROM
114:数据传输接口114: data transmission interface
12:输入/输出(I/O)装置12: Input/Output (I/O) device
20:主板20: Motherboard
201:随身碟201: Pen drive
202:记忆卡202: memory card
203:固态硬盘203: SSD
204:无线内存储存装置204: Wireless memory storage device
205:全球定位系统模块205: Global Positioning System Module
206:网络适配器206: Network Adapter
207:无线传输装置207: Wireless transmission device
208:键盘208: Keyboard
209:屏幕209: screen
210:喇叭210: Horn
32:SD卡32: SD card
33:CF卡33: CF card
34:嵌入式储存装置34: Embedded storage device
341:嵌入式多媒体卡341: Embedded multimedia card
342:嵌入式多芯片封装储存装置342: Embedded multi-chip package storage device
402:连接接口单元402: Connect the interface unit
404:内存控制电路单元404: memory control circuit unit
406:可复写式非易失性内存模块406: Rewritable non-volatile memory module
502:内存管理电路502: memory management circuit
504:主机接口504: host interface
506:内存接口506: memory interface
508:错误检查与校正电路508: Error checking and correction circuit
510:缓冲存储器510: buffer memory
512:电源管理电路512: Power management circuit
600、800:奇偶检查矩阵600, 800: parity check matrix
710、720:状态710, 720: status
701:读取电压701: Read voltage
730:重叠区域730: Overlapping area
801:码字801: Codeword
802:校验向量802: check vector
S901:步骤(从可复写式非易失性内存模块的第一记忆胞读取数据)S901: step (reading data from the first memory cell of the rewritable non-volatile memory module)
S902:步骤(评估所述数据的错误位发生率)S902: Step (evaluating the error bit occurrence rate of the data)
S903:步骤(根据所评估的错误位发生率使用一译码参数来对所述数据执行一译码操作,其中所述译码参数对应于在所述译码操作中定位错误位的严谨度)S903: Step (using a decoding parameter to perform a decoding operation on the data according to the estimated error bit occurrence rate, wherein the decoding parameter corresponds to the precision of locating error bits in the decoding operation)
S1001:步骤(从可复写式非易失性内存模块的第一记忆胞读取数据)S1001: step (reading data from the first memory cell of the rewritable non-volatile memory module)
S1002:步骤(评估所述数据的错误位发生率)S1002: Step (evaluating the error bit occurrence rate of the data)
S1003:步骤(根据所评估的错误位发生率使用一译码参数来对所述数据执行一译码操作,其中所述译码参数对应于在所述译码操作中定位错误位的严谨度)S1003: Step (using a decoding parameter to perform a decoding operation on the data according to the estimated error bit occurrence rate, wherein the decoding parameter corresponds to the precision of locating error bits in the decoding operation)
S1004:步骤(是否译码成功)S1004: Step (whether the decoding is successful)
S1005:步骤(输出所述数据)S1005: Step (output the data)
S1101:步骤(从可复写式非易失性内存模块的第一记忆胞读取数据)S1101: step (reading data from the first memory cell of the rewritable non-volatile memory module)
S1102:步骤(对所述数据执行奇偶检查操作以获得多个校验子)S1102: Step (perform a parity check operation on the data to obtain multiple syndromes)
S1103:步骤(是否译码成功)S1103: Step (whether the decoding is successful)
S1104:步骤(输出所述数据)S1104: Step (output the data)
S1105:步骤(累加所述校验子以获得校验子总合)S1105: Step (accumulate the syndromes to obtain the sum of syndromes)
S1106:步骤(根据所述校验子总合评估所述数据的错误位发生率)S1106: step (evaluating the error bit occurrence rate of the data according to the syndrome sum total)
S1107:步骤(根据所评估的错误位发生率使用一译码参数来对所述数据执行一译码操作,其中所述译码参数对应于在所述译码操作中定位错误位的严谨度)S1107: Step (using a decoding parameter to perform a decoding operation on the data according to the estimated error bit occurrence rate, wherein the decoding parameter corresponds to the precision of locating error bits in the decoding operation)
具体实施方式detailed description
一般而言,内存储存装置(亦称,内存储存系统)包括可复写式非易失性内存模块(rewritablenon-volatile memory module)与控制器(亦称,控制电路)。通常内存储存装置是与主机系统一起使用,以使主机系统可将数据写入至内存储存装置或从内存储存装置中读取数据。Generally speaking, a memory storage device (also called a memory storage system) includes a rewritable non-volatile memory module (rewritable non-volatile memory module) and a controller (also called a control circuit). Generally, a memory storage device is used with a host system so that the host system can write data to or read data from the memory storage device.
图1是根据本发明的一范例实施例所显示的主机系统、内存储存装置及输入/输出(I/O)装置的示意图。图2是根据本发明的另一范例实施例所显示的主机系统、内存储存装置及I/O装置的示意图。FIG. 1 is a schematic diagram of a host system, a memory storage device and an input/output (I/O) device according to an exemplary embodiment of the present invention. FIG. 2 is a schematic diagram of a host system, a memory storage device and an I/O device according to another exemplary embodiment of the present invention.
请参照图1与图2,主机系统11一般包括处理器111、随机存取内存(random access memory,RAM)112、只读存储器(read only memory,ROM)113及数据传输接口114。处理器111、随机存取内存112、只读存储器113及数据传输接口114皆连接至系统总线(system bus)110。Referring to FIG. 1 and FIG. 2 , the host system 11 generally includes a processor 111 , a random access memory (random access memory, RAM) 112 , a read only memory (read only memory, ROM) 113 and a data transmission interface 114 . The processor 111 , the RAM 112 , the ROM 113 and the data transmission interface 114 are all connected to a system bus 110 .
在本范例实施例中,主机系统11是通过数据传输接口114与内存储存装置10连接。例如,主机系统11可经由数据传输接口114将数据储存至内存储存装置10或从内存储存装置10中读取数据。此外,主机系统11是通过系统总线110与I/O装置12连接。例如,主机系统11可经由系统总线110将输出信号传送至I/O装置12或从I/O装置12接收输入信号。In this exemplary embodiment, the host system 11 is connected to the memory storage device 10 through the data transmission interface 114 . For example, the host system 11 can store data into the memory storage device 10 or read data from the memory storage device 10 via the data transmission interface 114 . In addition, the host system 11 is connected to the I/O device 12 through the system bus 110 . For example, host system 11 may transmit output signals to or receive input signals from I/O devices 12 via system bus 110 .
在本范例实施例中,处理器111、随机存取内存112、只读存储器113及数据传输接口114可设置在主机系统11的主板20上。数据传输接口114的数目可以是一或多个。通过数据传输接口114,主板20可以经由有线或无线方式连接至内存储存装置10。内存储存装置10可例如是随身碟201、记忆卡202、固态硬盘(Solid State Drive,SSD)203或无线内存储存装置204。无线内存储存装置204可例如是近距离无线通信(Near Field Communication,NFC)内存储存装置、无线传真(WiFi)内存储存装置、蓝牙(Bluetooth)内存储存装置或低功耗蓝牙内存储存装置(例如,iBeacon)等以各式无线通信技术为基础的内存储存装置。此外,主板20也可以通过系统总线110连接至全球定位系统(Global Positioning System,GPS)模块205、网络适配器206、无线传输装置207、键盘208、屏幕209、喇叭210等各式I/O装置。例如,在一范例实施例中,主板20可通过无线传输装置207存取无线内存储存装置204。In this exemplary embodiment, the processor 111 , the random access memory 112 , the read-only memory 113 and the data transmission interface 114 can be disposed on the motherboard 20 of the host system 11 . The number of data transmission interfaces 114 may be one or more. Through the data transmission interface 114 , the motherboard 20 can be connected to the memory storage device 10 via a wired or wireless manner. The memory storage device 10 can be, for example, a flash drive 201 , a memory card 202 , a solid state drive (Solid State Drive, SSD) 203 or a wireless memory storage device 204 . The wireless memory storage device 204 can be, for example, a near field communication (Near Field Communication, NFC) memory storage device, a wireless fax (WiFi) memory storage device, a Bluetooth (Bluetooth) memory storage device or a Bluetooth low energy memory storage device (for example, iBeacon) and other memory storage devices based on various wireless communication technologies. In addition, the motherboard 20 can also be connected to various I/O devices such as a Global Positioning System (GPS) module 205 , a network adapter 206 , a wireless transmission device 207 , a keyboard 208 , a screen 209 , and a speaker 210 through the system bus 110 . For example, in an exemplary embodiment, the motherboard 20 can access the wireless memory storage device 204 through the wireless transmission device 207 .
在一范例实施例中,所提及的主机系统为可实质地与内存储存装置配合以储存数据的任意系统。虽然在上述范例实施例中,主机系统是以计算机系统来作说明,然而,图3是根据本发明的另一范例实施例所显示的主机系统与内存储存装置的示意图。请参照图3,在另一范例实施例中,主机系统31也可以是数码相机、摄影机、通信装置、音频播放器、视频播放器或平板电脑等系统,而内存储存装置30可为其所使用的安全数字(Secure Digital,SD)卡32、小型快闪(Compact Flash,CF)卡33或嵌入式储存装置34等各式非易失性内存储存装置。嵌入式储存装置34包括嵌入式多媒体卡(embedded MMC,eMMC)341和/或嵌入式多芯片封装(embedded Multi Chip Package,eMCP)储存装置342等各类型将内存模块直接连接于主机系统的基板上的嵌入式储存装置。In an exemplary embodiment, reference to a host system is substantially any system that can cooperate with a memory storage device to store data. Although in the above exemplary embodiments, the host system is described as a computer system, however, FIG. 3 is a schematic diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention. Please refer to FIG. 3 , in another exemplary embodiment, the host system 31 may also be a system such as a digital camera, video camera, communication device, audio player, video player or tablet computer, and the memory storage device 30 may be used for it. Various non-volatile memory storage devices such as a secure digital (Secure Digital, SD) card 32 , a compact flash (Compact Flash, CF) card 33 or an embedded storage device 34 . The embedded storage device 34 includes various types such as an embedded multimedia card (embedded MMC, eMMC) 341 and/or an embedded multi-chip package (embedded Multi Chip Package, eMCP) storage device 342. The memory module is directly connected to the substrate of the host system. embedded storage device.
图4是根据本发明的一范例实施例所显示的内存储存装置的概要方框图。FIG. 4 is a schematic block diagram of a memory storage device according to an exemplary embodiment of the present invention.
请参照图4,内存储存装置10包括连接接口单元402、内存控制电路单元404与可复写式非易失性内存模块406。Referring to FIG. 4 , the memory storage device 10 includes a connection interface unit 402 , a memory control circuit unit 404 and a rewritable non-volatile memory module 406 .
在本范例实施例中,连接接口单元402是兼容于序列先进附件(Serial Advanced TechnologyAttachment,SATA)标准。然而,必须了解的是,本发明不限于此,连接接口单元402亦可以是符合并列先进附件(Parallel Advanced Technology Attachment,PATA)标准、电气和电子工程师协会(Institute of Electrical and Electronic Engineers,IEEE)1394标准、高速周边零件连接接口(Peripheral Component Interconnect Express,PCI Express)标准、通用串行总线(Universal SerialBus,USB)标准、SD接口标准、超高速一代(Ultra High Speed-I,UHS-I)接口标准、超高速二代(Ultra High Speed-II,UHS-II)接口标准、记忆棒(Memory Stick,MS)接口标准、多芯片封装(Multi-Chip Package)接口标准、多媒体储存卡(Multi Media Card,MMC)接口标准、eMMC接口标准、通用闪存(Universal Flash Storage,UFS)接口标准、eMCP接口标准、CF接口标准、整合式驱动电子接口(Integrated Device Electronics,IDE)标准或其他适合的标准。连接接口单元402可与内存控制电路单元404封装在一个芯片中,或者连接接口单元402是布设于一包含内存控制电路单元404的芯片外。In this exemplary embodiment, the connection interface unit 402 is compatible with the Serial Advanced Technology Attachment (SATA) standard. However, it must be understood that the present invention is not limited thereto, and the connection interface unit 402 may also be a device conforming to the Parallel Advanced Technology Attachment (PATA) standard, the Institute of Electrical and Electronic Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 Standard, Peripheral Component Interconnect Express (PCI Express) standard, Universal Serial Bus (Universal Serial Bus, USB) standard, SD interface standard, Ultra High Speed-I (UHS-I) interface standard , Ultra High Speed-II (UHS-II) interface standard, Memory Stick (Memory Stick, MS) interface standard, Multi-Chip Package (Multi-Chip Package) interface standard, Multi Media Card (Multi Media Card, MMC) interface standard, eMMC interface standard, Universal Flash Storage (UFS) interface standard, eMCP interface standard, CF interface standard, Integrated Device Electronics (IDE) standard or other suitable standards. The connection interface unit 402 can be packaged with the memory control circuit unit 404 in one chip, or the connection interface unit 402 can be arranged outside a chip including the memory control circuit unit 404 .
内存控制电路单元404用以执行以硬件型式或固件型式实作的多个逻辑门或控制指令并且根据主机系统11的指令在可复写式非易失性内存模块406中进行数据的写入、读取与抹除等运作。The memory control circuit unit 404 is used to execute a plurality of logic gates or control instructions implemented in hardware or firmware, and write and read data in the rewritable non-volatile memory module 406 according to the instructions of the host system 11. Fetch and erase operations.
可复写式非易失性内存模块406是连接至内存控制电路单元404并且用以储存主机系统11所写入的数据。可复写式非易失性内存模块406可以是单阶记忆胞(Single Level Cell,SLC)NAND型闪存模块(即,一个记忆胞中可储存1个位的闪存模块)、多阶记忆胞(Multi LevelCell,MLC)NAND型闪存模块(即,一个记忆胞中可储存2个位的闪存模块)、三阶记忆胞(TripleLevel Cell,TLC)NAND型闪存模块(即,一个记忆胞中可储存3个位的闪存模块)、其他闪存模块或其他具有相同特性的内存模块。The rewritable non-volatile memory module 406 is connected to the memory control circuit unit 404 and used for storing data written by the host system 11 . The rewritable non-volatile memory module 406 can be a single-level memory cell (Single Level Cell, SLC) NAND flash memory module (that is, a flash memory module that can store 1 bit in a memory cell), a multi-level memory cell (Multiple Level Cell) LevelCell, MLC) NAND flash memory module (that is, a flash memory module that can store 2 bits in a memory cell), and a triple-level memory cell (TripleLevel Cell, TLC) NAND flash memory module (that is, a memory cell that can store 3 bits) bit flash modules), other flash modules, or other memory modules with the same characteristics.
在本范例实施例中,可复写式非易失性内存模块406的记忆胞会构成多个实体程序化单元,并且此些实体程序化单元会构成多个实体抹除单元。具体来说,同一条字符在线的记忆胞会组成一或多个实体程序化单元。若每一个记忆胞可储存2个以上的位,则同一条字符在线的实体程序化单元至少可被分类为下实体程序化单元与上实体程序化单元。例如,一记忆胞的最低有效位(Least Significant Bit,LSB)是属于下实体程序化单元,并且一记忆胞的最高有效位(Most Significant Bit,MSB)是属于上实体程序化单元。一般来说,在MLC NAND型闪存中,下实体程序化单元的写入速度会大于上实体程序化单元的写入速度,和/或下实体程序化单元的可靠度是高于上实体程序化单元的可靠度。In this exemplary embodiment, the memory cells of the rewritable non-volatile memory module 406 constitute a plurality of physical programming units, and these physical programming units constitute a plurality of physical erasing units. Specifically, the memory cells on the same character line will form one or more physical programming units. If each memory cell can store more than 2 bits, the physical programming units on the same character line can be at least classified into lower physical programming units and upper physical programming units. For example, the Least Significant Bit (LSB) of a memory cell belongs to the lower physical programming unit, and the Most Significant Bit (MSB) of a memory cell belongs to the upper physical programming unit. Generally speaking, in MLC NAND flash memory, the writing speed of the lower physical programming unit is greater than that of the upper physical programming unit, and/or the reliability of the lower physical programming unit is higher than that of the upper physical programming unit. unit reliability.
在本范例实施例中,实体程序化单元为程序化的最小单元。即,实体程序化单元为写入数据的最小单元。例如,实体程序化单元为实体页面(page)或是实体扇(sector)。若实体程序化单元为实体页面,则此些实体程序化单元通常包括数据位区与冗余(redundancy)位区。数据位区包含多个实体扇,用以储存用户数据,而冗余位区用以储存系统数据(例如,错误更正码)。在本范例实施例中,数据位区包含32个实体扇,且一个实体扇的大小为512字节(byte,B)。然而,在其他范例实施例中,数据位区中也可包含8个、16个或数目更多或更少的实体扇,并且每一个实体扇的大小也可以是更大或更小。另一方面,实体抹除单元为抹除的最小单位。即,每一实体抹除单元含有最小数目之一并被抹除的记忆胞。例如,实体抹除单元为实体区块(block)。In this exemplary embodiment, the entity programming unit is the smallest unit of programming. That is, the entity programming unit is the smallest unit for writing data. For example, the entity programming unit is an entity page (page) or an entity sector (sector). If the physical programming units are physical pages, these physical programming units usually include a data bit field and a redundancy (redundancy) bit field. The data bit area includes a plurality of physical sectors for storing user data, and the redundant bit area is used for storing system data (eg, error correction code). In this exemplary embodiment, the data bit area includes 32 physical sectors, and the size of one physical sector is 512 bytes (byte, B). However, in other exemplary embodiments, the data bit area may also include 8, 16 or more or less physical sectors, and the size of each physical sector may also be larger or smaller. On the other hand, the entity erasing unit is the smallest unit of erasing. That is, each physical erase unit contains a minimum number of memory cells that are erased. For example, the physical erasing unit is a physical block.
在本范例实施例中,可复写式非易失性内存模块406中的每一个记忆胞是以电压(以下亦称为临界电压)的改变来储存一个或多个位。具体来说,每一个记忆胞的控制栅极(control gate)与通道之间有一个电荷捕捉层。通过施予一写入电压至控制栅极,可以改变电荷补捉层的电子量,进而改变记忆胞的临界电压。此改变临界电压的操作亦称为“把数据写入至记忆胞”或“程序化记忆胞”。随着临界电压的改变,可复写式非易失性内存模块406中的每一个记忆胞具有多个储存状态。通过施予读取电压可以判断一个记忆胞是属于哪一个储存状态,藉此取得此记忆胞所储存的一个或多个位。In this exemplary embodiment, each memory cell in the rewritable non-volatile memory module 406 stores one or more bits by changing a voltage (also referred to as a threshold voltage hereinafter). Specifically, there is a charge trapping layer between the control gate of each memory cell and the channel. By applying a writing voltage to the control gate, the electron quantity of the charge trapping layer can be changed, thereby changing the threshold voltage of the memory cell. The operation of changing the threshold voltage is also called "writing data into the memory cell" or "programming the memory cell". As the threshold voltage changes, each memory cell in the rewritable non-volatile memory module 406 has multiple storage states. Which storage state a memory cell belongs to can be determined by applying a read voltage, thereby obtaining one or more bits stored in the memory cell.
图5是根据本发明的一范例实施例所显示的内存控制电路单元的概要方框图。FIG. 5 is a schematic block diagram of a memory control circuit unit according to an exemplary embodiment of the present invention.
请参照图5,内存控制电路单元404包括内存管理电路502、主机接口504、内存接口506及错误检查与校正电路508。Referring to FIG. 5 , the memory control circuit unit 404 includes a memory management circuit 502 , a host interface 504 , a memory interface 506 and an error checking and correction circuit 508 .
内存管理电路502用以控制内存控制电路单元404的整体运作。具体来说,内存管理电路502具有多个控制指令,并且在内存储存装置10运作时,此些控制指令会被执行以进行数据的写入、读取与抹除等运作。以下说明内存管理电路502的操作时,等同于说明内存控制电路单元404的操作。The memory management circuit 502 is used to control the overall operation of the memory control circuit unit 404 . Specifically, the memory management circuit 502 has a plurality of control instructions, and when the memory storage device 10 is operating, these control instructions will be executed to perform operations such as writing, reading, and erasing data. When describing the operation of the memory management circuit 502 below, it is equivalent to describing the operation of the memory control circuit unit 404 .
在本范例实施例中,内存管理电路502的控制指令是以固件型式来实作。例如,内存管理电路502具有微处理器单元(未显示)与只读存储器(未显示),并且此些控制指令是被刻录至此只读存储器中。当内存储存装置10运作时,此些控制指令会由微处理器单元来执行以进行数据的写入、读取与抹除等运作。In this exemplary embodiment, the control commands of the memory management circuit 502 are implemented in the form of firmware. For example, the memory management circuit 502 has a microprocessor unit (not shown) and a ROM (not shown), and these control instructions are recorded into the ROM. When the memory storage device 10 is in operation, these control instructions will be executed by the microprocessor unit to perform operations such as writing, reading, and erasing data.
在另一范例实施例中,内存管理电路502的控制指令亦可以程序代码型式储存于可复写式非易失性内存模块406的特定区域(例如,内存模块中专用于存放系统数据的系统区)中。此外,内存管理电路502具有微处理器单元(未显示)、只读存储器(未显示)及随机存取内存(未显示)。特别是,此只读存储器具有开机码(boot code),并且当内存控制电路单元404被致能时,微处理器单元会先执行此开机码来将储存于可复写式非易失性内存模块406中的控制指令加载至内存管理电路502的随机存取内存中。之后,微处理器单元会运转此些控制指令以进行数据的写入、读取与抹除等运作。In another exemplary embodiment, the control instructions of the memory management circuit 502 can also be stored in a specific area of the rewritable non-volatile memory module 406 in the form of program code (for example, a system area in the memory module dedicated to storing system data) middle. In addition, the memory management circuit 502 has a microprocessor unit (not shown), a read only memory (not shown) and a random access memory (not shown). In particular, the ROM has a boot code (boot code), and when the memory control circuit unit 404 is enabled, the microprocessor unit will first execute the boot code to store in the rewritable non-volatile memory module The control instruction in 406 is loaded into the random access memory of the memory management circuit 502 . Afterwards, the microprocessor unit will execute these control instructions to perform operations such as writing, reading and erasing data.
此外,在另一范例实施例中,内存管理电路502的控制指令亦可以一硬件型式来实作。例如,内存管理电路502包括微控制器、记忆胞管理电路、内存写入电路、内存读取电路、内存抹除电路与数据处理电路。记忆胞管理电路、内存写入电路、内存读取电路、内存抹除电路与数据处理电路是连接至微控制器。记忆胞管理电路用以管理可复写式非易失性内存模块406的记忆胞或其群组。内存写入电路用以对可复写式非易失性内存模块406下达写入指令序列以将数据写入至可复写式非易失性内存模块406中。内存读取电路用以对可复写式非易失性内存模块406下达读取指令序列以从可复写式非易失性内存模块406中读取数据。内存抹除电路用以对可复写式非易失性内存模块406下达抹除指令序列以将数据从可复写式非易失性内存模块406中抹除。数据处理电路用以处理欲写入至可复写式非易失性内存模块406的数据以及从可复写式非易失性内存模块406中读取的数据。写入指令序列、读取指令序列及抹除指令序列可各别包括一或多个程序代码或脚本并且用以指示可复写式非易失性内存模块406执行相对应的写入、读取及抹除等操作。在一范例实施例中,内存管理电路502还可以下达其他类型的指令序列给可复写式非易失性内存模块406以指示执行相对应的操作。In addition, in another exemplary embodiment, the control instructions of the memory management circuit 502 can also be implemented in a hardware form. For example, the memory management circuit 502 includes a microcontroller, a memory cell management circuit, a memory writing circuit, a memory reading circuit, a memory erasing circuit and a data processing circuit. The memory cell management circuit, the memory writing circuit, the memory reading circuit, the memory erasing circuit and the data processing circuit are connected to the microcontroller. The memory cell management circuit is used for managing memory cells or groups thereof of the rewritable non-volatile memory module 406 . The memory writing circuit is used for issuing a write command sequence to the rewritable non-volatile memory module 406 to write data into the rewritable non-volatile memory module 406 . The memory reading circuit is used to issue a read command sequence to the rewritable non-volatile memory module 406 to read data from the rewritable non-volatile memory module 406 . The memory erasing circuit is used for issuing an erase command sequence to the rewritable non-volatile memory module 406 to erase data from the rewritable non-volatile memory module 406 . The data processing circuit is used for processing data to be written into the rewritable non-volatile memory module 406 and data read from the rewritable non-volatile memory module 406 . The write command sequence, the read command sequence and the erase command sequence may respectively include one or more program codes or scripts and are used to instruct the rewritable non-volatile memory module 406 to perform corresponding write, read and Erase etc. In an exemplary embodiment, the memory management circuit 502 may also issue other types of instruction sequences to the rewritable non-volatile memory module 406 to instruct to perform corresponding operations.
在本范例实施例中,内存管理电路502会配置多个逻辑单元以映像可复写式非易失性内存模块406中的实体抹除单元。其中一个逻辑单元可以是指一个逻辑地址、一个逻辑程序化单元、一个逻辑抹除单元或者由多个连续或不连续的逻辑地址组成。此外,一个逻辑单元可被映像至一个或多个实体抹除单元。In this exemplary embodiment, the memory management circuit 502 configures a plurality of logical units to map the physical erasing units in the rewritable non-volatile memory module 406 . One logical unit may refer to a logical address, a logical programming unit, a logical erasing unit, or consist of multiple continuous or discontinuous logical addresses. In addition, a logical unit can be mapped to one or more physical erased units.
在本范例实施例中,内存管理电路502会将逻辑单元与实体抹除单元之间的映像关系(亦称为逻辑-实体映像关系)记录于至少一逻辑-实体映像表。当主机系统11欲从内存储存装置10读取数据或写入数据至内存储存装置10时,内存管理电路502可根据此逻辑-实体映像表来执行对于内存储存装置10的数据存取。In this exemplary embodiment, the memory management circuit 502 records the mapping relationship (also referred to as the logical-physical mapping relationship) between the logical unit and the physical erasing unit in at least one logical-physical mapping table. When the host system 11 intends to read data from or write data to the memory storage device 10 , the memory management circuit 502 can perform data access to the memory storage device 10 according to the logical-physical mapping table.
主机接口504是连接至内存管理电路502并且用以接收与识别主机系统11所传送的指令与数据。也就是说,主机系统11所传送的指令与数据会通过主机接口504来传送至内存管理电路502。在本范例实施例中,主机接口504是兼容于SATA标准。然而,必须了解的是本发明不限于此,主机接口504亦可以是兼容于PATA标准、IEEE 1394标准、PCI Express标准、USB标准、SD标准、UHS-I标准、UHS-II标准、MS标准、MMC标准、eMMC标准、UFS标准、CF标准、IDE标准或其他适合的数据传输标准。The host interface 504 is connected to the memory management circuit 502 and is used for receiving and identifying commands and data transmitted by the host system 11 . That is to say, the commands and data transmitted by the host system 11 are transmitted to the memory management circuit 502 through the host interface 504 . In this exemplary embodiment, the host interface 504 is compatible with the SATA standard. However, it must be understood that the present invention is not limited thereto, and the host interface 504 may also be compatible with PATA standard, IEEE 1394 standard, PCI Express standard, USB standard, SD standard, UHS-I standard, UHS-II standard, MS standard, MMC standard, eMMC standard, UFS standard, CF standard, IDE standard or other suitable data transmission standards.
内存接口506是连接至内存管理电路502并且用以存取可复写式非易失性内存模块406。也就是说,欲写入至可复写式非易失性内存模块406的数据会经由内存接口506转换为可复写式非易失性内存模块406所能接受的格式。具体来说,若内存管理电路502要存取可复写式非易失性内存模块406,内存接口506会传送对应的指令序列。例如,这些指令序列可包括指示写入数据的写入指令序列、指示读取数据的读取指令序列、指示抹除数据的抹除指令序列、以及用以指示各种记忆体操作(例如,改变读取电压准位或执行垃圾回收操作等等)的指令序列。这些指令序列例如是由内存管理电路502产生并且通过内存接口506传送至可复写式非易失性内存模块406。这些指令序列可包括一个或多个信号,或是在总线上的数据。这些信号或数据可包括脚本或程序代码。例如,在读取指令序列中,会包括读取的辨识码、内存地址等信息。The memory interface 506 is connected to the memory management circuit 502 and used for accessing the rewritable non-volatile memory module 406 . That is to say, the data to be written into the rewritable non-volatile memory module 406 will be converted into a format acceptable to the rewritable non-volatile memory module 406 via the memory interface 506 . Specifically, if the memory management circuit 502 wants to access the rewritable non-volatile memory module 406, the memory interface 506 will transmit a corresponding command sequence. For example, these command sequences may include a write command sequence to write data, a read command sequence to read data, an erase command sequence to erase data, and to sequence of instructions to read voltage levels or perform garbage collection operations, etc.). These command sequences are, for example, generated by the memory management circuit 502 and transmitted to the rewritable non-volatile memory module 406 through the memory interface 506 . These instruction sequences may include one or more signals, or data on the bus. These signals or data may include script or program code. For example, in the read instruction sequence, information such as read identification code and memory address will be included.
错误检查与校正电路508是连接至内存管理电路502并且用以执行错误检查与校正操作以确保数据的正确性。具体来说,当内存管理电路502从主机系统11中接收到写入指令时,错误检查与校正电路508会为对应此写入指令的数据产生对应的错误更正码(error correctingcode,ECC)和/或错误检查码(error detecting code,EDC),并且内存管理电路502会将对应此写入指令的数据与对应的错误更正码和/或错误检查码写入至可复写式非易失性内存模块406中。之后,当内存管理电路502从可复写式非易失性内存模块406中读取数据时会同时读取此数据对应的错误更正码和/或错误检查码,并且错误检查与校正电路508会依据此错误更正码和/或错误检查码对所读取的数据执行错误检查与校正操作。The error checking and correction circuit 508 is connected to the memory management circuit 502 and configured to perform error checking and correction operations to ensure the correctness of data. Specifically, when the memory management circuit 502 receives a write command from the host system 11, the error checking and correction circuit 508 will generate a corresponding error correcting code (error correcting code, ECC) and/or or error checking code (error detecting code, EDC), and the memory management circuit 502 will write the data corresponding to the write command and the corresponding error correction code and/or error checking code into the rewritable non-volatile memory module 406 in. Afterwards, when the memory management circuit 502 reads data from the rewritable non-volatile memory module 406, the error correction code and/or error check code corresponding to the data will be read at the same time, and the error check and correction circuit 508 will be based on The error correcting code and/or error checking code performs error checking and correcting operations on the read data.
在一范例实施例中,内存控制电路单元404还包括缓冲存储器510与电源管理电路512。In an exemplary embodiment, the memory control circuit unit 404 further includes a buffer memory 510 and a power management circuit 512 .
缓冲存储器510是连接至内存管理电路502并且用以暂存来自于主机系统11的数据与指令或来自于可复写式非易失性内存模块406的数据。电源管理电路512是连接至内存管理电路502并且用以控制内存储存装置10的电源。The buffer memory 510 is connected to the memory management circuit 502 and used for temporarily storing data and instructions from the host system 11 or data from the rewritable non-volatile memory module 406 . The power management circuit 512 is connected to the memory management circuit 502 and used for controlling the power of the memory storage device 10 .
在本范例实施例中,错误检查与校正电路508支持低密度奇偶检查(low-densityparity-check,LDPC)码。例如,错误检查与校正电路508可利用低密度奇偶检查码来编码与译码。在低密度奇偶检查码中,是用一个检查矩阵(亦称为奇偶检查矩阵)来定义有效的码字。以下将奇偶检查矩阵标记为矩阵H,并且一码字标记为V。依照以下方程式(1),若奇偶检查矩阵H与码字V的相乘是零向量,表示码字V为有效的码字。其中运算符表示模2(mod 2)的矩阵相乘。换言之,矩阵H的零空间(null space)便包含了所有的有效码字(valid codeword)。然而,本发明并不限制码字V的内容。例如,码字V也可以包括用任意算法所产生的错误更正码或是错误检查码。In this exemplary embodiment, the ECC circuit 508 supports low-density parity-check (LDPC) codes. For example, the error checking and correcting circuit 508 may utilize low density parity check codes for encoding and decoding. In low-density parity-check codes, a check matrix (also known as a parity check matrix) is used to define effective codewords. The parity check matrix is denoted matrix H and a codeword V below. According to the following equation (1), if the multiplication of the parity check matrix H and the codeword V is a zero vector, it means that the codeword V is a valid codeword. where operator Represents matrix multiplication modulo 2. In other words, the null space of the matrix H includes all valid codewords. However, the present invention does not limit the content of the codeword V. For example, the codeword V may also include error-correcting codes or error-checking codes generated by arbitrary algorithms.
其中矩阵H的维度是k-乘-n(k-by-n),码字V的维度是1-乘-n。k与n为正整数。码字V中包括了信息位与奇偶位,即码字V可以表示成[U P],其中向量U是由信息位所组成,而向量P是由奇偶位所组成。向量U的维度是1-乘-(n-k),而向量P的维度是1-乘-k。在一个码字中,奇偶位即是用来保护信息位并且可视为是对应于信息位产生的错误更正码或错误检查码。其中,保护信息位例如是指维持信息位的正确性。例如,当从可复写式非易失性内存模块406中读取一笔数据时,此数据中的奇偶位即可用来更正相应的数据中可能存在的错误。The dimension of the matrix H is k-by-n (k-by-n), and the dimension of the codeword V is 1-by-n. k and n are positive integers. The codeword V includes information bits and parity bits, that is, the codeword V can be expressed as [UP], where the vector U is composed of information bits, and the vector P is composed of parity bits. The dimensions of the vector U are 1-by-(n-k), and the dimensions of the vector P are 1-by-k. In a codeword, the parity bits are used to protect the information bits and can be considered as error correction codes or error check codes generated corresponding to the information bits. Wherein, protecting the information bit refers to maintaining the correctness of the information bit, for example. For example, when a piece of data is read from the rewritable non-volatile memory module 406, the parity bit in the data can be used to correct possible errors in the corresponding data.
在一范例实施例中,一个码字中的信息位与奇偶位统称为数据位。例如,码字V中具有n个数据位,其中信息位的长度为(n-k)位,并且奇偶位的长度是k位。因此,码字V的码率(coderate)为(n-k)/n。In an exemplary embodiment, information bits and parity bits in a codeword are collectively referred to as data bits. For example, there are n data bits in the code word V, wherein the length of the information bit is (n-k) bits, and the length of the parity bit is k bits. Therefore, the code rate (coderate) of the codeword V is (n-k)/n.
一般来说,在编码时会使用一个产生矩阵(以下标记为G),使得对于任意的向量U都可满足以下方程式(2)。其中产生矩阵G的维度是(n-k)-乘-n。Generally, a generator matrix (marked as G below) is used during encoding, so that the following equation (2) can be satisfied for any vector U. The dimension of the generated matrix G is (n-k)-times-n.
由方程式(2)所产生的码字V为有效的码字。因此可将方程式(2)代入方程式(1),藉此得到以下方程式(3)。The codeword V generated by equation (2) is an effective codeword. Equation (2) can therefore be substituted into equation (1), thereby obtaining the following equation (3).
由于向量U可以是任意的向量,因此以下方程式(4)必定会满足。也就是说,在决定奇偶检查矩阵H以后,对应的产生矩阵G也可被决定。Since the vector U can be any vector, the following equation (4) must be satisfied. That is to say, after the parity check matrix H is determined, the corresponding generation matrix G can also be determined.
在译码一个码字V时,会先对码字V中的数据位执行一个奇偶检查操作,例如将奇偶检查矩阵H与码字V相乘以产生一个向量(以下标记为S,如以下方程式(5)所示)。若向量S是零向量(即,向量S中的每一个元素都是零),则表示译码成功并且可直接输出码字V。若向量S不是零向量(即,向量S中的至少一个元素是零),则表示码字V中存在至少一个错误并且码字V不是有效的码字。When decoding a codeword V, a parity check operation is first performed on the data bits in the codeword V, for example, the parity check matrix H is multiplied by the codeword V to generate a vector (marked as S below, as in the following equation (5) shown). If the vector S is a zero vector (that is, each element in the vector S is zero), it means that the decoding is successful and the codeword V can be output directly. If vector S is not a zero vector (ie, at least one element in vector S is zero), it means that there is at least one error in codeword V and codeword V is not a valid codeword.
向量S的维度是k-乘-1。向量S中的每一个元素亦称为校验子(syndrome)。若码字V不是有效的码字,则错误检查与校正电路508会执行一个译码操作,以尝试更正码字V中的错误。The dimension of the vector S is k-by-1. Each element in the vector S is also called a syndrome. If the codeword V is not a valid codeword, the ECC circuit 508 performs a decoding operation in an attempt to correct the errors in the codeword V.
图6是根据本发明的一范例实施例所显示的奇偶检查矩阵的示意图。FIG. 6 is a schematic diagram of a parity check matrix displayed according to an exemplary embodiment of the present invention.
请参照图6,奇偶检查矩阵600的维度是k-乘-n。例如,k为8,并且n为9。然而,本发明并不限制正整数k与n为多少。奇偶检查矩阵600的每一列(row)亦代表了一限制(constraint)。以奇偶检查矩阵600的第一列为例,若某一个码字是有效码字,则将此码字中第3个、第5个、第8个与第9个位做模2(modulo-2)的加法之后,会得到位“0”。在此领域普通技术人员应能理解如何用奇偶检查矩阵600来编码,在此便不再赘述。此外,奇偶检查矩阵600仅为一个范例矩阵,而非用以限制本发明。Referring to FIG. 6, the dimension of the parity check matrix 600 is k-by-n. For example, k is 8 and n is 9. However, the present invention does not limit the positive integers k and n. Each row of the parity check matrix 600 also represents a constraint. Taking the first column of the parity check matrix 600 as an example, if a certain codeword is an effective codeword, then the 3rd, 5th, 8th and 9th bits in the codeword are modulo 2 (modulo- After the addition of 2), the bit "0" is obtained. Those of ordinary skill in the art should be able to understand how to use the parity check matrix 600 for encoding, so details will not be repeated here. In addition, the parity check matrix 600 is just an example matrix and is not intended to limit the present invention.
当内存管理电路502要将多个位储存至可复写式非易失性内存模块406时,错误检查与校正电路508会对每(n-k)个欲被储存的位(即,信息位)都产生对应的k个奇偶位。接下来,内存管理电路502会把这n个位(即,数据位)作为一个码字写入至可复写式非易失性内存模块406。When the memory management circuit 502 is to store multiple bits into the rewritable non-volatile memory module 406, the error checking and correction circuit 508 generates Corresponding k parity bits. Next, the memory management circuit 502 writes the n bits (ie, data bits) into the rewritable non-volatile memory module 406 as a code word.
图7是根据本发明的一范例实施例所显示的记忆胞的临界电压分布的示意图。FIG. 7 is a schematic diagram showing the threshold voltage distribution of a memory cell according to an exemplary embodiment of the present invention.
请参照图7,横轴代表记忆胞的临界电压,而纵轴代表记忆胞个数。例如,图7是表示一个实体程序化单元中各个记忆胞的临界电压。假设状态710对应于位“1”(以下亦称为第一位值)并且状态720对应于位“0”(以下亦称为第二位值),当某一个记忆胞的临界电压属于状态710时,此记忆胞所储存的是位“1”;相反地,若某一个记忆胞的临界电压属于状态720时,此记忆胞所储存的是位“0”。值得一提的是,在本范例实施例中,临界电压分布中的一个状态对应至一个位值,并且记忆胞的临界电压分布有两种可能的状态。然而,在其他范例实施例中,临界电压分布中的每一个状态也可以对应至多个位值并且记忆胞的临界电压的分布也可能有四种、八种或其他任意个状态。此外,本发明也不限制每一个状态所代表的位。例如,在图7的另一范例实施例中,状态710也可以对应于位“0”,而状态720则对应于位“1”。Please refer to FIG. 7 , the horizontal axis represents the threshold voltage of the memory cell, and the vertical axis represents the number of memory cells. For example, FIG. 7 shows the threshold voltage of each memory cell in a physical programming unit. Assuming that state 710 corresponds to bit "1" (hereinafter also referred to as the first bit value) and state 720 corresponds to bit "0" (hereinafter also referred to as the second bit value), when the threshold voltage of a certain memory cell belongs to state 710 , the memory cell stores a bit “1”; on the contrary, if the threshold voltage of a certain memory cell belongs to the state 720, the memory cell stores a bit “0”. It should be noted that, in this exemplary embodiment, a state in the threshold voltage distribution corresponds to a bit value, and the threshold voltage distribution of the memory cell has two possible states. However, in other exemplary embodiments, each state in the threshold voltage distribution may also correspond to a plurality of bit values and the distribution of the threshold voltages of the memory cells may also have four, eight or any other states. In addition, the present invention does not limit the bits represented by each state. For example, in another exemplary embodiment of FIG. 7, state 710 may also correspond to bit "0", while state 720 may correspond to bit "1".
在本范例实施例中,当要从可复写式非易失性内存模块406读取数据时,内存管理电路202会发送一读取指令序列至可复写式非易失性内存模块106。此读取指令序列用以指示可复写式非易失性内存模块406读取一个实体程序化单元中的多个记忆胞(以下亦称为第一记忆胞)以获得储存于第一记忆胞中的数据。例如,根据此读取指令序列,可复写式非易失性内存模块406可使用图7中的读取电压701来读取第一记忆胞。若第一记忆胞中的某一个的临界电压小于读取电压701,则此记忆胞会被导通,并且内存管理电路502会读到位“1”。相反地,若第一记忆胞中的某一个的临界电压大于读取电压701,则此记忆胞不会被导通,并且内存管理电路502会读到位“0”。此外,在另一范例实施例中,一次的读取操作也可以是读取多个实体程序化单元中的记忆胞或一个实体程序化单元中的部分记忆胞,本发明不加以限制。In this exemplary embodiment, when data is to be read from the rewritable nonvolatile memory module 406 , the memory management circuit 202 sends a read command sequence to the rewritable nonvolatile memory module 106 . The read instruction sequence is used to instruct the rewritable non-volatile memory module 406 to read multiple memory cells (hereinafter also referred to as first memory cells) in a physical programming unit to obtain data stored in the first memory cell The data. For example, according to the read command sequence, the rewritable non-volatile memory module 406 can use the read voltage 701 in FIG. 7 to read the first memory cell. If the threshold voltage of one of the first memory cells is lower than the read voltage 701 , the memory cell will be turned on, and the memory management circuit 502 will read a bit “1”. Conversely, if the threshold voltage of one of the first memory cells is greater than the read voltage 701 , the memory cell will not be turned on, and the memory management circuit 502 will read a bit “0”. In addition, in another exemplary embodiment, a read operation may also be to read memory cells in multiple physical programming units or a part of memory cells in one physical programming unit, which is not limited by the present invention.
在本范例实施例中,状态710与状态720之间包含一个重叠区域730。重叠区域730的面积正相关于第一记忆胞中临界电压落于重叠区域730内的记忆胞的总数。重叠区域730表示在第一记忆胞中有一些记忆胞所储存的应该是位“1”(属于状态710),但其临界电压大于所施加的读取电压701;或者,在第一记忆胞中有一些记忆胞所储存的应该是位“0”(属于状态720),但其临界电压小于所施加的读取电压701。换言之,经由施加读取电压701所读取的数据中,有部分的位会有错误。In this exemplary embodiment, an overlapping region 730 is included between the state 710 and the state 720 . The area of the overlapping region 730 is directly related to the total number of memory cells whose threshold voltage falls within the overlapping region 730 in the first memory cell. Overlap region 730 indicates that there are some memory cells in the first memory cell that should store a bit "1" (belonging to state 710), but whose threshold voltage is greater than the applied read voltage 701; or, in the first memory cell There are some memory cells that should store bit "0" (of state 720 ), but whose threshold voltage is less than the applied read voltage 701 . In other words, in the data read by applying the read voltage 701 , some bits have errors.
一般来说,若第一记忆胞的使用时间很短(例如,数据在第一记忆胞中存放时间不长)和/或第一记忆胞的使用频率很低(例如,第一记忆胞的读取计数、写入计数和/或抹除计数不高),重叠区域730的面积通常很小,甚至可能不存在重叠区域730(即,状态710与720不重叠)。或者,若内存储存装置10才刚出厂,则重叠区域730通常不存在。若重叠区域730的面积很小,经由施加读取电压701而从第一记忆胞读取到的数据中的错误位往往较少。Generally speaking, if the usage time of the first memory cell is very short (for example, the data stored in the first memory cell is not long) and/or the usage frequency of the first memory cell is very low (for example, the read Fetch count, write count, and/or erase count are not high), the area of the overlap region 730 is usually small, and the overlap region 730 may not even exist (ie, states 710 and 720 do not overlap). Or, if the memory storage device 10 has just been shipped from the factory, the overlapping area 730 usually does not exist. If the area of the overlapping region 730 is small, the error bits in the data read from the first memory cell by applying the read voltage 701 tend to be less.
然而,随着可复写式非易失性内存模块406(或第一记忆胞)的使用时间和/或使用频率增加,重叠区域730的面积也会逐渐加大。例如,若第一记忆胞的使用时间很长(例如,数据在第一记忆胞中存放时间很长)和/或第一记忆胞的使用频率很高(例如,第一记忆胞的读取计数、写入计数和/或抹除计数很高),则重叠区域730的面积会变大(例如,状态710与状态720会变更平坦和/或状态710与状态720彼此更靠近)。若重叠区域730的面积很大,则经由施加读取电压701而从第一记忆胞读取到的数据中的错误位往往较多。换言之,重叠区域730的面积会正相关于从第一记忆胞读取出来的数据中错误位的发生机率(以下亦称为错误位发生率)。However, as the use time and/or the use frequency of the rewritable non-volatile memory module 406 (or the first memory cell) increases, the area of the overlapping region 730 will gradually increase. For example, if the first memory cell is used for a long time (e.g., data is stored in the first memory cell for a long time) and/or the first memory cell is used frequently (e.g., the read count of the first memory cell , write count and/or erase count are high), the area of overlapping region 730 becomes larger (eg, state 710 and state 720 become flatter and/or state 710 and state 720 are closer to each other). If the area of the overlapping region 730 is large, the data read from the first memory cell by applying the read voltage 701 tends to have more error bits. In other words, the area of the overlapping region 730 is positively related to the occurrence probability of bit errors in the data read from the first memory cell (hereinafter also referred to as the bit error occurrence rate).
在本范例实施例中,在从可复写式非易失性内存模块406接收所读取的数据之后,错误检查与校正电路508会执行一奇偶检查操作以验证此数据中是否存在错误。若判定数据中存在错误,则错误检查与校正电路508会执行译码操作来尝试更正数据中的错误。In this exemplary embodiment, after receiving the read data from the rewritable non-volatile memory module 406, the ECC circuit 508 performs a parity check operation to verify whether there is an error in the data. If it is determined that there is an error in the data, the ECC circuit 508 performs a decoding operation to try to correct the error in the data.
在本范例实施例中,错误检查与校正电路508是执行叠代(iteration)译码操作。一个叠代译码操作是用来译码来自于可复写式非易失性内存模块406的一笔数据。例如,数据中的一个译码单位为一个码字。在一个叠代译码操作中,用于检查数据的正确性的奇偶检查操作与用于更正数据中的错误的译码操作会重复执行,直到成功的译码或叠代次数到达一预定次数为止。若叠代次数到达此预定次数,表示译码失败,并且错误检查与校正电路508会停止译码。此外,若经由奇偶检查操作判定某一数据中不存在错误,则错误检查与校正电路508会输出此数据。In this exemplary embodiment, the ECC circuit 508 performs an iteration decoding operation. An iterative decoding operation is used to decode a piece of data from the rewritable non-volatile memory module 406 . For example, one decoding unit in data is one codeword. In an iterative decoding operation, the parity check operation for checking the correctness of the data and the decoding operation for correcting errors in the data are repeatedly performed until successful decoding or the number of iterations reaches a predetermined number of times . If the number of iterations reaches the predetermined number, it means that the decoding fails, and the error checking and correction circuit 508 stops decoding. In addition, if it is determined that there is no error in a certain data through the parity check operation, the ECC circuit 508 will output the data.
图8是根据本发明的一范例实施例所显示的奇偶检查操作的示意图。FIG. 8 is a schematic diagram showing a parity check operation according to an exemplary embodiment of the present invention.
请参照图8,假设从第一记忆胞中读取的数据报含码字801,则在奇偶检查操作中,根据方程式(5),奇偶检查矩阵800会与码字801相乘并且获得校验向量802(即,向量S)。其中,码字801中的每一个位是对应到校验向量802中的至少一个元素(即,校验子)。举例来说,码字801中的位V0(对应至奇偶检查矩阵800中的第一行)是对应到校验子S1、校验子S4及校验子S7;位V1(对应至奇偶检查矩阵800中的第二行)是对应到校验子S2、校验子S3及校验子S6,以此类推。若位V0是错误位,则校验子S1、校验子S4及校验子S7的至少其中之一可能会是“1”。若位V1是错误位,则校验子S2、校验子S3及校验子S6的至少其中之一可能会是“1”,以此类推。Please refer to FIG. 8, assuming that the datagram read from the first memory cell contains a codeword 801, then in the parity check operation, according to equation (5), the parity check matrix 800 will be multiplied by the codeword 801 and obtain the check Vector 802 (ie, vector S). Wherein, each bit in the codeword 801 corresponds to at least one element (ie, a syndrome) in the check vector 802 . For example, bit V 0 in codeword 801 (corresponding to the first row in parity check matrix 800) is corresponding to syndrome S 1 , syndrome S 4 and syndrome S 7 ; bit V 1 ( Corresponding to the second row in the parity check matrix 800 ) is corresponding to syndrome S 2 , syndrome S 3 and syndrome S 6 , and so on. If the bit V 0 is an error bit, at least one of the syndrome S 1 , the syndrome S 4 and the syndrome S 7 may be “1”. If the bit V 1 is an error bit, at least one of the syndrome S 2 , syndrome S 3 and syndrome S 6 may be “1”, and so on.
换言之,若校验子S0~S7皆是“0”,表示码字801中可能没有错误位,因此错误检查与校正电路508可直接输出码字801。然而,若码字801中具有至少一个错误位,则校验子S0~S7的至少其中之一可能会是“1”,并且错误检查与校正电路508会对码字801执行一个译码操作。In other words, if the syndromes S 0 -S 7 are all “0”, it means that there may be no error bits in the codeword 801 , so the error checking and correction circuit 508 can directly output the codeword 801 . However, if there is at least one erroneous bit in the codeword 801, at least one of the syndromes S 0 -S 7 may be “1”, and the ECC circuit 508 performs a decoding on the codeword 801 operate.
在本范例实施例中,错误检查与校正电路508支持一种或多种译码算法。例如,错误检查与校正电路508可支持位翻转(Bit-Flipping)算法、最小-总合(Min-Sum)算法及总和-乘积(Sum-Product)算法等译码算法的至少其中之一,且可采用的译码算法的类型不限于上述。在判定数据中存在错误之后,错误检查与校正电路508会基于一种译码算法来执行一个译码操作。此外,连续执行的两个译码操作可以是基于相同或不同的译码算法而执行。In the exemplary embodiment, the ECC circuit 508 supports one or more decoding algorithms. For example, the error checking and correcting circuit 508 may support at least one of decoding algorithms such as Bit-Flipping algorithm, Min-Sum algorithm and Sum-Product algorithm, and The types of decoding algorithms that can be employed are not limited to the above. After determining that there are errors in the data, the ECC circuit 508 performs a decoding operation based on a decoding algorithm. In addition, the two consecutive decoding operations may be performed based on the same or different decoding algorithms.
在本范例实施例中,在对某一数据执行一译码操作之前,内存管理电路502会评估此数据的错误位发生率。其中,若所评估的错误位发生率越高,表示此数据中包含错误位的机率越高和/或此数据中错误位的总数也可能越多。根据所评估的错误位发生率,错误检查与校正电路508会使用一个译码参数来对此数据执行译码操作。其中,此译码参数用于调整错误检查与校正电路508在此译码操作中定位错误位的严谨度(strict level)。In this exemplary embodiment, before performing a decoding operation on a certain data, the memory management circuit 502 evaluates the bit error rate of the data. Wherein, if the estimated occurrence rate of error bits is higher, it means that the probability of including error bits in the data is higher and/or the total number of error bits in the data may also be larger. According to the estimated erroneous bit occurrence rate, the ECC circuit 508 uses a decoding parameter to perform a decoding operation on the data. Wherein, the decoding parameter is used to adjust the strict level of error detection and correction circuit 508 in locating error bits in the decoding operation.
在本范例实施例中,所述严谨度与错误位的判定标准有关。例如,若基于较高的严谨度来定位错误位,错误检查与校正电路508对于数据中错误位的判定标准较为严格,从而数据中任一位被误判为错误位的机率可被降低。但是相应地,在一个译码操作中被更正的错误位的数目也可能减少,从而错误检查与校正电路508可能需要执行更多的译码操作才能更正数据中的所有错误。换言之,若基于较高的严谨度来定位错误位,需要执行的译码操作可能增加,但好处是可减少将数据中的部分位误判为错误位的机率。在某些情况下(例如,所评估的数据的错误位发生率较高时),在译码操作中基于较高的严谨度来定位错误位可提高数据的译码效率。In this exemplary embodiment, the strictness is related to the judgment standard of the error bit. For example, if the erroneous bits are located based on a higher degree of precision, the error checking and correction circuit 508 has stricter criteria for determining the erroneous bits in the data, so that the probability of any bit in the data being misjudged as an erroneous bit can be reduced. Correspondingly, however, the number of erroneous bits to be corrected in one decoding operation may also be reduced, so that the ECC circuit 508 may need to perform more decoding operations to correct all errors in the data. In other words, if the erroneous bits are located based on higher precision, the decoding operations to be performed may increase, but the advantage is that the probability of misjudging some bits in the data as erroneous bits can be reduced. In some cases (eg, when the estimated data has a high occurrence rate of erroneous bits), locating erroneous bits based on a higher degree of rigor in the decoding operation can improve the decoding efficiency of the data.
另一方面,若基于较低的严谨度来定位错误位,错误检查与校正电路508对于数据中错误位的判定标准较为宽松,从而在一个译码操作中被识别为错误位并且被更正的位的总数可能较多。但是相应地,错误位的误判率也可能提高,从而错误检查与校正电路508可能会在多个连续执行的译码操作中重复改变数据中同一个位的位值。换言之,若基于较低的严谨度来定位错误位,数据中的部分位在不同译码操作中可能会被重复更正,但好处是可以在同一个译码操作中更正更多错误。在某些情况下(例如,所评估的数据的错误位发生率较低时),在译码操作中基于较低的严谨度来定位错误位可提高数据的译码效率。On the other hand, if the erroneous bits are located based on a lower degree of rigor, the error checking and correction circuit 508 has a looser criterion for judging the erroneous bits in the data, so that the bits that are identified as erroneous bits and corrected in one decoding operation The total number may be higher. Correspondingly, however, the misjudgment rate of erroneous bits may also increase, so that the error checking and correction circuit 508 may repeatedly change the bit value of the same bit in the data in multiple consecutive decoding operations. In other words, if erroneous bits are located based on a lower degree of rigor, some bits in the data may be repeatedly corrected in different decoding operations, but the advantage is that more errors can be corrected in the same decoding operation. In some cases (eg, when the estimated data has a low incidence of error bits), locating error bits based on a lower degree of rigor in the decoding operation can improve the decoding efficiency of the data.
一般来说,若待译码的数据中的错误位较多(例如,错误位的总数超过一预置值),每一个译码操作的译码成功率有限,并且数据中每一个位在一译码操作中是否被正确地的更正都有关于对于此数据的译码是否成功、对于此数据执行译码操作的次数和/或完成译码所需的时间。因此,在本范例实施例中,若所评估之数据的错误位发生率较高,错误检查与校正电路508会使用对应于较高的严谨度的译码参数来对此数据执行译码操作。Generally speaking, if there are many erroneous bits in the data to be decoded (for example, the total number of erroneous bits exceeds a preset value), the decoding success rate of each decoding operation is limited, and each bit in the data is within a Whether the decoding operation is correctly corrected depends on whether the decoding of the data was successful, the number of times the decoding operation was performed on the data, and/or the time required to complete the decoding. Therefore, in this exemplary embodiment, if the bit error occurrence rate of the evaluated data is relatively high, the error checking and correcting circuit 508 performs a decoding operation on the data using decoding parameters corresponding to a higher degree of precision.
另一方面,若待译码的数据中的错误位较少(例如,错误位的总数少于一预置值),每一个译码操作都具有较高的译码成功率,并且任一译码操作都有可能更正数据中全部或大部分的错误位。因此,在本范例实施例中,若所评估的数据的错误位发生率较低,错误检查与校正电路508会使用对应于较低的严谨度的译码参数来对此数据执行译码操作。换言之,在对于某一数据执行的译码操作中定位错误位的严谨度会正相关于对于此数据所评估的错误位发生率。藉此,无论待译码的数据中的错误位是多还是少,都有较高的机率来加速错误位的收敛(convergence)并且提高译码效率。On the other hand, if there are fewer error bits in the data to be decoded (for example, the total number of error bits is less than a preset value), each decoding operation has a higher decoding success rate, and any decoding Any code operation has the potential to correct all or most of the erroneous bits in the data. Therefore, in this exemplary embodiment, if the bit error occurrence rate of the evaluated data is low, the error checking and correction circuit 508 performs a decoding operation on the data using decoding parameters corresponding to a lower degree of precision. In other words, the degree of precision with which erroneous bits are located in a decoding operation performed on certain data is positively correlated with the estimated occurrence rate of erroneous bits for this data. Thereby, no matter whether there are many or few error bits in the data to be decoded, there is a higher probability to speed up the convergence of the error bits and improve the decoding efficiency.
在本范例实施例中,错误检查与校正电路508预置是根据位翻转算法来执行叠代译码操作。在此叠代译码操作中,每一个译码操作都会尝试更正(以下亦称为翻转)数据中的至少一个位。例如,错误检查与校正电路508是基于一个翻转门槛值来识别数据中需要翻转的位(即错误位)。也就是说,在本范例实施例中,错误检查与校正电路508所使用的译码参数是指对应于位翻转算法的翻转门槛值。In this exemplary embodiment, the ECC circuit 508 is preset to perform the iterative decoding operation according to the bit flipping algorithm. In this iterative decoding operation, each decoding operation attempts to correct (hereinafter also referred to as flipping) at least one bit in the data. For example, the error checking and correcting circuit 508 identifies bits in the data that need to be flipped (ie, erroneous bits) based on a flipping threshold. That is to say, in this exemplary embodiment, the decoding parameter used by the ECC circuit 508 refers to an inversion threshold corresponding to the bit inversion algorithm.
请参照图8,在一个译码操作中,错误检查与校正电路508会根据奇偶检查矩阵800与校验向量802来计算码字801中每一个位的校验权重。例如,错误检查与校正电路508会将对应至码字801中同一个位的校验子相加以取得此位的校验权重。如图8所示,位V0的校验权重等于校验子S1、校验子S4及校验子S7的相加;位V1的校验权重等于校验子S2、校验子S3及校验子S6的相加,以此类推。值得注意的是,在此对校验子S0~S7所做的加法是一般的加法,而不是模2的加法。例如,错误检查与校正电路208可以通过以下方程式(6)来取得码字801中每一个位的校验权重。其中,向量f中的每一个元素即可用来表示码字中每一个位的校验权重。Referring to FIG. 8 , in a decoding operation, the ECC circuit 508 calculates the check weight of each bit in the codeword 801 according to the parity check matrix 800 and the check vector 802 . For example, the ECC circuit 508 will add the syndromes corresponding to the same bit in the codeword 801 to obtain the check weight of the bit. As shown in Figure 8, the verification weight of bit V 0 is equal to the addition of syndrome S 1 , syndrome S 4 and syndrome S 7 ; the verification weight of bit V 1 is equal to syndrome S 2 , syndrome S 2 The addition of syndrome S 3 and syndrome S 6 , and so on. It should be noted that the addition to the syndromes S 0 -S 7 here is a general addition, not a modulo 2 addition. For example, the error checking and correcting circuit 208 can obtain the check weight of each bit in the codeword 801 through the following equation (6). Wherein, each element in the vector f can be used to represent the verification weight of each bit in the codeword.
f=ST×H…(6)f=S T ×H...(6)
在选定一个译码参数(即翻转门槛值)之后,错误检查与校正电路508会更正码字801中校验权重大于此译码参数的全部或至少一部分位。例如,若此译码参数是“1”且码字801中位V1、位V3及位V5的校验权重皆大于“1”,错误检查与校正电路508会在此次的译码操作中同步翻转这3个位位V1、位V3及位V5。其中,翻转某一个位是指将此位的位值从“1”翻转为“0”,或者从“0”翻转为“1”。或者,若此译码参数是“2”且码字801中只有位V3与位V5的校验权重大于“2”,错误检查与校正电路508在此次的译码操作中翻转这2个位位V3与位V5。例如,将位V3与位V5的值分别从“1”翻转为“0”,或者从“0”翻转为“1”。After selecting a decoding parameter (ie, the inversion threshold), the ECC circuit 508 corrects all or at least a part of the bits in the codeword 801 whose check weight is greater than the decoding parameter. For example, if the decoding parameter is “1” and the check weights of bit V 1 , bit V 3 and bit V 5 in the codeword 801 are all greater than “1”, the error checking and correction circuit 508 will During the operation, the three bits V 1 , V 3 and V 5 are flipped synchronously. Wherein, flipping a certain bit refers to flipping the bit value of this bit from "1" to "0", or from "0" to "1". Alternatively, if the decoding parameter is "2" and only the check weights of bit V3 and bit V5 in the codeword 801 are greater than "2", the error checking and correction circuit 508 reverses the 2 in this decoding operation. Ones bit V 3 and bit V 5 . For example, the values of bit V3 and bit V5 are respectively flipped from "1" to "0", or from "0" to "1".
在本范例实施例中,某一个译码操作所使用的译码参数(例如,翻转门槛值)会正相关于在此译码操作中用于定位错误位的严谨度。从另一角度来看,某一个译码操作所使用的译码参数(例如,翻转门槛值)会正相关于所评估的错误位发生率。若所评估的错误位发生率较高,在接续执行的译码操作中就会使用较大的译码参数。例如,在图8的一范例实施例中,若所评估的错误位发生率较高(例如,高于一预置标准),错误检查与校正电路508会暂时使用“2”作为翻转门槛值。反之,若所评估的错误位发生率较低,在接续执行的译码操作中就会使用较小的译码参数。例如,在图8的一范例实施例中,若所评估的错误位发生率较低(例如,低于一预置标准),错误检查与校正电路508会暂时使用“1”作为翻转门槛值。藉此,在一范例实施例中,若所评估的错误位发生率较高,在同一个译码操作中被翻转的位的总数可能较少;若所评估的错误位发生率较低,在同一个译码操作中被翻转的位的总数可能较多。但是,实际上在每一个译码操作中翻转的位的总数亦可能随着第一记忆胞的信道状态而增加或减少,本发明不加以限制。In this exemplary embodiment, the decoding parameter (for example, the flipping threshold) used in a certain decoding operation is positively related to the degree of precision used to locate error bits in the decoding operation. From another point of view, the decoding parameter (for example, the flipping threshold) used in a certain decoding operation is positively related to the estimated bit error rate. If the estimated erroneous bit occurrence rate is higher, a larger decoding parameter will be used in subsequent decoding operations. For example, in an exemplary embodiment of FIG. 8, if the estimated error bit occurrence rate is high (eg, higher than a preset standard), the error checking and correction circuit 508 temporarily uses "2" as the toggle threshold. Conversely, if the estimated bit error rate is low, smaller decoding parameters will be used in subsequent decoding operations. For example, in an exemplary embodiment of FIG. 8 , if the estimated error bit occurrence rate is low (eg, lower than a preset standard), the error checking and correction circuit 508 temporarily uses "1" as the toggle threshold. Thus, in an exemplary embodiment, if the estimated error bit occurrence rate is high, the total number of flipped bits in the same decoding operation may be less; if the estimated error bit occurrence rate is low, the The total number of flipped bits in the same decoding operation may be larger. However, in fact, the total number of flipped bits in each decoding operation may also increase or decrease with the channel state of the first memory cell, which is not limited by the present invention.
在一范例实施例中,若第一记忆胞(或包含第一记忆胞的实体程序化单元或实体抹除单元)的信道状态越好,对于从第一记忆胞中读取的数据所评估的错误位发生率会越低。反之,若第一记忆胞(或包含第一记忆胞的实体程序化单元或实体抹除单元)的信道状态越差,对于从第一记忆胞中读取的数据所评估的错误位发生率会越高。In an exemplary embodiment, if the channel state of the first memory cell (or the physical programming unit or the physical erasing unit including the first memory cell) is better, the estimated value of the data read from the first memory cell is The lower the bit error rate will be. Conversely, if the channel state of the first memory cell (or the physical programming unit or the physical erasing unit including the first memory cell) is worse, the estimated error bit occurrence rate for the data read from the first memory cell will be higher.
在一范例实施例中,内存管理电路502会获得第一记忆胞的临界电压分布并据以评估从第一记忆胞中读取的数据的错误位发生率。以图7为例,内存管理电路502可以根据状态710与状态720之间的重叠区域730所对应的记忆胞总数来评估从第一记忆胞中读取的数据的错误位发生率。其中,重叠区域730的面积会正相关于临界电压包含于重叠区域730的记忆胞的总数。例如,内存管理电路502可以根据重叠区域730的面积和/或临界电压包含于重叠区域730的记忆胞的总数来查询一查找表以获得此数据的错误位发生率。或者,内存管理电路502也可以将重叠区域730的面积的/或临界电压包含于重叠区域730的记忆胞的总数输入至一算法并将此算法的输出作为此数据的错误位发生率。In an exemplary embodiment, the memory management circuit 502 obtains the threshold voltage distribution of the first memory cell and evaluates the bit error occurrence rate of the data read from the first memory cell accordingly. Taking FIG. 7 as an example, the memory management circuit 502 can evaluate the bit error occurrence rate of the data read from the first memory cell according to the total number of memory cells corresponding to the overlapping region 730 between the state 710 and the state 720 . Wherein, the area of the overlapping region 730 is positively related to the threshold voltage of the total number of memory cells contained in the overlapping region 730 . For example, the memory management circuit 502 can query a look-up table to obtain the bit error rate of the data according to the area of the overlapping region 730 and/or the total number of memory cells whose threshold voltage is included in the overlapping region 730 . Alternatively, the memory management circuit 502 can also input the area of the overlapping region 730 and/or the threshold voltage of the total number of memory cells included in the overlapping region 730 into an algorithm and use the output of the algorithm as the bit error rate of the data.
在一范例实施例中,若某一实体程序化单元与另一实体程序化单元属于同一个实体抹除单元,从这两个实体程序化单元读取的数据有很高的机率会具有相同或相近的错误位发生率。因此,在一范例实施例中,假设第一记忆胞所属的实体程序化单元是属于可复写式非易失性内存模块406中的某一实体抹除单元,内存管理电路502会储存从此实体抹除单元中另一实体程序化单元读取的数据中经由成功的译码而获得的错误位的总数。根据这个总数,内存管理电路502即可估计从第一记忆胞中读取的数据中可能存在的错误位的总数和/或相应的错误位发生率。In an exemplary embodiment, if a certain physical programming unit and another physical programming unit belong to the same physical erasing unit, there is a high probability that the data read from these two physical programming units will have the same or Similar bit error rates. Therefore, in an exemplary embodiment, assuming that the physical programming unit to which the first memory cell belongs belongs to a certain physical erasing unit in the rewritable non-volatile memory module 406, the memory management circuit 502 will store the The total number of erroneous bits obtained through successful decoding in data read by another physical programming unit in the division unit. According to the total number, the memory management circuit 502 can estimate the total number of possible error bits and/or the corresponding occurrence rate of error bits in the data read from the first memory cell.
在一范例实施例中,内存管理电路502也可以利用任何与第一记忆胞的损耗程度有关的信息(例如,数据在第一记忆胞中存放时间、第一记忆胞的读取计数、写入计数和/或抹除计数等)来评估从第一记忆胞中读取的数据的错误位发生率。例如,对应于不同的读取计数、写入计数和/或抹除计数,内存管理电路502可查表或利用特定算法来获得相应的错误位发生率。In an exemplary embodiment, the memory management circuit 502 can also use any information related to the degree of wear of the first memory cell (for example, the storage time of data in the first memory cell, the read count of the first memory cell, the write count of the first memory cell) count and/or erase count, etc.) to evaluate the error bit occurrence rate of the data read from the first memory cell. For example, corresponding to different read counts, write counts and/or erase counts, the memory management circuit 502 can look up a table or use a specific algorithm to obtain the corresponding error bit occurrence rate.
在本范例实施例中,内存管理电路502会直接利用奇偶检查操作的执行结果来评估待译码的数据的错误位发生率。例如,在图8的一范例实施例中,内存管理电路502会累加校验向量802中的校验子S0~S7以获得校验子总合。在此,累加是指一般加法,而非模2加法。此校验子总合可用以表示校验子S0~S7中有几个“1”(或几个“0”)。例如,若校验子S0~S7中有3个“1”,则此校验子总合会是“3”。或者,若校验子S0~S7中有7个“1”,则此校验子总合会是“7”。一般来说,若码字801中的错误位越多,则校验子S0~S7中的“1”也会越多,并且校验子总合会越大。若码字801中的错误位越少,则校验子S0~S7中的“1”也会越少,并且校验子总合会越小。因此,所评估的错误位发生率会正相关于此校验子总合。In this exemplary embodiment, the memory management circuit 502 directly uses the execution result of the parity check operation to evaluate the bit error occurrence rate of the data to be decoded. For example, in an exemplary embodiment of FIG. 8 , the memory management circuit 502 accumulates the syndromes S 0 -S 7 in the check vector 802 to obtain a syndrome sum. Here, accumulation refers to general addition, not modulo-2 addition. The syndrome sum can be used to indicate how many "1"s (or how many "0s") there are in the syndromes S 0 -S 7 . For example, if there are 3 "1"s in the syndromes S 0 -S 7 , the sum of the syndromes will be "3". Or, if there are 7 "1"s among the syndromes S 0 -S 7 , the sum of the syndromes will be "7". Generally speaking, if there are more error bits in the codeword 801, there will be more "1"s in the syndromes S 0 -S 7 , and the larger the syndrome sum will be. If the number of error bits in the codeword 801 is less, the number of “1”s in the syndromes S 0 -S 7 will be less, and the sum of the syndromes will be smaller. Therefore, the estimated erroneous bit occurrence rate will be positively correlated with this syndrome sum.
值得一提的是,本发明并不限定所评估的错误位发生率是以何种形式来表示。例如,某一数据的错误位发生率可以是以数据中至少一位为错误位的机率、数据整体的位错误率、数据中错误位的总数、第一记忆胞的损耗程度(例如,第一记忆胞的读取计数、写入计数和/或抹除计数等)及校验子总合的至少其中之一或者其他与错误位发生率有关的数值来表示或作为评估依据。It is worth mentioning that the present invention does not limit the form of the estimated error bit occurrence rate. For example, the error bit occurrence rate of a certain data can be the probability that at least one bit in the data is an error bit, the bit error rate of the data as a whole, the total number of error bits in the data, the loss degree of the first memory cell (for example, the first At least one of the memory cell read count, write count and/or erase count, etc.) and the sum of the syndromes or other numerical values related to the occurrence rate of the error bit is expressed or used as an evaluation basis.
在本范例实施例中,内存管理电路502会根据校验子总合等与数据的错误位发生率有关的数值来查询一查找表以获得在接续的译码操作中使用的译码参数。或者,内存管理电路502也可以将校验子总合等与数据的错误位发生率有关的数值输入至一算法并将此算法的输出作为在接续的译码操作中使用的译码参数。例如,此算法可以包含判断此校验子总合等与数据的错误位发生率有关的数值是大于或小于一门槛值、判断此校验子总合等与数据的错误位发生率有关的数值是落于哪一个数值区间或者将此校验子总合等与数据的错误位发生率有关的数值代入特定的方程式,以输出相应的译码参数。In this exemplary embodiment, the memory management circuit 502 queries a look-up table to obtain decoding parameters used in subsequent decoding operations according to the syndrome sum and other values related to the bit error occurrence rate of the data. Alternatively, the memory management circuit 502 may also input values related to the error bit occurrence rate of the data, such as the syndrome sum, into an algorithm and use the output of the algorithm as a decoding parameter used in subsequent decoding operations. For example, the algorithm may include judging whether the sum of syndromes and other values related to the bit error rate of data is greater than or smaller than a threshold value, and judging the sum of syndromes and other values related to the bit error rate of data Which value range does it fall in? Or substitute the syndrome sum and other values related to the error bit occurrence rate of the data into a specific equation to output corresponding decoding parameters.
在一范例实施例中,根据校验子总合等与数据的错误位发生率有关的数值来获得译码参数的操作亦可以由错误检查与校正电路508的硬件电路本身来执行,以加快整体的译码速度。In an exemplary embodiment, the operation of obtaining the decoding parameters according to the syndrome sum and other values related to the error bit occurrence rate of the data can also be performed by the hardware circuit of the error checking and correcting circuit 508 itself, so as to speed up the overall decoding speed.
在一范例实施例中,若同一个叠代译码操作包含连续执行的多个译码操作,所需译码的数据的错误位发生机率可能会在此些译码操作中发生变化,而至少部分译码操作所使用的译码参数也会适应性地改变。藉此,即便没有改变译码算法,译码操作中用于定位错误位的严谨度也可以随着数据中的错误被逐渐地更正而被适当地调整,从而提高译码效率。例如,在刚开始对某一数据执行译码操作时,对应于数据的错误位发生率较高(例如,数据中存在较多的错误),错误检查与校正电路508会先使用较高的严谨度来执行译码操作,以避免因一次的译码操作包含太多误判而让数据中的错误发散。然而,随着数据中的错误逐渐被更正,数据中的错误位的总数会逐渐减少,并且数据的错误位发生率会下降。因此,在接续的译码操作中,错误检查与校正电路508会改为使用较低的严谨度,以在不大幅降低每一个译码操作的译码成功率的前提下,提高整体的译码速度。In an exemplary embodiment, if the same iterative decoding operation includes a plurality of consecutive decoding operations, the error rate of the data to be decoded may change during these decoding operations, and at least The decoding parameters used by some decoding operations are also adaptively changed. Thereby, even if the decoding algorithm is not changed, the precision for locating error bits in the decoding operation can be properly adjusted as the errors in the data are gradually corrected, thereby improving the decoding efficiency. For example, when a decoding operation is first performed on a certain data, the error rate corresponding to the data is relatively high (for example, there are many errors in the data), the error checking and correction circuit 508 will first use a higher stringency The decoding operation is performed at a high degree, so as to avoid errors in the data diverging due to one decoding operation containing too many misjudgments. However, as the errors in the data are gradually corrected, the total number of erroneous bits in the data will gradually decrease, and the occurrence rate of erroneous bits in the data will decrease. Therefore, in subsequent decoding operations, the error checking and correction circuit 508 will use a lower level of precision instead, so as to improve the overall decoding without greatly reducing the decoding success rate of each decoding operation. speed.
例如,假设在评估从第一记忆胞中读取的数据的错误位发生率之后,错误检查与校正电路508使用某一译码参数(以下亦称为第一译码参数)来对此数据执行一译码操作(以下亦称为第一译码操作)。其中,第一译码参数对应于在第一译码操作中定位错误位的严谨度。然后,内存管理电路502或错误检查与校正电路508会判断第一译码操作是否失败。若第一译码操作失败(即数据中仍存在错误),内存管理电路502或错误检查与校正电路508会根据第一译码操作的执行结果重新评估待译码之数据的错误位发生率。根据重新评估的错误位发生率,错误检查与校正电路508使用另一译码参数(以下亦称为第二译码参数)来对待译码的数据执行另一译码操作(以下亦称为第二译码操作)。其中第二译码参数对应于在第二译码操作中定位错误位的严谨度。根据重新评估的错误位发生率,第二译码参数与第一译码参数可能不同也可能相同。特别是,若第二译码参数与第一译码参数不同,第一译码操作与第二译码操作中用来定位错误位的严谨度就会不同。For example, assume that after evaluating the error bit occurrence rate of the data read from the first memory cell, the error checking and correction circuit 508 uses a certain decoding parameter (hereinafter also referred to as the first decoding parameter) to execute A decoding operation (hereinafter also referred to as a first decoding operation). Wherein, the first decoding parameter corresponds to the precision of locating error bits in the first decoding operation. Then, the memory management circuit 502 or the ECC circuit 508 determines whether the first decoding operation fails. If the first decoding operation fails (that is, there are still errors in the data), the memory management circuit 502 or the error checking and correction circuit 508 will re-evaluate the error rate of the data to be decoded according to the execution result of the first decoding operation. According to the re-evaluated error bit occurrence rate, the ECC circuit 508 uses another decoding parameter (hereinafter also referred to as the second decoding parameter) to perform another decoding operation (hereinafter also referred to as the second decoding parameter) on the data to be decoded. Two decoding operations). Wherein the second decoding parameter corresponds to the precision of locating error bits in the second decoding operation. Depending on the re-evaluated bit error rate, the second decoding parameter may be different or the same as the first decoding parameter. In particular, if the second decoding parameter is different from the first decoding parameter, the degree of precision for locating error bits in the first decoding operation and the second decoding operation will be different.
在一范例实施例中,错误检查与校正电路508还可以改变所使用的译码算法。例如,若基于位翻转算法对某一数据执行一预置次数的译码操作之后仍无法更正数据中的所有错误,错误检查与校正电路508可切换为使用最小总合算法、总合乘积算法等,来继续对此数据执行更多的译码操作。或者,错误检查与校正电路508也可以预置就是使用最小总合算法、总合乘积算法等译码算法来执行译码操作,本发明不加以限制。另外,虽然上述范例实施例是以对应于位翻转算法的翻转门槛值作为译码参数的范例,在另一范例实施例中,若错误检查与校正电路508是使用最小总合算法、总合乘积算法等译码算法来执行译码操作,则错误检查与校正电路508也可以是使用其他类型的译码参数来调整在相应的译码操作中定位错误位的严谨度。换言之,无论是采用何种译码算法来执行译码操作,只要某一参数可用来调整或控制在某一译码操作中定位错误位的严谨度,则此参数即可视为上述译码参数并且可根据所评估的错误位发生率而被选择性地使用。In an exemplary embodiment, the ECC circuit 508 can also change the used decoding algorithm. For example, if all the errors in the data cannot be corrected after performing a preset number of decoding operations on a certain data based on the bit-flip algorithm, the error checking and correction circuit 508 may switch to using the minimum sum algorithm, the sum product algorithm, etc. , to continue performing more decoding operations on this data. Alternatively, the error checking and correcting circuit 508 may also be preset to use decoding algorithms such as minimum sum algorithm and sum product algorithm to perform decoding operations, which is not limited by the present invention. In addition, although the above exemplary embodiment uses the flipping threshold corresponding to the bit flipping algorithm as an example of the decoding parameter, in another exemplary embodiment, if the error checking and correcting circuit 508 uses the minimum sum algorithm, sum product Algorithm and other decoding algorithms to perform the decoding operation, the error checking and correction circuit 508 may also use other types of decoding parameters to adjust the precision of locating error bits in the corresponding decoding operation. In other words, no matter what kind of decoding algorithm is used to perform the decoding operation, as long as a certain parameter can be used to adjust or control the precision of locating error bits in a certain decoding operation, this parameter can be regarded as the above-mentioned decoding parameter And can be selectively used according to the estimated error bit occurrence rate.
图9是根据本发明的一范例实施例所显示的译码方法的流程图。FIG. 9 is a flowchart of a decoding method according to an exemplary embodiment of the present invention.
请参照图9,在步骤S901中,从可复写式非易失性内存模块的第一记忆胞读取数据。在步骤S902中,评估所述数据(即待译码的数据)的错误位发生率。在步骤S903中,根据所评估的错误位发生率使用一译码参数来对所述数据(即待译码的数据)执行一译码操作,其中所述译码参数对应于在此译码操作中定位错误位的严谨度。Please refer to FIG. 9 , in step S901 , read data from the first memory cell of the rewritable non-volatile memory module. In step S902, the bit error occurrence rate of the data (ie, the data to be decoded) is evaluated. In step S903, a decoding operation is performed on the data (ie, the data to be decoded) using a decoding parameter according to the estimated error bit occurrence rate, wherein the decoding parameter corresponds to the decoding operation The rigor of locating error bits in .
图10是根据本发明的另一范例实施例所显示的译码方法的流程图。FIG. 10 is a flowchart of a decoding method according to another exemplary embodiment of the present invention.
请参照图10,在步骤S1001中,从可复写式非易失性内存模块的第一记忆胞读取数据。在步骤S1002中,评估所述数据(即待译码的数据)的错误位发生率。在步骤S1003中,根据所评估的错误位发生率使用第一译码参数来对所述数据执行第一译码操作,其中第一译码参数对应于在第一译码操作中定位错误位的严谨度。在步骤S1004中,判断是否译码成功。若是,在步骤S1005中,输出译码成功的数据。若否(即译码失败),回到步骤S1002中,根据前一译码操作的执行结果重新评估待译码的数据的错误位发生率。然后,在步骤S1003中,根据重新评估的错误位发生率使用第二译码参数来对所述数据(即待译码的数据)执行第二译码操作,其中第二译码参数对应于在第二译码操作中定位错误位的严谨度。Please refer to FIG. 10 , in step S1001 , read data from the first memory cell of the rewritable non-volatile memory module. In step S1002, the bit error occurrence rate of the data (ie, the data to be decoded) is evaluated. In step S1003, a first decoding operation is performed on the data using a first decoding parameter according to the estimated error bit occurrence rate, wherein the first decoding parameter corresponds to the location error bit in the first decoding operation Rigor. In step S1004, it is judged whether the decoding is successful. If so, in step S1005, output the data that has been successfully decoded. If not (that is, the decoding fails), return to step S1002, and re-evaluate the bit error occurrence rate of the data to be decoded according to the execution result of the previous decoding operation. Then, in step S1003, a second decoding operation is performed on the data (that is, data to be decoded) using a second decoding parameter according to the re-evaluated bit error rate, wherein the second decoding parameter corresponds to the The degree of precision with which erroneous bits are located in the second decoding operation.
图11是根据本发明的另一范例实施例所显示的译码方法的流程图。FIG. 11 is a flowchart of a decoding method according to another exemplary embodiment of the present invention.
请参照图11,在步骤S1101中,从可复写式非易失性内存模块的第一记忆胞读取数据。在步骤S1102中,对所述数据(即待译码之数据)执行奇偶检查操作以获得多个校验子。在步骤S1103中,根据所获得的校验子判断是否译码成功。若译码成功,在步骤S1104中,输出译码成功的数据。若否(即尚未译码成功),在步骤S1105中,累加所述校验子以获得校验子总合。在步骤S1106中,根据所述校验子总合评估所述数据(即待译码之数据)的错误位发生率。在步骤S1107中,根据所评估的错误位发生率使用第一译码参数来对所述数据(即待译码之数据)执行第一译码操作,其中第一译码参数对应于在第一译码操作中定位错误位的严谨度。完成第一译码操作之后,回到步骤S1102中,再次对所述数据(即待译码之数据)执行奇偶检查操作以获得多个校验子。在步骤S1103中,根据重新获得的校验子判断是否译码成功。若是,输出译码成功的数据。若否(即译码失败),在步骤S1105中,再次累加重新获得的校验子以获得校验子总合。在步骤S1106中,根据再次计算的校验子总合评估所述数据(即待译码的数据)的错误位发生率。在步骤S1107中,根据所评估的错误位发生率使用第二译码参数来对所述数据(即待译码的数据)执行第二译码操作,其中第二译码参数对应于在第二译码操作中定位错误位的严谨度。在一范例实施例中,步骤S1102、步骤S1103及步骤S1105~S1107会被重复执行,直到成功译码(即进入步骤S1104)或所执行的译码操作的总数(即叠代次数)到达一预定次数为止。例如,若叠代次数达到此预定次数,译码操作会被停止。Please refer to FIG. 11 , in step S1101 , read data from the first memory cell of the rewritable non-volatile memory module. In step S1102, a parity check operation is performed on the data (ie, the data to be decoded) to obtain a plurality of syndromes. In step S1103, it is judged whether the decoding is successful according to the acquired syndrome. If the decoding is successful, in step S1104, the data of successful decoding is output. If not (that is, the decoding has not been successful), in step S1105, the syndromes are accumulated to obtain a syndrome sum. In step S1106, the bit error occurrence rate of the data (ie, the data to be decoded) is evaluated according to the syndrome sum. In step S1107, a first decoding operation is performed on the data (that is, data to be decoded) using a first decoding parameter according to the estimated error bit occurrence rate, wherein the first decoding parameter corresponds to the The degree of rigor with which erroneous bits are located during the decode operation. After the first decoding operation is completed, return to step S1102, and perform a parity check operation on the data (ie, the data to be decoded) again to obtain a plurality of syndromes. In step S1103, it is judged whether the decoding is successful according to the retrieved syndrome. If yes, output the decoded data successfully. If not (that is, the decoding fails), in step S1105, the acquired syndromes are accumulated again to obtain a syndrome sum. In step S1106, the bit error occurrence rate of the data (that is, the data to be decoded) is evaluated according to the recalculated syndrome sum. In step S1107, a second decoding operation is performed on the data (that is, data to be decoded) using a second decoding parameter according to the estimated error bit occurrence rate, wherein the second decoding parameter corresponds to the second The degree of rigor with which erroneous bits are located during the decode operation. In an exemplary embodiment, step S1102, step S1103, and steps S1105-S1107 are repeatedly executed until successful decoding (that is, entering step S1104) or the total number of executed decoding operations (ie, the number of iterations) reaches a predetermined number of times. For example, if the number of iterations reaches the predetermined number, the decoding operation will be stopped.
然而,图9至图11中各步骤已详细说明如上,在此便不再赘述。值得注意的是,图9至图11中各步骤可以实作为多个程序代码或是电路,本发明不加以限制。此外,图9至图11的方法可以搭配以上范例实施例使用,也可以单独使用,本发明不加以限制。However, each step in FIG. 9 to FIG. 11 has been described in detail above, and will not be repeated here. It should be noted that each step in FIG. 9 to FIG. 11 can be implemented as a plurality of program codes or circuits, which is not limited in the present invention. In addition, the methods in FIG. 9 to FIG. 11 can be used together with the above exemplary embodiments, or can be used alone, which is not limited by the present invention.
综上所述,根据待译码的数据的错误位发生率,错误检查与校正电路可弹性地基于一个特定的译码参数来执行相应的译码操作。其中,此译码参数会对应于在相应的译码操作中定位错误位的严谨度。藉此,可在提高每一次的译码操作的译码成功率与提高整体译码速度之间取得平衡,从而提高内存储存装置的译码效率。To sum up, according to the bit error occurrence rate of the data to be decoded, the error checking and correcting circuit can flexibly perform a corresponding decoding operation based on a specific decoding parameter. Wherein, the decoding parameter corresponds to the precision of locating error bits in the corresponding decoding operation. Thereby, a balance can be achieved between improving the decoding success rate of each decoding operation and increasing the overall decoding speed, thereby improving the decoding efficiency of the memory storage device.
虽然本发明已以实施例揭示如上,然其并非用以限定本发明,任何所属技术领域中具普通技术人员,在不脱离本发明的精神和范围内,当可作些许的改动与润饰,故本发明的保护范围当视所附权利要求界定范围为准。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention should be defined by the appended claims.
Claims (24)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610229969.5A CN107301873B (en) | 2016-04-14 | 2016-04-14 | Decoding method, memory storage device and memory control circuit unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610229969.5A CN107301873B (en) | 2016-04-14 | 2016-04-14 | Decoding method, memory storage device and memory control circuit unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107301873A true CN107301873A (en) | 2017-10-27 |
| CN107301873B CN107301873B (en) | 2021-01-12 |
Family
ID=60137877
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610229969.5A Active CN107301873B (en) | 2016-04-14 | 2016-04-14 | Decoding method, memory storage device and memory control circuit unit |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107301873B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109901945A (en) * | 2017-12-07 | 2019-06-18 | 群联电子股份有限公司 | Decoding method, memory storage device, and memory control circuit unit |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102831932A (en) * | 2011-06-14 | 2012-12-19 | 群联电子股份有限公司 | Data reading method, memory controller and memory storage device |
| US20150381206A1 (en) * | 2014-06-30 | 2015-12-31 | Sandisk Technologies Inc. | Multi-stage decoder |
-
2016
- 2016-04-14 CN CN201610229969.5A patent/CN107301873B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102831932A (en) * | 2011-06-14 | 2012-12-19 | 群联电子股份有限公司 | Data reading method, memory controller and memory storage device |
| US20150381206A1 (en) * | 2014-06-30 | 2015-12-31 | Sandisk Technologies Inc. | Multi-stage decoder |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109901945A (en) * | 2017-12-07 | 2019-06-18 | 群联电子股份有限公司 | Decoding method, memory storage device, and memory control circuit unit |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107301873B (en) | 2021-01-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9543983B2 (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI612527B (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI652677B (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI658463B (en) | Data access method,memory control circuit unit and memory storage device | |
| TWI670725B (en) | Memory control method, memory storage device and memory control circuit unit | |
| TWI594255B (en) | Decoding method, memory controlling circuit unit and memory storage device | |
| US20160020784A1 (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI672698B (en) | Memory control method, memory storage device and memory control circuit unit | |
| CN109901784B (en) | Data access method, memory control circuit unit and memory storage device | |
| CN106681856B (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN105023613A (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI691962B (en) | Decoding method, memory controlling circuit unit and memory storage device | |
| CN105304142A (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN107608817B (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN111580741B (en) | Data writing method, memory control circuit unit and memory storage device | |
| CN105304143B (en) | Decoding method, memory control circuit unit and memory storage device | |
| CN105575440B (en) | error processing method, memory storage device and memory control circuit unit | |
| TWI764602B (en) | Memory control method, memory storage device and memory control circuit unit | |
| TWI607452B (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI597731B (en) | Memory management method,memory storage device and memory control circuit unit | |
| CN112837728B (en) | Memory control method, memory storage device and memory control circuit unit | |
| CN112799874B (en) | Memory control method, memory storage device and memory control circuit unit | |
| CN107025935B (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN107301873B (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN111258791B (en) | Memory control method, memory storage device and memory control circuit unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |