Method and device for writing data in non-volatile memory

A non-volatile technology for writing data, which is applied in the field of smart cards, can solve the problems of reducing the service life of non-volatile memory, reducing the writing speed of non-volatile memory, and taking a long time, so as to improve the program running speed, The effect of reducing the number of writes and prolonging the service life

Inactive Publication Date: 2011-05-18
BEIJING WATCH DATA SYST
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0012] 1) If an operation command includes multiple write operations to data at different locations in the same page, the same page in the data area will be erased repeatedly and the backup area will also be written multiple times, which will reduce the lifetime of non-volatile memory;
[0013] 2) The above three steps will involve data writi

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 data in non-volatile memory
  • Method and device for writing data in non-volatile memory
  • Method and device for writing data in non-volatile memory

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0032] The method and device for writing data to a non-volatile memory provided by the present invention will be described in more detail below with reference to the accompanying drawings and embodiments.

[0033] When writing data to the non-volatile memory of the smart card, it is necessary to ensure the atomicity of the write operation, as well as the write speed and the number of writes to the non-volatile memory. To this end, the present invention provides a The method of writing data to non-volatile memory is to open up two buffers in RAM, which are divided into data buffer and backup buffer according to their functions. When writing data to non-volatile memory, write data to RAM first The data buffer in the data buffer, and then conditionally write the data in the data buffer to the non-volatile memory, such as figure 2 , Including the following steps:

[0034] Step S201, during the execution of the operation instruction, when it is determined to write data to the data area...

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 a method and a device for writing data in a non-volatile memory. The method comprises the following steps of: backing up all data of a memory cell at an address of data to be written-in in a data region to a data buffer region in a random access memory (RAM) when determining that data is to be written in the data region of the non-volatile memory during execution of an operating instruction; backing up original data at the address of the data to be written-in in the data region to a backup buffer region in the RAM and recording address information of the original data, which is backed up, in the data region in the backup buffer region; writing the data to be written in at a corresponding position of the data buffer region according to the address of the data to be written-in in the data region; and writing the data in the data buffer region back to the data region and clearing the backup buffer region when determining that the execution of the operating instruction is finished. By the method and the device, the data is quickly written in the non-volatile memory, write-in frequency of the non-volatile memory is reduced, program running speed is increased and service life of the non-volatile memory is prolonged.

Description

technical field [0001] The invention relates to the technical field of smart cards, in particular to a method and device for writing data into a non-volatile memory. Background technique [0002] Non-volatile memory is a memory whose data is not lost after power failure. Smart cards include non-volatile memory, such as EEPROM (Electrically Erasable Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), which uses non-volatile memory for data storage, and non-volatile memory is usually divided into multiple A unit of storage called a page. [0003] When writing a non-volatile memory, it is necessary to erase a page of data first, and then write new data to the page, which results in the same time for writing one byte of data and writing one page of data . When an operation instruction is executed, the operation instruction may include multiple discontinuous write operations to data at different locations in the same page. Executing the operati...

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/02G06F12/08G06F12/0866G11C16/34
Inventor 刘彦顺
Owner BEIJING WATCH DATA SYST
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products