JP2004252746A - Recording control method and device for recording medium, and electronic equipment - Google Patents

Recording control method and device for recording medium, and electronic equipment Download PDF

Info

Publication number
JP2004252746A
JP2004252746A JP2003042984A JP2003042984A JP2004252746A JP 2004252746 A JP2004252746 A JP 2004252746A JP 2003042984 A JP2003042984 A JP 2003042984A JP 2003042984 A JP2003042984 A JP 2003042984A JP 2004252746 A JP2004252746 A JP 2004252746A
Authority
JP
Japan
Prior art keywords
data
address
written
address position
recording medium
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003042984A
Other languages
Japanese (ja)
Other versions
JP4200362B2 (en
Inventor
Kenichi Iida
健一 飯田
Akihiro Sakuma
晶大 佐久間
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 JP2003042984A priority Critical patent/JP4200362B2/en
Publication of JP2004252746A publication Critical patent/JP2004252746A/en
Application granted granted Critical
Publication of JP4200362B2 publication Critical patent/JP4200362B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To increase the speed of writing processing speed for a recording area where data with predetermined contents are written in the predetermined order of addresses, as in TOC areas, on a recording medium, such as a flash memory. <P>SOLUTION: The proper address position in a predetermined memory area where each group of data should be written is converted into a converted address position where data are arranged in the order of addresses in the memory area, in response to writing instructions for each group of data, whereby each group of data is written in sequence in the predetermined memory area. Information showing the correspondence between the proper address position and the converted address position is retained for reading each group of data. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
この発明は、例えばフラッシュメモリなどの記録媒体の、特に、TOC(Table of Contents)エリアの書き込み制御に適用して好適な記録制御方法および装置に関する。
【0002】
【従来の技術】
NAND型フラッシュメモリで取り扱う記録データの構成は、例えば図14に示すようなものとされており、ページと呼ばれる小ブロック単位でデータの読み書きが行なわれ、このページの複数個からなるブロックと呼ばれる大ブロック単位でデータの消去がなされるようになっている。
【0003】
1ページは、例えば、512バイトのデータエリアと、16バイトのスペアエリア(冗長部)とから構成される。16バイトのスペアエリアのうちの4バイトは、エラー検出訂正用のECC(Error Correction Code)として使用される。
【0004】
このフラッシュメモリの読み書きの制御方法は、例えば特許文献1(特開2000−31104号公報)に記載されているようなものとされている。
【0005】
フラッシュメモリの読み書きを制御する記録制御装置は、ブロック単位で、フラッシュメモリのどの物理アドレスにデータを書き込んだかを、論理アドレスにより管理するようにしており、このため、上記記録制御装置は、ブロック単位で、フラッシュメモリの物理アドレスと論理アドレスとの変換を行なうための論理物理アドレス変換テーブルを備える。上記記録制御装置は、この論理物理アドレス変換テーブルを用いて、フラッシュメモリのアドレス制御を行なう。
【0006】
この場合、論理アドレスは、各ページのスペアエリアに書き込まれる。また、スペアエリアには、当該論理アドレスのブロックへの書き込みが行なわれている最中であるか否かを示す更新中フラグが含まれる。更新中フラグは、書き込みが行なわれているときには、オン(「0」)にされ、書き込み中でなければ、オフ(「1」)である。
【0007】
次に、NAND型フラッシュメモリにおけるページ単位のデータの書き込み動作について説明する。この場合に、NAND型フラッシュメモリは、書き込み対象ブロックおよび書き込み対象ページは、ランダムに決定することができるが、同一ブロック内での書き込み処理手順においては、アドレス番号の先頭のページから、アドレス順に従って行なわなければならないという制約がある。つまり、同一ブロック内では、アドレスの小さいページから順番に書き込む必要がある。このため、従来は、ページ単位の書き込みであっても、当該書き込み対象ページを含むブロック単位で書き込み動作を行なうようにしている。
【0008】
図15は、このページ単位のデータの書き込み動作の概要を説明するための図である。
【0009】
すなわち、あるブロック中の空いている1ページ分のエリアにページデータを書き込む場合には、1ブロック分の空きエリアを用意し、当該空きエリアの書き込み対象ページアドレスには、新規データを書き込み、当該ブロックの他のページのデータは、元のデータをコピーするようにする。そして、書き込み処理が終了後には、元のブロックを消去するようにする。
【0010】
図16は、このデータ書き込み時の処理動作のフローチャートであり、これは、前述したフラッシュメモリの読み書きを制御する記録制御装置が実行する処理を中心に記述したものである。
【0011】
すなわち、記録制御装置は、フラッシュメモリへの書き込み指示が発生したか否か判別し(ステップS1)、書き込み指示が発生していないと判別したときには、その他の処理を実行する(ステップS2)。
【0012】
そして、ステップS1で、書き込み指示が発生したと判別したときには、記録制御装置は、書き込み対象ブロックおよび書き込み対象ページの論理アドレスを決定し(ステップS3)、当該論理アドレスのブロックの先頭のページの更新中フラグをオンにする(ステップS4)。
【0013】
次に、論理上、記録制御装置の論理物理アドレス変換テーブルに用意している予備の空きエリアに書き込み対象ブロックを退避すると共に、書き込み対象ブロックの論理アドレスと同じ論理アドレスのブロックを書き込める空きブロックエリアを作るようにする(ステップS5)。このステップS5の処理を、図17を参照してさらに説明する。
【0014】
すなわち、例えば、図17に示すように、フラッシュメモリが、論理ブロックアドレスAから論理ブロックアドレスA+n−1までを有効エリアとして持つと共に、論理ブロックアドレスA+nの1ブロック分の予備エリアを持つものとする。ここで、論理ブロックアドレスA+nの予備エリアは、消去済みであって空きエリアであるものとする。
【0015】
図17の例では、書き込み対象ブロックは、論理ブロックアドレスA+3のブロックであるとしている。そこで、この例では、ステップS4において、図17に示すように、論理ブロックアドレスA+3のブロックの先頭のページにおけるスペアエリアの更新中フラグがオンにされる。
【0016】
ステップS5では、記録制御装置は、書き込み対象ブロックである論理ブロックアドレスA+3のブロックの論理ブロックアドレスを、論理物理アドレス変換テーブル上において、予備エリアの論理ブロックアドレスA+nに変更する。このとき、論理ブロックアドレスA+3のブロックデータ上のスペアエリアの論理アドレスは書き換えない。
【0017】
また、論理ブロックアドレスがA+nであった予備エリアの論理ブロックアドレスを、論理物理アドレス変換テーブル上において、A+3に変換する。この論理アドレスの入れ換えは、新規に書き込むブロックのスペアエリアの論理アドレスに、A+3が書かれるようにするためである。
【0018】
そして、この論理アドレスの入れ換えにより、論理上、あたかも、書き込み対象の元のブロックデータが、予備エリアに退避され、書き込み対象の元のブロックデータがあった論理ブロックアドレスが空きエリアになったようになる。
【0019】
以上のようなステップS5の処理が終了したら、記録制御装置は、図15の▲1▼−1を付して示すように、書き込み対象ページよりも前のアドレス順位のすべてのページデータを、書き込み対象の元のブロックから、書き込み先のブロックエリアの対応するページにコピーする(ステップS6)。ただし、このとき、コピー先のブロックの先頭のページのスペアエリアの更新中フラグはオフとされる。
【0020】
次に、記録制御装置は、図15の▲1▼−2で示すように、書き込み対象ページのデータを、書き込み先のブロックエリアの対応するページに書き込む(ステップS7)。
【0021】
次に、記録制御装置は、図15の▲1▼−3で示すように、書き込み対象ページよりも後のアドレス順位のすべてのページデータを、書き込み対象の元のブロックから、書き込み先のブロックエリアの対応するページにコピーする(ステップS8)。
【0022】
以上のようにして、書き込み対象の元のブロックの、すべてのページのデータについて、書き換えが終了したら、記録制御装置は、論理上、予備エリアに退避していた書き込み対象の元のブロックのデータを消去する(ステップS9)。これにより、論理上の予備エリアは空きエリアとなる。
【0023】
次に、記録制御装置は、書き込みが終了したか否か判別し(ステップS10)、終了していなければ、ステップS3に戻って、次の書き込み対象ブロックおよび書き込み対象ページを決定し、以上の処理を繰り返す。また、ステップS10で書き込み終了であると判別したときには、この書き込み処理ルーチンを終了する。
【0024】
ところで、以上のような書き込み処理の最中に、停電や電池切れなどの理由で、電源電圧が遮断されると、書き込み処理が完了しないことになる。その場合に対処するため、従来は、電源電圧の再投入時にリセット処理を行なって、フラッシュメモリのアドレス管理上、不具合が生じないようにしている。
【0025】
図18は、電源電圧が再投入されたときのリセット処理を説明するためのフローチャートである。
【0026】
すなわち、記録制御装置は、電源電圧が再投入されると、図18のリセット処理をスタートさせ、各ブロックの先頭のページのスペアエリアの論理アドレスを検索して、同じ論理アドレスのブロックが2つあるか否か判別する(ステップS21)。
【0027】
前述したように、論理上、予備エリアに退避された書き換え対象の元のブロックのページデータ上のスペアエリアの論理アドレスは元のままであるので、書き換え先のブロックのページデータ上のスペアエリアの論理アドレスと同じ状態となる。したがって、書き込み処理の途中で電源が遮断されたときには、論理アドレスが同一のブロックが2個存在することになる。ただし、書き換え対象の元のブロックでは更新中フラグがオンとされているので、更新中フラグがオフである書き換え先のブロックとは区別が可能である。
【0028】
以上のことに基づいて、ステップS21で、論理アドレスが同一のブロックが2つあると判別したときには、書き込み処理の途中で電源が遮断されたと判断し、それら2つのブロックのうちの、更新中フラグがオンであるブロックのデータは残し、更新中フラグがオフであるブロックのデータは、すべて消去する(ステップS22)。これにより、ページ書き込み処理前の状態に戻る。そして、リセット処理を終了し、次の処理に移る。
【0029】
また、ステップS21で、論理アドレスが同一のブロックは一つしかないと判別したときには、書き込み処理が途中のものは無いとして、このリセット処理をそのまま終了し、次の処理に移る。
【0030】
【特許文献1】
特開2000−311104号公報
【0031】
【発明が解決しようとする課題】
以上のように、従来のフラッシュメモリの記録制御方法においては、1ページのデータの書き込みを行なうごとに、1ブロックのすべてのページを書き込み先のブロックに書き換え(コピーを含む)、書き込み対象の元のブロックは、消去するようにする。
【0032】
したがって、1ページのデータの書き込みが、ブロック単位の書き込みおよび消去を伴うことになるため、従来のフラッシュメモリの記録制御方法においては、書き込み処理速度が遅いという問題があった。
【0033】
これに対し、1ページのデータの書き込みが終了したときに、そのページの後順位のアドレスのすべてのページをコピーする処理をする前に、次の書き込みページアドレスが、書き込み中のブロック内であって、書き込み終了したページの後順位のアドレスかどうかを判別し、次の書き込みページアドレスが、書き込み中のブロック内であって、書き込み終了したページの後順位のアドレスであれば、当該次の書き込みページアドレスまでのページのデータをコピーした後、次の書き込みページのデータを書き込むようにすることが考えられる。
【0034】
この書き込み制御方法によれば、フラッシュメモリへのデータの書き込み速度を高速化することが可能になる。
【0035】
しかしながら、フラッシュメモリのTOCエリアと呼ばれる管理エリアにおいては、予め定められたアドレス順序で、予め定められた内容のデータが書き込まれるようにされている。そして、このTOCエリアにおけるページ単位のデータの書き換えは、必ずしも、アドレス順序に従って行なわれるのではなく、後述もするように、ランダムなアドレス順序で一般的に行なわれる。
【0036】
したがって、上述したような改良した記録制御方法を用いたとしても、TOCエリアの書き込み速度の向上には効果は少ない。
【0037】
そして、TOCエリアでの書き込みあるいは書き換え処理時間が大きい場合には、例えば、フラッシュメモリを録音用媒体として用いる場合には、録音終了時、停止操作等において、操作に対するレスポンスが悪くなり、録音用電子機器の商品性が著しく損なわれるという問題があった。
【0038】
この発明は、以上の点にかんがみ、例えばフラッシュメモリのような記録媒体において、TOCエリアのように、予め定められたアドレス順序で、予め定められた内容のデータが書き込まれるようにされる記録領域の記録制御方法として書き込み処理速度の高速化が可能なものを提供することを目的とする。
【0039】
【課題を解決するための手段】
上記課題を解決するために、この発明による記録媒体の記録制御方法は、
書き込みは予め定められたデータ数のデータ群ごとに、アドレス順になされる必要がある記録媒体において、予め定められたアドレス順序で、予め定められた内容のデータが書き込まれるようにされた所定のメモリ領域に対する記録制御方法であって、
前記データ群毎の書き込み指示に対して、それぞれの前記データ群が、本来前記所定のメモリ領域において書き込まれるべき本来アドレス位置を、前記メモリ領域においてアドレス順となる変換アドレス位置に変換することにより、前記所定のメモリ領域において、前記データ群毎の書き込みを順次に行なうようにすると共に、
前記本来アドレス位置と前記変換アドレス位置との対応関係を示す情報を保持する
ことを特徴とする。
【0040】
上述の構成のこの発明によれば、ランダムなアドレス位置に対するデータ群毎の書き込み指示によるデータは、指定された通りの本来のアドレス位置に書き込むのではなく、所定のメモリ領域において、アドレス順となるような変換アドレス位置に順次に書き込む。したがって、データ群毎の書き込みは非常に高速になされる。
【0041】
そして、本来のアドレス位置と、変換アドレス位置との対応関係を示す情報を、例えばテーブル情報として保持するようにする。したがって、上述のように書き込まれたとしても、所定のメモリ領域からのデータの読み出しは、当該保持された対応関係を示す情報を元に行なうことができる。
【0042】
【発明の実施の形態】
以下、この発明による記録媒体の記録制御方法および装置の実施形態を、IC(Integrated Circuit;集積回路)レコーダに適用した場合を例に、図を参照しながら説明する。
【0043】
図3は、この実施形態が適用されるICレコーダの構成例を示すブロック図である。
【0044】
この図3の例のICレコーダにおいては、マイクロコンピュータにより構成される制御部1に対して、記録媒体としてのフラッシュメモリ2と、表示素子の例としてのLCD(Liquid Crystal Display)3についての表示制御を行なう表示制御部4と、操作入力部5を当該制御部1に接続するための操作入力部インターフェース6と、USB(Universal Serial Bus)インターフェース7とが接続されている。
【0045】
制御部1を構成するマイクロコンピュータは、この例では、CPU(Central Processing Unit)11と、プログラムROM(Read Only Memory)12と、ワークエリア用RAM(Random Access Memory)13とを内蔵している。プログラムROM12と、ワークエリア用RAM13とが、CPUに対して外付けにされているマイクロコンピュータを用いることも勿論できる。
【0046】
制御部1と、フラッシュメモリ2とからなる構成部分が、記録媒体の記録制御装置の実施形態を構成する部分となる。
【0047】
この例のICレコーダにおいては、マイクロホン21からの音声信号は、アンプ22を通じて記録処理部23に供給される。記録処理部23では、制御部1による制御の下に、音声信号をデジタル信号に変換すると共に、データ圧縮を行なう。
【0048】
制御部1は、操作入力部5からの記録指示を、操作入力部インターフェース6を通じて受け取ると、記録処理部23からの音声データを受け取り、フラッシュメモリ2に書き込む。
【0049】
また、制御部1は、操作入力部5から再生指示を、操作入力部インターフェース6を通じて受け取ると、フラッシュメモリ2から音声データを読み出して再生処理部24に送出する。再生処理部24では、制御部1の制御の下に、受け取った音声データの圧縮を解凍し、また、デジタル音声信号をアナログ音声信号に戻す。そして、再生処理部24は、アナログ音声信号をアンプ25を通じて、例えばイヤホンが接続される音声信号出力端子に供給する。
【0050】
また、制御部1は、表示制御部4を介して所定の表示をLCD3の画面上において行なう。
【0051】
さらに、この例のICレコーダにおいては、USBコネクタ8にUSBケーブルを通じて、例えばパーソナルコンピュータを接続することができる。そして、制御部1は、フラッシュメモリ2に記録されている音声データを読み出して、USBインターフェース7を通じてパーソナルコンピュータにデータ転送したり、パーソナルコンピュータからのデータをUSBインターフェース7を通じて受けて、フラッシュメモリ2に書き込んだりすることができる。
【0052】
また、この例では、フラッシュメモリ2に書き込まれる音声データについては、用件ごとに管理することが可能とされており、各用件毎の音声データについては、文字コメントを付加することができるようにされている。そして、その文字コメントは、LCD3の画面に表示することができるようにされている。
【0053】
この場合のフラッシュメモリ2におけるメモリエリア管理について説明する。図4は、この例のフラッシュメモリ2のメモリエリアの説明図である。図4において、「BANK0」および「BANK1」と、「EXTERNAL」とは、TOCエリアである。また、「PCM DATA」は、音声データが書き込まれるエリアである。
【0054】
「EXTERNAL」は、文字コメントが書き込まれるエリアである。この例においては、音声データの1用件あたりについて、入力可能な文字は、256バイト分とされ、1ページに割り当てられる。つまり、1ページに1用件分の文字コメントが割り当てられる。
【0055】
「BANK0」および「BANK1」のそれぞれは、「FOLDER INDEX ADRESS STAGE」と、「EXTERNAL MAP」と、「BLANK MAP」と、「REVISION」とを含む。
【0056】
「FOLDER INDEX ADRESS STAGE」は、各用件毎の音声データが「PCM DATA」のエリアのどこにあるか(ページ単位)、また、当該音声データに対応する文字コメントが「EXTERNAL」のエリアのどこにあるか(ページ単位)を管理するための情報を格納する。
【0057】
「EXTERNAL MAP」は、「EXTERNAL」のエリアに文字コメントがどのように書き込まれていて、どのページが空きエリアであるかを管理するための情報を格納する。
【0058】
「BLANK MAP」は、「PCM DATA」にどのように音声データが書き込まれているかの情報を格納する。「REVISION」は、「BANK0」、「BANK1」の改訂回数を示す番号を管理する。
【0059】
この例のICレコーダの場合、USBインターフェース7を通じて接続されるパーソナルコンピュータに、文字コメントを書き込むためのアプリケーションソフトウエアが搭載される。そして、そのアプリケーションにおいては、パーソナルコンピュータの画面に、フラッシュメモリ2に格納されている多数の用件のそれぞれ毎に、文字コメントの書き込み欄が表示され、当該書き込み欄に文字コメントが入力される。
【0060】
そして、入力された文字コメントのデータは、USBインターフェース7を通じてパーソナルコンピュータからICレコーダに転送され、制御部1は、フラッシュメモリ2の「EXTERNAL」のエリアに、転送されてきた文字コメントのデータを書き込む。この場合において、制御部1は、「EXTERNAL」のエリアには、「EXTERNAL MAP」を参照して、空いているエリアをサーチして文字コメントを書き込むようにする。ただし、この例では、「EXTERNAL」のエリアには、アドレス番号順であって、先順位の空きページエリアから順に書き込みを行なうように定められている。
【0061】
なお、「BANK0」および「BANK1」の2つがあるのは、一方に一つ前のTOC情報を格納しておき、常に、一つ前の状態には戻れるようにするためである。つまり、TOCが書き換えられているときに、突然の電源遮断が発生しても、書き換えられているのは一方のBANKであり、書き換えられていない一つ前の状態のBANKの情報には必ず戻ることができる。
【0062】
また、「REVISION」のエリアに格納されている改訂回数を示す番号を参照することにより、「BANK0」および「BANK1」の2つのうちの、いずれが旧く、いずれが新しいTOC情報であるかを知ることができる。
【0063】
図5は、「BANK0」または「BANK1」のいずれか一方のエリア(以下、BANKエリアという)に書き込まれるTOC情報の詳細フォーマットの一例を示すものである。これは,1ブロック分である。この図5に示すように、BANKエリアにおいては、予め定められた物理アドレスに、予め定められた内容のデータが、ページ単位で、記録されるようにされている。
【0064】
なお、実際的には、フラッシュメモリ2の使用により、メモリエリアとして使用できなくなるエリアが生じることにかんがみ、BANKエリアは、固定的な物理アドレスに固定されるわけではなく、BANKエリアとされる論理上のアドレスに対して、実際にBANKエリアとして使用されている物理アドレスが対応付けられるように管理されるが、この明細書においては、説明の便宜上、BANKエリアには、物理アドレスなる語を、そのまま使用することとする。
【0065】
次に、図6〜図12を参照して、BANKエリアの使われ方およびデータ更新の例を説明する。
【0066】
図6は、BANKエリアの使われ方の一例であり、これは、音声データファイルを管理する場合である。この図6において、「EXTERNAL」のエリアおよび「PCM DATA」のエリアにおいて、「0」、「1」、「2」・・・と数字を付与して示した四角形部分は、ページ単位のデータが記録されているページアドレス位置の例を示している。それぞれのアドレス位置には、「EXTERNAL」のエリアでは、文字コメントのデータが記録されており、また、「PCM DATA」のエリアにおいては、音声データが記録されている。
【0067】
そして、「FOLDER INDEX ADRESS STAGE」のエリアには、各用件ごとに、「PCM DATA」のエリア内での音声データの所在ページと、「EXTERNAL」のエリア内での文字コメントデータの所在ページを示す情報が書き込まれている。
【0068】
例えば、最初の用件についての記述「address0,3:Info4」は、当該用件の音声データは、「PCM DATA」のエリアのページアドレス位置「0」、「3」に記録されており、また、文字コメントデータは、「EXTERNAL」のエリアのページアドレス位置「4」に記録されていることを示している。
【0069】
そして、「EXTERNAL MAP」のエリアには、「EXTERNAL」のエリア内におけるページ単位の記録位置の使われ方を示す情報が記録されている。また、「BLANK MAP」のエリアには、「PCM DATA」のエリア内におけるページ単位の記録位置の使われ方を示す情報が記録されている。
【0070】
次に、BANKのデータが更新された場合のいくつかの例を説明する。以下に説明する例では、図6のような状態で記録されている場合において、「BANK0」にあった元のデータから作成された更新結果のデータは、「BANK1」に書き込まれ、「BANK1」の「REVISION」が新しい番号に更新される。
【0071】
図7は、図6のような状態で記録されている場合において、図6の「FOLDER INDEX ADRESS STAGE」のエリアにおける1番目の用件と、3番目の用件との並び順を変更した場合である。なお、図7〜図11においては、「FOLDER INDEX ADRESS STAGE」のエリアは、図面スペースの関係上、「INDEX & ADRESS」と示してある。
【0072】
この用件の並び順の変更のときには、図5の詳細フォーマットにおいては、「FOLDER DATA」および「ADDRESS DATA」のうちの必要なページデータの書き換えとなり、ランダムな順序で書き込みコマンドが発生する。
【0073】
図8は、図6のような状態で記録されている場合において、図6の「FOLDER INDEX ADRESS STAGE」のエリアにおける4番目の用件を、2分割した場合である。
【0074】
この場合には、図5の詳細フォーマットにおいては、「FOLDER DATA」および「ADDRESS DATA」のうちの必要なページデータの書き換えおよび追加と、「EXTERNAL DATA」の書き換えが必要になる。
【0075】
図9は、図6のような状態で記録されている場合において、図6の「FOLDER INDEX ADRESS STAGE」のエリアにおける3番目の用件と4番目の用件とを結合した場合である。
【0076】
この場合にも、図5の詳細フォーマットにおいては、「FOLDER DATA」および「ADDRESS DATA」のうちの必要なページデータの書き換えおよび追加と、「EXTERNAL DATA」の書き換えが必要になる。
【0077】
図10は、図6のような状態で記録されている場合において、用件が追加された場合である。
【0078】
この場合には、図5の詳細フォーマットにおいては、「FOLDER DATA」および「ADDRESS DATA」のうちの必要なページデータの書き換えおよび追加と、「BLANK DATA」および「EXTERNAL DATA」の書き換えが必要になる。
【0079】
図11は、図6のような状態で記録されている場合において、用件が削除された場合である。
【0080】
この場合には、図5の詳細フォーマットにおいては、「FOLDER DATA」および「ADDRESS DATA」のうちの必要なページデータの書き換えと、「BLANK DATA」および「EXTERNAL DATA」の書き換えが必要になる。
【0081】
以上のようなBANKエリアの更新は、必要なページデータのみが更新、追加、削除されることにより行なわれ、アドレス順にページ書き込みコマンドが発生するのではなく、ランダムな順序で、ランダムなアドレス位置から開始されることになる。
【0082】
したがって、従来の書き込み制御方法では、1ページのデータの書き換えの都度、ブロック単位の書き換えを行なうとともに、一つのブロック内では、ページコピーを繰り返すような処理を行なう必要があり、TOCエリアの書き換えに非常に時間がかかり、ユーザ操作に対するレスポンスが悪いという問題を生じていた。
【0083】
[実施形態におけるTOCエリアでの書き込み制御]
次に、この実施形態におけるフラッシュメモリ2のTOCエリアのデータの書き込み制御について、説明する。
【0084】
図12は、この実施形態におけるTOCエリアでの書き込み制御方法を説明するための図である。図12の左側は、フラッシュメモリ2上のBANKエリアを示すもので、BPA[0]、BPA[1]、BPA[2]、BPA[3]、BPA[4]・・・BPA[i](iは、BANKエリアの先頭から、何番目のページであるかを示す数値であり、i=0,1,2,・・・である)・・・は、BANKエリアの物理ページアドレスである。
【0085】
この物理ページアドレスBPA[i]は、図4における「address」に対応するものであり、本来は、それぞれのアドレス位置には図5に示した「エントリ」の欄に示される各データが書き込まれるべきものである。
【0086】
しかし、この実施形態においては、BANKエリアの物理ページアドレスBPA[i]のそれぞれには、図5に示した「エントリ」の欄に示されるデータを書き込むという制御を行なうのではなく、BANKエリアに対する書き込みページアドレスコマンドが発生した順に、当該書き込みページアドレスに書き込むべきデータを、BANKエリアの先頭ページアドレス(物理ページアドレス)から順に書き込むようにする。
【0087】
すなわち、マイクロコンピュータ1から、フラッシュメモリ2のBANKエリアについての書き込みページアドレスが発生すると、その書き込みページアドレスに書き込むべきデータがBANKエリアにおいて本来書き込まれるべき物理ページアドレス(本来アドレス位置)から、BANKエリアにおいてアドレス順の位置となる物理ページアドレス(変換アドレス位置)に変換して、当該変換した物理ページアドレスに、順に書き込むようにする。
【0088】
ただし、この実施形態においては、図5において、「REVISION」番号が書き込まれる先頭ページの「INDEX HEADER」は、BANKエリアの先頭の物理ページアドレスに固定的に書き込むようにする。また、最後のページの「LAST V Page」も、BANKエリアの最後の物理ページアドレスに固定的に書き込むようにする。
【0089】
このようにすれば、BANKエリアの物理ページアドレスの先頭から順にページデータを書き込むようになるので、1ページの書き込みを終了した後、1ブロック内の後順位のページアドレスのページデータをコピーするのではなく、次のページの書き込みを継続して行なうようにすることができる。したがって、TOCエリアへのデータを高速に書き込むことができる。
【0090】
しかし、そのままでは、図5のBANKエリアのエントリの内容を、読み出すことができなくなってしまう。そこで、この実施形態では、マイクロコンピュータ1から与えられるBANKエリアについての書き込みページアドレスのデータが、物理ページアドレスBPA[i]のどこに書き込まれたかの対応関係を示す情報を形成して、保持するようにする。
【0091】
この対応関係を示す情報として、この実施形態では、次に示すようなページアドレス変換テーブルを用いる。
【0092】
この実施形態では、マイクロコンピュータ1から与えられるBANKエリアについての書き込みページアドレスを、「論理ページアドレス」と呼ぶことにする。図12において、LPA[0]、LPA[1]、LPA[2]、LPA[3]、LPA[4]・・・LPA[j](jは、BANKエリアの先頭から、何番目のページであるかを示す数値であり、j=0,1,2,・・・である)・・・は、この倫理ページアドレスである。
【0093】
論理ページアドレスは、上位レイヤが、「BANKエリアにおいて図4の「エントリ」の欄に示されるデータをそこに書き込んだ」と認識している仮想のページアドレスである。従来のように、図5のエントリの各データを、BANKエリアの物理ページアドレスに書き込むのであれば、BPA[i]=LPA[j](i=j)となるべきものである。しかし、前述したように、この実施形態では、BANKエリアには、そのように書き込むものではない。
【0094】
この実施形態では、図12の右側に示すように、BANKエリアへの書き込みに際して、マイクロコンピュータ1のRAM13内に、この論理ページアドレスLPA[j]のデータが、BANKエリアのどの物理ページアドレスBPA[i]に書き込まれたの対応テーブル(以下、ページアドレス変換テーブルと呼ぶ)を形成しながら、BANKエリアへのページデータの書き込みをするようにする。
【0095】
この場合に、物理ページアドレスBPA[i]および論理ページアドレスLPA[j]は、ページ単位で管理できればよいので、この例では、BANKエリアの先頭からの、ページ単位のオフセット番号を用いるようにする。したがって、BANK0、BANK1は図5に示したように32Kバイトであるので、BANK0およびBANK1のそれぞれについて、ページアドレス変換テーブルに書き込む物理ページアドレスBPA[i]としては、「0」〜「63」のうちのいずれかの値が格納される。なお、ページアドレス変換テーブルに格納された値が、「0xff」の場合には、そのページには、未だ書き込みがなされていないことを意味している。
【0096】
そして、後述するように、この実施形態では、RAM13内に形成したページアドレス変換テーブルは、BANKエリアの「LAST V Page」に書き込むようにしている。BANKエリアの「LAST V Page」は、この例では、上述したように、BANKエリアの最後の物理ページアドレスに固定的に書き込むようにしているので、ページアドレス変換テーブルを迅速に参照することができる。
【0097】
なお、ページアドレス変換テーブルは、BANKエリアのページアドレス変換テーブルを用いて変換されるページエリアに書き込むようにしても勿論よいし、また、フラッシュメモリ2内の他のメモリエリアや、フラッシュメモリ2外の不揮発性記憶手段に書き込んで保持しておくようにしても勿論よい。
【0098】
次に、フラッシュメモリ2のTOCエリアの書き換え時におけるBANKエリアへの書き込み(書き換え)処理手順についてさらに説明する。
【0099】
図1および図2は、この実施の形態におけるフラッシュメモリ2のTOCエリアへのデータ書き込み時の処理動作のフローチャートであり、これは、制御部1のCPU11がROM12のプログラムに従って実行する処理を中心に記述したものである。
【0100】
すなわち、制御部1は、TOCエリアに対する書き込み指示が発生したか否か判別し(ステップS101)、書き込み指示が発生していないと判別したときには、その他の処理を実行する(ステップS102)。
【0101】
ステップS101で、書き込み指示が発生したと判別したときには、CPU11は、BANK0とBANK1のうちで古い方のBANKエリアのデータを消去して空きエリアにすると共に、RAM13に、前述した論理ページアドレスLPA[j]に対する物理ページアドレスBPA[i]の対応を示すページアドレス変換テーブルのエリアを用意し、当該ページアドレス変換テーブルのすべてのアドレス(論理ページアドレスLPA[j]に対応)のデータを消去して「0xff」に初期化する(ステップS103)。
【0102】
次に、CPU11は、空きエリアにしたBANKエリアの先頭の物理アドレスBPA「0」には、「REVISION」番号を含む「INDEX HEADER」を書き込むようにする(ステップS104)。
【0103】
次に、CPU11は、書き込みページアドレスとしての論理ページアドレスLPA[j]を認識し(ステップS105)、この論理ページアドレスLPA[j]のデータPD(LPA[j])を書き込むべき、空きBANKエリアの物理ページアドレスBPA[i]を求める。この論理ページアドレスLPA[j]に対する物理ページアドレスBPA[i]は、空きBANKエリアにおいて前回書き込んだ物理ページアドレスの次の物理ページアドレス(ページアドレス順序が一つ後順位の物理ページアドレス)を割り当てて求めるようにする(ステップS106)。
【0104】
次に、CPU11は、RAM13に用意されているページアドレス変換テーブルにおいて、ステップS105で書き込み指定された論理ページアドレスに対応するRAM13のアドレスに、求めた空きBANKエリアの物理ページアドレスを書き込む(ステップS107)。
【0105】
そして、ステップS106で求めた空きBANKエリアの物理ページアドレスに、書き込み指定された論理ページアドレスLPA[j]のデータPD(LPA[j])を書き込む(ステップS108)。
【0106】
次に、CPU11は、BANKエリアに対する書き込みページアドレス指示が終了したか否か判別し(ステップS109)、終了していないと判別したときには、ステップS105に戻り、上述のステップS105以降の処理を繰り返す。
【0107】
また、ステップS109で、BANKエリアに対する書き込みページアドレス指示が終了したと判別したときには、RAM13のページアドレス変換テーブル上において、「0xff」である未書き込みとなっている論理ページアドレスを、ページアドレス順に探す(図2のステップS111)。
【0108】
次に、CPU11は、検出した未書き込みの論理ページアドレスのデータを書き込むべき、空きBANKエリアの物理ページアドレスとして、空きBANKエリアにおいて前回書き込んだ物理ページアドレスの次の物理ページアドレス(ページアドレス順序が一つ後順位の物理ページアドレス)を割り当てて求める(ステップS112)。
【0109】
そして、CPU11は、RAM13のページアドレス変換テーブルにおいて、検出した未書き込みの論理ページアドレスに対して、ステップS112で求めた物理ページアドレスを書き込む(ステップS113)。
【0110】
次に、CPU11は、書き換え元のBANKエリアの、当該論理ページアドレスに対応するページアドレスにあるデータを、ステップS112で求められた空きBANKエリアの物理ページアドレスに書き込む(ステップS114)。つまり、ページデータをコピーする。
【0111】
次に、CPU11は、RAM13のページアドレス変換テーブル上において、BANKエリアの最終ページの前までの書き込みが終了したか否か判別し(ステップS115)、終了していないと判別したときには、ステップS111に戻り、上述したステップS111以降の処理を繰り返す。
【0112】
また、ステップS115で、BANKエリアの最終ページの前までの書き込みが終了したと判別したときには、空きBANKエリアの最終ページに、RAM13上に形成されているページアドレス変換テーブルを書き込む(ステップS116)。以上により、TOCエリアのBANKエリアに対する書き込みは終了する。
【0113】
次に、以上の処理手順を、図11を参照してより具体的に説明すると以下のようになる。例えば、図11に示したように、▲1▼、▲2▼、▲3▼、▲4▼・・・という順番で、マイクロコンピュータ1から、BANKエリアに対する書き込みページアドレス(論理ページアドレス)が発生した場合について、BANKエリアへの書き込み手順を説明する。
【0114】
制御部1は、BANKエリアの書き込みページが▲1▼番目の論理ページアドレスLPA[30]として決定されると、この論理ページアドレスLPA[30]のデータPD(LPA[30])を書き込むべき、BANKエリアの物理ページアドレスとして、BANKエリアの2番目の物理ページアドレスBPA[1]を検出する。
【0115】
そこで、制御部1では、RAM13のページアドレス変換テーブルの論理ページアドレスLPA[30]に対して、物理ページアドレスBPA[1]を書き込む。これに先立ち、BANKエリアの物理ページアドレスBPA[0]には、「INDEX HEADER」のデータPD(LPA[0])が書き込まれており、ページアドレス変換テーブルの論理ページアドレスLPA[0]には、物理ページアドレスBPA[0]が書き込まれている。
【0116】
次に、制御部1は、フラッシュメモリ2の空きBANKエリアの物理ページアドレスBPA[1]に、論理ページアドレスLPA[30]に書き込むべきデータPD(LPA[30])を書き込むようにフラッシュメモリ2を制御する。
【0117】
次に、制御部1は、BANKエリアに書き込むべき▲2▼番目の論理ページアドレスが論理ページアドレスLPA[8]として決定されると、この論理ページアドレスLPA[8]のデータPD(LPA[8])を書き込むべき、BANKエリアの物理ページアドレスとして、BANKエリアの2番目の物理ページアドレスBPA[2]を検出する。
【0118】
そして、制御部1では、RAM13のページアドレス変換テーブルの論理ページアドレスLPA[8]に対して、物理ページアドレスBPA[2]を書き込む。
【0119】
次に、制御部1は、フラッシュメモリ2の空きBANKエリアの物理ページアドレスBPA[2]に、論理ページアドレスLPA[8]に書き込むべきデータPD(LPA[8])を書き込むようにフラッシュメモリ2を制御する。
【0120】
また、▲3▼番目の書き込みページアドレス(論理ページアドレス)LPA[20]に対しては、空きBANKエリアの物理ページアドレスBPA[3]が割り当てられ、ページアドレス変換テーブルの論理ページアドレスLPA[8]に対して、物理ページアドレスBPA[3]が書き込まれると共に、空きBANKエリアの物理ページアドレスBPA[2]に、論理ページアドレスLPA[8]に書き込むべきデータPD(LPA[8])が書き込まれる。
【0121】
以下、同様にして、書き込みページアドレスの発生順位ごとに、空きBANKエリアの物理ページアドレスが、アドレス順に割り当てられ、ページアドレス変換テーブルの論理ページアドレスに対して割り当てられた物理ページアドレスが書き込まれると共に、論理ページアドレスに書き込まれるページデータが、空きBANKエリアの割り当てられた物理ページアドレスに書き込まれる。
【0122】
そして、この実施形態では、最終ページには、RAM13に形成されたページアドレス変換テーブルが書き込まれる。
【0123】
次に、BANKエリアからのTOC情報の読み出しについて説明する。
【0124】
読み出しの際には、制御部1は、先ず、フラッシュメモリ2のBANKエリアの最終ページのページアドレス変換テーブルを読み出して、RAM13に書き込む。
【0125】
次に、制御部1は、読み出し論理ページアドレスが発生するごとに、このRAM13上のページアドレス変換テーブルを参照して、当該指定された読み出し論理ページアドレスのデータが記録されているBANKエリアの物理ページアドレスを求め、求めた物理ページアドレスから指定された読み出し論理ページアドレスのデータを読み出すようにフラッシュメモリ2を制御する。
【0126】
以上により、BANKエリアに書き込まれたTOC情報は、支障なく、読み出されるものである。
【0127】
なお、この実施形態においては、TOCエリアの書き込み中に電源が遮断される等したときのリセットスタート時には、「LAST V Page」が存在しているBANKエリアのみを有効とするようにする。そして、通常使用状態では、「REVISION」番号の大きい方のBANKエリアを有効として使用するようにする。
【0128】
[他の実施形態]
以上の実施形態では、論理ページアドレスと物理ページアドレスとの対応関係を示す情報は、ページアドレス変換テーブルを、BANKエリアに記録するようにしたが、BANKエリアには、ページアドレス変換テーブルを書き込むのではなく、以下のようにすることもできる。
【0129】
この例においても、書き込み時にRAM13上にページアドレス変換テーブルを形成しながら、BANKエリアの物理ページアドレスに、そのアドレス順に順次にページデータを書き込むようにするのは、前述の実施形態と同様である。
【0130】
しかし、この実施形態では、ページアドレス変換テーブルをBANKエリアの最終ページに書き込むことはしない。その代わりに、図13に示すように、BANKエリアの各物理ページアドレスに書き込むページデータのスペアエリアに、対応する論理ページアドレスを書き込むようにする。前述したように、この論理ページアドレスは、BANKエリアの先頭からのオフセット番号であって、「0」〜「63」の値が用いられるので、1バイトによって表わすことができる。
【0131】
この例の場合には、読み出し時には、BANKエリアのすべてのページを一旦読み出して、それぞれのページデータに含まれる論理ページアドレスを読み出して、RAM13上に、ページアドレス変換テーブルを再構成するようにする。そして、このRAM13上に再構成したページアドレス変換テーブルを用いて、BANKエリアのデータの読み出しを前述の実施形態と同様に行なうようにする。
【0132】
[変形例]
以上の実施形態の説明は、記録媒体がNAND型フラッシュメモリである場合であるが、この発明は、TOCエリアにおいて、NAND型フラッシュメモリと同様のアドレス制御を書き込み時に行なわなければならない記録媒体のすべてに適用可能である。
【0133】
また、この発明が適用される電子機器は、ICレコーダに限られるものでないことも言うまでもない。そして、フラッシュメモリなどの記録媒体は、電子機器に内蔵の場合に限らずない。例えばフラッシュメモリがカード型メモリであって、挿脱可能なものであってもよい。
【0134】
また、上述の実施形態の説明では、書き込み制御の管理は、論理物理アドレス変換テーブルを用いて行なうようにしたが、このような方法に限られるものでないことは勿論である。
【0135】
また、上述の説明においては、ブロック内では、アドレスの小さいページから順番に昇順に書き込むようにした場合について説明したが、この発明は、アドレスの大きいページから順番に降順に書き込むようにする場合にも同様に適用できる。
【0136】
【発明の効果】
以上説明したように、この発明によれば、フラッシュメモリのTOCエリアのように、予め定められたアドレス順序で、予め定められた内容のデータが書き込まれるようにされる記録領域に対して、高速の書き込みが可能になる。
【図面の簡単な説明】
【図1】この発明による記録媒体の記録制御方法の実施形態を説明するためのフローチャートの一部である。
【図2】この発明による記録媒体の記録制御方法の実施形態を説明するためのフローチャートの一部である。
【図3】この発明による記録媒体の記録制御方法の実施形態が適用されるICレコーダの構成例を示す図である。
【図4】フラッシュメモリのメモリエリア構造を説明するための図である。
【図5】フラッシュメモリのTOCエリアに記録されるデータの詳細例を示す図である。
【図6】フラッシュメモリに記録されるTOCデータの内容を説明するための図である。
【図7】フラッシュメモリに記録されるTOCデータの書き換え例を説明するための図である。
【図8】フラッシュメモリに記録されるTOCデータの書き換え例を説明するための図である。
【図9】フラッシュメモリに記録されるTOCデータの書き換え例を説明するための図である。
【図10】フラッシュメモリに記録されるTOCデータの書き換え例を説明するための図である。
【図11】フラッシュメモリに記録されるTOCデータの書き換え例を説明するための図である。
【図12】この発明による記録媒体の記録制御方法の実施形態の処理手順を説明するための図である。
【図13】この発明による記録媒体の記録制御方法の他の実施形態を説明するための図である。
【図14】NAND型フラッシュメモリのデータ構成を説明するための図である。
【図15】NAND型フラッシュメモリについての、従来の記録制御方法を説明するための図である。
【図16】NAND型フラッシュメモリについての、従来の記録制御方法を説明するためのフローチャートである。
【図17】NAND型フラッシュメモリについての、従来の記録制御方法を説明するための図である。
【図18】従来の記録媒体の記録制御方法におけるリセット処理の例を説明するためのフローチャートである。
【符号の説明】
1…制御部、2…フラッシュメモリ
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a recording control method and apparatus suitable for writing control of a recording medium such as a flash memory, in particular, a TOC (Table of Contents) area.
[0002]
[Prior art]
The configuration of the recording data handled by the NAND flash memory is, for example, as shown in FIG. 14. Data is read and written in small block units called pages, and large data called blocks formed of a plurality of pages. Data is erased in block units.
[0003]
One page includes, for example, a 512-byte data area and a 16-byte spare area (redundant portion). Four bytes of the 16-byte spare area are used as an ECC (Error Correction Code) for error detection and correction.
[0004]
The method of controlling the reading and writing of the flash memory is, for example, as described in Japanese Patent Application Laid-Open No. 2000-31104.
[0005]
The recording control device that controls reading and writing of the flash memory manages, at a block unit, at which physical address of the flash memory data has been written by using a logical address. And a logical-physical address conversion table for performing conversion between physical addresses and logical addresses of the flash memory. The recording control device performs address control of the flash memory using the logical-physical address conversion table.
[0006]
In this case, the logical address is written in the spare area of each page. The spare area includes an updating flag indicating whether or not the logical address is being written to the block. The updating flag is turned on ("0") when writing is being performed, and is off ("1") when writing is not being performed.
[0007]
Next, an operation of writing data in page units in the NAND flash memory will be described. In this case, in the NAND flash memory, the write target block and the write target page can be determined at random. However, in the write processing procedure in the same block, from the top page of the address number, according to the address order. There is a restriction that it must be done. That is, in the same block, it is necessary to write data in order from the page with the smallest address. For this reason, conventionally, even in the case of writing in page units, the writing operation is performed in block units including the write target page.
[0008]
FIG. 15 is a diagram for explaining the outline of the page data write operation.
[0009]
That is, when writing page data to an empty area of one page in a certain block, an empty area of one block is prepared, and new data is written to a write target page address of the empty area. The data on the other pages of the block is copied from the original data. Then, after the writing process is completed, the original block is erased.
[0010]
FIG. 16 is a flowchart of the processing operation at the time of data writing, and mainly describes the processing executed by the recording control device that controls the reading and writing of the flash memory described above.
[0011]
That is, the recording control device determines whether or not a write instruction to the flash memory has been issued (step S1), and if it is determined that the write instruction has not been issued, performs other processing (step S2).
[0012]
When it is determined in step S1 that a write instruction has been issued, the recording control device determines the logical addresses of the write target block and the write target page (step S3), and updates the first page of the block of the logical address. The middle flag is turned on (step S4).
[0013]
Next, logically, a free block area in which a write target block is saved in a spare free area prepared in the logical physical address conversion table of the recording control device and a block having the same logical address as the logical address of the write target block can be written. (Step S5). The processing in step S5 will be further described with reference to FIG.
[0014]
That is, for example, as shown in FIG. 17, the flash memory has the effective area from the logical block address A to the logical block address A + n−1, and has a spare area for one block of the logical block address A + n. . Here, it is assumed that the spare area of the logical block address A + n has been erased and is an empty area.
[0015]
In the example of FIG. 17, it is assumed that the write target block is a block of the logical block address A + 3. Thus, in this example, in step S4, the updating flag of the spare area in the first page of the block of the logical block address A + 3 is turned on as shown in FIG.
[0016]
In step S5, the recording control device changes the logical block address of the logical block address A + 3, which is the write target block, to the logical block address A + n of the spare area on the logical physical address conversion table. At this time, the logical address of the spare area on the block data of the logical block address A + 3 is not rewritten.
[0017]
The logical block address of the spare area whose logical block address was A + n is converted to A + 3 on the logical / physical address conversion table. The replacement of the logical address is performed so that A + 3 is written in the logical address of the spare area of the block to be newly written.
[0018]
Then, by the replacement of the logical addresses, logically, the original block data to be written is evacuated to the spare area, and the logical block address where the original block data to be written becomes an empty area. Become.
[0019]
When the processing in step S5 as described above is completed, the recording control device writes all the page data in the address order preceding the page to be written, as indicated by (1) -1 in FIG. The target original block is copied to the corresponding page of the write destination block area (step S6). However, at this time, the updating flag of the spare area of the first page of the copy destination block is turned off.
[0020]
Next, as shown by (1) -2 in FIG. 15, the recording control device writes the data of the write target page to the corresponding page of the write destination block area (step S7).
[0021]
Next, as shown by (1) -3 in FIG. 15, the recording control device transfers all the page data of the address order after the page to be written from the original block to be written to the block area of the write destination. (Step S8).
[0022]
As described above, when rewriting of data of all pages of the original block to be written is completed, the recording control device logically replaces the data of the original block to be written, which has been evacuated to the spare area. Erase (step S9). As a result, the logical spare area becomes an empty area.
[0023]
Next, the recording control device determines whether or not the writing has been completed (step S10), and if not, returns to step S3 to determine the next block to be written and the next page to be written. repeat. When it is determined in step S10 that the writing has been completed, the writing processing routine is ended.
[0024]
By the way, if the power supply voltage is cut off during the above-described writing process due to a power failure or running out of battery, the writing process will not be completed. Conventionally, in order to cope with such a case, reset processing is performed when the power supply voltage is turned on again, so that no problem occurs in address management of the flash memory.
[0025]
FIG. 18 is a flowchart illustrating a reset process when the power supply voltage is turned on again.
[0026]
That is, when the power supply voltage is turned on again, the recording control device starts the reset processing of FIG. 18, searches the logical address of the spare area of the first page of each block, and finds two blocks having the same logical address. It is determined whether or not there is (step S21).
[0027]
As described above, since the logical address of the spare area on the page data of the original block to be rewritten evacuated to the spare area is logically the same as the original, the spare area on the page data of the block of the rewrite destination remains It is in the same state as the logical address. Therefore, when the power is turned off during the writing process, there are two blocks having the same logical address. However, since the updating flag is turned on in the original block to be rewritten, it can be distinguished from the rewriting destination block in which the updating flag is off.
[0028]
Based on the above, when it is determined in step S21 that there are two blocks having the same logical address, it is determined that the power supply has been interrupted during the write process, and the updating flag of the two blocks is determined. Are left on, and all the data of the blocks for which the updating flag is off are erased (step S22). This returns to the state before the page write processing. Then, the reset process ends, and the process proceeds to the next process.
[0029]
When it is determined in step S21 that there is only one block having the same logical address, it is determined that there is no write process in progress, the reset process is terminated, and the process proceeds to the next process.
[0030]
[Patent Document 1]
JP 2000-311104 A
[0031]
[Problems to be solved by the invention]
As described above, in the conventional flash memory recording control method, every time one page of data is written, all the pages of one block are rewritten (including the copy) to the write destination block, and the source of the write target is written. Block is erased.
[0032]
Therefore, the writing of one page of data involves writing and erasing in units of blocks, and the conventional flash memory recording control method has a problem that the writing processing speed is slow.
[0033]
On the other hand, when the writing of the data of one page is completed, before the process of copying all the pages of the post-order address of the page, the next write page address is in the block being written. Then, it is determined whether or not the next write page address is a post-order address in the block being written and if the next write page address is in the post-order address of the page in which the write operation has been completed. After copying the data of the page up to the page address, the data of the next write page may be written.
[0034]
According to this write control method, it is possible to increase the speed of writing data to the flash memory.
[0035]
However, in a management area called a TOC area of the flash memory, data having a predetermined content is written in a predetermined address order. The rewriting of data in page units in the TOC area is not always performed in accordance with the address order, but is generally performed in a random address order, as described later.
[0036]
Therefore, even if the improved recording control method as described above is used, the effect of improving the writing speed of the TOC area is small.
[0037]
If the writing or rewriting processing time in the TOC area is long, for example, when a flash memory is used as a recording medium, the response to the operation becomes poor at the end of recording, at a stop operation, and the like. There has been a problem that the merchantability of the device is significantly impaired.
[0038]
In view of the above, the present invention provides a recording area in which data having a predetermined content is written in a predetermined address order, such as a TOC area, in a recording medium such as a flash memory. It is an object of the present invention to provide a recording control method capable of increasing the write processing speed as a recording control method.
[0039]
[Means for Solving the Problems]
In order to solve the above-described problems, a recording control method for a recording medium according to the present invention includes:
A predetermined memory in which data having a predetermined content is written in a predetermined address order on a recording medium that needs to be written in an address order for each data group having a predetermined number of data. A recording control method for an area,
In response to a write instruction for each of the data groups, each of the data groups is converted from an original address position to be originally written in the predetermined memory area to a conversion address position in the memory area in an address order, In the predetermined memory area, writing for each data group is performed sequentially,
Holds information indicating the correspondence between the original address position and the translated address position
It is characterized by the following.
[0040]
According to the present invention having the above-described configuration, data according to a write instruction for each data group with respect to a random address position is not written at an original address position as specified, but in a predetermined memory area in address order. The data is sequentially written in such a conversion address position. Therefore, writing for each data group is performed at a very high speed.
[0041]
Then, information indicating the correspondence between the original address position and the converted address position is held, for example, as table information. Therefore, even if written as described above, reading of data from a predetermined memory area can be performed based on the information indicating the held correspondence.
[0042]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of a recording control method and apparatus of a recording medium according to the present invention will be described with reference to the drawings, taking as an example a case where the method is applied to an IC (Integrated Circuit) recorder.
[0043]
FIG. 3 is a block diagram showing a configuration example of an IC recorder to which this embodiment is applied.
[0044]
In the IC recorder shown in FIG. 3, a control unit 1 constituted by a microcomputer controls a flash memory 2 as a recording medium and a display control on an LCD (Liquid Crystal Display) 3 as an example of a display element. , An operation input unit interface 6 for connecting the operation input unit 5 to the control unit 1, and a USB (Universal Serial Bus) interface 7.
[0045]
In this example, the microcomputer constituting the control unit 1 includes a CPU (Central Processing Unit) 11, a program ROM (Read Only Memory) 12, and a work area RAM (Random Access Memory) 13. Of course, a microcomputer in which the program ROM 12 and the work area RAM 13 are external to the CPU can be used.
[0046]
The components including the control unit 1 and the flash memory 2 constitute the embodiments of the recording medium recording control device according to the embodiment.
[0047]
In the IC recorder of this example, the audio signal from the microphone 21 is supplied to the recording processing unit 23 through the amplifier 22. The recording processing unit 23 converts the audio signal into a digital signal and performs data compression under the control of the control unit 1.
[0048]
When receiving the recording instruction from the operation input unit 5 through the operation input unit interface 6, the control unit 1 receives the audio data from the recording processing unit 23 and writes the audio data into the flash memory 2.
[0049]
Further, upon receiving a reproduction instruction from the operation input unit 5 through the operation input unit interface 6, the control unit 1 reads out audio data from the flash memory 2 and sends it to the reproduction processing unit 24. The reproduction processing unit 24 decompresses the received audio data under the control of the control unit 1 and returns the digital audio signal to an analog audio signal. Then, the reproduction processing unit 24 supplies the analog audio signal via the amplifier 25 to, for example, an audio signal output terminal to which an earphone is connected.
[0050]
The control unit 1 performs a predetermined display on the screen of the LCD 3 via the display control unit 4.
[0051]
Further, in the IC recorder of this example, for example, a personal computer can be connected to the USB connector 8 via a USB cable. Then, the control unit 1 reads out the audio data recorded in the flash memory 2 and transfers the data to the personal computer through the USB interface 7 or receives the data from the personal computer through the USB interface 7 and sends the data to the flash memory 2. Can be written.
[0052]
In this example, audio data written to the flash memory 2 can be managed for each message, and a text comment can be added to the audio data for each message. Has been. The character comment can be displayed on the screen of the LCD 3.
[0053]
The memory area management in the flash memory 2 in this case will be described. FIG. 4 is an explanatory diagram of a memory area of the flash memory 2 of this example. In FIG. 4, “BANK0” and “BANK1” and “EXTERNAL” are TOC areas. “PCM DATA” is an area in which audio data is written.
[0054]
“EXTERNAL” is an area where a text comment is written. In this example, the characters that can be input are 256 bytes and are assigned to one page for each message of the audio data. That is, a text comment for one business is assigned to one page.
[0055]
Each of “BANK0” and “BANK1” includes “FOLDER INDEX ADDRESS STAGE”, “EXTERNAL MAP”, “BLANK MAP”, and “REVISION”.
[0056]
“FOLDER INDEX ADDRESS STAGE” indicates where in the “PCM DATA” area the audio data for each message is located (in page units), and where in the “EXTERNAL” area is the text comment corresponding to the audio data. Stores information for managing (per page).
[0057]
The “EXTERNAL MAP” stores information for managing how a text comment is written in the “EXTERNAL” area and which page is a free area.
[0058]
“BLANK MAP” stores information on how audio data is written in “PCM DATA”. “REVISION” manages a number indicating the number of revisions of “BANK0” and “BANK1”.
[0059]
In the case of the IC recorder of this example, application software for writing a character comment is mounted on a personal computer connected through the USB interface 7. In the application, a text comment writing field is displayed on the screen of the personal computer for each of a large number of messages stored in the flash memory 2, and the text comment is input to the writing field.
[0060]
Then, the input character comment data is transferred from the personal computer to the IC recorder through the USB interface 7, and the control unit 1 writes the transferred character comment data in the “EXTERNAL” area of the flash memory 2. . In this case, the control unit 1 searches an empty area and writes a character comment in the “EXTERNAL” area with reference to “EXTERNAL MAP”. However, in this example, it is determined that writing is performed in the "EXTERNAL" area in the order of address number, starting from the empty page area having the first priority.
[0061]
It should be noted that there are two “BANK0” and “BANK1” in order to store the immediately preceding TOC information in one of them so that it can always return to the previous state. In other words, even if a sudden power-off occurs while the TOC is being rewritten, it is only one BANK that has been rewritten and always returns to the previous BANK information that has not been rewritten. be able to.
[0062]
Further, by referring to the number indicating the number of revisions stored in the area of “REVISION”, it is possible to know which of “BANK0” and “BANK1” is older and which is new TOC information. be able to.
[0063]
FIG. 5 shows an example of the detailed format of the TOC information written in one of the areas “BANK0” and “BANK1” (hereinafter referred to as a BANK area). This is for one block. As shown in FIG. 5, in the BANK area, data having a predetermined content is recorded at a predetermined physical address in page units.
[0064]
Actually, in consideration of the fact that the use of the flash memory 2 causes an area that cannot be used as a memory area, the BANK area is not fixed to a fixed physical address, but is a logical area defined as a BANK area. The above address is managed so that a physical address actually used as a BANK area is associated with the address. In this specification, for convenience of explanation, the BANK area includes a word “physical address”. It will be used as it is.
[0065]
Next, an example of how the BANK area is used and an example of data update will be described with reference to FIGS.
[0066]
FIG. 6 shows an example of how the BANK area is used, which is a case where an audio data file is managed. In FIG. 6, in the “EXTERNAL” area and the “PCM DATA” area, squares indicated by numbers “0”, “1”, “2”,. An example of a recorded page address position is shown. At each address position, character comment data is recorded in the “EXTERNAL” area, and audio data is recorded in the “PCM DATA” area.
[0067]
In the “FOLDER INDEX ADDRESS STAGE” area, the location page of the audio data in the “PCM DATA” area and the location page of the character comment data in the “EXTERNAL” area are listed for each message. The indicated information has been written.
[0068]
For example, the description “address0,3: Info4” of the first message indicates that the audio data of the message is recorded at the page address positions “0” and “3” in the “PCM DATA” area. Indicates that the character comment data is recorded at the page address position “4” in the “EXTERNAL” area.
[0069]
In the “EXTERNAL MAP” area, information indicating how to use the recording position in page units in the “EXTERNAL” area is recorded. In the area of “BLANK MAP”, information indicating how to use the recording position in page units in the area of “PCM DATA” is recorded.
[0070]
Next, some examples in the case where BANK data is updated will be described. In the example described below, when the data is recorded in the state as shown in FIG. 6, the updated result data created from the original data that was in “BANK0” is written in “BANK1,” and “BANK1.” Is updated to the new number.
[0071]
FIG. 7 shows a case where the order of the first message and the third message in the “FOLDER INDEX ADDRESS STAGE” area of FIG. It is. 7 to 11, the area of “FOLDER INDEX ADDRESS STAGE” is indicated as “INDEX & ADDRESS” due to the space of the drawing.
[0072]
When the order of the messages is changed, in the detailed format of FIG. 5, necessary page data of “FOLDER DATA” and “ADDRESS DATA” is rewritten, and write commands are generated in a random order.
[0073]
FIG. 8 shows a case where the fourth message in the area of “FOLDER INDEX ADDRESS STAGE” in FIG. 6 is divided into two in a case where the recording is performed in a state as shown in FIG.
[0074]
In this case, in the detailed format of FIG. 5, it is necessary to rewrite and add necessary page data out of “FOLDER DATA” and “ADDRESS DATA” and rewrite “EXTERNAL DATA”.
[0075]
FIG. 9 shows a case where the third message and the fourth message in the “FOLDER INDEX ADDRESS STAGE” area of FIG. 6 are combined in the case where the recording is performed in the state as shown in FIG. 6.
[0076]
Also in this case, in the detailed format of FIG. 5, it is necessary to rewrite and add necessary page data of “FOLDER DATA” and “ADDRESS DATA” and rewrite “EXTERNAL DATA”.
[0077]
FIG. 10 shows a case where a message is added in the case where the information is recorded in the state as shown in FIG.
[0078]
In this case, in the detailed format of FIG. 5, it is necessary to rewrite and add necessary page data of “FOLDER DATA” and “ADDRESS DATA”, and to rewrite “BLANK DATA” and “EXTERNAL DATA”. .
[0079]
FIG. 11 shows a case where a message is deleted in a case where the message is recorded as shown in FIG.
[0080]
In this case, in the detailed format of FIG. 5, it is necessary to rewrite necessary page data of “FOLDER DATA” and “ADDRESS DATA” and rewrite “BLANK DATA” and “EXTERNAL DATA”.
[0081]
Updating of the BANK area as described above is performed by updating, adding, and deleting only necessary page data. A page write command is not generated in the order of addresses. Will be started.
[0082]
Therefore, in the conventional write control method, it is necessary to perform rewriting in units of blocks each time data of one page is rewritten, and to perform a process of repeating page copy in one block. This takes a very long time and causes a problem that the response to the user operation is poor.
[0083]
[Write Control in TOC Area in Embodiment]
Next, write control of data in the TOC area of the flash memory 2 in this embodiment will be described.
[0084]
FIG. 12 is a diagram for explaining a write control method in the TOC area in this embodiment. The left side of FIG. 12 shows a BANK area on the flash memory 2, and BPA [0], BPA [1], BPA [2], BPA [3], BPA [4]... BPA [i] ( i is a numerical value indicating the page number from the beginning of the BANK area, and i = 0, 1, 2,...) is the physical page address of the BANK area.
[0085]
This physical page address BPA [i] corresponds to “address” in FIG. 4, and each data shown in the “entry” column shown in FIG. 5 is originally written at each address position. Should be.
[0086]
However, in this embodiment, control is not performed such that the data shown in the “entry” column shown in FIG. 5 is written to each of the physical page addresses BPA [i] of the BANK area. The data to be written to the write page address is written in order from the first page address (physical page address) of the BANK area in the order in which the write page address command is generated.
[0087]
That is, when the microcomputer 1 generates a write page address for the BANK area of the flash memory 2, the data to be written to the write page address is changed from the physical page address (original address position) to which the BANK area should originally be written. Is converted into a physical page address (conversion address position) in the address order, and the converted physical page address is sequentially written.
[0088]
However, in this embodiment, in FIG. 5, the "INDEX HEADER" of the first page in which the "REVISION" number is written is fixedly written to the first physical page address of the BANK area. The “LAST V Page” of the last page is also fixedly written to the last physical page address of the BANK area.
[0089]
By doing so, the page data is written in order from the top of the physical page address in the BANK area. After the writing of one page is completed, the page data of the lower-order page address in one block is copied. Instead, the writing of the next page can be continued. Therefore, data can be written to the TOC area at high speed.
[0090]
However, as it is, the contents of the entry in the BANK area in FIG. 5 cannot be read. Therefore, in this embodiment, the data of the write page address for the BANK area given from the microcomputer 1 forms and retains information indicating the correspondence in the physical page address BPA [i]. I do.
[0091]
In this embodiment, the following page address conversion table is used as the information indicating the correspondence.
[0092]
In this embodiment, the write page address for the BANK area provided from the microcomputer 1 will be referred to as a “logical page address”. In FIG. 12, LPA [0], LPA [1], LPA [2], LPA [3], LPA [4]... LPA [j] (j is the number of the page from the top of the BANK area. .. Are j = 0, 1, 2,...) Are the ethical page addresses.
[0093]
The logical page address is a virtual page address recognized by the upper layer as “the data shown in the“ entry ”column of FIG. 4 has been written there in the BANK area”. If each data of the entry in FIG. 5 is written to the physical page address of the BANK area as in the conventional case, BPA [i] = LPA [j] (i = j). However, as described above, in this embodiment, such writing is not performed in the BANK area.
[0094]
In this embodiment, as shown on the right side of FIG. 12, when writing to the BANK area, the data of this logical page address LPA [j] is stored in the RAM 13 of the microcomputer 1 in any physical page address BPA [ The page data is written into the BANK area while forming a correspondence table (hereinafter referred to as a page address conversion table) written in [i].
[0095]
In this case, since the physical page address BPA [i] and the logical page address LPA [j] need only be managed in page units, in this example, offset numbers in page units from the beginning of the BANK area are used. . Therefore, since BANK0 and BANK1 are 32K bytes as shown in FIG. 5, the physical page addresses BPA [i] to be written in the page address conversion table for each of BANK0 and BANK1 are "0" to "63". One of these values is stored. When the value stored in the page address conversion table is “0xff”, it means that the page has not been written yet.
[0096]
As described later, in this embodiment, the page address conversion table formed in the RAM 13 is written in “LAST V Page” of the BANK area. In this example, the “LAST V Page” of the BANK area is fixedly written to the last physical page address of the BANK area as described above, so that the page address conversion table can be referred to quickly. .
[0097]
The page address conversion table may be written in the page area converted using the page address conversion table of the BANK area, or may be written in another memory area in the flash memory 2 or in the outside of the flash memory 2. It is needless to say that the data may be written and stored in the non-volatile storage means.
[0098]
Next, a write (rewrite) processing procedure in the BANK area when rewriting the TOC area of the flash memory 2 will be further described.
[0099]
FIGS. 1 and 2 are flowcharts of a processing operation when data is written to the TOC area of the flash memory 2 according to the present embodiment. This processing is mainly performed by the CPU 11 of the control unit 1 in accordance with the program of the ROM 12. It is described.
[0100]
That is, the control unit 1 determines whether or not a write instruction to the TOC area has been issued (step S101), and when it is determined that the write instruction has not been issued, executes other processing (step S102).
[0101]
When it is determined in step S101 that a write instruction has been issued, the CPU 11 erases the data in the older BANK area of BANK0 and BANK1 to make it an empty area, and also stores the above-described logical page address LPA [ j]], an area of the page address conversion table indicating the correspondence of the physical page address BPA [i] to the corresponding page address is prepared. It is initialized to “0xff” (step S103).
[0102]
Next, the CPU 11 writes “INDEX HEADER” including the “REVISION” number into the first physical address BPA “0” of the vacant BANK area (step S104).
[0103]
Next, the CPU 11 recognizes the logical page address LPA [j] as a write page address (step S105), and writes an empty BANK area in which the data PD (LPA [j]) of the logical page address LPA [j] is to be written. Of the physical page address BPA [i] is determined. As the physical page address BPA [i] corresponding to the logical page address LPA [j], a physical page address next to the previously written physical page address in the empty BANK area (a physical page address in the next lower order of the page address order) is assigned. (Step S106).
[0104]
Next, in the page address conversion table prepared in the RAM 13, the CPU 11 writes the obtained physical page address of the empty BANK area to the address of the RAM 13 corresponding to the logical page address specified in step S105 (step S107). ).
[0105]
Then, the data PD (LPA [j]) of the logical page address LPA [j] designated to be written is written to the physical page address of the free BANK area obtained in step S106 (step S108).
[0106]
Next, the CPU 11 determines whether or not the write page address instruction for the BANK area has been completed (step S109). If it is determined that the write page address instruction has not been completed, the process returns to step S105, and repeats the processing from step S105.
[0107]
If it is determined in step S109 that the write page address instruction for the BANK area has been completed, an unwritten logical page address of “0xff” is searched in the page address order on the page address conversion table of the RAM 13. (Step S111 in FIG. 2).
[0108]
Next, the CPU 11 sets the next physical page address in the free BANK area as the physical page address of the free BANK area to which the data of the detected unwritten logical page address is to be written (the page address order is It is determined by allocating the next lower physical page address (step S112).
[0109]
Then, in the page address conversion table of the RAM 13, the CPU 11 writes the physical page address obtained in Step S112 to the detected unwritten logical page address (Step S113).
[0110]
Next, the CPU 11 writes the data at the page address corresponding to the logical page address in the BANK area of the rewriting source to the physical page address of the empty BANK area obtained in step S112 (step S114). That is, the page data is copied.
[0111]
Next, the CPU 11 determines whether or not the writing up to the last page of the BANK area has been completed on the page address conversion table of the RAM 13 (step S115). The process returns to step S111 and the subsequent steps are repeated.
[0112]
If it is determined in step S115 that the writing up to the last page of the BANK area has been completed, the page address conversion table formed on the RAM 13 is written in the last page of the empty BANK area (step S116). Thus, the writing to the BANK area of the TOC area is completed.
[0113]
Next, the above processing procedure will be described more specifically with reference to FIG. For example, as shown in FIG. 11, the microcomputer 1 generates a write page address (logical page address) for the BANK area in the order of (1), (2), (3), (4). In this case, a procedure for writing to the BANK area will be described.
[0114]
When the write page of the BANK area is determined as the (1) -th logical page address LPA [30], the control unit 1 should write the data PD (LPA [30]) of the logical page address LPA [30]. The second physical page address BPA [1] of the BANK area is detected as the physical page address of the BANK area.
[0115]
Therefore, the control unit 1 writes the physical page address BPA [1] to the logical page address LPA [30] in the page address conversion table of the RAM 13. Prior to this, the data PD (LPA [0]) of “INDEX HEADER” has been written to the physical page address BPA [0] of the BANK area, and the logical page address LPA [0] of the page address conversion table has been written. , Physical page address BPA [0] is written.
[0116]
Next, the control unit 1 writes the data PD (LPA [30]) to be written to the logical page address LPA [30] at the physical page address BPA [1] in the free BANK area of the flash memory 2. Control.
[0117]
Next, when the (2) -th logical page address to be written to the BANK area is determined as the logical page address LPA [8], the control unit 1 sets the data PD (LPA [8]) of the logical page address LPA [8]. ]) Is to be written, the second physical page address BPA [2] of the BANK area is detected as the physical page address of the BANK area.
[0118]
Then, the control unit 1 writes the physical page address BPA [2] to the logical page address LPA [8] in the page address conversion table of the RAM 13.
[0119]
Next, the control unit 1 writes the data PD (LPA [8]) to be written to the logical page address LPA [8] to the physical page address BPA [2] in the free BANK area of the flash memory 2. Control.
[0120]
Also, the physical page address BPA [3] of the free BANK area is assigned to the (3) th write page address (logical page address) LPA [20], and the logical page address LPA [8] in the page address conversion table. ], The physical page address BPA [3] is written, and the data PD (LPA [8]) to be written to the logical page address LPA [8] is written to the physical page address BPA [2] in the empty BANK area. It is.
[0121]
Hereinafter, in the same manner, the physical page address of the empty BANK area is allocated in the order of the generation of the write page address, and the physical page address allocated to the logical page address of the page address conversion table is written. , The page data to be written to the logical page address is written to the assigned physical page address of the free BANK area.
[0122]
In this embodiment, a page address conversion table formed in the RAM 13 is written in the last page.
[0123]
Next, reading of TOC information from the BANK area will be described.
[0124]
At the time of reading, the control unit 1 first reads the page address conversion table of the last page of the BANK area of the flash memory 2 and writes it in the RAM 13.
[0125]
Next, every time a read logical page address is generated, the control unit 1 refers to the page address conversion table on the RAM 13 to check the physical address of the BANK area where the data of the specified read logical page address is recorded. The page address is obtained, and the flash memory 2 is controlled so as to read the data of the specified read logical page address from the obtained physical page address.
[0126]
As described above, the TOC information written in the BANK area is read without any trouble.
[0127]
In this embodiment, only the BANK area in which “LAST V Page” exists is valid at the time of a reset start when the power is cut off during writing in the TOC area. In the normal use state, the BANK area with the larger “REVISION” number is used as valid.
[0128]
[Other embodiments]
In the above embodiment, the information indicating the correspondence between the logical page address and the physical page address is recorded in the page address conversion table in the BANK area. However, the page address conversion table is written in the BANK area. Instead, you can do the following:
[0129]
Also in this example, while forming a page address conversion table on the RAM 13 at the time of writing, page data is sequentially written in the physical page address of the BANK area in the order of the address, as in the above-described embodiment. .
[0130]
However, in this embodiment, the page address conversion table is not written in the last page of the BANK area. Instead, as shown in FIG. 13, a corresponding logical page address is written to a spare area of page data to be written to each physical page address of the BANK area. As described above, the logical page address is an offset number from the head of the BANK area, and can be represented by one byte since a value of “0” to “63” is used.
[0131]
In the case of this example, at the time of reading, all pages of the BANK area are once read, the logical page addresses included in the respective page data are read, and the page address conversion table is reconfigured on the RAM 13. . Then, using the reconfigured page address conversion table on the RAM 13, data in the BANK area is read in the same manner as in the above-described embodiment.
[0132]
[Modification]
Although the above embodiment has been described in connection with the case where the recording medium is a NAND flash memory, the present invention is directed to all the recording media in which the same address control as that of the NAND flash memory must be performed at the time of writing in the TOC area. Applicable to
[0133]
Further, it goes without saying that the electronic apparatus to which the present invention is applied is not limited to an IC recorder. A recording medium such as a flash memory is not limited to a case where the recording medium is built in an electronic device. For example, the flash memory may be a card-type memory and may be insertable and removable.
[0134]
Further, in the description of the above-described embodiment, the management of the write control is performed using the logical-physical address conversion table.
[0135]
Also, in the above description, a case was described in which, in a block, writing was performed in ascending order from the page with the smallest address. However, the present invention is applicable to a case where writing is performed in descending order from the page with the largest address. Can be similarly applied.
[0136]
【The invention's effect】
As described above, according to the present invention, a high-speed recording area in which data having predetermined contents is written in a predetermined address order, such as a TOC area of a flash memory, is used. Can be written.
[Brief description of the drawings]
FIG. 1 is a part of a flowchart for describing an embodiment of a recording control method for a recording medium according to the present invention.
FIG. 2 is a part of a flowchart for describing an embodiment of a recording medium recording control method according to the present invention.
FIG. 3 is a diagram illustrating a configuration example of an IC recorder to which an embodiment of a recording control method for a recording medium according to the present invention is applied;
FIG. 4 is a diagram for explaining a memory area structure of a flash memory.
FIG. 5 is a diagram showing a detailed example of data recorded in a TOC area of a flash memory.
FIG. 6 is a diagram for explaining the contents of TOC data recorded in a flash memory.
FIG. 7 is a diagram for explaining an example of rewriting TOC data recorded in a flash memory.
FIG. 8 is a diagram for explaining an example of rewriting TOC data recorded in a flash memory.
FIG. 9 is a diagram for explaining an example of rewriting TOC data recorded in a flash memory.
FIG. 10 is a diagram for describing an example of rewriting TOC data recorded in a flash memory.
FIG. 11 is a diagram for explaining an example of rewriting TOC data recorded in a flash memory.
FIG. 12 is a diagram illustrating a processing procedure of an embodiment of a recording medium recording control method according to the present invention.
FIG. 13 is a diagram for explaining another embodiment of a recording control method for a recording medium according to the present invention.
FIG. 14 is a diagram illustrating a data configuration of a NAND flash memory.
FIG. 15 is a diagram for explaining a conventional recording control method for a NAND flash memory.
FIG. 16 is a flowchart for explaining a conventional recording control method for a NAND flash memory.
FIG. 17 is a diagram for explaining a conventional recording control method for a NAND flash memory.
And FIG. 18 is a flowchart illustrating an example of a reset process in a conventional recording control method for a recording medium.
[Explanation of symbols]
1. Control unit 2. Flash memory

Claims (11)

書き込みは予め定められたデータ数のデータ群ごとに、アドレス順になされる必要がある記録媒体において、予め定められたアドレス順序で、予め定められた内容のデータが書き込まれるようにされた所定のメモリ領域に対する記録制御方法であって、
前記データ群毎の書き込み指示に対して、それぞれの前記データ群が、前記所定のメモリ領域において本来書き込まれるべき本来アドレス位置を、前記所定のメモリ領域においてアドレス順となる変換アドレス位置に変換することにより、前記所定のメモリ領域において、前記データ群毎の書き込みを順次に行なうようにすると共に、
前記本来アドレス位置と前記変換アドレス位置との対応関係を示す情報を保持する
ことを特徴とする記録媒体の記録制御方法。
A predetermined memory in which data having a predetermined content is written in a predetermined address order on a recording medium that needs to be written in an address order for each data group having a predetermined number of data. A recording control method for an area,
In response to a write instruction for each data group, each data group converts an original address position to be originally written in the predetermined memory area into a conversion address position in the predetermined memory area in an address order. Thereby, in the predetermined memory area, the writing for each data group is performed sequentially,
A recording control method for a recording medium, wherein information indicating a correspondence relationship between the original address position and the converted address position is held.
請求項1記載の記録媒体の記録制御方法において、
前記本来アドレス位置と前記変換アドレス位置との対応関係を示す情報は、前記所定のメモリ領域内に書き込む
ことを特徴とする記録媒体の記録制御方法。
The recording control method for a recording medium according to claim 1,
A recording control method for a recording medium, wherein the information indicating the correspondence between the original address position and the converted address position is written in the predetermined memory area.
請求項1に記載の記録媒体の記録制御方法において、
前記本来アドレス位置と前記変換アドレス位置との対応関係を示す情報は、前記所定のメモリ領域内において固定のアドレス位置に書き込む
ことを特徴とする記録媒体の記録制御方法。
The recording control method for a recording medium according to claim 1,
A recording control method for a recording medium, wherein information indicating the correspondence between the original address position and the converted address position is written to a fixed address position in the predetermined memory area.
請求項1、請求項2または請求項3に記載の記録媒体の記録制御方法において、
前記本来アドレス位置と前記変換アドレス位置との対応関係を示す情報は、テーブル情報である
ことを特徴とする記録媒体の記録制御方法。
The recording control method for a recording medium according to claim 1, 2 or 3,
The recording control method for a recording medium, wherein the information indicating the correspondence between the original address position and the converted address position is table information.
請求項1に記載の記録媒体の記録制御方法において、
前記本来アドレス位置と前記変換アドレス位置との対応関係を示す情報は、前記データ群毎のデータ内に含められた、前記所定のメモリ領域における前記本来のアドレス位置を特定するための情報である
ことを特徴とする記録媒体の記録制御方法。
The recording control method for a recording medium according to claim 1,
The information indicating the correspondence between the original address position and the translated address position is information for specifying the original address position in the predetermined memory area, which is included in the data for each data group. A recording control method for a recording medium.
書き込みは予め定められたデータ数のデータ群ごとに、アドレス順になされる必要がある記録媒体において、予め定められたアドレス順序で、予め定められた内容のデータが書き込まれるようにされた所定のメモリ領域に対する記録制御装置であって、
前記データ群毎の書き込み指示を受けたときに、前記メモリ領域における前回の書き込みアドレス位置に対してアドレス順となる変換アドレス位置を求める変換アドレス位置検出手段と、
前記変換アドレス位置検出手段で求められた変換アドレス位置と、それぞれの前記データ群が、本来前記所定のメモリ領域において書き込まれるべき本来アドレス位置との関係を示す情報を形成する対応関係情報形成手段と、
前記変換アドレス位置検出手段で求められた変換アドレス位置において、前記所定のメモリ領域にデータを書き込むデータ書き込み手段と、
前記データ書き込み手段で前記データが書き込まれた後、前記所定のメモリ領域への書き込みが終了するまで、前記変換アドレス位置検出手段と、前記対応関係情報形成手段と、前記データ書き込み手段を繰り返すように制御する制御手段と、
を備えることを特徴とする記録媒体の記録制御装置。
A predetermined memory in which data having a predetermined content is written in a predetermined address order on a recording medium that needs to be written in an address order for each data group having a predetermined data number. A recording control device for the area,
A conversion address position detecting unit that obtains a conversion address position in an address order with respect to a previous write address position in the memory area when receiving a write instruction for each data group;
Correspondence information forming means for forming information indicating the relationship between the translated address position obtained by the translated address position detecting means and the original address position where each data group is to be written in the predetermined memory area. ,
A data writing unit that writes data in the predetermined memory area at the conversion address position obtained by the conversion address position detection unit;
After the data is written by the data writing unit, the conversion address position detecting unit, the correspondence information forming unit, and the data writing unit are repeated until writing to the predetermined memory area is completed. Control means for controlling;
A recording control apparatus for a recording medium, comprising:
請求項6に記載の記録媒体の記録制御装置において、
前記対応関係情報形成手段で形成された情報を、前記所定のメモリ領域内に書き込む手段を備える
ことを特徴とする記録媒体の記録制御装置。
The recording control device for a recording medium according to claim 6,
A recording control device for a recording medium, further comprising: a unit for writing information formed by the correspondence information forming unit into the predetermined memory area.
請求項6に記載の記録媒体の記録制御装置において、
前記対応関係情報形成手段で形成された情報を、前記所定のメモリ領域内において固定のアドレス位置に書き込む手段を備える
ことを特徴とする記録媒体の記録制御装置。
The recording control device for a recording medium according to claim 6,
A recording control apparatus for a recording medium, comprising: means for writing the information formed by the correspondence information forming means at a fixed address position in the predetermined memory area.
請求項6、請求項7または請求項8に記載の記録媒体の記録制御装置において、
前記対応関係情報形成手段で形成された情報は、テーブル情報である
ことを特徴とする記録媒体の記録制御装置。
The recording control apparatus for a recording medium according to claim 6, 7, or 8,
The recording control device for a recording medium, wherein the information formed by the correspondence information forming means is table information.
請求項6に記載の記録媒体の記録制御装置において、
前記対応関係情報形成手段は、前記データ群毎のデータ内に、前記所定のメモリ領域における前記本来のアドレス位置を特定するための情報を含めるようにする
ことを特徴とする記録媒体の記録制御装置。
The recording control device for a recording medium according to claim 6,
The recording control apparatus for a recording medium, wherein the correspondence information forming means includes information for specifying the original address position in the predetermined memory area in the data for each data group. .
請求項6〜請求項10のいずれかに記載の記録媒体の記録制御装置を備える電子機器。An electronic apparatus comprising the recording control device for a recording medium according to claim 6.
JP2003042984A 2003-02-20 2003-02-20 Recording medium recording control method, recording control apparatus, and electronic apparatus Expired - Fee Related JP4200362B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003042984A JP4200362B2 (en) 2003-02-20 2003-02-20 Recording medium recording control method, recording control apparatus, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003042984A JP4200362B2 (en) 2003-02-20 2003-02-20 Recording medium recording control method, recording control apparatus, and electronic apparatus

Publications (2)

Publication Number Publication Date
JP2004252746A true JP2004252746A (en) 2004-09-09
JP4200362B2 JP4200362B2 (en) 2008-12-24

Family

ID=33026116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003042984A Expired - Fee Related JP4200362B2 (en) 2003-02-20 2003-02-20 Recording medium recording control method, recording control apparatus, and electronic apparatus

Country Status (1)

Country Link
JP (1) JP4200362B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007520804A (en) * 2003-12-30 2007-07-26 サンディスク コーポレイション Non-volatile memory and method with nonsequential update block management
US9817593B1 (en) 2016-07-11 2017-11-14 Sandisk Technologies Llc Block management in non-volatile memory system with non-blocking control sync system
CN112698784A (en) * 2019-10-23 2021-04-23 爱思开海力士有限公司 Memory system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007520804A (en) * 2003-12-30 2007-07-26 サンディスク コーポレイション Non-volatile memory and method with nonsequential update block management
US7945759B2 (en) 2003-12-30 2011-05-17 Sandisk Corporation Non-volatile memory and method with phased program failure handling
US8051257B2 (en) 2003-12-30 2011-11-01 Sandisk Technologies Inc. Non-volatile memory and method with control data management
JP4851344B2 (en) * 2003-12-30 2012-01-11 サンディスク コーポレイション Non-volatile memory and method with nonsequential update block management
US8103841B2 (en) 2003-12-30 2012-01-24 Sandisk Technologies Inc. Non-volatile memory and method with non-sequential update block management
US8239643B2 (en) 2003-12-30 2012-08-07 Sandisk Technologies Inc. Non-volatile memory and method with control data management
US8621177B2 (en) 2003-12-30 2013-12-31 Sandisk Corporation Non-volatile memory and method with phased program failure handling
US9817593B1 (en) 2016-07-11 2017-11-14 Sandisk Technologies Llc Block management in non-volatile memory system with non-blocking control sync system
CN112698784A (en) * 2019-10-23 2021-04-23 爱思开海力士有限公司 Memory system
CN112698784B (en) * 2019-10-23 2023-12-19 爱思开海力士有限公司 memory system

Also Published As

Publication number Publication date
JP4200362B2 (en) 2008-12-24

Similar Documents

Publication Publication Date Title
KR100980309B1 (en) Host device and memory system
US6591328B1 (en) Non-volatile memory storing address control table data formed of logical addresses and physical addresses
WO2003056433A1 (en) Memory device and recording/reproducing apparatus using the same
JPWO2002054247A1 (en) Data recording device and data writing method for flash memory
JP2008198208A (en) Operation method for host data processing device, host data processing device, and data storage device
US6662269B1 (en) Data rewriting apparatus, control method, and recording medium
WO2002075745A1 (en) Storage device, storage device controlling method, and program
JP2001243110A (en) Memory controller, flash memory system and access method to flash memory
JP2005190288A (en) Memory controller, flash memory system therewith, and method for controlling flash memory
JP3928724B2 (en) Recording medium recording control method and recording medium recording control apparatus
JP5057887B2 (en) Data update device, data update method, and data update program
JP3766396B2 (en) Memory control device and memory control method
JP4200362B2 (en) Recording medium recording control method, recording control apparatus, and electronic apparatus
JP2001325134A (en) Directory setting method and recorder
EP1804166B1 (en) Memory device and information processing apparatus
JPH11120044A (en) Data processor, data processing method, data processing system and recording medium
JP4403338B2 (en) Information processing apparatus and information processing method
JP3624647B2 (en) Storage device, data management device, data management system, data management method, file management device, recording medium, and file management system
JP2001318824A (en) System for managing data of flash memory and recording medium with its program recorded
JP4055712B2 (en) Data management apparatus, data management method, and data management system
JP2002007204A (en) Device and method for information processing
JP2009134514A (en) Memory controller, nonvolatile memory device, and nonvolatile memory system
JPH11120052A (en) File management device, file managing method, recording medium, and file management system
JP2001331328A (en) Information processor and its method
JP4003709B2 (en) File management apparatus, file management method, and file management system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080515

A131 Notification of reasons for refusal

Effective date: 20080521

Free format text: JAPANESE INTERMEDIATE CODE: A131

A521 Written amendment

Effective date: 20080715

Free format text: JAPANESE INTERMEDIATE CODE: A523

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

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

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

Year of fee payment: 3

Free format text: PAYMENT UNTIL: 20111017

LAPS Cancellation because of no payment of annual fees