CN106992027A - 一种模拟Nand坏块的动态注入方法 - Google Patents

一种模拟Nand坏块的动态注入方法 Download PDF

Info

Publication number
CN106992027A
CN106992027A CN201710245208.3A CN201710245208A CN106992027A CN 106992027 A CN106992027 A CN 106992027A CN 201710245208 A CN201710245208 A CN 201710245208A CN 106992027 A CN106992027 A CN 106992027A
Authority
CN
China
Prior art keywords
type
note
bit
wrong
addr
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
Application number
CN201710245208.3A
Other languages
English (en)
Other versions
CN106992027B (zh
Inventor
赵亚洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Guangdong Inspur Big Data Research Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Inspur Big Data Research Co Ltd filed Critical Guangdong Inspur Big Data Research Co Ltd
Priority to CN201710245208.3A priority Critical patent/CN106992027B/zh
Publication of CN106992027A publication Critical patent/CN106992027A/zh
Application granted granted Critical
Publication of CN106992027B publication Critical patent/CN106992027B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/10Test algorithms, e.g. memory scan [MScan] algorithms; Test patterns, e.g. checkerboard patterns 
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/14Implementation of control logic, e.g. test mode decoders
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/18Address generation devices; Devices for accessing memories, e.g. details of addressing circuits

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开一种模拟Nand坏块的动态注入方法,包括以下步骤:S1:选择注错类型,构建注错模型;S2:根据所构建的注错模型构建注错数据,形成链表数据;S3:Host端将链表数据发送给固件;S4:固件根据注错模型判断注错类型,向Host端返回错误数据;S5:Host端校验返回信息是否符合预期,验证固件功能。本方案相比传统单一注错方法更灵活,更具扩展性,可快速辅助坏块管理的验证,提高对坏块管理方案的验证效率。

Description

一种模拟Nand坏块的动态注入方法
技术领域
本发明涉及Nand坏块管理的验证方法,具体涉及一种模拟Nand坏块的动态注入方法。
背景技术
由于Nand Flash的特性,在频繁使用SSD的过程中会出现一些坏块,针对坏块的管理,各家厂商都会设计出不同的管理方案,而管理方案的可行性和可靠性验证就成为了设计者们特别关注的问题,因此需要设计一种可以对Nand Flash Page、block、die乃至Target动态注错的方法来辅助验证坏块管理方案。
发明内容
为解决上问题,本发明提供一种基于组合求模的模拟Nand Media错误方法,可根据错误构建模型。
本发明的技术方案是:一种模拟Nand坏块的动态注入方法,包括以下步骤:
S1:选择注错类型,构建注错模型;
S2:根据所构建的注错模型构建注错数据,形成链表数据;
S3:Host端将链表数据发送给固件;
S4:固件根据注错模型判断注错类型,向Host端返回错误数据;
S5:Host端校验返回信息是否符合预期,验证固件功能。
进一步地,步骤S1中,通过Dword0、Dword1、Dword2、Dword3和Dword4五个Dword数据构建注错模型。
进一步地,Dword0包括错误概率位、错误类型位、使能位;Dword1表示注入的错误发生的次数;Dword2表示逻辑地址、Block Stripe的基址;Dword3表示逻辑地址的掩码;Dword4表示一个字的模数和一个字的余数、或者一个字的除数和一个字的商。
进一步地,Dword0中错误概率位占用28个bit,错误类型位占用3个bit,使能位占用1个bit。
进一步地,错误类型位的3个bit包括001、010、100三种编码类型。
进一步地, 当错位类型位为001时,Dword2为逻辑地址,Dword4保留;
当错位类型位为010时,Dword2为Block Stripe基址,Dword4为一个字的模数和一个字的余数;
当错位类型位为100时,Dword2为Block Stripe基址,Dword4为一个字的模数和一个字的余数。
进一步地,步骤S4中所述的固件根据注错模型判断注错类型具体根据以下条件进行判断:
错误类型位为001时,判定条件:
Addr &mask ==phyAddr
错误类型位为010时,判定条件:
(Addr &mask == stripe_base_addr) &&(page_offset % module == remainder)
错误类型位为100时,判定条件:
(Addr &mask == stripe_base_addr) &&(page_offset / div == trader)
其中:Addr 表示从Nand flash读取的物理地址,mask表示地址掩码,phyAddr表示Dword 2中逻辑地址对应的物理地址,stripe_base_addr 表示Dword 2中Block stripe地址,page_offset表示Block stripe中Addr所在的page编号,module表示Dword 4中的模数,remainder表示Dword 4中的余数,div表示Dword 4中的除数,trader表示Dword 4中的商。
进一步地,步骤S3中Host端通过PCIe/NVMe Driver将链表数据发送给固件。
本发明提供的模拟Nand坏块的动态注入方法,根据错误构建模型,采用一个5个Dword数据能构建出Media Error任意一种类型,组合使用就能构建基于整个PAGE、BLOCK、LUN、TARGET甚至Chip的Media Error,相比传统单一注错方法更灵活,更具扩展性,可快速辅助坏块管理的验证,提高对坏块管理方案的验证效率。
附图说明
图1是本发明具体实施例方法流程图。
图2是本发明具体实施例5个Dword数据结构图。
具体实施方式
下面结合附图并通过具体实施例对本发明进行详细阐述,以下实施例是对本发明的解释,而本发明并不局限于以下实施方式。
如图1所示,本发明提供的模拟Nand坏块的动态注入方法,包括以下步骤:
S1:选择注错类型,构建注错模型;
S2:根据所构建的注错模型构建注错数据,形成链表数据;
S3:Host端将链表数据发送给固件;
S4:固件根据注错模型判断注错类型,向Host端返回错误数据;
S5:Host端校验返回信息是否符合预期,验证固件功能。
优选地,步骤S3中Host端通过PCIe/NVMe Driver将链表数据发送给固件。
如图2所示,步骤S1中,通过Dword0、Dword1、Dword2、Dword3和Dword4五个Dword(双字)数据构建注错模型。Dword0包括错误概率位、错误类型位、使能位;Dword1表示注入的错误发生的次数;Dword2表示逻辑地址、Block Stripe的基址;Dword3表示逻辑地址的掩码;Dword4表示一个字的模数和一个字的余数、或者一个字的除数和一个字的商。
其中,Dword0中错误概率位占用28个bit(位),错误类型位占用3个bit,使能位占用1个bit。错误类型位的3个bit包括001、010、100三种编码类型。
当错位类型位为001时,Dword2为逻辑地址,Dword4保留,这种情况可以表示对单一逻辑地址对应的物理地址上错误。
当错位类型位为010时,Dword2为Block Stripe基址,Dword4为一个字的模数和一个字的余数,这种情况可以表示Block stripe列方向上的错误集合。
当错位类型位为100时,Dword2为Block Stripe基址,Dword4为一个字的模数和一个字的余数,这种情况可以表示Block stripe行方向上的错误集合。
通过上述结构构建链表数据后,固件中将根据以下条件进行判定:
错误类型位为001时,判定条件:
Addr &mask ==phyAddr
错误类型位为010时,判定条件:
(Addr &mask == stripe_base_addr) &&(page_offset % module == remainder)
错误类型位为100时,判定条件:
(Addr &mask == stripe_base_addr) &&(page_offset / div == trader)
其中:Addr 表示从Nand flash读取的物理地址,mask表示地址掩码,phyAddr表示Dword2中逻辑地址对应的物理地址,stripe_base_addr 表示Dword2中Block stripe地址,page_offset表示Block stripe中Addr所在的page编号,module表示Dword4中的模数,remainder表示Dword4中的余数,div表示Dword4中的除数,trader表示Dword4中的商。
可以看出,当使用错误类型010 和100时,可以组合构造出来Block stripe上的列和行page错误,继而可以构造模拟出来整个块坏掉、整个LUN坏掉、整个TARGET坏掉的情况。
通过上述快速构建方案,从主机端注入坏块信息,加上固件中的验证条件实现,通过校验返回信息和查看固件运行状态,来辅助对固件坏块处理方案功能验证、逻辑验证。
以上公开的仅为本发明的优选实施方式,但本发明并非局限于此,任何本领域的技术人员能思之的没有创造性的变化,以及在不脱离本发明原理前提下所作的若干改进和润饰,都应落在本发明的保护范围内。

Claims (8)

1.一种模拟Nand坏块的动态注入方法,其特征在于,包括以下步骤:
S1:选择注错类型,构建注错模型;
S2:根据所构建的注错模型构建注错数据,形成链表数据;
S3:Host端将链表数据发送给固件;
S4:固件根据注错模型判断注错类型,向Host端返回错误数据;
S5:Host端校验返回信息是否符合预期,验证固件功能。
2.根据权利要求1所述的模拟Nand坏块的动态注入方法,其特征在于,步骤S1中,通过Dword0、Dword1、Dword2、Dword3和Dword4五个Dword数据构建注错模型。
3.根据权利要求2所述的模拟Nand坏块的动态注入方法,其特征在于,Dword0包括错误概率位、错误类型位、使能位;Dword1表示注入的错误发生的次数;Dword2表示逻辑地址、Block Stripe的基址;Dword3表示逻辑地址的掩码;Dword4表示一个字的模数和一个字的余数、或者一个字的除数和一个字的商。
4.根据权利要求3所述的模拟Nand坏块的动态注入方法,其特征在于,Dword0中错误概率位占用28个bit,错误类型位占用3个bit,使能位占用1个bit。
5.根据权利要求4所述的模拟Nand坏块的动态注入方法,其特征在于,错误类型位的3个bit包括001、010、100三种编码类型。
6.根据权利要求5所述的模拟Nand坏块的动态注入方法,其特征在于,
当错位类型位为001时,Dword2为逻辑地址,Dword4保留;
当错位类型位为010时,Dword2为Block Stripe基址,Dword4为一个字的模数和一个字的余数;
当错位类型位为100时,Dword2为Block Stripe基址,Dword4为一个字的模数和一个字的余数。
7.根据权利要求6所述的模拟Nand坏块的动态注入方法,其特征在于,步骤S4中所述的固件根据注错模型判断注错类型具体根据以下条件进行判断:
错误类型位为001时,判定条件:
Addr &mask ==phyAddr
错误类型位为010时,判定条件:
(Addr &mask == stripe_base_addr) &&(page_offset % module == remainder)
错误类型位为100时,判定条件:
(Addr &mask == stripe_base_addr) &&(page_offset / div == trader)
其中:Addr 表示从Nand flash读取的物理地址,mask表示地址掩码,phyAddr表示Dword 2中逻辑地址对应的物理地址,stripe_base_addr 表示Dword 2中Block stripe地址,page_offset表示Block stripe中Addr所在的page编号,module表示Dword 4中的模数,remainder表示Dword 4中的余数,div表示Dword 4中的除数,trader表示Dword 4中的商。
8.根据权利要求1-7任一项所述的模拟Nand坏块的动态注入方法,其特征在于,步骤S3中Host端通过PCIe/NVMe Driver将链表数据发送给固件。
CN201710245208.3A 2017-04-14 2017-04-14 一种模拟Nand坏块的动态注入方法 Active CN106992027B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710245208.3A CN106992027B (zh) 2017-04-14 2017-04-14 一种模拟Nand坏块的动态注入方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710245208.3A CN106992027B (zh) 2017-04-14 2017-04-14 一种模拟Nand坏块的动态注入方法

Publications (2)

Publication Number Publication Date
CN106992027A true CN106992027A (zh) 2017-07-28
CN106992027B CN106992027B (zh) 2020-05-19

Family

ID=59415089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710245208.3A Active CN106992027B (zh) 2017-04-14 2017-04-14 一种模拟Nand坏块的动态注入方法

Country Status (1)

Country Link
CN (1) CN106992027B (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134557A (zh) * 2019-05-17 2019-08-16 深圳忆联信息系统有限公司 一种读Flash接口数据随机注错的验证方法及其系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120297258A1 (en) * 2008-04-05 2012-11-22 Fusion-Io, Inc. Apparatus, System, and Method for Bad Block Remapping
CN103198868A (zh) * 2013-04-16 2013-07-10 西北核技术研究所 一种用于单粒子翻转的故障模拟系统及分析方法
CN103377124A (zh) * 2012-04-25 2013-10-30 腾讯科技(深圳)有限公司 一种测试方法及装置
CN104536864A (zh) * 2014-12-10 2015-04-22 山东华芯半导体有限公司 一种位翻转可控的Nand Flash仿真模型的注错方法
US20160070474A1 (en) * 2008-06-18 2016-03-10 Super Talent Technology Corp. Data-Retention Controller/Driver for Stand-Alone or Hosted Card Reader, Solid-State-Drive (SSD), or Super-Enhanced-Endurance SSD (SEED)
CN105405462A (zh) * 2015-12-01 2016-03-16 清华大学 NAND Flash存储系统高磨损区域数据预加重方法
CN105740163A (zh) * 2016-01-29 2016-07-06 山东鲁能智能技术有限公司 一种Nand Flash坏块管理方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120297258A1 (en) * 2008-04-05 2012-11-22 Fusion-Io, Inc. Apparatus, System, and Method for Bad Block Remapping
US20160070474A1 (en) * 2008-06-18 2016-03-10 Super Talent Technology Corp. Data-Retention Controller/Driver for Stand-Alone or Hosted Card Reader, Solid-State-Drive (SSD), or Super-Enhanced-Endurance SSD (SEED)
CN103377124A (zh) * 2012-04-25 2013-10-30 腾讯科技(深圳)有限公司 一种测试方法及装置
CN103198868A (zh) * 2013-04-16 2013-07-10 西北核技术研究所 一种用于单粒子翻转的故障模拟系统及分析方法
CN104536864A (zh) * 2014-12-10 2015-04-22 山东华芯半导体有限公司 一种位翻转可控的Nand Flash仿真模型的注错方法
CN104536864B (zh) * 2014-12-10 2016-09-07 山东华芯半导体有限公司 一种位翻转可控的Nand Flash仿真模型的注错方法
CN105405462A (zh) * 2015-12-01 2016-03-16 清华大学 NAND Flash存储系统高磨损区域数据预加重方法
CN105740163A (zh) * 2016-01-29 2016-07-06 山东鲁能智能技术有限公司 一种Nand Flash坏块管理方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134557A (zh) * 2019-05-17 2019-08-16 深圳忆联信息系统有限公司 一种读Flash接口数据随机注错的验证方法及其系统

Also Published As

Publication number Publication date
CN106992027B (zh) 2020-05-19

Similar Documents

Publication Publication Date Title
CN101427323B (zh) 读取非易失性计算机存储器的系统和方法
CN101889267B (zh) 存储器阵列中的差错校正
CN104246708B (zh) 针对nand闪存上数据的存储的架构
CN101217060B (zh) 用于识别故障存储器元件的系统和方法
CN101576853B (zh) 数据存取方法、使用此方法的控制器与存储系统
CN103208306B (zh) 读取闪存中所储存的数据的方法、存储器控制器与系统
TWI273604B (en) Memory card and semiconductor device
CN104601178B (zh) 解码方法、解码电路、存储器存储装置与控制电路单元
US20140372667A1 (en) Data writing method, memory controller and memory storage apparatus
CN103631670B (zh) 存储器储存装置、存储器控制器与数据处理方法
US10878111B2 (en) Peer storage devices supporting protection information
CN104733051B (zh) 奇偶校验码的解码方法、存储器储存装置及控制电路单元
CN105808170B (zh) 一种能够修复单磁盘错误的raid6编码方法
CN105022674B (zh) 解码方法、存储器存储装置、存储器控制电路单元
CN107122269A (zh) 用于保证映射独立磁盘冗余阵列的可靠性的方法和装置
CN104733044B (zh) 译码方法、存储器存储装置、存储器控制电路单元
US7549112B2 (en) Unique response for puncture drive media error
CN102236585A (zh) 提升错误更正能力的方法以及相关的记忆装置及其控制器
CN106874140A (zh) 数据存储方法及装置
CN109358980A (zh) 一种对数据更新和单磁盘错误修复友好的raid6编码方法
CN101308706B (zh) 适用于闪存的数据写入方法及错误修正编解码方法
CN102902626A (zh) 区块管理方法、存储器控制器与存储器储存装置
CN106992027A (zh) 一种模拟Nand坏块的动态注入方法
CN104252317A (zh) 数据写入方法、存储器控制器与存储器存储装置
CN104658609A (zh) 用于存储器系统的纠错码分布的方法和系统

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
TA01 Transfer of patent application right

Effective date of registration: 20200422

Address after: 215100 No. 1 Guanpu Road, Guoxiang Street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Applicant after: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 510000 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yunlu 9 layer A tower by 01 unit

Applicant before: GUANGDONG INSPUR BIG DATA RESEARCH Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant