Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for writing and detecting data

A technology for writing data and detecting data. It is applied in the field of communication electronics and can solve problems such as system failure to operate normally and file damage.

Inactive Publication Date: 2014-09-10
北京君正集成电路股份有限公司
View PDF5 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] The present invention provides a method and device for writing and detecting data, which is used to solve the situation that the wrong data written before use will cause the file to be damaged and the system cannot operate normally in the case of power failure or system error

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for writing and detecting data
  • Method and device for writing and detecting data
  • Method and device for writing and detecting data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] refer to Figure 5 , the embodiment of the present invention provides a method for writing data, which is used in combination with a subsequent method for detecting data, which can avoid problems such as the destruction of the written file due to sudden power failure or system error; Atomic write operation is an operation that cannot be interrupted, and the operation either succeeds or fails, so when the system suddenly loses power or makes an error, it will cause fatal damage to atomic write operation, and the write operation provided by the embodiment of the present invention The data method and the method of detecting data can prevent the file from being destroyed due to sudden problems for operations similar to atomic write operations; for the convenience of introduction, here is an example of atomic write operations in MLC NandFlash, write The specific process of the data method is as follows:

[0050] Step 1, judge whether it is the first write operation, if it i...

Embodiment 2

[0060] The embodiment of the present invention provides a method for detecting data. Based on the method for writing data provided in Embodiment 1, the method detects the correctness of data. This method is especially suitable for operations similar to atomic write operations, and can be easily It is better to avoid the destruction of files due to unexpected problems; for the convenience of introduction, here is an example of atomic write operation in MLC NandFlash. The specific process of detecting data method is as follows:

[0061] Step A, when the system starts or returns to normal again, it is sequentially detected whether the data of each page in the MLC NandFlash where the last write operation was interrupted is correct; that is, it is judged whether the data in the current storage unit is correct, and if it is not correct, perform the steps B; otherwise, step C is performed; at this time, the current storage unit is the storage unit where the last write operation was in...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of communication electronics, particularly to a method and a device for writing and detecting data. By the method and the device, file corruption due to writing wrong data is avoided in case of power failure or system error. The method includes writing start address information of a next storage cell on a start page of a current storage cell if in the first write operation; otherwise writing the start address information of the next storage cell and start address information of a last storage cell; if data in the current storage cell are wrong in detection, finding the start page of the current storage cell in which the current page stays, then extracting the start address information of the current storage cell from the start page of the current storage cell and abandoning the data of the current storage cell; and abandoning the data of the last storage cell, when data indicated by the start address information of the last storage cell are wrong, and employing an above storage cell of the last storage cell as the current storage cell. By the method, the problem of the prior art is solved.

Description

technical field [0001] The invention relates to the technical field of communication electronics, in particular to a method and device for writing and detecting data. Background technique [0002] At present, NandFlash storage technology has been widely used in smart devices, and it occupies a certain market advantage for its convenience, speed and large-capacity storage. NandFlash includes four types, three of which are as follows: [0003] The first type, MLC NandFlash, is characterized by storing 2 bits of data in each hardware unit; [0004] The second type, TLC NandFlash, is characterized in that each hardware unit stores 3 bits of data; [0005] The third type, QLC NandFlash, is characterized by storing 4 bits of data per hardware unit. [0006] NandFlash includes multiple blocks (Block), and each Block stores a group of pages (Page), and the data is stored in NandFLash through SharedPage. Taking MLC NandFlash as an example, the data storage method is as follows, re...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F12/02
Inventor 邱东升
Owner 北京君正集成电路股份有限公司