CN118841056A - Verification method and device for soft decoding function, storage medium and electronic equipment - Google Patents
Verification method and device for soft decoding function, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN118841056A CN118841056A CN202410832499.6A CN202410832499A CN118841056A CN 118841056 A CN118841056 A CN 118841056A CN 202410832499 A CN202410832499 A CN 202410832499A CN 118841056 A CN118841056 A CN 118841056A
- Authority
- CN
- China
- Prior art keywords
- data
- nand flash
- flash controller
- soft decoding
- soft
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C29/00—Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
- G11C29/04—Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
- G11C29/08—Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
- G11C29/12—Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
- G11C29/18—Address generation devices; Devices for accessing memories, e.g. details of addressing circuits
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C29/00—Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
- G11C29/04—Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
- G11C29/08—Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
- G11C29/12—Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
- G11C29/38—Response verification devices
- G11C29/42—Response verification devices using error correcting codes [ECC] or parity check
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C29/00—Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
- G11C29/04—Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
- G11C29/08—Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
- G11C29/12—Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
- G11C29/18—Address generation devices; Devices for accessing memories, e.g. details of addressing circuits
- G11C2029/1802—Address decoder
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
本申请实施例提供了一种软解码功能的验证方法及装置、存储介质及电子设备,涉及计算机领域,包括:指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;指示NAND Flash控制器从指定存储块中获取指定数据,指定数据包括:原始数据,软比特数据和成对页数据;原始数据为指定存储块中的目标页中存储的使用LDPC编码以后的数据,软比特数据为NAND Flash存储原始数据的过程中所产生的数据,成对页数据是指定存储块中与目标页邻接的页中存储的数据;对原始数据进行注错,得到错误数据;指示NAND Flash控制器根据软比特数据和成对页数据对错误数据进行软解码,得到软解码结果;根据软解码结果验证NAND Flash控制器的软解码功能。
The embodiments of the present application provide a method and device for verifying a soft decoding function, a storage medium and an electronic device, which relate to the field of computers, and include: instructing a non-volatile flash memory NAND Flash controller in a solid-state drive (SSD) to use a low-density parity check code (LDPC) to write target data into a specified storage block in the NAND Flash; instructing the NAND Flash controller to obtain specified data from the specified storage block, the specified data including: original data, soft bit data and paired page data; the original data is data stored in a target page in the specified storage block after being encoded using LDPC, the soft bit data is data generated in the process of NAND Flash storing the original data, and the paired page data is data stored in a page adjacent to the target page in the specified storage block; performing error annotation on the original data to obtain error data; instructing the NAND Flash controller to soft-decode the error data according to the soft bit data and the paired page data to obtain a soft decoding result; and verifying the soft decoding function of the NAND Flash controller according to the soft decoding result.
Description
技术领域Technical Field
本申请实施例涉及计算机领域,具体而言,涉及一种软解码功能的验证方法及装置、存储介质及电子设备。The embodiments of the present application relate to the field of computers, and more specifically, to a method and device for verifying a soft decoding function, a storage medium, and an electronic device.
背景技术Background Art
固态硬盘(Solid State Disk,简称为SSD),又称固态驱动器,是用固态电子存储芯片阵列制成的硬盘,SSD由控制单元和存储单元组成,其中,存储单元包括但不限于:Flash芯片、Dram芯片。基于闪存的固态硬盘是固态硬盘的主要类别,其主体是一块印刷电路板(Printed Circuit Board,简称为PCB),PCB板上所拥有的基本配件是控制芯片、缓存芯片以及用于存储数据的闪存芯片。Solid State Disk (SSD), also known as solid state drive, is a hard disk made of solid-state electronic storage chip array. SSD consists of a control unit and a storage unit, where the storage unit includes but is not limited to: Flash chip, Dram chip. Flash-based solid state disk is the main category of solid state disk. Its main body is a printed circuit board (PCB). The basic components on the PCB are control chip, cache chip and flash memory chip for storing data.
大部分SSD使用的存储介质为计算机闪存设备(Nand Flash),Nand Flash是一种非易失性存储器,由于Nand Flash的基本存储单元是浮栅晶体管,且因本身的物理结构而拥有的电荷泄漏、氧化层老化等物理特性,导致Nand Flash在使用过程中会受到漂移效应、过度编程效应、读操作干扰、温度等因素的影响,从而发生读错误、编程失败或擦除编程失败、比特位反转的现象。进而为了解决这个问题,相关技术在SSD中运用的低密度奇偶校验码(Low-Density Parity-Check Code,简称为LDPC)软解码来保护存储在SSD中的数据免受位错误的影响。The storage medium used by most SSDs is computer flash memory devices (Nand Flash), which is a non-volatile memory. Since the basic storage unit of Nand Flash is a floating gate transistor, and due to its physical structure, it has physical characteristics such as charge leakage and oxide layer aging, which causes Nand Flash to be affected by drift effect, over-programming effect, read operation interference, temperature and other factors during use, resulting in read errors, programming failures or erase programming failures, and bit inversion. In order to solve this problem, the related technology uses low-density parity-check code (LDPC) soft decoding in SSD to protect the data stored in the SSD from bit errors.
但目前,只有软解码错误处理流程,在Nand Flash控制器开发阶段进行模块测试时没有合适的对软解码功能进行验证的方法,而在系统测试过程中也只能被动地等到发生错误且前置的其他错误处理流程失效的时候才会进行软解码处理流程,无法主动快速地检查软解硬件和代码模块的数据纠错恢复功能是否可用,增加了研发和测试成本,不利于高效地测试。However, at present, there is only a soft decoding error handling process. There is no suitable method to verify the soft decoding function when testing the module during the Nand Flash controller development phase. In the system testing process, the soft decoding process can only be performed passively when an error occurs and other previous error handling processes fail. It is impossible to actively and quickly check whether the data error correction and recovery functions of the soft decoding hardware and code modules are available, which increases the R&D and testing costs and is not conducive to efficient testing.
针对相关技术中,无法主动对SSD中的软解码功能进行验证的问题,目前尚未提出有效的解决方案。With regard to the problem in the related art that the soft decoding function in the SSD cannot be actively verified, no effective solution has been proposed yet.
发明内容Summary of the invention
本申请实施例提供了一种软解码功能的验证方法及装置、存储介质及电子设备,以至少解决无法主动对SSD中的软解码功能进行验证的问题。The embodiments of the present application provide a method and device for verifying a soft decoding function, a storage medium, and an electronic device, so as to at least solve the problem that the soft decoding function in the SSD cannot be actively verified.
根据本申请的一个实施例,提供了一种软解码功能的验证方法,包括:指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;指示所述NANDFlash控制器从所述指定存储块中获取指定数据,其中,所述指定数据包括:原始数据,软比特数据和成对页数据;所述原始数据为所述指定存储块中的目标页中存储的使用所述LDPC编码以后的数据,所述软比特数据为所述NANDFlash存储所述原始数据的过程中所产生的数据,所述成对页数据是所述指定存储块中与所述目标页邻接的页中存储的数据;对所述原始数据进行注错,得到错误数据;指示所述NAND Flash控制器根据所述软比特数据和所述成对页数据对所述错误数据进行软解码,得到软解码结果;根据所述软解码结果验证所述NAND Flash控制器的软解码功能。According to an embodiment of the present application, a method for verifying a soft decoding function is provided, comprising: instructing a non-volatile flash memory NAND Flash controller in a solid state drive (SSD) to write target data into a designated storage block in the NAND Flash using a low-density parity check code (LDPC); instructing the NAND Flash controller to obtain designated data from the designated storage block, wherein the designated data comprises: original data, soft bit data and paired page data; the original data is data stored in a target page in the designated storage block after being encoded using the LDPC, the soft bit data is data generated in the process of the NAND Flash storing the original data, and the paired page data is data stored in a page in the designated storage block adjacent to the target page; performing error annotation on the original data to obtain error data; instructing the NAND Flash controller to soft-decode the error data according to the soft bit data and the paired page data to obtain a soft decoding result; and verifying the soft decoding function of the NAND Flash controller according to the soft decoding result.
在一个示例性的实施例中,所述指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块之前,所述方法还包括:获取所述NAND Flash控制器中的第一类型的寄存器中存储的数据,并在所述第一类型的寄存器中存储的数据满足第一预设条件的情况下,确定所述NAND Flash控制器中的所述第一类型的寄存器未出现异常,其中,所述第一类型的寄存器中包含的数据是预先设定的、且无法被修改;和/或向所述NAND Flash控制器中的第二类型的寄存器写入第一预设数据;获取所述NAND Flash控制器中的所述第二类型的寄存器中存储的数据,并在所述第二类型的寄存器中存储的数据为所述第一预设数据的情况下,确定所述NAND Flash控制器中的所述第二类型的寄存器未出现异常,其中,所述第二类型的寄存器允许写入数据、且允许被读取其中存储的数据;和/或向所述NAND Flash控制器中的第三类型的寄存器写入第二预设数据;获取所述NAND Flash控制器中的所述第三类型的寄存器中存储的数据,并在所述第三类型的寄存器中存储的数据为第三预设数据的情况下,确定所述NAND Flash控制器中的所述第三类型的寄存器未出现异常,其中,所述第三类型的寄存器在写入所述第二预设数据之后,所述第三类型的寄存器的相应位会被清除。In an exemplary embodiment, before instructing a non-volatile flash memory NAND Flash controller in a solid state drive SSD to use a low-density parity check code LDPC to write target data into a designated storage block in the NAND Flash, the method further includes: obtaining data stored in a first type of register in the NAND Flash controller, and determining that the first type of register in the NAND Flash controller is not abnormal if the data stored in the first type of register meets a first preset condition, wherein the data contained in the first type of register is preset and cannot be modified; and/or writing first preset data to a second type of register in the NAND Flash controller; obtaining data stored in the second type of register in the NAND Flash controller, and determining that the second type of register in the NAND Flash controller is not abnormal if the data stored in the second type of register is the first preset data, wherein the second type of register allows data to be written and allows the data stored therein to be read; and/or writing second preset data to a third type of register in the NAND Flash controller; obtaining data stored in the third type of register in the NAND Flash controller, and determining that the NAND Flash controller is abnormal if the data stored in the third type of register is the third preset data. There is no abnormality in the third type of register in the Flash controller, wherein after the second preset data is written into the third type of register, the corresponding bit of the third type of register will be cleared.
在一个示例性的实施例中,所述指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块之前,所述方法还包括:指示所述NAND Flash控制器擦除所述指定存储块中存储的数据;所述指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块,包括:指示所述NAND Flash控制器使用LDPC将目标数据写入所述NAND Flash中的指定存储块中的一个或多个指定页,其中,所述一个或多个指定页包括所述目标页。In an exemplary embodiment, before instructing a non-volatile flash memory NAND Flash controller in a solid state drive SSD to use a low-density parity-check code LDPC to write target data to a designated storage block in the NAND Flash, the method further includes: instructing the NAND Flash controller to erase data stored in the designated storage block; instructing the non-volatile flash memory NAND Flash controller in the solid state drive SSD to use a low-density parity-check code LDPC to write target data to a designated storage block in the NAND Flash includes: instructing the NAND Flash controller to use LDPC to write the target data to one or more designated pages in the designated storage block in the NAND Flash, wherein the one or more designated pages include the target page.
在一个示例性的实施例中,所述指示所述NAND Flash控制器从所述指定存储块中获取指定数据,包括:向所述NAND Flash控制器发送软解指令,以指示所述NAND Flash控制器从所述指定存储块中获取指定数据。In an exemplary embodiment, instructing the NAND Flash controller to obtain the specified data from the specified storage block includes: sending a soft decoding instruction to the NAND Flash controller to instruct the NAND Flash controller to obtain the specified data from the specified storage block.
在一个示例性的实施例中,所述指示所述NAND Flash控制器从所述指定存储块中获取指定数据,包括:指示所述NAND Flash控制器向所述NAND Flash发送读指令,以从所述指定存储块中读取目标子数据,其中,所述目标子数据为使用所述LDPC对所述原始数据进行解码以后所得到的数据;在获取到所述NAND Flash响应所述读指令所发送的状态数据的情况下,将所述状态数据中的目标比特位的值设置为预设值,其中,所述目标比特位的值为所述预设值用于指示读取数据出现错误,在所述NANDFlash控制器确定所述状态数据中的目标比特位的值为所述预设值的情况下,所述NANDFlash控制器从所述指定存储块中获取所述指定数据。In an exemplary embodiment, the instructing the NAND Flash controller to obtain the specified data from the specified storage block includes: instructing the NAND Flash controller to send a read instruction to the NAND Flash to read target sub-data from the specified storage block, wherein the target sub-data is data obtained after decoding the original data using the LDPC; when the status data sent by the NAND Flash in response to the read instruction is obtained, the value of the target bit in the status data is set to a preset value, wherein the value of the target bit is the preset value for indicating that an error has occurred in the read data, and when the NAND Flash controller determines that the value of the target bit in the status data is the preset value, the NAND Flash controller obtains the specified data from the specified storage block.
在一个示例性的实施例中,所述对所述原始数据进行注错,得到错误数据,包括:从所述原始数据中确定N个目标比特位,其中,所述原始数据具有M个比特位,所述M个比特位包括所述N个目标比特位,N与M的比值小于预设阈值;将所述原始数据在所述N个目标比特位中的每个目标比特位上的数据进行数据翻转。In an exemplary embodiment, the method of performing error injection on the original data to obtain erroneous data includes: determining N target bits from the original data, wherein the original data has M bits, the M bits include the N target bits, and a ratio of N to M is less than a preset threshold; and flipping the data at each target bit of the N target bits of the original data.
在一个示例性的实施例中,所述根据所述软解码结果验证所述NAND Flash控制器的软解码功能,包括:在所述软解码结果中的循环冗余校验CRC校验值和错误校正码ECC校验值均为零的情况下,确定所述NAND Flash控制器的软解码功能正常;在所述软解码结果中的所述CRC校验值不为零的情况下,确定所述NAND Flash控制器的软解码功能异常;在所述软解码结果中的所述ECC校验值不为零的情况下,确定所述NAND Flash控制器的软解码功能异常。In an exemplary embodiment, verifying the soft decoding function of the NAND Flash controller according to the soft decoding result includes: when a cyclic redundancy check CRC check value and an error correction code ECC check value in the soft decoding result are both zero, determining that the soft decoding function of the NAND Flash controller is normal; when the CRC check value in the soft decoding result is not zero, determining that the soft decoding function of the NAND Flash controller is abnormal; when the ECC check value in the soft decoding result is not zero, determining that the soft decoding function of the NAND Flash controller is abnormal.
根据本申请实施例的另一个实施例,还提供一种软解码功能的验证装置,包括:写入模块,用于指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;获取模块,用于指示所述NANDFlash控制器从所述指定存储块中获取指定数据,其中,所述指定数据包括:原始数据,软比特数据和成对页数据;所述原始数据为所述指定存储块中的目标页中存储的使用所述LDPC编码以后的数据,所述软比特数据为所述NAND Flash存储所述原始数据的过程中所产生的数据,所述成对页数据是所述指定存储块中与所述目标页邻接的页中存储的数据;注错模块,用于对所述原始数据进行注错,得到错误数据;软解码模块,用于指示所述NAND Flash控制器根据所述软比特数据和所述成对页数据对所述错误数据进行软解码,得到软解码结果;验证模块,用于根据所述软解码结果验证所述NAND Flash控制器的软解码功能。According to another embodiment of the embodiment of the present application, a verification device for a soft decoding function is also provided, including: a writing module, used to instruct a non-volatile flash memory NAND Flash controller in a solid state drive SSD to use a low-density parity check code LDPC to write target data into a specified storage block in the NAND Flash; an acquisition module, used to instruct the NAND Flash controller to obtain specified data from the specified storage block, wherein the specified data includes: original data, soft bit data and paired page data; the original data is the data stored in the target page in the specified storage block after using the LDPC encoding, the soft bit data is the data generated in the process of the NAND Flash storing the original data, and the paired page data is the data stored in the page adjacent to the target page in the specified storage block; an error injection module, used to perform error injection on the original data to obtain error data; a soft decoding module, used to instruct the NAND Flash controller to perform soft decoding on the error data according to the soft bit data and the paired page data to obtain a soft decoding result; and a verification module, used to verify the soft decoding function of the NAND Flash controller according to the soft decoding result.
根据本申请的又一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
根据本申请的又一个实施例,还提供了一种电子设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
根据本申请的又一个实施例,还提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。According to another embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
通过本申请,指示NAND Flash控制器先将目标数据写入NAND Flash中,再从NANDFlash中获取原始数据、软比特数据和成对页数据(即主动触发NAND Flash控制器的软解码功能),将原始数据进行注错,得到错误数据,接着指示NAND Flash控制器根据软比特数据和成对页数据对错误数据进行软解码,从而根据解码结果验证NAND Flash控制器的软解码功能是否正确。即本申请可以主动地触发NAND Flash控制器的软解码功能,进而验证NAND Flash控制器的软解码功能是否正常,解决了无法主动对SSD中的软解码功能进行验证的问题。Through this application, the NAND Flash controller is instructed to first write the target data into the NAND Flash, then obtain the original data, soft bit data and paired page data from the NAND Flash (i.e., actively trigger the soft decoding function of the NAND Flash controller), make errors in the original data, obtain error data, and then instruct the NAND Flash controller to soft-decode the error data according to the soft bit data and paired page data, so as to verify whether the soft decoding function of the NAND Flash controller is correct according to the decoding result. That is, this application can actively trigger the soft decoding function of the NAND Flash controller, and then verify whether the soft decoding function of the NAND Flash controller is normal, which solves the problem that the soft decoding function in the SSD cannot be actively verified.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1是根据本申请实施例的一种软解码功能的验证方法的服务器设备的硬件结构框图;FIG1 is a hardware structure block diagram of a server device of a method for verifying a soft decoding function according to an embodiment of the present application;
图2是根据本申请实施例的一种软解码功能的验证方法的流程图;FIG2 is a flow chart of a method for verifying a soft decoding function according to an embodiment of the present application;
图3是根据本申请实施例的一种可选的软解码功能的流程示意图;FIG3 is a schematic diagram of a flow chart of an optional soft decoding function according to an embodiment of the present application;
图4是根据本申请实施例的另一种可选的软解码功能流程示意图;FIG4 is a schematic diagram of another optional soft decoding function flow according to an embodiment of the present application;
图5是根据本申请实施例的一种软解码功能的验证装置的结构框图;FIG5 is a structural block diagram of a verification device for a soft decoding function according to an embodiment of the present application;
图6是根据本申请实施例的一种可选的电子设备的结构示意图。FIG6 is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下文中将参考附图并结合实施例来详细说明本申请的实施例。The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语"第一″、"第二″等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
本申请实施例中所提供的软解码功能的验证方法实施例可以在服务器设备或者类似的运算装置中执行。以运行在服务器设备上为例,图1是本申请实施例的一种软解码功能的验证方法的服务器设备的硬件结构框图。如图1所示,服务器设备可以包括一个或多个(图l中仅示出一个)处理器1 02(处理器1 02可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器1 04,其中,上述服务器设备还可以包括用于通信功能的传输设备1 06以及输入输出设备1 08。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述服务器设备的结构造成限定。例如,服务器设备还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The verification method embodiment of the soft decoding function provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking operation on a server device as an example, FIG. 1 is a hardware structure block diagram of a server device of a verification method of a soft decoding function in an embodiment of the present application. As shown in FIG. 1 , the server device may include one or more (only one is shown in FIG. 1 ) processors 1 02 (the processor 1 02 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 1 04 for storing data, wherein the above-mentioned server device may also include a transmission device 1 06 and an input-output device 1 08 for a communication function. It can be understood by those skilled in the art that the structure shown in FIG. 1 is only for illustration, and it does not limit the structure of the above-mentioned server device. For example, the server device may also include more or fewer components than those shown in FIG. 1 , or have a configuration different from that shown in FIG. 1 .
存储器1 04可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本申请实施例中的软解码功能的验证方法对应的计算机程序,处理器1 02通过运行存储在存储器1 04内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器1 04可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器1 04可进一步包括相对于处理器1 02远程设置的存储器,这些远程存储器可以通过网络连接至服务器设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the verification method of the soft decoding function in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括服务器设备的通信供应方提供的无线网络。在一个实例中,传输设备1 06包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
为了更好的理解,以下对软解码(Soft Decode)进行具体说明:软解码是一种利用接收信号的软信息(soft information)来解码LDPC的方法。LDPC软解码的作用主要是:For a better understanding, the following is a detailed description of soft decoding: Soft decoding is a method of decoding LDPC using soft information of the received signal. The main functions of LDPC soft decoding are:
错误检测与纠正:LDPC码是一种强大的前向纠错码,能够检测并纠正一定数量的错误,即使在存储单元开始退化时也能保持数据的完整性。其原理是在数据传输前将原始数据通过编码器进行编码,生成一组校验位,这些校验位与原始数据一起发送给接收端,接收端收到数据后,通过解码器对接收到的数据进行解码,通过校验位来检测和纠正错误,拥有较高的纠错性能和较低的编码和解码复杂度。Error detection and correction: LDPC code is a powerful forward error correction code that can detect and correct a certain number of errors and maintain data integrity even when the storage unit begins to degrade. Its principle is to encode the original data through the encoder before data transmission to generate a set of check bits, which are sent to the receiving end together with the original data. After the receiving end receives the data, it decodes the received data through the decoder and detects and corrects errors through the check bits. It has high error correction performance and low encoding and decoding complexity.
软信息利用:与传统的硬解码(只根据阈值判断比特值)不同,软解码考虑了读取信号的软信息,如对数似然比(LLR)或概率值,这些信息提供了比特正确性的更精确估计。Soft information utilization: Different from traditional hard decoding (which only determines the bit value based on a threshold), soft decoding takes into account the soft information of the read signal, such as log-likelihood ratio (LLR) or probability value, which provides a more accurate estimate of the bit correctness.
提高数据可靠性:通过软解码,SSD控制器可以在读取数据时更有效地纠正单个或多个位错误,从而提高数据的可靠性和整体存储系统的稳定性。Improve data reliability: Through soft decoding, the SSD controller can more effectively correct single or multiple bit errors when reading data, thereby improving data reliability and overall storage system stability.
优化性能:软解码算法,如置信传播(Belief Propagation)或求和-乘积算法(Sum-Product Algorithm),可以在多次迭代中不断提高解码的准确性,从而在实际应用中实现更好的性能。Optimizing performance: Soft decoding algorithms, such as Belief Propagation or Sum-Product Algorithm, can continuously improve the decoding accuracy over multiple iterations, thus achieving better performance in practical applications.
适应性:LDPC软解码算法可以根据SSD中NAND闪存的特性和操作条件进行调整,以适应不同的错误模式和信噪比,从而优化纠错性能。Adaptability: The LDPC soft decoding algorithm can be adjusted according to the characteristics and operating conditions of the NAND flash memory in the SSD to adapt to different error modes and signal-to-noise ratios, thereby optimizing error correction performance.
在SSD中,LDPC软解码通常与硬件和固件紧密集成,以实现高效的错误检测和纠正。这种集成确保了即使在存储介质开始老化或出现故障时,数据也能保持完整性,从而延长SSD的使用寿命并提高整体性能。In SSDs, LDPC soft decoding is often tightly integrated with hardware and firmware to achieve efficient error detection and correction. This integration ensures that data remains intact even when the storage media begins to age or fail, thereby extending the life of the SSD and improving overall performance.
为了解决相关技术中存在的上述问题,本实施例中提供了一种软解码功能的验证方法,其执行主体包括但不限于软解码功能验证模块,其中,软解码功能验证模块中具有测试脚本,软解码功能验证模块通过测试脚本中的运行逻辑来执行相应的操作,如图2所示,该流程包括如下步骤S202-S2 1 0:In order to solve the above problems existing in the related art, a method for verifying a soft decoding function is provided in the present embodiment, wherein the execution subject includes but is not limited to a soft decoding function verification module, wherein the soft decoding function verification module has a test script, and the soft decoding function verification module performs corresponding operations according to the running logic in the test script. As shown in FIG. 2, the process includes the following steps S202-S210:
步骤S202:指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;Step S202: instructing a non-volatile flash memory NAND Flash controller in the solid state drive SSD to write target data into a designated storage block in the NAND Flash using a low-density parity check code LDPC;
可选地,可以指示NAND Fl0ash控制器使用LDPC对目标数据进行编码,进而将编码后得到的数据写入NAND Flash中的指定存储块。Optionally, the NAND Flash controller may be instructed to encode the target data using LDPC, and then write the encoded data into a specified storage block in the NAND Flash.
在一个示例性的实施例中,在上述步骤S202之前,所述方法还包括以下步骤S2 1和/或,步骤S22和/或,步骤S23:In an exemplary embodiment, before the above step S202, the method further includes the following steps S21 and/or, step S22 and/or, step S23:
步骤S2 1:获取所述NAND Flash控制器中的第一类型的寄存器中存储的数据,并在所述第一类型的寄存器中存储的数据满足第一预设条件的情况下,确定所述NAND Flash控制器中的所述第一类型的寄存器未出现异常,其中,所述第一类型的寄存器中包含的数据是预先设定的、且无法被修改;Step S21: acquiring data stored in a first type of register in the NAND Flash controller, and determining that no abnormality occurs in the first type of register in the NAND Flash controller when the data stored in the first type of register meets a first preset condition, wherein the data contained in the first type of register is preset and cannot be modified;
可选地,第一类型的寄存器为只读寄存器(Read-Only Register,简称为RO寄存器),第一预设条件包括:寄存器的值为0。Optionally, the first type of register is a read-only register (Read-Only Register, referred to as RO register for short), and the first preset condition includes: the value of the register is 0.
也就是说,软解码功能验证模块可以依次读取NAND Flash控制器中的各个RO寄存器所存储的值,若所读取到的值为0,则确定对应的RO寄存器未出现异常。That is, the soft decoding function verification module can read the values stored in each RO register in the NAND Flash controller in sequence. If the read value is 0, it is determined that there is no abnormality in the corresponding RO register.
需要说明的是,RO寄存器包含的数据是由系统或硬件预先设定的,用户或软件不能修改它们的内容。It should be noted that the data contained in the RO registers are preset by the system or hardware, and their contents cannot be modified by users or software.
步骤S22:向所述NAND Flash控制器中的第二类型的寄存器写入第一预设数据;获取所述NAND Flash控制器中的所述第二类型的寄存器中存储的数据,并在所述第二类型的寄存器中存储的数据为所述第一预设数据的情况下,确定所述NAND Flash控制器中的所述第二类型的寄存器未出现异常,其中,所述第二类型的寄存器允许写入数据、且允许被读取其中存储的数据;Step S22: writing first preset data to a second type of register in the NAND Flash controller; acquiring data stored in the second type of register in the NAND Flash controller, and determining that no abnormality occurs in the second type of register in the NAND Flash controller when the data stored in the second type of register is the first preset data, wherein the second type of register allows data to be written and allows data stored therein to be read;
可选地,第二类型的寄存器为读写寄存器(Read-Write Register,简称为RW寄存器)。Optionally, the second type of register is a read-write register (Read-Write Register, referred to as RW register for short).
也就是说,软解码功能验证模块可以向各个RW寄存器的二进制(Binary digit,简称为bit)位写入第一预设数据(可选地,第一预设数据为1),再读取各个RW寄存器的值,若读取到的各个RW寄存器的bit为1,则对应的RW寄存器未出现异常。That is to say, the soft decoding function verification module can write the first preset data (optionally, the first preset data is 1) to the binary digit (bit) of each RW register, and then read the value of each RW register. If the bit of each RW register read is 1, the corresponding RW register has no abnormality.
需要说明的是,RW寄存器是计算机硬件中的一种寄存器,允许用户不仅读取其中存储的数据,还可以向其中写入数据。It should be noted that the RW register is a register in computer hardware that allows the user not only to read the data stored therein but also to write data therein.
步骤S23:向所述NAND Flash控制器中的第三类型的寄存器写入第二预设数据;获取所述NAND Flash控制器中的所述第三类型的寄存器中存储的数据,并在所述第三类型的寄存器中存储的数据为第三预设数据的情况下,确定所述NAND Flash控制器中的所述第三类型的寄存器未出现异常,其中,所述第三类型的寄存器在写入所述第二预设数据之后,所述第三类型的寄存器的相应位会被清除。Step S23: writing second preset data to a third type of register in the NAND Flash controller; obtaining data stored in the third type of register in the NAND Flash controller, and determining that no abnormality occurs to the third type of register in the NAND Flash controller when the data stored in the third type of register is the third preset data, wherein after writing the second preset data to the third type of register, the corresponding bit of the third type of register will be cleared.
可选地,第三类型的寄存器为读写-清零寄存器(Read-Write-1-Clear register,简称为RW1C寄存器)。Optionally, the third type of register is a read-write-clear register (Read-Write-1-Clear register, referred to as RW1C register).
也就是说,软解码功能验证模块可以向各个RW1 C寄存器的bit写入第二预设数据(可选地,第二预设数据为1),再读取各个RW1C寄存器的值,若读取到的各个RW1C寄存器中存储的数据为第三预设数据(可选地,第二预设数据为0),则对应的RW1C寄存器未出现异常。That is to say, the soft decoding function verification module can write the second preset data (optionally, the second preset data is 1) to the bit of each RW1C register, and then read the value of each RW1C register. If the data stored in each RW1C register read is the third preset data (optionally, the second preset data is 0), the corresponding RW1C register has no abnormality.
需要说明的是,RW1C寄存器结合了读写和清除的特性,可以被读取和写入,但是当写入1时,该寄存器的相应位会被清除(即设置为0)。It should be noted that the RW1C register combines the features of read, write and clear, and can be read and written, but when 1 is written, the corresponding bit of the register will be cleared (ie, set to 0).
可选地,上述NAND Flash控制器中的第一类型、第二类型和第三类型的寄存器为NAND Flash控制器实现软解码功能所需的寄存器。Optionally, the first type, the second type and the third type of registers in the above-mentioned NAND Flash controller are registers required for the NAND Flash controller to implement a soft decoding function.
在本实施例中,通过上述步骤S2 1-S23,可以准确地确定NAND Flash控制器中支持软解码功能的寄存器是否存在异常。In this embodiment, through the above steps S21-S23, it can be accurately determined whether there is an abnormality in the register supporting the soft decoding function in the NAND Flash controller.
需要说明的是,在对NAND Flash控制器的软解码功能进行验证以前,需要先确定NAND Flash控制器中支持软解码功能的寄存器是否存在异常。如果NAND Flash控制器中支持软解码功能的寄存器存在异常,则NAND Flash控制器的软解码功能必然异常。如果NANDFlash控制器中支持软解码功能的寄存器不存在异常,则继续使用步骤S202-S2 1 0对NANDFlash控制器的软解码功能进行验证。It should be noted that before verifying the soft decoding function of the NAND Flash controller, it is necessary to first determine whether there is an abnormality in the register supporting the soft decoding function in the NAND Flash controller. If there is an abnormality in the register supporting the soft decoding function in the NAND Flash controller, the soft decoding function of the NAND Flash controller must be abnormal. If there is no abnormality in the register supporting the soft decoding function in the NAND Flash controller, continue to use steps S202-S210 to verify the soft decoding function of the NAND Flash controller.
在一个示例性的实施例中,在上述步骤S202之前,所述方法还包括以下步骤S3 1:In an exemplary embodiment, before the above step S202, the method further includes the following step S31:
步骤S3 1:指示所述NAND Flash控制器擦除所述指定存储块中存储的数据;Step S3 1: instructing the NAND Flash controller to erase the data stored in the designated storage block;
需要说明的是,数据块(Block)是SSD中的最大数据擦除单位,在SSD中,数据是以Block为单位进行擦除和编程的,每个Block包含了多个Page。It should be noted that a data block is the largest data erasure unit in an SSD. In an SSD, data is erased and programmed in blocks, and each block contains multiple pages.
需要说明的是,Page是SSD中的基本读写单位,在SSD的块内部,数据是以Page为单位进行读写的。It should be noted that Page is the basic read and write unit in SSD. Within the block of SSD, data is read and written in units of Page.
在一个示例性的实施例中,上述步骤S202可以通过以下步骤S32实现:In an exemplary embodiment, the above step S202 can be implemented by the following step S32:
步骤S32:指示所述NAND Flash控制器使用LDPC将目标数据写入所述NANDFlash中的指定存储块中的一个或多个指定页,其中,所述一个或多个指定页包括所述目标页。Step S32: instructing the NAND Flash controller to write the target data into one or more designated pages in a designated storage block in the NAND Flash using LDPC, wherein the one or more designated pages include the target page.
需要说明的是,在本实施例中,在将目标数据写入指定存储块中的一个或多个指定页之前,需要先擦除指定存储块中存储的数据,进而避免数据写入错误。It should be noted that, in this embodiment, before writing the target data into one or more designated pages in the designated storage block, the data stored in the designated storage block needs to be erased first, so as to avoid data writing errors.
步骤S204:指示所述NANDFlash控制器从所述指定存储块中获取指定数据,其中,所述指定数据包括:原始数据,软比特数据和成对页数据;所述原始数据为所述指定存储块中的目标页中存储的使用所述LDPC编码以后的数据,所述软比特数据为所述NAND Flash存储所述原始数据的过程中所产生的数据,所述成对页数据是所述指定存储块中与所述目标页邻接的页中存储的数据;Step S204: instructing the NAND Flash controller to obtain designated data from the designated storage block, wherein the designated data includes: original data, soft bit data and paired page data; the original data is the data stored in the target page in the designated storage block after using the LDPC encoding, the soft bit data is the data generated in the process of the NAND Flash storing the original data, and the paired page data is the data stored in the page adjacent to the target page in the designated storage block;
需要说明的是,指示所述NANDFlash控制器从所述指定存储块中获取指定数据即相当于指示NANDFlash控制器触发软解码功能。It should be noted that instructing the NAND Flash controller to obtain designated data from the designated storage block is equivalent to instructing the NAND Flash controller to trigger a soft decoding function.
需要说明的是,原始数据(Raw data)指代接收到的、准备进行软解的比特序列;It should be noted that raw data refers to the received bit sequence ready for soft decoding;
需要说明的是,软比特数据(Soft bit)指代包含比特决策和相应可靠性信息的数据,软比特数据是NAND Flash存储器中用于管理和保护原始数据的一种中间数据形式,通过对原始数据进行处理和修正,确保数据在存储器中的可靠性和可靠性。It should be noted that soft bit data (Soft bit) refers to data containing bit decisions and corresponding reliability information. Soft bit data is an intermediate data form used in NAND Flash memory to manage and protect original data. By processing and correcting the original data, the reliability and reliability of the data in the memory are ensured.
软比特数据通常包括以下内容:1.ECC校验码:软比特数据中包含了用于错误检测和纠正的纠错码(ECC),以确保数据在读取和写入过程中的完整性。2.物理位置信息:软比特数据中可能包含有关数据在NAND Flash芯片中的物理位置信息,以帮助系统正确地读取和写入数据。3.页状态信息:软比特数据可能包含有关数据页的状态信息,例如是否已经擦除或写入新数据。4.数据转换信息:软比特数据可能包含有关数据编码和转换的信息,以确保数据在存储器中正确地表示和解释。Soft bit data usually includes the following: 1. ECC check code: Soft bit data contains error correction code (ECC) for error detection and correction to ensure the integrity of data during reading and writing. 2. Physical location information: Soft bit data may contain information about the physical location of data in the NAND Flash chip to help the system read and write data correctly. 3. Page status information: Soft bit data may contain status information about the data page, such as whether it has been erased or written with new data. 4. Data conversion information: Soft bit data may contain information about data encoding and conversion to ensure that data is correctly represented and interpreted in the memory.
需要说明的是,成对页数据(Couple page)指代软解一个page所需的相关page。It should be noted that the paired page data (Couple page) refers to the related pages required for soft decoding of a page.
在一个示例性的实施例中,上述步骤S204可以通过以下步骤S4 1实现:In an exemplary embodiment, the above step S204 can be implemented by the following steps S41:
步骤S4 1:向所述NAND Flash控制器发送软解指令,以指示所述NAND Flash控制器从所述指定存储块中获取指定数据。Step S41: Send a soft decoding instruction to the NAND Flash controller to instruct the NAND Flash controller to obtain designated data from the designated storage block.
也就是说,在本实施例中,可以通过指令的方式直接触发NAND Flash控制器的软解码功能,即直接向NAND Flash控制器发送软解指令,进而触发NAND Flash控制器的软解码功能。即通过上述步骤S4 1可以对SSD的软解硬件(即NAND Flash控制器)进行测试。That is to say, in this embodiment, the soft decoding function of the NAND Flash controller can be directly triggered by means of instructions, that is, a soft decoding instruction is directly sent to the NAND Flash controller, thereby triggering the soft decoding function of the NAND Flash controller. That is, through the above step S41, the soft decoding hardware of the SSD (that is, the NAND Flash controller) can be tested.
在一个示例性的实施例中,上述步骤S204还可以通过以下步骤S5 1-S52实现:In an exemplary embodiment, the above step S204 can also be implemented by the following steps S51-S52:
步骤S5 1:指示所述NAND Flash控制器向所述NAND Flash发送读指令,以从所述指定存储块中读取目标子数据,其中,所述目标子数据为使用所述LDPC对所述原始数据进行解码以后所得到的数据;Step S51: instructing the NAND Flash controller to send a read instruction to the NAND Flash to read target sub-data from the designated storage block, wherein the target sub-data is data obtained after decoding the original data using the LDPC;
步骤S52:在获取到所述NAND Flash响应所述读指令所发送的状态数据的情况下,将所述状态数据中的目标比特位的值设置为预设值,其中,所述目标比特位的值为所述预设值用于指示读取数据出现错误,在所述NANDFlash控制器确定所述状态数据中的目标比特位的值为所述预设值的情况下,所述NANDFlash控制器从所述指定存储块中获取所述指定数据。Step S52: when the status data sent by the NAND Flash in response to the read instruction is obtained, the value of the target bit in the status data is set to a preset value, wherein the value of the target bit is the preset value and is used to indicate that an error has occurred in the read data. When the NAND Flash controller determines that the value of the target bit in the status data is the preset value, the NAND Flash controller obtains the specified data from the specified storage block.
相关技术中,NAND Flash控制器向NAND Flash发送读指令之后,NAND Flash会返回一个状态数据,进而NAND Flash控制器可以通过状态数据中的目标比特位的值来确定是否触发软解码功能,如果NAND Flash控制器确定状态数据中的目标比特位的值为预设值,则NAND Flash控制器就会触发软解码功能。In the related art, after the NAND Flash controller sends a read instruction to the NAND Flash, the NAND Flash will return a status data, and then the NAND Flash controller can determine whether to trigger the soft decoding function according to the value of the target bit in the status data. If the NAND Flash controller determines that the value of the target bit in the status data is a preset value, the NAND Flash controller will trigger the soft decoding function.
进而在本申请实施例中,可以主动的将NAND Flash返回的状态数据中的目标比特位的值设置为预设值,进而触发NANDFlash控制器的软解码功能,进而通过上述步骤S5 1-S52可以对NANDFlash控制器的整个软解码模块进行测试。Furthermore, in the embodiment of the present application, the value of the target bit in the status data returned by the NAND Flash can be actively set to a preset value, thereby triggering the soft decoding function of the NAND Flash controller, and then the entire soft decoding module of the NAND Flash controller can be tested through the above steps S51-S52.
步骤S206:对所述原始数据进行注错,得到错误数据;Step S206: Annotate the original data to obtain error data;
在一个示例性的实施例中,上述步骤S206可以通过以下步骤S6 1-S62实现:In an exemplary embodiment, the above step S206 can be implemented by the following steps S61-S62:
步骤S61:从所述原始数据中确定N个目标比特位,其中,所述原始数据具有M个比特位,所述M个比特位包括所述N个目标比特位,N与M的比值小于预设阈值;Step S61: determining N target bits from the original data, wherein the original data has M bits, the M bits include the N target bits, and a ratio of N to M is less than a preset threshold;
需要说明的是,N为大于零的正整数,M为大于等于N的正整数。It should be noted that N is a positive integer greater than zero, and M is a positive integer greater than or equal to N.
步骤S62:将所述原始数据在所述N个目标比特位中的每个目标比特位上的数据进行数据翻转。Step S62: Flip the data of each target bit of the original data in the N target bits.
可选地,如果目标比特位上的数据为1,则数据翻转后目标比特位上的数据为0,如果目标比特位上的数据为0,则数据翻转后目标比特位上的数据为1。Optionally, if the data on the target bit is 1, the data on the target bit is 0 after the data is flipped; if the data on the target bit is 0, the data on the target bit is 1 after the data is flipped.
需要说明的是,通过上述步骤S6 1-S62,可以快速地对原始数据进行注错。It should be noted that, through the above steps S61-S62, the original data can be quickly annotated.
步骤S208:指示所述NAND Flash控制器根据所述软比特数据和所述成对页数据对所述错误数据进行软解码,得到软解码结果;Step S208: instructing the NAND Flash controller to soft-decode the error data according to the soft bit data and the paired page data to obtain a soft decoding result;
可选地,软解码结果包括但不限于:循环冗余校验(Cyclic Redundancy Check,简称为CRC)的校验值,错误校正码(Error Correction Code,简称为ECC)的校验值。Optionally, the soft decoding result includes but is not limited to: a check value of a cyclic redundancy check (CRC) and a check value of an error correction code (ECC).
需要说明的是,CRC是一种主要用于检测数据传输或存储过程中出现错误的技术,ECC是一种用于检测和自动纠正数据中错误的编码技术。It should be noted that CRC is a technology mainly used to detect errors in data transmission or storage, and ECC is a coding technology used to detect and automatically correct errors in data.
步骤S2 1 0:根据所述软解码结果验证所述NAND Flash控制器的软解码功能。Step S210: verifying the soft decoding function of the NAND Flash controller according to the soft decoding result.
在一个示例性的实施例中,上述步骤S210可以通过以下步骤S71-S73实现:In an exemplary embodiment, the above step S210 can be implemented by the following steps S71-S73:
步骤S7 1:在所述软解码结果中的循环冗余校验CRC校验值和错误校正码ECC校验值均为零的情况下,确定所述NAND Flash控制器的软解码功能正常;Step S7 1: When the cyclic redundancy check CRC check value and the error correction code ECC check value in the soft decoding result are both zero, it is determined that the soft decoding function of the NAND Flash controller is normal;
步骤S72:在所述软解码结果中的所述CRC校验值不为零的情况下,确定所述NANDFlash控制器的软解码功能异常;Step S72: when the CRC check value in the soft decoding result is not zero, determining that the soft decoding function of the NAND Flash controller is abnormal;
步骤S73:在所述软解码结果中的所述ECC校验值不为零的情况下,确定所述NANDFlash控制器的软解码功能异常。Step S73: when the ECC check value in the soft decoding result is not zero, it is determined that the soft decoding function of the NAND Flash controller is abnormal.
需要说明的是,CRC校验值为0表示数据在传输或存储过程中没有发现错误,在软解码处理后,如果CRC为0,则说明数据在处理过程中没有发生传输错误或数据损坏,数据的完整性得到保证。ECC校验值为0表示数据在纠错处理后没有发现错误或成功纠正了所有的错误,在软解码处理后,如果ECC为0,则表示纠错码成功纠正了所有的错误位,数据已经被正确恢复。It should be noted that a CRC check value of 0 indicates that no error was found during data transmission or storage. After soft decoding, if CRC is 0, it means that no transmission error or data damage occurred during data processing, and data integrity is guaranteed. An ECC check value of 0 indicates that no error was found or all errors were successfully corrected after error correction. After soft decoding, if ECC is 0, it means that the error correction code successfully corrected all error bits and the data has been correctly recovered.
需要说明的是,通过上述步骤S7 1-S73,可以快速准确地验证NAND Flash控制器的软解码功能。It should be noted that, through the above steps S71-S73, the soft decoding function of the NAND Flash controller can be verified quickly and accurately.
需要说明的是,上述步骤S7 1-S73是在不同情况下所执行的步骤,其没有执行的先后顺序。It should be noted that the above steps S71-S73 are steps executed in different situations and there is no specific execution order.
上述步骤S202-S2 1 0,指示NAND Flash控制器先将目标数据写入NAND Flash中,再从NAND Flash中获取原始数据、软比特数据和成对页数据(即主动触发NAND Flash控制器的软解码功能),将原始数据进行注错,得到错误数据,接着指示NAND Flash控制器根据软比特数据和成对页数据对错误数据进行软解码,从而根据解码结果验证NAND Flash控制器的软解码功能是否正确。即本申请可以主动地触发NAND Flash控制器的软解码功能,进而验证NAND Flash控制器的软解码功能是否正常,解决了无法主动对SSD中的软解码功能进行验证的问题。The above steps S202-S210 instruct the NAND Flash controller to first write the target data into the NAND Flash, then obtain the original data, soft bit data and paired page data from the NAND Flash (i.e., actively trigger the soft decoding function of the NAND Flash controller), perform error injection on the original data to obtain error data, and then instruct the NAND Flash controller to soft-decode the error data according to the soft bit data and paired page data, thereby verifying whether the soft decoding function of the NAND Flash controller is correct according to the decoding result. That is, the present application can actively trigger the soft decoding function of the NAND Flash controller, and then verify whether the soft decoding function of the NAND Flash controller is normal, thereby solving the problem that the soft decoding function in the SSD cannot be actively verified.
显然,上述所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。为了更好的理解上述方法,以下结合实施例对上述过程进行说明,但不用于限定本发明实施例的技术方案,具体地:Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:
本申请分为3个层次的测试,分别是寄存器测试,软解硬件测试和软解功能测试,其中,上述三个层次的测试可以通过对应的编写测试脚本,进而根据测试脚本执行NandFlash控制器执行对应的操作,进而完成测试任务。This application is divided into three levels of testing, namely register testing, soft hardware testing and soft function testing. The above three levels of testing can be completed by writing corresponding test scripts, and then executing the NandFlash controller to perform corresponding operations according to the test scripts, thereby completing the test tasks.
1、寄存器测试:对于RO类型的寄存器,依次读出各个寄存器的值,正常值为0;对于RW类型的寄存器,依次向各个寄存器的bit位写1,再读出各个寄存器的值,各个bit全为1,表明RW寄存器测试正常;对于RW1C类型的bit,写入1以后,读出为0,表明此寄存器的bit正常。1. Register test: For RO type registers, read out the value of each register in turn, and the normal value is 0; for RW type registers, write 1 to the bit of each register in turn, and then read out the value of each register. All bits are 1, indicating that the RW register test is normal; for RW1C type bits, after writing 1, read out as 0, indicating that the bit of this register is normal.
2、软解硬件测试:主机通过发送消息操作Nand Flash控制器对指定的block进行擦除,然后写入page初始数据(即上述目标数据);然后再发送读取数据的消息,NandFlash控制器从NAND闪存中读取raw data、soft bit data、couple page data到指定的地址。如图3所示,Nand Flash控制器先擦除存储块中指定的Block数据,接着向Nand中写入Page初始数据,然后读取指定数据,通过串口命令启动软解(包括配置软解模式),向raw data中注错、经过软解码过程以获得软解结果,最后确定检测软解结果中的CRC、ECC是否为0,以确定Nand Flash控制器的软解码功能是否正常。2. Soft decoding hardware test: The host sends a message to operate the Nand Flash controller to erase the specified block, and then writes the page initial data (i.e. the target data mentioned above); then sends a message to read the data, and the Nand Flash controller reads the raw data, soft bit data, and couple page data from the NAND flash memory to the specified address. As shown in Figure 3, the Nand Flash controller first erases the specified Block data in the storage block, then writes the Page initial data to the Nand, and then reads the specified data, starts the soft decoding (including configuring the soft decoding mode) through the serial port command, injects errors into the raw data, and obtains the soft decoding result through the soft decoding process. Finally, it is determined whether the CRC and ECC in the soft decoding result are 0 to determine whether the soft decoding function of the Nand Flash controller is normal.
3、软解功能测试:包括测试软解状态机和硬件。如图4所示,用户通过串口输入软解模块测试指令,启动软解模块的测试,Nand Flash控制器先擦除存储块中指定的Block数据,接着向Nand中写入Page初始数据,并发送读指令以读取目标子数据,主机强制将读指令返回的状态中的error bitmap置1,进而Nand Flash控制器启动软解状态机以读出rawdata、soft bit data、couple page data,并向raw data中注错,启动软解驱动获得软解结果,最后确定检测软解结果中的CRC、ECC是否为0,以确定Nand Flash控制器的软解码功能是否正常。3. Soft decoding function test: including testing the soft decoding state machine and hardware. As shown in Figure 4, the user inputs the soft decoding module test command through the serial port to start the test of the soft decoding module. The Nand Flash controller first erases the specified Block data in the storage block, then writes the Page initial data to the Nand, and sends a read command to read the target sub-data. The host forces the error bitmap in the status returned by the read command to be set to 1, and then the Nand Flash controller starts the soft decoding state machine to read out the raw data, soft bit data, and couple page data, and annotates the error in the raw data, starts the soft decoding driver to obtain the soft decoding result, and finally determines whether the CRC and ECC in the soft decoding result are 0 to determine whether the soft decoding function of the Nand Flash controller is normal.
为了更好的理解,以下对寄存器测试、软解硬件测试、软解功能测试进行具体说明:For a better understanding, the following is a detailed description of register test, software solution hardware test, and software solution function test:
1、寄存器测试:(1)代码中设置test类型为软解寄存器测试;(2)编译后上电;1. Register test: (1) Set the test type in the code to soft decode register test; (2) Power on after compiling;
(3)通过log日志查看测试结果。(3) View the test results through the log.
2、软解硬件测试:(1)代码中设置test类型为软解硬件测试;(2)编译后上电,通过串口命令对指定的block进行擦除,然后写入page初始数据;(3)通过串口命令读取rawdata、soft bit data、couple page data,对raw data进行注错;(4)通过串口命令启动软解;(5)检查软解结果CRC、ECC为0。2. Soft decoding hardware test: (1) Set the test type to soft decoding hardware test in the code; (2) After compiling, power on, erase the specified block through the serial port command, and then write the page initial data; (3) Read raw data, soft bit data, and couple page data through the serial port command, and annotate the raw data; (4) Start soft decoding through the serial port command; (5) Check that the CRC and ECC of the soft decoding results are 0.
3、软解功能测试:(1)代码中设置test类型为软解功能测试;(2)编译后上电,通过串口命令对指定的地址写入一笔数据并进行读取;(3)通过串口命令将读取返回状态Errorbitmap置1,启动软解状态机;(4)通过串口命令对raw data进行注错;(5)检查软解结果CRC、ECC为0。3. Soft decoding function test: (1) Set the test type to soft decoding function test in the code; (2) After compiling, power on, write a data to the specified address and read it through the serial port command; (3) Set the read return status Errorbitmap to 1 through the serial port command to start the soft decoding state machine; (4) Annotate the raw data with errors through the serial port command; (5) Check that the CRC and ECC of the soft decoding results are 0.
需要说明的是,本申请所提出的是一种基于Nand Flash控制器读取NAND数据时进行的软解校验纠错方式的SSD软件注错测试功能。这一功能的设计,旨在针对软解模块从硬件到软件进行全面且细致的测试,确保软解模块在复杂和多变的工作环境中都能稳定、准确地运行。It should be noted that the application proposes a SSD software error test function based on the soft decoding and error correction method performed when the Nand Flash controller reads NAND data. This function is designed to conduct a comprehensive and detailed test on the soft decoding module from hardware to software to ensure that the soft decoding module can run stably and accurately in a complex and changing working environment.
需要说明的是,在应用本申请的注错测试方法时,能够在SSD软件的不同阶段、不同环节注入错误,以模拟实际使用过程中可能出现的各种异常情况。通过这种方式,可以有效地验证软解模块的硬件功能是否满足设计要求,能否在出现错误时正确地进行纠正和恢复。It should be noted that when applying the error injection test method of this application, errors can be injected into different stages and links of the SSD software to simulate various abnormal situations that may occur during actual use. In this way, it can be effectively verified whether the hardware functions of the software solution module meet the design requirements and whether it can correctly correct and recover when errors occur.
需要说明的是,本申请还具备主动验证测试固件代码的能力。通过对固件代码的注入错误测试,可以及时发现代码中的潜在问题,比如逻辑错误、内存泄漏等,从而在早期阶段就进行修复和优化,避免在后续开发和使用过程中出现更大的问题。It should be noted that this application also has the ability to actively verify and test firmware code. By injecting errors into the firmware code, potential problems in the code can be discovered in a timely manner, such as logic errors, memory leaks, etc., so that they can be repaired and optimized at an early stage to avoid larger problems in subsequent development and use.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
在本实施例中还提供了一种软解码功能的验证装置,用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语"模块″可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的模块较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a verification device for soft decoding function is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and/or hardware of a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
图5是根据本申请实施例的一种软解码功能的验证装置的结构框图,该装置包括:FIG5 is a structural block diagram of a verification device for a soft decoding function according to an embodiment of the present application, the device comprising:
写入模块502,用于指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;The writing module 502 is used to instruct the non-volatile flash memory NAND Flash controller in the solid state drive SSD to write the target data into a designated storage block in the NAND Flash using a low-density parity check code LDPC;
获取模块504,用于指示所述NAND Flash控制器从所述指定存储块中获取指定数据,其中,所述指定数据包括:原始数据,软比特数据和成对页数据;所述原始数据为所述指定存储块中的目标页中存储的使用所述LDPC编码以后的数据,所述软比特数据为所述NANDFlash存储所述原始数据的过程中所产生的数据,所述成对页数据是所述指定存储块中与所述目标页邻接的页中存储的数据;The acquisition module 504 is used to instruct the NAND Flash controller to acquire designated data from the designated storage block, wherein the designated data includes: original data, soft bit data and paired page data; the original data is the data stored in the target page in the designated storage block after using the LDPC encoding, the soft bit data is the data generated in the process of the NAND Flash storing the original data, and the paired page data is the data stored in the page adjacent to the target page in the designated storage block;
注错模块506,用于对所述原始数据进行注错,得到错误数据;An error annotation module 506 is used to perform error annotation on the original data to obtain error data;
软解码模块508,用于指示所述NAND Flash控制器根据所述软比特数据和所述成对页数据对所述错误数据进行软解码,得到软解码结果;A soft decoding module 508, configured to instruct the NAND Flash controller to perform soft decoding on the error data according to the soft bit data and the paired page data to obtain a soft decoding result;
验证模块510,用于根据所述软解码结果验证所述NAND Flash控制器的软解码功能。The verification module 510 is used to verify the soft decoding function of the NAND Flash controller according to the soft decoding result.
上述装置,指示NAND Flash控制器先将目标数据写入NAND Flash中,再从NANDFlash中获取原始数据、软比特数据和成对页数据(即主动触发NAND Flash控制器的软解码功能),将原始数据进行注错,得到错误数据,接着指示NAND Flash控制器根据软比特数据和成对页数据对错误数据进行软解码,从而根据解码结果验证NAND Flash控制器的软解码功能是否正确。即本申请可以主动地触发NAND Flash控制器的软解码功能,进而验证NAND Flash控制器的软解码功能是否正常,解决了无法主动对SSD中的软解码功能进行验证的问题。The above device instructs the NAND Flash controller to first write the target data into the NAND Flash, then obtains the original data, soft bit data and paired page data from the NAND Flash (i.e., actively triggers the soft decoding function of the NAND Flash controller), injects errors into the original data to obtain error data, and then instructs the NAND Flash controller to soft-decode the error data according to the soft bit data and paired page data, thereby verifying whether the soft decoding function of the NAND Flash controller is correct according to the decoding result. That is, the present application can actively trigger the soft decoding function of the NAND Flash controller, and then verify whether the soft decoding function of the NAND Flash controller is normal, which solves the problem that the soft decoding function in the SSD cannot be actively verified.
在一个示例性的实施例中,上述装置还包括:确定模块,用于在所述指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NANDFlash中的指定存储块之前,获取所述NAND Flash控制器中的第一类型的寄存器中存储的数据,并在所述第一类型的寄存器中存储的数据满足第一预设条件的情况下,确定所述NAND Flash控制器中的所述第一类型的寄存器未出现异常,其中,所述第一类型的寄存器中包含的数据是预先设定的、且无法被修改;和/或向所述NAND Flash控制器中的第二类型的寄存器写入第一预设数据;获取所述NAND Flash控制器中的所述第二类型的寄存器中存储的数据,并在所述第二类型的寄存器中存储的数据为所述第一预设数据的情况下,确定所述NAND Flash控制器中的所述第二类型的寄存器未出现异常,其中,所述第二类型的寄存器允许写入数据、且允许被读取其中存储的数据;和/或向所述NAND Flash控制器中的第三类型的寄存器写入第二预设数据;获取所述NAND Flash控制器中的所述第三类型的寄存器中存储的数据,并在所述第三类型的寄存器中存储的数据为第三预设数据的情况下,确定所述NAND Flash控制器中的所述第三类型的寄存器未出现异常,其中,所述第三类型的寄存器在写入所述第二预设数据之后,所述第三类型的寄存器的相应位会被清除。In an exemplary embodiment, the above-mentioned device also includes: a determination module, which is used to obtain data stored in a first type of register in the NAND Flash controller before instructing the non-volatile flash memory NAND Flash controller in the solid state drive SSD to use a low-density parity check code LDPC to write the target data to a designated storage block in the NAND Flash, and determine that the first type of register in the NAND Flash controller has no abnormality when the data stored in the first type of register meets a first preset condition, wherein the data contained in the first type of register is preset and cannot be modified; and/or write first preset data to a second type of register in the NAND Flash controller; obtain data stored in the second type of register in the NAND Flash controller, and determine that the second type of register in the NAND Flash controller has no abnormality when the data stored in the second type of register is the first preset data, wherein the second type of register allows data to be written and allows the data stored therein to be read; and/or write second preset data to a third type of register in the NAND Flash controller; obtain data stored in the third type of register in the NAND Flash controller, and determine that the NAND Flash controller has no abnormality when the data stored in the third type of register is the third preset data. There is no abnormality in the third type of register in the Flash controller, wherein after the second preset data is written into the third type of register, the corresponding bit of the third type of register will be cleared.
在一个示例性的实施例中,上述装置还包括:擦除模块,用于在所述指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NANDFlash中的指定存储块之前,指示所述NAND Flash控制器擦除所述指定存储块中存储的数据;写入模块502,用于指示所述NAND Flash控制器使用LDPC将目标数据写入所述NANDFlash中的指定存储块中的一个或多个指定页,其中,所述一个或多个指定页包括所述目标页。In an exemplary embodiment, the above-mentioned device also includes: an erase module, which is used to instruct the non-volatile flash memory NAND Flash controller in the solid state drive SSD to erase the data stored in the specified storage block before instructing the NAND Flash controller to use a low-density parity check code LDPC to write the target data to the specified storage block in the NAND Flash; a write module 502, which is used to instruct the NAND Flash controller to use LDPC to write the target data to one or more specified pages in the specified storage block in the NAND Flash, wherein the one or more specified pages include the target page.
在一个示例性的实施例中,所述获取模块504,用于通过以下方式指示所述NANDFlash控制器从所述指定存储块中获取指定数据:向所述NAND Flash控制器发送软解指令,以指示所述NAND Flash控制器从所述指定存储块中获取指定数据。In an exemplary embodiment, the acquisition module 504 is used to instruct the NAND Flash controller to obtain the specified data from the specified storage block in the following manner: sending a soft decoding instruction to the NAND Flash controller to instruct the NAND Flash controller to obtain the specified data from the specified storage block.
在一个示例性的实施例中,所述获取模块504,还用于通过以下方式指示所述NANDFlash控制器从所述指定存储块中获取指定数据:指示所述NAND Flash控制器向所述NAND Flash发送读指令,以从所述指定存储块中读取目标子数据,其中,所述目标子数据为使用所述LDPC对所述原始数据进行解码以后所得到的数据;在获取到所述NAND Flash响应所述读指令所发送的状态数据的情况下,将所述状态数据中的目标比特位的值设置为预设值,其中,所述目标比特位的值为所述预设值用于指示读取数据出现错误,在所述NANDFlash控制器确定所述状态数据中的目标比特位的值为所述预设值的情况下,所述NANDFlash控制器从所述指定存储块中获取所述指定数据。In an exemplary embodiment, the acquisition module 504 is also used to instruct the NAND Flash controller to acquire specified data from the specified storage block in the following manner: instruct the NAND Flash controller to send a read instruction to the NAND Flash to read target sub-data from the specified storage block, wherein the target sub-data is data obtained after decoding the original data using the LDPC; when the status data sent by the NAND Flash in response to the read instruction is acquired, the value of the target bit in the status data is set to a preset value, wherein the value of the target bit is the preset value used to indicate that an error has occurred in the read data, and when the NAND Flash controller determines that the value of the target bit in the status data is the preset value, the NAND Flash controller acquires the specified data from the specified storage block.
在一个示例性的实施例中,所述注错模块506,用于通过以下方式对所述原始数据进行注错,得到错误数据:从所述原始数据中确定N个目标比特位,其中,所述原始数据具有M个比特位,所述M个比特位包括所述N个目标比特位,N与M的比值小于预设阈值;将所述原始数据在所述N个目标比特位中的每个目标比特位上的数据进行数据翻转。In an exemplary embodiment, the error injection module 506 is used to perform error injection on the original data to obtain erroneous data in the following manner: determine N target bits from the original data, wherein the original data has M bits, the M bits include the N target bits, and the ratio of N to M is less than a preset threshold; and flip the data at each target bit of the N target bits of the original data.
在一个示例性的实施例中,验证模块51 0,用于通过以下方式根据所述软解码结果验证所述NAND Flash控制器的软解码功能:在所述软解码结果中的循环冗余校验CRC校验值和错误校正码ECC校验值均为零的情况下,确定所述NAND Flash控制器的软解码功能正常;在所述软解码结果中的所述CRC校验值不为零的情况下,确定所述NAND Flash控制器的软解码功能异常;在所述软解码结果中的所述ECC校验值不为零的情况下,确定所述NANDFlash控制器的软解码功能异常。In an exemplary embodiment, the verification module 510 is used to verify the soft decoding function of the NAND Flash controller according to the soft decoding result in the following manner: when the cyclic redundancy check CRC check value and the error correction code ECC check value in the soft decoding result are both zero, it is determined that the soft decoding function of the NAND Flash controller is normal; when the CRC check value in the soft decoding result is not zero, it is determined that the soft decoding function of the NAND Flash controller is abnormal; when the ECC check value in the soft decoding result is not zero, it is determined that the soft decoding function of the NAND Flash controller is abnormal.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
本申请的实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
可选地,在本实施例中,上述计算机程序可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
S 1,指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;S 1, instructing the non-volatile flash memory NAND Flash controller in the solid state drive SSD to write the target data into a specified storage block in the NAND Flash using a low-density parity check code LDPC;
S2,指示所述NANDFlash控制器从所述指定存储块中获取指定数据,其中,所述指定数据包括:原始数据,软比特数据和成对页数据;所述原始数据为所述指定存储块中的目标页中存储的使用所述LDPC编码以后的数据,所述软比特数据为所述NAND Flash存储所述原始数据的过程中所产生的数据,所述成对页数据是所述指定存储块中与所述目标页邻接的页中存储的数据;S2, instructing the NAND Flash controller to obtain designated data from the designated storage block, wherein the designated data includes: original data, soft bit data and paired page data; the original data is the data stored in the target page in the designated storage block after using the LDPC encoding, the soft bit data is the data generated in the process of the NAND Flash storing the original data, and the paired page data is the data stored in the page adjacent to the target page in the designated storage block;
S 3,对所述原始数据进行注错,得到错误数据;S3, performing error annotation on the original data to obtain error data;
S4,指示所述NAND Flash控制器根据所述软比特数据和所述成对页数据对所述错误数据进行软解码,得到软解码结果;S4, instructing the NAND Flash controller to soft-decode the error data according to the soft bit data and the paired page data to obtain a soft decoding result;
S 5,根据所述软解码结果验证所述NAND Flash控制器的软解码功能。S5: Verify the soft decoding function of the NAND Flash controller according to the soft decoding result.
在一个示例性实施例中,上述计算机可读存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
本申请的实施例还提供了一种电子设备,如图6所示,该电子设备包括存储器602和处理器604,该存储器602中存储有计算机程序,该处理器604被设置为通过计算机程序执行上述任一项方法实施例中的步骤。An embodiment of the present application further provides an electronic device, as shown in FIG6 , the electronic device includes a memory 602 and a processor 604 , the memory 602 stores a computer program, and the processor 604 is configured to execute the steps in any of the above method embodiments through the computer program.
可选地,在本实施例中,上述处理器604可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the processor 604 may be configured to perform the following steps through a computer program:
S 1,指示固态硬盘SSD中的非易失性闪存NAND Flash控制器使用低密度奇偶校验码LDPC将目标数据写入NAND Flash中的指定存储块;S 1, instructing the non-volatile flash memory NAND Flash controller in the solid state drive SSD to write the target data into a specified storage block in the NAND Flash using a low-density parity check code LDPC;
S2,指示所述NANDFlash控制器从所述指定存储块中获取指定数据,其中,所述指定数据包括:原始数据,软比特数据和成对页数据;所述原始数据为所述指定存储块中的目标页中存储的使用所述LDPC编码以后的数据,所述软比特数据为所述NAND Flash存储所述原始数据的过程中所产生的数据,所述成对页数据是所述指定存储块中与所述目标页邻接的页中存储的数据;S2, instructing the NAND Flash controller to obtain designated data from the designated storage block, wherein the designated data includes: original data, soft bit data and paired page data; the original data is the data stored in the target page in the designated storage block after using the LDPC encoding, the soft bit data is the data generated in the process of the NAND Flash storing the original data, and the paired page data is the data stored in the page adjacent to the target page in the designated storage block;
S 3,对所述原始数据进行注错,得到错误数据;S3, performing error annotation on the original data to obtain error data;
S4,指示所述NAND Flash控制器根据所述软比特数据和所述成对页数据对所述错误数据进行软解码,得到软解码结果;S4, instructing the NAND Flash controller to soft-decode the error data according to the soft bit data and the paired page data to obtain a soft decoding result;
S 5,根据所述软解码结果验证所述NAND Flash控制器的软解码功能。S5: Verify the soft decoding function of the NAND Flash controller according to the soft decoding result.
本实施例中的具体示例可以参考上述实施例及示例性实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
可选地,本领域普通技术人员可以理解,图6所示的结构仅为示意,图6并不对上述电子设备的结构造成限定。例如,电子设备还可包括比图6中所示更多或者更少的组件(如网络接口等),或者具有与图6所示不同的配置。Alternatively, those skilled in the art will appreciate that the structure shown in FIG6 is for illustration only, and FIG6 does not limit the structure of the electronic device. For example, the electronic device may include more or fewer components (such as network interfaces, etc.) than those shown in FIG6, or may have a configuration different from that shown in FIG6.
其中,存储器602可用于存储软件程序以及模块,如本申请实施例中的软解码功能的验证方法和软解码功能的验证装置对应的程序指令/模块,处理器604通过运行存储在存储器602内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的软解码功能的验证方法。存储器602可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器602可进一步包括相对于处理器604远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。其中,存储器602具体可以但不限于用于存储系统配置文件等信息。作为一种示例,如图6所示,上述存储器602中可以但不限于包括上述的软解码功能的验证装置中的写入模块502、获取模块504、注错模块506、软解码模块508、验证模块510。此外,还可以包括但不限于上述的软解码功能的验证装置中的其他模块单元,本示例中不再赘述。Among them, the memory 602 can be used to store software programs and modules, such as the program instructions/modules corresponding to the verification method of the soft decoding function and the verification device of the soft decoding function in the embodiment of the present application. The processor 604 executes various functional applications and data processing by running the software programs and modules stored in the memory 602, that is, the verification method of the soft decoding function mentioned above is realized. The memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 602 may further include a memory remotely arranged relative to the processor 604, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. Among them, the memory 602 may be specifically used for storing information such as system configuration files, but is not limited to it. As an example, as shown in Figure 6, the above-mentioned memory 602 may include but is not limited to the writing module 502, the acquisition module 504, the error injection module 506, the soft decoding module 508, and the verification module 510 in the verification device of the above-mentioned soft decoding function. In addition, other module units in the verification device may also be included but not limited to the above-mentioned soft decoding function, which will not be described in detail in this example.
可选地,上述的传输装置606用于经由一个网络接收或者发送数据。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置606包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置606为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。Optionally, the transmission device 606 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 606 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 606 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
此外,上述电子设备还包括:显示器608;和连接总线61 0,用于连接上述电子设备中的各个模块部件。In addition, the electronic device further includes: a display 608; and a connection bus 610, which is used to connect various module components in the electronic device.
在其他实施例中,上述电子设备可以是一个分布式系统中的一个节点,其中,该分布式系统可以为区块链系统,该区块链系统可以是由该多个节点通过网络通信的形式连接形成的分布式系统。其中,节点之间可以组成点对点(P2P,Peer To Peer)网络,任意形式的计算设备,比如服务器、终端等电子设备都可以通过加入该点对点网络而成为该区块链系统中的一个节点。In other embodiments, the electronic device may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
本申请的实施例还提供了一种计算机程序产品,上述计算机程序产品包括计算机程序,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
本申请的实施例还提供了另一种计算机程序产品,包括非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储计算机程序,所述计算机程序被处理器执行时实现上述任一项方法实施例中的步骤。An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
本中请的实施例还提供了一种计算机程序,该计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中;计算机设备的处理器从计算机可读存储介质读取该计算机指令,处埋器执行该计算机指令,使得该计算机设备执行上述任一项方法实施例中的步骤。The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
显然,本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410832499.6A CN118841056A (en) | 2024-06-25 | 2024-06-25 | Verification method and device for soft decoding function, storage medium and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410832499.6A CN118841056A (en) | 2024-06-25 | 2024-06-25 | Verification method and device for soft decoding function, storage medium and electronic equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118841056A true CN118841056A (en) | 2024-10-25 |
Family
ID=93141508
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410832499.6A Pending CN118841056A (en) | 2024-06-25 | 2024-06-25 | Verification method and device for soft decoding function, storage medium and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118841056A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119360933A (en) * | 2024-12-27 | 2025-01-24 | 深圳宏芯宇电子股份有限公司 | Error correction capability evaluation method and data storage system |
| CN120234180A (en) * | 2025-05-30 | 2025-07-01 | 苏州元脑智能科技有限公司 | Data processing method, electronic device, storage medium and program product |
-
2024
- 2024-06-25 CN CN202410832499.6A patent/CN118841056A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119360933A (en) * | 2024-12-27 | 2025-01-24 | 深圳宏芯宇电子股份有限公司 | Error correction capability evaluation method and data storage system |
| CN120234180A (en) * | 2025-05-30 | 2025-07-01 | 苏州元脑智能科技有限公司 | Data processing method, electronic device, storage medium and program product |
| CN120234180B (en) * | 2025-05-30 | 2025-08-12 | 苏州元脑智能科技有限公司 | Data processing method, electronic device, storage medium and program product |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101848000B (en) | Decoding method, encoding method and start control system | |
| KR101225924B1 (en) | Copyback optimization for memory system | |
| TWI674767B (en) | Turbo product codes for nand flash | |
| TWI537966B (en) | Error processing method, memory storage device and memory controlling circuit unit | |
| TWI540586B (en) | Decoding method, memory storage device, and memory controlling circuit unit | |
| CN110347530B (en) | Data storage device and method of operating the same | |
| CN118841056A (en) | Verification method and device for soft decoding function, storage medium and electronic equipment | |
| TWI670715B (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI685850B (en) | Memory management method and storage controller | |
| TWI612527B (en) | Decoding method, memory storage device and memory control circuit unit | |
| KR20150017948A (en) | the method of ECC decoder operation and the memory controller including it | |
| CN106158040B (en) | Read voltage level estimation method, memory storage device and control circuit unit | |
| TW201642266A (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN106297883B (en) | Decoding method, memory storage device, and memory control circuit unit | |
| TW201546815A (en) | Decoding method, memory storage device and memory controlling circuit unit | |
| TWI573147B (en) | Decoding method, memory storage device and memory control circuit unit | |
| TWI594255B (en) | Decoding method, memory controlling circuit unit and memory storage device | |
| CN104733051A (en) | Decoding method of parity check code, memory storage device and control circuit unit | |
| KR20150006616A (en) | Data processing system and operating method thereof | |
| TWI564904B (en) | Data managing method, memory control circuit unit and memory storage apparatus | |
| CN105022674A (en) | Decoding method, memory storage device, memory control circuit unit | |
| CN101634938A (en) | Data migration method and data migration device of solid state disk and solid state disk | |
| CN105304142A (en) | Decoding method, memory storage device and memory control circuit unit | |
| CN113168882B (en) | An encoding method, a decoding method and a storage controller | |
| CN105575440B (en) | error processing 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 |