JP4978181B2 - Memory device - Google Patents

Memory device Download PDF

Info

Publication number
JP4978181B2
JP4978181B2 JP2006340777A JP2006340777A JP4978181B2 JP 4978181 B2 JP4978181 B2 JP 4978181B2 JP 2006340777 A JP2006340777 A JP 2006340777A JP 2006340777 A JP2006340777 A JP 2006340777A JP 4978181 B2 JP4978181 B2 JP 4978181B2
Authority
JP
Japan
Prior art keywords
data
memory
write
nonvolatile memory
writing
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
JP2006340777A
Other languages
Japanese (ja)
Other versions
JP2008152601A (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.)
Konica Minolta Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies 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 Konica Minolta Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2006340777A priority Critical patent/JP4978181B2/en
Publication of JP2008152601A publication Critical patent/JP2008152601A/en
Application granted granted Critical
Publication of JP4978181B2 publication Critical patent/JP4978181B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、不揮発性メモリに格納されたデータを保護するライトプロテクト機能を備えたメモリ装置に関する。   The present invention relates to a memory device having a write protect function for protecting data stored in a nonvolatile memory.

コンピュータに搭載される不揮発性メモリ、あるいは不揮発性メモリとそのメモリ制御モジュールなどを備える不揮発性メモリユニットは、通常、データの書き込みや削除を禁止するライトプロテクト機能が付加されており、格納した各種設定データやユーザーデータなどの重要なデータを保護できるように構成されている。   A nonvolatile memory unit equipped with a nonvolatile memory mounted on a computer, or a nonvolatile memory and its memory control module, etc. is usually provided with a write protection function that prohibits data writing and deletion, and various stored settings It is configured to protect important data such as data and user data.

たとえば、CPU(Central Processing Unit)やMPU(Micro Processing Unit)などのプロセッサが不揮発性のメモリやメモリユニットにデータを書き込むときには、プロセッサが出力するライトプロテクト信号によってプロテクトの設定/解除が行われ、データの書き込み禁止/許可が切り替えられる。そして、プロテクト解除中のみ書き込み可能とし、プロテクト設定中は書き込み不可能とすることで、既に格納したデータを保護するようにしている。   For example, when a processor such as a CPU (Central Processing Unit) or MPU (Micro Processing Unit) writes data to a non-volatile memory or memory unit, the protection is set / released by a write protect signal output from the processor, and the data The write prohibition / permission of is switched. Then, data can be written only while the protection is released, and data cannot be written while the protection is set, so that the already stored data is protected.

このような不揮発性のメモリまたはメモリユニットにおいては、ライトプロテクトを解除して行うデータの書き込み動作中に、停電などで電源が遮断されると、書き込み中のデータが破壊される虞がある。そこで、不揮発性メモリに運用メモリ領域とバックアップ用メモリ領域とを設け、バックアップ用メモリ領域へのデータ書き込み後にフラグをリセットしたタイミングで、そのバックアップ用メモリ領域に書き込んだデータと同一のデータを運用メモリ領域に書き込むことにより、正常なデータがバックアップ用メモリ領域と運用メモリ領域のいずれかに存在し、かつ、どちらが有効かをフラグで示すことで、電源遮断時のデータ書き込み不良を防止するようにした書き込み方法が提案されている(たとえば、特許文献1参照)
特開平7−84894号公報
In such a non-volatile memory or memory unit, if the power is shut off due to a power failure or the like during a data write operation performed by canceling the write protection, the data being written may be destroyed. Therefore, the operation memory area and the backup memory area are provided in the non-volatile memory, and the same data as the data written in the backup memory area is transferred to the operation memory at the timing when the flag is reset after the data is written to the backup memory area. By writing to the area, normal data exists in either the backup memory area or the operation memory area, and which is valid is indicated by a flag to prevent data writing failure at power shutdown A writing method has been proposed (for example, see Patent Document 1).
JP-A-7-84894

ユーザーデータなどのように、ある程度の大きさを持ち、含まれる個々の情報に相関(連続性)があるような一連のデータを不揮発性メモリに書き込む途中で電源が遮断され、書き込みが継続できなくなった場合、通常はデータが途中まで更新されて終了してしまう。そして、次の立ち上げ時に、一連のデータに含まれる個々の情報の相関が崩れていることで不正なデータとして扱われ、データを初期化せざるを得なくなる。しかし、重要な情報を含むユーザーデータなどは、初期化するよりも前回のデータから更新できないほうが望ましい。   Like user data, the power is cut off during the writing of a series of data that has a certain size and the correlation (continuity) of each contained information to the non-volatile memory, and the writing cannot be continued. In this case, the data is usually updated halfway and the process ends. Then, at the next start-up, the correlation of individual information included in a series of data is broken, so that it is treated as illegal data, and the data has to be initialized. However, it is desirable that user data including important information cannot be updated from the previous data rather than being initialized.

このような不具合に、上述した特許文献1のデータ書き込み方法にて対応することも可能ではあるが、不揮発性メモリに運用のためのメモリ領域とバックアップ用のメモリ領域を設けることで、冗長な不揮発性メモリが必要となり、コスト上昇を招いて現実的ではない。   Although it is possible to cope with such a malfunction by the data writing method of Patent Document 1 described above, a redundant nonvolatile memory is provided by providing a memory area for operation and a memory area for backup in the nonvolatile memory. Memory is required, which increases the cost and is not realistic.

本発明は、上記の問題を解決しようとするものであり、一連のデータの書き込み途中での電源遮断による不正データの発生防止を簡単な構成で実現することができるメモリ装置を提供することを目的としている。   An object of the present invention is to solve the above-described problem, and to provide a memory device that can realize prevention of illegal data generation by a power shutdown during writing of a series of data with a simple configuration. It is said.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。   The gist of the present invention for achieving the object lies in the inventions of the following items.

[1]電源遮断後も電源供給を所定時間継続可能な電源部から電源供給を受けて動作するメモリ装置であって、
データが格納される不揮発性メモリと、
前記不揮発性メモリに格納されるデータを一時的に保持する揮発性のバッファメモリと、
前記不揮発性メモリおよび前記バッファメモリに対するデータの書き込みを制御する制御手段と、
を備え、
1回のプロテクト解除中の保持に割り当てるバッファメモリの容量は、保持した全てのデータを前記所定時間内に前記不揮発メモリに転送可能な容量にされており、
前記制御手段は、入力されるライトプロテクト信号がプロテクト解除を示している間に、前記不揮発性メモリに対して書き込み要求されたデータを、前記バッファメモリに書き込んで一時的に保持させ、前記ライトプロテクト信号がプロテクト設定を示すと、プロテクト解除中に電源遮断が検出されなかったことを条件に前記バッファメモリから前記データを読み出して前記不揮発性メモリに書き込む
ことを特徴とするメモリ装置。
[1] A memory device that operates by receiving power supply from a power supply unit capable of continuing power supply for a predetermined time after power-off,
Non-volatile memory in which data is stored;
A volatile buffer memory that temporarily holds data stored in the nonvolatile memory;
Control means for controlling the writing of data to the nonvolatile memory and the buffer memory;
With
The capacity of the buffer memory allocated for holding during one release of protection is set to a capacity capable of transferring all the held data to the nonvolatile memory within the predetermined time.
The control means writes the data requested to be written to the nonvolatile memory into the buffer memory and temporarily holds the data while the input write protect signal indicates that the protection is released, and the write protect When the signal indicates a protection setting, the data is read from the buffer memory and written to the non-volatile memory on condition that a power interruption is not detected during the protection release .

上記発明では、電源部は、電源遮断後も所定時間は電源供給を継続する。制御手段は、入力されるライトプロテクト信号がプロテクト解除を示している間に、不揮発性メモリに対して書き込み要求されたデータを、バッファメモリに書き込んで一時的に保持させる。このバッファメモリは揮発性のメモリであり、1回のプロテクト解除中の保持に割り当てるバッファメモリの容量は、保持した全てのデータを所定時間内に不揮発メモリに転送可能な容量にされている。そして、ライトプロテクト信号がプロテクト設定を示すように切り替わると、プロテクト解除中に電源遮断が検出されなかったことを条件にバッファメモリからデータを読み出して不揮発性メモリに書き込む。 In the above invention, the power supply unit continues to supply power for a predetermined time after the power is shut off. The control means writes the data requested to be written to the nonvolatile memory into the buffer memory and temporarily holds the data while the input write protect signal indicates that the protection is cancelled. This buffer memory is a volatile memory, and the capacity of the buffer memory allocated for holding during one release of protection is set such that all the held data can be transferred to the nonvolatile memory within a predetermined time. Then, when the write protect signal is switched to indicate the protection setting, data is read from the buffer memory and written to the nonvolatile memory on the condition that the power shutoff is not detected during the protection release .

このように、不揮発性メモリに書き込まれるデータを、ライトプロテクトの解除中にバッファメモリで一時的に保持し、ライトプロテクトが設定に切り替わると、プロテクト解除中に電源遮断が検出されなかったことを条件にバッファメモリから読み出して不揮発性メモリに書き込むことにより、たとえば、プロセッサが命令の読み出し、解読、実行、書き戻し過程を繰り返して一連のデータを不揮発性メモリに書き込む場合などに比べ、プロセッサを介すことなくバッファメモリから不揮発性メモリへデータを直接転送することで、短時間で処理できるようになる。これにより、バッファメモリから不揮発性メモリへのデータ転送中に電源が遮断されたとしても、メモリ装置の動作可能なうちに全てのデータを不揮発性メモリに書き込むことができる。 In this way, data written to the non-volatile memory is temporarily held in the buffer memory during the release of write protection, and if the write protection is switched to the setting, it is a condition that no power shutoff was detected during the release of protection. By reading from the buffer memory and writing to the non-volatile memory, for example, the processor repeats the process of reading, decoding, executing, and writing back instructions to write a series of data to the non-volatile memory. By directly transferring data from the buffer memory to the non-volatile memory without any problem, processing can be performed in a short time. As a result, even if the power is shut off during data transfer from the buffer memory to the nonvolatile memory, all data can be written to the nonvolatile memory while the memory device is operable.

また、バッファメモリへのデータ書き込み中に、電源が遮断された場合でも、バッファメモリに保持されたデータが消滅するだけで、不揮発性メモリに不完全なデータが書き込まれることはない。これにより、含まれる個々の情報に相関(連続性)があるような一連のデータなどを不揮発性メモリに書き込む場合でも、電源遮断によるデータ書き込み途中での終了によるデータの不完全な更新が発生せず、次の立ち上げ時に、不正なデータとして扱われ初期化しなければならなくなるような不具合を回避できる。したがって、一連のデータを不揮発性メモリに書き込む途中での電源遮断による不正データの発生防止を、冗長な不揮発性メモリを要することなく簡単な構成で実現することができる。 Further, even when the power is cut off during the data writing to the buffer memory, the data held in the buffer memory only disappears, and incomplete data is not written to the nonvolatile memory. As a result, even when a series of data having correlation (continuity) between individual pieces of information is written to the nonvolatile memory, incomplete update of the data due to termination in the middle of the data writing due to the power interruption occurs. Therefore, it is possible to avoid the problem that the data is treated as invalid data and must be initialized at the next startup. Therefore, it is possible to prevent illegal data from being generated due to power interruption in the middle of writing a series of data in the nonvolatile memory with a simple configuration without requiring a redundant nonvolatile memory.

また、メモリ装置が備えるライトプロテクト機能を利用して上記の制御を実行することにより、すなわち、ライトプロテクト信号が解除から設定に切り替わるタイミングは、プロテクト解除中に書き込み要求された全データの書き込みが完了したこと(バッファメモリによるデータの保持完了)を示すものであり、このライトプロテクト信号を制御動作のトリガ信号として利用することにより、たとえば、専用のトリガ信号を生成して制御するような場合に比べて、構成(制御方法)を簡素化することができる。   In addition, by executing the above control using the write protect function of the memory device, that is, when the write protect signal switches from release to setting, writing of all data requested to be written during release of protection is completed. This indicates that the data has been retained by the buffer memory. By using this write protect signal as a trigger signal for the control operation, for example, a dedicated trigger signal is generated and controlled. Thus, the configuration (control method) can be simplified.

[2]前記制御手段は、前記不揮発性メモリに前記データを連続的に書き込む
ことを特徴とする[1]に記載のメモリ装置。
[2] The memory device according to [1], wherein the control unit continuously writes the data to the nonvolatile memory.

上記発明では、バッファメモリに保持されたデータを不揮発性メモリに連続的に書き込むことにより、バッファメモリから不揮発性メモリへのデータの高速転送が可能となり、連続性のあるデータなどでも効率よく短時間で転送することができる。   In the above invention, the data held in the buffer memory is continuously written to the non-volatile memory, so that the data can be transferred from the buffer memory to the non-volatile memory at a high speed. Can be transferred.

本発明に係るメモリ装置によれば、一連のデータの書き込み途中での電源遮断による不正データの発生防止を簡単な構成で実現することができる。   According to the memory device of the present invention, it is possible to prevent illegal data from being generated due to power interruption during the writing of a series of data with a simple configuration.

以下、図面に基づき本発明の実施の形態を説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明の実施の形態に係る不揮発性のメモリユニット10を備えたデータ処理装置11の主要構成を示している。データ処理装置11は、たとえば種々のデータを扱うパーソナルコンピュータ、あるいは、主に画像データを扱うレーザプリンタやデジタル複合機などに搭載される装置であり、本発明のメモリ装置である上記の(不揮発性)メモリユニット10と、CPU12とを備えている。   FIG. 1 shows a main configuration of a data processing apparatus 11 including a nonvolatile memory unit 10 according to an embodiment of the present invention. The data processing device 11 is a device mounted on, for example, a personal computer that handles various data, or a laser printer or digital multi-function peripheral that mainly handles image data, and is the above-described (non-volatile) that is the memory device of the present invention. ) A memory unit 10 and a CPU 12 are provided.

CPU12は、演算処理機能を備えてメモリユニット10を含む装置全体の動作を制御し、メモリユニット10に対するデータの書き込みおよび読み出しでは、メモリのアドレスを指定することで特定のデータ領域にアクセスする。   The CPU 12 has an arithmetic processing function and controls the operation of the entire apparatus including the memory unit 10. In writing and reading data to and from the memory unit 10, a specific data area is accessed by specifying a memory address.

メモリユニット10は、データ処理装置11が扱う各種データが格納される不揮発性メモリ13と、不揮発性メモリ13に対するデータの書き込みおよび読み出しを制御する(不揮発性)メモリ制御モジュール14とを備えており、更に、メモリユニット10自体に対するデータの書き込みや削除を禁止するライトプロテクト機能をも備えている。   The memory unit 10 includes a nonvolatile memory 13 in which various data handled by the data processing device 11 is stored, and a (nonvolatile) memory control module 14 that controls writing and reading of data to and from the nonvolatile memory 13. Further, it has a write protect function for prohibiting data writing or deletion to the memory unit 10 itself.

不揮発性メモリ13は、電源がオフしても記憶内容が保持されるメモリであり、この不揮発性メモリ13には、装置固有の各種パラメータ、設定データ、ユーザーデータなど、電源オフ後も保存すべき所定のデータが記憶される。また、不揮発性メモリ13も、不揮発性メモリ13自体に対するデータの書き込みや削除を禁止するライトプロテクト機能を備えている。   The non-volatile memory 13 is a memory that retains stored contents even when the power is turned off. The non-volatile memory 13 should store various parameters, setting data, user data, etc. unique to the apparatus even after the power is turned off. Predetermined data is stored. The non-volatile memory 13 also has a write protect function that prohibits writing and deleting of data to and from the non-volatile memory 13 itself.

メモリ制御モジュール14の内部には、不揮発性メモリ13に格納されるデータを一時的に保持するバッファメモリ15(内部バッファメモリ)が設けられている。メモリ制御モジュール14は、この内蔵したバッファメモリ15に対するデータの書き込みおよび読み出しも制御しており、バッファメモリ15に保持されたデータを不揮発性メモリ13に格納する際は、CPU12を介さずにDMA(Direct Memory Access)転送によってバッファメモリ15から不揮発性メモリ13へデータを直接転送する。さらにメモリ制御モジュール14は、バッファメモリ15から不揮発性メモリ13へのデータ転送時に、データを転送しつつ、それと並行して、CPU12から次に書き込み要求されたデータをバッファメモリ15に書き込む制御を行う。   A buffer memory 15 (internal buffer memory) that temporarily holds data stored in the nonvolatile memory 13 is provided in the memory control module 14. The memory control module 14 also controls writing and reading of data with respect to the built-in buffer memory 15, and when storing the data held in the buffer memory 15 in the nonvolatile memory 13, the DMA ( Data is directly transferred from the buffer memory 15 to the nonvolatile memory 13 by direct memory access). Further, the memory control module 14 performs control to write data next requested to be written from the CPU 12 to the buffer memory 15 while transferring the data at the time of data transfer from the buffer memory 15 to the nonvolatile memory 13. .

データ処理装置11は、動作中に電源(AC入力)が遮断されたとしても、電源回路や内部回路に蓄積された電力によって数十〜数百ms程度は動作可能であり、電源仕様や回路構成などによって電源遮断時の動作可能時間が決定される。バッファメモリ15の容量は、この電源遮断時におけるデータ処理装置11の動作可能時間に基づいて設定されている。たとえば、電源遮断時の動作可能時間が50ms(または100ms)である場合、保持した全てのデータを50ms(または100ms)以内に不揮発性メモリ13に転送できる容量に設定される。さらにバッファメモリ15は、メモリ制御モジュール14による不揮発性メモリ13へのデータ転送時に、特定の領域に保持したデータを不揮発性メモリ13へ転送しつつ、それと並行して、CPU12から送られる次のデータを別の領域に受け入れて保持できるよう、メモリ領域が区分けされている。   Even if the power supply (AC input) is cut off during operation, the data processing apparatus 11 can operate for several tens to several hundreds of milliseconds depending on the power stored in the power supply circuit and the internal circuit. Thus, the operable time when the power is shut off is determined. The capacity of the buffer memory 15 is set based on the operable time of the data processing apparatus 11 when the power is shut off. For example, when the operable time at the time of power-off is 50 ms (or 100 ms), the capacity is set such that all stored data can be transferred to the nonvolatile memory 13 within 50 ms (or 100 ms). Further, when the memory control module 14 transfers data to the non-volatile memory 13, the buffer memory 15 transfers the data held in a specific area to the non-volatile memory 13 and at the same time, the next data sent from the CPU 12 The memory area is divided so that can be received and held in another area.

メモリユニット10のライトプロテクト機能に関しては、CPU12がメモリユニット10にデータを書き込むときに、メモリ制御モジュール14がライトプロテクトの設定(有効)/解除(無効)を行ってデータの書き込み禁止/許可を切り替える。また、連続性のあるデータの書き込みでは、その連続データの書き込み中はメモリユニット10をプロテクト解除状態に保持し、全てのデータの書き込み完了後にプロテクト状態に戻す制御が行われる。   Regarding the write protect function of the memory unit 10, when the CPU 12 writes data to the memory unit 10, the memory control module 14 sets (validates) / cancels (invalidates) the write protection and switches the data write prohibition / permission. . Further, in writing continuous data, control is performed so that the memory unit 10 is held in the unprotected state during writing of the continuous data, and is returned to the protected state after the writing of all data is completed.

詳細には、CPU12は、メモリユニット10のメモリ制御モジュール14へライトプロテクト信号PS1および書き込み要求信号WS1を出力しており、メモリユニット10(不揮発性メモリ13)にデータDTを書き込むとき、ライトプロテクト信号PS1の信号レベルをHighからLowへ切り替える(図2参照)。ライトプロテクト信号PS1の低下を検出したメモリ制御モジュール14は、メモリユニット10のプロテクトを解除してデータDTの書き込みを許可する。CPU12は、メモリユニット10のプロテクト解除後またはプロテクト解除と同時に、書き込み要求信号WS1の信号レベルをHighからLowへ切り替えてデータDTの書き込みを要求し、メモリ制御モジュール14がCPU12から送られたデータDTをバッファメモリ15に書き込む。データDTの書き込み完了後は、CPU12がライトプロテクト信号PS1の信号レベルをLowからHighへ切り替え、ライトプロテクト信号PS1の上昇を検出したメモリ制御モジュール14は、メモリユニット10をプロテクト解除状態から設定状態に切り替えてデータDTの書き込みを禁止する。   Specifically, the CPU 12 outputs the write protect signal PS1 and the write request signal WS1 to the memory control module 14 of the memory unit 10, and when writing the data DT to the memory unit 10 (nonvolatile memory 13), the write protect signal The signal level of PS1 is switched from High to Low (see FIG. 2). The memory control module 14 that has detected the decrease in the write protect signal PS1 cancels the protection of the memory unit 10 and permits the writing of the data DT. The CPU 12 switches the signal level of the write request signal WS1 from High to Low after releasing the protection of the memory unit 10 or simultaneously with releasing the protection, and requests writing of the data DT, and the memory control module 14 receives the data DT sent from the CPU 12 Is written into the buffer memory 15. After completing the writing of the data DT, the CPU 12 switches the signal level of the write protect signal PS1 from Low to High, and the memory control module 14 that detects the rise of the write protect signal PS1 changes the memory unit 10 from the unprotected state to the set state. Switch to prohibit writing of data DT.

不揮発性メモリ13のライトプロテクト機能に関しては、メモリ制御モジュール14が不揮発性メモリ13にデータを書き込むときに、不揮発性メモリ13がライトプロテクトの設定/解除を行ってデータの書き込み禁止/許可を切り替える。また、連続性のあるデータの書き込みでは、その連続データの書き込み中は不揮発性メモリ13をプロテクト解除状態に保持し、全てのデータの書き込み完了後にプロテクト状態に戻す制御が行われる。   Regarding the write protect function of the nonvolatile memory 13, when the memory control module 14 writes data to the nonvolatile memory 13, the nonvolatile memory 13 sets / cancels write protection and switches between prohibition / permission of data writing. Further, in writing continuous data, control is performed to hold the nonvolatile memory 13 in the unprotected state during the continuous data writing and to return to the protected state after the writing of all data is completed.

詳細には、メモリ制御モジュール14は、不揮発性メモリ13へライトプロテクト信号PS2および書き込み要求信号WS2を出力しており、バッファメモリ15に保持されたデータDTを不揮発性メモリ13に格納するとき、ライトプロテクト信号PS2の信号レベルをHighからLowへ切り替える(図2参照)。ライトプロテクト信号PS2の低下を検出した不揮発性メモリ13は、プロテクトを解除してデータDTの書き込みを許可する。メモリ制御モジュール14は、不揮発性メモリ13のプロテクト解除後またはプロテクト解除と同時に、書き込み要求信号WS2の信号レベルをHighからLowへ切り替えてデータDTの書き込みを要求し、バッファメモリ15からデータを読み出して不揮発性メモリ13に転送し書き込む(DMA転送)。データDTの書き込み完了後は、メモリ制御モジュール14がライトプロテクト信号PS2の信号レベルをLowからHighへ切り替え、ライトプロテクト信号PS2の上昇を検出した不揮発性メモリ13は、プロテクト解除状態から設定状態に切り替えてデータDTの書き込みを禁止する。   Specifically, the memory control module 14 outputs the write protect signal PS2 and the write request signal WS2 to the nonvolatile memory 13, and when storing the data DT held in the buffer memory 15 in the nonvolatile memory 13, The signal level of the protect signal PS2 is switched from High to Low (see FIG. 2). The nonvolatile memory 13 that has detected the decrease in the write protect signal PS2 releases the protection and permits the writing of the data DT. The memory control module 14 requests the writing of data DT by switching the signal level of the write request signal WS2 from High to Low after releasing the protection of the nonvolatile memory 13 or simultaneously with releasing the protection, and reads the data from the buffer memory 15 Transfer and write to the non-volatile memory 13 (DMA transfer). After completing the writing of the data DT, the memory control module 14 switches the signal level of the write protect signal PS2 from Low to High, and the nonvolatile memory 13 that has detected the rise of the write protect signal PS2 switches from the protected state to the set state. Thus, writing of data DT is prohibited.

次に、上記構成のメモリユニット10を含むデータ処理装置11の動作について説明する。   Next, the operation of the data processing apparatus 11 including the memory unit 10 having the above configuration will be described.

図2は、CPU12によるメモリユニット10(不揮発性メモリ13)へのデータの書き込み動作、および、メモリユニット10内でのメモリ制御モジュール14による不揮発性メモリ13へのデータの書き込み動作のタイミングを示す説明図である。図2に示すタイミングチャートでは、時間経過に伴う、CPU12とメモリ制御モジュール14の間での動作(ライトプロテクト信号PS1の出力レベルの変化/書き込み要求信号WS1の出力レベルの変化/バッファメモリ15に書き込まれるデータDT)と、メモリ制御モジュール14と不揮発性メモリ13の間での動作(ライトプロテクト信号PS2の出力レベルの変化/書き込み要求信号WS2の出力レベルの変化/不揮発性メモリ13に書き込まれるデータDT)とを対応させて表している。   FIG. 2 illustrates the timing of the data writing operation to the memory unit 10 (nonvolatile memory 13) by the CPU 12, and the timing of the data writing operation to the nonvolatile memory 13 by the memory control module 14 in the memory unit 10. FIG. In the timing chart shown in FIG. 2, the operation between the CPU 12 and the memory control module 14 over time (change in the output level of the write protect signal PS1 / change in the output level of the write request signal WS1 / writing to the buffer memory 15). Data DT) and operation between the memory control module 14 and the nonvolatile memory 13 (change in output level of the write protect signal PS2 / change in output level of the write request signal WS2 / data DT to be written in the nonvolatile memory 13) ).

図2に示すように、CPU12は、メモリユニット10(不揮発性メモリ13)にデータDTを書き込むとき、メモリユニット10のメモリ制御モジュール14へ出力するライトプロテクト信号PS1の信号レベルをHighからLowへ切り替えて、メモリユニット10のライトプロテクトを解除(無効に)する(T1)。   As shown in FIG. 2, when writing data DT into the memory unit 10 (nonvolatile memory 13), the CPU 12 switches the signal level of the write protect signal PS1 output to the memory control module 14 of the memory unit 10 from High to Low. Then, the write protection of the memory unit 10 is canceled (invalidated) (T1).

メモリユニット10のプロテクト解除後に、CPU12は、書き込み要求信号WS1の信号レベルをHighからLowへ切り替えてデータDTの書き込みを要求する。たとえば、3つのデータ0,データ1,データ2をその順番に書き込む場合には、データ0の書き込み要求(T2)と、データ1の書き込み要求(T3)と、データ2の書き込み要求(T4)とを所定のタイミング(時間間隔)で順次行う。   After the protection of the memory unit 10 is released, the CPU 12 switches the signal level of the write request signal WS1 from High to Low and requests writing of data DT. For example, when three data 0, data 1, and data 2 are written in that order, a data 0 write request (T2), a data 1 write request (T3), and a data 2 write request (T4) Are sequentially performed at a predetermined timing (time interval).

メモリ制御モジュール14は、上記の書き込み要求後にCPU12から送られてきたデータDTをバッファメモリ15に書き込んで保持する。上記のデータ0〜2の例では、最初のデータ0の書き込み要求(T2)後に、CPU12から送られてきたデータ0をバッファメモリ15に書き込む。データ0の書き込みが完了すると、2番目のデータ1の書き込み要求(T3)後に、CPU12から送られてきたデータ1をバッファメモリ15に書き込む。データ1の書き込みが完了すると、最後のデータ2の書き込み要求(T4)後に、CPU12から送られてきたデータ2をバッファメモリ15に書き込む。また、このデータDT(データ0〜2)は、たとえば、バッファメモリ15の特定の領域に書き込んで保持する。   The memory control module 14 writes and holds the data DT sent from the CPU 12 after the above write request in the buffer memory 15. In the example of the data 0 to 2 described above, the data 0 sent from the CPU 12 is written into the buffer memory 15 after the first data 0 write request (T2). When the writing of the data 0 is completed, the data 1 sent from the CPU 12 is written into the buffer memory 15 after the second data 1 writing request (T3). When the writing of the data 1 is completed, the data 2 sent from the CPU 12 is written into the buffer memory 15 after the last data 2 write request (T4). The data DT (data 0 to 2) is written and held in a specific area of the buffer memory 15, for example.

バッファメモリ15へのデータDTの書き込みが完了すると、CPU12は、ライトプロテクト信号PS1の信号レベルをLowからHighへ切り替えて、メモリユニット10のライトプロテクトを設定(有効に)する(T5)。   When the writing of the data DT to the buffer memory 15 is completed, the CPU 12 switches the signal level of the write protect signal PS1 from Low to High and sets (enables) the write protect of the memory unit 10 (T5).

メモリ制御モジュール14は、ライトプロテクト信号PS1の上昇を検出すると、不揮発性メモリ13へ出力するライトプロテクト信号PS2の信号レベルをHighからLowへ切り替えて、不揮発性メモリ13のライトプロテクトを解除し、この不揮発性メモリ13のプロテクト解除と同時に、書き込み要求信号WS2の信号レベルをHighからLowへ切り替えてバッファメモリ15から不揮発性メモリ13へのデータDTの書き込みを要求する(T5)。そして、バッファメモリ15に保持されたデータDTをDMA転送によって不揮発性メモリ13に書き込む。上記のデータ0〜2の例では、バッファメモリ15に保持されたデータ0〜2を不揮発性メモリ13に連続的に書き込む。   When the memory control module 14 detects an increase in the write protect signal PS1, the signal level of the write protect signal PS2 output to the nonvolatile memory 13 is switched from High to Low, and the write protection of the nonvolatile memory 13 is canceled. Simultaneously with the cancellation of protection of the nonvolatile memory 13, the signal level of the write request signal WS2 is switched from High to Low to request writing of data DT from the buffer memory 15 to the nonvolatile memory 13 (T5). Then, the data DT held in the buffer memory 15 is written in the nonvolatile memory 13 by DMA transfer. In the example of the data 0 to 2 described above, the data 0 to 2 held in the buffer memory 15 are continuously written to the nonvolatile memory 13.

不揮発性メモリ13へのデータDTの書き込みが完了すると、メモリ制御モジュール14は、ライトプロテクト信号PS2の信号レベルをLowからHighへ切り替えて、不揮発性メモリ13のライトプロテクトを設定する(T8)。   When the writing of the data DT to the nonvolatile memory 13 is completed, the memory control module 14 switches the signal level of the write protect signal PS2 from Low to High and sets the write protection of the nonvolatile memory 13 (T8).

また、バッファメモリ15のデータDTを不揮発性メモリ13に書き込んでいる最中に、メモリユニット10に対して次のデータDTを書き込む場合、CPU12は、同様にライトプロテクト信号PS1の信号レベルをHighからLowへ切り替えて、メモリユニット10のライトプロテクトを解除し(T6)、プロテクト解除後に、書き込み要求信号WS1の信号レベルをHighからLowへ切り替えて次のデータDTの書き込みを要求する(T7)。   When the next data DT is written to the memory unit 10 while the data DT of the buffer memory 15 is being written to the nonvolatile memory 13, the CPU 12 similarly changes the signal level of the write protect signal PS1 from High. By switching to Low, the write protection of the memory unit 10 is released (T6). After releasing the protection, the signal level of the write request signal WS1 is switched from High to Low to request writing of the next data DT (T7).

この書き込み要求を受けたメモリ制御モジュール14は、書き込み要求後にCPU12から送られてきた次のデータDTをバッファメモリ15に書き込んで保持する。たとえば、上記のデータ0〜2に続くデータ3を書き込む例では、先にデータ0〜2を書き込んだ特定の領域とは別の領域にデータ3を書き込んで保持する。   Upon receiving this write request, the memory control module 14 writes and holds the next data DT sent from the CPU 12 after the write request in the buffer memory 15. For example, in the example in which the data 3 following the data 0 to 2 is written, the data 3 is written and held in an area different from the specific area in which the data 0 to 2 is previously written.

このように、メモリユニット10では、不揮発性メモリ13に書き込まれるデータDTが、メモリユニット10のライトプロテクト解除中にバッファメモリ15で一時的に保持され、ライトプロテクトが設定に戻されたタイミングで、バッファメモリ15から読み出されて不揮発性メモリ13に書き込まれる。また、バッファメモリ15に保持されたデータDT(データ0〜2)をメモリ制御モジュール14が不揮発性メモリ13に書き込んでいる最中でも、CPU12がメモリユニット10(不揮発性メモリ13)に対して次のデータDT(データ3)を書き込むことができる。   As described above, in the memory unit 10, the data DT written to the nonvolatile memory 13 is temporarily held in the buffer memory 15 while the write protection of the memory unit 10 is released, and at the timing when the write protection is returned to the setting. The data is read from the buffer memory 15 and written to the nonvolatile memory 13. Further, while the memory control module 14 is writing the data DT (data 0 to 2) held in the buffer memory 15 to the nonvolatile memory 13, the CPU 12 performs the following on the memory unit 10 (nonvolatile memory 13). Data DT (data 3) can be written.

次に、上記の動作でメモリ制御モジュール14が行うバッファメモリ15でのデータ管理について、3種類の例を用いて説明する。   Next, data management in the buffer memory 15 performed by the memory control module 14 in the above operation will be described using three types of examples.

図3に示すデータ管理例(1)の場合、メモリ制御モジュール14は、バッファメモリ15へのデータ書き込みで、CPU12から送られてきたデータに、CPU12から指定された不揮発性メモリ13への書き込み先のアドレスを付与(関連付け)して保存する。   In the case of the data management example (1) shown in FIG. 3, the memory control module 14 writes data to the buffer memory 15 and writes the data sent from the CPU 12 to the nonvolatile memory 13 designated by the CPU 12. Assign (associate) and save the address.

たとえば、書き込みデータがデータ0,データ1,データ2,データ3,・・・,データN−1,データNで、各データの不揮発性メモリ13への書き込み先のアドレスがアドレスX0,アドレスX1,アドレスX2,アドレスX3,・・・,アドレスXN−1,アドレスXNである場合、メモリ制御モジュール14は、メモリユニット10のライトプロテクト解除中に(図2のT1〜T6)、CPU12から送られてくるデータ0にアドレスX0を関連付けし、データ1にアドレスX1を関連付けし、データ2にアドレスX2を関連付けし、データ3にアドレスX3を関連付けし、・・・、データN−1にアドレスXN−1を関連付けし、データNにアドレスXNを関連付けして、バッファメモリ15に保存する。そして、メモリユニット10のライトプロテクトが解除から設定に切り替わると(図2のT6)、メモリ制御モジュール14は、バッファメモリ15から各データ(データ0〜N)を読み出し、不揮発性メモリ13の各指定アドレス(アドレスX0〜XN)に書き込む。なお、本例の場合はアドレスが不連続であってもよい。   For example, the write data is data 0, data 1, data 2, data 3,..., Data N−1, data N, and the address of the write destination of each data to the nonvolatile memory 13 is address X0, address X1, In the case of address X2, address X3,..., Address XN-1, and address XN, the memory control module 14 is sent from the CPU 12 while the write protection of the memory unit 10 is being released (T1 to T6 in FIG. 2). Associate address X0 with incoming data 0, associate address X1 with data 1, associate address X2 with data 2, associate address X3 with data 3, ..., address XN-1 with data N-1 , And the address XN is associated with the data N and stored in the buffer memory 15. When the write protection of the memory unit 10 is switched from the release to the setting (T6 in FIG. 2), the memory control module 14 reads each data (data 0 to N) from the buffer memory 15 and specifies each designation in the nonvolatile memory 13. Write to addresses (addresses X0 to XN). In the case of this example, the addresses may be discontinuous.

図4に示すデータ管理例(2)の場合、メモリ制御モジュール14は、バッファメモリ15へのデータ書き込みで、CPU12から送られてきたデータを、CPU12から指定された不揮発性メモリ13への書き込み先のアドレスが連続している単位にブロック化し、そのブロック毎に、ブロック内データの書き込みスタートアドレス(先頭アドレス)とサイズを含むヘッダ情報を付与して、バッファメモリ15に保存する。   In the case of the data management example (2) shown in FIG. 4, the memory control module 14 writes the data sent from the CPU 12 to the nonvolatile memory 13 designated by the CPU 12 by writing data to the buffer memory 15. The data is blocked in units of consecutive addresses, header information including the write start address (head address) and size of the data in the block is assigned to each block, and the data is stored in the buffer memory 15.

たとえば、書き込みデータがデータ0,データ1,データ2,データ3,データ4,データ5,・・・,データN−1,データNで、各データの不揮発性メモリ13への書き込み先のアドレスがアドレスX0,アドレスX1,アドレスX2,アドレスX3,アドレスX7,アドレスX8,・・・,アドレスXX−1,アドレスXXである場合、メモリ制御モジュール14は、メモリユニット10のライトプロテクト解除中に(図2のT1〜T6)、CPU12から送られてくるアドレスが連続しているデータ0〜3をブロック化してそのデータブロック0の書き込みスタートアドレスX0とサイズ4を含むヘッダ情報を付与し、データ4とデータ5をブロック化してそのデータブロック1の書き込みスタートアドレスX7とサイズ2を含むヘッダ情報を付与し、・・・、データN−1とデータNをブロック化してそのデータブロックMの書き込みスタートアドレスXX−1とサイズ2を含むヘッダ情報を付与し、バッファメモリ15に保存する。そして、メモリユニット10のライトプロテクトが解除から設定に切り替わると(図2のT6)、メモリ制御モジュール14は、バッファメモリ15から各データをブロック単位(データブロック0〜M)で読み出し、不揮発性メモリ13の指定された各スタートアドレス(スタートアドレスX0,スタートアドレスX7,・・・,スタートアドレスXX−1)から始まる領域に書き込む。   For example, the write data is data 0, data 1, data 2, data 3, data 4, data 5,..., Data N-1, and data N, and the address of the write destination of each data to the nonvolatile memory 13 is In the case of address X0, address X1, address X2, address X3, address X7, address X8,..., Address XX-1, and address XX, the memory control module 14 is in the process of releasing the write protection of the memory unit 10 (FIG. 2, T 1 to T 6), data 0 to 3 having consecutive addresses sent from the CPU 12 are blocked, and the header information including the write start address X 0 and the size 4 of the data block 0 is given. The data 5 is blocked and the data block 1 including the write start address X7 and the size 2 is included. The header information is applied, ..., and blocks of data N-1 and data N Grant header information including the write start address XX-1 and Size 2 of the data block M, and stored in the buffer memory 15. When the write protection of the memory unit 10 is switched from the release to the setting (T6 in FIG. 2), the memory control module 14 reads each data from the buffer memory 15 in units of blocks (data blocks 0 to M), and the nonvolatile memory Write to the area starting from each of 13 designated start addresses (start address X0, start address X7,..., Start address XX-1).

図5に示すデータ管理例(3)の場合、メモリ制御モジュール14は、バッファメモリ15へのデータ書き込みで、CPU12から書き込み要求を受けたデータの不揮発性メモリ13への書き込み先のアドレスが含まれる物理ブロックを不揮発性メモリ13から読み出し、その読み出した物理ブロックにデータを書き込んで反映させ、バッファメモリ15に保存する。   In the case of the data management example (3) shown in FIG. 5, the memory control module 14 includes the address of the write destination to the nonvolatile memory 13 of the data received from the CPU 12 in the data write to the buffer memory 15. The physical block is read from the nonvolatile memory 13, the data is written and reflected in the read physical block, and stored in the buffer memory 15.

たとえば、書き込みデータがデータ0で、不揮発性メモリ13への書き込み先のアドレスがアドレスXMで、そのアドレスXMを含む不揮発性メモリ13の物理ブロックが物理ブロックMである場合、メモリ制御モジュール14は、メモリユニット10のライトプロテクト解除中に(図2のT1〜T6)、CPU12から送られてくるデータ0のアドレスXMが含まれる物理ブロックMを不揮発性メモリ13から読み出し(フェッチ)、その読み出した物理ブロックMにデータ0を書き込んで統合し(マージ)、バッファメモリ15に保存する。そして、メモリユニット10のライトプロテクトが解除から設定に切り替わると(図2のT6)、メモリ制御モジュール14は、バッファメモリ15から、データ0が統合された物理ブロックMを読み出して不揮発性メモリ13に書き戻す。   For example, when the write data is data 0, the address of the write destination to the nonvolatile memory 13 is the address XM, and the physical block of the nonvolatile memory 13 including the address XM is the physical block M, the memory control module 14 During the write protection cancellation of the memory unit 10 (T1 to T6 in FIG. 2), the physical block M including the address XM of the data 0 sent from the CPU 12 is read (fetched) from the nonvolatile memory 13, and the read physical Data 0 is written in the block M and integrated (merged), and stored in the buffer memory 15. When the write protection of the memory unit 10 is switched from the release to the setting (T6 in FIG. 2), the memory control module 14 reads the physical block M in which the data 0 is integrated from the buffer memory 15 and stores it in the nonvolatile memory 13. Write back.

このデータ管理例(3)では、CPU12から書き込み要求を受けたデータの不揮発性メモリ13への書き込み先のアドレスが含まれる物理ブロックのみが書き換えられる。   In this data management example (3), only the physical block including the address of the write destination of the data received from the CPU 12 to the nonvolatile memory 13 is rewritten.

