JP2910745B2 - Storage device and data processing method - Google Patents

Storage device and data processing method

Info

Publication number
JP2910745B2
JP2910745B2 JP26718097A JP26718097A JP2910745B2 JP 2910745 B2 JP2910745 B2 JP 2910745B2 JP 26718097 A JP26718097 A JP 26718097A JP 26718097 A JP26718097 A JP 26718097A JP 2910745 B2 JP2910745 B2 JP 2910745B2
Authority
JP
Japan
Prior art keywords
data
block
written
information
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
JP26718097A
Other languages
Japanese (ja)
Other versions
JPH11110142A (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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP26718097A priority Critical patent/JP2910745B2/en
Publication of JPH11110142A publication Critical patent/JPH11110142A/en
Application granted granted Critical
Publication of JP2910745B2 publication Critical patent/JP2910745B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、記憶領域が複数の
ブロックに分割されてなる記憶装置に関する。また、本
発明は、記憶領域が複数のブロックに分割されてなる記
憶装置にデータを書き込む際のデータ処理方法に関す
る。
The present invention relates to a storage device in which a storage area is divided into a plurality of blocks. The present invention also relates to a data processing method for writing data to a storage device in which a storage area is divided into a plurality of blocks.

【0002】[0002]

【従来の技術】パーソナルコンピュータやデジタルスチ
ルカメラ等のようなデータ処理装置に用いられる記憶装
置として、フラッシュメモリを備えた記憶装置がある。
2. Description of the Related Art As a storage device used for a data processing device such as a personal computer or a digital still camera, there is a storage device having a flash memory.

【0003】フラッシュメモリを備えた記憶装置は、通
常、記憶領域を複数のブロックに分割し、データ領域の
管理をブロック単位で行う。ここで、各ブロックはデー
タ消去の単位となる。すなわち、データを消去する際
は、当該データを含むブロック全体に対して初期化処理
を施す。これにより、当該ブロックに格納されているデ
ータが一括して消去され、新たなデータの書き込みが可
能となる。
[0003] A storage device provided with a flash memory usually divides a storage area into a plurality of blocks, and manages a data area in block units. Here, each block is a unit of data erasure. That is, when erasing data, an initialization process is performed on the entire block including the data. As a result, the data stored in the block is erased collectively, and writing of new data becomes possible.

【0004】また、このような記憶装置において、各ブ
ロックは複数のページによって構成される。そして、ブ
ロックへのデータの書き込みや、ブロックからのデータ
の読み出しは、ページ単位毎に行われる。
In such a storage device, each block is composed of a plurality of pages. Then, writing of data to the block and reading of data from the block are performed for each page.

【0005】[0005]

【発明が解決しようとする課題】従来、記憶領域が複数
のブロックに分割されてなる記憶装置にデータを書き込
んだときに、ブロックにデータが正常に書き込まれたか
を確認するには、ブロック内の全てのデータを読み出し
て確認するしかなかった。すなわち、従来、ブロックに
データが正常に書き込まれたか否かを確認するには、ブ
ロック内の全てのデータを読み出す必要があり、非常に
効率が悪かった。
Conventionally, when writing data to a storage device in which a storage area is divided into a plurality of blocks, it is necessary to check whether the data has been normally written to the block. All data had to be read and confirmed. That is, conventionally, it was necessary to read all data in a block in order to confirm whether data was normally written in the block, which was extremely inefficient.

【0006】本発明は、以上のような従来の実情に鑑み
て提案されたものであり、ブロックにデータが正常に書
き込まれたか否かの確認を、ブロックに書き込まれた全
データを読み出すことなく、効率良く行うことが可能な
記憶装置及びデータ処理方法を提供することを目的とし
ている。
The present invention has been proposed in view of the above-described conventional circumstances, and it is possible to confirm whether data has been normally written in a block without reading all data written in the block. It is an object of the present invention to provide a storage device and a data processing method that can be performed efficiently.

【0007】[0007]

【課題を解決するための手段】本発明に係る記憶装置
は、記憶領域が複数のブロックに分割されてなるととも
に、ブロックへのデータの書き込みを所定のページ単位
毎に行う記憶装置である。そして、ブロックにデータを
書き込む際に、当該データがブロックの全ページを満た
すほどの大きさを持たなくても、当該ブロックへの書き
込みの最後に、当該ブロックの最終ページに上記データ
の少なくとも一部及び/又は上記データ以外の情報を書
き込むことを特徴とする。
SUMMARY OF THE INVENTION A storage device according to the present invention is a storage device in which a storage area is divided into a plurality of blocks and data is written to the blocks for each predetermined page unit. When writing data to a block, even if the data is not large enough to fill all pages of the block, at least a part of the data is written to the last page of the block at the end of writing to the block. And / or writing information other than the above data.

【0008】この記憶装置では、例えば、ブロックに書
き込まれるデータが当該ブロックの最終ページにまで至
らないときには、当該ブロックへの書き込みの最後に、
当該ブロックの最終ページに上記情報だけを書き込むよ
うにし、また、ブロックに書き込まれるデータが当該ブ
ロックの最終ページにまで至るときには、当該ブロック
への書き込みの最後に、当該ブロックの最終ページに上
記データの少なくとも一部及び上記情報を書き込むよう
にする。
In this storage device, for example, when data to be written to a block does not reach the last page of the block, at the end of writing to the block,
Only the above information is written to the last page of the block, and when data to be written to the block reaches the last page of the block, the data is written to the last page of the block at the end of writing to the block. At least a part and the information are written.

【0009】なお、上記情報は、当該情報のエラーを検
出し訂正するためのエラー訂正符号を含んでいることが
好ましい。また、上記情報は、最終ページに書き込まれ
るデータのエラーを検出し訂正するためのエラー訂正符
号を含んでいることが好ましい。
Preferably, the information includes an error correction code for detecting and correcting an error in the information. Further, the information preferably includes an error correction code for detecting and correcting an error in data written to the last page.

【0010】以上のような本発明に係る記憶装置では、
ブロックへのデータ書き込みの最後に、当該ブロックの
最終ページに上記データの少なくとも一部及び/又は上
記データ以外の情報を書き込むようにしているので、ブ
ロックへのデータの書き込みが完了した後に、ブロック
の最終ページに書き込まれている内容を確認することに
より、ブロックへのデータの書き込みが正常になされた
か否かを判別することができる。
In the storage device according to the present invention as described above,
At the end of writing data to the block, at least a part of the data and / or information other than the data is written to the last page of the block. Therefore, after the writing of the data to the block is completed, By checking the content written in the last page, it can be determined whether or not the data has been correctly written to the block.

【0011】また、本発明に係るデータ処理方法は、記
憶領域が複数のブロックに分割されてなるとともに、ブ
ロックへのデータの書き込みを所定のページ単位毎に行
う記憶装置に対してデータを書き込む際に、上記データ
がブロックの全ページを満たすほどの大きさを持たなく
ても、当該ブロックへの書き込みの最後に、当該ブロッ
クの最終ページに上記データの少なくとも一部及び/又
は上記データ以外の情報を書き込むことを特徴とする。
Further, according to the data processing method of the present invention, a storage area is divided into a plurality of blocks, and data is written to a storage device that writes data to a block for each predetermined page unit. Even if the data is not large enough to fill all the pages of the block, at the end of writing to the block, at least a part of the data and / or information other than the data is stored in the last page of the block. Is written.

【0012】このデータ処理方法では、例えば、ブロッ
クに書き込まれるデータが当該ブロックの最終ページに
まで至らないときには、当該ブロックへの書き込みの最
後に、当該ブロックの最終ページに上記情報だけを書き
込むようにし、また、ブロックに書き込まれるデータが
当該ブロックの最終ページにまで至るときには、当該ブ
ロックへの書き込みの最後に、当該ブロックの最終ペー
ジに上記データの少なくとも一部及び上記情報を書き込
むようにする。
In this data processing method, for example, when data to be written to a block does not reach the last page of the block, at the end of writing to the block, only the above information is written to the last page of the block. When data to be written to a block reaches the last page of the block, at least a part of the data and the information are written to the last page of the block at the end of writing to the block.

【0013】なお、上記情報は、当該情報のエラーを検
出し訂正するためのエラー訂正符号を含んでいることが
好ましい。また、上記情報は、最終ページに書き込まれ
るデータのエラーを検出し訂正するためのエラー訂正符
号を含んでいることが好ましい。
Preferably, the information includes an error correction code for detecting and correcting an error in the information. Further, the information preferably includes an error correction code for detecting and correcting an error in data written to the last page.

【0014】以上のような本発明に係るデータ処理方法
では、ブロックへのデータ書き込みの最後に、当該ブロ
ックの最終ページに上記データの少なくとも一部及び/
又は上記データ以外の情報を書き込むようにしているの
で、ブロックへのデータの書き込みが完了した後に、ブ
ロックの最終ページに書き込まれている内容を確認する
ことにより、ブロックへのデータの書き込みが正常にな
されたか否かを判別することができる。
In the data processing method according to the present invention described above, at the end of writing data to a block, at least a part of the data and / or
Alternatively, since information other than the above data is written, after the writing of data to the block is completed, by confirming the content written to the last page of the block, the writing of data to the block can be performed normally. It can be determined whether or not this has been done.

【0015】[0015]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図面を参照しながら詳細に説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings.

【0016】1.システムの全体構成 本発明が適用されるシステムの一例について、その全体
構成を図1に示す。このシステムは、ホスト側システム
となるデータ処理装置1と、シリアルインターフェース
を介してデータ処理装置1に接続される記憶装置である
メモリカード2とから構成される。
[0016] 1. Overall Configuration of System FIG. 1 shows the overall configuration of an example of a system to which the present invention is applied. This system includes a data processing device 1 serving as a host-side system, and a memory card 2 serving as a storage device connected to the data processing device 1 via a serial interface.

【0017】なお、ここでは、データ処理装置1とメモ
リカード2との間でのデータのやり取りをシリアルイン
ターフェースによって行うシステムを例に挙げるが、本
発明は、データのやり取りをパラレルインターフェース
によって行うシステムに対しても適用可能である。
Here, a system for exchanging data between the data processing device 1 and the memory card 2 by a serial interface will be described as an example, but the present invention relates to a system for exchanging data by a parallel interface. It is also applicable.

【0018】データ処理装置1は、演算処理装置(CP
U)3と、内部メモリ4と、補助記憶装置5と、シリア
ルインターフェース回路6とを備え、これらがバス7に
よって相互に接続されてなる。このデータ処理装置1
は、例えば、補助記憶装置5に格納されているプログラ
ムを読み出して、当該プログラムを、内部メモリ4をワ
ークエリアとして使用して、CPU3により実行する。
このとき、必要に応じて、シリアルインターフェース回
路6を介してメモリカード2との間でデータのやり取り
を行う。
The data processing device 1 includes an arithmetic processing device (CP
U) 3, an internal memory 4, an auxiliary storage device 5, and a serial interface circuit 6, which are interconnected by a bus 7. This data processing device 1
For example, the CPU 3 reads a program stored in the auxiliary storage device 5 and executes the program by using the internal memory 4 as a work area.
At this time, data is exchanged with the memory card 2 via the serial interface circuit 6 as necessary.

【0019】なお、本発明が適用されるシステムに使用
されるデータ処理装置1は、記憶装置との間でデータの
やり取りが可能なものであるならば特に限定されるもの
ではなく、本発明は、パーソナルコンピュータ、デジタ
ルスチルカメラ、デジタルビデオカメラ等、種々のデー
タ処理装置に適用可能である。
The data processing device 1 used in the system to which the present invention is applied is not particularly limited as long as it can exchange data with a storage device. The present invention can be applied to various data processing devices such as a personal computer, a digital still camera, and a digital video camera.

【0020】データ処理装置1とメモリカード2とは、
シリアルインターフェースによって接続されており、具
体的には、少なくとも3本のデータ線SCLK,Sta
te,DIOによって接続される。すなわち、データ処
理装置1とメモリカード2とは、少なくとも、データ伝
送時にクロック信号を伝送する第1のデータ線SCLK
と、データ伝送時に必要なステータス信号を伝送する第
2のデータ線Stateと、メモリカード2に書き込む
データ又はメモリカード2から読み出すデータ等をシリ
アルに伝送する第3のデータ線DIOとによって接続さ
れ、これらを介して、データ処理装置1とメモリカード
2との間でのデータのやり取りを行う。
The data processing device 1 and the memory card 2
They are connected by a serial interface. Specifically, at least three data lines SCLK and Sta
te, DIO. That is, the data processing device 1 and the memory card 2 are connected to at least the first data line SCLK for transmitting a clock signal during data transmission.
And a second data line State for transmitting a status signal required for data transmission, and a third data line DIO for serially transmitting data to be written to the memory card 2 or data to be read from the memory card 2, Through these, data is exchanged between the data processing device 1 and the memory card 2.

【0021】データ処理装置1とメモリカード2との間
でのデータのやり取りは、通常、ヘッダーと実データと
から構成されるファイル単位で行われる。なお、ファイ
ルのヘッダーには、例えば、ファイルにアクセスするた
めの情報や、データ処理装置1で実行されるプログラム
で必要とされる情報等が格納される。
The exchange of data between the data processing device 1 and the memory card 2 is usually performed on a file basis consisting of a header and actual data. In the header of the file, for example, information for accessing the file, information required by a program executed by the data processing device 1, and the like are stored.

【0022】2.メモリカードの構成 メモリカード2は、図2に示すように、いわゆるコント
ロールICからなるコントローラ11と、コントローラ
11によって管理されるフラッシュメモリ12とを備え
ている。
2. 2. Configuration of Memory Card As shown in FIG. 2, the memory card 2 includes a controller 11 composed of a so-called control IC and a flash memory 12 managed by the controller 11.

【0023】コントローラ11は、シリアル/パラレル
変換やパラレル/シリアル変換等を行うシリアル/パラ
レル・パラレル/シリアル・インターフェース・シーケ
ンサ13(以下、S/P&P/S・インターフェース・
シーケンサ13と称する。)と、フラッシュメモリ12
へのインターフェースを司るフラッシュメモリ・インタ
ーフェース・シーケンサ14と、S/P&P/S・イン
ターフェース・シーケンサ13とフラッシュメモリ・イ
ンターフェース・シーケンサ14との間でやり取りされ
るデータを一時的に記憶するページバッファ15と、エ
ラー訂正の処理を行うエラー訂正回路16と、フラッシ
ュメモリ12へのアクセスを制御する制御コマンドの生
成等を行うコマンドジェネレータ17と、このメモリカ
ード2のバージョン情報や各種属性情報等が格納されて
いるコンフィグレーションROM18と、各回路に対し
てそれらの動作に必要なクロック信号を供給する発振器
19とを備えている。
The controller 11 includes a serial / parallel / parallel / serial interface sequencer 13 (hereinafter referred to as an S / P & P / S interface) for performing a serial / parallel conversion or a parallel / serial conversion.
Called sequencer 13. ) And the flash memory 12
And a page buffer 15 for temporarily storing data exchanged between the S / P & P / S interface sequencer 13 and the flash memory interface sequencer 14. An error correction circuit 16 for performing error correction processing, a command generator 17 for generating a control command for controlling access to the flash memory 12, etc., and version information and various attribute information of the memory card 2 are stored. A configuration ROM 18 and an oscillator 19 for supplying a clock signal necessary for the operation of each circuit.

【0024】S/P&P/S・インターフェース・シー
ケンサ13は、少なくとも上述した3本のデータ線SC
LK,State,DIOを介して、データ処理装置1
のシリアルインターフェース回路6に接続され、これら
のデータ線SCLK,State,DIOを介して、デ
ータ処理装置1との間でデータのやり取りを行う。すな
わち、S/P&P/S・インターフェース・シーケンサ
13は、ページバッファ15から送られてきたパラレル
データをシリアルデータに変換して、データ処理装置1
のシリアルインターフェース回路6へ送出する。また、
S/P&P/S・インターフェース・シーケンサ13
は、データ処理装置1のシリアルインターフェース回路
6から送られてきたシリアルデータをパラレルデータに
変換して、ページバッファ15へ送出する。
The S / P & P / S interface sequencer 13 has at least the three data lines SC described above.
Data processing device 1 via LK, State, DIO
, And exchanges data with the data processing device 1 via these data lines SCLK, State, and DIO. That is, the S / P & P / S interface sequencer 13 converts the parallel data sent from the page buffer 15 into serial data, and
To the serial interface circuit 6. Also,
S / P & P / S interface sequencer 13
Converts the serial data sent from the serial interface circuit 6 of the data processing device 1 into parallel data and sends it to the page buffer 15.

【0025】このS/P&P/S・インターフェース・
シーケンサ13とデータ処理装置1との間でのシリアル
データの伝送は、第1のデータ線SCLKによってデー
タ処理装置1から送られてくるクロック信号によって同
期を取りながら、第3のデータ線DIOによって行われ
る。このとき、第3のデータ線DIOによってやり取り
されるシリアルデータのデータ種別は、第2のデータ線
Stateによって伝送されるステータス信号によって
判別される。ここで、シリアルデータの種別には、例え
ば、フラッシュメモリ12に書き込むべきデータ、フラ
ッシュメモリ12から読み出されたデータ、又はこのメ
モリカード2の動作を制御するための制御データ等があ
る。なお、ステータス信号は、メモリカード2の状態を
示すためにも使用される。ステータス信号によって示さ
れるメモリカード2の状態には、例えば、メモリカード
2が何らかの処理の最中でデータ処理装置1からのデー
タ入力を受け付けない状態や、メモリカード2の側での
処理が終了してデータ処理装置1からのデータ入力を待
っている状態等がある。
This S / P & P / S interface
Transmission of serial data between the sequencer 13 and the data processing device 1 is performed by the third data line DIO while synchronizing with the clock signal sent from the data processing device 1 by the first data line SCLK. Will be At this time, the data type of the serial data exchanged by the third data line DIO is determined by the status signal transmitted by the second data line State. Here, the types of serial data include, for example, data to be written to the flash memory 12, data read from the flash memory 12, control data for controlling the operation of the memory card 2, and the like. Note that the status signal is also used to indicate the state of the memory card 2. The state of the memory card 2 indicated by the status signal includes, for example, a state in which the memory card 2 is not accepting data input from the data processing device 1 during some processing, or a state in which the processing on the memory card 2 is completed. Waiting for data input from the data processing apparatus 1.

【0026】また、S/P&P/S・インターフェース
・シーケンサ13は、データ処理装置1から送られてき
たデータがメモリカード2の動作を制御するための制御
データである場合には、当該制御データをコマンドジェ
ネレータ17に送出する。
When the data sent from the data processing device 1 is control data for controlling the operation of the memory card 2, the S / P & P / S interface sequencer 13 transmits the control data The command is sent to the command generator 17.

【0027】コマンドジェネレータ17は、データ処理
装置1からS/P&P/S・インターフェース・シーケ
ンサ13を介して送られてきた制御データに基づいて、
フラッシュメモリ12へのアクセスを制御する制御コマ
ンドを生成し、当該制御コマンドをフラッシュメモリ・
インターフェース・シーケンサ14へ送出する。フラッ
シュメモリ・インターフェース・シーケンサ14は、後
述するように、この制御コマンドに基づいて、フラッシ
ュメモリ12にデータを書き込んだり、フラッシュメモ
リ12からデータを読み出したりする。
The command generator 17 is based on control data sent from the data processing device 1 via the S / P & P / S interface sequencer 13.
A control command for controlling access to the flash memory 12 is generated.
Send it to the interface sequencer 14. The flash memory interface sequencer 14 writes data to the flash memory 12 and reads data from the flash memory 12 based on the control command, as described later.

【0028】なお、このコマンドジェネレータ17に
は、誤消去防止スイッチ20が接続されている。そし
て、この誤消去防止スイッチ20がオンになっていると
きには、フラッシュメモリ12に書かれているデータを
消去するように指示する制御データがデータ処理装置1
から送られてきたとしても、コマンドジェネレータ17
は、フラッシュメモリ12に書かれているデータを消去
するような制御コマンドを生成しない。すなわち、この
メモリカード2は、誤消去防止スイッチ20によって、
フラッシュメモリ12に保存されているデータの消去が
行えない状態と、フラッシュメモリ12に保存されてい
るデータの消去が行える状態とを切り換えることが可能
となっている。
An erroneous erasure prevention switch 20 is connected to the command generator 17. When the erroneous erasure prevention switch 20 is turned on, control data instructing to erase data written in the flash memory 12 is transmitted to the data processing device 1.
Command generator 17
Does not generate a control command for erasing data written in the flash memory 12. In other words, this memory card 2 is
It is possible to switch between a state in which data stored in the flash memory 12 cannot be erased and a state in which data stored in the flash memory 12 can be erased.

【0029】S/P&P/S・インターフェース・シー
ケンサ13とフラッシュメモリ・インターフェース・シ
ーケンサ14との間に配されたページバッファ15は、
いわゆるバッファメモリであり、S/P&P/S・イン
ターフェース・シーケンサ13とフラッシュメモリ・イ
ンターフェース・シーケンサ14との間でやり取りされ
るデータを一時的に記憶する。
The page buffer 15 arranged between the S / P & P / S interface sequencer 13 and the flash memory interface sequencer 14
This is a so-called buffer memory, which temporarily stores data exchanged between the S / P & P / S interface sequencer 13 and the flash memory interface sequencer 14.

【0030】すなわち、S/P&P/S・インターフェ
ース・シーケンサ13からフラッシュメモリ・インター
フェース・シーケンサ14へ送られるデータは、先ず、
S/P&P/S・インターフェース・シーケンサ13か
らページバッファ15に送られて、このページバッファ
15によって一時的に記憶される。このとき、ページバ
ッファ15に記憶されたデータは、エラー訂正回路16
によってエラー訂正符号が付けられる。そして、エラー
訂正符号が付けられたデータは、ページバッファ15か
ら所定のページ単位毎(例えば1ページ=512バイト
とされる。)に、フラッシュメモリ・インターフェース
・シーケンサ14へと送られる。
That is, data sent from the S / P & P / S interface sequencer 13 to the flash memory interface sequencer 14 first
The data is sent from the S / P & P / S interface sequencer 13 to the page buffer 15 and is temporarily stored by the page buffer 15. At this time, the data stored in the page buffer 15 is transferred to the error correction circuit 16.
To add an error correction code. The data with the error correction code is sent from the page buffer 15 to the flash memory interface sequencer 14 for each predetermined page unit (for example, one page = 512 bytes).

【0031】或いは、フラッシュメモリ・インターフェ
ース・シーケンサ14からS/P&P/S・インターフ
ェース・シーケンサ13へ送られるデータは、先ず、フ
ラッシュメモリ・インターフェース・シーケンサ14か
らページバッファ15に送られて、このページバッファ
15によって一時的に記憶される。このとき、ページバ
ッファ15に記憶されたデータは、エラー訂正回路16
によってエラー訂正処理が施される。そして、エラー訂
正処理が施されたデータは、ページバッファ15から所
定のページ単位毎に、S/P&P/S・インターフェー
ス・シーケンサ13へと送られる。
Alternatively, data sent from the flash memory interface sequencer 14 to the S / P & P / S interface sequencer 13 is first sent from the flash memory interface sequencer 14 to the page buffer 15, 15 temporarily stored. At this time, the data stored in the page buffer 15 is transferred to the error correction circuit 16.
Performs an error correction process. The data subjected to the error correction processing is sent from the page buffer 15 to the S / P & P / S interface sequencer 13 for each predetermined page unit.

【0032】フラッシュメモリ・インターフェース・シ
ーケンサ14は、コマンドジェネレータ17からの制御
コマンドに基づいて、フラッシュメモリ12へのデータ
の書き込みや、フラッシュメモリ12からのデータの読
み出し等を行う。すなわち、フラッシュメモリ・インタ
ーフェース・シーケンサ14は、コマンドジェネレータ
17からの制御コマンドに基づいて、フラッシュメモリ
12からデータを読み出して、当該データを上述のよう
にページバッファ15を介して、S/P&P/S・イン
ターフェース・シーケンサ13へと送出する。或いは、
フラッシュメモリ・インターフェース・シーケンサ14
は、コマンドジェネレータ17からの制御コマンドに基
づいて、S/P&P/S・インターフェース・シーケン
サ13からのデータを、上述のようにページバッファ1
5を介して受け取り、当該データをフラッシュメモリ1
2に書き込む。
The flash memory interface sequencer 14 writes data to the flash memory 12 and reads data from the flash memory 12 based on a control command from the command generator 17. That is, the flash memory interface sequencer 14 reads data from the flash memory 12 based on a control command from the command generator 17, and transfers the data to the S / P & P / S via the page buffer 15 as described above.・ Send to the interface sequencer 13. Or,
Flash memory interface sequencer 14
Transmits the data from the S / P & P / S interface sequencer 13 based on the control command from the command generator 17 to the page buffer 1 as described above.
5 and the data is stored in the flash memory 1
Write to 2.

【0033】コンフィグレーションROM18には、こ
のメモリカード2のバージョン情報や各種属性情報等が
格納されている。コンフィグレーションROM18に格
納された情報は、必要に応じて、S/P&P/S・イン
ターフェース・シーケンサ13を介してコマンドジェネ
レータ17によって読み出されて使用される。すなわ
ち、コマンドジェネレータ17は、必要に応じて、コン
フィグレーションROM18に格納されている情報を読
み出し、この情報に基づいてメモリカード2に関する各
種設定を行う。
The configuration ROM 18 stores version information of the memory card 2, various attribute information, and the like. The information stored in the configuration ROM 18 is read and used by the command generator 17 via the S / P & P / S interface sequencer 13 as needed. That is, the command generator 17 reads information stored in the configuration ROM 18 as necessary, and performs various settings relating to the memory card 2 based on the information.

【0034】以上のようなメモリカード2に対して、フ
ラッシュメモリ12に書き込まれるデータが、上述した
3本のデータ線SCLK,State,DIOを介し
て、データ処理装置1からシリアルデータとして送られ
てくると、先ず、S/P&P/S・インターフェース・
シーケンサ13は、当該シリアルデータをパラレルデー
タに変換し、当該パラレルデータをページバッファ15
へ送出する。ページバッファ15は、S/P&P/S・
インターフェース・シーケンサ13から送られてきたデ
ータを一時的に記憶する。このとき、ページバッファ1
5に記憶されたデータには、エラー訂正回路16によっ
てエラー訂正符号が付けられる。そして、エラー訂正符
号が付けられたデータは、所定のページ単位毎にフラッ
シュメモリ・インターフェース・シーケンサ14に送出
される。そして、フラッシュメモリ・インターフェース
・シーケンサ14は、ページバッファ15から送られて
きたデータを、コマンドジェネレータ17からの制御コ
マンドに基づいて、フラッシュメモリ12に書き込む。
以上の処理により、データ処理装置1から送られてきた
データが、フラッシュメモリ12に書き込まれる。
The data to be written to the flash memory 12 is sent to the memory card 2 as serial data from the data processor 1 via the three data lines SCLK, State, and DIO described above. First, S / P & P / S interface
The sequencer 13 converts the serial data into parallel data, and converts the parallel data into a page buffer 15.
Send to The page buffer 15 is S / P & P / S.
The data sent from the interface sequencer 13 is temporarily stored. At this time, page buffer 1
The data stored in 5 is subjected to an error correction code by an error correction circuit 16. Then, the data with the error correction code is sent to the flash memory interface sequencer 14 for each predetermined page unit. Then, the flash memory interface sequencer 14 writes the data sent from the page buffer 15 to the flash memory 12 based on a control command from the command generator 17.
By the above processing, the data sent from the data processing device 1 is written to the flash memory 12.

【0035】また、以上のようなメモリカード2からデ
ータを読み出す際は、先ず、コマンドジェネレータ17
からの制御コマンドに基づいて、フラッシュメモリ・イ
ンターフェース・シーケンサ14によって、フラッシュ
メモリ12からデータが読み出される。そして、フラッ
シュメモリ・インターフェース・シーケンサ14は、フ
ラッシュメモリ12から読み出したデータをページバッ
ファ15に送出する。ページバッファ15は、フラッシ
ュメモリ・インターフェース・シーケンサ14から送ら
れてきたデータを一時的に記憶する。このとき、ページ
バッファ15に記憶されたデータには、エラー訂正回路
16によってエラー訂正処理が施される。そして、エラ
ー訂正処理が施されたデータは、所定のページ単位毎に
S/P&P/S・インターフェース・シーケンサ13に
送出される。そして、S/P&P/S・インターフェー
ス・シーケンサ13は、ページバッファ15から送られ
てきたデータを、シリアルデータに変換した上で、上述
した3本のデータ線SCLK,State,DIOを介
して、データ処理装置1へと送出する。以上の処理によ
り、フラッシュメモリ12から読み出されたデータが、
データ処理装置1へと送出される。
When reading data from the memory card 2 as described above, first, the command generator 17
, Data is read from the flash memory 12 by the flash memory interface sequencer 14. Then, the flash memory interface sequencer 14 sends the data read from the flash memory 12 to the page buffer 15. The page buffer 15 temporarily stores data sent from the flash memory interface sequencer 14. At this time, the data stored in the page buffer 15 is subjected to error correction processing by the error correction circuit 16. The data subjected to the error correction processing is sent to the S / P & P / S interface sequencer 13 for each predetermined page unit. Then, the S / P & P / S interface sequencer 13 converts the data sent from the page buffer 15 into serial data, and then converts the data through the three data lines SCLK, State, and DIO described above. It is sent to the processing device 1. By the above processing, the data read from the flash memory 12 is
The data is sent to the data processing device 1.

【0036】なお、データの書き込みや読み出しを行う
際は、フラッシュメモリ12に書き込まれるデータやフ
ラッシュメモリ12から読み出されたデータのやり取り
が行われるだけでなく、そのやり取りを制御するための
制御データも、データ処理装置1からメモリカード2の
S/P&P/S・インターフェース・シーケンサ13へ
送られる。この制御データは、S/P&P/S・インタ
ーフェース・シーケンサ13からコマンドジェネレータ
17に送られる。そして、コマンドジェネレータ17
は、S/P&P/S・インターフェース・シーケンサ1
3から送られてきた制御データに基づいて、フラッシュ
メモリ12へのアクセスを制御する制御コマンドを生成
する。そして、この制御コマンドは、フラッシュメモリ
・インターフェース・シーケンサ14に送られ、フラッ
シュメモリ・インターフェース・シーケンサ14は、こ
の制御コマンドに基づいてフラッシュメモリ12にアク
セスして、データの書き込みやデータの読み出しを行
う。
When writing or reading data, not only is data exchanged with the flash memory 12 and data read from the flash memory 12 performed, but also control data for controlling the exchange is performed. Is sent from the data processing device 1 to the S / P & P / S interface sequencer 13 of the memory card 2. This control data is sent from the S / P & P / S interface sequencer 13 to the command generator 17. And the command generator 17
Is the S / P & P / S interface sequencer 1
3 to generate a control command for controlling access to the flash memory 12. Then, the control command is sent to the flash memory interface sequencer 14, and the flash memory interface sequencer 14 accesses the flash memory 12 based on the control command to perform data writing and data reading. .

【0037】なお、メモリカード2は、上述した3本の
データ線SCLK,State,DIOを備えるだけで
なく、その他に、電圧供給用の配線や、通常は使用しな
いリザーブの配線等を備えていてもよい。例えば、図2
並びに後掲する図3では、上述した3本のデータ線SC
LK,State,DIOの他に、4本の電源用の配線
VSS1,VSS2,VCC,INTと、3本のリザー
ブの配線RSV1,RSV2,RSV3とをメモリカー
ド2に設けた例を挙げている。
The memory card 2 has not only the three data lines SCLK, State, and DIO described above, but also a voltage supply wiring and a reserve wiring that is not normally used. Is also good. For example, FIG.
In FIG. 3 described later, the three data lines SC described above are used.
In addition to LK, State, and DIO, the memory card 2 is provided with four power supply wirings VSS1, VSS2, VCC, and INT and three reserve wirings RSV1, RSV2, and RSV3.

【0038】3.メモリカードの外観 つぎに、以上のようなメモリカード2の具体的な外形に
ついて、図3を参照して説明する。
[0038] 3. Appearance of the memory card Next, a specific profile of the memory card 2 as described above will be described with reference to FIG.

【0039】メモリカード2は、合成樹脂等からなり平
面形状が長方形とされる薄肉のカード状のケース21
に、上述したコントローラ11やフラッシュメモリ12
等が内蔵されてなる。そして、このメモリカード2は、
当該メモリカード2を装着する装着機構を備えたデータ
処理装置1に装着されて使用される。
The memory card 2 is a thin card-shaped case 21 made of synthetic resin or the like and having a rectangular planar shape.
The controller 11 and the flash memory 12
Etc. are built-in. And this memory card 2
The memory card 2 is used by being mounted on the data processing apparatus 1 having a mounting mechanism for mounting the memory card 2.

【0040】このメモリカード2のケース21の前端部
には、斜めに切り欠かれた切り欠き部22が形成されて
おり、更に当該切り欠き部22が形成された部分に、1
0個の凹状部23が形成されている。そして、これらの
凹状部23の内部には、メモリカード2がデータ処理装
置1の装着装置に装着されたときに、データ処理装置1
の接続端子に接続される外部接続用端子が、それぞれ配
されている。すなわち、このメモリカード2は、外部接
続用端子として10本の端子24a,24b,24c,
24d,24e,24f,24g,24h,24i,2
4jを備えている。これらの外部接続用端子の内訳は、
3本のデータ線用の端子24b,24d,24h、4本
の電源用端子24a,24f,24i,24j、及び3
本のリザーブ端子24c,24e,24gである。
At the front end of the case 21 of the memory card 2, there is formed a notch 22 which is notched obliquely.
Zero concave portions 23 are formed. When the memory card 2 is mounted on the mounting device of the data processing device 1, the data processing device 1
The external connection terminals connected to the connection terminals are arranged. That is, this memory card 2 has ten terminals 24a, 24b, 24c,
24d, 24e, 24f, 24g, 24h, 24i, 2
4j. The breakdown of these external connection terminals is
Three data line terminals 24b, 24d, 24h, four power supply terminals 24a, 24f, 24i, 24j, and 3
These are the reserve terminals 24c, 24e and 24g of the book.

【0041】また、このメモリカード2のケース21の
上面には、誤消去防止部材25が取り付けられている。
誤消去防止部材25は、ケース21の内部に収納された
上記誤消去防止スイッチ20に係合されており、この誤
消去防止部材25をスライド操作することにより、誤消
去防止スイッチ20のオン/オフの切り換えを行えるよ
うになっている。
An erroneous erasure prevention member 25 is attached to the upper surface of the case 21 of the memory card 2.
The erroneous erasure prevention member 25 is engaged with the erroneous erasure prevention switch 20 housed inside the case 21, and by sliding the erroneous erasure prevention member 25, the on / off of the erroneous erasure prevention switch 20 is performed. Can be switched.

【0042】このメモリカード2には、データ処理装置
1の装着装置に装着された際にメモリカード2がデータ
処理装置1から脱落しないようにするため、ケース20
の側面の一方に円弧状の第1のロック用切欠部26が形
成され、ケース20の側面の他方に矩形状の第2のロッ
ク用切欠部27が形成されている。そして、このメモリ
カード2がデータ処理装置1の装着装置に装着される
と、メモリカード2が脱落しないように、これらのロッ
ク用切欠部26,27が、データ処理装置1の装着装置
に係合される。
The memory card 2 has a case 20 to prevent the memory card 2 from dropping out of the data processing device 1 when the memory card 2 is mounted on the mounting device of the data processing device 1.
An arc-shaped first lock notch 26 is formed on one of the side surfaces of the case 20, and a rectangular second lock notch 27 is formed on the other side of the case 20. When the memory card 2 is mounted on the mounting device of the data processing device 1, the locking notches 26 and 27 are engaged with the mounting device of the data processing device 1 so that the memory card 2 does not fall off. Is done.

【0043】なお、図3に示したメモリカード2は、本
発明が適用される記憶装置の一例に過ぎない。すなわ
ち、本発明は、記憶装置の外形に依存することなく、ど
んな外形の記憶装置にも適用可能である。
The memory card 2 shown in FIG. 3 is merely an example of a storage device to which the present invention is applied. That is, the present invention can be applied to a storage device having any shape without depending on the shape of the storage device.

【0044】4.記憶領域の構造 つぎに、以上のようなメモリカード2に搭載されるフラ
ッシュメモリ12の記憶領域の構造について説明する。
4. Next, the structure of the storage area of the flash memory 12 mounted on the memory card 2 as described above will be described.

【0045】このフラッシュメモリ12の記憶領域は、
図4(a)に示すように、データ消去の単位となる複数
のブロックに分割されてなる。なお、これらのブロック
には、このメモリカード2が起動されたときにデータ処
理装置1によって最初に読み込まれるデータであるブー
トデータが格納されるブートブロックと、任意のデータ
が書き込まれるデータブロックとがある。各ブロックに
は、それぞれ固有の物理アドレスが付けられている。こ
れらのブロックは、データ消去の単位であると同時に、
ファイル管理上の最小単位でもある。すなわち、ファイ
ルは1つ又は複数のブロックに格納され、1つのブロッ
クを複数のファイルで利用することはできない。
The storage area of the flash memory 12 is
As shown in FIG. 4A, the data is divided into a plurality of blocks which are data erasing units. Note that these blocks include a boot block in which boot data, which is data read first by the data processing device 1 when the memory card 2 is started, is stored, and a data block in which arbitrary data is written. is there. Each block has a unique physical address. These blocks are the unit of data erasure,
It is also the minimum unit for file management. That is, a file is stored in one or more blocks, and one block cannot be used in a plurality of files.

【0046】そして、各ブロックは、「1」又は「0」
を示す2つの状態を取りうる複数のビットからなり、初
期状態では、全てのビットが「1」とされており、ビッ
ト単位での変更は「1」から「0」へだけが可能となっ
ている。すなわち、「1」及び「0」からなるデータを
書き込む際、「1」については該当するビットをそのま
ま保持し、「0」については該当するビットを「1」か
ら「0」に変更する。
Each block is "1" or "0".
, And in the initial state, all bits are set to “1”, and a change in bit units can be made only from “1” to “0”. I have. That is, when writing data consisting of “1” and “0”, the corresponding bit is held as it is for “1”, and the corresponding bit is changed from “1” to “0” for “0”.

【0047】そして、一度書き込んだデータを消去する
際は、ブロック単位で一括して初期化処理を行い、当該
ブロックの全ビットを「1」とする。これにより、当該
ブロックに書き込まれたデータが一括して消去され、そ
のブロックは再びデータの書き込みが可能な状態とな
る。なお、「0」から「1」への変更を行うには、ブロ
ック単位で一括して初期化処理を行い、当該ブロックの
全ビットを「1」にする必要があるが、「1」から
「0」への変更は、ブロック単位で一括して初期化処理
を行わなくて可能である。
When data once written is erased, initialization processing is performed collectively for each block, and all bits of the block are set to "1". As a result, the data written in the block is collectively erased, and the block becomes ready for data writing again. To change from “0” to “1”, it is necessary to perform initialization processing collectively for each block and set all bits of the block to “1”. The change to "0" is possible without performing the initialization process collectively in block units.

【0048】なお、本発明は、上述のように各ビットが
2つの状態だけを取りうるフラッシュメモリ(いわゆる
2値型のフラッシュメモリ)だけでなく、各ビットが3
つ以上の状態を取りうるフラッシュメモリ(いわゆる多
値型のフラッシュメモリ)にも適用可能である。
It is to be noted that the present invention is not limited to a flash memory in which each bit can take only two states as described above (a so-called binary flash memory).
The present invention is also applicable to a flash memory that can take one or more states (a so-called multi-level flash memory).

【0049】上記フラッシュメモリ12の各ブロック
は、図4(b)に示すように、データの書き込みや読み
出しの単位となる複数のページから構成される。すなわ
ち、このフラッシュメモリ12にデータを書き込む際
は、上述したように、ページ単位にてページバッファ1
5から送られてきたデータが、フラッシュメモリ・イン
ターフェース・シーケンサ14によってページ単位にて
フラッシュメモリ12に書き込まれる。また、このフラ
ッシュメモリ12からデータを読み出す際は、フラッシ
ュメモリ・インターフェース・シーケンサ14によって
ページ単位毎にデータが読み出されて、ページバッファ
15へと送られる。
As shown in FIG. 4B, each block of the flash memory 12 is composed of a plurality of pages serving as a unit for writing and reading data. That is, when writing data to the flash memory 12, as described above, the page buffer 1
5 is written to the flash memory 12 by the flash memory interface sequencer 14 in page units. When data is read from the flash memory 12, the data is read for each page by the flash memory interface sequencer 14 and sent to the page buffer 15.

【0050】各ページは、データエリアと、冗長エリア
とを有している。データエリアは、任意のデータが書き
込まれる領域である。冗長エリアは、データエリアに書
き込まれるデータの管理に必要な情報が格納される領域
である。
Each page has a data area and a redundant area. The data area is an area where arbitrary data is written. The redundant area is an area in which information necessary for managing data written in the data area is stored.

【0051】具体的には、図4(c)に示すように、ブ
ロックの先頭ページの冗長エリアには、当該ブロックを
管理するために必要な情報として、いわゆる分散管理情
報が格納される。また、ブロックの2ページ目以降の各
ページの冗長エリアにも、予備の分散管理情報として、
先頭ページの冗長エリアに格納された分散管理情報と同
じものが格納される。ただし、最終ページの冗長エリア
には、分散管理情報ではなく、分散管理情報だけでは管
理しきれない追加情報として、いわゆる追加管理情報が
格納される。
Specifically, as shown in FIG. 4C, so-called distributed management information is stored in the redundant area of the first page of a block as information necessary for managing the block. In addition, the redundant area of each page after the second page of the block is also provided as spare distributed management information.
The same distributed management information stored in the redundant area of the first page is stored. However, in the redundant area of the last page, not so-called distributed management information, but so-called additional management information is stored as additional information that cannot be managed only by the distributed management information.

【0052】このように、このフラッシュメモリ12で
は、各ブロック内の冗長エリアに分散管理情報が格納さ
れる。分散管理情報は、当該分散管理情報が格納された
ブロックを管理するための情報である。この分散管理情
報により、例えば、当該ブロックがファイルの先頭とな
るブロックであるか否かについての情報や、複数のブロ
ックからファイルが構成される場合にはそれらのブロッ
クの繋がりを示す情報等を得ることができる。なお、こ
の分散管理情報については、後で詳細に説明する。
As described above, in the flash memory 12, the distribution management information is stored in the redundant area in each block. The distribution management information is information for managing a block in which the distribution management information is stored. From the distributed management information, for example, information as to whether or not the block is the first block of the file, or information indicating the connection of the blocks when the file is composed of a plurality of blocks is obtained. be able to. The distribution management information will be described later in detail.

【0053】そして、このメモリカード2では、各ブロ
ックの分散管理情報を集めることにより、フラッシュメ
モリ全体を管理するための情報として、いわゆる集合管
理情報を作成して、この集合管理情報をファイルとして
フラッシュメモリ12に格納しておくようにする。
The memory card 2 collects distributed management information of each block to create so-called collective management information as information for managing the entire flash memory, and flashes the collective management information as a file. It is stored in the memory 12.

【0054】そして、通常は、集合管理情報によって、
各ブロックにアクセスするために必要な情報を得るよう
にする。すなわち、データ処理装置1とメモリカード2
との間でデータのやり取りを行う際、データ処理装置1
は、集合管理情報をメモリカード2から読み出して内部
メモリ4に管理テーブルを作成し、この管理テーブルに
基づいてメモリカード2にアクセスする。これにより、
データアクセスの都度、個々のブロックに格納された分
散管理情報にアクセスするような必要がなくなり、より
高速なデータアクセスが可能となる。
Then, usually, according to the set management information,
Get the information needed to access each block. That is, the data processing device 1 and the memory card 2
When exchanging data with the data processing device 1
Reads the group management information from the memory card 2, creates a management table in the internal memory 4, and accesses the memory card 2 based on the management table. This allows
It is not necessary to access the distributed management information stored in each block every time data is accessed, so that higher-speed data access is possible.

【0055】5.分散管理情報 つぎに、分散管理情報について詳細に説明する。[0055] 5. Distributed management information will now be described in detail distributed management information.

【0056】分散管理情報は、当該分散管理情報が格納
されたブロックを管理するための情報であり、16バイ
トの冗長エリアに書き込まれてなる。具体的には、図5
に示すように、1バイトの可/不可フラグと、1バイト
のブロックフラグと、4ビットの最終フラグと、4ビッ
トの参照フラグと、1バイトの管理フラグと、2バイト
の論理アドレスと、2バイトの連結アドレスと、3バイ
トのリザーブ領域と、2バイトの分散管理情報用エラー
訂正符号と、3バイトのデータ用エラー訂正符号とから
なる。
The distribution management information is information for managing a block in which the distribution management information is stored, and is written in a 16-byte redundant area. Specifically, FIG.
, A 1-byte enable / disable flag, a 1-byte block flag, a 4-bit final flag, a 4-bit reference flag, a 1-byte management flag, a 2-byte logical address, It consists of a byte concatenated address, a 3-byte reserved area, a 2-byte error management code for distributed management information, and a 3-byte data error correction code.

【0057】可/不可フラグは、ブロックが使用可能状
態か使用不可能状態かを示すフラグであり、具体的に
は、「使用可」と「使用不可」の2つの状態を示す。
「使用可」は、当該ブロックが使用可能な状態を示し、
「使用不可」は、当該ブロックが使用不可能な状態であ
ることを示す。例えば、ブロック内に回復不能なエラー
が生じたようなときに、この可/不可フラグが「使用不
可」に設定され、当該ブロックが使用不可とされる。
The enable / disable flag is a flag indicating whether the block is in a usable state or an unusable state, and specifically, indicates two states of "usable" and "unusable".
"Available" indicates that the block is usable,
"Unusable" indicates that the block is unusable. For example, when an unrecoverable error occurs in a block, the enable / disable flag is set to “unavailable”, and the block is disabled.

【0058】ブロックフラグは、ブロックの状態を示す
フラグであり、具体的には、「未使用」「先頭使用」
「使用」「未消去」の4つの状態を示す。「未使用」
は、当該ブロックが未使用又は消去済みで、初期状態
(全ビットが「1」の状態)とされており、直ぐにデー
タの書き込みが可能な状態を示す。「先頭使用」は、当
該ブロックがファイルの先頭で使用されている状態を示
す。なお、ブートデータが格納されたブートブロックに
おいて、ブロックフラグは「先頭使用」とされる。「使
用」は、当該ブロックがファイルの先頭以外で使用され
ている状態を示す。ブロックフラグが「使用」のとき、
当該ブロックは、他のブロックから連結されていること
となる。「未消去」は、当該ブロックに書かれていたデ
ータが無効となった状態を示す。例えば、データの消去
を行うときに、取りあえずブロックフラグを「未消去」
にしておき、処理時間に余裕があるときに、ブロックフ
ラグが「未消去」になっているブロックを消去するよう
にする。これにより、消去処理をより効率良く行うこと
が可能となる。
The block flag is a flag indicating the state of the block, and is specifically "unused", "head used".
The four states of “used” and “not erased” are shown. "unused"
Indicates that the block is unused or has been erased, is in an initial state (a state in which all bits are “1”), and in which data can be written immediately. “Top use” indicates a state in which the block is used at the beginning of the file. In the boot block in which the boot data is stored, the block flag is set to “used at the beginning”. “Use” indicates a state in which the block is used at a position other than the beginning of the file. When the block flag is "use",
This block is connected from another block. “Unerased” indicates a state in which data written in the block has become invalid. For example, when erasing data, first set the block flag to "not erased".
When there is enough processing time, a block whose block flag is set to “unerased” is erased. Thus, the erasing process can be performed more efficiently.

【0059】最終フラグは、ファイルが終わっているか
否かを示すフラグであり、具体的には、「ブロック連
続」「ブロック最終」の2つの状態を示す。「ブロック
連続」は、次のブロックへの連結があることを示す。す
なわち、「ブロック連続」は、当該ブロックに格納され
たファイルにはまだ続きがあり、当該ファイルが他のブ
ロックに続いていることを示す。「ブロック最終」は、
最終ブロックであることを示す。すなわち、「ブロック
最終」は、当該ブロックに格納されたファイルが、この
ブロックで終了していることを示す。
The last flag is a flag indicating whether or not the file has ended, and specifically indicates two states of “block continuation” and “block end”. “Block continuation” indicates that there is a connection to the next block. That is, "block continuation" indicates that the file stored in the block still continues, and the file continues in another block. "Block end"
Indicates the last block. That is, “block end” indicates that the file stored in the block ends with this block.

【0060】参照フラグは、追加管理情報の参照を指定
するためのフラグであり、具体的には、「参照情報な
し」「参照情報あり」の2つの状態を示す。「参照情報
なし」は、ブロックの最終ページの冗長領域に、有効な
追加管理情報が存在しないことを示す。「参照情報あ
り」は、ブロックの最終ページの冗長領域に、有効な追
加管理情報が存在していることを示す。
The reference flag is a flag for designating the reference of the additional management information, and specifically shows two states of “no reference information” and “with reference information”. "No reference information" indicates that there is no valid additional management information in the redundant area of the last page of the block. “With reference information” indicates that valid additional management information exists in the redundant area on the last page of the block.

【0061】管理フラグは、ブロックの属性等を示すフ
ラグである。例えば、この管理フラグによって、当該ブ
ロックが読み出し専用ブロックか、或いは書き込みも可
能なブロックであるかが示される。また、例えば、この
管理フラグによって、当該ブロックがブートブロックで
あるか、或いはデータブロックであるかが示される。
The management flag is a flag indicating the attribute of the block and the like. For example, the management flag indicates whether the block is a read-only block or a writable block. Further, for example, the management flag indicates whether the block is a boot block or a data block.

【0062】論理アドレスは、文字通りそのブロックの
論理アドレスを示す。この論理アドレスの値は、データ
の書き換えを行うときなどに必要に応じて更新される。
なお、論理アドレスの値は、正常に処理が行われている
限り、同じ論理アドレスの値を同時に複数のブロックが
持つことがないように設定される。
The logical address literally indicates the logical address of the block. The value of the logical address is updated as necessary, for example, when rewriting data.
The value of the logical address is set so that a plurality of blocks do not have the same logical address value at the same time as long as the processing is performed normally.

【0063】ところで、フラッシュメモリの場合、同一
ブロック内でデータを書き換えるには、上述したよう
に、先ずブロック消去を行う必要がある。しかしなが
ら、保証されている消去可能回数には上限があり、ブロ
ック消去の回数は出来るだけ少なくすることが要求され
る。そこで、ブロックのデータを更新する際は、同一の
ブロックを使って新たなデータに書き換えるのではな
く、他のブロックに新たなデータを書き込むようにす
る。このとき、先にデータが格納されていたブロック
は、当該ブロックに格納されていたデータが無効になっ
たことを示すように、ブロックフラグを「未消去」にす
る。そして、このメモリカード2では、このようにデー
タを更新した場合でも、当該データが格納されているブ
ロックを示すアドレスが同じとなるように、各ブロック
に対して予め設定されている物理アドレスとは別に、動
的に変更が可能な論理アドレスを各ブロックに割り当て
て、この論理アドレスでデータが格納されているブロッ
クを表すようにする。
By the way, in the case of a flash memory, in order to rewrite data in the same block, it is necessary to first erase the block as described above. However, the guaranteed number of erasable operations has an upper limit, and it is required that the number of block erase operations be as small as possible. Therefore, when updating data in a block, new data is written in another block instead of using the same block to rewrite new data. At this time, the block flag of the block in which the data is stored first is set to “not erased” so as to indicate that the data stored in the block has become invalid. In the memory card 2, even if the data is updated in this manner, the physical address set in advance for each block is such that the address indicating the block in which the data is stored is the same. Separately, a dynamically changeable logical address is assigned to each block so that the logical address represents a block in which data is stored.

