Supercharge Your Innovation With Domain-Expert AI Agents!

Data writing and data reading methods of Flash

A data writing and data technology, applied in the field of memory, can solve the problems of less updated content, reduced reading efficiency and space utilization, and low efficiency

Active Publication Date: 2014-04-16
FEITIAN TECHNOLOGIES
View PDF4 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The inventor finds in the process of realizing the present invention, based on the characteristics that Flash can only perform erasing operations in units of blocks or on the entire chip, there are at least the following deficiencies in the prior art: the pages of many Flash chips are very large, but the application The content that needs to be updated each time is relatively small. According to the current general method, even if a few bytes of data are updated each time, it is necessary to re-find the free physical page, and then update the content of the original page in RAM and write it For new physical pages, using this method to update data is inefficient and will shorten the life of Flash;
[0004] A solution to the above problems is to divide the physical page into a valid data area and a log area. The valid data area is used to store data. When the data in the valid data area needs to be updated, an erase operation is not performed, but a The update log containing updated data is written to the log area; the disadvantage of this method is that it will reduce read efficiency and space utilization

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
  • Data writing and data reading methods of Flash
  • Data writing and data reading methods of Flash
  • Data writing and data reading methods of Flash

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0122] see figure 1 , Embodiment 1 of the present invention provides a data writing method for Flash, comprising:

[0123] Step 101: Calculate the logical page number of the data written this time and the offset address within the page of the data written this time according to the write address;

[0124] For example, in this embodiment, to write data in the logical address 0x2005 of Flash, the size of the physical page and logical page of Flash is 4KB, then the logical page number=|0x2005 / 0x1000|=2 of writing data this time , the page offset address of the data written this time=0x2005-2*0x1000=0x0005.

[0125] Step 102: Find the physical page corresponding to the logical page number of the data written this time according to the correspondence between the logical page number and the physical page number;

[0126] Preferably, in this embodiment, the correspondence between the logical page number and the physical page number is reflected by the logical page number-physical p...

Embodiment 2

[0196] see Figure 9 , present embodiment two provides a kind of data reading method of Flash, the Flash in present embodiment two adopts the method that provides in embodiment one to carry out data writing; Described data reading method comprises:

[0197] Step 201: Calculate the logical page number of the data to be read this time and the in-page offset address of the data to be read this time according to the read address;

[0198] For example, in this embodiment, the size of the physical page and logical page of Flash is 4KB, and the read address is 0x2005, and the logical page number of the data to be read this time=|0x2005 / 0x1000|=2, and this time the data to be read The page offset address of the fetched data=0x2005-2*0x1000=0x0005.

[0199] Step 202: Find the physical page corresponding to the logical page number of the data to be read this time according to the correspondence between the logical page number and the physical page number;

[0200] Preferably, in this ...

Embodiment 3

[0223] see Figure 10 , the present embodiment three provides a kind of data reading method of Flash, the Flash in the present embodiment three adopts the method that provides in the embodiment one to carry out data writing; Described data reading method comprises:

[0224] Step 301: Calculate the logical page number of the data to be read this time and the in-page offset address of the data to be read this time according to the read address;

[0225] For example, in this embodiment, the size of the physical page and logical page of Flash is 4KB, and the read address is 0x2005, and the logical page number of the data to be read this time=|0x2005 / 0x1000|=2, and this time the data to be read The page offset address of the fetched data=0x2005-2*0x1000=0x0005.

[0226] Step 302: Find the physical page corresponding to the logical page number of the data to be read this time according to the correspondence between the logical page number and the physical page number;

[0227] Pre...

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 discloses data writing and data reading methods of Flash, and belongs to the field of storage. The data writing method comprises the following steps: examining whether the free spaces of a data area and an index area of a physical page are sufficient, if so, storing the current data writing sequence into the data area of the physical page, and generating an index log sequence to be written into the index area of the physical page; if not, organizing true data in the physical page, storing the truthful data in the data area of an idle page, and generating an index log to be written into the index area of the idle page according to the truthful data. The data reading method comprises the following steps: obtaining the true storage address of data to be read according to the index log in the index area of the physical page, and reading the data from the true storage address. The data writing and data reading methods have the beneficial effects that the data updating and reading efficiency can be improved, and the space utilization rate of the Flash also can be ensured.

Description

technical field [0001] The invention relates to the field of memory, in particular to a data writing and reading method for Flash. Background technique [0002] Flash is a kind of memory chip. Flash memory is also called flash memory. It combines the strengths of ROM (read-only memory) and RAM (random access memory). It not only has electronic erasable and programmable performance, but also can read data quickly. So that the data will not be lost due to power failure. [0003] The inventor finds in the process of realizing the present invention, based on the characteristics that Flash can only perform erasing operations in units of blocks or on the entire chip, there are at least the following deficiencies in the prior art: the pages of many Flash chips are very large, but the application The content that needs to be updated each time is relatively small. According to the current general method, even if a few bytes of data are updated each time, it is necessary to re-find t...

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
IPC IPC(8): G06F12/02
Inventor 陆舟于华章
Owner FEITIAN TECHNOLOGIES
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More