CN1258140C - Device and method for updating flash memory contents - Google Patents

Device and method for updating flash memory contents Download PDF

Info

Publication number
CN1258140C
CN1258140C CN 03109618 CN03109618A CN1258140C CN 1258140 C CN1258140 C CN 1258140C CN 03109618 CN03109618 CN 03109618 CN 03109618 A CN03109618 A CN 03109618A CN 1258140 C CN1258140 C CN 1258140C
Authority
CN
China
Prior art keywords
data
module
check code
unit
block
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.)
Expired - Fee Related
Application number
CN 03109618
Other languages
Chinese (zh)
Other versions
CN1536481A (en
Inventor
陈志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to CN 03109618 priority Critical patent/CN1258140C/en
Publication of CN1536481A publication Critical patent/CN1536481A/en
Application granted granted Critical
Publication of CN1258140C publication Critical patent/CN1258140C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a device and method for updating flash memory contents. The storage unit of the device is provided with a plurality of groups of storage area blocks which prestore initial data, and a checking code is worked out by the summary arithmetic according to the initial data stored in the storage area blocks and is stored in the storage area blocks; when the device receives input updated data, the updated data is orderly cut according to the storage capacity of the storage area blocks, the checking code of the updated storage area blocks which are cut is worked out by the summary arithmetic, and the checking code logically compares with the checking code of the storage area blocks, if the two checking codes are unequal, then the initial data in the storage area blocks is updated to the data of the updated area blocks which are cut. The device and method can effectively and quickly update the contents of a flash memory, and enhance the security in the updating process.

Description

Upgrade the device and method of flash memory content
Technical field
The invention relates to a kind of device and method that upgrades flash memory content, particularly, be used for improving, upgrading the device and method of flash memory content about a kind of software engineering is provided.
Background technology
Along with development of science and technology, various novel electron devices and parts are continually developed success, and the deviser plans, integrates product, makes every effort to make product to reach optimization; Except hardware aspect towards light, thin, short, little direction develops, the software aspect also provides multi-tasking and the program that has the hommization operation as far as possible, for solving the leak that exists in the electronic device program, need to bring in constant renewal in original old program simultaneously to improve efficient, function and the reliability of program run.
Now, do an explanation with the interior example that saves as.Along with the increase of demand and the development of technology, electronic installation is also strict day by day for the requirement of internal memory, require characteristic internal memory products such as low power consumption, low cost, different memory mediums, therefore have more and more mostly to be the new internal memory product that satisfies the more demands in market and to release successively, comprise ferroelectrics random access memory, MRAM (Magnetoresistive Random Access Memory) and OUM (Ovonics Unified Memory) etc.
General digital product often needs the internal memory product of different size, wherein the most general with DRAM, SRAM and Flash application.As for internal memory, the great capacity of needs of which specification of product needed, the deviser can decide according to actual needs.With PC is example, and Flash is used to store BIOS, and also demand heightens because of the cause of x86 framework for SRAM and DRAM.But, along with product now moves towards informationization, multimedization, communication, networking and mobile gradually, also produced different variations for the renewal of internal document; Existing Erasable Programmable Read Only Memory EPROM (erasable EPROM) can be divided into ultraviolet erasing storer (UV-EPROM) and electricity erasable memorizer (EEROM) and flash memories modes such as (Flash ROM).
Yet, the data updating technology of existing flash memories, be that employing is a unit with block (BLOCK), write fashionable at data updating, once the data of whole block (BLOCK) is wiped, carry out the write activity of data again, though speed is faster than the EPROM of next byte (BYTE),, write data more again owing to once wipe the data of a block, elongate actuation time, if the thing that when data updating, takes place to expect (as the accident power failure etc.), cause data updating to interrupt suddenly, can make the content of storer itself be subjected to havoc, both can't reach the purpose of data for updating, also might lose the original data of this electronic installation.
Have again, by existing flash memories data updating technology, for bios program upgrade handle for, if update BIOS program sub-fraction data wherein only, also need whole bios program (part that contains renewal) is write in the flash memories, so increased the update time of data.
Summary of the invention
For overcoming the shortcoming of above-mentioned prior art, fundamental purpose of the present invention is to provide a kind of device and method that upgrades flash memory content, can be stored in the interior data of flash memories by fast updating electronic installation (for example PDA or PC).
Another purpose of the present invention is to provide a kind of device and method that upgrades flash memory content, can reduce and upgrade the data loss that interruption causes, and improves the more security of new element.
The method of renewal flash memory content of the present invention is to be applied on the electronic installation, and this electronic installation can be any in digital camera, e-dictionary, personal digital assistant, personal computer and the notebook computer.This upgrades the method for flash memory content, the storage unit data of user's fast updating electronic installation inside is provided, this storage unit has many group memory block, prestore original core data in this memory block, the method of this renewal flash memory content may further comprise the steps: (1) user gathers contrast to storing original core data blocks, produces the check code of this memory block; (2) user imports the updating files data; (3) judge whether the input archives material has update instruction, if judged result then proceeds to step (8) for not, if judged result is for being then to proceed to step (4); (4) archives material that upgrades at input carries out the information data area blocking to set up a plurality of update blocks, each update blocks is gathered contrast handle, and produces the check code of this update blocks; (5) judge the memory block of original core data and the check code relation of update blocks,, then proceed to step (8),, then proceed to step (6) if judged result is " difference " if judged result is " identical "; (6) store the different data address of judgement check code; (7), carry out that data is wiped and data updating at the stored data address of step (6);
The device that the present invention upgrades flash memory content comprises, a data buffer unit, a raw data unit and a updating device; This updating device also includes a control unit module, logic contrast module, a data storage module, a data addressing module, a data update module and and gathers computing module; This raw data unit has many group memory block, prestore source book (as BIOS etc.) in this memory block, and the original core data stored according to this memory block calculates this check code to gather operation method, and after check code invested this group memory block, be stored in this raw data unit, when importing a data for updating to the data cache module of electronic installation, this control unit module is judged input data, when being decoded as " renewal " action, this gathers computing module and forms a update blocks at data for updating according to former memory cell areas block size cutting, and calculate pairing check code, the check code that is beneficial to original storage block and updated stored block compares mutually, check code is contrasted different address, be sent in this data addressing module and store, this data updating module can be carried out the action that data is wiped and upgraded to the original storage block according to the address of data addressed module inside information.
The device and method of renewal flash memory content of the present invention can be stored in the interior data of flash memories by fast updating electronic installation (for example PDA or PC), owing to used the method for memory block, can effectively reduce and upgrade the data loss that interruption causes, improve the more security of new element.
Description of drawings
Fig. 1 is a block schematic diagram, shows the basic framework synoptic diagram of this renewal flash memory content device;
Fig. 2 is a data updating schematic flow sheet, represents the motion flow and the step of the method for this renewal flash memory content; And
Fig. 3 (A) and Fig. 3 (B) represent the program area block sequence of an outside data buffer unit and a raw data unit to gather the rough schematic that contrasts module integrated calculating through this.
Embodiment
Embodiment
The method of renewal flash memory content of the present invention is to be applied on the electronic installation, and this electronic installation can be any in digital camera, e-dictionary, personal digital assistant, personal computer and the notebook computer.Fig. 1 illustrates the system architecture calcspar of the device of renewal flash memory content of the present invention, as shown in the figure, it comprises a updating device 1, a data buffer unit 2 and a raw data unit 3, this updating device 1 can receive outside data through this data buffer unit 2, upgrades the data that raw data unit 3 stores.
This data buffer unit 2 is one group of random memory, in order to outside and inside information to be provided, temporarily deposits the memory headroom of data and address, and this data buffer unit 2 is RAM (Read Access Memory in the present embodiment; Random access memory).
This raw data unit 3 is main storage unit of this electronic installation, has a plurality of memory block, prestores the core data (as bios program or Embedded software) of device in this memory block; Be flash memories (Flash ROM) in the present embodiment.
Wherein this updating device 1 comprises that also a control unit module 4, a data storage module 5, gather computing module 6, a logic contrast module 7, a data addressing module 8 and a data update module 9.Wherein control unit module 4 and logic contrast module 7 is two big processing modules of central processing unit.
This gathers computing module 6, be to utilize to gather operation method, carry out blockization and aggregation process at the data for updating in this data buffer unit 2 of input, new data is more cut into the equirotal block of the memory block of raw data unit 3, archives, title, size, time, date and the content of update blocks inside are aggregated into a check code (BINARY CODE), check code is invested after the program area block again, be stored in this data buffer unit 2, in subsequent logic contrast action, to use.
This logic contrast module 7, be responsible for actuating logic computing and contrast instruction, at leaving in this raw data unit 3 and the data buffer storage unit 2, the memory block that respectively has a plurality of check codes, carry out the actual logic computing relatively, and judge updated stored block check code (check-sum1 sequence) and original storage block check code (check-sumA sequence) relation.
This control unit module 4, be to operate core between this logic contrast module 7 and other module, it can be from this data buffer unit 2, extract the instruction of loading routine, and command function deciphered, discern its function (being update functions in the present embodiment), activate and gather computing module 6 and logic contrast module 7, the more new data that data buffer unit 2 is deposited carries out blockization, aggregation process, coding calculates and the logic contrast.
This data addressed module 8 in order to store this logic relatively in the data address of different check code block, be defined as the address of required " data for updating ", it is a kind of buffer that stores the address, can divide two kinds of base Address Register (base address register) and instruction Address Registers (instruction address register).
This data updating module 9, have a kind of write device (ROM burner) software function,, lock a plurality of different check codes address at preceding data addressed module, elder generation with respect to the data in the data addressing module lock address, carries out the data erasing move to the original storage block; When wipe finish after, read again in this data buffer storage unit 2, with respect to the data in the selected address of data addressing module, carry out the data write activity.
This data storing module 5, it is high capacity storage storage area, and master routine, personal information and the relative application software of depositing electronic installation can be provided.
Fig. 2 is a data updating schematic flow sheet, and the steps flow chart of the required execution of method of upgrading flash memory content is described.
When the user operates a updating device, shown in step S1, core data (as BIOS, Embedded etc.) according to the storage of raw data unit (Flash ROM) inner many group memory block, calculate many group check codes with gathering operation method, check code is invested each memory block back, carry out step S2 immediately.
In step S2, to this data buffer unit 2, carry out step S3 immediately by outside input data for updating file.
In step S3, by this control unit module 4, the loading routine information paper is carried out function judge, judge whether to have the instruction of renewal, if judged result is a "No", then directly finish more new element, if judged result is a "Yes", carry out step S4 immediately.
In step S4, this gathers computing module 6 carry out blockization at inner refresh routine in this data buffer unit 2, refresh routine is formed a updated stored block according to the cutting of original storage zones block size, and after gathering computing and being encoded into check code, check code is invested updated stored block back, carry out step S5 immediately.
In step S5, by this logic contrast module 7, according to appended many groups check code memory block in raw data unit 3 and this data buffer unit 2, do the logic contrast, judge whether update blocks check code (check-sum1) is identical with original storage block check code (check-sumA),, then directly finish more new element if judged result is a "Yes", if judged result is a "No", carry out step S6 immediately.
In step S6, when this data addressed module 8 contrasts stored logic, judge the data address when updated stored block and original storage block check code are different, carry out step S7 immediately.
In step S7, this data update module 9 is obtained this data addressing module 8 and is defined and will upgrade data address, to the data of corresponding address in the original storage block, carries out the data erasing move earlier, carries out step S8 immediately.
In step S8, from data addressing module 8, obtain define in the time of will upgrading data address, immediately from this data buffer unit 2, read and want the updated stored block, by the data space of corresponding address in 9 pairs of original storage blocks of this data update module, carry out data and write more new element again, finish immediately.
Fig. 3 (A) and Fig. 3 (B) are application synoptic diagram, gather the memory block rough schematic that computing module 6 is handled this original storage unit 3 and this data buffer unit 2 in order to represent this.
Fig. 3 (A) is that the data for updating file is imported to this data buffer storage unit 2 in the outside, gathers computing module 6 blockizations, gathers and calculate and coding through this, produces sequences such as this check code check-sum1, check-sum2.
Fig. 3 (B) is the core data of the inner raw data of electronic installation unit 3, gathers computing module 6 by this and gathers calculating and coding, also produces sequences such as check code check-sumA, check-sumB.
The memory block of raw data unit 3 and this data buffer unit 2 gathers gathering calculating, encode and contrasting of computing module 6 and this logic contrast module 7 by this, can judge following two kinds of results:
(1) check-sum1 equals check-sumA, so representative does not need the memory block of check-sumA is made more new element.
(2) check-sum2 is not equal to check-sumB, need make update functions so represent the script memory block to be corrected maybe.

Claims (15)

1. a device that upgrades flash memory content is characterized in that, this device comprises:
One raw data unit has many group memory block, the core operational data file of storage device;
One data buffer unit store the data for updating of importing this device, and this data for updating is a plurality of blocks to be updated according to this memory block size discrimination also;
One gathers computing module, utilization gathers operation method, at the memory block of raw data unit and all data contents of each block to be updated of data buffer unit, gather respectively and calculate and be encoded into a check code, the subsidiary check code that correspondence is arranged of each block;
One logic contrast module is responsible for actuating logic computing and contrast instruction, to having the memory block of check code in this raw data unit and this data buffer storage unit, carries out the actual logic computing, relatively the check code of two corresponding blocks in unit;
One data addressing module stores the different data address of this logic contrast module audit by comparison sign indicating number, and it can be a temporary storage space;
One data update module, after receiving the renewal data address of this data addressing module definition, the memory block data content of the raw data unit that check code is different, carrying out data wipes, to read with the content of the block to be updated of the different data buffer unit of its contrast again, be updated in the memory block data of raw data unit; And
One control unit module, in order to from this data buffer unit, to extract the loading routine instruction, and command function deciphered, whether identification wherein has update instruction, if have, activate this again and gather computing module and logic contrast module, the data for updating that this data buffer unit is deposited is carried out blockization, aggregation process, coding calculating and logic contrast.
2. device as claimed in claim 1 is characterized in that, this raw data unit is a kind of Erasable Programmable Read Only Memory EPROM, is in ultraviolet erasing storer and electricity erasable memorizer and the flash memories any.
3. device as claimed in claim 1 is characterized in that, this core that is stored in the raw data unit operates archives, is meant in BOIS and the embedded software any.
4. device as claimed in claim 1 is characterized in that, this data buffer unit can be in order to providing outside and internal reservoir data, and behind the device power-off, the data in the storer can all disappear, and it is among SRAM or the DRAM any.
5. device as claimed in claim 1, it is characterized in that, this gathers computing module is after archives, title, size, time, date and content in the memory block are gathered calculating and be encoded into a check code, with the method for check code, judging whether original storage block data has changed maybe need upgrade with this memory block.
6. device as claimed in claim 1 is characterized in that, this control unit module and this logic contrast module are two big processing unit module of central processing unit inside.
7. device as claimed in claim 1 is characterized in that, this data addressing module in order to store this logic relatively in the data address of different check code block, be a kind of buffer that stores the address, can divide two kinds of base Address Register and instruction Address Registers.
8. device as claimed in claim 1 is characterized in that, this data update module can carry out data Ca Chu to the original storage block and write at specified address date, can be write device and writes in the simulation software any.
9. method of upgrading flash memory content, it is characterized in that, the storage unit data of user's fast updating electronic installation inside is provided, this storage unit has many group memory block, prestore original core data in this memory block, the method for this renewal flash memory content may further comprise the steps:
(1) user gathers contrast to storing original core data blocks, produces the check code of this memory block;
(2) user imports updating files data to data buffer unit;
(3) judge whether the input archives material has update instruction, if judged result then proceeds to step (8) for not, if judged result is for being then to proceed to step (4);
(4) archives material that upgrades at input carries out the information data area blocking to set up a plurality of update blocks, each update blocks is gathered contrast handle, and produces the check code of this update blocks;
(5) judge the memory block of original core data and the check code relation of update blocks,, then proceed to step (8),, then proceed to step (6) if judged result is " difference " if judged result is " identical ";
(6) store the different data address of judgement check code;
(7), carry out that data is wiped and data updating at the stored data address of step (6);
(8) finish to upgrade processing procedure.
10. the method for renewal flash memory content as claimed in claim 9 is characterized in that, this electronic installation comprises:
One raw data unit provides this step (1) to store the memory block that this has check code;
This data buffer unit provides this step (2) to store updating files data one control unit module of being imported, in order to carry out the function judgment task of this step (3) according to this step (2) archives material of importing;
One gathers computing module, according to the arbitration functions of this step (3), the input archives material is carried out the information data area blocking of this step (4) and is gathered the contrast processing;
One logic contrast module according to the check code of this step (1) with step (4), is carried out the judgment task of this step (5);
One data addressed module is carried out the storage work of this step (6) according to the judged result of this step (5); And
One data updating module is carried out this step (7) according to the stored data address of this step (6) and is carried out the work that data is wiped and upgraded.
11. the method for renewal flash memory content as claimed in claim 9 is characterized in that, this electronic installation can be any in digital camera, e-dictionary, personal digital assistant, personal computer and the notebook computer.
12. the method for renewal flash memory content as claimed in claim 9, it is characterized in that, input to the data file of this data buffer unit, can cut into the update blocks of original storage zones block size, this input archives material is meant the BOIS of latest edition and in the embedded software any.
13. the method for renewal flash memory content as claimed in claim 10, it is characterized in that, this gathers computing module is after archives, title, size, time, date and content in the memory block are gathered calculating and be encoded into a check code, with the method for check code, can judge whether original storage block data has changed maybe need upgrade with this memory block.
14. the method for renewal flash memory content as claimed in claim 10, it is characterized in that, this data addressed module in order to store this logic relatively in, the data address of different check code block, be a kind of buffer that stores the address, can be divided into two kinds of base Address Register and instruction Address Registers.
15. the method for renewal flash memory content as claimed in claim 10, it is characterized in that, this data updating module can be carried out Ca Chu to original storage block data and write the data of assigned address, can be write device and writes in the simulation software any.
CN 03109618 2003-04-09 2003-04-09 Device and method for updating flash memory contents Expired - Fee Related CN1258140C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 03109618 CN1258140C (en) 2003-04-09 2003-04-09 Device and method for updating flash memory contents

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 03109618 CN1258140C (en) 2003-04-09 2003-04-09 Device and method for updating flash memory contents

Publications (2)

Publication Number Publication Date
CN1536481A CN1536481A (en) 2004-10-13
CN1258140C true CN1258140C (en) 2006-05-31

Family

ID=34319412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 03109618 Expired - Fee Related CN1258140C (en) 2003-04-09 2003-04-09 Device and method for updating flash memory contents

Country Status (1)

Country Link
CN (1) CN1258140C (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101091163B (en) 2004-12-31 2011-06-08 英特尔公司 Manageability extension mechanism for system firmware, device and system
CN100373336C (en) * 2005-01-28 2008-03-05 中兴通讯股份有限公司 Method for realizing flash-storage dynamic update of single-chip machine
US8566479B2 (en) * 2005-10-20 2013-10-22 International Business Machines Corporation Method and system to allow logical partitions to access resources
CN101196851B (en) * 2006-12-05 2011-09-07 慧荣科技股份有限公司 Data management method of flash memory
CN101149815B (en) * 2007-10-23 2010-12-01 中兴通讯股份有限公司 Hardware module information tag and method for updating hardware module information tag
CN101458663B (en) * 2007-12-12 2010-12-08 宇瞻科技股份有限公司 Data access method for memory device
CN101739360B (en) * 2008-11-06 2011-12-28 奇岩电子股份有限公司 Protection method for memory data
CN101739347B (en) * 2008-11-06 2011-11-09 奇岩电子股份有限公司 Method for protecting proprietary commands of memory
CN101510175B (en) * 2009-04-02 2015-06-03 北京中星微电子有限公司 Method for updating target data to memory and apparatus thereof
CN101794257B (en) * 2009-12-22 2012-10-03 深圳市硅格半导体有限公司 Method and device for updating data of data storage type flash and storage device
CN103853566B (en) * 2012-11-30 2017-05-03 鸿富锦精密工业(深圳)有限公司 Basic input output system (BIOS) updating system and method
CN103135941B (en) * 2013-01-11 2016-08-17 深圳市江波龙电子有限公司 The management method of in-line memory, in-line memory and electronic equipment
CN105607861A (en) * 2014-11-24 2016-05-25 中兴通讯股份有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN1536481A (en) 2004-10-13

Similar Documents

Publication Publication Date Title
US11150891B2 (en) Method and device for updating software executed from non-volatile memory
CN1258140C (en) Device and method for updating flash memory contents
US7650458B2 (en) Flash memory driver
CN1078364C (en) Flash file system
CN101408880A (en) Methods and apparatus for file management using partitioned file metadata
CN1932778A (en) Method for conducting virtual space management to NAND FLASH memory
CN1420440A (en) Method for managing flash memory
US7426605B2 (en) Method and apparatus for optimizing flash device erase distribution
CN1502075A (en) Method for loading and executing an application in an embedded environment
CN103646082A (en) Method and device for checking files
CN1702773A (en) Programmable parallel lookup memory
CN102819494B (en) Optimization method when a kind of flash memory is sequentially written in
EP3834082B1 (en) Memory optimized block-based differential update algorithm
US20050038955A1 (en) Flash ROM content updating method and system
US20170123677A1 (en) Integration of Reference Sets with Segment Flash Management
CN1752933A (en) Chip system for supporting firmware on line upgrading and its on line upgrading method
CN103810099A (en) Code tracing method and code tracing system
CN1266614C (en) Method for quickening logic block mapping speed in Flash file system
CN1296836C (en) Circuit and method for implementing correction operation to only read memory in inlaid program
US6484250B1 (en) Hash technique eliminating pointer storage to reduce RAM size
CN1480953A (en) Method for storing check code in memory and its device
CN101063939A (en) Embedded devices capable of renovating operating system program and methods therefor
EP2795455A1 (en) Systems and methods for managing parallel access to multiple storage systems
CN1115630C (en) Micro computer
CN111506628B (en) Data processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20060531

Termination date: 20110409