【0064】連結アドレスは、当該ブロックに連結する
ブロックの論理アドレスを示す。すなわち、ブロックに
格納されたファイルにはまだ続きがあり、当該ファイル
が他のブロックに続いている場合、連結アドレスには、
そのファイルの続きが格納された次のブロックの論理ア
ドレスの値が設定される。
The link address indicates a logical address of a block linked to the block. In other words, if the file stored in the block has a continuation, and the file continues to another block, the link address indicates
The value of the logical address of the next block in which the continuation of the file is stored is set.

【0065】分散管理情報用エラー訂正符号は、分散管
理情報のうち、管理フラグ、論理アドレス、連結アドレ
ス及びリザーブ領域に書き込まれデータを対象としたエ
ラー訂正符号である。
The error correction code for distribution management information is an error correction code for data written in the management flag, the logical address, the link address, and the reserved area in the distribution management information.

【0066】なお、可/不可フラグ、ブロックフラグ、
最終フラグ及び参照フラグは、分散管理情報用エラー訂
正符号によるエラー訂正やエラー検出の対象となってい
ない。したがって、可/不可フラグ、ブロックフラグ、
最終フラグ及び参照フラグは、分散管理情報用エラー訂
正符号を更新することなく書き換えることが可能となっ
ている。
Note that an enable / disable flag, a block flag,
The final flag and the reference flag are not targeted for error correction or error detection by the error correction code for distributed management information. Therefore, the enable / disable flag, block flag,
The last flag and the reference flag can be rewritten without updating the error correction code for distribution management information.

【0067】データ用エラー訂正符号は、当該データ用
エラー訂正符号が格納されているページのデータエリア
に書き込まれたデータを対象としたエラー訂正符号であ
る。
The data error correction code is an error correction code for data written in the data area of the page in which the data error correction code is stored.

【0068】なお、分散管理情報用エラー訂正符号やデ
ータ用エラー訂正符号は、メモリカード2の内部に配さ
れたエラー訂正回路16によって使用される。したがっ
て、これらのエラー訂正符号を用いてのエラー訂正は、
データ処理装置1に依存することなく、メモリカード2
に依存した任意の手法を使用することができる。
The error correction code for distributed management information and the error correction code for data are used by the error correction circuit 16 disposed inside the memory card 2. Therefore, error correction using these error correction codes is
Without depending on the data processing device 1, the memory card 2
Can be used.

【0069】6.追加管理情報 つぎに、追加管理情報について詳細に説明する。[0069] 6. Additional management information will be described in detail for additional management information.

【0070】追加管理情報は、ブロックの最終ページの
16バイトの冗長エリアに格納される情報であり、分散
管理情報だけでは管理しきれない追加情報を含んでい
る。
The additional management information is information stored in the 16-byte redundant area of the last page of the block, and includes additional information that cannot be managed only by the distributed management information.

【0071】具体的には、追加管理情報は、図6に示す
ように、1バイトの可/不可フラグと、1バイトのブロ
ックフラグと、4ビットの最終フラグと、4ビットの参
照フラグと、1バイトの識別番号と、2バイトの有効デ
ータサイズと、5バイトのリザーブ領域と、2バイトの
追加管理情報用エラー訂正符号と、3バイトのデータ用
エラー訂正符号とからなる。
Specifically, as shown in FIG. 6, the additional management information includes a 1-byte enable / disable flag, a 1-byte block flag, a 4-bit final flag, a 4-bit reference flag, It consists of a 1-byte identification number, a 2-byte effective data size, a 5-byte reserved area, a 2-byte error correction code for additional management information, and a 3-byte data error correction code.

【0072】ここで、可/不可フラグ、ブロックフラ
グ、最終フラグ、参照フラグ、リザーブ領域及びデータ
用エラー訂正符号については、分散管理情報の場合と同
様である。また、追加管理情報用エラー訂正符号は、分
散管理情報における分散管理情報用エラー訂正符号に相
当するものであり、追加管理情報のうち、識別番号、有
効データサイズ及びリザーブ領域に書き込まれデータを
対象としたエラー訂正符号である。
Here, the enable / disable flag, block flag, last flag, reference flag, reserved area, and data error correction code are the same as in the case of the distributed management information. Further, the error correction code for additional management information is equivalent to the error correction code for distributed management information in the distributed management information. Among the additional management information, the identification number, the effective data size, and the data written in the reserved area are targeted. This is the error correction code.

【0073】そして、識別番号及び有効データサイズと
が、分散管理情報だけでは管理しきれない追加情報とし
て、追加管理情報に含まれている。
The identification number and the effective data size are included in the additional management information as additional information that cannot be managed only by the distributed management information.

【0074】識別番号は、エラー処理用の情報であり、
ブロックのデータを書き換える度に、この識別番号の値
がインクリメントされる。この識別番号は、何らかのエ
ラーが発生して、同じ論理アドレスを持つブロックが複
数存在するようになってしまった場合に、それらのブロ
ックに書き込まれたデータの新旧を識別するために使用
される。なお、識別番号には1バイトの領域が使用さ
れ、その値の範囲は「0」から「255」までであり、
その初期値は「0」とされる。なお、識別番号が「25
5」を越えたときには「0」に戻される。そして、同じ
論理アドレスを持つデータブロックが複数存在する場合
には、この識別番号の値が小さい方のデータブロックを
有効とする。ただし、ブートブロックについては、ブー
トブロックの予備がある場合、正常時には、それらのブ
ートブロックの識別番号は同じ値とされる。何らかの異
常により、それらの識別番号が異なるような状態となっ
た場合には、識別番号の値が大きい方のブートブロック
を有効とする。
The identification number is information for error processing.
Each time the data of the block is rewritten, the value of this identification number is incremented. This identification number is used to identify the old and new of the data written in those blocks when some error occurs and a plurality of blocks having the same logical address exist. A 1-byte area is used for the identification number, and its value ranges from "0" to "255".
Its initial value is "0". Note that the identification number is "25
When it exceeds "5", it is returned to "0". When there are a plurality of data blocks having the same logical address, the data block having the smaller value of the identification number is valid. However, in the case of a boot block, if there is a spare boot block, the identification numbers of those boot blocks have the same value in a normal state. If the identification numbers are different due to some abnormality, the boot block with the larger value of the identification number is validated.

【0075】また、有効データサイズは、ブロック内の
有効なデータのサイズを示す。すなわち、当該ブロック
のデータエリアに空きがある場合、有効データサイズに
は、当該データエリアに書き込まれたデータのサイズを
示す値が設定される。このとき、分散管理情報の参照フ
ラグは「参照情報あり」に設定される。なお、ブロック
のデータエリアに空きがない場合、有効データサイズに
は、当該データエリアに空きがないことを示す値とし
て、「0xffff」が設定される。
The valid data size indicates the size of valid data in the block. That is, when there is a free space in the data area of the block, a value indicating the size of the data written in the data area is set in the effective data size. At this time, the reference flag of the distributed management information is set to “with reference information”. If there is no free space in the data area of the block, “0xffff” is set in the effective data size as a value indicating that there is no free space in the data area.

【0076】なお、以上のような分散管理情報及び追加
管理情報は、ブロック内のデータが更新される毎に、常
に最新情報となるように更新される。
Note that the above-described distributed management information and additional management information are updated so that they are always the latest information every time data in a block is updated.

【0077】7.集合管理情報 つぎに、集合管理情報について詳細に説明する。[0077] 7. Set management information Next, set management information will be described in detail.

【0078】集合管理情報は、上述したように、各ブロ
ックの分散管理情報を集めて作成されてなる情報であ
り、ファイルとしてフラッシュメモリ12に格納され
る。すなわち、図7に示すように、各ブロックの分散管
理情報から、全ブロックをまとめて管理するための情報
である集合管理情報のファイルが作成され、この集合管
理情報が所定のブロックのデータエリアに格納される。
なお、集合管理情報は、1つのブロックに格納されるも
のであっても、複数のブロックにわたって格納されるも
のであってもよい。そして、データ処理装置1は、通常
は、この集合管理情報によって、各ブロックにアクセス
するために必要な情報を得るようにする。
As described above, the collective management information is information created by collecting distributed management information of each block, and is stored in the flash memory 12 as a file. That is, as shown in FIG. 7, a file of set management information, which is information for managing all blocks collectively, is created from the distributed management information of each block, and this set management information is stored in the data area of a predetermined block. Is stored.
The set management information may be stored in one block or may be stored over a plurality of blocks. Then, the data processing device 1 normally obtains information necessary for accessing each block by using the set management information.

【0079】すなわち、メモリカード2に有効な集合管
理情報がファイルとして格納されている場合、データ処
理装置1は、その集合管理情報のファイルを読み出して
内部メモリ4に展開し、メモリカード2を管理するため
の管理テーブルを作成する。なお、集合管理情報のファ
イルの先頭が格納されているブロックの物理アドレス
は、ブートデータに含まれており、データ処理装置1
は、この物理アドレスに基づいて集合管理情報のファイ
ルにアクセスする。
That is, when the effective collective management information is stored in the memory card 2 as a file, the data processing device 1 reads out the collective control information file and develops it on the internal memory 4 to manage the memory card 2. Create a management table for Note that the physical address of the block in which the head of the file of the set management information is stored is included in the boot data, and the data processing device 1
Accesses the set management information file based on the physical address.

【0080】8.ブロックへのデータの書き込み つぎに、以上のようなシステムで、メモリカード2にデ
ータを書き込む際の処理について説明する。
[0080] 8. Writing data to a block next, in the above-described system will be described the processing for writing data into the memory card 2.

【0081】上記システムにおいて、データ処理装置1
からメモリカード2に送られたデータは、フラッシュメ
モリ12の記憶領域を構成するブロックに書き込まれ
る。具体的には、メモリカード2は、各ブロックにデー
タをページ単位で書き込んでいく。ここで、ブロックの
最終ページ以外のページにデータを書き込むとき、それ
らのページの冗長部分には、分散管理情報を書き込むよ
うにする。
In the above system, the data processing device 1
Sent to the memory card 2 from the flash memory 12 is written to a block constituting a storage area of the flash memory 12. Specifically, the memory card 2 writes data in each block in page units. Here, when data is written to pages other than the last page of the block, the distributed management information is written to the redundant portion of those pages.

【0082】そして、本発明を適用したメモリカード2
では、ブロックにデータを書き込む際、当該ブロックの
最終ページへの書き込みを必ず最後に行うようにする。
このとき、最終ページのデータエリアにデータが書き込
まれる場合は、最終ページへのデータの書き込みと同時
に、当該最終ページの冗長部に追加管理情報を書き込
む。また、最終ページのデータエリアにデータが書き込
まれない場合は、当該ブロックへのデータの書き込みが
終了した後に、最終ページの冗長部に追加管理情報のみ
を書き込む。すなわち、本発明を適用したメモリカード
2では、ブロックにデータを書き込む際、最後に最終ペ
ージの冗長部分に追加管理情報を常に書き込むようにす
る。
Then, the memory card 2 to which the present invention is applied
Then, when writing data to a block, writing to the last page of the block is always performed last.
At this time, when data is written to the data area of the last page, the additional management information is written to the redundant portion of the last page at the same time as the data is written to the last page. If data is not written to the data area of the last page, after the data writing to the block is completed, only the additional management information is written to the redundant portion of the last page. That is, in the memory card 2 to which the present invention is applied, when writing data to a block, the additional management information is always written to the redundant portion of the last page.

【0083】なお、分散管理情報や追加管理情報には、
上述したように、エラー訂正符号を付けておく。これに
より、分散管理情報や追加管理情報の書き込み不良の検
出が可能となる。
The distributed management information and the additional management information include
As described above, an error correction code is added. This makes it possible to detect a write failure of the distributed management information or the additional management information.

【0084】また、以上のように追加管理情報の書き込
みがなされたブロックに空きページが存在したとして
も、当該空きページへのデータの追記は行わない。換言
すれば、追加管理情報が書き込まれたブロックに、新た
にデータを書き込むときは、当該ブロックに消去処理を
施してから行う。
Even if an empty page exists in the block to which the additional management information has been written as described above, no additional data is written to the empty page. In other words, when writing new data to the block in which the additional management information has been written, the block is erased before it is performed.

【0085】9.ブロックに書き込んだデータの確認 つぎに、以上のようにブロックにデータを書き込んだ
後、当該データの書き込みが完全に行われたかを確認す
る処理について、図8のフローチャートを参照して、詳
細に説明する。
9. Confirmation of Data Written to Block Next, a process of writing data to the block as described above and then confirming whether the data has been completely written will be described in detail with reference to the flowchart of FIG. I do.

【0086】ブロックへのデータの書き込みが完全に行
われたかを確認する際は、図8に示すように、先ず、ス
テップS1において、確認の対象となるブロックの分散
管理情報を読み込む。
To check whether data has been completely written to a block, first, as shown in FIG. 8, in step S1, the distribution management information of the block to be checked is read.

【0087】次に、ステップS2において、ステップS
1で読み込んだ分散管理情報に基づいて、確認の対象と
なるブロックが使用可能な状態であるか否かを確認す
る。具体的には、分散管理情報の可/不可フラグを参照
し、「使用不可」になっていないかを確認する。
Next, in step S2, step S
Based on the distributed management information read in step 1, it is checked whether the block to be checked is in a usable state. Specifically, it refers to the enable / disable flag of the distributed management information and confirms whether or not it is "unusable".

【0088】そして、確認の対象となるブロックが使用
不可能となっている場合には、ステップS3へ進み、今
後は当該ブロックをデータ保持に使用しないということ
で処理する。このときは、当然の事ながら、当該ブロッ
クへのデータの書き込みは正常に行われていないので、
これで処理を終了する。
If the block to be checked is unusable, the process proceeds to step S3, in which the block is not used for holding data in the future. At this time, of course, data writing to the block is not performed normally,
This ends the processing.

【0089】一方、確認の対象となるブロックが使用可
能となっている場合には、ステップS4へ進み、当該ブ
ロックの追加管理情報を読み込み、次に、ステップS5
において、ステップS4で読み込んだ追加管理情報にエ
ラーが無いかを調べる。なお、ここでのエラーチェック
は、追加管理情報用エラー訂正符号を用いて行う。すな
わち、追加管理情報用エラー訂正符号を用いて、読み込
んだ追加管理情報にエラーが無いかを調べる。
On the other hand, if the block to be checked is available, the flow advances to step S4 to read additional management information of the block, and then to step S5
Then, it is checked whether the additional management information read in step S4 has an error. Note that the error check here is performed using an error correction code for additional management information. That is, using the error correction code for additional management information, it is checked whether the read additional management information has an error.

【0090】そして、追加管理情報にエラーがある場合
には、ステップS6へ進み、書き込みが不完全であった
ものと判断し、これで処理を終了する。すなわち、追加
管理情報用エラー訂正符号を用いてのエラー訂正の結
果、冗長エリアに書かれている追加管理情報に異常があ
ると判断された場合は、当該追加管理情報の書き込み中
に障害が発生したものと見なし、データの書き込みは不
完全であったと判断する。
If there is an error in the additional management information, the process proceeds to step S6, where it is determined that the writing is incomplete, and the process is terminated. That is, as a result of error correction using the error correction code for the additional management information, if it is determined that the additional management information written in the redundant area is abnormal, a failure occurs during the writing of the additional management information. It is determined that the data writing was incomplete.

【0091】一方、追加管理情報にエラーがない場合に
は、ステップS7へ進み、当該追加管理情報を含む最終
ページのデータエリアにデータが書き込まれているかを
判断する。
On the other hand, if there is no error in the additional management information, the flow advances to step S7 to determine whether data has been written in the data area of the last page including the additional management information.

【0092】そして、最終ページのデータエリアにデー
タが書き込まれている場合には、ステップS8へ進み、
当該最終ページのデータエリアに書かれているデータを
読み込み、次に、ステップS9において、ステップS8
で読み込んだデータにエラーが無いかを調べる。なお、
ここでのエラーチェックは、データ用エラー訂正符号を
用いて行う。すなわち、データ用エラー訂正符号を用い
て、読み込んだデータにエラーが無いかを調べる。
If data has been written in the data area of the last page, the process proceeds to step S8,
The data written in the data area of the last page is read, and then in step S9, step S8
Check the data read in for errors. In addition,
The error check here is performed using a data error correction code. That is, using the data error correction code, it is checked whether there is an error in the read data.

【0093】そして、データにエラーがある場合には、
ステップS6へ進み、書き込みが不完全であったものと
判断し、これで処理を終了する。すなわち、データ用エ
ラー訂正符号を用いてのエラー訂正の結果、データエリ
アに書かれているデータに異常があると判断された場合
は、当該データの書き込み中に障害が発生したものと見
なし、データの書き込みは不完全であったと判断する。
When there is an error in the data,
Proceeding to step S6, it is determined that the writing was incomplete, and the process ends. That is, as a result of error correction using the data error correction code, if it is determined that the data written in the data area is abnormal, it is considered that a failure has occurred during the writing of the data, and Is determined to be incomplete.

【0094】一方、データにエラーがない場合には、ス
テップS10へ進む。このときは、冗長エリアに書かれ
ている追加管理情報も、データエリアに書かれているデ
ータも、正常にブロックに書き込まれているときなの
で、当該ブロックへのデータの書き込みが完全になされ
たものと判断し、これで処理を終了する。
On the other hand, if there is no error in the data, the process proceeds to step S10. At this time, since both the additional management information written in the redundant area and the data written in the data area have been normally written to the block, the data has been completely written to the block. Is determined, and the process ends.

【0095】また、ステップS7においてデータエリア
にはデータがないと判断された場合にも、ステップS1
0へ進む。このときは、データエリアにはデータが書か
れていないが、冗長エリアには追加管理情報が正常に書
かれているときなので、ブロックへのデータの書き込み
が完全になされたものと判断し、これで処理を終了す
る。
If it is determined in step S7 that there is no data in the data area, step S1 is executed.
Go to 0. At this time, no data is written in the data area, but since additional management information is normally written in the redundant area, it is determined that data has been completely written to the block. Ends the processing.

【0096】以上の処理により、ページ毎に冗長エリア
を持つメモリカード2について、ブロックへの書き込み
が正常に終了したか、或いは書き込み途中に障害が発生
して書き込みがブロック途中で中断したかを判別するこ
とが可能となる。しかも、以上の処理では、ブロックに
書かれた全データを読むことなく、各ブロックへの書き
込みの正否を確認することができる。したがって、各ブ
ロックへの書き込みの正否の確認を、非常に効率良く行
うことができる。
With the above processing, it is determined whether the writing to the block has been completed normally or the writing has been interrupted in the middle of the block due to a failure during the writing for the memory card 2 having the redundant area for each page. It is possible to do. Moreover, in the above processing, it is possible to confirm whether or not the writing to each block is correct without reading all the data written in the block. Therefore, whether the writing to each block is correct or not can be confirmed very efficiently.

【0097】[0097]

【発明の効果】以上詳細に説明したように、本発明によ
れば、ブロックに書き込まれた全データを読むことな
く、最終ページに書き込まれたデータを読み出すだけ
で、ブロックへのデータ書き込みの正否を確認すること
ができる。したがって、本発明によれば、各ブロックへ
のデータ書き込みの正否の確認を、非常に効率良く行う
ことが可能となる。
As described above in detail, according to the present invention, the correctness of data writing to a block can be obtained by reading data written to the last page without reading all data written to the block. Can be confirmed. Therefore, according to the present invention, it is possible to very efficiently check whether data is written to each block.

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

【図1】本発明が適用されるシステムの全体構成を示す
図である。
FIG. 1 is a diagram showing an overall configuration of a system to which the present invention is applied.

【図2】本発明を適用したメモリカードの構成を示すブ
ロック図である。
FIG. 2 is a block diagram showing a configuration of a memory card to which the present invention is applied.

【図3】本発明を適用したメモリカードの外観を示す斜
視図である。
FIG. 3 is a perspective view showing the appearance of a memory card to which the present invention is applied.

【図4】本発明を適用したメモリカードの記憶領域の構
造を示す図である。
FIG. 4 is a diagram showing a structure of a storage area of a memory card to which the present invention is applied.

【図5】分散管理情報の構成を示す図である。FIG. 5 is a diagram illustrating a configuration of distributed management information.

【図6】追加管理情報の構成を示す図である。FIG. 6 is a diagram showing a configuration of additional management information.

【図7】各ブロックの分散管理情報から集合管理情報を
構築する様子を示す図である。
FIG. 7 is a diagram showing a state in which set management information is constructed from distributed management information of each block.

【図8】ブロックへのデータの書き込みが完全に行われ
たか否かを確認する処理のフローチャートである。
FIG. 8 is a flowchart of a process for confirming whether or not data has been completely written to a block.

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

1 データ処理装置、 2 メモリカード、 3 演算
処理装置、 4 内部メモリ、 5 補助記憶装置、
6 シリアルインターフェース回路、 7 バス、 1
1 コントローラ、 12 フラッシュメモリ、 13
シリアル/パラレル・パラレル/シリアル・インター
フェース・シーケンサ、 14 フラッシュメモリ・イ
ンターフェース・シーケンサ、 15 ページバッフ
ァ、 16エラー訂正回路、 17 コマンドジェネレ
ータ、 18 コンフィグレーションROM、 19
発振器、 20 誤消去防止スイッチ
1 data processing device, 2 memory card, 3 arithmetic processing device, 4 internal memory, 5 auxiliary storage device,
6 serial interface circuit, 7 bus, 1
1 controller, 12 flash memory, 13
Serial / Parallel / Parallel / Serial Interface Sequencer, 14 Flash Memory Interface Sequencer, 15 Page Buffer, 16 Error Correction Circuit, 17 Command Generator, 18 Configuration ROM, 19
Oscillator, 20 Erroneous erase prevention switch

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G06F 3/06 305 G06F 3/08 G06F 12/00 540 G06F 12/16 320 G11C 17/00 ──────────────────────────────────────────────────続 き Continued on the front page (58) Fields surveyed (Int. Cl. 6 , DB name) G06F 3/06 305 G06F 3/08 G06F 12/00 540 G06F 12/16 320 G11C 17/00

Claims (10)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 記憶領域が複数のブロックに分割されて
なるとともに、ブロックへのデータの書き込みを所定の
ページ単位毎に行う記憶装置であって、 ブロックにデータを書き込む際に、当該データがブロッ
クの全ページを満たすほどの大きさを持たなくても、当
該ブロックへの書き込みの最後に、当該ブロックの最終
ページに上記データの少なくとも一部及び/又は上記デ
ータ以外の情報を書き込むことを特徴とする記憶装置。
1. A storage device in which a storage area is divided into a plurality of blocks, and data is written to a block for each predetermined page unit. Even if the size is not large enough to fill all the pages of the block, at least a part of the data and / or information other than the data is written to the last page of the block at the end of writing to the block. Storage device.
【請求項2】 ブロックに書き込まれるデータが当該ブ
ロックの最終ページにまで至らないときには、当該ブロ
ックへの書き込みの最後に、当該ブロックの最終ページ
に上記情報だけを書き込み、 ブロックに書き込まれるデータが当該ブロックの最終ペ
ージにまで至るときには、当該ブロックへの書き込みの
最後に、当該ブロックの最終ページに上記データの少な
くとも一部及び上記情報を書き込むことを特徴とする請
求項1記載の記憶装置。
2. When data to be written to a block does not reach the last page of the block, at the end of writing to the block, only the information is written to the last page of the block. 2. The storage device according to claim 1, wherein when reaching the last page of the block, at least a part of the data and the information are written to the last page of the block at the end of writing to the block.
【請求項3】 上記情報には、当該情報のエラーを検出
し訂正するためのエラー訂正符号が含まれることを特徴
とする請求項1記載の記憶装置。
3. The storage device according to claim 1, wherein the information includes an error correction code for detecting and correcting an error in the information.
【請求項4】 上記情報には、最終ページに書き込まれ
るデータのエラーを検出し訂正するためのエラー訂正符
号が含まれることを特徴とする請求項1記載の記憶装
置。
4. The storage device according to claim 1, wherein the information includes an error correction code for detecting and correcting an error in data written to the last page.
【請求項5】 ブロックへのデータの書き込みが完了し
た後に、ブロックの最終ページに書き込まれた上記デー
タの少なくとも一部及び/又は上記情報を読み出してそ
の内容を確認することにより、ブロックへのデータの書
き込みが正常になされたか否かを判別することを特徴と
する請求項1記載の記憶装置。
5. After the writing of data to the block is completed, at least a part of the data written on the last page of the block and / or the information is read and the contents thereof are confirmed, so that the data is written to the block. 2. The storage device according to claim 1, wherein it is determined whether or not writing has been performed normally.
【請求項6】 記憶領域が複数のブロックに分割されて
なるとともに、ブロックへのデータの書き込みを所定の
ページ単位毎に行う記憶装置に対してデータを書き込む
際に、 上記データがブロックの全ページを満たすほどの大きさ
を持たなくても、当該ブロックへの書き込みの最後に、
当該ブロックの最終ページに上記データの少なくとも一
部及び/又は上記データ以外の情報を書き込むことを特
徴とするデータ処理方法。
6. A storage area is divided into a plurality of blocks, and when writing data to a storage device that writes data to a block for each predetermined page unit, the data is stored in all pages of the block. Even if it is not large enough to satisfy, at the end of writing to the block,
A data processing method comprising writing at least a part of the data and / or information other than the data on the last page of the block.
【請求項7】 ブロックに書き込まれるデータが当該ブ
ロックの最終ページにまで至らないときには、当該ブロ
ックへの書き込みの最後に、当該ブロックの最終ページ
に上記情報だけを書き込み、 ブロックに書き込まれるデータが当該ブロックの最終ペ
ージにまで至るときには、当該ブロックへの書き込みの
最後に、当該ブロックの最終ページに上記データの少な
くとも一部及び上記情報を書き込むことを特徴とする請
求項6記載のデータ処理方法。
7. When data to be written to a block does not reach the last page of the block, at the end of writing to the block, only the information is written to the last page of the block. 7. The data processing method according to claim 6, wherein when reaching the last page of the block, at least a part of the data and the information are written to the last page of the block at the end of writing to the block.
【請求項8】 上記情報には、当該情報のエラーを検出
し訂正するためのエラー訂正符号が含まれることを特徴
とする請求項6記載のデータ処理方法。
8. The data processing method according to claim 6, wherein the information includes an error correction code for detecting and correcting an error in the information.
【請求項9】 上記情報には、最終ページに書き込まれ
るデータのエラーを検出し訂正するためのエラー訂正符
号が含まれることを特徴とする請求項6記載のデータ処
理方法。
9. The data processing method according to claim 6, wherein the information includes an error correction code for detecting and correcting an error in data written to the last page.
【請求項10】 ブロックへのデータの書き込みが完了
した後に、ブロックの最終ページに書き込まれた上記デ
ータの少なくとも一部及び/又は上記情報を読み出して
その内容を確認することにより、ブロックへのデータの
書き込みが正常になされたか否かを判別することを特徴
とする請求項6記載のデータ処理方法。
10. After the writing of data to the block is completed, at least a portion of the data written on the last page of the block and / or the information is read to confirm the contents thereof, so that the data is written to the block. 7. The data processing method according to claim 6, wherein it is determined whether or not the writing has been performed normally.
JP26718097A 1997-09-30 1997-09-30 Storage device and data processing method Expired - Fee Related JP2910745B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26718097A JP2910745B2 (en) 1997-09-30 1997-09-30 Storage device and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26718097A JP2910745B2 (en) 1997-09-30 1997-09-30 Storage device and data processing method

Publications (2)

Publication Number Publication Date
JPH11110142A JPH11110142A (en) 1999-04-23
JP2910745B2 true JP2910745B2 (en) 1999-06-23

Family

ID=17441228

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26718097A Expired - Fee Related JP2910745B2 (en) 1997-09-30 1997-09-30 Storage device and data processing method

Country Status (1)

Country Link
JP (1) JP2910745B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005190288A (en) * 2003-12-26 2005-07-14 Tdk Corp Memory controller, flash memory system therewith, and method for controlling flash memory
JP2009146499A (en) * 2007-12-13 2009-07-02 Toshiba Corp Nonvolatile memory card
CN101911207B (en) * 2008-01-16 2014-05-07 富士通株式会社 Semiconductor storage device, controlling apparatus and controlling method
JP5707695B2 (en) * 2009-12-08 2015-04-30 沖電気工業株式会社 Flash disk device
JP2016031626A (en) * 2014-07-29 2016-03-07 ソニー株式会社 Memory controller, memory device, information processing system and control method thereof

Also Published As

Publication number Publication date
JPH11110142A (en) 1999-04-23

Similar Documents

Publication Publication Date Title
JP2914360B2 (en) External storage device and data processing method
JP3233079B2 (en) Data processing system and data processing method
CN102163133B (en) Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewriteable memory
KR100343377B1 (en) Data writing to non-volatile memory
KR100527610B1 (en) Storage devices, data processing systems, and how to record and read data
JP3912355B2 (en) Data management device, data management method, nonvolatile memory, storage device having nonvolatile memory, and data processing system
US6883060B1 (en) Microcomputer provided with flash memory and method of storing program into flash memory
KR100742849B1 (en) Data storage, data processing system, data processing method and data processing apparatus
JP2011514568A (en) Write once memory device and storage subsystem of a computer comprising a write many memory device and associated method
JP3472008B2 (en) Flash memory management method
JP3070539B2 (en) External storage device, data processing device, and data processing method
JP2910745B2 (en) Storage device and data processing method
JP3620478B2 (en) Storage device, data processing system using the storage device, and data read method
JP3640154B2 (en) Nonvolatile memory, nonvolatile memory management method, storage device having nonvolatile memory, data management device for managing nonvolatile memory, and data processing system
JP3788205B2 (en) Storage device, data processing system, data writing and reading method, and data processing device
JP3319361B2 (en) Storage device, data processing device and data processing method
US7849279B2 (en) Method for the secure updating data areas in non volatile memory, device to perform such a method
JPH06180674A (en) Data storage device
JP2006107363A (en) Portable electronic device and memory access method used in the same
JPH07168769A (en) Data updating method for nonvolatile memory

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990309

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

Free format text: PAYMENT UNTIL: 20080409

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090409

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090409

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100409

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees