JP4978181B2 - Memory device - Google Patents
Memory device Download PDFInfo
- 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
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参照)
ユーザーデータなどのように、ある程度の大きさを持ち、含まれる個々の情報に相関(連続性)があるような一連のデータを不揮発性メモリに書き込む途中で電源が遮断され、書き込みが継続できなくなった場合、通常はデータが途中まで更新されて終了してしまう。そして、次の立ち上げ時に、一連のデータに含まれる個々の情報の相関が崩れていることで不正なデータとして扱われ、データを初期化せざるを得なくなる。しかし、重要な情報を含むユーザーデータなどは、初期化するよりも前回のデータから更新できないほうが望ましい。 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
CPU12は、演算処理機能を備えてメモリユニット10を含む装置全体の動作を制御し、メモリユニット10に対するデータの書き込みおよび読み出しでは、メモリのアドレスを指定することで特定のデータ領域にアクセスする。
The
メモリユニット10は、データ処理装置11が扱う各種データが格納される不揮発性メモリ13と、不揮発性メモリ13に対するデータの書き込みおよび読み出しを制御する(不揮発性)メモリ制御モジュール14とを備えており、更に、メモリユニット10自体に対するデータの書き込みや削除を禁止するライトプロテクト機能をも備えている。
The memory unit 10 includes a
不揮発性メモリ13は、電源がオフしても記憶内容が保持されるメモリであり、この不揮発性メモリ13には、装置固有の各種パラメータ、設定データ、ユーザーデータなど、電源オフ後も保存すべき所定のデータが記憶される。また、不揮発性メモリ13も、不揮発性メモリ13自体に対するデータの書き込みや削除を禁止するライトプロテクト機能を備えている。
The
メモリ制御モジュール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
データ処理装置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
メモリユニット10のライトプロテクト機能に関しては、CPU12がメモリユニット10にデータを書き込むときに、メモリ制御モジュール14がライトプロテクトの設定(有効)/解除(無効)を行ってデータの書き込み禁止/許可を切り替える。また、連続性のあるデータの書き込みでは、その連続データの書き込み中はメモリユニット10をプロテクト解除状態に保持し、全てのデータの書き込み完了後にプロテクト状態に戻す制御が行われる。
Regarding the write protect function of the memory unit 10, when the
詳細には、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
不揮発性メモリ13のライトプロテクト機能に関しては、メモリ制御モジュール14が不揮発性メモリ13にデータを書き込むときに、不揮発性メモリ13がライトプロテクトの設定/解除を行ってデータの書き込み禁止/許可を切り替える。また、連続性のあるデータの書き込みでは、その連続データの書き込み中は不揮発性メモリ13をプロテクト解除状態に保持し、全てのデータの書き込み完了後にプロテクト状態に戻す制御が行われる。
Regarding the write protect function of the
詳細には、メモリ制御モジュール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
次に、上記構成のメモリユニット10を含むデータ処理装置11の動作について説明する。
Next, the operation of the
図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
図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
メモリユニット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
メモリ制御モジュール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
バッファメモリ15へのデータDTの書き込みが完了すると、CPU12は、ライトプロテクト信号PS1の信号レベルをLowからHighへ切り替えて、メモリユニット10のライトプロテクトを設定(有効に)する(T5)。
When the writing of the data DT to the
メモリ制御モジュール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
不揮発性メモリ13へのデータDTの書き込みが完了すると、メモリ制御モジュール14は、ライトプロテクト信号PS2の信号レベルをLowからHighへ切り替えて、不揮発性メモリ13のライトプロテクトを設定する(T8)。
When the writing of the data DT to the
また、バッファメモリ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
この書き込み要求を受けたメモリ制御モジュール14は、書き込み要求後にCPU12から送られてきた次のデータDTをバッファメモリ15に書き込んで保持する。たとえば、上記のデータ0〜2に続くデータ3を書き込む例では、先にデータ0〜2を書き込んだ特定の領域とは別の領域にデータ3を書き込んで保持する。
Upon receiving this write request, the
このように、メモリユニット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
次に、上記の動作でメモリ制御モジュール14が行うバッファメモリ15でのデータ管理について、3種類の例を用いて説明する。
Next, data management in the
図3に示すデータ管理例(1)の場合、メモリ制御モジュール14は、バッファメモリ15へのデータ書き込みで、CPU12から送られてきたデータに、CPU12から指定された不揮発性メモリ13への書き込み先のアドレスを付与(関連付け)して保存する。
In the case of the data management example (1) shown in FIG. 3, the
たとえば、書き込みデータがデータ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
図4に示すデータ管理例(2)の場合、メモリ制御モジュール14は、バッファメモリ15へのデータ書き込みで、CPU12から送られてきたデータを、CPU12から指定された不揮発性メモリ13への書き込み先のアドレスが連続している単位にブロック化し、そのブロック毎に、ブロック内データの書き込みスタートアドレス(先頭アドレス)とサイズを含むヘッダ情報を付与して、バッファメモリ15に保存する。
In the case of the data management example (2) shown in FIG. 4, the
たとえば、書き込みデータがデータ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
図5に示すデータ管理例(3)の場合、メモリ制御モジュール14は、バッファメモリ15へのデータ書き込みで、CPU12から書き込み要求を受けたデータの不揮発性メモリ13への書き込み先のアドレスが含まれる物理ブロックを不揮発性メモリ13から読み出し、その読み出した物理ブロックにデータを書き込んで反映させ、バッファメモリ15に保存する。
In the case of the data management example (3) shown in FIG. 5, the
たとえば、書き込みデータがデータ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
このデータ管理例(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
以上説明したように、本実施形態に係るメモリユニット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
また、バッファメモリ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
また、バッファメモリ15に保持されたデータDT(データ0〜2)を不揮発性メモリ13に連続的に書き込むことにより、バッファメモリ15から不揮発性メモリ13へのデータDTの高速転送が可能となり、連続性のあるデータなどでもより短い時間で転送することができる。
In addition, by continuously writing the data DT (data 0 to 2) held in the
さらに、メモリ制御モジュール14がバッファメモリ15から不揮発性メモリ13にデータDTを書き込んでいる最中でも、CPU12は次のデータDTを書き込むことができるため、書き込み速度が低下することはない。
Furthermore, while the
以上、本発明の実施の形態を図面によって説明してきたが、具体的な構成は実施の形態に示したものに限られるものではなく、本発明の要旨を逸脱しない範囲における変更や追加があっても本発明に含まれる。 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
また、電源遮断を監視しておき、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
また、実施の形態では、メモリユニット10と不揮発性メモリ13とが共にライトプロテクト機能を備える場合を例に説明したが、不揮発性メモリ13のライトプロテクト機能については設けなくてもよい。不揮発性メモリ自体がライトプロテクト機能を有するか否かは、メモリの仕様によるものであり、本発明は、不揮発性メモリ自体はライトプロテクト機能を有しないが、その不揮発性メモリを備える装置自体はライトプロテクト機能を有するメモリ装置(不揮発性メモリユニット)に対しても適用可能である。
In the embodiment, the case where both the memory unit 10 and the
10…メモリユニット
11…データ処理装置
12…CPU
13…不揮発性メモリ
14…メモリ制御モジュール
15…バッファメモリ
DT…データ
PS1…ライトプロテクト信号
PS2…ライトプロテクト信号
WS1…書き込み要求信号
WS2…書き込み要求信号
DESCRIPTION OF SYMBOLS 10 ...
DESCRIPTION OF
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.
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)
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)
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 |
-
2006
- 2006-12-19 JP JP2006340777A patent/JP4978181B2/en not_active Expired - Fee Related
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 |