CN107765997B - Method for scrambling write data of solid state disk - Google Patents
Method for scrambling write data of solid state disk Download PDFInfo
- Publication number
- CN107765997B CN107765997B CN201710913796.3A CN201710913796A CN107765997B CN 107765997 B CN107765997 B CN 107765997B CN 201710913796 A CN201710913796 A CN 201710913796A CN 107765997 B CN107765997 B CN 107765997B
- Authority
- CN
- China
- Prior art keywords
- scrambling
- page
- data
- addr
- scrambling code
- 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.)
- Active
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
-
- 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/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- 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/0674—Disk device
- G06F3/0676—Magnetic disk device
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)
- Storage Device Security (AREA)
Abstract
The invention discloses a method for scrambling write-in data of a solid state disk, which is characterized in that matched scrambling code seeds are obtained according to information of Page address Page Addr, Page internal code word address Necc Addr, erasing times PE cycle of a write-in block and scrambling code seed table offset Remap Ofst of the write-in data, a scrambler calculates to obtain scrambling codes of the write-in data according to the obtained scrambling code seeds, and the scrambling of the write-in data is realized according to the obtained scrambling codes. The invention greatly improves the randomness of the data by correlating the scrambling with the page address of the data to be written, the code word address in the page and the erasing times of the writing block, thereby ensuring that the data in the page has no correlation, the data between pages in the block has no correlation and the data of the same memory unit in the block has no correlation in different erasing times.
Description
Technical Field
The invention relates to a solid state disk control technology, in particular to a method for scrambling write-in data of a solid state disk.
Background
The flash memory stores data by applying voltage to the control gate, is sensitive to certain written data patterns, and is easy to cause unbalance of internal electric quantity of the flash memory due to continuous input of all 1 s or all 0 s, so that signal anti-interference performance is reduced, and the reliability of the data in the flash memory is poor. Therefore, the NAND flash Controller is required to add scrambling codes to the data written by the user, so that the data 0 and 1 finally written into the flash memory are basically balanced, and the probability of bit flipping of the data is reduced. With the progress of semiconductor technology and the increase of the capacity of a single storage unit of the flash memory, the influence of the randomness of data written into the flash memory on the service life of the flash memory is more obvious, so that the randomness of the data must be ensured.
The randomness requirement of the flash memory particles on the written data is mainly embodied in three aspects, namely, the data in a page has no correlation; 2: data between pages in a block has no correlation; 3: the same memory location in the block has no data dependency under different PE cycles. FIG. 1 is a schematic diagram of data within a page without dependency requirements; FIG. 2 is a schematic diagram of intra-block inter-page data no dependency requirements; FIG. 3 is a schematic diagram of the same memory location within a block with no dependency requirements for data in different PE cycles; each circle represents an access unit, and there is no correlation between data in the filled circles in each figure. Therefore, the added scrambling codes are required to simultaneously realize no correlation in the three aspects so as to ensure the randomness of the data.
Disclosure of Invention
In view of the above drawbacks, the present invention aims to improve and ensure the randomness of scrambled data.
The invention provides a method for scrambling write data in a solid state disk, which is characterized in that matched scrambling code seeds are obtained according to information of Page address Page Addr, Page internal code word address Necc Addr, erasing times PE cycle of a write block and scrambling code seed table offset Remap Ofst of the write data, a scrambler calculates and obtains scrambling codes of the write data according to the obtained scrambling code seeds, and scrambling of the write data is realized according to the obtained scrambling codes.
The method for scrambling the write-in data of the solid state disk is characterized in that the scrambling code seed table offset Remap Ofst is obtained according to the following method: remap Ofst is floor (Page Addr/1).
The method for scrambling the write data of the solid state disk is characterized in that scrambling seeds corresponding to the write data are obtained by inquiring a scrambling seed table through a scrambling seed index number index, and the scrambling seed index is obtained through the following method: index mod (Page Addr × 4+ Necc Addr + Remap Ofst + PE cycle, 32).
The method for scrambling the write data of the solid state disk is characterized by comprising the following steps of:
step 1: acquiring a page address PageAddr, a page internal code word address Necc Addr and an erasing frequency PE cycle of a writing block of the written data according to the address information to be actually written of the current written data;
step 2: calculating to obtain scrambling code seed table offset RemapOfst according to RemapOfst which is floor (Page Addr/1);
and step 3: calculating to obtain a scrambling code seed Index according to Index (Page Addr multiplied by 4+ Necc Addr + Remap Ofst + PE cycle,32) mod;
and 4, step 4: inquiring a scrambling code seed table to obtain scrambling code seeds according to the obtained scrambling code seed index;
and 5: the scrambler scrambles the input write data according to the obtained scrambling code seeds.
The method for scrambling the write data of the solid state disk is characterized in that the Page Addr, the Page internal code word address Necc Addr and the erasing times PE cycle of the write block in the step 1 are obtained by software according to the address information of the write data, and the steps 2 to 5 are all automatically executed by hardware.
The invention greatly improves the randomness of the data by correlating the scrambling with the page address of the data to be written, the code word address in the page and the erasing times of the writing block, thereby ensuring that the data in the page has no correlation, the data between pages in the block has no correlation and the data of the same memory unit in the block has no correlation in different erasing times.
Drawings
FIG. 1 is a schematic diagram of data within a page without dependency requirements;
FIG. 2 is a schematic diagram of intra-block inter-page data no dependency requirements;
FIG. 3 is a schematic diagram of the same memory location within a block with no dependency requirements for data in different PE cycles;
FIG. 4 is a block diagram of a hardware Seed scrambling implementation method;
fig. 5 is a diagram illustrating the effect of hardware Seed scrambling.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In many data transmissions, the sequence of 0-1 is considered to be an unstable signal and needs to be avoided as much as possible, so scrambling is widely used in this situation. The randomness requirement of the flash memory particles on the written data is mainly embodied in three aspects, namely, the data in a page has no correlation; 2: data between pages in a block has no correlation; 3: the same memory location in the block has no data dependency under different PE cycles.
FIG. 4 is a block diagram of a hardware Seed scrambling implementation method; wherein Page Addr represents the Page address, Necc Addr represents the code word address in the Page, PE cycle represents the erasing times of the block, and Remap Ofst represents the initial offset of the Seed Table. The selected Scrb seed is guaranteed to be different in a certain period by operating according to a set rule through Page Addr, Necc Addr, PE cycle and Remap Ofst.
First, taking 4 codewords in each page, every 1 page, adding 1 to Remap _ offset, and 32 seeds in the Seed Table as an example, the detailed steps of the Hard Seed scrambling scheme are given:
step 1: acquiring a page address PageAddr, a page internal code word address Necc Addr and an erasing frequency PE cycle of a writing block of the written data according to the address information to be actually written of the current written data;
step 2: calculating to obtain scrambling code seed table offset RemapOfst according to RemapOfst which is floor (Page Addr/1);
and step 3: calculating to obtain a scrambling code seed Index according to Index (Page Addr multiplied by 4+ Necc Addr + Remap Ofst + PE cycle,32) mod;
and 4, step 4: inquiring a scrambling code seed table to obtain scrambling code seeds according to the obtained scrambling code seed index;
and 5: the scrambler scrambles the input write-in data according to the obtained scrambling code seeds, and the data are not correlated under different PE cycles by the same storage unit in the block due to the fact that the scrambling code seeds are obtained through calculation and are correlated with the PE cycles of erasing times.
The scrambling code seeds are obtained by calculation and are associated with Page addresses Page Addr and Remap Ofst, so that no correlation of data among pages in a block is ensured; the Necc Addr and Seed ensure that the data within the page has no dependencies.
FIG. 5 is a schematic diagram illustrating the effect of hardware Seed scrambling, where the PE cycles ensure that data has no correlation in the same memory location in the block under different PE cycles, i.e. as shown in FIG. 3; page Addr and Remap Ofst ensure that data between pages in a block have no correlation, namely shown in FIG. 2; the Necc Addr and Seed ensure that the data in the page has no dependency, as shown in fig. 1.
The decoding process is the same as the scrambling process, ensuring that the data can be correctly recovered.
While the invention has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (4)
1. A method for scrambling write data in a solid state disk is characterized in that matched scrambling code seeds are obtained according to information of a Page address Page Addr, a Page internal code word address Necc Addr, erasing times PE cycle of a write block and offset Remap Ofst of a scrambling code seed table of the write data, specifically, the scrambling code seeds are obtained by inquiring the scrambling code seed table through a scrambling code index, and the scrambling code seed index is obtained through the following method:
index mod (Page Addr × 4+ Necc Addr + Remap Ofst + PE cycle, 32); the scrambler calculates the scrambling code of the write-in data according to the obtained scrambling code seeds, and the scrambling of the write-in data is realized according to the obtained scrambling code.
2. The method for scrambling write data in a solid state disk according to claim 1, wherein the scrambling code seed table offset Remap off is obtained as follows: remap Ofst is floor (Page Addr/1).
3. The method for scrambling write data in a solid state disk according to claim 2, wherein the scrambling of the current write data is implemented according to the following steps:
step 1: acquiring a Page address Page Addr, an in-Page code word address Necc Addr and an erasing frequency PE cycle of a writing block of the written data according to the address information to be actually written of the current written data;
step 2: calculating to obtain scrambling code seed table offset Remap Ofst according to Remap Ofst which is floor (Page Addr/1);
and step 3: calculating to obtain a scrambling code seed Index according to Index (Page Addr multiplied by 4+ Necc Addr + Remap Ofst + PE cycle,32) mod;
and 4, step 4: inquiring a scrambling code seed table to obtain scrambling code seeds according to the obtained scrambling code seed index;
and 5: the scrambler scrambles the input write data according to the obtained scrambling code seeds.
4. The method for scrambling write data in a solid state disk according to claim 3, wherein the Page Addr, the intra-Page codeword address Necc Addr and the erasing times PE cycle of the write block in step 1 are obtained by software according to the address information of the write data, and steps 2 to 5 are all automatically executed by hardware.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710913796.3A CN107765997B (en) | 2017-09-30 | 2017-09-30 | Method for scrambling write data of solid state disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710913796.3A CN107765997B (en) | 2017-09-30 | 2017-09-30 | Method for scrambling write data of solid state disk |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107765997A CN107765997A (en) | 2018-03-06 |
CN107765997B true CN107765997B (en) | 2020-09-01 |
Family
ID=61266372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710913796.3A Active CN107765997B (en) | 2017-09-30 | 2017-09-30 | Method for scrambling write data of solid state disk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107765997B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108958666A (en) * | 2018-07-26 | 2018-12-07 | 浪潮电子信息产业股份有限公司 | A kind of data processing method and main control chip |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8402349B2 (en) * | 2010-12-06 | 2013-03-19 | Apple Inc. | Two dimensional data randomization for a memory |
CN103745746A (en) * | 2013-12-31 | 2014-04-23 | 华为技术有限公司 | Data processing method, scrambler and storage controller |
CN105931661A (en) * | 2016-05-16 | 2016-09-07 | 联想(北京)有限公司 | Scrambling apparatus, electronic device and information processing method |
CN106024059A (en) * | 2015-03-27 | 2016-10-12 | 华邦电子股份有限公司 | Semiconductor memory apparatus and data processing method |
CN206470746U (en) * | 2016-12-28 | 2017-09-05 | 北京忆恒创源科技有限公司 | Randomization scrambler and randomization descrambler |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103777904B (en) * | 2014-02-12 | 2017-07-21 | 威盛电子股份有限公司 | Data memory device and data scrambling and de-scrambling method |
-
2017
- 2017-09-30 CN CN201710913796.3A patent/CN107765997B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8402349B2 (en) * | 2010-12-06 | 2013-03-19 | Apple Inc. | Two dimensional data randomization for a memory |
CN103745746A (en) * | 2013-12-31 | 2014-04-23 | 华为技术有限公司 | Data processing method, scrambler and storage controller |
CN106024059A (en) * | 2015-03-27 | 2016-10-12 | 华邦电子股份有限公司 | Semiconductor memory apparatus and data processing method |
CN105931661A (en) * | 2016-05-16 | 2016-09-07 | 联想(北京)有限公司 | Scrambling apparatus, electronic device and information processing method |
CN206470746U (en) * | 2016-12-28 | 2017-09-05 | 北京忆恒创源科技有限公司 | Randomization scrambler and randomization descrambler |
Non-Patent Citations (1)
Title |
---|
Effect of LFSR Seeding, Scrambling and Feedback Polynomial on Stochastic Computing Accuracy;Jason H. Anderson,et al.;《2016 Design, Automation & Test in Europe Conference & Exhibition (DATE)》;20161231;第1550-1555页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107765997A (en) | 2018-03-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10521292B2 (en) | Error correction code unit, self-test method and associated controller applied to flash memory device for generating soft information | |
US8984373B2 (en) | Method for accessing flash memory and associated flash memory controller | |
US8782500B2 (en) | Systems and methods for error correction and decoding on multi-level physical media | |
US8612667B2 (en) | Method for performing data pattern management regarding data accessed by a controller of a flash memory, and associated memory device and controller thereof | |
US8732553B2 (en) | Memory system and control method thereof | |
US9465552B2 (en) | Selection of redundant storage configuration based on available memory space | |
US8719491B2 (en) | Encoding flash memory data with a randomizer using different seeds for different sectors | |
US20150349805A1 (en) | Method of Handling Error Correcting Code in Non-volatile Memory and Non-volatile Storage Device Using the Same | |
US11243838B2 (en) | Methods and apparatuses for error correction | |
US9208021B2 (en) | Data writing method, memory storage device, and memory controller | |
JP2009537055A5 (en) | ||
KR20100124087A (en) | Memory controller, memory system including the same and method of operating the same | |
US20160283319A1 (en) | Data storage device and encoding method thereof | |
US9454429B2 (en) | Protection against word line failure in memory devices | |
CN107765997B (en) | Method for scrambling write data of solid state disk | |
CN107885459B (en) | Method for scrambling write-in data of solid state disk by software | |
JP2009157836A (en) | Memory system | |
US9104596B2 (en) | Memory system | |
US11430538B1 (en) | Memory control method, memory storage device, and memory control circuit unit | |
US10310941B2 (en) | Data encoding method, memory control circuit unit and memory storage device | |
Kim et al. | Compression and Variable-Sized ECC Scheme for the Reliable Flash Memory System | |
CN118016120A (en) | Memory, controller, and computing system capable of reducing power consumption | |
CN112599180A (en) | Decoder for memory system and method thereof | |
JP2022102785A (en) | Memory system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |