JP2007199985A - Rewriting device and rewriting method for nonvolatile memory - Google Patents

Rewriting device and rewriting method for nonvolatile memory Download PDF

Info

Publication number
JP2007199985A
JP2007199985A JP2006017265A JP2006017265A JP2007199985A JP 2007199985 A JP2007199985 A JP 2007199985A JP 2006017265 A JP2006017265 A JP 2006017265A JP 2006017265 A JP2006017265 A JP 2006017265A JP 2007199985 A JP2007199985 A JP 2007199985A
Authority
JP
Japan
Prior art keywords
unit
data
rewriting
check table
processing
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.)
Granted
Application number
JP2006017265A
Other languages
Japanese (ja)
Other versions
JP4910402B2 (en
Inventor
Yoshiyuki Kobayashi
美行 小林
Naoshi Hatake
直志 畠
Hideo Yamada
英夫 山田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2006017265A priority Critical patent/JP4910402B2/en
Publication of JP2007199985A publication Critical patent/JP2007199985A/en
Application granted granted Critical
Publication of JP4910402B2 publication Critical patent/JP4910402B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Read Only Memory (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a rewriting device and a rewriting method for a nonvolatile memory, capable of reducing a time necessary for rewriting processing. <P>SOLUTION: When executing the rewriting processing of a flash memory 28 by repeating writing of download data and erasure of already written data with each sector 29 of the flash memory 28 as a sequential processing target, a checksum table 28A showing a checksum of the already written data of each sector 29 is stored in the flash memory 28, a checksum table 34C of the download data 34 produced in a storage capacity unit corresponding to each sector 29 is acquired, the checksum table 28A and a checksum table 34C corresponding to each sector 29 are compared, the execution of the writing and the erasure with the sector 29 decided that a value accords as the processing target is eliminated, and the checksum table 28A is updated every time the rewriting processing is executed. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、データが書き換え可能な不揮発性メモリの書き換え装置及び書き換え方法に関する。   The present invention relates to a rewriting device and a rewriting method for a nonvolatile memory capable of rewriting data.

データが書き換え不揮発性メモリとしては、フラッシュメモリ、EEPROM(Electric Erasable Programmable Read Only Memory)、FeRAM(Ferro Electric Random Access Memory)等、種々のメモリが挙げられる。   Non-volatile memories whose data is rewritten include various memories such as a flash memory, an EEPROM (Electric Erasable Programmable Read Only Memory), and an FeRAM (Ferro Electric Random Access Memory).

これらの不揮発性メモリでは、データを書き換える際に、書込み対象領域の書込み済みデータを一旦消去し、その後に新規データを書き込む処理を実行している。   In these non-volatile memories, when data is rewritten, the written data in the write target area is once erased, and then new data is written.

例えば、フラッシュメモリにおける書き換え処理は、セクタ単位で実行され、書込み対象領域の全てのセクタについて消去及び書込みの処理が実行される。   For example, the rewrite process in the flash memory is executed in units of sectors, and the erase and write processes are executed for all sectors in the write target area.

このため、新規データの値にかかわらず、全てのデータを消去して書込むことにより書き換え処理を実行していたので、不揮発性メモリに書込む新規データの容量が大きい場合には、書き換え処理に要する時間が長くなってしまう。   For this reason, the rewrite process is executed by erasing and writing all data regardless of the value of the new data. Therefore, if the capacity of the new data to be written to the nonvolatile memory is large, the rewrite process is performed. It takes a long time.

この問題に適用しうる技術として、従来、フラッシュメモリのセクタ消去時間及びデータ書込み時間を短縮すべく、書き換え処理の実行前の書込み済みデータが消去状態の値であるセクタに対する書込み前のセクタ消去処理を実行しないこと、及び、書込む新規データが消去状態の値であるセクタに対するデータ書込み処理を実行しないこと、が提案されている(例えば、特許文献1参照。)。
特開2001−297589公報
As a technique applicable to this problem, conventionally, in order to shorten the sector erasing time and data writing time of the flash memory, the sector erasing process before the writing to the sector in which the written data before the rewriting process is the value of the erasure state That the new data to be written is a value in the erased state is not executed (see, for example, Patent Document 1).
JP 2001-297589 A

しかしながら、上記特許文献1に記載の技術では、書込み前のデータの値が消去状態の値でないセクタに関しては、書込み後のデータの値に関係なく少なくとも消去処理が実行されるので、処理時間を十分に短縮できない、という問題点があった。   However, in the technique described in Patent Document 1, at least the erasing process is executed regardless of the data value after writing for a sector whose data value before writing is not an erasure state value. There was a problem that it could not be shortened.

本発明は上記問題点を解決するためになされたものであり、書込み済みデータと新規データの内容に応じて書き換え処理を省略することにより書き換え処理に要する時間を短縮できる情報処理装置及び情報処理方法を提供することが目的である。   The present invention has been made to solve the above-described problems, and an information processing apparatus and an information processing method capable of shortening the time required for the rewriting process by omitting the rewriting process according to the contents of written data and new data Is the purpose.

上記課題を解決するために、請求項1記載の発明は、不揮発性メモリの記憶領域を所定の記憶容量単位で区分して得られる複数の区分領域のそれぞれを順次処理対象として書込み済みデータの消去及び新規データの書き込みを行なう単位処理を繰り返すことにより前記不揮発性メモリの書き換え処理を実行する不揮発性メモリの書き換え装置であって、前記書き換え処理が実行される毎に更新され、前記各区分領域に前記書込み済みデータのチェックテーブルを記憶する記憶手段と、前記所定の記憶容量単位で作成された前記新規データのチェックテーブルを取得する取得手段と、前記取得手段により取得された前記新規データのチェックテーブルと前記記憶手段に記憶された前記書込み済みデータのチェックテーブルとを比較して一致するか否かを前記区分領域毎に判定する判定手段と、前記判定手段により一致すると判定された場合、当該区分領域を処理対象とした前記単位処理の実行を省略する省略手段と、を備えている。   In order to solve the above problem, the invention according to claim 1 is directed to erasing written data by sequentially processing each of a plurality of divided areas obtained by dividing a storage area of a nonvolatile memory in a predetermined storage capacity unit. And a non-volatile memory rewriting device that executes rewriting processing of the non-volatile memory by repeating unit processing for writing new data, and is updated each time the rewriting processing is executed, Storage means for storing a check table for the written data, acquisition means for acquiring the check table for the new data created in the predetermined storage capacity unit, and a check table for the new data acquired by the acquisition means Is compared with the check table of the written data stored in the storage means. Judging means for judging whether or not for each of the segmented region, when it is determined that the matching by the determining unit, and a, a skip unit is omitted execution of the unit processing the segmented region processed.

請求項1記載の発明によれば、不揮発性メモリの記憶領域を所定の記憶容量単位で区分して得られる複数の区分領域のそれぞれを順次処理対象として書込み済みデータの消去及び新規データの書き込みを行なう単位処理を繰り返すことにより前記不揮発性メモリの書き換え処理を実行するに際し、前記各区分領域に前記書込み済みデータのチェックテーブルを記憶手段に記憶しておき、前記所定の記憶容量単位で作成された前記新規データのチェックテーブルを取得して、前記新規データのチェックテーブルと前記記憶手段に記憶された前記書込み済みデータのチェックテーブルとを比較して一致するか否かを前記区分領域毎に判定し、一致すると判定された前記区分領域を処理対象とした前記単位処理の実行を省略して、前記書き換え処理が実行される毎に前記記憶手段に記憶されたチェックテーブルを更新するので、書込み済みデータと新規データの内容に応じて書き換え処理を省略することにより書き換え処理に要する時間を短縮できる。   According to the first aspect of the present invention, erase of written data and writing of new data are performed sequentially for each of a plurality of divided areas obtained by dividing the storage area of the nonvolatile memory by a predetermined storage capacity unit. When executing the rewriting process of the nonvolatile memory by repeating the unit process to be performed, the check table of the written data is stored in the storage unit in each of the divided areas, and is created in the predetermined storage capacity unit. The new data check table is obtained, and the new data check table and the written data check table stored in the storage unit are compared to determine whether or not they match for each of the divided regions. The rewriting process is performed by omitting the execution of the unit process for the segmented area determined to match. Since updating the check table stored in the storage means each time it is executed, it is possible to shorten the time required to rewrite processing by omitting the rewrite process according to the contents of the written data and the new data.

すなわち、本発明は、書込み済みデータのチェックテーブルと新規データのチェックテーブルとを用意しておき、チェックテーブルの異なる区分領域については単位処理を実行し、チェックテーブルが一致する区分領域については単位処理を省略する。   That is, the present invention prepares a check table for written data and a check table for new data, executes unit processing for different partitioned areas of the check table, and executes unit processing for partitioned areas that match the check table. Is omitted.

なお、チェックテーブルとしては、所定の記憶容量単位のデータのチェックサム等を適用することができる。   As the check table, a checksum of data in a predetermined storage capacity unit can be applied.

また、本発明は、請求項2記載の発明のように、前記単位処理が完了した場合、及び前記省略手段により前記単位処理が省略された場合に、処理対象とされた前記区分領域の識別情報を更新記憶する不揮発性記憶手段と、前記書き換え処理の実行が中断された場合、前記不揮発性記憶手段に記憶された情報に基づいて未処理の前記区分領域を処理対象とした前記単位処理を実行して前記書き換え処理を再開する再開手段と、を更に備えた構成とすることもできる。   Further, according to the present invention, as in the second aspect of the present invention, when the unit process is completed and when the unit process is omitted by the omitting means, the identification information of the segmented area to be processed A non-volatile storage means for updating and storing, and when the execution of the rewriting process is interrupted, the unit process is executed on the unprocessed segmented area based on the information stored in the non-volatile storage means Thus, a resumption means for resuming the rewriting process may be provided.

さらに、本発明は、請求項3記載の発明のように、前記所定の記憶容量は、前記単位処理を実行可能な最小単位としてもよい。なお、単位処理を実行可能な最小単位は、不揮発性メモリの種類や仕様等に基づいて決定される。   Further, according to the present invention, the predetermined storage capacity may be a minimum unit that can execute the unit processing. Note that the minimum unit that can execute the unit processing is determined based on the type and specification of the nonvolatile memory.

一方、上記課題を解決するために、請求項4記載の発明は、不揮発性メモリの記憶領域を所定の記憶容量単位で区分して得られる複数の区分領域のそれぞれを順次処理対象として書込み済みデータの消去及び新規データの書き込みを行なう単位処理を繰り返すことにより前記不揮発性メモリの書き換え処理を実行する不揮発性メモリの書き換え方法であって、前記各区分領域に前記書込み済みデータのチェックテーブルを記憶手段に記憶しておき、前記所定の記憶容量単位で作成された前記新規データのチェックテーブルを取得して、前記新規データのチェックテーブルと前記記憶手段に記憶された前記書込み済みデータのチェックテーブルとを比較して一致するか否かを前記区分領域毎に判定し、一致すると判定された前記区分領域を処理対象とした前記単位処理の実行を省略して、前記書き換え処理が実行される毎に前記記憶手段に記憶されたチェックテーブルを更新する。   On the other hand, in order to solve the above-mentioned problem, the invention according to claim 4 is the data already written by sequentially processing each of the plurality of divided areas obtained by dividing the storage area of the nonvolatile memory by a predetermined storage capacity unit. A non-volatile memory rewriting method for executing rewriting processing of the non-volatile memory by repeating unit processing for erasing data and writing new data, and storing the check table of the written data in each of the divided areas And storing the new data check table created in the predetermined storage capacity unit, and the new data check table and the written data check table stored in the storage means. Whether or not they match is determined for each of the partitioned areas, and the partitioned areas determined to match are processed Omit the execution of the unit processing the elephants, and updates the check table stored in the storage means every time the rewriting process is executed.

請求項4記載の発明によれば、請求項1記載の不揮発性メモリの書き換え装置と同様に作用するので、請求項1記載の発明と同様、書込み済みデータと新規データの内容に応じて書き換え処理を省略することにより書き換え処理に要する時間を短縮できる。   According to the invention described in claim 4, since it operates in the same manner as the nonvolatile memory rewriting device described in claim 1, as in the invention described in claim 1, the rewriting process is performed according to the contents of written data and new data. By omitting, the time required for the rewriting process can be shortened.

以上説明した如く本発明は、不揮発性メモリの記憶領域を所定の記憶容量単位で区分して得られる複数の区分領域のそれぞれを順次処理対象として書込み済みデータの消去及び新規データの書き込みを行なう単位処理を繰り返すことにより前記不揮発性メモリの書き換え処理を実行するに際し、前記各区分領域に前記書込み済みデータのチェックテーブルを記憶手段に記憶しておき、前記所定の記憶容量単位で作成された前記新規データのチェックテーブルを取得して、前記新規データのチェックテーブルと前記記憶手段に記憶された前記書込み済みデータのチェックテーブルとを比較して一致するか否かを前記区分領域毎に判定し、一致すると判定された前記区分領域を処理対象とした前記単位処理の実行を省略して、前記書き換え処理が実行される毎に前記記憶手段に記憶されたチェックテーブルを更新するので、書込み済みデータと新規データの内容に応じて書き換え処理を省略することにより書き換え処理に要する時間を短縮できる、という優れた効果を有する。   As described above, the present invention is a unit for erasing written data and writing new data for each of a plurality of divided areas obtained by dividing a storage area of a nonvolatile memory in a predetermined storage capacity unit. When executing the rewriting process of the nonvolatile memory by repeating the process, the check table of the written data is stored in the storage means in the respective divided areas, and the new data created in the predetermined storage capacity unit is stored. A data check table is obtained, and the new data check table and the written data check table stored in the storage unit are compared to determine whether or not they match for each of the partitioned areas. Then, the execution of the unit process with the determined segmented area as a processing target is omitted, and the rewriting process is performed. Since the check table stored in the storage means is updated each time the data is executed, the time required for the rewriting process can be shortened by omitting the rewriting process according to the contents of written data and new data. Have

以下、図面を参照して、本発明の実施の形態について詳細に説明する。まず、図1は、本実施の形態に係るデータ書き換え装置10の構成を示す概略図であり、以下、データ書き換え装置10の概略構成について説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. First, FIG. 1 is a schematic diagram showing a configuration of a data rewriting device 10 according to the present embodiment. Hereinafter, a schematic configuration of the data rewriting device 10 will be described.

同図に示されるように、データ書き換え装置10は、I/F24を備えており、パーソナルコンピュータ(PC)12と通信媒体を介して接続されている。   As shown in the figure, the data rewrite device 10 includes an I / F 24 and is connected to a personal computer (PC) 12 via a communication medium.

なお、通信媒体としては、有線通信を行うケーブル等の他、ブルートゥース(Bluetooth)、IrDA(Infrared Data Association)規格等に代表される無線通信を行うための赤外線、電波等を適用することができる。   Note that as a communication medium, in addition to a cable for performing wired communication, infrared rays, radio waves, and the like for performing wireless communication represented by Bluetooth (Infrared Data Association) standards and the like can be applied.

データ書き換え装置10は、装置全体の動作を司るCPU(中央演算処理装置)20と、データ書き換え装置10におけるRAM(Random Access Memory)等により構成されたメモリ22と、上記I/F24と、入出力制御部26と、を含んで構成されており、メモリ22及び入出力制御部26はそれぞれCPU20に接続されており、I/F24は入出力制御部26に接続されている。   The data rewriting device 10 includes a CPU (Central Processing Unit) 20 that controls the operation of the entire device, a memory 22 that includes a RAM (Random Access Memory) in the data rewriting device 10, the I / F 24, and the input / output The memory 22 and the input / output control unit 26 are each connected to the CPU 20, and the I / F 24 is connected to the input / output control unit 26.

入出力制御部26では、I/F24を介して入力されたダウンロードデータを一時的に保持して、CPU20の指示に従い出力する。   The input / output control unit 26 temporarily holds download data input via the I / F 24 and outputs it according to instructions from the CPU 20.

また、データ書き換え装置10は、フラッシュメモリ28及びNVM(不揮発性メモリ:Non-volatile memory)30を含んで構成されており、当該フラッシュメモリ28及びNVM30は、それぞれCPU20に接続されている。   The data rewrite device 10 includes a flash memory 28 and an NVM (non-volatile memory) 30, and the flash memory 28 and the NVM 30 are connected to the CPU 20, respectively.

また、CPU20では、入出力制御部26から出力されたダウンロードデータを一旦メモリ22に格納し、当該ダウンロードデータを用いてフラッシュメモリ28に対するデータ書き換え処理を実行する。   In addition, the CPU 20 temporarily stores the download data output from the input / output control unit 26 in the memory 22 and executes data rewrite processing on the flash memory 28 using the download data.

図2には、フラッシュメモリ28の構成が概略的に示されている。同図に示されるように、フラッシュメモリ28は、所定の記憶容量毎の複数のセクタ29に分割され、各セクタ29単位でデータの消去及び書込みが実行可能とされている。   FIG. 2 schematically shows the configuration of the flash memory 28. As shown in the figure, the flash memory 28 is divided into a plurality of sectors 29 for each predetermined storage capacity, and data can be erased and written in units of each sector 29.

各セクタ29には、それぞれ識別コード(本実施の形態では、1〜Nの整数)が付与されており、当該識別コードによりセクタが特定可能とされている。   Each sector 29 is given an identification code (in the present embodiment, an integer from 1 to N), and the sector can be specified by the identification code.

CPU20では、ダウンロードデータに基づき書き換え処理を施す領域をセクタ単位で設定し、各セクタに書き込まれた書込み済みデータを一旦消去する消去処理を実行した後に、ダウンロードデータに基づく書込み処理を実行することによって、データ書き換え処理を実行する。   The CPU 20 sets an area to be rewritten based on the download data in units of sectors, executes an erase process for temporarily erasing written data written in each sector, and then executes a write process based on the download data. Execute data rewrite processing.

ところで、本実施の形態では、各セクタの書込み済みデータとダウンロードデータとの比較を行い、互いに一致する場合にはデータ書き換え処理を省略するようにしている。   By the way, in this embodiment, the written data of each sector and the downloaded data are compared, and if they match each other, the data rewriting process is omitted.

そこで、図3に示されるような、チェックサムテーブル28Aが、フラッシュメモリ28に格納されている。チェックサムテーブル28Aは、書込み済みデータのチェックサムを各セクタ単位で記憶されている。当該チェックサムテーブル28Aは、フラッシュメモリ28に対する書き換え処理が実行される毎に、CPU20により更新記憶される。   Therefore, a checksum table 28 A as shown in FIG. 3 is stored in the flash memory 28. The checksum table 28A stores a checksum of written data for each sector. The checksum table 28 </ b> A is updated and stored by the CPU 20 every time rewriting processing is performed on the flash memory 28.

また、図4には、ダウンロードデータ34のデータの構成の一例が模式的に示されている。なお、同図に示すダウンロードデータ34は、フラッシュメモリ28に記憶されたファームウェアを書き換える際にダウンロードされるものである。   FIG. 4 schematically shows an example of the data structure of the download data 34. The download data 34 shown in the figure is downloaded when the firmware stored in the flash memory 28 is rewritten.

同図に示されるように、本実施の形態では、ダウンロードデータ34は、ファームウェア本体としてのROMイメージ34Bと、ファームウェア本体のうち必要最小限の機能を実行可能なプログラムが含まれる緊急用ダウンローダ34Aと、当該ダウンロードデータ34のチェックサムテーブル34Cと、が含まれている。   As shown in the figure, in the present embodiment, the download data 34 includes a ROM image 34B as a firmware main body, and an emergency downloader 34A including a program that can execute the minimum necessary functions of the firmware main body. The checksum table 34C of the download data 34 is included.

図5に示されるように、ダウンロードデータ34のチェックサムテーブル34Cは、緊急用ダウンローダ34A及びROMイメージ34Bのデータを、フラッシュメモリ28の各セクタの記憶容量単位で分割して得られた分割データ毎にチェックサムが記憶されている。なお、同図に示す「データNo.」は、分割データの順番を示すものである。   As shown in FIG. 5, the checksum table 34 </ b> C of the download data 34 includes the divided data obtained by dividing the data of the emergency downloader 34 </ b> A and the ROM image 34 </ b> B by the storage capacity unit of each sector of the flash memory 28. Is stored in the checksum. “Data No.” shown in the figure indicates the order of the divided data.

CPU20では、書き換え処理を実行する際に、フラッシュメモリ28に格納されたチェックサムテーブル28Aと、ダウンロードデータ34に含まれるチェックサムテーブル34Cの対応するチェックサムを順次比較して、両者が一致するセクタについては書き換え処理を省略する。   When executing the rewrite process, the CPU 20 sequentially compares the checksum table 28A stored in the flash memory 28 with the corresponding checksum in the checksum table 34C included in the download data 34, and the sector in which both match. The rewriting process is omitted for.

すなわち、例えば図2に塗りつぶしで示すセクタ29のチェックサムが一致しなかったと仮定すると、当該塗りつぶしで示すセクタ29についてだけ書き換え処理を実行すればよい。ファームウェアの更新等においては、書込み済みデータの一部を変更する場合が多いので、チェックサムが一致しないセクタ29の数は特に少なく、処理時間が大幅に短縮される。   That is, for example, if it is assumed that the checksums of the sectors 29 indicated by the fill in FIG. 2 do not match, the rewriting process may be executed only for the sectors 29 indicated by the fill. In firmware update or the like, since a part of written data is often changed, the number of sectors 29 whose checksums do not match is particularly small, and the processing time is greatly shortened.

また、本実施の形態では、ダウンロードデータの書き換え処理が、停電やトラブル等により途中で中断された場合、処理が完了していないセクタを処理対象として当該書き換え処理を再開するようにしている。   Further, in this embodiment, when the rewriting process of the download data is interrupted halfway due to a power failure or trouble, the rewriting process is resumed with a sector that has not been processed being processed.

そこで、NVM30には、書き換え処理が終了したセクタ29のセクタNo.(1〜N)及びダウンロードデータ34のデータNo.(1〜M)を記憶する処理カウンタが格納されている。当該処理カウンタの記憶内容は、書き換え処理の進行に伴いCPU20により更新される。   Therefore, the NVM 30 stores the sector number of the sector 29 for which the rewriting process is completed. (1-N) and data No. of download data 34. A processing counter for storing (1 to M) is stored. The stored contents of the processing counter are updated by the CPU 20 as the rewriting process proceeds.

以下、本実施の形態の作用を説明する。   Hereinafter, the operation of the present embodiment will be described.

図6は、データ書き換え装置10とPC12との間の通信が開始された場合にCPU20により実行される書き換え処理プログラムの処理の流れが示されている。以下、同図を参照しながら本実施の形態に係る書き換え処理について説明する。   FIG. 6 shows a flow of processing of a rewrite processing program executed by the CPU 20 when communication between the data rewriting device 10 and the PC 12 is started. Hereinafter, the rewriting process according to the present embodiment will be described with reference to FIG.

まず、ステップ200では、ダウンロードデータ34の受信を行い、次のステップ202では、フラッシュメモリ28に記憶された書込み済みデータのチェックサムテーブル28Aを取得する。   First, in step 200, the download data 34 is received, and in the next step 202, a checksum table 28A of written data stored in the flash memory 28 is obtained.

ここで、ダウンロードデータ34の受信は、I/F24を介して入力されたダウンロードデータを入出力制御部26に一旦保持して、メモリ22に格納ことにより実行される。   Here, the download data 34 is received by temporarily holding the download data input via the I / F 24 in the input / output control unit 26 and storing it in the memory 22.

次のステップ204では、NVM30の処理カウンタの初期値として、ダウンロードデータ34の先頭の単位データのNo.1をセットすると共に、対応するデータが格納されたセクタ29のセクタNo.(1〜N)をセットし、その後にステップ206に移行する。なお、上記対応するデータが存在しない場合は、未使用のセクタ29のセクタNo.等をセットするようにしてもよい。   In the next step 204, the initial unit data No. of the download data 34 is set as the initial value of the processing counter of the NVM 30. 1 and the sector number of sector 29 in which corresponding data is stored. (1 to N) is set, and then the process proceeds to step 206. If the corresponding data does not exist, the sector number of the unused sector 29 is set. Etc. may be set.

ステップ206では、処理カウンタの値に応じたデータ及びセクタを処理対象とした後に、ステップ208に移行する。ステップ208では、ダウンロードデータ34のチェックサムテーブル34Cとフラッシュメモリ28のチェックサムテーブル28Aの処理対象に対応するチェックサムを比較し、その後にステップ210に移行する。   In step 206, the data and sector corresponding to the value of the processing counter are set as processing targets, and then the process proceeds to step 208. In step 208, the checksum corresponding to the processing target of the checksum table 34C of the download data 34 and the checksum table 28A of the flash memory 28 is compared, and then the process proceeds to step 210.

ステップ210では、比較の結果、チェックサムが一致したか否かを判定し、当該判定が否定判定となった場合は、ステップ212に移行する。ステップ212では、処理対象とされたセクタ29に対するデータの消去処理を実行し、その後にステップ214に移行して、消去処理を施したセクタ29への処理対象となるデータの書込み処理を実行して、ステップ216に移行する。   In Step 210, it is determined whether or not the checksums match as a result of the comparison. If the determination is negative, the process proceeds to Step 212. In step 212, data erasure processing is performed on the sector 29 to be processed, and then the process proceeds to step 214 to execute data write processing on the sector 29 on which erasure processing has been performed. The process proceeds to step 216.

一方、ステップ210で肯定判定となった場合は、書込み済みデータとダウンロードデータとが一致するものと判断し、ステップ212及びステップ214の処理を実行することなくステップ216に移行する。   On the other hand, if the determination in step 210 is affirmative, it is determined that the written data and the downloaded data match, and the process proceeds to step 216 without executing the processes in steps 212 and 214.

ステップ216では、全てのデータを処理対象としたか否かを判定し、当該判定が否定判定となった場合はステップ218に移行して、処理カウンタを更新した後に再びステップ206に移行する。   In step 216, it is determined whether or not all data has been processed. If the determination is negative, the process proceeds to step 218. After updating the process counter, the process proceeds to step 206 again.

また、ステップ216が肯定判定となった場合は、ステップ220に移行して、チェックサムテーブルの更新を実行した後に本書き換え処理を終了する。   On the other hand, if the determination in step 216 is affirmative, the process proceeds to step 220, where the checksum table is updated and the rewriting process is terminated.

これにより、書き換え前後の記憶内容が同一のセクタ29に対しては消去処理及び書き込み処理が実行されないので、処理時間を短縮して書き換えを実行することができる。   As a result, the erasure process and the write process are not executed on the sector 29 having the same storage contents before and after the rewriting, and therefore the rewriting can be executed with a shortened processing time.

また、書き換え処理が停電等により中断された場合でも、NVM30の処理カウンタに処理がどこまで完了したかが記憶されているので、当該処理カウンタに基づいて処理が完了していないセクタ29を対象とした再書き換え処理が実行可能である。   Even when the rewrite process is interrupted due to a power failure or the like, the process counter of the NVM 30 stores how far the process has been completed, so the sector 29 that has not been processed based on the process counter is targeted. The rewriting process can be executed.

図7には、CPU20により実行される再書き換え処理プログラムの処理の流れが示されている。以下、同図を参照して、本実施の形態に係る再書き換え処理について説明する。   FIG. 7 shows the flow of processing of the rewrite processing program executed by the CPU 20. Hereinafter, the re-writing process according to the present embodiment will be described with reference to FIG.

まず、ステップ240では、ダウンロードデータ34の再受信を行い、次のステップ242では、フラッシュメモリ28に記憶された書込み済みデータのチェックサムテーブル28Aを取得する。   First, in step 240, the download data 34 is received again, and in the next step 242, the checksum table 28A of the written data stored in the flash memory 28 is acquired.

なお、ダウンロードデータ34の再受信は、I/F24を介して入力されたダウンロードデータを入出力制御部26に一旦保持して、メモリ22に格納ことにより実行される。   The download data 34 is re-received by temporarily holding the download data input via the I / F 24 in the input / output control unit 26 and storing it in the memory 22.

次のステップ244では、NVM30の処理カウンタの値を取得し、その後にステップ246に移行して、処理カウンタの値に応じたデータ及びセクタを処理対象とした後に、ステップ248に移行する。   In the next step 244, the value of the processing counter of the NVM 30 is acquired, and then the process proceeds to step 246, and the data and sector corresponding to the value of the processing counter are processed, and then the process proceeds to step 248.

ステップ248では、ダウンロードデータ34のチェックサムテーブル34Cとフラッシュメモリ28のチェックサムテーブル28Aの処理対象に対応するチェックサムを比較し、その後にステップ250に移行する。   In step 248, the checksum corresponding to the processing target of the checksum table 34C of the download data 34 and the checksum table 28A of the flash memory 28 is compared, and then the process proceeds to step 250.

ステップ250では、比較の結果、チェックサムが一致したか否かを判定し、当該判定が否定判定となった場合は、ステップ252に移行する。ステップ252では、処理対象とされたセクタ29に対するデータの消去処理を実行し、その後にステップ254に移行して、消去処理を施したセクタ29への処理対象となるデータの書込み処理を実行して、ステップ256に移行する。   In step 250, it is determined whether the checksums match as a result of the comparison. If the determination is negative, the process proceeds to step 252. In step 252, data erasure processing is executed for the sector 29 to be processed, and then the process proceeds to step 254 to execute data write processing to the sector 29 subjected to erasure processing. The process proceeds to step 256.

一方、ステップ250で肯定判定となった場合は、書込み済みデータとダウンロードデータとが一致するものと判断し、ステップ252及びステップ254の処理を実行することなくステップ256に移行する。   On the other hand, if the determination in step 250 is affirmative, it is determined that the written data and the downloaded data match, and the process proceeds to step 256 without executing the processing in steps 252 and 254.

ステップ256では、全てのデータを処理対象としたか否かを判定し、当該判定が否定判定となった場合はステップ258に移行して、処理カウンタを更新した後に再びステップ246に移行する。   In step 256, it is determined whether or not all data has been processed. If the determination is negative, the process proceeds to step 258, and after updating the process counter, the process proceeds to step 246 again.

また、ステップ246が肯定判定となった場合は、ステップ260に移行して、チェックサムテーブルの更新を実行した後に本書き換え処理を終了する。   On the other hand, if the determination in step 246 is affirmative, the process proceeds to step 260 where the rewriting process is terminated after updating the checksum table.

このように、再書き換え処理においては、前回、書き換え処理が中断されたセクタ29から書き換え処理が実行されるので、再書き換えに要する時間を短縮することができる。   Thus, in the rewriting process, since the rewriting process is executed from the sector 29 where the rewriting process was interrupted last time, the time required for the rewriting can be shortened.

以上詳細に説明したように、本実施の形態によれば、フラッシュメモリ28の各セクタ29を順次処理対象として書込み済みデータの消去及びダウンロードデータの書き込みを繰り返すことによりフラッシュメモリ28の書き換え処理を実行するに際し、各セクタ29の書込み済みデータのチェックサムを示すチェックサムテーブル28Aをフラッシュメモリ28に記憶しておき、各セクタ29に対応する記憶容量単位で作成されたダウンロードデータ34のチェックサムテーブル34Cを取得して、ダウンロードデータ34のチェックサムテーブル34Cと書込み済みデータのチェックサムテーブル28Aとを比較して一致するか否かを各セクタ29毎に判定し、一致すると判定されたセクタ29を処理対象とした前記消去及び書き込みの実行を省略して、書き換え処理が実行される毎にチェックサムテーブル28Aを更新するので、書込み済みデータと新規データの内容に応じて書き換え処理を省略することにより書き換え処理に要する時間を短縮できる。   As described in detail above, according to the present embodiment, the flash memory 28 is rewritten by repeatedly erasing written data and writing downloaded data for each sector 29 of the flash memory 28 sequentially. At this time, a checksum table 28A indicating the checksum of the written data of each sector 29 is stored in the flash memory 28, and a checksum table 34C of the download data 34 created in the storage capacity unit corresponding to each sector 29 is stored. And the checksum table 34C of the download data 34 and the checksum table 28A of the written data are compared to determine whether or not they match each other, and the sector 29 determined to match is processed. Targeted erase and write Omit the line, so to update the checksum table 28A each time the rewriting process is performed, it is possible to shorten the time required to rewrite processing by omitting the rewrite process according to the contents of the written data and the new data.

また、本実施の形態によれば、消去及び書き込み処理が完了した場合、及び当該処理が省略された場合に、処理対象とされたセクタ29のセクタNo.が更新記憶されるNVM30に処理カウンタを設けておき、書き換え処理の実行が中断された場合、NVM30の処理カウンタに基づいて未処理のセクタ29を処理対象として再書き換え処理を実行するので、書き換え処理が中断された場合でも、書き換えに要する時間を短縮することができる。   Further, according to the present embodiment, when the erasing and writing processes are completed and when the processes are omitted, the sector number of the sector 29 to be processed is set. If the processing counter is provided in the NVM 30 that is updated and stored, and the execution of the rewriting process is interrupted, the rewriting process is executed on the unprocessed sector 29 based on the processing counter of the NVM 30. Even when is interrupted, the time required for rewriting can be shortened.

なお、本実施の形態では、ダウンロードデータ34のチェックサムテーブル34Cがダウンロードデータ34Cの一部に含まれる形態について説明したが、本発明はこれに限定されるものではない。   In this embodiment, the checksum table 34C of the download data 34 has been described as being included in a part of the download data 34C. However, the present invention is not limited to this.

例えば、チェックサムテーブルデータとしてダウンロードデータ34とは別に入力するようにしてもよいし、プログラム等によりダウンロードデータに基づいてチェックサムテーブルを生成するようにしてもよい。   For example, the checksum table data may be input separately from the download data 34, or the checksum table may be generated based on the download data by a program or the like.

また、本実施の形態では、セクタ29単位でチェックサムテーブルを作成して書き換え処理を実行する形態について説明したが、本発明はこれに限定されるものではなく、複数のセクタ29からなるブロック単位で処理を実行するようにしてもよい。   In the present embodiment, the checksum table is created in units of sectors 29 and the rewrite process is executed. However, the present invention is not limited to this, and a block unit composed of a plurality of sectors 29 is used. You may make it perform a process by.

すなわち、処理を実行する単位(特許請求の範囲における、「所定の記憶容量」に相当)は、チェックサムテーブルの比較に要する時間と、消去及び書込み処理(特許請求の範囲における「単位処理」に相当)に要する時間と、を考慮して、適宜決定することができる。   That is, the unit for executing the processing (corresponding to “predetermined storage capacity” in the claims) is the time required for comparing the checksum tables and the erasing and writing processing (“unit processing” in the claims). It can be determined as appropriate in consideration of the time required.

さらに、上記各実施の形態に係るデータ書き換え装置10の構成(図1参照)は一例であり、本発明の趣旨を逸脱しない範囲で適宜変更可能である。   Furthermore, the configuration (see FIG. 1) of the data rewrite device 10 according to each of the above embodiments is an example, and can be changed as appropriate without departing from the spirit of the present invention.

また、上記各実施の形態に係る処理の流れ(図6及び図7参照)も一例であり、本発明の趣旨を逸脱しない範囲で適宜変更可能である。   Further, the processing flow (see FIGS. 6 and 7) according to each of the above embodiments is also an example, and can be appropriately changed without departing from the gist of the present invention.

実施の形態に係るデータ書き換え装置の構成を示す概略図である。It is the schematic which shows the structure of the data rewriting apparatus which concerns on embodiment. 実施の形態に係るフラッシュメモリの構成を模式的に示す概略図である。1 is a schematic diagram schematically showing a configuration of a flash memory according to an embodiment. 実施の形態に係るフラッシュメモリに格納されたチェックサムデータを示す模式図である。It is a schematic diagram which shows the checksum data stored in the flash memory which concerns on embodiment. 実施の形態に係るダウンロードデータを模式的に示す説明図である。It is explanatory drawing which shows typically the download data which concern on embodiment. 実施の形態に係るダウンロードデータに含まれるチェックサムデータを示す模式図である。It is a schematic diagram which shows the checksum data contained in the download data which concerns on embodiment. 実施の形態に係る書き換え処理プログラムの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the rewriting process program which concerns on embodiment. 実施の形態に係る再書き換え処理プログラムの処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the rewriting process program which concerns on embodiment.

符号の説明Explanation of symbols

10 データ書き換え装置
12 PC
20 CPU(判定手段、省略手段、再開手段)
22 メモリ
24 I/F
26 入出力制御部(取得手段)
28 フラッシュメモリ(記憶手段)
29 セクタ(区分領域)
30 NVM(不揮発性記憶手段)
10 Data rewrite device 12 PC
20 CPU (determination means, omission means, resumption means)
22 memory 24 I / F
26 Input / output control unit (acquisition means)
28 Flash memory (memory means)
29 sectors (partition area)
30 NVM (non-volatile storage means)

Claims (4)

不揮発性メモリの記憶領域を所定の記憶容量単位で区分して得られる複数の区分領域のそれぞれを順次処理対象として書込み済みデータの消去及び新規データの書き込みを行なう単位処理を繰り返すことにより前記不揮発性メモリの書き換え処理を実行する不揮発性メモリの書き換え装置であって、
前記書き換え処理が実行される毎に更新され、前記各区分領域に前記書込み済みデータのチェックテーブルを記憶する記憶手段と、
前記所定の記憶容量単位で作成された前記新規データのチェックテーブルを取得する取得手段と、
前記取得手段により取得された前記新規データのチェックテーブルと前記記憶手段に記憶された前記書込み済みデータのチェックテーブルとを比較して一致するか否かを前記区分領域毎に判定する判定手段と、
前記判定手段により一致すると判定された場合、当該区分領域を処理対象とした前記単位処理の実行を省略する省略手段と、
を備えた不揮発性メモリの書き換え装置。
By repeating unit processing for erasing written data and writing new data for each of a plurality of partitioned areas obtained by partitioning the storage area of the nonvolatile memory in a predetermined storage capacity unit, the nonvolatile memory A non-volatile memory rewriting device for executing a memory rewriting process,
Updated each time the rewriting process is executed, and storage means for storing a check table of the written data in each of the partitioned areas;
Obtaining means for obtaining a check table of the new data created in the predetermined storage capacity unit;
A determination unit that determines whether the check table of the new data acquired by the acquisition unit and the check table of the written data stored in the storage unit match each other for each of the divided regions;
An omission means for omitting the execution of the unit process with the segmented area as a processing target when it is determined by the determination means to be matched;
Non-volatile memory rewriting device comprising:
前記単位処理が完了した場合、及び前記省略手段により前記単位処理が省略された場合に、処理対象とされた前記区分領域の識別情報を更新記憶する不揮発性記憶手段と、
前記書き換え処理の実行が中断された場合、前記不揮発性記憶手段に記憶された情報に基づいて未処理の前記区分領域を処理対象とした前記単位処理を実行して前記書き換え処理を再開する再開手段と、
を更に備えた請求項1記載の不揮発性メモリの書き換え装置。
A non-volatile storage unit that updates and stores identification information of the segmented region to be processed when the unit process is completed and when the unit process is omitted by the omitting unit;
When the execution of the rewriting process is interrupted, a resuming unit that executes the unit process for the unprocessed segmented area based on information stored in the nonvolatile storage unit and resumes the rewriting process When,
The nonvolatile memory rewriting device according to claim 1, further comprising:
前記所定の記憶容量は、前記単位処理を実行可能な最小単位であることを特徴とする請求項1又は請求項2記載の不揮発性メモリの書き換え装置。   3. The nonvolatile memory rewriting device according to claim 1, wherein the predetermined storage capacity is a minimum unit capable of executing the unit processing. 不揮発性メモリの記憶領域を所定の記憶容量単位で区分して得られる複数の区分領域のそれぞれを順次処理対象として書込み済みデータの消去及び新規データの書き込みを行なう単位処理を繰り返すことにより前記不揮発性メモリの書き換え処理を実行する不揮発性メモリの書き換え方法であって、
前記各区分領域に前記書込み済みデータのチェックテーブルを記憶手段に記憶しておき、
前記所定の記憶容量単位で作成された前記新規データのチェックテーブルを取得して、
前記新規データのチェックテーブルと前記記憶手段に記憶された前記書込み済みデータのチェックテーブルとを比較して一致するか否かを前記区分領域毎に判定し、
一致すると判定された前記区分領域を処理対象とした前記単位処理の実行を省略して、
前記書き換え処理が実行される毎に前記記憶手段に記憶されたチェックテーブルを更新する、
不揮発性メモリの書き換え方法。
By repeating unit processing for erasing written data and writing new data for each of a plurality of partitioned areas obtained by partitioning the storage area of the nonvolatile memory in a predetermined storage capacity unit, the nonvolatile memory A non-volatile memory rewriting method for executing a memory rewriting process,
A check table of the written data is stored in the storage means in each of the divided areas,
Obtain a check table of the new data created in the predetermined storage capacity unit,
Comparing the check table of the new data and the check table of the written data stored in the storage means to determine whether or not they match for each of the divided areas;
Omit execution of the unit process for the segmented area determined to match,
Update the check table stored in the storage means each time the rewriting process is executed,
Non-volatile memory rewrite method.
JP2006017265A 2006-01-26 2006-01-26 Nonvolatile memory rewriting device and rewriting method Expired - Fee Related JP4910402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006017265A JP4910402B2 (en) 2006-01-26 2006-01-26 Nonvolatile memory rewriting device and rewriting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006017265A JP4910402B2 (en) 2006-01-26 2006-01-26 Nonvolatile memory rewriting device and rewriting method

Publications (2)

Publication Number Publication Date
JP2007199985A true JP2007199985A (en) 2007-08-09
JP4910402B2 JP4910402B2 (en) 2012-04-04

Family

ID=38454548

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006017265A Expired - Fee Related JP4910402B2 (en) 2006-01-26 2006-01-26 Nonvolatile memory rewriting device and rewriting method

Country Status (1)

Country Link
JP (1) JP4910402B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011105023A1 (en) * 2010-02-26 2011-09-01 Jvc・ケンウッド・ホールディングス株式会社 Processing device and write method
US9037776B2 (en) 2009-06-11 2015-05-19 Samsung Electronics Co., Ltd. Storage device with flash memory and data storage method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06236307A (en) * 1993-02-08 1994-08-23 Nec Software Ltd Discrimination system for end of file
JPH11328982A (en) * 1998-03-19 1999-11-30 Fuji Electric Co Ltd Data management system for flash memory
JP2003256266A (en) * 2002-02-28 2003-09-10 Hitachi Ltd Memory device
JP2003271465A (en) * 2002-03-15 2003-09-26 Mitsubishi Electric Corp Recording method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06236307A (en) * 1993-02-08 1994-08-23 Nec Software Ltd Discrimination system for end of file
JPH11328982A (en) * 1998-03-19 1999-11-30 Fuji Electric Co Ltd Data management system for flash memory
JP2003256266A (en) * 2002-02-28 2003-09-10 Hitachi Ltd Memory device
JP2003271465A (en) * 2002-03-15 2003-09-26 Mitsubishi Electric Corp Recording method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9037776B2 (en) 2009-06-11 2015-05-19 Samsung Electronics Co., Ltd. Storage device with flash memory and data storage method
WO2011105023A1 (en) * 2010-02-26 2011-09-01 Jvc・ケンウッド・ホールディングス株式会社 Processing device and write method
JP2011198357A (en) * 2010-02-26 2011-10-06 Jvc Kenwood Corp Processing device and write method
CN102792283A (en) * 2010-02-26 2012-11-21 Jvc建伍株式会社 Processing device and write method

Also Published As

Publication number Publication date
JP4910402B2 (en) 2012-04-04

Similar Documents

Publication Publication Date Title
US7664923B2 (en) Method and system for updating software
US8055859B2 (en) Apparatus and method for providing atomicity with respect to request of write operation for successive sector
US7809878B2 (en) Apparatus and method for controlling flash memory
US7313030B2 (en) Differential flash memory programming technique
US7055083B2 (en) Method and apparatus for allocating CRC codes in a flash ROM
JP2019016086A (en) Automobile electronic control device
JP4910402B2 (en) Nonvolatile memory rewriting device and rewriting method
US20100077131A1 (en) Updating control information in non-volatile memory to control selection of content
JP5983512B2 (en) Writing device
US10877743B2 (en) Control apparatus for updating stored program and method for updating program stored in control apparatus
JP2014112419A (en) Mobile terminal apparatus, software update method, operation control method, and program
JP2011175361A (en) Data storage device and method
JP5158883B2 (en) Firmware update method and firmware update apparatus
US7519765B2 (en) Method of downloading main code to flash memory
JP2009276883A (en) Semiconductor auxiliary storage device
JP2005321843A (en) Rewriting method for firmware
JP2004310268A (en) Semiconductor device with built-in flash memory, control method for flash memory, and program for the method
JP5787095B2 (en) Method for storing data in non-volatile memory
CN110618824A (en) Software upgrading method, device, medium and equipment
JP2001092713A (en) Device and method for writing data
JP2012033045A (en) Electronic equipment and data reading method
JP2002268907A (en) Memory controller
JP2018160018A (en) Data processing device
JP2022163602A (en) Electronic control device
JP2023170521A (en) Facility apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110726

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110922

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111220

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120102

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150127

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees