CN113885777B - Data writing method and data storage device thereof - Google Patents
Data writing method and data storage device thereof Download PDFInfo
- Publication number
- CN113885777B CN113885777B CN202010777138.8A CN202010777138A CN113885777B CN 113885777 B CN113885777 B CN 113885777B CN 202010777138 A CN202010777138 A CN 202010777138A CN 113885777 B CN113885777 B CN 113885777B
- Authority
- CN
- China
- Prior art keywords
- data
- predetermined period
- damaged
- columns
- error rate
- 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
- 238000013500 data storage Methods 0.000 title claims abstract description 80
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000010586 diagram Methods 0.000 description 13
- 238000010606 normalization Methods 0.000 description 9
- 230000002950 deficient Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000007787 solid Substances 0.000 description 2
- 230000007774 longterm Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
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
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1004—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/08—Error detection or correction by redundancy in data representation, e.g. by using checking codes
- G06F11/10—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
- G06F11/1008—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
- G06F11/1068—Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
-
- 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/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
A data writing method and a data storage device thereof. The data storage device comprises a data storage medium and a control unit coupled to the data storage medium, wherein the data storage medium comprises a plurality of data columns and at least one damaged data column. The control unit writes data into a plurality of data columns of the data storage medium according to a cycle parameter and a damage parameter, wherein the cycle parameter stores a preset cycle with a first error rate, and the damage parameter stores the position of at least one damaged data column with the error rate greater than or equal to the preset error rate in the preset cycle.
Description
Technical Field
The present invention relates to a method for writing data and a data storage device thereof, and more particularly, to a method for writing data to a data storage medium having periodically damaged data columns and a data storage device thereof.
Background
In general, a storage device, such as a Solid state disk (Solid STATE DRIVE, SSD), an SD memory card (Secure Digital Memory Card), or a flash memory (USB), is mainly composed of a control unit and a data storage medium. The data storage medium is composed of a plurality of data columns (columns) for storing data. During the manufacturing process, the storage device is inevitably manufactured to a number of data storage media which are not up to the factory-accepted standard, and is classified as a secondary (Downgrade) product. These secondary products are detected in the data storage medium by a damaged data string (bad column) and marked or recorded on the damaged data list before they are sold to consumers. The control unit can skip the marked or recorded damaged data columns according to the damaged data list, and does not write data into the damaged data columns, thereby avoiding the situation of access data errors.
However, in these secondary products, a phenomenon of periodically damaging the data line occurs, that is, a damaged data line occurs every other segment. It is noted that when the period is short, a large number of corrupted data columns will be generated, which far exceeds the number that the hardware can label. If the detected damaged data rows are marked or recorded one by one in a conventional manner, a large amount of memory space is required to record the positions of the damaged data rows. For example, if a page (page) has 18000 columns, and every 8 columns are corrupted, there will be 2250 corrupted columns in total. Therefore, a memory matrix (plane) requires 2250 Bytes (4500 Bytes) to record the location of the defective data column. Furthermore, if the data storage medium is configured with 16 size particles and 4 storage matrices, 288KBytes are required for the data storage medium to record the location of the damaged data row, and the capacity is far greater than that of a Static Random Access Memory (SRAM) built in a general controller. In addition, the number of marked or recorded damaged data columns is limited by hardware, and if the number of marked damaged data columns is used up, the remaining unmarked damaged data columns in the data storage medium may consume the error correction capability of the error correction code (Error Correcting Code, ECC), so that the data which can be originally corrected cannot be corrected properly.
Therefore, it is an important issue and solution to provide a method for greatly reducing the memory capacity required for recording the location of the damaged data sequence under the limitation of the number of damaged data sequences that can be marked by limited hardware for the data storage medium having the periodically damaged data sequences.
Disclosure of Invention
In view of the above, an embodiment of the present invention provides a data writing method, which is applicable to a data storage medium, wherein the data storage medium is coupled to a control unit, and the data storage medium includes a plurality of data rows and at least one damaged data row, and the data writing method includes: the control unit writes data into a plurality of data columns of the data storage medium according to a cycle parameter and a damage parameter, wherein the cycle parameter stores a preset cycle with a first error rate, and the damage parameter stores the position of at least one damaged data column with the error rate greater than or equal to the preset error rate in the preset cycle.
In an embodiment of the present invention, the period parameter and the corruption parameter are stored in a data storage medium.
In an embodiment of the present invention, before the step of writing the data to the plurality of data columns of the data storage medium by the control unit according to the period parameter and the damage parameter, the method further includes: the control unit sets a preset period range for detecting at least one damaged data row; the control unit divides the plurality of data columns into X periods according to a predetermined period, wherein the predetermined period is selected from a predetermined period range, X is the plurality of data columns divided by the predetermined period and X is a positive integer, and each of the X periods has T data columns, wherein T is the predetermined period and T is the positive integer; the control unit counts the damaged quantity of the plurality of data columns in X periods respectively to obtain the total number of damaged data columns corresponding to the plurality of data columns; the control unit normalizes the total number of damaged data columns corresponding to the data columns respectively to calculate error rates of the data columns under the condition of a preset period respectively, and records the error rates into an error rate record table respectively; the control unit judges whether the value of the preset period is larger than or equal to the upper limit value of the preset period range; and when the judgment is yes, the control unit selects a preset period with the first error rate, namely the highest error rate, from the error rate record table and stores the preset period into the period parameter, and selects at least one damaged data column with the error rate being more than or equal to the preset error rate in the preset period and stores the position of the at least one damaged data column into the damage parameter.
In an embodiment of the present invention, after the step of the control unit determining whether the value of the predetermined period is equal to or greater than the upper limit value of the predetermined period range, the method further includes: when the judgment is negative, the control unit adjusts the numerical value of the preset period and executes the step that the control unit divides the data columns into X periods according to the preset period.
An embodiment of the present invention further provides a data storage device, including: the data storage medium and the control unit are coupled to the data storage medium. The data storage medium comprises a plurality of data columns and at least one damaged data column. The control unit writes data into a plurality of data columns of the data storage medium according to a cycle parameter and a damage parameter, wherein the cycle parameter stores a predetermined cycle with a first error rate (usually the highest error rate), and the damage parameter stores a position of at least one damaged data column with the error rate greater than or equal to the predetermined error rate in the predetermined cycle.
In another embodiment of the present invention, wherein the period parameter and the corruption parameter are stored in a data storage medium.
In another embodiment of the present invention, the control unit further includes: setting a preset period range for detecting at least one damaged data row; dividing the plurality of data columns into X cycles according to a predetermined cycle, wherein the predetermined cycle is selected from a predetermined cycle range, X is the plurality of data columns divided by the predetermined cycle and X is a positive integer, and each of the X cycles has T data columns, wherein T is the predetermined cycle and T is the positive integer; respectively counting the number of damaged data columns in X periods to obtain the total number of damaged data columns corresponding to the data columns; normalizing the total number of damaged data columns corresponding to the data columns respectively to calculate error rates of the data columns under the condition of a preset period respectively, and recording the error rates into an error rate recording table respectively; judging whether the value of the preset period is larger than or equal to the upper limit value of the preset period range; and when the judgment is yes, selecting a preset period with a first error rate (usually the highest error rate) from the error rate record table and storing the preset period into a period parameter, and selecting at least one damaged data column with the error rate being more than or equal to the preset error rate in the preset period and storing the position of the at least one damaged data column into the damaged parameter.
In another embodiment of the present invention, the control unit further includes: when the judgment is negative, the numerical value of the preset period is adjusted, and the division of the data columns into X periods according to the preset period is executed.
According to the data writing method and the data storage device thereof provided by the embodiment of the invention, the position of the damaged data column is obtained by reading the period parameter and the damaged parameter, and meanwhile, the data is accurately written into the data column of the data storage medium, wherein the period parameter stores a preset period with a first error rate (usually the highest error rate), and the damaged parameter stores the position of at least one damaged data column with the error rate greater than or equal to the preset error rate in the preset period. Therefore, in the process of writing data, the damaged data column can be actively skipped, so that the data is prevented from being written into the damaged data column of the data storage medium, and the aim of greatly reducing the memory capacity required for storing or recording the damaged data column position is fulfilled.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention, as well as the preferred embodiments thereof, together with the following detailed description of the invention, given by way of illustration only, together with the accompanying drawings.
Drawings
FIG. 1 is a schematic diagram of a data storage device.
FIG. 2 is a schematic diagram of a data storage medium.
FIG. 3 is a flowchart illustrating a method for detecting periodically corrupted data rows in a data storage medium according to an embodiment of the present invention.
FIG. 4A is a diagram illustrating a method for dividing M data columns into X periods according to a predetermined period according to an embodiment of the present invention.
Fig. 4B is a schematic diagram of dividing M data columns into 2048 periods according to a predetermined period according to an embodiment of the present invention.
FIG. 4C is a diagram illustrating the division of M data columns into 1820 periods according to a predetermined period according to an embodiment of the present invention.
Fig. 4D is a schematic diagram of dividing M data columns into 1638 periods according to a predetermined period according to an embodiment of the present invention.
Fig. 5 is a flowchart of a method for writing data according to an embodiment of the invention.
FIG. 6 is a diagram of an ECC table according to an embodiment of the present invention.
Detailed Description
Referring to fig. 1, fig. 1 is a schematic diagram of a data storage device. The data storage device comprises a data storage medium 10 and a control unit 20, wherein the control unit 20 is coupled to the data storage medium 10 to access data from the data storage medium 10.
Referring to fig. 2, fig. 2 is a schematic diagram of a data storage medium. The data storage medium 10 includes a plurality of data columns 11, and the data columns disposed in the same column are called pages (indicated by the marks P0 to PN-1), and each N pages are divided into a data Block (indicated by the marks B0 to BZ-1). Wherein N, Z are positive integers. In this embodiment, the data storage medium 10 is implemented with a nonvolatile memory, such as a Flash memory (Flash memory), a magnetoresistive random access memory (Magnetoresistive RAM), a ferroelectric random access memory (Ferroelectric RAM), or other memory devices with long-term data storage.
The data writing method and the data storage device thereof according to the embodiments of the present invention can be used for detecting the data storage medium 10 having periodically damaged data rows (not shown) to obtain the positions of the damaged data rows. Thereby ensuring that data can be accurately written to the data columns 11 of the data storage medium 10 without being written to the defective data columns of the data storage medium 10. It is assumed that there are M data columns 11 per page P0 through PN-1, and that there are one data column 11 corrupted every T data columns 11, i.e., one corrupted data column every T data columns 11, wherein M, T are positive integers. In addition, for simplicity of illustration, the embodiment of the present invention randomly selects one of the blocks B0-BZ-1 of the data storage medium 10 to perform the detection of the defective data row as a sample block without using all the blocks B0-BZ-1.
FIG. 3 is a flowchart illustrating a method for detecting periodically corrupted data rows in a data storage medium according to an embodiment of the present invention. After the detection method is started (step S100). First, the control unit 20 sets a predetermined period range for detecting the damaged data row (as shown in step S101), that is, detects or scans all the data rows 11 within the predetermined period range to obtain the damaged position of the data row 11, that is, the damaged position of the data row. In other words, the data row 11 that detects a corruption can be regarded as a corrupted data row. For example, if the predetermined period is set to be in the range of 2 to 256 data columns 11. The control unit 20 detects the damaged data line from cycle 2, then detects the damaged data line from cycle 3, and so on, and finally detects the damaged data line from cycle 256. It should be noted that the predetermined period range is arbitrarily set according to the actual requirement. In the embodiment of the present invention, for simplicity of explanation, only the values of 8 to 10 are used as the cycle range of the predetermined detection.
Next, referring to fig. 4A, fig. 4A is a schematic diagram illustrating dividing M data columns into X periods according to a predetermined period according to an embodiment of the invention. The control unit 20 divides the M data lines 11 into X (M/T) periods (i.e., period T0 to period TX-1) according to the value of the predetermined period T, wherein the value of the predetermined period T is selected from the values set in the predetermined period range, and each period has T data lines 11 (as shown in step S102). It is further noted that if the M data columns 11 cannot be divided by the predetermined period T to generate a remainder, that is, there is a small portion of the data columns 11 not divided into X periods, the small portion of the data columns 11 can be skipped from view or regarded as a non-damaged data column.
Referring to fig. 4B, fig. 4B is a schematic diagram illustrating dividing M data columns into 2048 periods according to a predetermined period according to an embodiment of the present invention. Assuming that there are 16384 data columns 11 (i.e., m=16384) per data page P0 to PN-1 and the value of the predetermined period T is 8, the 16384 data columns 11 may be divided into 2048 (i.e., x=16384/8) periods (i.e., period T0 to period T2047), each of which has 8 data columns 11 (i.e., first data column C0 to eighth data column C7).
Next, the control unit 20 counts the number of damages of the M data columns 11 in X periods (as shown in step S103), that is, counts the number of damages of the first data column C0 in the period T0 to the period T2047, counts the number of damages of the second data column C1 in the period T0 to the period T2047, and so on, and counts the number of damages of the eighth data column C7 in the period T0 to the period T2047, respectively. It is additionally noted that any one of these data columns 11, may be all corrupted during X cycles; all without damage; part is damaged; part is not damaged. For example, if only the third data column C2 and the sixth data column C5 of the data columns 11 are damaged in the period T0 to the period T2047, the remaining data columns (i.e. the first data column C0, the second data column C1, the fourth data column C3, the fifth data column C4, the seventh data column C6 and the eighth data column C7) are not damaged in the period T0 to the period T2047. Further, the third data row C2 is damaged in more than half of the periods T0 to TX-1, for example 1024 periods, that is, 1024 third data rows C2 are damaged data rows in total, and the sixth data row C5 is damaged in more than three quarters of the periods T0 to TX-1, for example 1536 periods, that is, 1536 sixth data rows C5 are damaged data rows in total. Finally, the control unit 20 counts the total number of damaged data columns of the first data column C0 to the eighth data column C in the period T0 to the period T2047, and sequentially outputs the following data columns 11 in order: 0.0, 1024, 0, 1536, 0.
Next, the control unit 20 normalizes the total number of damaged data columns of the data columns 11 (Normalize) to calculate the error rates of the data columns 11 under the predetermined period T, and records the error rates into the error rate record table (as shown in step S104). In the embodiment of the present invention, when the predetermined period T is 8, the control unit 20 divides the total number of damaged data columns corresponding to the first data column C0 to the eighth data column C7, respectively, by X (i.e., 2048) periods to perform normalization. Further, the control unit 20 divides the statistics "0, 1024, 0, 1536, 0" of the total number of damaged data columns in the period T0 to the period T2047 of the first data column C0 to the eighth data column C in step S103 by 2048 to perform normalization, and sequences the normalization results as follows: 0.0, 0.5, 0, 0.75, 0. This means that the error rates of the third data column C2 and the sixth data column C5 are 50% and 75%, respectively, while the error rates of the remaining data columns are 0%. Then, the control unit 20 stores the normalized result when the predetermined period T is 8 in the error rate recording table (as shown in fig. 6).
After that, the control unit 20 determines whether or not the predetermined period T is equal to or greater than the upper limit value of the predetermined period range (as shown in step S104). If not, the value of the predetermined period T is adjusted, and the process returns to step S102 (as shown in step S106). In the embodiment of the present invention, since the predetermined period T is 8 and is less than the upper limit value (i.e. 10) of the predetermined period range, the value of the predetermined period T is adjusted to 9, and the process returns to step S102.
Referring to fig. 4C, fig. 4C is a schematic diagram illustrating dividing M data columns into 1820 periods according to a predetermined period according to an embodiment of the present invention. In step S102, 16384 data columns are divided into 1820 (i.e., x=16384/9) periods (i.e., period T0 to period T1819) according to the predetermined period T being 9, wherein each period has 9 data columns 11 (i.e., the first data column C0 to the ninth data column C8).
Next, in step S103, the control unit 20 counts the number of damages of the first to ninth data columns C0 to C8 in the periods T0 to T1819, respectively. For example, it is assumed that the first data column C0, the second data column C1, the third data column C2, the fourth data column C3, the fifth data column C4, the sixth data column C5, the seventh data column C6, the eighth data column C7, and the ninth data column C8 have a tenth cycle, a second cycle, a third cycle, a tenth cycle, a third cycle, a fourth cycle, a second cycle, and a tenth cycle, respectively, which are damaged. In other words, 182 first data columns C0 are damaged data columns in total; a total of 364 second data columns C1 are corrupted data columns; a total of 546 third data columns C2 are damaged data columns; a total of 182 fourth data columns C3 are damaged data columns; a total of 182 fifth data columns C4 are damaged data columns; a total of 546 sixth data columns C5 are damaged data columns; a total of 728 seventh data columns C6 are damaged data columns; a total of 364 eighth data columns C7 are defective data columns; the total of 182 ninth data columns C8 are defective data columns. Finally, the control unit 20 counts the total number of damaged data columns in the period T0 to the period T1819 of the first data column C0 to the ninth data column C, and sequences the following steps: 182. 364, 546, 182, 546, 728, 364, 182.
Next, in step S104, when the predetermined period T is 9, the control unit 20 divides the total number of damaged data columns corresponding to the first through ninth data columns C0 through C8, respectively, by X (i.e., 1820) periods to perform normalization. Further, the control unit 20 divides the statistics "182, 364, 546, 182, 546, 728, 364, 182" of the total number of damaged data columns in the period T0 to the period T1819 of the first data column C0 to the nine data column C8 in step S103 by 1820 to perform normalization, and sequences the normalization results as follows: 0.1, 0.2, 0.3, 0.1, 0.3, 0.4, 0.2, 0.1. This means that the error rates of the first data column C0, the second data column C1, the third data column C2, the fourth data column C3, the fifth data column C4, the sixth data column C5, the seventh data column C6, the eighth data column C7, and the ninth data column C8 are 10%, 20%, 30%, 10%, 30%, 40%, 20%, and 10%, respectively. Then, the control unit 20 stores the normalized result of the predetermined period T of 9 in the error rate record table (as shown in fig. 6).
Then, in step S105, it is determined whether or not the predetermined period T is equal to or greater than the upper limit value of the predetermined period range. In the embodiment of the present invention, since the predetermined period T is 9 and less than the upper limit value (i.e. 10) of the predetermined period range, the value of the predetermined period T is adjusted to 10, and the process returns to step S102.
Referring to fig. 4D, fig. 4D is a schematic diagram illustrating dividing M data columns into 1638 periods according to a predetermined period according to an embodiment of the present invention. In step S102, 16384 data columns are divided into 1638 (i.e., x=16384/10) periods (i.e., period T0 to period T1637) according to the predetermined period T being 10, wherein each period has 10 data columns 11 (i.e., the first data column C0 to the tenth data column C9).
Next, in step S103, the control unit 20 counts the number of damages of the first to tenth data columns C0 to C9 in the periods T0 to T1637, respectively. For example, it is assumed that the first data column C0, the second data column C1, the third data column C2, the fourth data column C3, the fifth data column C4, the sixth data column C5, the seventh data column C6, the eighth data column C7, the ninth data column C8, and the tenth data column C9 have a tenth cycle, a second cycle, a third cycle, a tenth cycle, a second cycle, a fourth cycle, a third cycle, a fourth cycle, a second cycle, a third cycle, and a fourth cycle, respectively, are damaged. In other words, 163 first data columns C0 are damaged data columns in total; a total of 163 second data columns C1 are defective data columns; a total of 327 third data columns C2 are damaged data columns; a total of 491 fourth data columns C3 are damaged data columns; a total of 163 fifth data columns C4 are damaged data columns; a total of 327 sixth data columns C5 are damaged data columns; a total of 327 seventh data columns C6 are damaged data columns; a total of 163 eighth data columns C7 are damaged data columns; a total of 163 ninth data columns C8 are damaged data columns; a total of 327 tenth data columns C9 are defective data columns. Finally, the control unit 20 counts the total number of damaged data columns in the period T0 to the period T1637 of the first data column C0 to the tenth data column C9, and sequences the following steps: 163. 163, 327, 491, 163, 327, 163, 327.
Next, in step S104, for the case where the predetermined period T is 10, the control unit 20 divides the total number of damaged data columns corresponding to the first through tenth data columns C0 through C9, respectively, by X (i.e., 1638) periods to perform normalization. Further, the control unit 20 divides the statistics "163, 327, 491, 163, 327" of the total number of damaged data columns in the period T0 to the period T1637 with respect to the first data column C0 to the tenth data column C9 in step S103 by 1638, respectively, to perform normalization, and sequences the normalization results as follows: 0.1, 0.2, 0.3, 0.1, 0.2, 0.1, 0.2. This means that the error rates of the first data column C0, the second data column C1, the third data column C2, the fourth data column C3, the fifth data column C4, the sixth data column C5, the seventh data column C6, the eighth data column C7, the ninth data column C8, and the tenth data column C9 are 10%, 20%, 30%, 10%, 20%, 10%, and 20%, respectively. Then, the control unit 20 stores the normalized result of the predetermined period T of 10 in the error rate record table (as shown in fig. 6).
Then, in step S105, it is determined whether or not the predetermined period T is equal to or greater than the upper limit value of the predetermined period range. Since the predetermined period T is 10 equal to the upper limit value (i.e., 10) of the predetermined period range, step S107 is performed.
In step S107, the control unit 20 selects a value of a predetermined period T having a first error rate (typically, the highest error rate) from the error rate record table. As can be seen from the error rate record table, when the predetermined period T is 8, the highest error rate is 0.75; when the predetermined period T is 9, the highest error rate thereof is 0.4; when the predetermined period T is 10, the highest error rate thereof is 0.3. Since the predetermined period T is equal to 8, there is the highest error rate. Therefore, the control unit 20 selects the predetermined period T as 8, and regards this predetermined period T as the predetermined period T having the highest error rate. Then, the control unit 20 further selects the data string 11 with the error rate equal to or greater than the predetermined error rate in the predetermined period T, and regards the data string 11 as a damaged data string. Further, the control unit 20 selects a data column 11 having an error rate equal to or greater than a predetermined error rate from the first data column C0 to the eighth data column C7, and regards the selected data column 11 as a damaged data column, and records the damaged data column into the data storage medium 10. For example, assuming that the predetermined error rate is set to 20%, at the predetermined period T of 8, the remaining data columns 11 are smaller than 20% except for the third data column C2 (error rate of 30%) and the sixth data column C5 (error rate of 75%), and thus the third data column C2 and the sixth data column C5 are marked or recorded as defective data columns.
Thereafter, the control unit 20 uses the cycle parameter to store the value of the predetermined cycle T having the highest error rate, and uses the corruption parameter to store the position at which the error rate of the corruption data column is equal to or greater than the predetermined error rate at the predetermined cycle T having the highest error rate (as shown in step S108). In the embodiment of the present invention, the predetermined period T stored by the period parameter is 8, and the locations of the damaged data columns stored by the damaged parameter are the third data column C2 and the sixth data column C5, wherein the period parameter and the damaged parameter can be stored in the data storage medium 10 or the data storage device. In addition, a damaged data column record table (not shown) may be established according to the period parameter and the damaged parameter, and the damaged data column record table is used for recording the damaged data column position in the predetermined period T.
It should be noted that, since the predetermined period range is set to be 2 to 256, which represents the maximum predetermined period T of 256 data columns, it is only necessary to spend 1Byte of memory capacity to record the value of the predetermined period T. Further, if each data column is recorded with 1 bit (bit), 256 data columns are required to be recorded with 256 bits, and therefore, when the upper limit value of the predetermined cycle range is 256, only a memory capacity of 32 (256/8) Bytes is required to record the position of the damaged data column. In other words, the data storage device only needs to spend 33Bytes of memory capacity in total to record the locations of periodically corrupted data columns in the data storage medium 10. Compared with the existing method that the memory capacity of thousands of Bytes is required to record the positions of all the damaged data columns, the method for detecting the periodically damaged data columns of the data storage medium of the embodiment of the invention only needs to cost the memory capacity of tens of Bytes to record the positions of all the damaged data columns, thereby greatly reducing the memory space required for storing or recording the positions of the damaged data columns.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for writing data according to an embodiment of the invention. Furthermore, the control unit 20 can obtain the location of the damaged data row in the data storage medium 10 according to the value of the predetermined period T stored in the period parameter and the location of the damaged data row stored in the damaged parameter by only reading the period parameter and the damaged parameter (as shown in step S201). Then, in the process of writing data to the data column 11 of the data storage medium 10 (as shown in step S202), the control unit 20 skips or passes (bypass) the damaged data column once encountering the position of the damaged data column, without writing data into the damaged data column. Thereby, writing data into a damaged data column of the data storage medium is avoided. Similarly, when reading data, the control unit 20 can also obtain the location of the damaged data column in the data storage medium 10 by the reading cycle parameter and the damaged parameter, so that the location of the damaged data column is skipped or crossed once it is encountered during the process of reading the data column 11 of the data storage medium 10, and the damaged data column is not read. Thereby, the data stored in the data storage medium is accurately read.
In summary, according to the method for writing data and the data storage device thereof provided by the embodiments of the present invention, the position of the damaged data row is obtained by reading the period parameter and the damaged parameter, and the data is accurately written into the data row of the data storage medium, wherein the period parameter stores a predetermined period with the highest error rate, and the damaged parameter stores the position of at least one damaged data row with the error rate greater than or equal to the predetermined error rate in the predetermined period. Therefore, in the process of writing data, the damaged data column can be actively skipped, so that the data is prevented from being written into the damaged data column of the data storage medium, and the aim of greatly reducing the memory capacity required for storing or recording the damaged data column position is fulfilled.
The present invention is not limited to the preferred embodiments, and the present invention is described above in any way, but is not limited to the preferred embodiments, and any person skilled in the art will appreciate that the present invention is not limited to the embodiments described above, while the above-described methods and techniques may be utilized to make some changes or modifications to equivalent embodiments, any simple modifications, equivalent changes and modifications made to the above embodiments according to the technical principles of the present invention will still fall within the scope of the technical solutions of the present invention.
Claims (6)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109122482A TWI774015B (en) | 2020-07-03 | 2020-07-03 | Data writing method and data storage device thereof |
TW109122482 | 2020-07-03 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113885777A CN113885777A (en) | 2022-01-04 |
CN113885777B true CN113885777B (en) | 2024-11-15 |
Family
ID=79012039
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010777138.8A Active CN113885777B (en) | 2020-07-03 | 2020-08-05 | Data writing method and data storage device thereof |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113885777B (en) |
TW (1) | TWI774015B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9348694B1 (en) * | 2013-10-09 | 2016-05-24 | Avago Technologies General Ip (Singapore) Pte. Ltd. | Detecting and managing bad columns |
CN106155572A (en) * | 2015-03-25 | 2016-11-23 | 慧荣科技股份有限公司 | Data storage device and data access method |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7734966B1 (en) * | 2002-12-26 | 2010-06-08 | Marvell International Ltd. | Method and system for memory testing and test data reporting during memory testing |
US20110002169A1 (en) * | 2009-07-06 | 2011-01-06 | Yan Li | Bad Column Management with Bit Information in Non-Volatile Memory Systems |
JP5510107B2 (en) * | 2010-06-22 | 2014-06-04 | 富士通株式会社 | Error correction test method |
US9146807B2 (en) * | 2012-12-04 | 2015-09-29 | Sandisk Technologies Inc. | Bad column handling in flash memory |
TWI601148B (en) * | 2016-05-05 | 2017-10-01 | 慧榮科技股份有限公司 | Method for selecting bad columns and data storage device with? bad column summary table |
TWI605462B (en) * | 2016-05-11 | 2017-11-11 | 慧榮科技股份有限公司 | Method for selecting bad columns within data storage media |
KR102790818B1 (en) * | 2016-11-24 | 2025-04-07 | 에스케이하이닉스 주식회사 | Data storage device and operating method thereof |
CN108073473A (en) * | 2018-01-12 | 2018-05-25 | 江苏华存电子科技有限公司 | A kind of flash memory bad list compression method |
-
2020
- 2020-07-03 TW TW109122482A patent/TWI774015B/en active
- 2020-08-05 CN CN202010777138.8A patent/CN113885777B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9348694B1 (en) * | 2013-10-09 | 2016-05-24 | Avago Technologies General Ip (Singapore) Pte. Ltd. | Detecting and managing bad columns |
CN106155572A (en) * | 2015-03-25 | 2016-11-23 | 慧荣科技股份有限公司 | Data storage device and data access method |
Also Published As
Publication number | Publication date |
---|---|
TW202203020A (en) | 2022-01-16 |
CN113885777A (en) | 2022-01-04 |
TWI774015B (en) | 2022-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10656875B2 (en) | Method for re-reading page data | |
TWI581093B (en) | Method for selecting bad columns within data storage media | |
TWI601148B (en) | Method for selecting bad columns and data storage device with? bad column summary table | |
CN116880781B (en) | Storage device and control method thereof | |
US20220283894A1 (en) | Detection method and system applied to intelligent analysis and detection for flash, intelligent terminal, and computer-readable storage medium | |
CN114203252A (en) | Bad block detection method, device, equipment and storage medium of nonvolatile memory | |
CN113885777B (en) | Data writing method and data storage device thereof | |
CN107368258B (en) | Screening method for damaged data rows of data storage media | |
TWI763608B (en) | Data storage device and selecting bad column method thereof | |
CN114077382B (en) | Data storage device and storage matrix selection method thereof | |
US11335432B2 (en) | Method for selecting bad columns in data storage medium | |
TWI795974B (en) | Data storage device and error tolerance selecting method thereof | |
US11803312B2 (en) | Data storage device and selecting bad data block method thereof | |
TWI637261B (en) | Method for selecting bad columns within data storage media | |
CN113934570B (en) | A flash memory page failure identification method and identification system | |
KR20230122909A (en) | Electronic device for storing data and data storage method using the same | |
CN101650974B (en) | Storage device capable of self-detection of use status and detection method thereof | |
CN112992256A (en) | Error rate balancing method and device |
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 |