以上説明したように、本実施形態に係るメモリユニット10では、不揮発性メモリ13に書き込むデータDTを、メモリユニット10のライトプロテクトの解除中に、メモリ制御モジュール14内のバッファメモリ15で一時的に保持し、ライトプロテクトが設定に切り替わると、バッファメモリ15から読み出して不揮発性メモリ13に書き込むことにより、たとえば、CPU12が命令の読み出し、解読、実行、書き戻し過程を繰り返して一連のデータDTを不揮発性メモリ13に書き込む場合などに比べ、CPU12を介すことなくバッファメモリ15から不揮発性メモリ13へデータDTを直接転送(DMA転送)することで、短時間で処理できるようになる。そして、バッファメモリ15から不揮発性メモリ13へのデータ転送中に電源が遮断されたとしても、メモリユニット10の動作可能なうちに全てのデータDTを不揮発性メモリ13に書き込むことができる。   As described above, in the memory unit 10 according to this embodiment, the data DT to be written to the nonvolatile memory 13 is temporarily stored in the buffer memory 15 in the memory control module 14 while the write protection of the memory unit 10 is released. When the write protection is switched to the setting, the data is read from the buffer memory 15 and written to the non-volatile memory 13. For example, the CPU 12 repeats the process of reading, decoding, executing, and writing back the instruction to store a series of data DT in a non-volatile manner. Compared with the case where data is written in the volatile memory 13, the data DT is directly transferred (DMA transfer) from the buffer memory 15 to the nonvolatile memory 13 without using the CPU 12, so that processing can be performed in a short time. Even if the power is cut off during data transfer from the buffer memory 15 to the nonvolatile memory 13, all the data DT can be written to the nonvolatile memory 13 while the memory unit 10 is operable.

また、バッファメモリ15へのデータDTの書き込み中や、バッファメモリ15に保持したデータDTをバッファメモリ15から不揮発性メモリ13へ転送する前に、電源が遮断された場合でも、バッファメモリ15に保持されたデータDTが消滅するだけで、不揮発性メモリ13に不完全なデータが書き込まれることはない。これにより、含まれる個々の情報に相関(連続性)があるようなユーザーデータなどを不揮発性メモリ13に書き込む場合でも、電源遮断によるデータ書き込み途中での終了とデータの不完全な更新が発生せず、次の立ち上げ時に、不正なデータとして扱われ初期化しなければならなくなるような不具合を回避できる。したがって、一連のデータを不揮発性メモリ13に書き込む途中での電源遮断による不正データの発生防止を、冗長な不揮発性メモリを要することなく簡単な構成で実現することができる。また、メモリユニット10が備えるライトプロテクト機能を利用して上記の制御を実行することにより、すなわち、ライトプロテクト信号PS1が解除から設定に切り替わるタイミングは(Low⇒High)、プロテクト解除中に書き込み要求された全データの書き込みが完了したこと(バッファメモリ15によるデータの保持完了)を示すものであり、このライトプロテクト信号PS1を制御動作のトリガ信号として利用することにより、たとえば、専用のトリガ信号を生成して制御するような場合に比べて、構成(制御方法)を簡素化することができる。   In addition, even when the power is shut off during the writing of data DT to the buffer memory 15 or before the data DT held in the buffer memory 15 is transferred from the buffer memory 15 to the nonvolatile memory 13, the data is held in the buffer memory 15. The incomplete data is not written in the nonvolatile memory 13 only by the disappearance of the data DT. As a result, even when user data that has correlation (continuity) in individual information contained therein is written to the non-volatile memory 13, the end of data writing due to power interruption and incomplete data update may occur. Therefore, it is possible to avoid the problem that the data is treated as invalid data and must be initialized at the next startup. Therefore, it is possible to prevent illegal data from being generated due to power interruption while writing a series of data in the nonvolatile memory 13 with a simple configuration without requiring a redundant nonvolatile memory. In addition, when the above-described control is executed by using the write protect function provided in the memory unit 10, that is, the timing at which the write protect signal PS1 is switched from the release to the setting (Low → High), a write request is issued during the release of protection. This indicates that all data has been written (data retention by the buffer memory 15 is completed). By using this write protect signal PS1 as a trigger signal for control operation, for example, a dedicated trigger signal is generated. Therefore, the configuration (control method) can be simplified as compared with the case where control is performed.

また、バッファメモリ15に保持されたデータDT(データ0〜2)を不揮発性メモリ13に連続的に書き込むことにより、バッファメモリ15から不揮発性メモリ13へのデータDTの高速転送が可能となり、連続性のあるデータなどでもより短い時間で転送することができる。   In addition, by continuously writing the data DT (data 0 to 2) held in the buffer memory 15 to the nonvolatile memory 13, the data DT can be transferred from the buffer memory 15 to the nonvolatile memory 13 at a high speed. It is possible to transfer characteristic data in a shorter time.

さらに、メモリ制御モジュール14がバッファメモリ15から不揮発性メモリ13にデータDTを書き込んでいる最中でも、CPU12は次のデータDTを書き込むことができるため、書き込み速度が低下することはない。   Furthermore, while the memory control module 14 is writing the data DT from the buffer memory 15 to the nonvolatile memory 13, the CPU 12 can write the next data DT, so that the writing speed does not decrease.

以上、本発明の実施の形態を図面によって説明してきたが、具体的な構成は実施の形態に示したものに限られるものではなく、本発明の要旨を逸脱しない範囲における変更や追加があっても本発明に含まれる。   The embodiment of the present invention has been described with reference to the drawings. However, the specific configuration is not limited to that shown in the embodiment, and there are changes and additions within the scope of the present invention. Are also included in the present invention.

たとえば、実施の形態では、メモリユニット10が備えるバッファメモリ15をメモリ制御モジュール14の内部に設けているが、このバッファメモリ15をメモリ制御モジュール14の外部に設けるようにしてもよい。   For example, in the embodiment, the buffer memory 15 included in the memory unit 10 is provided inside the memory control module 14. However, the buffer memory 15 may be provided outside the memory control module 14.

また、電源遮断を監視しておき、CPU12からのライトプロテクト信号PS1がプロテクト解除を示している間(信号レベルLow)、もしくはライトプロテクト信号PS1が解除から設定に切り替わる(信号レベルLow⇒High)前の所定期間に電源遮断が検出されなかったことを条件に、バッファメモリ15から不揮発性メモリ13へのデータの書き込みを行うように構成されてもよい。これにより、電源遮断後の動作可能時間がバッファメモリ15から不揮発性メモリ13へのデータの書き込み途中で経過して、書き込み不能になることを確実に防止できる。なお、上記した所定期間は、バッファメモリ15から不揮発性メモリ13へのデータの書き込みに要する時間を電源遮断後の動作可能時間から減算した残り時間に基づいて設定するとよい。   Further, the power shutdown is monitored, and while the write protect signal PS1 from the CPU 12 indicates the protection release (signal level Low), or before the write protect signal PS1 switches from the release to the setting (signal level Low → High). The data may be written from the buffer memory 15 to the non-volatile memory 13 on condition that the power interruption is not detected during the predetermined period. As a result, it is possible to reliably prevent the operation possible time after power-off from being overwritten during the writing of data from the buffer memory 15 to the nonvolatile memory 13 and becoming unwritable. The predetermined period described above may be set based on the remaining time obtained by subtracting the time required for writing data from the buffer memory 15 to the nonvolatile memory 13 from the operable time after the power is turned off.

