JP2001249855A - Method for rewriting data of nonvolatile memory and subscriber circuit - Google Patents

Method for rewriting data of nonvolatile memory and subscriber circuit

Info

Publication number
JP2001249855A
JP2001249855A JP2000062177A JP2000062177A JP2001249855A JP 2001249855 A JP2001249855 A JP 2001249855A JP 2000062177 A JP2000062177 A JP 2000062177A JP 2000062177 A JP2000062177 A JP 2000062177A JP 2001249855 A JP2001249855 A JP 2001249855A
Authority
JP
Japan
Prior art keywords
data
rewriting
flag information
memory
sector
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.)
Pending
Application number
JP2000062177A
Other languages
Japanese (ja)
Inventor
Toshiyuki Saito
敏之 斉藤
Tatsuhiro Fukushige
辰博 福成
Yoshinobu Morita
佳伸 森田
Masamitsu Sudo
理光 須藤
Kazuhiko Akiyama
和彦 秋山
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.)
Hitachi Ltd
Nippon Telegraph and Telephone Corp
Hitachi Information Technology Co Ltd
Original Assignee
Hitachi Ltd
Nippon Telegraph and Telephone Corp
Hitachi Communication Systems Inc
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 Hitachi Ltd, Nippon Telegraph and Telephone Corp, Hitachi Communication Systems Inc filed Critical Hitachi Ltd
Priority to JP2000062177A priority Critical patent/JP2001249855A/en
Publication of JP2001249855A publication Critical patent/JP2001249855A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a method for rewriting data of a nonvolatile memory capable of preventing loss of the data even in the case of interruption of a processing when the data of the nonvolatile memory is rewritten and a subscriber circuit using the method. SOLUTION: Flag information to indicate uncompletion/completion of writing of the data and flag information to indicate validity/invalidity of the data are written in the nonvolatile memory 4 together with entity of the data. A new piece of data is written in idle sector of the memory 4 when the data is rewritten. After that, the flag information about the sector in which the older piece of data to be rewritten is stored is invalidated. Thus, the loss of the data contents is prevented even when power interruption, etc., is generated in process of rewriting of the data and the data is efficiently rewritten.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、不揮発性メモリの
データ書き替え方法及び加入者回路に係り、特に、書き
替え可能な不揮発性メモリのデータ書き替え方法及びデ
ィジタル交換機における不揮発性メモリを使用した加入
者回路に関する。
The present invention relates to a method for rewriting data in a non-volatile memory and a subscriber circuit, and more particularly to a method for rewriting data in a rewritable non-volatile memory and a non-volatile memory in a digital exchange. It relates to a subscriber circuit.

【0002】[0002]

【従来の技術】近年、データの書き替えが可能であり、
さらに電源断などの際でも記憶データをそのまま保持可
能なEEPROMやフラッシュメモリなどの不揮発性メ
モリを記憶デバイスとして搭載する機器が増加してい
る。その一例として、ディジタル交換機の加入者線を収
容する加入者回路がある。同加入者回路は、加入者に対
する各種のサービスをサービス制御プログラムにより実
現すると共に、そのプログラムを不揮発性メモリに格納
し、機能の追加、変更等の際に、サービス制御プログラ
ムを書き替えることにより対応することができるように
構成されている。そして、加入者回路は、加入者線の光
ファイバー化に伴い、交換局舎から離れた遠隔地のオフ
ィスビル等に設置される傾向にあり、機能の追加、変更
等の際のサービス制御プログラムの書き替えは、リモー
トダウンロードにより行われている。
2. Description of the Related Art In recent years, data can be rewritten,
Further, devices equipped with a non-volatile memory such as an EEPROM or a flash memory as a storage device capable of retaining stored data as it is even when power is cut off are increasing. One example is a subscriber circuit that accommodates the subscriber lines of a digital exchange. The subscriber circuit realizes various services for the subscriber by the service control program, stores the program in the non-volatile memory, and rewrites the service control program when adding or changing functions. It is configured to be able to. Subscriber circuits tend to be installed in remote office buildings, etc., away from the central office, in accordance with the adoption of optical fibers for subscriber lines, and write service control programs when adding or changing functions. The replacement is performed by remote download.

【0003】サービス制御プログラムを格納するフラッ
シュメモリは、そのデバイス特性上、書き込みを行う前
に書き込みを行うメモリ領域を一旦消去する必要があ
る。消去は、セクタと呼ばれる一定の単位で行われる。
また、書き込みは、バイト単位であり、一度書込みを行
なったアドレスに再度書き込みを行なうことはできな
い。このため、一般に、不揮発性メモリのデータを書き
替える際には、不揮発性メモリのデータを書き込もうと
している該当メモリ領域のデータを消去してからその領
域に新しいデータを書き込むか、または、不揮発性メモ
リのデータを書き込もうとしている該当メモリ領域のデ
ータを揮発性のバッファメモリに一旦待避させておき、
不揮発性メモリのデータを書き込もうとしているメモリ
領域のデータを消去し、その後、不揮発性メモリに新し
いデータを書込む方法が用いられている。
In a flash memory storing a service control program, it is necessary to temporarily erase a memory area to be written before writing due to its device characteristics. Erasing is performed in fixed units called sectors.
Writing is performed in byte units, and writing cannot be performed again at the address where writing has been performed once. Therefore, in general, when rewriting data in the non-volatile memory, the data in the memory area to which the data in the non-volatile memory is to be written is erased and then new data is written in that area, or The data in the relevant memory area where the data of the memory is to be written is temporarily saved in the volatile buffer memory,
There has been used a method of erasing data in a memory area to which data of a nonvolatile memory is to be written, and then writing new data to the nonvolatile memory.

【0004】しかし、前述した方法は、両者とも、該当
メモリ領域のデータを消去してから正常に新データの書
き込みが完了するまでの間に電源断などで書き込みが中
断した場合に、データが消失してしまうという事態に陥
る。特に、先に説明した加入者回路等で、リモードダウ
ンロード中にデータの書き込みが中断した場合、復旧に
多大な時間が掛かることになってしまう。
[0004] However, in the above-mentioned methods, in both cases, if the writing is interrupted due to a power failure or the like between the time when the data in the corresponding memory area is erased and the time when the writing of new data is completed normally, the data is lost. It falls into the situation of doing. In particular, if the data writing is interrupted during the remote download by the above-described subscriber circuit or the like, a long time is required for recovery.

【0005】このような問題を解決することができる不
揮発性メモリのデータの書き替えに関する従来技術とし
て、例えば、特開平8−272698号公報等に記載さ
れた技術が知られている。この従来技術は、不揮発性メ
モリ内のある特定のアドレス領域をバックアップ領域と
して確保し、ある領域にデータを書き込みたいときに、
そのアドレス領域のデータをバックアップ領域にコピー
し、該当アドレス領域を消去した後、新データをそのア
ドレス領域に書き込み、該当アドレス領域に新データの
書き込みが完了した後、バックアップ領域のデータを消
去するというものである。
[0005] As a conventional technique relating to rewriting of data in a nonvolatile memory which can solve such a problem, for example, a technique described in Japanese Patent Application Laid-Open No. Hei 8-272698 is known. This conventional technique secures a specific address area in a non-volatile memory as a backup area, and writes data to a certain area.
Copying the data in the address area to the backup area, erasing the corresponding address area, writing new data to the address area, and erasing the data in the backup area after the writing of the new data to the relevant address area is completed. Things.

【0006】[0006]

【発明が解決しようとする課題】前述した公報に記載さ
れた従来技術は、新データの書き込みの途中で電源断等
の原因により書き込みの中断が起こった際にデータを消
失することはないが、特定のアドレス領域をバックアッ
プ領域として使用しているため、バックアップ領域のデ
ータの消去、書き込みの頻度が高くなり、不揮発性メモ
リの特性上、バックアップ領域の劣化が他の領域に比較
して著しく進んでしまうという問題点を有している。
The prior art described in the above-mentioned publication does not lose data when writing is interrupted due to a power supply interruption or the like during writing of new data. Since a specific address area is used as a backup area, the frequency of erasing and writing data in the backup area increases. Due to the characteristics of the non-volatile memory, the backup area deteriorates significantly more than other areas. There is a problem that it is.

【0007】また、この従来技術は、1回のデータの書
き替えの際に該当アドレス領域及びバックアップ領域の
2領域についてデータの消去、書き込みが行われること
になるため、データの書き替え時間が長くなり書き替え
に多大な処理を行わなければならず、処理効率が悪いと
いう問題点を有している。
In addition, in this prior art, when data is rewritten once, data is erased and written in two areas, that is, an address area and a backup area, so that the data rewriting time is long. A large amount of processing must be performed for rewriting, resulting in poor processing efficiency.

【0008】本発明の目的は、前述した従来技術の問題
点を解決し、データ書き替え時の処理の中断に際しても
データの消失を防止し、かつ、効率の良いデータの書き
替えを可能とした不揮発性メモリのデータ書き替え方法
及びこの方法を使用した加入者回路を提供することにあ
る。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problems of the prior art, to prevent data loss even when processing for rewriting data is interrupted, and to enable efficient data rewriting. An object of the present invention is to provide a method for rewriting data in a nonvolatile memory and a subscriber circuit using the method.

【0009】[0009]

【課題を解決するための手段】本発明によれば前記目的
は、予め定められたメモリ領域を一括消去後、新たなデ
ータを書き込むことによりデータの書き替えが可能な不
揮発性メモリのデータ書き替え方法において、前記メモ
リ領域単位に、データの実体と共にデータの書込み未完
了/完了を示すフラグ情報及びデータの有効/無効を示
すフラグ情報を書き込んでおき、データの書き替え時、
空きメモリ領域に新データを書き込み、その後、書き替
えるべき旧データが格納されているメモリ領域のフラグ
情報を無効とすることにより達成される。
According to the present invention, the object is to rewrite data in a non-volatile memory in which data can be rewritten by writing new data after a predetermined memory area is collectively erased. In the method, flag information indicating incomplete / completion of data writing and flag information indicating validity / invalidity of data are written together with the substance of the data in units of the memory area.
This is achieved by writing new data in a free memory area and then invalidating the flag information of the memory area storing the old data to be rewritten.

【0010】また、前記目的は、前記空きメモリ領域
が、前記データの有効/無効を示すフラグ情報が無効で
ある領域、あるいは、データの有効/無効を示すフラグ
情報が有効であり、かつ、前記データの書き込み未完了
/完了を示すフラグ情報が書き込み未完了である領域で
あり、前記新データのデータの書き込み前に、前記空き
メモリ領域を一括消去することにより、また、メモリ消
去直後のメモリ領域が、データの書き込み未完了/完了
を示すフラグ情報が書き込み未完了とされ、データの有
効/無効を示すフラグ情報が有効とされることにより達
成される。
The object is that the empty memory area is an area where the flag information indicating the validity / invalidity of the data is invalid, or the flag information indicating the validity / invalidity of the data is valid, and An area in which flag information indicating data write incomplete / completion is an area in which write has not been completed. By blanket erasing the free memory area before writing the data of the new data, This is achieved by setting the flag information indicating data incomplete / completion of data writing to uncompleted and setting the flag information indicating validity / invalidity of data to be valid.

【0011】さらに、前記目的は、ディジタル交換機の
加入者に対する各種のサービスを、不揮発性メモリに格
納されるサービス制御プログラムにより実現する加入者
回路において、前記サービス制御プログラム書き替え
を、前記不揮発性メモリの書き替え方法により行うこと
により達成される。
Further, the object is to provide a subscriber circuit which implements various services for a subscriber of a digital exchange by a service control program stored in a nonvolatile memory. This is achieved by performing the rewriting method described above.

【0012】[0012]

【発明の実施の形態】以下、本発明による不揮発性メモ
リのデータ書き替え方法及びこの方法を使用した加入者
回路の実施形態を図面により詳細に説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of a data rewriting method for a nonvolatile memory according to the present invention and a subscriber circuit using the method.

【0013】図1は本発明の一実施形態による加入者回
路の構成を示すブロック図、図2は不揮発性メモリのデ
ータ書き替えの処理を説明するフローチャート、図3は
メモリ書き替えのシーケンスを説明する図である。図1
において、1は加入者線インタフェース部、2は制御
部、3は揮発性メモリ(RAM)、4は不揮発性メモ
リ、5は上位装置インタフェース部である。
FIG. 1 is a block diagram showing a configuration of a subscriber circuit according to an embodiment of the present invention. FIG. 2 is a flowchart for explaining data rewriting processing of a nonvolatile memory. FIG. 3 is a diagram for explaining a memory rewriting sequence. FIG. FIG.
1, 1 is a subscriber line interface unit, 2 is a control unit, 3 is a volatile memory (RAM), 4 is a nonvolatile memory, and 5 is a higher-level device interface unit.

【0014】図1に示す本発明の実施形態による加入者
回路は、電話機等の端末と接続される加入者インタフェ
ース部1、サービス制御プログラムの実行制御及びメモ
リデータの書き替え制御を行う制御部2、各種制御プロ
グラムを展開する揮発性メモリ3、上位装置よりダウン
ロードされた各種サービス制御プログラム及びデータを
格納しておくEEPROM・フラッシュメモリ等による
不揮発性メモリ4、上位装置と接続される上位装置イン
タフェース部5を備えて構成されている。
A subscriber circuit according to an embodiment of the present invention shown in FIG. 1 includes a subscriber interface unit 1 connected to a terminal such as a telephone, a control unit 2 for controlling execution of a service control program and rewriting control of memory data. A volatile memory 3 for developing various control programs, a nonvolatile memory 4 such as an EEPROM / flash memory for storing various service control programs and data downloaded from a higher-level device, a higher-level device interface unit connected to the higher-level device 5 is provided.

【0015】そして、図示加入者回路は、加入者線イン
タフェース部1を介して接続される端末と、上位インタ
フェース部5、図示しない通信網を介して接続される他
の端末との間での通話、通信を中継する等の各種のサー
ビスを実行する。
The illustrated subscriber circuit communicates between a terminal connected via the subscriber line interface unit 1 and another terminal connected via an upper interface unit 5 and a communication network (not shown). And various services such as relaying communication.

【0016】次に、図2に示すフロー及び図3に示すシ
ーケンス図を参照して、不揮発性メモリ4のメモリデー
タの書き替え方法について説明する。
Next, a method of rewriting the memory data in the nonvolatile memory 4 will be described with reference to the flow shown in FIG. 2 and the sequence diagram shown in FIG.

【0017】不揮発性メモリ4は、図3に示されている
ように、複数のセクタにより構成され、各セクタには、
そのセクタ内のデータに関して、書き込み未完了/完了
フラグ及び有効/無効フラグが付与されている。そし
て、不揮発性メモリ4内には、常に、少なくとも1セク
タの空きセクタが存在しているものとする。この空きセ
クタは、「書き込み未完了/完了フラグが未完了値を示
しているか、このフラグが完了値であっても、有効/無
効フラグが無効値を示しているセクタ」であると定義す
る。また、書込み未完了/完了フラグの未完了値及び有
効/無効フラグの有効値は、不揮発性メモリの消去直後
の値(例えば、0xFF)と定義する。逆に、書込み未
完了/完了フラグの完了値及び有効/無効フラグの無効
値は、不揮発性メモリ消去直後以外の値(例えば、0x
00)と定義する。図3に示す例において、上段は、デ
ータの書き替え前の状態を示しており、セクタ1が空き
セクタであり、セクタ2が書き替えるべきデータを格納
しているセクタであるとする。
As shown in FIG. 3, the non-volatile memory 4 is composed of a plurality of sectors.
A write incomplete / complete flag and a valid / invalid flag are assigned to data in the sector. It is assumed that at least one empty sector always exists in the nonvolatile memory 4. This empty sector is defined as “a sector in which the write incomplete / completion flag indicates an incomplete value, or in which even if this flag is a complete value, the valid / invalid flag indicates an invalid value”. The incomplete value of the write incomplete / completion flag and the valid value of the valid / invalid flag are defined as values immediately after erasing the nonvolatile memory (for example, 0xFF). Conversely, the completion value of the write incomplete / completion flag and the invalid value of the valid / invalid flag are values other than immediately after erasing the nonvolatile memory (for example, 0x
00). In the example shown in FIG. 3, the upper part shows the state before data rewriting, and it is assumed that sector 1 is a free sector and sector 2 is a sector storing data to be rewritten.

【0018】(1)図示加入者回路には不揮発性メモリ
4が搭載されており、上位インタフェース部5を介し
て、上位装置からの指示で不揮発性メモリ4上のデータ
またはプログラムを、上位装置からダウンロードするこ
とにより更新することが可能である。上位装置からダウ
ンロードの指示を受信した際、制御部2は、メモリの書
き替え制御プログラムを不揮発性メモリ4上から揮発性
メモリ3のワークメモリエリアに展開し書き替えの制御
を開始する。
(1) A non-volatile memory 4 is mounted on the subscriber circuit shown in the figure, and data or a program on the non-volatile memory 4 is transmitted from the higher-level device through an upper-level interface unit 5 in accordance with an instruction from the higher-level device. It can be updated by downloading. When receiving the download instruction from the host device, the control unit 2 expands the memory rewrite control program from the nonvolatile memory 4 to the work memory area of the volatile memory 3 and starts the rewrite control.

【0019】(2)制御部2は、メモリの書き替え制御
を開始すると、まず、不揮発性メモリ4の空きセクタを
検索する(ステップS1)。なお、この空きセクタの検
索は、前述した定義に従って、各セクタ内のフラグを調
べることにより行うことができる。また、空きセクタの
検索は、書き替え指示を受けてから行うのではなく、起
動時に検索を実施し、空き(無効)セクタ情報及び有効
セクタ情報(または、そのどちらか)を揮発性メモリ上
または不揮発性メモリ上に検索結果(テーブル情報)と
して保持しておき、書き替え実施の際にこのテーブル情
報を読み出し、書き替え実施毎にこのテーブル情報を更
新するという方法によっても行うことができる。この検
索で、図3の上段に示すように、セクタ1が空きセクタ
であることが検索される。
(2) When starting the rewriting control of the memory, the control unit 2 first searches for a free sector in the nonvolatile memory 4 (step S1). The search for an empty sector can be performed by checking a flag in each sector according to the above-described definition. The search for a free sector is not performed after receiving a rewrite instruction, but is performed at the time of startup, and the free (invalid) sector information and the valid sector information (or either of them) are stored in the volatile memory or in the volatile memory. The search result (table information) is stored in a nonvolatile memory, and the table information is read at the time of rewriting, and the table information is updated every time the rewriting is performed. In this search, as shown in the upper part of FIG. 3, it is searched that the sector 1 is a free sector.

【0020】(3)ステップS1で不揮発性メモリ4上
の空きセクタを検索した後、その空きセクタを消去する
(ステップS2)。空きセクタを消去することによっ
て、図3の中段に示すように、空きセクタの書き込み未
完了/完了フラグは未完了値とされ、有効/無効フラグ
は有効値とされる。
(3) After searching for a free sector in the nonvolatile memory 4 in step S1, the free sector is erased (step S2). By erasing the empty sector, as shown in the middle part of FIG. 3, the write incomplete / complete flag of the empty sector is set to an incomplete value, and the valid / invalid flag is set to a valid value.

【0021】(4)空きセクタを消去後、新データを揮
発性メモリ3のバッファメモリ領域上に準備し(ステッ
プS3)、バッファメモリ領域上の新データを、消去し
た空きセクタのデータ実体領域に書き込む(ステップS
4)。新データが順次上位装置からダウンロードされる
場合には、ステップS3、ステップS4の処理を繰り返
して行う。この時点では、書き替えられるべきデータを
持ったセクタ2は、旧データを保持したままである。
(4) After erasing the empty sector, new data is prepared in the buffer memory area of the volatile memory 3 (step S3), and the new data in the buffer memory area is stored in the data entity area of the erased empty sector. Write (Step S
4). When the new data is sequentially downloaded from the host device, the processes of steps S3 and S4 are repeated. At this point, the sector 2 having the data to be rewritten still retains the old data.

【0022】(5)新データの書き込みが全て正常に終
了したか否かの判定を行い(ステップS5)、正常に終
了した場合、新データを格納したセクタの書き込み未完
了/完了フラグに完了値を書込み(ステップS6)、ま
た、旧データが格納されているセクタの有効/無効フラ
グに無効値を書込む(ステップS7)。これにより、不
揮発性メモリ4の状態は、図3の下段に示すように、セ
クタ2が無効、すなわち、空きとなり、セクタ1に、旧
データを格納していたセクタ2に代って、セクタ2の旧
データを更新した新データが格納されたセクタが有効と
なる。
(5) It is determined whether or not the writing of the new data has all been completed normally (step S5). If the writing has been completed normally, the completion value is set in the write incomplete / completion flag of the sector storing the new data. Is written (step S6), and an invalid value is written to the valid / invalid flag of the sector storing the old data (step S7). As a result, as shown in the lower part of FIG. 3, the state of the nonvolatile memory 4 is such that the sector 2 is invalid, that is, becomes empty, and the sector 2 is replaced by the sector 2 instead of the sector 2 storing the old data. The sector storing the new data obtained by updating the old data becomes valid.

【0023】(6)ステップS5の判定で、新データの
書き込みが全て正常に終了しなかったと判定した場合、
ここでの処理を終了する。この場合、書き替えられるべ
き旧データは、まだ、不揮発性メモリ4のセクタ2に格
納されたままとなっており、新データを書き込んだセク
タ1は、データの書き込み未完了/完了フラグが未完了
値となっているので、空きセクタとされ使用されない。
このため、加入者回路は、旧データのままでの動作を続
けることができる。
(6) If it is determined in step S5 that the writing of new data has not all been completed normally,
The processing here ends. In this case, the old data to be rewritten is still stored in the sector 2 of the non-volatile memory 4, and the sector 1 in which the new data has been written has the data write incomplete / completion flag incomplete. Since it is a value, it is regarded as a free sector and is not used.
Therefore, the subscriber circuit can continue to operate with the old data.

【0024】通常、あるセクタを無効にする場合にはそ
のセクタの消去が行なわれるが、セクタの無効化のため
にセクタの消去を行うと、1回のデータの書き替えのた
めに2回のセクタの消去を行う必要がある。一般に、不
揮発性メモリの消去は、書き込みに比較して時間が多く
かかり、また、消去を行う毎にデバイスの劣化が進むこ
とになるため、セクタの無効化のためにセクタの消去を
行うことは非常に効率が悪い。
Normally, when a certain sector is invalidated, the sector is erased. However, when the sector is erased for invalidating the sector, two erasures are performed for one data rewrite. It is necessary to erase the sector. Generally, erasing a non-volatile memory takes a longer time than writing, and the device is degraded each time erasing is performed. Therefore, erasing a sector to invalidate a sector cannot be performed. Very inefficient.

【0025】本発明の実施形態は、前述したように、セ
クタの無効化のためにセクタの消去を行うのではなく、
有効/無効フラグに無効値を書込むこととし、通常一回
の書き替え時に2回の消去を必要としていたのに対し、
これを1回の消去と2回のフラグ情報の書き込みに置き
換えたことにより、書き替え時間の短縮とデバイスの寿
命の延長をはかること可能とした。
According to the embodiment of the present invention, as described above, instead of erasing the sector to invalidate the sector,
An invalid value is written to the valid / invalid flag, which normally requires two erasures at one rewrite.
By replacing this with one erasure and two writings of the flag information, it is possible to shorten the rewriting time and extend the life of the device.

【0026】また、図3の下段に示す状態となった後、
次回のダウンロード指示を受けた場合には、セクタ2の
有効/無効フラグが無効化されているため、セクタ2が
空きセクタとなる。
After the state shown in the lower part of FIG.
When the next download instruction is received, since the valid / invalid flag of the sector 2 is invalidated, the sector 2 becomes an empty sector.

【0027】そして、前述のフローにおいて、セクタ1
への書き込みが正常に終了しなかった場合、例えば、図
3の中段から下段の処理の間で、電源断による書き替え
処理が中断した等の場合、書き替えるべきデータを持つ
セクタ2の状態が有効のままであり、セクタ1の書込み
未完了/完了フラグが未完了を示しているため、次回に
はセクタ1が再度空きセクタとなる。すなわち、セクタ
1への書き込みが正常に終了しなかった場合、図3の上
段に示す状態を保持したままであり、書き替え処理が中
断した場合においてもデータを消失することがない。
Then, in the above-mentioned flow, sector 1
In the case where the writing to the memory 2 is not completed normally, for example, when the rewriting process is interrupted due to the power-off between the processes from the middle stage to the lower stage in FIG. Since it remains valid and the write incomplete / completion flag of sector 1 indicates incomplete, the next time sector 1 becomes an empty sector again. That is, when the writing to the sector 1 is not completed normally, the state shown in the upper part of FIG. 3 is maintained, and even if the rewriting process is interrupted, no data is lost.

【0028】但し、図3の下段に示すセクタ1への書き
込み完了フラグの書き込み(図2のステップS6)とセ
クタ2への無効フラグの書き込み(図2のステップS
7)との間に、書き替え処理が中断された際には、セク
タ1もセクタ2も有効という状態が理論的には存在する
こととなる。しかし、ステップS6とステップS7との
処理を連続して行えば、この間の時間は、不揮発性メモ
リへの1バイト書き込みに要するわずかな時間であるた
め問題とはならない。
However, the writing of the write completion flag into the sector 1 shown in the lower part of FIG. 3 (step S6 in FIG. 2) and the writing of the invalid flag into the sector 2 (step S6 in FIG. 2)
If the rewriting process is interrupted between 7) and 7), a state where both sector 1 and sector 2 are valid theoretically exists. However, if the processes of step S6 and step S7 are performed continuously, there is no problem because the time between these steps is a short time required for writing one byte to the nonvolatile memory.

【0029】前述したように、本発明の実施形態による
不揮発性メモリのデータ書き替え方法よれば、新データ
の書き替えが正常に終了まで旧データを保持しているた
め、データの書き替え途中の電源断等によるデータの消
失を防ぐことができる。また、例えば、フラッシュメモ
リは、書き込みに比較して消去に非常に多くの時間を要
するが、本発明の実施形態は、書き替え時に旧データ格
納セクタの消去を行うのではなく、フラグデータ書き込
みによってセクタのデータを無効として意味付けしてい
るため、書き替え時間の短縮及びデバイスの劣化を防止
することができる。また、空きセクタは、固定アドレス
ではなく、アドレスを移動するため、特定セクタのみの
劣化を防止し、デバイスの寿命を延長化することができ
る。
As described above, according to the data rewriting method of the non-volatile memory according to the embodiment of the present invention, the old data is retained until the rewriting of the new data is normally completed. Data can be prevented from being lost due to power interruption or the like. Also, for example, a flash memory requires much more time for erasing than for writing, but the embodiment of the present invention does not erase the old data storage sector at the time of rewriting. Since the sector data is regarded as invalid, it is possible to shorten the rewriting time and prevent the device from deteriorating. In addition, since an empty sector moves an address instead of a fixed address, deterioration of only a specific sector can be prevented, and the life of the device can be extended.

【0030】そして、前述したような不揮発性メモリの
データ書き替え方法を適用した本発明の加入者回路を、
信頼性の高いものとすることができる。
The subscriber circuit of the present invention to which the data rewriting method of the non-volatile memory as described above is applied,
High reliability can be achieved.

【0031】[0031]

【発明の効果】以上説明したように本発明によれば、不
揮発性メモリのデータ書き替え時の処理の中断に際して
もデータの消失を防止することができ、かつ、効率の良
いデータの書き替えを行うことができる。そして、この
ような不揮発性メモリのデータ書き替え方法を使用する
ことにより加入者回路の高信頼化を図ることができる。
As described above, according to the present invention, loss of data can be prevented even when the process of rewriting data in the nonvolatile memory is interrupted, and efficient data rewriting can be performed. It can be carried out. By using such a method of rewriting data in the nonvolatile memory, the reliability of the subscriber circuit can be improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施形態による加入者回路の構成を
示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a subscriber circuit according to an embodiment of the present invention.

【図2】不揮発性メモリのデータ書き替えの処理を説明
するフローチャートである。
FIG. 2 is a flowchart illustrating a process of rewriting data in a nonvolatile memory.

【図3】メモリ書き替えのシーケンスを説明する図であ
る。
FIG. 3 is a diagram illustrating a memory rewriting sequence.

【符号の説明】[Explanation of symbols]

1 加入者線インタフェース部 2 制御部 3 揮発性メモリ(RAM) 4 不揮発性メモリ(EEPROM、フラッシュメモ
リ) 5 上位装置インタフェース部
Reference Signs List 1 subscriber line interface unit 2 control unit 3 volatile memory (RAM) 4 nonvolatile memory (EEPROM, flash memory) 5 host device interface unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 斉藤 敏之 神奈川県横浜市戸塚区戸塚町216番地 株 式会社日立製作所通信事業部内 (72)発明者 福成 辰博 神奈川県横浜市戸塚区戸塚町216番地 株 式会社日立製作所通信事業部内 (72)発明者 森田 佳伸 神奈川県横浜市戸塚区戸塚町216番地 株 式会社日立製作所通信事業部内 (72)発明者 須藤 理光 神奈川県横浜市戸塚区戸塚町180番地 日 立通信システム株式会社内 (72)発明者 秋山 和彦 東京都千代田区大手町二丁目3番地1号 日本電信電話株式会社内 Fターム(参考) 5B018 GA04 HA35 KA01 KA30 NA06 QA05 RA11 5K051 DD07 HH01  ──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Toshiyuki Saito 216 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture Inside the Hitachi, Ltd.Communications Division (72) Inventor Tatsuhiro Fukunari 216 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture Hitachi, Ltd.Communications Division (72) Inventor Yoshinobu Morita 216 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture Co., Ltd.Communications Division, Hitachi Ltd. (72) Inventor Ritsumu Sudo 180-Totsukacho, Totsuka-ku, Yokohama, Kanagawa Prefecture Sun (72) Inventor Kazuhiko Akiyama 2-3-1, Otemachi, Chiyoda-ku, Tokyo Nippon Telegraph and Telephone Corporation F-term (reference) 5B018 GA04 HA35 KA01 KA30 NA06 QA05 RA11 5K051 DD07 HH01

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 予め定められたメモリ領域を一括消去
後、新たなデータを書き込むことによりデータの書き替
えが可能な不揮発性メモリのデータ書き替え方法におい
て、前記メモリ領域単位に、データの実体と共にデータ
の書込み未完了/完了を示すフラグ情報及びデータの有
効/無効を示すフラグ情報を書き込んでおき、データの
書き替え時、空きメモリ領域に新データを書き込み、そ
の後、書き替えるべき旧データが格納されているメモリ
領域のフラグ情報を無効とすることを特徴とする不揮発
性メモリのデータ書き替え方法。
1. A data rewriting method for a non-volatile memory in which data can be rewritten by writing new data after a predetermined memory area is collectively erased. Flag information indicating incomplete / completion of data writing and flag information indicating validity / invalidity of data are written, and when data is rewritten, new data is written in a free memory area, and then old data to be rewritten is stored. A method of rewriting data in a non-volatile memory, wherein the flag information of the memory area being set is invalidated.
【請求項2】 前記空きメモリ領域は、前記データの有
効/無効を示すフラグ情報が無効である領域、あるい
は、データの有効/無効を示すフラグ情報が有効であ
り、かつ、前記データの書き込み未完了/完了を示すフ
ラグ情報が書き込み未完了である領域であり、前記新デ
ータのデータの書き込み前に、前記空きメモリ領域を一
括消去することを特徴とする請求項1記載の不揮発性メ
モリのデータ書き替え方法。
2. The free memory area, wherein an area in which flag information indicating validity / invalidity of the data is invalid, or flag information indicating validity / invalidity of data is valid, and the data has not been written. 2. The data in the non-volatile memory according to claim 1, wherein the flag information indicating completion / completion is an area where writing is not completed, and the free memory area is collectively erased before writing the data of the new data. Rewriting method.
【請求項3】 メモリ消去直後のメモリ領域は、データ
の書き込み未完了/完了を示すフラグ情報が書き込み未
完了とされ、データの有効/無効を示すフラグ情報が有
効とされることを特徴とする請求項2記載の不揮発性メ
モリのデータ書き替え方法。
3. A memory area immediately after erasing a memory, wherein flag information indicating incomplete / completed data writing is set to incomplete writing, and flag information indicating valid / invalid of data is enabled. 3. The method for rewriting data in a nonvolatile memory according to claim 2.
【請求項4】 前記データの書き込み未完了/完了を示
すフラグ情報及びデータの有効/無効を示すフラグ情報
により、メモリ書き替えの際の空きメモリ領域の検索を
行うことを特徴とする請求項1、2または3記載の不揮
発性メモリのデータ書き替え方法。
4. A search for a free memory area at the time of memory rewriting is performed based on the flag information indicating data incompletion / completion and the flag information indicating data validity / invalidity. 4. The method for rewriting data in a nonvolatile memory according to item 2 or 3.
【請求項5】 ディジタル交換機の加入者に対する各種
のサービスを、不揮発性メモリに格納されるサービス制
御プログラムにより実現する加入者回路において、前記
サービス制御プログラム書き替えを、請求項1ないし4
のうちいずれか1記載の不揮発性メモリの書き替え方法
により行うことを特徴とする加入者回路。
5. The service control program rewriting in a subscriber circuit which realizes various services for a subscriber of the digital exchange by a service control program stored in a non-volatile memory.
A subscriber circuit, which is performed by the method for rewriting a nonvolatile memory according to any one of the above.
JP2000062177A 2000-03-07 2000-03-07 Method for rewriting data of nonvolatile memory and subscriber circuit Pending JP2001249855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000062177A JP2001249855A (en) 2000-03-07 2000-03-07 Method for rewriting data of nonvolatile memory and subscriber circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000062177A JP2001249855A (en) 2000-03-07 2000-03-07 Method for rewriting data of nonvolatile memory and subscriber circuit

Publications (1)

Publication Number Publication Date
JP2001249855A true JP2001249855A (en) 2001-09-14

Family

ID=18582221

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000062177A Pending JP2001249855A (en) 2000-03-07 2000-03-07 Method for rewriting data of nonvolatile memory and subscriber circuit

Country Status (1)

Country Link
JP (1) JP2001249855A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003065210A1 (en) * 2002-01-31 2003-08-07 Matsushita Electric Industrial Co., Ltd. Information processing apparatus, memory management apparatus, memory management method, and information processing method
WO2003075163A1 (en) * 2002-03-05 2003-09-12 Sanyo Electric Co., Ltd. Data storing device
JP2007004237A (en) * 2005-06-21 2007-01-11 Rinnai Corp Data backup device
JPWO2005041050A1 (en) * 2003-10-27 2007-11-22 松下電器産業株式会社 Recording medium, data processing apparatus, and data processing method
WO2008026466A1 (en) * 2006-08-31 2008-03-06 Sharp Kabushiki Kaisha File system
US7650328B2 (en) 2002-07-25 2010-01-19 Sanyo Electric Co., Ltd. Data storage device capable of storing multiple sets of history information on input/output processing of security data without duplication
US7725666B2 (en) 2005-11-03 2010-05-25 Hitachi Global Storage Technologies Netherlands B.V. Micro-journaling of data on a storage device
US7752461B2 (en) 2002-01-15 2010-07-06 Sanyo Electric Co., Ltd. Storage apparatus that can properly recommence input and output of classified data
US7986480B2 (en) 2005-11-03 2011-07-26 Hitachi Global Storage Technologies Netherlands B.V. Micro-journaling of data on a storage device
JP2012243143A (en) * 2011-05-20 2012-12-10 Tokai Rika Co Ltd Flash memory device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07153284A (en) * 1993-11-29 1995-06-16 Nec Corp Non-volatile semiconductor memory and its control method
JPH11512544A (en) * 1995-09-13 1999-10-26 レクサー・マイクロシステムズ・インコーポレーテッド Method and architecture for system data control with automatic wear leveling in semiconductor non-volatile mass storage memory

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07153284A (en) * 1993-11-29 1995-06-16 Nec Corp Non-volatile semiconductor memory and its control method
JPH11512544A (en) * 1995-09-13 1999-10-26 レクサー・マイクロシステムズ・インコーポレーテッド Method and architecture for system data control with automatic wear leveling in semiconductor non-volatile mass storage memory

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7752461B2 (en) 2002-01-15 2010-07-06 Sanyo Electric Co., Ltd. Storage apparatus that can properly recommence input and output of classified data
US7418436B2 (en) 2002-01-31 2008-08-26 Matsushita Electric Industrial Co., Ltd. Information processing apparatus, memory management apparatus, memory management method, and information processing method
WO2003065210A1 (en) * 2002-01-31 2003-08-07 Matsushita Electric Industrial Co., Ltd. Information processing apparatus, memory management apparatus, memory management method, and information processing method
WO2003075163A1 (en) * 2002-03-05 2003-09-12 Sanyo Electric Co., Ltd. Data storing device
US7716746B2 (en) 2002-03-05 2010-05-11 Sanyo Electric Co., Ltd. Data storing device for classified data
US7650328B2 (en) 2002-07-25 2010-01-19 Sanyo Electric Co., Ltd. Data storage device capable of storing multiple sets of history information on input/output processing of security data without duplication
JPWO2005041050A1 (en) * 2003-10-27 2007-11-22 松下電器産業株式会社 Recording medium, data processing apparatus, and data processing method
JP4731325B2 (en) * 2003-10-27 2011-07-20 パナソニック株式会社 Recording medium, data processing apparatus, and data processing method
JP2007004237A (en) * 2005-06-21 2007-01-11 Rinnai Corp Data backup device
US7725666B2 (en) 2005-11-03 2010-05-25 Hitachi Global Storage Technologies Netherlands B.V. Micro-journaling of data on a storage device
US7986480B2 (en) 2005-11-03 2011-07-26 Hitachi Global Storage Technologies Netherlands B.V. Micro-journaling of data on a storage device
WO2008026466A1 (en) * 2006-08-31 2008-03-06 Sharp Kabushiki Kaisha File system
JP2012243143A (en) * 2011-05-20 2012-12-10 Tokai Rika Co Ltd Flash memory device

Similar Documents

Publication Publication Date Title
US5682497A (en) Managing file structures for a flash memory file system in a computer
JP5440883B2 (en) Moving sectors in blocks in flash memory
US7613871B2 (en) Storage system using a flash memory partitioned with write-once and rewritable blocks
KR100370893B1 (en) Flash memory unit and control method of flash memory
KR101822485B1 (en) Recovering method after a power failure in software remote update for vehicles
JP2005242897A (en) Flash disk drive
JP5019567B2 (en) Memory management method and portable terminal device
JP2005190288A (en) Memory controller, flash memory system therewith, and method for controlling flash memory
JP2000222292A (en) Data managing method utilizing flash memory
JP2001249855A (en) Method for rewriting data of nonvolatile memory and subscriber circuit
US7055083B2 (en) Method and apparatus for allocating CRC codes in a flash ROM
KR100319254B1 (en) Restoring method for non-velatile data region using flash memory
CN114995749A (en) Parameter storage method for embedded equipment
US20110082995A1 (en) Information processing apparatus
JP4710274B2 (en) MEMORY DEVICE, MEMORY DEVICE CONTROL METHOD, AND DATA PROCESSING SYSTEM
JP3271935B2 (en) Control system
JPH11282690A (en) Method for writing control program, information processor and information processing system
JPH0817192A (en) Position storage method by flash memory
JP2002007152A (en) Download method and download device
CN113934370B (en) Wear-leveling method, device and medium for nonvolatile memory
JP2003203007A (en) Nonvolatile area control method for memory of mobile phone
KR20020041005A (en) Remote software upgrade method and system in optical network
CN116126591B (en) Transaction mechanism of embedded system
KR20010056103A (en) Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory
JP2005071124A (en) Non-volatile memory system

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20040727

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070216

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070326

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100427

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100622

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20101221