WO2020015131A1 - 一种闪存内块的类型识别方法 - Google Patents
一种闪存内块的类型识别方法 Download PDFInfo
- Publication number
- WO2020015131A1 WO2020015131A1 PCT/CN2018/105890 CN2018105890W WO2020015131A1 WO 2020015131 A1 WO2020015131 A1 WO 2020015131A1 CN 2018105890 W CN2018105890 W CN 2018105890W WO 2020015131 A1 WO2020015131 A1 WO 2020015131A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- block
- type
- type identifier
- flash memory
- value
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0653—Monitoring storage devices or systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Definitions
- the present invention relates to the technical field of flash memory, and in particular, to a method for identifying a type of a block in a flash memory.
- Flash memory is a non-erasable memory device. It has a three-level cell (TLC) that stores three bits, a two-bit multi-level cell (MLC) flash memory, and a single-level cell (SLC) flash memory. Regardless of the type of flash memory, the flash memory chip needs to be controlled through the memory control chip. After the memory control chip issues flash memory instructions (such as read instructions, write / program instructions, and erase instructions), the flash memory chips respond to read or data input. When writing data, in order to distribute the 0 and 1 in the data evenly in the storage space and reduce the error rate, the data will be out of order and then stored in the flash memory. Output Data.
- TLC three-level cell
- MLC multi-level cell
- SLC single-level cell
- the erase instruction erases the stored content in units of blocks, and the type of content (code, data, or conversion table required for operation) stored in the same block is the same.
- Blocks are composed of pages, and each page has a spare area to store information other than data.
- the first byte of the spare area of the first page of each block to record the type of the block (for example, the block that stores the code is stored in 0x01 at this location, and the block that stores the data is stored in 0x02 at this location.
- the block of the conversion table is stored at 0x03 at this position). Due to the out-of-order when writing and the out-of-order when reading, once this byte number is wrong in the process, the type of this block will be wrongly judged, which will affect the accuracy of the flash memory.
- An object of the present invention is to provide a method for identifying the type of a block in a flash memory, which can effectively reduce the error rate of determining the type of a block in a flash memory.
- a method for identifying the type of a block in a flash memory is written in at least two bytes of a spare area of the first page of the operated block. After the order is removed, check the value of the byte in which the type identifier was previously written. If two or more items are equal, the equal value is used as the type identifier.
- the type identifier when the type identifier is written, the type identifier is added with a positive integer; when viewing the type identifier, the type identifier is subtracted from the previously added positive integer.
- a type identifier, a type identifier + n, and a type identifier + 2n are respectively written into the first, i-th, and j-th bytes of the spare area of the first page of the operated block; where i and j are non-1 Two different positive integers; n is a positive integer;
- the data of the entire block is written out of memory out of order
- the data is read out of order
- the beneficial effect of the present invention is that by adding a type identifier, the present invention creates multiple judgment conditions, avoids incorrect type judgments caused by errors in the disorder and unordering process, reduces the risk of data errors, and further improves data storage. accuracy.
- FIG. 1 is a flowchart of a method for identifying a type of a block in a flash memory according to the present invention.
- a type identifier is written in at least two bytes of a spare area of a first page of an operated block.
- the type identifier may be added with a positive integer.
- the type identifier is subtracted from the previously added positive integer. If two or more items are equal, the equal value is used as the type identifier.
- the type identification method of the present invention includes the following steps:
- step S1 a type identifier I is written into the first byte of the spare area of the first page of the operated block, and the value of the type identifier is m.
- 0x01 is the type identifier of the code
- 0x02 is the type identifier of the data
- 0x03 is the type identifier of the conversion table.
- the value is m + 10.
- step S4 the data of the entire block is stored out of order in the flash memory.
- step S5 during reading, the data is read out of order.
- Step S6 check the first, i-th, and j-th bytes of the spare area of the first page of the operated block, the value of the first byte, the value of the i-th byte minus n, and the value of the j-th byte minus 2n , Two or three of these three values are equal, that is, the equal value is used as the type identifier. Specifically, whether two or more equal values in the type identifier I, the type identifier II-5, and the type identifier III-10 are 0x01, 0x02, or 0x03.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Read Only Memory (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种闪存内块的类型识别方法,在被操作块的第一页备用区的至少两个字节中写入类型标识,解乱序之后,查看之前写入类型标识的字节的值,若有两项或两项以上相等,即把相等的值作为类型标识。能有效降低闪存内块的类型判断错误率。
Description
本发明涉及闪存技术领域,尤其涉及闪存中块的类型识别方法。
闪存为非消失性的存储器装置,有存储三个比特的三级单元(TLC),两个比特的多级单元(MLC)闪存以及一个单级单元(SLC)闪存。不管何种闪存,都需要透过存储器控制芯片控制闪存芯片,存储器控制芯片发出闪存指令(例如读取指令、写入/编程指令和擦除指令)后,闪存芯片做出对应的行为读取或写入数据。写入数据时,为使数据中的0和1平均分布在存储空间内,降低出错率,数据将做乱序操作后再被存入闪存,因此读取数据时,需要先解乱序,再输出数据。
擦除指令以块为单位擦除存储的内容,同一个块保存的内容类型(代码、数据或操作所需的转换表)相同。块是由页组成的,每一页都有一个备用区域,来存放数据以外的信息。为了辨识块的类型,用每块第一页备用区的第一个字节记录此块的类型(例如存放代码的块在此位置存入0x01,存放数据的块在此位置存入0x02,存放转换表的块在此位置存入0x03)。由于经过写入时的乱序和读取时的解乱序,这一字节的数一旦在过程中出错,此块的类型就将被错误判断,从而影响闪存的正确率。
发明内容
本发明的目的在于提供一种闪存内块的类型识别方法,有效降低闪存内块的类型判断错误率。
实现上述目的的技术方案是:
一种闪存内块的类型识别方法,在被操作块的第一页备用区的至少两个字节中写入类型标识,解乱序之后,查看之前写入类型标识的字节的值,若有两项或两项以上相等,即把相等的值作为类型标识。
优选的,写入类型标识时,类型标识加上正整数;查看类型标识时,类型标识减去之前所加的正整数。
优选的,在被操作块的第一页备用区的第一、第i和第j个字节分别写入类型标识、类型标识+n以及类型标识+2n;其中,i、j为非1的两个不同正整数;n为正整数;
整个块的数据乱序写入内存;
数据被解乱序后读出;
查看被操作块的第一页备用区的第一、第i和第j个字节,第一字节的值、第i字节的值减n以及第j字节的值减2n,这三个值中有两项或三项相等,即把相等的值作为类型标识。
本发明的有益效果是:本发明通过增加类型标识,创建了多个判定条件,避免乱序和解乱序过程中发生错误而引起的类型判断错误,减小数据出错的风险,进而提升数据存储的准确性。
图1是本发明的闪存内块的类型识别方法的流程图。
下面将结合附图对本发明作进一步说明。
本发明的闪存内块的类型识别方法,在被操作块的第一页备用区的至少两个字节中写入类型标识,写入类型标识时,可以类型标识加上正整数。解乱序之后,查看之前写入类型标识的字节的值,查看类型标识时,如果之前类型标识加有正整数,则类型标识减去之前所加的正整数。若有两项或两项以上相等,即把相等的值作为类型标识。
具体地,本实施例,请参阅图1,本发明的类型识别方法,包括下列步骤:
步骤S1,对被操作块的第一页备用区的第一个字节写入类型标识Ⅰ,类型标识的值为m。0x01为代码的类型标识,0x02为数据的类型标识,0x03为转换表的类型标识。
步骤S2,对被操作块的第一页备用区的第i(任意非1正整数,示例中选泽 i=2)个字节写入类型标识Ⅱ,类型标识加n(任意正整数,示例中选择n=5),值为m+5。
步骤S3,对被操作块的第一页备用区的第j(任意非1和非i的正整数,示例中选泽j=3)个字节写入类型标识Ⅲ,类型标识加2n,值为m+10。
步骤S4,整个块的数据被乱序存入闪存。
步骤S5,读取时,数据被解乱序读出。
步骤S6,查看被操作块的第一页备用区的第一、第i和第j个字节,第一字节的值、第i字节的值减n以及第j字节的值减2n,这三个值中有两项或三项相等,即把相等的值作为类型标识。具体地,类型标识Ⅰ、类型标识Ⅱ-5及类型标识Ⅲ-10中两项或以上相等的值是否为0x01、0x02或0x03。
以上实施例仅供说明本发明之用,而非对本发明的限制,有关技术领域的技术人员,在不脱离本发明的精神和范围的情况下,还可以作出各种变换或变型,因此所有等同的技术方案也应该属于本发明的范畴,应由各权利要求所限定。
Claims (3)
- 一种闪存内块的类型识别方法,其特征在于,在被操作块的第一页备用区的至少两个字节中写入类型标识,解乱序之后,查看之前写入类型标识的字节的值,若有两项或两项以上相等,即把相等的值作为类型标识。
- 根据权利要求1所述的闪存内块的类型识别方法,其特征在于,写入类型标识时,类型标识加上正整数;查看类型标识时,类型标识减去之前所加的正整数。
- 根据权利要求1所述的闪存内块的类型识别方法,其特征在于,包括:在被操作块的第一页备用区的第一、第i和第j个字节分别写入类型标识、类型标识+n以及类型标识+2n;其中,i、j为非1的两个不同正整数;n为正整数;整个块的数据乱序写入内存;数据被解乱序后读出;查看被操作块的第一页备用区的第一、第i和第j个字节,第一字节的值、第i字节的值减n以及第j字节的值减2n,这三个值中有两项或三项相等,即把相等的值作为类型标识。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810794564.5 | 2018-07-19 | ||
CN201810794564.5A CN108897499A (zh) | 2018-07-19 | 2018-07-19 | 一种闪存内块的类型识别方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020015131A1 true WO2020015131A1 (zh) | 2020-01-23 |
Family
ID=64350930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/105890 WO2020015131A1 (zh) | 2018-07-19 | 2018-09-15 | 一种闪存内块的类型识别方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108897499A (zh) |
WO (1) | WO2020015131A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11397635B2 (en) * | 2019-12-09 | 2022-07-26 | Sandisk Technologies Llc | Block quality classification at testing for non-volatile memory, and multiple bad block flags for product diversity |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1647045A (zh) * | 2002-04-16 | 2005-07-27 | 薄膜电子有限公司 | 在非易失性存储器中存储数据的方法 |
CN101021813A (zh) * | 2006-02-13 | 2007-08-22 | 三星电子株式会社 | 闪存管理设备和方法 |
CN104391804A (zh) * | 2014-10-28 | 2015-03-04 | 陕西千山航空电子有限责任公司 | 一种nand flash数据存储方法 |
CN105718206A (zh) * | 2014-12-03 | 2016-06-29 | 中国人民解放军国防科学技术大学 | 能够感知raid的闪存转换层及其实现方法 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101556560B (zh) * | 2008-04-09 | 2011-05-04 | 群联电子股份有限公司 | 储存装置、控制器及其数据存取方法 |
CN102693760B (zh) * | 2011-03-24 | 2015-07-15 | 扬智科技股份有限公司 | Nand快闪存储器的错误校正方法 |
CN104216791B (zh) * | 2013-05-30 | 2018-05-01 | 上海斐讯数据通信技术有限公司 | 一种校验Flash存储数据的方法 |
-
2018
- 2018-07-19 CN CN201810794564.5A patent/CN108897499A/zh active Pending
- 2018-09-15 WO PCT/CN2018/105890 patent/WO2020015131A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1647045A (zh) * | 2002-04-16 | 2005-07-27 | 薄膜电子有限公司 | 在非易失性存储器中存储数据的方法 |
CN101021813A (zh) * | 2006-02-13 | 2007-08-22 | 三星电子株式会社 | 闪存管理设备和方法 |
CN104391804A (zh) * | 2014-10-28 | 2015-03-04 | 陕西千山航空电子有限责任公司 | 一种nand flash数据存储方法 |
CN105718206A (zh) * | 2014-12-03 | 2016-06-29 | 中国人民解放军国防科学技术大学 | 能够感知raid的闪存转换层及其实现方法 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11397635B2 (en) * | 2019-12-09 | 2022-07-26 | Sandisk Technologies Llc | Block quality classification at testing for non-volatile memory, and multiple bad block flags for product diversity |
Also Published As
Publication number | Publication date |
---|---|
CN108897499A (zh) | 2018-11-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8510637B2 (en) | Data reading method, memory storage apparatus and memory controller thereof | |
US8732552B2 (en) | Block management method, memory controller and memory storage device thereof | |
US8578245B2 (en) | Data reading method, memory storage apparatus, and controller thereof | |
US9582224B2 (en) | Memory control circuit unit, memory storage apparatus and data accessing method | |
US9141476B2 (en) | Method of storing system data, and memory controller and memory storage apparatus using the same | |
WO2019174205A1 (zh) | 一种垃圾回收的方法、装置及存储设备 | |
US9514843B2 (en) | Methods for accessing a storage unit of a flash memory and apparatuses using the same | |
TWI606339B (zh) | 資料儲存裝置及其資料維護方法 | |
CN106484316A (zh) | 用来管理一记忆装置的方法以及记忆装置与控制器 | |
US10318918B2 (en) | Recording device, system and method | |
TWI486957B (zh) | Nand快閃記憶體燒錄資料的處理、使用方法及裝置、運行系統 | |
US9009442B2 (en) | Data writing method, memory controller and memory storage apparatus | |
US9396804B1 (en) | Memory programming method, memory control circuit unit and memory storage apparatus | |
WO2020015128A1 (zh) | 一种闪存中块类型的识别方法 | |
CN102890645A (zh) | 存储器储存装置、存储器控制器与数据写入方法 | |
WO2022143991A1 (zh) | 一种多次编程电子熔丝装置 | |
WO2020015131A1 (zh) | 一种闪存内块的类型识别方法 | |
CN108428467A (zh) | 读取电压追踪方法、存储器储存装置及控制电路单元 | |
CN109119123B (zh) | 一种高中低阶闪存的分类方法 | |
WO2020015127A1 (zh) | 一种闪存内超级块的类型识别方法 | |
CN102141944B (zh) | 用来减少无法更正的错误的方法以及记忆装置及其控制器 | |
CN114203252A (zh) | 非易失存储器的坏块检测方法、装置、设备及存储介质 | |
US10559359B2 (en) | Method for rewriting data in nonvolatile memory and semiconductor device | |
CN111949198A (zh) | 一种坏块管理方法、装置和存储设备 | |
CN108052410B (zh) | 一种防止SPI-Nand读取数据页出错的方法及装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18926410 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18926410 Country of ref document: EP Kind code of ref document: A1 |