Prevention method for linear accumulation data mutation of accidental power failure of nonvolatile memory

非易失性存储器意外掉电线性累计数据突变的防避方法

Abstract

本发明公开的一种非易失性存储器意外掉电线性累计数据突变的防避方法,旨在提供一种不频繁擦写非易失性存储器,不会造成累计数据突变和精度损失的方法。本发明通过下述技术方案予以实现:线性累计数据更新时,数据读取判决模块在第一和第二备存储区相同但与主存储区不同时,判定最终结果数据为第一备存储区加上一个线性累计数据的最小单位,否则,判定主存储区为最终结果数据,线性累计数据更新存储模块将最终结果数据增加一个最小单位后,按照先主存储区,再第一备存储区,最后第二备存储区的优先级顺序依次写入三级存储区;线性累计数据结果读取时,三级存储区同步模块将最终结果数据按优先级顺序依次写入与最终结果数据不一致的存储区上。
The invention discloses a prevention method for linear accumulation data mutation of accidental power failure of a nonvolatile memory, and aims to provide a method which does not frequently erase and write the nonvolatile memory and does not cause accumulation data mutation and precision loss. The method is implemented by the following technical scheme: when linear accumulation data are updated, a data reading and determining module determines that final result data are a first standby storage region and a minimum unit of a linear accumulation datum when first and second standby storage regions are same but different from a main storage region, otherwise, determines that the main storage region is the final result data, and a linear accumulation data updating and storage module adds the minimum unit to the final result data and writes the final result data into three stages of storage regions in sequence according to a priority sequence of the main storage region, the first storage region and the second storage region; and when a linear accumulation data result is read, a three-stage storage region synchronization module writes the final result data into storage regions inconsistent with the final result data in sequence according to a priority sequence.

Claims

Description

Topics

Download Full PDF Version (Non-Commercial Use)

Patent Citations (0)

    Publication numberPublication dateAssigneeTitle

NO-Patent Citations (0)

    Title

Cited By (0)

    Publication numberPublication dateAssigneeTitle