また、実施の形態では、メモリユニット10と不揮発性メモリ13とが共にライトプロテクト機能を備える場合を例に説明したが、不揮発性メモリ13のライトプロテクト機能については設けなくてもよい。不揮発性メモリ自体がライトプロテクト機能を有するか否かは、メモリの仕様によるものであり、本発明は、不揮発性メモリ自体はライトプロテクト機能を有しないが、その不揮発性メモリを備える装置自体はライトプロテクト機能を有するメモリ装置(不揮発性メモリユニット)に対しても適用可能である。   In the embodiment, the case where both the memory unit 10 and the nonvolatile memory 13 have the write protect function has been described as an example. However, the write protect function of the nonvolatile memory 13 may not be provided. Whether or not the nonvolatile memory itself has a write protection function depends on the specifications of the memory. According to the present invention, the nonvolatile memory itself does not have the write protection function, but the device including the nonvolatile memory itself does not have the write protection function. The present invention can also be applied to a memory device (nonvolatile memory unit) having a protect function.

本発明の実施の形態に係るメモリユニットを備えたデータ処理装置の主要構成を示すブロック図である。It is a block diagram which shows the main structures of the data processor provided with the memory unit which concerns on embodiment of this invention. 本発明の実施の形態に係るデータ処理装置のデータ書き込み時の動作タイミングを示すタイミングチャートである。It is a timing chart which shows the operation timing at the time of data writing of the data processor concerning an embodiment of the invention. 本発明の実施の形態に係るバッファメモリでのデータ管理例(1)を示す説明図である。It is explanatory drawing which shows the data management example (1) in the buffer memory which concerns on embodiment of this invention. 本発明の実施の形態に係るバッファメモリでのデータ管理例(2)を示す説明図である。It is explanatory drawing which shows the data management example (2) in the buffer memory which concerns on embodiment of this invention. 本発明の実施の形態に係るバッファメモリでのデータ管理例(3)を示す説明図である。It is explanatory drawing which shows the data management example (3) in the buffer memory based on embodiment of this invention.

符号の説明Explanation of symbols

10…メモリユニット
11…データ処理装置
12…CPU
13…不揮発性メモリ
14…メモリ制御モジュール
15…バッファメモリ
DT…データ
PS1…ライトプロテクト信号
PS2…ライトプロテクト信号
WS1…書き込み要求信号
WS2…書き込み要求信号
DESCRIPTION OF SYMBOLS 10 ... Memory unit 11 ... Data processing apparatus 12 ... CPU
DESCRIPTION OF SYMBOLS 13 ... Nonvolatile memory 14 ... Memory control module 15 ... Buffer memory DT ... Data PS1 ... Write-protect signal PS2 ... Write-protect signal WS1 ... Write request signal WS2 ... Write-request signal

Claims (2)

電源遮断後も電源供給を所定時間継続可能な電源部から電源供給を受けて動作するメモリ装置であって、
データが格納される不揮発性メモリと、
前記不揮発性メモリに格納されるデータを一時的に保持する揮発性のバッファメモリと、
前記不揮発性メモリおよび前記バッファメモリに対するデータの書き込みを制御する制御手段と、
を備え、
1回のプロテクト解除中の保持に割り当てるバッファメモリの容量は、保持した全てのデータを前記所定時間内に前記不揮発メモリに転送可能な容量にされており、
前記制御手段は、入力されるライトプロテクト信号がプロテクト解除を示している間に、前記不揮発性メモリに対して書き込み要求されたデータを、前記バッファメモリに書き込んで一時的に保持させ、前記ライトプロテクト信号がプロテクト設定を示すと、プロテクト解除中に電源遮断が検出されなかったことを条件に前記バッファメモリから前記データを読み出して前記不揮発性メモリに書き込む
ことを特徴とするメモリ装置。
A memory device that operates by receiving power supply from a power supply unit capable of continuing power supply for a predetermined time even after power-off,
Non-volatile memory in which data is stored;
A volatile buffer memory that temporarily holds data stored in the nonvolatile memory;
Control means for controlling the writing of data to the nonvolatile memory and the buffer memory;
With
The capacity of the buffer memory allocated for holding during one release of protection is set to a capacity capable of transferring all the held data to the nonvolatile memory within the predetermined time.
The control means writes the data requested to be written to the nonvolatile memory into the buffer memory and temporarily holds the data while the input write protect signal indicates that the protection is released, and the write protect When the signal indicates a protection setting, the data is read from the buffer memory and written to the non-volatile memory on condition that a power interruption is not detected during the protection release .
前記制御手段は、前記不揮発性メモリに前記データを連続的に書き込む
ことを特徴とする請求項1に記載のメモリ装置。
The memory device according to claim 1, wherein the control unit continuously writes the data to the nonvolatile memory.
JP2006340777A 2006-12-19 2006-12-19 Memory device Expired - Fee Related JP4978181B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006340777A JP4978181B2 (en) 2006-12-19 2006-12-19 Memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006340777A JP4978181B2 (en) 2006-12-19 2006-12-19 Memory device

Publications (2)

Publication Number Publication Date
JP2008152601A JP2008152601A (en) 2008-07-03
JP4978181B2 true JP4978181B2 (en) 2012-07-18

Family

ID=39654696

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006340777A Expired - Fee Related JP4978181B2 (en) 2006-12-19 2006-12-19 Memory device

Country Status (1)

Country Link
JP (1) JP4978181B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134856A (en) * 2008-12-08 2010-06-17 Nec Corp Nonvolatile storage medium writing circuit, nonvolatile storage medium writing method, and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05265881A (en) * 1992-03-18 1993-10-15 Fujitsu Ltd Write protecting circuit of and write protecting method for non-volatile memory
JPH11316716A (en) * 1998-05-06 1999-11-16 Nec Corp Memory control method and memory controller
JP4066991B2 (en) * 1999-02-19 2008-03-26 三菱電機株式会社 Information processing device

Also Published As

Publication number Publication date
JP2008152601A (en) 2008-07-03

Similar Documents

Publication Publication Date Title
JP3986950B2 (en) CPU, information processing apparatus having the same, and control method of CPU
JP5044387B2 (en) Information processing apparatus and stack pointer updating method thereof
JP2009211153A (en) Memory device, information processing apparatus, and electric power controlling method
JP2009129394A (en) Information processor and program execution control method
JP2006350885A (en) Semiconductor device
JP4189402B2 (en) Cache circuit
JP2004280623A (en) Security system
JP4978181B2 (en) Memory device
JPH11272828A (en) Chip card having integrated circuit
JP2010186386A (en) Processor
JP2008176608A (en) Data backup device and data backup method
JP2011150457A (en) Information processing apparatus and memory access control method
JP2010068355A (en) Electronic apparatus and method of controlling the same
JP4334312B2 (en) Start-up time reduction computing device and data loading method
JP2004258935A (en) Semiconductor device
JP2005209178A (en) Memory protection unit, memory protection method, and memory protection program
US8924672B2 (en) Device with processing unit and information storage
JP2005018650A (en) Nonvolatile semiconductor storage device and data processor
TW201324155A (en) Flash memory storage system and data protection method thereof
JP2010282499A (en) Computer system, information protection method, and program
JP3918089B2 (en) Memory protection circuit
JP2004355383A (en) Memory control circuit
JP2007188383A (en) Microcomputer
JP2006127554A (en) Information processing device and image formation device
JP2000020401A (en) Cpu device, information processor and control method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090806

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120111

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120119

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120221

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: 20120321

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: 20120403

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

Free format text: PAYMENT UNTIL: 20150427

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees