JP3699942B2 - Memory management method and memory management device - Google Patents

Memory management method and memory management device Download PDF

Info

Publication number
JP3699942B2
JP3699942B2 JP2002084322A JP2002084322A JP3699942B2 JP 3699942 B2 JP3699942 B2 JP 3699942B2 JP 2002084322 A JP2002084322 A JP 2002084322A JP 2002084322 A JP2002084322 A JP 2002084322A JP 3699942 B2 JP3699942 B2 JP 3699942B2
Authority
JP
Japan
Prior art keywords
address
physical
sector
block
virtual
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
JP2002084322A
Other languages
Japanese (ja)
Other versions
JP2003280822A (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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2002084322A priority Critical patent/JP3699942B2/en
Publication of JP2003280822A publication Critical patent/JP2003280822A/en
Application granted granted Critical
Publication of JP3699942B2 publication Critical patent/JP3699942B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、消去単位が、複数の書き込み単位により構成される不揮発性メモリにおけるメモリ管理方式およびメモリ管理装置に関する。
【0002】
【従来の技術】
従来技術においては、システムからみたメモリ(仮想メモリ)の消去単位(セクタ)に対する不揮発性メモリ上のメモリ(物理メモリ)のセクタ(物理セクタ)の対応付けは、仮想セクタに対して、一つの物理セクタを対応づける方法であった。
【0003】
【発明が解決しようとする課題】
しかしながら、仮想メモリに対応付けられる物理セクタ上の、既にデータライトが成されている書き込み単位領域(ブロック)に対してオーバライトが発生する場合には、データがライトされてない新しい物理セクタを用意して、この新しい物理セクタ上に、更新すべきブロックデータと、オーバライトされるべきブロックが属しているセクタ上のオーバライトされるべきブロック以外のブロックデータをライトし、仮想セクタと既存の物理セクタの対応づけを消去して、新しい物理セクタに対する対応付けをする必要があるので、オーバライトブロック以外のブロックデータを新しい物理セクタにライトする必要がある分データライトの処理時間が長くなるとともに、使用するメモリ容量が大きくなる問題があった。
【0004】
本発明は上記の問題を解決するためになされたものであり、メモリの読み書きに係る処理時間を短縮し、また、メモリ資源を効率よく使うことが可能になるメモリ管理方式およびメモリ管理装置を提供することを目的とする。
【0005】
すなわち、本発明係わるメモリ管理方式は、各々が物理ブロックを書き込み単位として複数有してなる物理セクタを消去単位として複数有してなる物理メモリおよび当該物理メモリの物理セクタと対応付けた仮想セクタを複数有してなる仮想メモリを用いてデータの読み書きを管理するメモリ管理方式であって、仮想セクタのアドレスと単一または複数の物理セクタのアドレスとを当該仮想セクタのアドレス毎に対応付けるセクタアドレス管理手段と、このセクタアドレス管理手段により仮想セクタのアドレスと対応付けた複数の物理セクタの各アドレスの対応付けのタイミングの順序を管理する順序管理手段と、物理セクタに属する物理ブロックの使用状態を示すブロック情報を管理するブロック情報管理手段と、データ書き込み対象の仮想メモリアドレスで示される物理ブロックのアドレスを計算する第1の計算手段と、書き込み対象の仮想メモリアドレスで示される仮想セクタのアドレスを計算する第2の計算手段と、ブロック情報管理手段により管理されるブロック情報および順序管理手段により管理される順序に基づいて、第2の計算手段により計算した仮想セクタのアドレスに対してセクタアドレス管理手段により対応付けられる物理セクタの各アドレスおよび第1の計算手段により計算したアドレスと対応する使用状態にある物理ブロックのうち最も遅い順序で計算した仮想セクタのアドレスに対してセクタアドレス管理手段により対応付けられた物理セクタのアドレスより後の順序で計算した仮想セクタのアドレスに対してセクタアドレス管理手段により対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして検出するセクタアドレス検出手段とを有し、セクタアドレス管理手段は、セクタアドレス検出手段によりアドレスが検出されなかった場合に属する全ての物理ブロックが未使用状態にある物理セクタのアドレスを計算した仮想セクタのアドレスと新たに対応付け、順序管理手段は、この新たに対応付けられた物理セクタのアドレスが計算した仮想セクタのアドレスに対してセクタアドレス管理手段により最も遅い順序で対応付けられたとして管理し、新たに対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして指定するセクタアドレス指定手段を有し、ブロック情報管理手段は、セクタアドレス指定手段により指定されたアドレスおよび第1の計算手段により計算した物理ブロックのアドレスで特定される物理ブロックのブロック情報を使用状態を示す情報に書き換えることを特徴とする。
【0015】
【発明の実施の形態】
以下、図面により本発明の実施形態について説明する。
【0016】
図1は、本発明の実施形態に係わるメモリ制御装置の構成を示す図である。
【0017】
図1に示すように、このメモリ制御装置は、不揮発性メモリ1、メモリ管理部2、メモリインタフェース3およびシステム制御部4で構成される。
【0018】
メモリ管理部2は、システムを制御するシステム制御部4に対して、メモリ管理部2に対するコマンド(命令)を示す信号を転送するコマンドバス11、仮想メモリアドレスバス12およびデータバス13を介して接続され、このメモリ管理部2に対してメモリインタフェース3が、メモリインタフェース3に対するコマンドを示す信号を転送するメモリアクセスコマンドバス14、物理メモリアドレスバス15およびメモリ管理部2とメモリインタフェース3との間でデータを転送するメモリデータバス16を介して接続され、このメモリインタフェース3に対して不揮発性メモリ1がメモリバス17を介して接続される。
【0019】
メモリバス17は、不揮発性メモリ1に対して読み書きのアクセスするためのアクセスコマンド(処理命令)を示す信号を転送する。
【0020】
仮想メモリアドレスバス12は、仮想メモリ上の仮想メモリアドレスを示す信号をシステム制御部4からメモリ管理部2に転送する。
【0021】
物理メモリアドレスバス15は、不揮発性メモリ1上の物理メモリアドレスを示す信号をメモリ管理部2からメモリインタフェース3に転送する。
【0022】
データバス13は、不揮発性メモリ1に対して読み書きするデータを、メモリ管理部2を介してシステム制御部4とメモリインタフェース3の間で転送する。
【0023】
メモリ管理部2は、システム制御部4より転送されるコマンドと仮想メモリアドレスに応じて、アクセスコマンドおよび物理メモリアドレスをメモリインタフェース3に転送するとともに、不揮発性メモリ1に書き込むデータをメモリインタフェース3に転送し、不揮発性メモリ1から読み出したデータを、システム制御部4に転送する。
【0024】
メモリインタフェース3は、メモリバス17を介して不揮発性メモリ1に対してアクセス処理をする。
【0025】
図2は、前記実施形態に係わるメモリ制御装置に備えられるメモリ管理部2の構成を示す図である。
【0026】
図2に示すように、メモリ管理部2は、メモリ制御部21、データバッファ22、セクタアドレス変換テーブル23、セクタアドレス変換制御部24、ブロック情報テーブル25およびブロック情報制御部26で構成される。
【0027】
そして、メモリ制御部21に対してデータバッファ22が接続されるとともに、メモリ制御部21に対して、システム制御部4からコマンドバス11、仮想メモリアドレスバス12が接続されるとともに、メモリインタフェース3に対して物理メモリアドレスバス15およびアクセスコマンドバス11が接続され、データバッファ22に対して、システム制御部4からデータバス13が接続され、このデータバッファ22からメモリインタフェース3に対して、メモリデータバス16が接続される。
【0028】
また、メモリ制御部21に対してセクタアドレス変換テーブル23がセクタアドレス変換制御部24を介して接続されるとともに、ブロック情報テーブル25がブロック情報制御部26を介して接続される。
【0029】
セクタアドレス変換テーブル23は、仮想メモリのセクタ単位アドレス(仮想セクタアドレス)と物理メモリのセクタ単位アドレス(物理セクタアドレス)の対応付けを示すデータを記憶するメモリである。
【0030】
ブロック情報テーブル25は、物理セクタアドレス内に設定される複数の物理ブロックの使用状態を示すデータすなわちブロックが使用されている状態であるか、または使用されていない状態であるかを示すデータ(ブロック情報)を記憶するメモリである。
【0031】
セクタアドレス変換制御部24は、セクタアドレス変換テーブル23において仮想メモリに属する全ての仮想セクタアドレスをインデックス値として、各仮想セクタアドレスと対応付けられる一つまたは複数の物理セクタアドレスを登録、削除および読み出しを行い、また、セクタアドレス変換テーブル23に登録されていない物理セクタアドレスを検索する。
【0032】
ブロック情報制御部26は、ブロック情報テーブル25において物理メモリに属する全ての物理セクタアドレスをインデックス値として物理セクタアドレスに属する各物理ブロックに対して、ブロック情報を登録、削除、更新および読み出しをする。
【0033】
メモリ制御部21は、システム制御部4からのコマンドに応じて、メモリ制御部21とブロック情報制御部26を制御し、仮想メモリアドレスに基づいて適当な物理メモリアドレスに変更し、不揮発性メモリ1に対するアクセスコマンドを転送し、また、データバッファ22を介して不揮発性メモリ1に対して読み書きするデータの転送制御をする。
【0034】
データバッファ22は、システム制御部4と不揮発性メモリ1とのデータ転送速度の調停を行う。
【0035】
図3は、前記実施形態に係わるメモリ制御装置に備えられるセクタアドレス変換テーブル23の構成を示す図である。
【0036】
図3に示すように、セクタアドレス変換テーブル23は、仮想セクタアドレスと物理セクタアドレスとの対応関係を管理するテーブルデータであり、仮想メモリ内の全ての仮想セクタアドレスが登録される仮想セクタアドレスインデックス(p1)内の一つの仮想セクタアドレスが、一つの物理セクタアドレスまたは複数の物理セクタアドレスで構成された物理セクタアドレス群内のそれぞれの物理セクタアドレスと対応付けられる構成である。
【0037】
つまり、図3に示すセクタアドレス変換テーブル23の場合には、仮想セクタアドレス“0”が、物理セクタアドレス“3”、“8”、“N”および“α”で構成された物理セクタアドレス群(p2)に対応付けられることを示し、この物理セクタアドレス群内の各物理セクタアドレスの配列は登録順番すなわち仮想セクタアドレスに対応付けられた順番に従った配列である。
【0038】
つまり、物理セクタアドレス群(p2)の左端の物理セクタアドレス“3”は最初に仮想セクタアドレス“0“に対応付けられた物理セクタアドレスを示し、右端の物理セクタアドレス”α“は、最後に仮想セクタアドレス”0“に対応付けられた物理セクタアドレスを示している。この場合、物理セクタアドレスの大小は登録順番と関係ない。
【0039】
仮想セクタアドレスと物理セクタアドレスとの対応付けは、図3に示す仮想セクタアドレス“1”のように物理セクタアドレスが全く対応付けられていない場合には、仮想セクタアドレスに対して新規に物理セクタアドレスを対応付けることでなされ、また、仮想セクタアドレス“2”のように既に仮想セクタアドレスに対して物理セクタアドレスが対応付けられる場合で、新しい物理セクタアドレス“18”を物理セクタ“9”の後に登録したい場合には、p3に示すように物理セクタアドレス群内において物理セクタアドレスの登録順番を変更して登録または最終物理セクタアドレスの直後の登録順番として物理セクタアドレス群内の新たな物理セクタアドレスとして追加することでなされる。
【0040】
また、仮想セクタアドレスと物理セクタアドレスの対応付けを無くすには、p4に示すように物理セクタアドレス群から各物理セクタアドレスを削除することでなされる。
【0041】
図4は、前記実施形態に係わるメモリ制御装置に備えられるセクタアドレス変換テーブル23による仮想メモリと物理メモリの対応付けの例を示す図である。
【0042】
図4に示すように、仮想メモリのそれぞれの仮想セクタアドレスを示す仮想メモリセクタアドレスマップと、物理メモリのそれぞれの物理セクタアドレスを示す物理メモリセクタアドレスマップにおいて、一つの仮想セクタに対して一つまたは複数の物理セクタが対応付けられる。
【0043】
なお、図4に示される仮想メモリセクタアドレスマップの0セクタ、1セクタ、2セクタ、・・・、L−1セクタおよびLセクタは、仮想セクタアドレス“0”、“1”、“2”、・・、“L−1”および“L”を示す領域を示し、物理メモリセクタアドレスマップの0セクタ、1セクタ、2セクタ、・・・、N−1セクタおよびNセクタは、物理セクタアドレス“0”、・・“N−1”および“N”を示す領域である。
【0044】
また、一つの物理セクタすなわち物理セクタアドレスで区別される各物理セクタは、p11で示すように複数の物理ブロックで構成され、それぞれの物理ブロックが物理ブロックアドレスで区別される。
【0045】
つまり、図4に示される各物理ブロックの0ブロック、1ブロック、・・・、M−1ブロックおよびMブロックは、物理セクタ内の物理ブロックアドレス“0”、“1”、・・、“M−1”および“M”を示す領域である。
【0046】
図5は、前記実施形態に係わる仮想セクタと物理セクタとの対応付けの例を示す図である。
【0047】
図5に示すように、仮想セクタ(p21)は複数の仮想ブロック(p22)で構成され、それぞれの仮想ブロックが仮想ブロックアドレスで区別される。
【0048】
そして、各仮想ブロックが、p23に示す物理ブロック群の各物理ブロックと対応付けられることになる。
【0049】
各仮想ブロックの0ブロック、1ブロック、・・・、M−1ブロックおよびMブロックは、仮想セクタ内の仮想ブロックアドレス“0”、・・、“M−1”および“M”を示す領域である。
【0050】
そして、仮想セクタ内の仮想ブロックである0ブロックは、この仮想ブロックアドレスの値と同一の物理ブロックアドレス値である0ブロックが属する物理セクタ(8セクタの0ブロック目)と対応付けられる。
【0051】
つまり、これらの各仮想ブロックが、同じアドレス値をもつ物理ブロックと対応付けられることで、仮想セクタが、物理ブロックが属する一つまたは複数の物理セクタと対応付けられることになる。
【0052】
図6は、前記実施形態に係わるメモリ制御装置に備えられるブロック情報テーブル25の構成を示す図である。
【0053】
図6に示すように、このブロック情報テーブル25は、セクタアドレス変換テーブル23に登録された各物理セクタアドレスに属する全ての物理ブロックに関する物理ブロック情報を管理するテーブルである。
【0054】
このブロック情報テーブル25は、物理メモリ内の全ての物理セクタアドレスが登録される物理セクタアドレスインデックス(p31)、この物理セクタアドレスインデックスの各物理セクタアドレスに属する全ての物理ブロックアドレスが登録される物理ブロックアドレスインデックス(p32)、および物理セクタアドレスインデック各物理ブロックの物理ブロック情報を記憶する物理ブロック情報記憶領域で構成され、物理セクタアドレス群を一つめのインデックスとし、物理ブロックアドレス群を二つめのインデックスとしてブロック情報記憶領域が参照される。
【0055】
例えば、p33で示すブロック記憶領域は、物理セクタアドレスが“0”である物理セクタ内のブロックアドレスが“M”である物理ブロックのブロック情報記憶領域である。
【0056】
このブロック情報記憶領域に記憶される物理ブロック情報は、参照元の物理セクタアドレス及び物理ブロックアドレスから導かれる物理メモリアドレスに対してデータの書き込みがなされたかどうかを示す情報であり、既にライト(書き込み)済の状態の場合には、”1”のフラグが記憶され、未ライトつまりデータの書き込みがなされていない状態の場合には、”0”のフラグが記憶される。
【0057】
また、p34で示すように、任意の物理セクタアドレスに対応する特定の物理ブロックのブロック情報を“0”または“1”に更新することができる。また、p35で示される領域、つまり、任意の物理セクタアドレスに対応する全ての物理ブロックのブロック情報を登録することができ、p36で示される領域、つまり、任意の物理セクタアドレスに対応する全ての物理ブロックのブロック情報を削除することができる。
【0058】
つまり、仮想セクタアドレスと複数の物理セクタアドレスを対応付けることのできるセクタアドレス変換テーブル23と対応付けた物理セクタアドレスの各ブロックの使用状態を知ることのできるブロック情報テーブル25により、一つの仮想セクタが複数の物理セクタと対応付けられるので、一つの仮想セクタを一つの物理セクタのみに対応付ける必要が無いことから、オーバライト時にメモリ上のデータ移動の発生が少ない高速なメモリライトができる。
【0059】
また、任意のブロック毎に使用状態が“0”と“1“のフラグで示されることにより、システムに見合ったブロック単位で管理を行うことが可能になるので、ブロック情報テーブル25のメモリ容量を削減できる。
【0060】
次に、前記構成によるメモリ制御装置の処理について説明する。
【0061】
まず、メモリ制御装置によるメモリライト(書き込み)処理について説明する。
【0062】
図7は、前記実施形態に係わるメモリ制御装置によるメモリライト処理(その1)を示すフローチャートである。
【0063】
図8は、前記実施形態に係わるメモリ制御装置によるメモリライト処理(その2)を示すフローチャートである。
【0064】
図7および図8に示すように、まず、システム制御部4よりコマンドバス11を介してメモリ制御部21のメモリ管理部2にライト命令が与えられるとともに、仮想メモリアドレスバス12を介して仮想メモリアドレスがメモリ制御部21に転送されると、仮想メモリアドレスがメモリ制御部21により仮想セクタアドレスAと仮想ブロックアドレス(仮想ブロックオフセットアドレス)Bとに分けられる(ステップA1)。
【0065】
なお、この仮想ブロックアドレスBに基づいて、ブロック情報テーブル上の物理ブロックアドレスインデックス上で同じアドレス値をもつ物理ブロックアドレスが検索されて物理ブロックアドレスBとして取り扱われることになる。
【0066】
次に、セクタアドレス変換制御部24によりセクタアドレス変換テーブル23が読み出されて、このセクタアドレス変換テーブル23と仮想セクタアドレスAとが照合されて、該仮想セクタアドレスAに対応付けられる一つまたは複数の物理セクタアドレスで構成される物理セクタアドレス群Cが検索されて、この物理セクタアドレス群Cが存在するかどうかが判断される(ステップA2,A3)。
【0067】
ステップA3で「YES」と判断される、つまり仮想セクタアドレスAに物理セクタアドレス群Cが対応付けられる場合には、ブロック情報制御部26によりブロック情報テーブル25が読み出されて、このブロック情報テーブル25において、物理セクタアドレス群Cに属する各物理セクタアドレスおよび仮想ブロックアドレスBと同じアドレスの物理ブロックアドレス(物理ブロックオフセットアドレス)に基づいて、各物理ブロックの中に未ライトブロックすなわちブロック情報が“0”である物理ブロックが含まれているかどうかが判断され、未ライトブロックが含まれていれば、そのうち一つの物理ブロックが属する物理セクタアドレスが物理セクタアドレスDとして検出されてセクタアドレス変換テーブル23での検索が終了される(ステップA4,A5)。
【0068】
図9は、前記実施形態に係わるメモリライト処理において未ライトブロックが存在する物理セクタアドレスDが検出される例を示す図である。
【0069】
つまり、図9に示すように、セクタアドレス変換テーブル23において、仮想セクタアドレスAに対応付けられる物理セクタアドレス群Cに属する各物理セクタアドレスが、p41に示すように、その登録順番の古い順から“3”、“8”および“N”である場合で、仮想ブロックアドレスBが“M−1”である場合には、検索の対象となる物理ブロックはp42で囲まれた検索列となり、検索する順番は、p43に示すように物理セクタアドレス群Cに属する各物理セクタアドレスの登録順番の新しい方から古い方に向かう順番となる、つまり物理セクタアドレスが“N”で物理ブロックアドレスが“M−1”で対応付けられる物理ブロック(p44)から検索され、次に物理セクタアドレスが“8”で、物理ブロックアドレスが“M−1”で対応付けられる物理ブロック(p45)が検索され、最後に物理セクタアドレスが“3”で、物理ブロックアドレスが“M−1”で対応付けられる物理ブロック(p46)が検索対象となる。
【0070】
そして、物理セクタアドレスの登録順番に従って、検索列のなかで登録順番が最新のライト済ブロックに対応する物理セクタアドレスの直前にある登録順番の物理セクタアドレスに対応する未ライトブロック、つまり、物理セクタアドレスが“8”で、物理ブロックアドレスが“M−1”のブロック(p45)が未ライトブロックとして検出され、検出される物理セクタアドレスDは“8”となる。
【0071】
なお、未ライトブロックの検索方法は、検索順番に従って最初に検出された未ライトブロックに対応する物理セクタアドレスを物理セクタアドレスDとして検出する方法としてもよく、この場合、図9に示す、ブロック情報テーブル25から検出される物理セクタアドレスDは“N”となる。
【0072】
図10は、前記実施形態に係わるメモリライト処理において未ライトブロックが存在する物理セクタアドレスDを検出できない例を示す図である。
【0073】
図10で示すように、メモリセクタアドレス群Cの各要素セクタアドレスが登録の古い順から“3”、“8”および“N”で構成され、仮想ブロックアドレスBが“M”である場合には、検索列はp51で示す検索列となり、登録の新しい物理セクタアドレスに対応したブロック(p52)から順番に検索する。この場合、検索されたブロックが全てライト済である、すなわち検索された全ての物理ブロックのブロック情報が全て“1”であり、検索列の中で登録順番が最新のライト済ブロックが検索されるまでに未ライトブロックが検出されないので、検出される物理セクタアドレスDは無しとなる。
【0074】
図11は、前記実施形態に係わるブロック情報テーブル25内のブロック情報の更新処理を示す図である。
【0075】
つまり、図11に示すように、検出された物理セクタアドレスDが“8”であり、仮想ブロックアドレスBが“M−1”である場合には、更新すべきブロック情報テーブル25のブロック情報はp61で示すブロックであるので、このブロック情報が“0”から“1”に書き換えられる、つまり未ライトブロックからライト済ブロックに更新される。
【0076】
一方、ステップA3で「NO」と判断される、つまり仮想セクタアドレスAに物理セクタアドレス群Cが対応付けられていない場合、または、ステップA4で「NO」と判断される、すなわち未ライトブロックである物理セクタアドレスDが検出されない場合には、仮想セクタアドレスAに対して書き込みに使用する未ライトブロックが対応付けられていないことになるので、データがライト可能な未ライトブロックを新たに得る。つまり、セクタアドレス変換テーブル23に登録されていない物理セクタアドレスがブロック情報テーブル25に新たに登録されて、この物理セクタアドレスが物理セクタアドレスDとして設定される(ステップA6)。
【0077】
ここで物理セクタアドレスDの各ブロックはライト済であった可能性があるので、メモリインタフェース3を通じて物理セクタアドレスDに対して消去処理すなわち物理セクタアドレスDに属するブロックのブロック情報をすべて“0”に書き換える処理がなされる(ステップA7)。
【0078】
そして、この物理セクタアドレスDが、セクタアドレス変換制御部24を介してセクタアドレス変換テーブル23に仮想セクタアドレスAに対応する新規物理セクタアドレスとして物理メモリセクタアドレス群Cの末尾の登録順番である物理セクタアドレスの直後の登録順番で登録され(ステップA8)、この新規物理セクタアドレスに属する各物理ブロックが未ライトブロックである物理ブロックとしてブロック情報制御部26を介してブロック情報テーブル25に登録される(ステップA9)。
【0079】
図12は、前記実施形態に係わるブロック情報テーブル25に対する新規物理セクタアドレスの登録処理と、この登録処理に伴うブロック情報の更新処理を示す図である。
【0080】
つまり、図12に示すように、ステップAで追加された新規物理セクタアドレスDが“α”であった場合には、ステップAにより物理セクタアドレスD(=“α”)に属するブロック情報が消去処理され、p71に示すように物理セクタアドレスD(=α)の全ブロック情報は未ライトブロックとなり、ステップA8により、既存のブロック情報テーブル25(p72)に新規物理セクタアドレスに属する各物理ブロックが登録される。
【0081】
そして、未ライトブロックの検索対象の仮想ブロックアドレスBが“M”であった場合には、物理セクタアドレスが“α”で、物理ブロックアドレスが“M”である物理ブロック(p73)の情報が未ライトブロックからライト済ブロックに更新され、すなわち“0”から“1”に書き換えられる。
【0082】
ステップAで「YES」と判断される、つまり物理セクタアドレスDが検出された場合、または、ステップA8により新規物理セクタアドレスに属する物理ブロックがブロック情報テーブル25に登録されると、物理セクタアドレスDおよび物理ブロックアドレスBから物理メモリアドレスEが計算され、メモリインタフェース3を介してメモリライトつまり不揮発性メモリ1に対するデータの書き込みを指示するメモリアクセスコマンドが転送されて物理メモリアドレスEに対してデータバッファ22にあるシステム制御部4からのブロックデータが転送される(ステップA10,A11)。
【0083】
そして、ブロック情報制御部26を介してブロック情報テーブル25に登録される物理セクタアドレスDと物理ブロックアドレスBとに対応する物理ブロックのブロック情報がライト済を示す“”に更新される(ステップA12)。
【0084】
つまり、メモリライト処理により、ライトすべき仮想セクタアドレスに対応付けられた物理セクタアドレス群の中から適当な未ライトブロックが存在する物理セクタアドレスが検出されるので、新規に物理セクタを割り当てる必要がないメモリ資源の有効活用が可能となる。
加えて、セクタアドレス変換テーブル23では、仮想セクタのアドレスに対する物理セクタのアドレスの対応付けの順番を管理し、データライト処理の際には仮想ブロックアドレスBと物理セクタアドレス群Cとで示される物理ブロックのうち仮想セクタアドレスAと最も遅い順番で対応付けられた物理セクタのアドレスで特定される物理ブロックをデータライト対象の物理ブロックとする。
また、データライト処理の際に新たな物理セクタのアドレスを仮想セクタのアドレスと対応付けた場合には、この物理セクタのアドレスを仮想セクタのアドレスと対応付けた順番が最新であるとして管理する。よってデータライト処理の際には、ブロック情報テーブル25で管理する同一の物理ブロックアドレスと対応する物理ブロック群のうち、新しくデータライトを行なった物理ブロックの仮想セクタアドレスとの対応付けの順番より古い順番で当該仮想セクタアドレスと対応付けられたアドレスで示される物理ブロックのブロック情報を更新する必要がなくなる。
【0085】
次に、メモリ制御装置によるメモリリード(読み出し)処理について説明する。
【0086】
図13は、前記実施形態に係わるメモリ制御装置によるメモリリード処理(その1)を示すフローチャートである。
【0087】
図14は、前記実施形態に係わるメモリ制御装置によるメモリリード処理(その2)を示すフローチャートである。
【0088】
図13および図14に示すように、まず、システム制御部4よりコマンドバス11を介してメモリ管理部2にメモリリード命令(読み出し命令)が与えられるとともに、仮想メモリアドレスバス12を介して仮想メモリアドレスがメモリ制御部21に転送されると、仮想メモリアドレスがメモリ制御部21により仮想セクタアドレスAと仮想ブロックアドレスBとに分けられる(ステップB1)。
【0089】
次に、セクタアドレス変換制御部24によりセクタアドレス変換テーブル23が読み出されて、このセクタアドレス変換テーブル23と仮想セクタアドレスAとが照合されて、該仮想セクタアドレスAに対応付けられる一つまたは複数の物理セクタアドレスで構成される物理セクタアドレス群Cが存在するかどうかが判断される(ステップB2,B3)。
【0090】
ステップB3で「YES」と判断される、つまり仮想セクタアドレスAに物理セクタアドレス群Cが対応付けられる場合には、ブロック情報制御部26によりブロック情報テーブル25が読み出されて、このブロック情報テーブル25において、物理セクタアドレス群Cに属する各物理セクタアドレスおよび仮想ブロックアドレスBと同じアドレス値の物理ブロックアドレスBに基づいて、各ブロックの中にライト済ブロックすなわちブロック情報が“1”であるブロックが含まれているかどうかが判断され、ライト済ブロックが含まれていれば、そのうち一つの物理ブロックが属する物理セクタアドレスが物理セクタアドレスDとして検出され、ライト済ブロックが含まれていない場合には、検索列のなかでいずれかの物理ブロックが属する物理セクタアドレスが物理セクタアドレスDとして検出される(ステップB4)。
【0091】
図15は、前記実施形態に係わるメモリリード処理においてライト済ブロックが存在する物理セクタアドレスDが検出される例を示す図である。
【0092】
つまり、図15に示すように、仮想セクタアドレスAに対応付けられる物理セクタアドレス群Cに属する各物理セクタアドレスが、その登録順番の古い順から“3”,“8”および“N”である場合で、仮想ブロックアドレスBが“M−1”である場合には、検索の対象となる物理ブロックはp81で示す検索列となり、検索する順番は、物理セクタアドレス群Cに属する各物理セクタアドレスの登録順番の新しい方から古い方に、つまり物理セクタアドレスが“N”で物理ブロックアドレスが“M−1”で対応付けられる物理ブロック(p82)から検索され、次に物理セクタアドレスが“8”で、物理ブロックアドレスが“M−1”で対応付けられる物理ブロック(p83)が検索され、最後に物理セクタアドレスが“3”で、物理ブロックアドレスが“M−1”で対応付けられる物理ブロック(p84)が検索されることになる。
【0093】
そして、物理セクタアドレスの登録順番に従って、検索列のなかで最初に検出されたライト済ブロック、つまり、物理セクタアドレスが“8”、物理ブロックアドレスが“M−1”のブロック(p83)がライト済ブロックとして検出され、検出される物理セクタアドレスDは“8”となる。
【0094】
図16は、前記実施形態に係わるメモリリード処理においてライト済ブロックが存在する物理セクタアドレスDが検出されない例を示す図である。
【0095】
図16で示すように、メモリセクタアドレス群Cの各要素セクタアドレスが登録の古い順から“3”、“8”および“N”で構成され、仮想ブロックアドレスBが“1”である場合には、検索列はp91で示す検索列となり、登録の新しい物理セクタアドレスに対応したブロックから順番にp92、p93およびp94で示す物理ブロックが順番に検索される。この場合、検索されたブロックが未ライトブロックである、すなわちブロック情報が“1”であるライト済ブロックが検出されないので、検索列において最初に検出された未ライトブロック(p92)が属する物理セクタアドレス、つまり検索列のブロックが属する最新の物理セクタアドレスつまり物理セクタアドレス“N”が物理セクタアドレスDとして検出される。
【0096】
なお、ここで検出される物理セクタアドレスDは検索列の物理ブロックが属する最新の物理セクタアドレスに限らずに、検出条件を変えることにより、検索列(p91)に属するいずれかの物理ブロックに属する物理セクタアドレスが物理セクタアドレスDとして検出されてもよい。
【0097】
一方、ステップB3で「NO」と判断される、つまり仮想セクタアドレスAに物理セクタアドレス群Cが対応付けられていない場合には、仮想セクタアドレスAに対して物理ブロックが対応付けられていないことになるので、データリードが可能な物理ブロックを新たに得るためにセクタアドレス変換制御部24からセクタアドレス変換テーブル23に登録されていない物理セクタアドレスがブロック情報テーブル25に追加登録され、この物理セクタアドレスが物理セクタアドレスDとして設定される(ステップB5)。
【0098】
なお、この設定された物理セクタアドレスDの各ブロックはライト済であった可能性があるので、メモリインタフェース3を通じて物理セクタアドレスDに対する消去処理がなされる(ステップB6)。
【0099】
そして、この物理セクタアドレスDが、セクタアドレス変換制御部24を介してセクタアドレス変換テーブル23に仮想セクタアドレスAに対応する新規物理セクタアドレスとして物理メモリセクタアドレス群Cの末尾の登録順番である物理セクタアドレスの直後の登録順番で登録され(ステップB7)、この新規物理セクタアドレスに属する各物理ブロックが未ライトブロックである物理ブロックとしてブロック情報制御部26を介してブロック情報テーブル25に登録される(ステップB8)。
【0100】
図17は、前記実施形態に係わるブロック情報テーブル25に対する新規物理セクタアドレスの登録処理を示す図である。
【0101】
つまり、図17に示すように、ステップB5で追加された新規物理セクタアドレスDの値が“γ”であった場合には、ステップB6により物理セクタアドレスD(=“γ”)に属するブロック情報が消去処理され、p101で示すように物理セクタアドレスD(=“γ”)の全ブロック情報は未ライトブロックとなり、ステップB8により、既存のブロック情報テーブル25(p102)に新規物理セクタアドレスに属する各物理ブロックが登録される。
【0102】
ステップB4で物理セクタアドレスDが検出された場合、または、ステップB8により新規物理セクタアドレスに属する物理ブロックがブロック情報テーブル25に登録された場合には、物理セクタアドレスDおよび物理ブロックアドレスBから物理メモリアドレスEが計算され、メモリインタフェース3を介して不揮発性メモリ1にデータリードを指示するメモリアクセスコマンドが転送されて物理メモリアドレスEに対してデータバッファ22にあるシステム制御部4からのブロックデータが転送される(ステップB9,B10)。
【0103】
つまり、このメモリリード処理では、セクタアドレス変換テーブル23で未だ対応付けられてない仮想セクタアドレスに全ブロックが未使用の物理セクタアドレスを対応付けることにより、同仮想セクタアドレスにデータライトを行う場合に、新規物理セクタの対応付け処理が不要となることから、ライト処理速度が向上する。
【0104】
図18は、前記実施形態に係わるメモリ制御装置によるメモリ結合処理(その1)を示すフローチャートである。
【0105】
図19は、前記実施形態に係わるメモリ制御装置によるメモリ結合処理(その2)を示すフローチャートである。
【0106】
図20は、前記実施形態に係わるメモリ制御装置によるメモリ結合処理(その3)を示すフローチャートである。
【0107】
このメモリ結合処理は、仮想メモリアドレスで指定される仮想セクタアドレスがセクタアドレス変換テーブル23により複数の物理セクタアドレスと対応付けられる場合、複数の物理セクタアドレスの各有効ブロック(最も新しい物理セクタアドレスに属する物理ブロック)を一つの物理セクタアドレスに属する各物理ブロックに結合する命令である。
【0108】
なお、結合先の物理セクタアドレスは、新規物理セクタアドレスと既存の物理セクタアドレスを任意に選択できるものとする。
【0109】
図18〜図20に示すように、まず、システム制御部4よりコマンドバス11を介してメモリ管理部2にメモリ結合命令が与えられるとともに、仮想メモリアドレスバス12を介して仮想メモリアドレスがメモリ制御部21に転送されると、仮想メモリアドレスがメモリ制御部21により仮想セクタアドレスAと仮想ブロックアドレスBとに分けられる(ステップC1)。
【0110】
次に、セクタアドレス変換制御部24によりセクタアドレス変換テーブル23が読み出されて、このセクタアドレス変換テーブル23において、仮想セクタアドレスAに対応付けられる物理セクタアドレス群Hが検索されて(ステップC2)、この物理セクタアドレス群Hから結合元である結合元物理セクタアドレス群Cが任意決定される(ステップC3)。なお、この結合元物理セクタアドレス群Cにおける各物理セクタアドレスの登録順番は連続したものであるとする。
【0111】
次に、結合元物理セクタアドレス群Cが二つ以上の物理セクタアドレスで構成される物理セクタアドレス群であるかどうかが判断される(ステップC4)。
【0112】
このステップC4で「NO」と判断されれば、結合すべき物理セクタアドレス群が存在しないので終了処理がなされるが、「YES」と判断されれば、結合先となる結合先物理セクタアドレスFが、結合元物理セクタアドレス群Cのうちの一つであるのか、結合元物理セクタアドレス群Cに属さない新規の物理セクタアドレスであるかどうかが判断される(ステップC5)。
【0113】
ステップC5で「YES」と判断される、すなわち、結合元物理セクタアドレス群Cから一つの物理セクタアドレスが結合先物理セクタアドレスFとして使用される場合には、結合元物理セクタアドレス群Cの中で最新登録の物理セクタアドレス、例えば結合元物理セクタアドレス群Cを構成する各物理セクタアドレスが“3”、“8”および“N”である場合には、物理セクタアドレス“N”が結合先物理セクタアドレスFとして選択される(ステップC6)。
【0114】
結合先物理セクタアドレスFの選択方法は、物理セクタアドレス群Cの直後の物理セクタアドレスを選択する方法としてもよく、この場合、仮想メモリアドレスに対応する物理セクタアドレス群Hを構成する各物理セクタアドレスが“3”、“8”、“N”、および“K”であって、この中で結合元物理セクタアドレス群Cを構成する各物理セクタアドレスが“3”、“8”および“N”である場合には、物理セクタアドレス“K”が結合先物理セクタアドレスFとして選択される。
【0115】
なお、物理セクタアドレス群Hの最新物理セクタアドレスが結合先物理セクタアドレスFそのものであった場合、例えば、物理セクタアドレス群Hを構成する各物理セクタアドレスと、結合元物理セクタアドレス群Cを構成する各物理セクタアドレスがともに“3”、“8”および“N”である場合には、物理セクタアドレス“N”が結合先物理セクタアドレスFとして選択される。
【0116】
ステップC5で「NO」と判断される、つまり、結合先物理セクタアドレスFが結合元物理セクタアドレス群Cに含まれないと指定された場合には、セクタアドレス変換テーブル23に登録されていない物理セクタアドレスがブロック情報テーブル25に追加登録されて、この物理セクタアドレスが結合先物理セクタアドレスFとして設定される(ステップC7)。
【0117】
ここで、結合先物理セクタアドレスFの各ブロックはライト済であった可能性があるので、メモリインタフェース3を通じて結合先物理セクタアドレスFに対して消去処理がなされる(ステップC8)。
【0118】
そして、この物理セクタアドレスDが、セクタアドレス変換制御部24を介してセクタアドレス変換テーブル23に仮想セクタアドレスAに対応する新規物理セクタアドレスとして物理メモリセクタアドレス群Cの末尾の登録順番である物理セクタアドレスの直後の登録順番で登録され(ステップC9)、この新規物理セクタアドレスに属する各物理ブロックが未ライトブロックである物理ブロックとしてブロック情報制御部26を介してブロック情報テーブル25に登録される(ステップC10)。
【0119】
図21は、前記実施形態に係わるメモリ結合処理におけるブロック情報テーブル25での登録処理および削除処理を示す図である。
【0120】
つまり、図21に示すように、p111〜p113に示される結合元物理セクタアドレス“3”、“8”および“N”に属する各物理ブロックに対して、p114で示されるように結合先物理セクタアドレス“α”に属する各物理ブロックが未ライトブロックとしてブロック情報テーブル25にそれぞれ登録される。
【0121】
次に、結合元物理セクタアドレス群Cに属する各物理ブロックの中から最新のライト済ブロックを検索する対象となる物理ブロックアドレスの範囲である、物理ブロックアドレス範囲Iが指定されて、物理ブロックアドレス範囲Iの初期値(=“0”)が設定される(ステップC11)。なお、任意に選択した物理ブロックアドレスだけを選択することもできる。
【0122】
そして、指定された物理ブロックアドレス範囲Iの先頭の物理ブロックアドレスである各物理セクタアドレスのブロック情報が未ライトブロックであるかライト済ブロックであるかどうかが判別され、最初に判別されたライト済ブロックに属する物理セクタアドレスが、物理セクタアドレスDとして検出される(ステップC12)。
【0123】
図22は、前記実施形態に係わるメモリ結合処理においてライト済ブロックが存在する物理セクタアドレスDを検出する例を示す図である。
【0124】
つまり、図22に示すように、結合元物理セクタアドレス群Cに属する各物理セクタアドレスが、その登録順番の古い順から“3”、“8”および“N”である場合で、物理ブロックアドレス範囲Iの先頭の物理ブロックアドレスが“0”である場合には、検索の対象となるブロックはp121で囲まれた検索列となり、検索される順番は、物理セクタアドレス群Cに属する各物理セクタアドレスの登録順番の新しい方から古い方に、つまり物理セクタアドレスが“N”で物理ブロックアドレスが“0”で対応付けられる物理ブロック(p122)から検索され、次に、物理セクタアドレスが“8”で、物理ブロックアドレスが“0”で対応付けられる物理ブロック(p123)が検索され、最後に物理セクタアドレスが“3”で、物理ブロックアドレスが“0”で対応付けられる物理ブロック(p124)が検索されることになる。
【0125】
そして、物理セクタアドレスの登録順番に従って、検索列のなかで最初に検出されたライト済ブロック、つまり、物理セクタアドレスが“8”で、物理ブロックアドレスが“0”である物理ブロックがライト済ブロックとして検出され、この検索列において検出されたライト済ブロックが属する物理セクタアドレスである物理セクタアドレスDは“8”となる。
【0126】
図23は、前記実施形態に係わるメモリ結合処理においてライト済ブロックが存在する物理セクタアドレスDが検出されない例を示す図である。
【0127】
つまり、図23に示すように、メモリセクタアドレス群Cの各要素セクタアドレスが登録の古い順から“3”,”8”および“N”で構成され、物理ブロックアドレスBが“1”である場合には、検索列はp131で囲まれた検索列となり、登録順番の新しい物理セクタアドレスに対応したブロックから順番に検索される。この場合、検索されたブロックが未ライトブロックである、すなわちライト済ブロックが検出されないので、物理セクタアドレスDは検出されない。
【0128】
そして、ステップC12により物理セクタアドレスDが検出されたかどうかが判断され(ステップC13)、「YES」と判断された場合には、この物理セクタアドレスDと、物理ブロックアドレス範囲Iのなかで現在検索対象となっている各物理ブロックが属する物理ブロックアドレスから物理メモリアドレスEが計算されるとともに、結合先物理セクタアドレスFと、物理ブロックアドレス範囲Iのなかで現在検索対象となっている物理ブロックが属する物理ブロックアドレスから物理メモリアドレスGが計算され、メモリインタフェース3を介して物理メモリアドレスEから物理メモリアドレスGに対してブロックデータが反映(コピー)される。ただし、物理メモリアドレスEとFが同じアドレスであればデータコピーの必要はない(ステップC14)。
【0129】
そして、ブロック情報制御部26を介してブロック情報テーブル25に登録される物理セクタアドレスFの物理ブロックアドレス範囲Iに対応するブロック情報がライト済を示すブロック情報すなわち“1”に更新される(ステップC15)。
【0130】
つまり、図21に示すように、物理セクタアドレス群Cにおける最新ライト済ブロックのデータがコピーされる毎に、p114で示された物理セクタアドレス“α”に属する各物理ブロックの中から、ステップCにより検索された結果ライト済ブロックが存在する物理ブロックアドレスと同一の物理ブロックのブロック情報が、p115で示されるブロック情報である“1”に更新される。
【0131】
次に、物理ブロックアドレスが、物理ブロックアドレス範囲Iにおける最後のブロックアドレスつまり物理ブロックアドレスMであるかどうかが判断され(ステップC16)、このステップCで「NO」と判断される、すなわち物理ブロックアドレスが物理セクタアドレスアドレスMでなく、検索すべき物理ブロックアドレスに属する物理ブロックが残っている場合には、現在検索対象となっている物理ブロックアドレスの値に1を加えた物理ブロックアドレスに属する各物理ブロックのブロック情報の判別が引き続きなされる(ステップC16→C17→C12)。
【0132】
図24は、前記実施形態に係わるメモリ結合処理において、最新ライト済ブロックの検出例を示す図である。
【0133】
図24に示すように、物理ブロックアドレス範囲Iの先頭が“0”で、同じく最後が“M”である場合で、検索順番が、物理ブロックアドレス“N”、“8”そして“3”の順番である場合には、p132で示す物理ブロックが、各物理ブロックアドレスに属する物理ブロックの中から最新ライト済ブロックとして検出される物理ブロックとなる。
【0134】
次に、ブロック情報制御部26を介してブロック情報テーブル25に登録される結合元物理セクタアドレス群Cに属する物理ブロックの全ブロック情報が消去すなわち“0”に更新処理される(ステップC18)。ただし、結合先物理セクタアドレスFが結合元物理セクタアドレス群Cに属する物理セクタアドレスの中で最新の登録アドレスであれば、物理セクタアドレスFに属する物理ブロック情報の消去はなされない。
【0135】
そして、結合元物理セクタアドレス群Cに対する物理ブロックアドレス範囲I毎の最新ライト済ブロックのデータは、全て結合先物理セクタアドレスFの物理ブロックに存在するので、セクタアドレス変換制御部24を介してセクタアドレス変換テーブル23から結合元物理セクタアドレス群Cが削除される(ステップC19)。
【0136】
ただし、結合先物理セクタアドレスFが結合元物理セクタアドレス群Cの中で最新登録の物理セクタアドレスであれば、物理セクタアドレスFの削除はなされない。
【0137】
つまり、図21に示すように、物理セクタアドレス群Cの各物理セクタアドレスが“3”、“8”および“N”である場合には、ステップC19により、p111〜p113で示される物理セクタアドレス、つまり“3”、“8”および“N”の全てがブロック情報テーブル25およびセクタアドレス変換テーブル23から削除されるが、結合先物理セクタアドレスFが結合元物理セクタアドレス群Cの中の最新登録アドレスである“N”であれば、p111とp112で示される物理セクタアドレスつまり“3”と“8”のみがブロック情報テーブル25およびセクタアドレス変換テーブル23から削除される。
【0138】
図25は、前記実施形態に係わるメモリ結合処理においてセクタアドレス変換テーブル23での登録処理および削除処理を示す図である。
【0139】
図25に示すように、仮想セクタアドレスAが“0”であり、この仮想セクタアドレス“0”がセクタアドレス変換テーブル23により物理セクタアドレス群Hに属する物理セクタアドレス“3”、“8”、“N”および“K”で対応付けられ、結合先物理セクタアドレスFが“α”であり、結合元物理セクタアドレス群Cに属する各物理セクタアドレスの“3”、“8”および“N”が選択された場合、新規物理セクタアドレス“α”は、p141で示される結合元物理セクタアドレス群Cの末尾の物理セクタアドレス“N”の直後(p142)に登録される。
【0140】
その結果、仮想セクタアドレス“0”は、一時的に物理セクタアドレス群“3”、“8”、“N”、“α”および“K”と対応付けられる。
【0141】
この場合には、図20に示すステップC19の処理により、p141で示す結合元物理セクタアドレス群C“3”,”8”および”N”の登録が消去されることになり(p143)、その結果、仮想セクタアドレスAはアドレス変換テーブルで物理セクタアドレス群Hの物理セクタアドレスの“α”と”K”に対応付けられることになる。
【0142】
また、結合元物理セクタアドレス群Cが“3”、“8”および“N”であり、結合先物理セクタアドレスFが既存物理セクタアドレス“N”であり、仮想セクタアドレスAが“0”であり、仮想セクタアドレスAはアドレス変換テーブルで物理セクタアドレス群Hに属する物理セクタアドレスの“3”、“8”、“N”および“K”で対応付けられる場合には、図20に示すステップC19の処理により結合元物理セクタアドレス群Cに属する物理セクタアドレスの“3”および“8”の登録が消去されることになり(p144)、その結果、仮想セクタアドレスAはアドレス変換テーブルで物理セクタアドレス群Hに属する物理セクタアドレスの”N”と“K”に対応付けられることになる。
【0143】
また、結合元物理セクタアドレス群Cに属する物理セクタアドレスが“3”、“8”および“N”であり、結合先物理セクタアドレスFが既存の物理セクタである“K”であり、仮想セクタアドレスAが“0”であり、仮想セクタアドレスAはアドレス変換テーブルで物理セクタアドレス群Hに属する物理セクタアドレスの“3”、“8”、“N”および“K”に対応付けられる場合、図20に示すステップC19の処理により、p141で示す結合元物理セクタアドレス群Cに属する物理セクタアドレスの“3”、“8”および“N”の登録が消去されることになり(p143)、その結果、仮想セクタアドレスAはアドレス変換テーブルで物理セクタアドレス群Hに属する物理セクタアドレスの“K”に対応付けられることになる。
【0144】
図26は、前実施形態に係わるメモリ結合処理において、結合対象となる物理ブロックアドレスを任意に選択する場合の処理を示すフローチャートである。
【0145】
なお、図26に示すフローチャートは、図18〜図20に示すフローチャートの一部を置き換えたものである。
【0146】
まず、図26に示すように、まず、結合先セクタアドレスの選択処理すなわち図19に示すステップC1〜C10と同様の処理がなされると(ステップC20)、結合の対象とすべき物理ブロックアドレス群Jの範囲が任意に設定される(ステップC21)。ここで物理ブロックアドレス群Jの設定方法は特に問わない。例えば、図18に示すステップC1の処理において分けられる物理ブロックアドレスBが使用されてもよいし、データバス13を介して物理ブロックアドレス群Jの情報を得ることで設定がなされてもよい。
【0147】
そして、結合対象となる物理ブロックアドレスを示す物理ブロックアドレス範囲Iに基づいて物理ブロックアドレス群Jの先頭要素が設定され(ステップC22)、結合処理すなわち図20に示すステップC12〜C15と同様の処理がなされる(ステップC23)。なお、ステップC23において、最新ライト済の物理セクタアドレスが検出されたかどうかが判断される場合、つまり、図20に示すステップC12と同様の処理により物理セクタアドレスDが検出されないと判断された場合には、物理ブロックアドレス範囲Jにおいて現在結合処理がなされている物理ブロックアドレス値に対して1を加えた物理ブロックアドレスに係る結合処理がなされる(ステップC13→C17→C12)。
【0148】
そして、ステップC23までの処理終了後に、物理ブロックアドレス範囲Iが物理ブロックアドレス群Jの最終要素であるかどうかの判断がなされ(ステップC24)、「YES」と判断されると終了処理がなされ、「NO」と判断される。つまり最終要素で無ければ、物理ブロックアドレス範囲Jにおいて現在結合処理がなされている物理ブロックアドレス値に対して1を加えた物理ブロックアドレスに係る結合処理がなされる(ステップC24→C25→C23)。
【0149】
なお、図20に示すステップC18およびC19の処理はなされない。これは、図18〜図20に示す結合処理が結合元の物理セクタアドレスに属する全ブロックに対する処理なのに対して、一部分の物理ブロックアドレスの範囲において結合処理がなされるため、結合処理が終了しても結合元の物理セクタアドレスに属する各物理ブロックの中に有効ブロックつまり結合先物理セクタアドレスに属する物理ブロックに対して結合処理がなされていない物理ブロックが存在する可能性があるためである。
【0150】
つまり、このメモリ結合処理により、セクタアドレス変換テーブル23とブロック情報テーブル25により複数の物理セクタアドレスとを対応付けられた仮想セクタアドレス一つの物理セクタアドレスと対応づけられるので、メモリ資源を状況に応じて有効に使用することができる。
加えて、セクタアドレス変換テーブル23では、前述したように仮想セクタのアドレスに対する物理セクタのアドレスの対応付けの順番を管理し、メモリ結合処理の際には仮想ブロックアドレスBと結合元物理セクタアドレス群Cで示される物理セクタのうち仮想セクタアドレスAと最も遅い順番で対応付けられた物理セクタのアドレスで示される物理ブロックのブロック情報を結合先物理セクタアドレスFに属する物理ブロックへの反映対象のブロック情報とする。
よってメモリ結合処理の際にはブロック情報テーブル25で管理する結合元物理セクタアドレス群Cで示される物理ブロックのうちブロック情報が結合先物理セクタアドレスFに属する物理ブロックに反映された物理ブロックのブロック情報を更新する必要がなくなる。
【0151】
図32は、従来のメモリ制御装置において、全ブロックに対して任意のデータライトを行った仮想セクタに対してオーバライトする時の例を示した図であり、同図(a)は、仮想セクタに対してデータを書き込む前の状態を示す図であり、同図(b)は、仮想セクタに対してデータを書き込む際の物理セクタに対する処理を示す図である。
【0152】
まず、図32(a)において、既に全ブロックに対して任意のデータライトがなされた仮想セクタGは物理セクタXとセクタアドレス変換制御部24により対応付けられる。ここで、仮想セクタGの0番ブロックに任意のブロックデータ(P151)をライトすると仮定すると、既に実際にライトすべき物理セクタX上のp152で示す物理ブロックはライト済であるので、ブロックデータ(p151)は、新たに用意された、物理ブロックが全て未ライトブロックである物理セクタY上の、0番ブロックつまり物理ブロックアドレスが“0”である物理ブロック(p153)にライトされ、物理セクタX上のライト対象外の全ブロックすなわち仮想セクタGの1番ブロックからM番ブロックまでのブロック群に対応付けられていたp154に示す物理ブロック群のブロックデータが、新たに対応付けられた物理セクタYの1番ブロックからM番ブロックである物理ブロック群(p155)にコピーされ、図32(b)に示すようにセクタアドレス変換制御部24により仮想セクタGと物理セクタXとの対応付けが無くなり、新しい物理セクタYが仮想セクタと対応付けられる。
【0153】
つまり、物理メモリへの一つのブロックのライト時間をx、リード時間をy、一つのセクタがM個のブロックで構成されていると仮定すると、ブロックデータのライト処理に要したメモリアクセス合計時間T1は、
【数1】

Figure 0003699942
となる。
【0154】
図27は、本発明の実施形態に係わるメモリ制御装置において、全ブロックに対して任意のデータライトを行った仮想セクタに対してオーバライトする時の例を示した図であり、同図(a)は、仮想セクタに対して一つ目のデータを書き込む前の状態を示す図であり、同図(b)は、仮想セクタに対して一つ目のデータを書き込む際の物理セクタに対する処理および二つめのデータを書き込む前の状態を示す図であり、同図(c)は、仮想セクタに対して二つめのデータを書き込む際の物理セクタに対する処理を示す図である。
【0155】
まず、図27(a)において、既に全ブロックに対して任意のデータライトがなされた仮想セクタGは物理セクタXとセクタアドレス変換制御部24により1対1で対応付けられる。ここで、仮想セクタGの0番ブロックに任意のブロックデータ(p161)をライトするものと仮定する。
【0156】
このとき、既に実際にライトすべき物理メモリ上の物理ブロック(p162)はライト済であるので、図27(b)に示すように、セクタアドレス変換制御部24により新しい物理セクタYが用意され、ブロックデータ(p161)が物理セクタY上の0番ブロックつまり物理ブロックアドレスが“0”である物理ブロック(p163)にライトされ、セクタアドレス変換制御部24により仮想セクタGに対して物理セクタYが新たに対応付けられる。このとき、仮想セクタGと物理セクタXとの対応付けは残ったままであるので、仮想セクタGが物理セクタXと物理セクタYがともに対応付けられることになる。更に仮想セクタGの0番ブロックに対応付けられる物理セクタXの0番ブロック(p162)と、同じく仮想セクタGの0番ブロックに対応付けられる物理セクタYの0番ブロック(p163)のどちらのブロックに書き込まれたデータが有効すなわち最新ライト済のデータであるかを判別するためにブロック情報制御部26でブロック情報が管理される。
【0157】
図32と同様に、物理メモリへの一つのブロックのライト時間をx、リード時間をyとし、一つのセクタがM個のブロックで構成されていると仮定すると、ブロックデータのライト処理終了までに要したメモリアクセス合計時間T2は、
【数2】
Figure 0003699942
となる。
【0158】
なお、この場合、物理セクタXの1番ブロックからM番ブロックまでのブロックデータ(p167)は仮想セクタGの1番ブロックからM番ブロックまでに対応付けられることになる。
【0159】
更に、図27(b)において、仮想セクタGの1番ブロックに任意のデータ(p164)をライトすると仮定する。
【0160】
この場合、実際にライトすべき物理セクタY上の1番ブロック(p165)は空であるので、図27(c)で示すように、新規ブロックデータ(p164)が物理セクタY上の1番ブロック(p165)にライトされ、物理セクタX上の1番ブロック(p166)と物理セクタY上の1番ブロック(p165)のどちらのブロックに書き込まれたデータが有効であるかを判別するためにブロック情報制御部26でブロック情報が管理される。
【0161】
なお、物理セクタXの2番ブロックからM番ブロックまでのブロックデータ(p168)は仮想セクタGの2番ブロックからM番ブロックまでに対応付けられることになる。
【0162】
この場合、新規ブロックデータ(p164)のライト処理終了までに要したメモリアクセス合計時間T3は、
【数3】
Figure 0003699942
となる。
【0163】
図28は、前記実施形態に係わるポインタ式ブロック情報テーブル25の構成を示す図である。
【0164】
図28に示すように、このポインタ式ブロック情報テーブル25は、図6に示すフラグ式ブロック情報テーブル25に代わって用いられるものであり、メモリ制御装置において、セクタ内のランダムブロックプログラムすなわち物理ブロック毎のブロック情報管理処理が禁止されている不揮発性メモリ1、および不揮発性メモリ1に対して自らランダムブロックプログラムが禁止されている場合に用いられるブロック情報テーブル25である。
【0165】
このポインタ式ブロック情報テーブル25では、ブロック情報制御部26からの制御により、物理セクタアドレスをインデックス値としてこのインデックスに対応して未ライト、もしくはライト済の連続した物理ブロックの範囲の情報を、登録(p171)、更新(p172)および削除(p173)することが可能であり、テーブル値すなわち物理ブロックの情報は各物理セクタに対するライト済の最終物理ブロックアドレス値もしくは、未ライトの先頭物理ブロックアドレス値である。
【0166】
例えば、ポインタ式のブロック情報テーブル25に未ライトの先頭物理ブロックアドレス値を登録する場合で、p174で示された物理セクタアドレスと物理ブロックアドレス値との関係は、物理セクタアドレスBが物理ブロックアドレスβから最終ブロックまで未使用状態なこと示し、p175で示された物理セクタアドレスと物理ブロックアドレス値との関係は、物理セクタアドレスAが物理ブロックアドレスαからセクタの最終ブロックまで未使用状態なことを示している。
【0167】
また、ポインタ式のブロック情報テーブル25にライト済の最終物理ブロックアドレスを登録する場合で、p174で示された物理セクタアドレスと物理ブロックアドレス値との関係は、物理セクタアドレスBが先頭ブロックから物理ブロックアドレスβまで使用状態にあることを示し、p175で示された物理セクタアドレスと物理ブロックアドレス値との関係は、物理セクタアドレスAが先頭ブロックから物理ブロックアドレスαまで使用状態にあることを示している。ただし、全ての物理ブロックが未使用である場合には、例えば“−1”などの、使用しない物理ブロックアドレス値を割り当てるものとする。
【0168】
図29は、前記実施形態に係わるポインタ式ブロック情報テーブル25における仮想セクタと物理セクタの各物理ブロックとの対応を示す図であり、同図(a)は、仮想セクタが一つの物理セクタの各物理ブロックと対応付けられた場合を示す図であり、同図(b)は、仮想セクタが複数の物理セクタの各物理ブロックと対応付けられた場合を示す図である。
【0169】
この、仮想セクタと物理セクタの各物理ブロックとの対応とは、セクタアドレス変換テーブル23において、仮想セクタK(p181)が、それに対する登録順番の古い方から物理セクタアドレスB,Aの順番で対応付けられると仮定した仮想セクタKが、図28のp174、p175で示すように物理セクタアドレスA,Bと対応付けられる場合に、仮想セクタの各ブロックと、物理セクタの各物理ブロックとの対応を示している。
【0170】
なお、仮想セクタと物理セクタで共通となるブロックアドレス値は、未使用先頭ブロックオフセットアドレス値が登録されているものとし、“α”および“β”は最大物理ブロックアドレス“M”以外のブロックアドレス値であるものとする。
【0171】
図29(a)に示すように、“α”>“β”の場合には、p182で示すように、仮想セクタKの0ブロックからβ−1ブロックまでは物理セクタアドレスBの0ブロックからβ−1ブロックが対応し、p183で示すように、“β”ブロックから“α−1”ブロックまでは物理セクタアドレスAの“β”ブロックから“α−1”ブロックが対応し、p184で示すように、“α”から“M”ブロックまでは未使用ブロックで対応づけられる。
【0172】
また、図29(b)に示すように、“α”≦“β”の場合には、p185で示すように、仮想セクタKの“0”ブロックから“β−1”ブロックまでは物理セクタアドレスBの“0”ブロックから“β−1”までが対応し、また、p186で示すように、“β”から“M”ブロックまでは未使用ブロックで対応づけられる。
【0173】
つまり、図29(a)に示すような場合には、仮想セクタKと対応付けられる物理セクタアドレスAのブロックアドレスの範囲が、同じく仮想セクタKと対応付けられる物理セクタアドレスBの範囲と重複しないために、仮想セクタKの各仮想ブロックは物理セクタアドレスAおよび物理セクタアドレスBに属する各物理ブロックと対応付けられるが、図29(b)に示すような場合には、仮想セクタと対応付けられる物理セクタアドレスAのブロックアドレスの範囲が、同じく仮想セクタと対応付けられる物理セクタアドレスBの範囲に含まれてしまうために、仮想セクタKの各仮想ブロックは物理セクタアドレスAの各物理ブロックとは対応付けられずに、物理セクタアドレスBに属する各物理ブロックのみと対応付けられることになる。
【0174】
図30は、前記実施形態に係わるメモリ制御装置によるメモリイレーズ処理を示すフローチャートである。
【0175】
図30に示すように、まず、システム制御部4よりコマンドバス11を介してメモリ管理部2にメモリイレーズ命令(消去命令)が与えられるとともに、仮想メモリアドレスバス12を介して仮想メモリアドレスがメモリ制御部21に転送されると、仮想メモリアドレスがメモリ制御部21により仮想セクタアドレスAと仮想ブロックアドレスBとに分けられる(ステップD1)。
【0176】
次に、セクタアドレス変換制御部24によりセクタアドレス変換テーブル23が読み出されて、このセクタアドレス変換テーブル23と仮想セクタアドレスAとが照合されて、該仮想セクタアドレスAに対応付けられる一つまたは複数の物理セクタアドレスで構成される物理セクタアドレス群Cが存在するかどうかが判断される(ステップD2,D3)。
【0177】
ステップD3で「NO」と判断される、すなわち仮想セクタアドレスAに対応付けられる物理セクタアドレス群Cが存在しない場合には、仮想セクタアドレスAがどの物理セクタとも対応付けられてなく、つまりイレーズ対象が無いので終了処理がなされる。
【0178】
一方、ステップD3で「YES」と判断される、すなわち仮想セクタアドレスAに対応付けられる物理セクタアドレス群C存在する場合には、ブロック情報制御部26を介してブロック情報テーブル25に登録される物理セクタアドレス群Cの全ブロック情報が消去すなわち“0”に更新処理される(ステップD4)。
【0179】
そして、セクタアドレス変換制御部24を介してセクタアドレス変換テーブル23から物理セクタアドレス群Cが削除される(ステップD5)。
【0180】
このメモリイレーズ処理により、仮想セクタアドレスAは全ての物理セクタアドレスとの対応付けがなされなくなる。この時、仮想セクタアドレスAをリードすると、対応する物理ブロックアドレス群が存在しないことになるので、消去処理が行われた適当な物理セクタアドレスの各ブロックデータが転送されることになる。
【0181】
つまり、このメモリイレーズ処理により、セクタアドレス変換テーブル23とブロック情報テーブル25からイレーズすべき仮想セクタアドレスに関する情報を削除するだけで、対応付けられた物理セクタアドレス群のメモリ上のデータ消去を行うことにより、イレーズ処理速度が向上する。
【0182】
図31は、前記実施形態に係わるメモリ制御装置に備えられるセクタアドレス変換テーブル23におけるメモリコピー処理およびメモリ移動処理を示す図である。
【0183】
このメモリコピー処理とは、コピー元の仮想セクタアドレスに対応付けられる物理セクタアドレス群を、このコピー元の仮想セクタアドレスとの対応付けを残したままで、コピー先の仮想セクタアドレスにも対応付ける処理のことであり、このメモリコピー処理によりコピー元の仮想セクタアドレスに対応付けられる全ての物理ブロック情報がコピー先の仮想セクタアドレスにも対応付けられることになる。
【0184】
また、メモリ移動処理とは、移動元の仮想セクタアドレスに対応付けられる物理セクタアドレス群を、移動元の仮想セクタアドレスとの対応付けを無くすとともにコピー先の仮想セクタアドレスに対応付ける処理のことであり、このメモリ移動処理により移動元の仮想セクタアドレスに対応付けられる全ての物理ブロック情報が移動先の仮想セクタアドレスに対応付けられることになる。
【0185】
なお、ここでは、転送元仮想セクタ、転送先仮想セクタおよびコピーか移動かの指定手段は問わないものとする。
【0186】
まず、メモリ制御装置によるメモリコピー処理について説明する。
【0187】
図31に示すように、セクタアドレス変換テーブル23において、転送元仮想セクタアドレスAに物理セクタアドレス群(p191)の“3”、“8”および“N”と対応付けられ、また、転送先仮想セクタアドレスBが別の物理セクタアドレス群(p192)と対応付けられている場合で、仮想セクタアドレスAに対応付けられる全ブロックデータを仮想セクタアドレスBにコピーする場合、つまり、システム制御部4よりコマンドバス11を介してメモリ管理部2にメモリコピー命令が与えられるとともに、仮想メモリアドレスバス12を介してコピー元およびコピー先の仮想メモリアドレスがメモリ制御部21に転送されると、仮想セクタアドレスBに対応付けられる、つまりp192に示す物理セクタアドレス群の全物理ブロックのブロック情報が削除され、p191に示す物理セクタアドレス群の全データ、すなわち物理セクタアドレス“3”、“8”、“N”に属しており、かつ、仮想セクタアドレスAと対応付けられる全ての物理ブロックアドレスおよびそのブロック情報が仮想セクタアドレスBに対応付けられる。
【0188】
この時、仮想セクタアドレスBは仮想セクタアドレスAと同じ物理セクタと対応付けられることになるので、該物理セクタのブロックデータを変更する場合には、変更する物理セクタの全ブロックデータをコピーした新規物理セクタを用いて処理され、セクタアドレス変換テーブル23における登録を置き換えることで処理されるものとする。
【0189】
次に、メモリ制御装置によるメモリ移動処理について説明する。
【0190】
同じく、セクタアドレス変換テーブル23において、セクタアドレス変換テーブル23において、転送元仮想セクタアドレスCに物理セクタアドレス群(p193)の“9”、“2”および“5”と対応付けられ、また、転送先仮想セクタアドレスDが別の物理セクタアドレス群(p194)と対応付けられている場合で、仮想セクタアドレスBに対応付けられる全ブロックデータを仮想セクタアドレスBに移動させる場合、つまり、システム制御部4よりコマンドバス11を介してメモリ管理部2にメモリ移動命令が与えられるとともに、仮想メモリアドレスバス12を介して移動元および移動先の仮想メモリアドレスがメモリ制御部21に転送されると、仮想セクタアドレスDに対応付けられる、つまりp194に示す物理セクタアドレス群の全物理ブロックのブロック情報およびが削除され、p193に示す物理セクタアドレス群の全データ、すなわち物理セクタアドレス“9”、“2”、“5”に属しており、かつ、仮想セクタアドレスCと対応付けられる全ての物理ブロックアドレスおよびそのブロック情報が仮想セクタアドレスDに対応付けられるとともに、仮想セクタアドレスCと物理セクタアドレス群(p193)との対応付けがなくなる。
【0191】
つまり、これらのメモリコピー処理またはメモリ移動処理により、任意の仮想セクタから任意の仮想セクタに全ブロックデータをコピーする場合、または任意の仮想セクタから任意の仮想セクタに全ブロックデータを移動する場合であっても、不揮発性メモリ1上でのデータコピーまたはデータ移動が発生しないので、処理を高速化することができる。
【0192】
したがって、前記構成のメモリ制御装置によれば、セクタアドレス変換テーブル23およびブロック情報テーブル25により、一つの仮想セクタが複数の物理セクタと対応付けられた上で、メモリライト処理により、ライトすべき仮想セクタアドレスに対応付けられた物理セクタアドレス群中から適当な未ライトブロックが存在する物理セクタアドレスが検出され、また、メモリリード処理により、ライトすべき仮想セクタアドレスに対応付けられた物理セクタアドレス群中から適当なライト済ブロックが存在する物理セクタアドレスが検出され、また、メモリ結合処理により、セクタアドレス変換テーブル23とブロック情報テーブル25で複数の物理セクタアドレスとを対応付けられた仮想セクタアドレスが、一つの物理セクタアドレスと対応づけられ、また、メモリイレーズ処理により、イレーズすべき仮想セクタアドレスに対する物理セクタアドレス群が削除され、また、メモリコピー処理及びメモリ移動処理により、セクタアドレス変換テーブル23上の仮想セクタアドレスと物理セクタアドレスの対応付けの情報が書き換えられるので、メモリの読み書きに係る処理時間を短縮し、また、メモリ資源を効率よく使うことが可能になる。
【0193】
【発明の効果】
以上のように、本発明係わるメモリ管理方式によれば、各々が物理ブロックを書き込み単位として複数有してなる物理セクタを消去単位として複数有してなる物理メモリおよび当該物理メモリの物理セクタと対応付けた仮想セクタを複数有してなる仮想メモリを用いてデータの読み書きを管理するメモリ管理方式であって、仮想セクタのアドレスと単一または複数の物理セクタのアドレスとを当該仮想セクタのアドレス毎に対応付けるセクタアドレス管理手段と、このセクタアドレス管理手段により仮想セクタのアドレスと対応付けた複数の物理セクタの各アドレスの対応付けのタイミングの順序を管理する順序管理手段と、物理セクタに属する物理ブロックの使用状態を示すブロック情報を管理するブロック情報管理手段と、データ書き込み対象の仮想メモリアドレスで示される物理ブロックのアドレスを計算する第1の計算手段と、書き込み対象の仮想メモリアドレスで示される仮想セクタのアドレスを計算する第2の計算手段と、ブロック情報管理手段により管理されるブロック情報および順序管理手段により管理される順序に基づいて、第2の計算手段により計算した仮想セクタのアドレスに対してセクタアドレス管理手段により対応付けられる物理セクタの各アドレスおよび第1の計算手段により計算したアドレスと対応する使用状態にある物理ブロックのうち最も遅い順序で計算した仮想セクタのアドレスに対してセクタアドレス管理手段により対応付けられた物理セクタのアドレスより後の順序で計算した仮想セクタのアドレスに対してセクタアドレス管理手段により対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして検出するセクタアドレス検出手段とを有し、セクタアドレス管理手段は、セクタアドレス検出手段によりアドレスが検出されなかった場合に属する全ての物理ブロックが未使用状態にある物理セクタのアドレスを計算した仮想セクタのアドレスと新たに対応付け、順序管理手段は、この新たに対応付けられた物理セクタのアドレスが計算した仮想セクタのアドレスとセクタアドレス管理手段により最も遅い順序で対応付けられたとして管理し、新たに対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして指定するセクタアドレス指定手段を有し、ブロック情報管理手段は、セクタアドレス指定手段により指定されたアドレスおよび第1の計算手段により計算した物理ブロックのアドレスで特定される物理ブロックのブロック情報を使用状態を示す情報に書き換えることになる。
【0198】
したがって、本発明は不揮発性メモリの読み書きに係る処理時間を短縮し、また、メモリ資源を効率よく使うことが可能になる
【図面の簡単な説明】
【図1】本発明の実施形態に係わるメモリ制御装置の構成を示す図。
【図2】前記実施形態に係わるメモリ制御装置に備えられるメモリ管理部の構成を示す図。
【図3】前記実施形態に係わるメモリ制御装置に備えられるセクタアドレス変換テーブルの構成を示す図。
【図4】前記実施形態に係わるメモリ制御装置に備えられるセクタアドレス変換テーブルによる仮想メモリと物理メモリの対応付けの例を示す図。
【図5】前記実施形態に係わる仮想セクタと物理セクタとの対応付けの例を示す図。
【図6】前記実施形態に係わるメモリ制御装置に備えられるブロック情報テーブルの構成を示す図。
【図7】前記実施形態に係わるメモリ制御装置によるメモリライト処理(その1)を示すフローチャート。
【図8】前記実施形態に係わるメモリ制御装置によるメモリライト処理(その2)を示すフローチャート。
【図9】前記実施形態に係わるメモリライト処理において未ライトブロックが存在する物理セクタアドレスDが検出される例を示す図。
【図10】 前記実施形態に係わるメモリライト処理において未ライトブロックが存在する物理セクタアドレスDを検出できない例を示す図。
【図11】前記実施形態に係わるブロック情報テーブル内のブロック情報の更新処理を示す図。
【図12】前記実施形態に係わるブロック情報テーブルに対する新規物理セクタアドレスの登録処理と、この登録処理に伴うブロック情報の更新処理を示す図。
【図13】前記実施形態に係わるメモリ制御装置によるメモリリード処理(その1)を示すフローチャート。
【図14】前記実施形態に係わるメモリ制御装置によるメモリリード処理(その2)を示すフローチャート。
【図15】前記実施形態に係わるメモリリード処理においてライト済ブロックが存在する物理セクタアドレスDが検出される例を示す図。
【図16】 前記実施形態に係わるメモリリード処理においてライト済ブロックが存在する物理セクタアドレスDが検出されない例を示す図。
【図17】前記実施形態に係わるブロック情報テーブルに対する新規物理セクタアドレスの登録処理を示す図。
【図18】前記実施形態に係わるメモリ制御装置によるメモリ結合処理(その1)を示すフローチャート。
【図19】前記実施形態に係わるメモリ制御装置によるメモリ結合処理(その2)を示すフローチャート。
【図20】前記実施形態に係わるメモリ制御装置によるメモリ結合処理(その3)を示すフローチャート。
【図21】前記実施形態に係わるメモリ結合処理におけるブロック情報テーブルでの登録処理および削除処理を示す図。
【図22】前記実施形態に係わるメモリ結合処理においてライト済ブロックが存在する物理セクタアドレスDを検出する例を示す図。
【図23】前記実施形態に係わるメモリ結合処理においてライト済ブロックが存在する物理セクタアドレスDが検出されない例を示す図。
【図24】前記実施形態に係わるメモリ結合処理において、最新ライト済ブロックの検出例を示す図。
【図25】 前記実施形態に係わるメモリ結合処理においてセクタアドレス変換テーブルでの登録処理および削除処理を示す
【図26】 前実施形態に係わるメモリ結合処理において、結合対象となる物理ブロックアドレスを任意に選択する場合の処理を示すフローチャート
【図27】 本発明の実施形態に係わるメモリ制御装置において、全ブロックに対して任意のデータライトを行った仮想セクタに対してオーバライトする時の例を示した図であり、同図(a)は、仮想セクタに対して一つ目のデータを書き込む前の状態を示す図であり、同図(b)は、仮想セクタに対して一つ目のデータを書き込む際の物理セクタに対する処理および二つめのデータを書き込む前の状態を示す図であり、同図(c)は、仮想セクタに対して二つめのデータを書き込む際の物理セクタに対する処理を示す
【図28】前記実施形態に係わるポインタ式ブロック情報テーブルの構成を示す図。
【図29】前記実施形態に係わるポインタ式のブロック情報テーブルにおける仮想セクタと物理セクタの各物理ブロックとの対応を示す図であり、同図(a)は、仮想セクタが一つの物理セクタの各物理ブロックと対応付けられた場合を示す図であり、同図(b)は、仮想セクタが複数の物理セクタの各物理ブロックと対応付けられた場合を示す図。
【図30】前記実施形態に係わるメモリ制御装置によるメモリイレーズ処理を示すフローチャート。
【図31】前記実施形態に係わるメモリ制御装置に備えられるセクタアドレス変換テーブルにおけるメモリコピー処理およびメモリ移動処理を示す図。
【図32】 従来のメモリ制御装置において、全ブロックに対して任意のデータライトを行った仮想セクタに対してオーバライトする時の例を示した図であり、同図(a)は、仮想セクタに対してデータを書き込む前の状態を示す図であり、同図(b)は、仮想セクタに対してデータを書き込む際の物理セクタに対する処理を示す
【符号の説明】
1・・・不揮発性メモリ
2・・・メモリ管理部
3・・・メモリインタフェース
4・・・システム制御部
11・・・コマンドバス
12・・・仮想メモリアドレスバス
13・・・データバス
14・・・メモリアクセスコマンドバス
15・・・物理メモリアドレスバス
16・・・メモリデータバス
17・・・メモリバス
21・・・メモリ制御部
22・・・データバッファ
23・・・セクタアドレス変換テーブル
24・・・セクタアドレス変換制御部
25・・・ブロック情報テーブル
26・・・ブロック情報制御部[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a memory management method in a non-volatile memory in which an erase unit is composed of a plurality of write unitsAnd memory management deviceAbout.
[0002]
[Prior art]
  In the prior art, the correspondence of the sector (physical memory) of the memory (physical memory) on the nonvolatile memory to the erasing unit (sector) of the memory (virtual memory) viewed from the system is one for each virtual sector.PhysicsIt was a method of associating sectors.
[0003]
[Problems to be solved by the invention]
  However, when an overwrite occurs on a write unit area (block) on which a data write has already been performed on a physical sector associated with a virtual memory, a new physical sector to which no data has been written is assigned.PreparationThen, the block data to be updated and the block data other than the block to be overwritten on the sector to which the block to be overwritten belong are written on the new physical sector, and the virtual sector and the existing physical sector are written. Since it is necessary to erase the sector association and associate it with a new physical sector, the processing time of data write becomes longer as block data other than the overwrite block needs to be written to the new physical sector. There was a problem that the memory capacity to be used increased.
[0004]
  The present invention has been made in order to solve the above-described problem, and is a memory management method capable of shortening a processing time related to reading and writing of a memory and efficiently using memory resources.And memory management deviceThe purpose is to provide.
[0005]
  That is, the present inventionInEach memory management system involved isMultiple physical blocks as write unitsHaveMultiple physical sectors as erasure unitsPhysical memoryandCorresponds to the physical sector of the physical memoryMultiple virtual sectorsA memory management method for managing reading and writing of data using a virtual memory having a virtual sector address and a single or a plurality of physical sector addresses.For each virtual sector addressA sector address management means to be associated;Order management means for managing the order of timing of correspondence of each address of a plurality of physical sectors associated with the address of the virtual sector by this sector address management means;Block information management means for managing block information indicating a use state of a physical block belonging to a physical sector;First calculation means for calculating the address of the physical block indicated by the virtual memory address to be written with data, second calculation means for calculating the address of the virtual sector indicated by the virtual memory address to be written, and block information management Based on the block information managed by the means and the order managed by the order management means, each address of the physical sector associated with the virtual sector address calculated by the second calculation means by the sector address management means and the first The virtual sector address calculated in the slowest order among the physical blocks in use corresponding to the address calculated by one calculating means is in an order after the physical sector address associated by the sector address managing means. Sector address for the calculated virtual sector address As the address of the physical sector write target address of the associated physical sector by physical meansSector address detecting means for detectingThe sector address management means newly associates with the address of the virtual sector that has calculated the address of the physical sector in which all the physical blocks belonging to the case where the address is not detected by the sector address detection means. The order management means manages the address of the newly associated physical sector as being associated with the calculated virtual sector address in the latest order by the sector address management means. Sector address designating means for designating the address of the physical sector as the address of the physical sector to be written, and the block information management means is for the address designated by the sector address designating means and the physical block calculated by the first computing means. The block information of the physical block specified by the address is used Wherein the rewriting of information indicating.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0016]
FIG. 1 is a diagram showing a configuration of a memory control device according to an embodiment of the present invention.
[0017]
As shown in FIG. 1, the memory control device includes a nonvolatile memory 1, a memory management unit 2, a memory interface 3, and a system control unit 4.
[0018]
The memory management unit 2 is connected to the system control unit 4 that controls the system via a command bus 11, a virtual memory address bus 12, and a data bus 13 that transfer a signal indicating a command (instruction) to the memory management unit 2. The memory interface 3 transfers a signal indicating a command for the memory interface 3 to the memory management unit 2, the memory access command bus 14, the physical memory address bus 15, and between the memory management unit 2 and the memory interface 3. A memory data bus 16 for transferring data is connected, and the nonvolatile memory 1 is connected to the memory interface 3 via a memory bus 17.
[0019]
The memory bus 17 transfers a signal indicating an access command (processing instruction) for read / write access to the nonvolatile memory 1.
[0020]
The virtual memory address bus 12 transfers a signal indicating a virtual memory address on the virtual memory from the system control unit 4 to the memory management unit 2.
[0021]
The physical memory address bus 15 transfers a signal indicating a physical memory address on the nonvolatile memory 1 from the memory management unit 2 to the memory interface 3.
[0022]
The data bus 13 transfers data to be read from and written to the nonvolatile memory 1 between the system control unit 4 and the memory interface 3 via the memory management unit 2.
[0023]
The memory management unit 2 transfers the access command and the physical memory address to the memory interface 3 according to the command and virtual memory address transferred from the system control unit 4, and also writes data to be written in the nonvolatile memory 1 to the memory interface 3. The data transferred and read from the nonvolatile memory 1 is transferred to the system control unit 4.
[0024]
The memory interface 3 performs access processing to the nonvolatile memory 1 via the memory bus 17.
[0025]
FIG. 2 is a diagram illustrating a configuration of the memory management unit 2 provided in the memory control device according to the embodiment.
[0026]
As shown in FIG. 2, the memory management unit 2 includes a memory control unit 21, a data buffer 22, a sector address conversion table 23, a sector address conversion control unit 24, a block information table 25, and a block information control unit 26.
[0027]
The data buffer 22 is connected to the memory control unit 21, the command bus 11 and the virtual memory address bus 12 are connected to the memory control unit 21 from the system control unit 4, and the memory interface 3 is connected to the memory control unit 21. A physical memory address bus 15 and an access command bus 11 are connected to the data buffer 22. A data bus 13 is connected to the data buffer 22 from the system control unit 4. A memory data bus is connected from the data buffer 22 to the memory interface 3. 16 is connected.
[0028]
Further, the sector address conversion table 23 is connected to the memory control unit 21 via the sector address conversion control unit 24, and the block information table 25 is connected via the block information control unit 26.
[0029]
The sector address conversion table 23 is a memory that stores data indicating the correspondence between the sector unit address (virtual sector address) of the virtual memory and the sector unit address (physical sector address) of the physical memory.
[0030]
The block information table 25 is data indicating the use status of a plurality of physical blocks set in the physical sector address, that is, data indicating whether the block is used or not used (block Information).
[0031]
The sector address conversion control unit 24 registers, deletes, and reads one or a plurality of physical sector addresses associated with each virtual sector address by using all virtual sector addresses belonging to the virtual memory in the sector address conversion table 23 as index values. In addition, a physical sector address that is not registered in the sector address conversion table 23 is searched.
[0032]
The block information control unit 26 registers, deletes, updates, and reads block information with respect to each physical block that belongs to the physical sector address by using all the physical sector addresses that belong to the physical memory in the block information table 25 as index values.
[0033]
The memory control unit 21 controls the memory control unit 21 and the block information control unit 26 in accordance with a command from the system control unit 4, and changes to an appropriate physical memory address based on the virtual memory address. The access command is transferred to the non-volatile memory 1 via the data buffer 22 and the transfer control of data to be read / written is performed.
[0034]
The data buffer 22 adjusts the data transfer rate between the system control unit 4 and the nonvolatile memory 1.
[0035]
FIG. 3 is a diagram showing a configuration of the sector address conversion table 23 provided in the memory control device according to the embodiment.
[0036]
As shown in FIG. 3, the sector address conversion table 23 is table data for managing the correspondence between virtual sector addresses and physical sector addresses, and a virtual sector address index in which all virtual sector addresses in the virtual memory are registered. One virtual sector address in (p1) is associated with each physical sector address in a physical sector address group made up of one physical sector address or a plurality of physical sector addresses.
[0037]
That is, in the case of the sector address conversion table 23 shown in FIG. 3, a virtual sector address “0” is a physical sector address group composed of physical sector addresses “3”, “8”, “N”, and “α”. (P2) indicates that the physical sector addresses in the physical sector address group are arranged in accordance with the registration order, that is, the order associated with the virtual sector address.
[0038]
That is, the leftmost physical sector address “3” of the physical sector address group (p2) indicates the physical sector address first associated with the virtual sector address “0”, and the rightmost physical sector address “α” The physical sector address associated with the virtual sector address “0” is shown. In this case, the size of the physical sector address is not related to the registration order.
[0039]
The virtual sector address and the physical sector address are newly associated with the virtual sector address when no physical sector address is associated with the virtual sector address “1” shown in FIG. In the case where the physical sector address is already associated with the virtual sector address like the virtual sector address “2”, the new physical sector address “18” is added after the physical sector “9”. If registration is desired, the physical sector address registration order is changed in the physical sector address group as shown in p3, or a new physical sector address in the physical sector address group is registered as the registration order immediately after the last physical sector address. It is made by adding as.
[0040]
Further, in order to eliminate the association between the virtual sector address and the physical sector address, the physical sector address is deleted from the physical sector address group as shown in p4.
[0041]
FIG. 4 is a diagram showing an example of correspondence between virtual memory and physical memory by the sector address conversion table 23 provided in the memory control device according to the embodiment.
[0042]
As shown in FIG. 4, in the virtual memory sector address map indicating each virtual sector address of the virtual memory and the physical memory sector address map indicating each physical sector address of the physical memory, one for each virtual sector. Alternatively, a plurality of physical sectors are associated.
[0043]
In the virtual memory sector address map shown in FIG. 4, the 0 sector, 1 sector, 2 sectors,..., L-1 sector and L sector are virtual sector addresses “0”, “1”, “2”, .., Indicates an area indicating “L-1” and “L”, and the 0 sector, 1 sector, 2 sectors,..., N−1 sector and N sector of the physical memory sector address map are physical sector addresses “ 0 ”,...“ N−1 ”and“ N ”.
[0044]
Also, each physical sector distinguished by one physical sector, that is, a physical sector address is composed of a plurality of physical blocks as indicated by p11, and each physical block is distinguished by a physical block address.
[0045]
That is, the 0 block, 1 block,..., M−1 block and M block of each physical block shown in FIG. 4 have physical block addresses “0”, “1”,. This is an area indicating -1 "and" M ".
[0046]
FIG. 5 is a diagram showing an example of association between virtual sectors and physical sectors according to the embodiment.
[0047]
As shown in FIG. 5, the virtual sector (p21) includes a plurality of virtual blocks (p22), and each virtual block is distinguished by a virtual block address.
[0048]
Each virtual block is associated with each physical block in the physical block group indicated by p23.
[0049]
The 0 block, 1 block,..., M−1 block and M block of each virtual block are areas indicating virtual block addresses “0”,..., “M−1” and “M” in the virtual sector. is there.
[0050]
Then, the 0 block that is a virtual block in the virtual sector is associated with the physical sector (the 0th block of the 8th sector) to which the 0 block having the same physical block address value as the virtual block address value belongs.
[0051]
That is, by associating each virtual block with a physical block having the same address value, a virtual sector is associated with one or a plurality of physical sectors to which the physical block belongs.
[0052]
FIG. 6 is a diagram showing a configuration of the block information table 25 provided in the memory control device according to the embodiment.
[0053]
As shown in FIG. 6, this block information table 25 is a table for managing physical block information related to all physical blocks belonging to each physical sector address registered in the sector address conversion table 23.
[0054]
  thisBlock information table 25Is a physical sector address index (p31) in which all physical sector addresses in the physical memory are registered, and a physical block address index (p32) in which all physical block addresses belonging to each physical sector address of the physical sector address index are registered. ), And physical sector address index The physical block information storage area that stores the physical block information of each physical block, and the block information is stored with the physical sector address group as the first index and the physical block address group as the second index An area is referenced.
[0055]
For example, the block storage area indicated by p33 is a block information storage area of a physical block whose physical block address is “M” in a physical sector whose physical sector address is “0”.
[0056]
The physical block information stored in this block information storage area is information indicating whether or not data has been written to the physical memory address derived from the physical sector address and physical block address of the reference source. ) A flag of “1” is stored in a completed state, and a flag of “0” is stored in a state where data has not been written, that is, data has not been written.
[0057]
Further, as indicated by p34, the block information of a specific physical block corresponding to an arbitrary physical sector address can be updated to “0” or “1”. Further, block information of all physical blocks corresponding to the area indicated by p35, that is, any physical sector address can be registered, and all areas corresponding to the area indicated by p36, that is, any physical sector address can be registered. Block information of a physical block can be deleted.
[0058]
That is, one virtual sector can be identified by the block information table 25 that can know the use state of each block of the physical sector address associated with the sector address conversion table 23 that can associate the virtual sector address with a plurality of physical sector addresses. Since there is no need to associate one virtual sector with only one physical sector because it is associated with a plurality of physical sectors, high-speed memory writing can be performed with little occurrence of data movement on the memory during overwriting.
[0059]
In addition, since the usage state is indicated by the flags “0” and “1” for each arbitrary block, management can be performed in units of blocks suitable for the system, so the memory capacity of the block information table 25 can be reduced. Can be reduced.
[0060]
Next, processing of the memory control device having the above configuration will be described.
[0061]
First, a memory write (write) process by the memory control device will be described.
[0062]
FIG. 7 is a flowchart showing memory write processing (part 1) by the memory control apparatus according to the embodiment.
[0063]
FIG. 8 is a flowchart showing memory write processing (part 2) by the memory control apparatus according to the embodiment.
[0064]
As shown in FIGS. 7 and 8, first, a write command is given from the system control unit 4 to the memory management unit 2 of the memory control unit 21 via the command bus 11 and the virtual memory is sent via the virtual memory address bus 12. When the address is transferred to the memory control unit 21, the virtual memory address is divided into a virtual sector address A and a virtual block address (virtual block offset address) B by the memory control unit 21 (step A1).
[0065]
Based on the virtual block address B, a physical block address having the same address value is searched on the physical block address index on the block information table and handled as the physical block address B.
[0066]
Next, the sector address conversion control unit 24 reads out the sector address conversion table 23, compares the sector address conversion table 23 with the virtual sector address A, and A physical sector address group C composed of a plurality of physical sector addresses is searched to determine whether or not this physical sector address group C exists (steps A2 and A3).
[0067]
If “YES” is determined in step A3, that is, if the physical sector address group C is associated with the virtual sector address A, the block information table 25 is read by the block information control unit 26, and this block information table 25, on the basis of the physical block address (physical block offset address) of each physical sector address and virtual block address B belonging to the physical sector address group C, an unwritten block, that is, block information in each physical block is “ It is determined whether or not a physical block of 0 ″ is included. If an unwritten block is included, the physical sector address to which one of the physical blocks belongs is detected as the physical sector address D, and the sector address conversion table 23 is detected. Your search on That (step A4, A5).
[0068]
FIG. 9 is a diagram illustrating an example in which a physical sector address D in which an unwritten block exists is detected in the memory write processing according to the embodiment.
[0069]
That is, as shown in FIG. 9, in the sector address conversion table 23, the physical sector addresses belonging to the physical sector address group C associated with the virtual sector address A are registered from the oldest registration order as shown in p41. In the case of “3”, “8” and “N” and the virtual block address B is “M−1”, the physical block to be searched becomes a search string surrounded by p42, and the search is performed. The order in which the physical sector addresses belonging to the physical sector address group C are registered from the newest to the oldest as shown in p43, that is, the physical sector address is “N” and the physical block address is “M”. -1 "is searched from the physical block (p44), and then the physical sector address is" 8 "and the physical block address is" M-1 ". Associated with the physical block (p45) is searched, and finally the physical sector address of "3," a physical physical block address is associated with "M-1" block (p46) is searched.
[0070]
Then, according to the registration order of the physical sector address, an unwritten block corresponding to the physical sector address in the registration order immediately before the physical sector address corresponding to the written block whose registration order is the latest in the search sequence, that is, the physical sector A block (p45) having an address “8” and a physical block address “M−1” is detected as an unwritten block, and the detected physical sector address D is “8”.
[0071]
The unwritten block search method may be a method of detecting the physical sector address corresponding to the first unwritten block detected in the search order as the physical sector address D. In this case, the block information shown in FIG. The physical sector address D detected from the table 25 is “N”.
[0072]
  FIG. 10 relates to the embodiment.Memory lightIt is a figure which shows the example which cannot detect the physical sector address D in which the unwritten block exists in a process.
[0073]
As shown in FIG. 10, each element sector address of the memory sector address group C is composed of “3”, “8” and “N” from the oldest registration, and the virtual block address B is “M”. The search string is a search string indicated by p51, and the search is performed in order from the block (p52) corresponding to the new physical sector address registered. In this case, all the searched blocks have been written, that is, the block information of all the searched physical blocks is all “1”, and the written block with the latest registration order is searched in the search string. Since an unwritten block is not detected until then, there is no detected physical sector address D.
[0074]
FIG. 11 is a diagram showing a block information update process in the block information table 25 according to the embodiment.
[0075]
That is, as shown in FIG. 11, when the detected physical sector address D is “8” and the virtual block address B is “M−1”, the block information in the block information table 25 to be updated is Since this is a block indicated by p61, this block information is rewritten from “0” to “1”, that is, an unwritten block is updated to a written block.
[0076]
On the other hand, if “NO” is determined in step A3, that is, if the physical sector address group C is not associated with the virtual sector address A, or “NO” is determined in step A4, that is, in an unwritten block. When a certain physical sector address D is not detected, an unwritten block to be used for writing is not associated with the virtual sector address A, so a new unwritten block into which data can be written is obtained. That is, a physical sector address that is not registered in the sector address conversion table 23 is newly registered in the block information table 25, and this physical sector address is set as the physical sector address D (step A6).
[0077]
Here, since each block of the physical sector address D may have been written, all the block information of the block belonging to the physical sector address D is erased with respect to the physical sector address D through the memory interface 3, ie, “0”. (Step A7).
[0078]
Then, the physical sector address D is the physical registration order at the end of the physical memory sector address group C as a new physical sector address corresponding to the virtual sector address A in the sector address conversion table 23 via the sector address conversion control unit 24. Registered in the registration order immediately after the sector address (step A8), and each physical block belonging to this new physical sector address is registered in the block information table 25 through the block information control unit 26 as a physical block which is an unwritten block. (Step A9).
[0079]
FIG. 12 is a diagram showing a new physical sector address registration process for the block information table 25 according to the embodiment and a block information update process associated with the registration process.
[0080]
  That is, as shown in FIG.6If the new physical sector address D added in step S is “α”, step A7As a result, the block information belonging to the physical sector address D (= “α”) is erased, and all the block information of the physical sector address D (= α) becomes an unwritten block as shown in p71. Each physical block belonging to the new physical sector address is registered in the information table 25 (p72).
[0081]
If the virtual block address B to be searched for an unwritten block is “M”, the information of the physical block (p73) having the physical sector address “α” and the physical block address “M” is stored. The unwritten block is updated to the written block, that is, rewritten from “0” to “1”.
[0082]
  Step A5If the physical sector address D is detected, or if a physical block belonging to the new physical sector address is registered in the block information table 25 in step A8, the physical sector address D and physical A physical memory address E is calculated from the block address B, and a memory write, that is, a data write to the nonvolatile memory 1 is performed via the memory interface 3.InstructionsThe memory access command to be transferred is transferred, and block data from the system control unit 4 in the data buffer 22 is transferred to the physical memory address E (steps A10 and A11).
[0083]
  Then, the block information of the physical block corresponding to the physical sector address D and the physical block address B registered in the block information table 25 via the block information control unit 26 indicates that writing has been completed.1(Step A12).
[0084]
  In other words, the physical sector address in which an appropriate unwritten block exists is detected from the physical sector address group associated with the virtual sector address to be written by the memory write process, so it is necessary to newly allocate a physical sector. This makes it possible to effectively use non-memory resources.
In addition, the sector address conversion table 23 manages the order in which the physical sector addresses are associated with the virtual sector addresses, and the physical block address B and the physical sector address group C are used for data write processing. The physical block specified by the address of the physical sector associated with the virtual sector address A in the latest order among the blocks is set as the physical block to be written.
Further, when a new physical sector address is associated with a virtual sector address in the data write process, it is managed that the order in which the physical sector address is associated with the virtual sector address is the latest. Therefore, in the data write process, the order of association with the virtual sector address of the physical block that has been newly written in the physical block group corresponding to the same physical block address managed by the block information table 25 is older. It becomes unnecessary to update the block information of the physical block indicated by the address associated with the virtual sector address in order.
[0085]
Next, a memory read (read) process by the memory control device will be described.
[0086]
FIG. 13 is a flowchart showing memory read processing (part 1) by the memory control apparatus according to the embodiment.
[0087]
FIG. 14 is a flowchart showing a memory read process (part 2) by the memory control apparatus according to the embodiment.
[0088]
  As shown in FIGS. 13 and 14, first, the system control unit 4 via the command bus 11Memory management unit 2When a memory read command (read command) is given to the virtual memory address and the virtual memory address is transferred to the memory control unit 21 via the virtual memory address bus 12, the virtual memory address is transferred to the virtual sector address A by the memory control unit 21. It is divided into block address B (step B1).
[0089]
Next, the sector address conversion control unit 24 reads out the sector address conversion table 23, compares the sector address conversion table 23 with the virtual sector address A, and It is determined whether or not there is a physical sector address group C composed of a plurality of physical sector addresses (steps B2 and B3).
[0090]
If “YES” is determined in step B 3, that is, if the physical sector address group C is associated with the virtual sector address A, the block information table 25 is read by the block information control unit 26, and this block information table 25, based on each physical sector address belonging to the physical sector address group C and the physical block address B having the same address value as the virtual block address B, a written block, that is, a block whose block information is “1” in each block Is included, and if a written block is included, the physical sector address to which one physical block belongs is detected as the physical sector address D, and if the written block is not included , One of the physical blocks belongs in the search column Physical sector address is detected as a physical sector address D (step B4).
[0091]
FIG. 15 is a diagram illustrating an example in which a physical sector address D in which a written block exists is detected in the memory read processing according to the embodiment.
[0092]
That is, as shown in FIG. 15, the physical sector addresses belonging to the physical sector address group C associated with the virtual sector address A are “3”, “8”, and “N” from the oldest registration order. If the virtual block address B is “M−1”, the physical block to be searched is a search string indicated by p81, and the search order is the physical sector addresses belonging to the physical sector address group C. From the newest to the oldest registration order, that is, from the physical block (p82) associated with the physical sector address “N” and the physical block address “M−1”, and then the physical sector address is “8”. ", The physical block (p83) associated with the physical block address" M-1 "is searched, and finally the physical sector address" 3 " Physical associated with click address "M-1" block (p84) is to be searched.
[0093]
Then, according to the registration order of the physical sector address, the first written block detected in the search string, that is, the block (p83) having the physical sector address “8” and the physical block address “M−1” is written. The detected physical sector address D is “8”.
[0094]
  FIG. 16 shows that the physical sector address D in which a written block exists is detected in the memory read processing according to the embodiment.AbsentIt is a figure which shows an example.
[0095]
As shown in FIG. 16, when each element sector address of the memory sector address group C is composed of “3”, “8” and “N” from the oldest registration, and the virtual block address B is “1”. The search string is a search string indicated by p91, and the physical blocks indicated by p92, p93, and p94 are sequentially searched from the block corresponding to the registered new physical sector address. In this case, since the searched block is an unwritten block, that is, a written block whose block information is “1” is not detected, the physical sector address to which the first unwritten block (p92) detected in the search string belongs is assigned. That is, the latest physical sector address to which the block of the search string belongs, that is, the physical sector address “N” is detected as the physical sector address D.
[0096]
The physical sector address D detected here is not limited to the latest physical sector address to which the physical block of the search string belongs, but belongs to any physical block belonging to the search string (p91) by changing the detection condition. The physical sector address may be detected as the physical sector address D.
[0097]
On the other hand, if “NO” is determined in step B3, that is, if the physical sector address group C is not associated with the virtual sector address A, the physical block is not associated with the virtual sector address A. Therefore, in order to newly obtain a physical block from which data can be read, a physical sector address that is not registered in the sector address conversion table 23 is additionally registered in the block information table 25 from the sector address conversion control unit 24, and this physical sector The address is set as the physical sector address D (step B5).
[0098]
Since there is a possibility that each block of the set physical sector address D has been written, an erase process is performed on the physical sector address D through the memory interface 3 (step B6).
[0099]
Then, the physical sector address D is the physical registration order at the end of the physical memory sector address group C as a new physical sector address corresponding to the virtual sector address A in the sector address conversion table 23 via the sector address conversion control unit 24. Registered in the registration order immediately after the sector address (step B7), and each physical block belonging to this new physical sector address is registered in the block information table 25 via the block information control unit 26 as a physical block that is an unwritten block. (Step B8).
[0100]
FIG. 17 is a diagram showing a new physical sector address registration process for the block information table 25 according to the embodiment.
[0101]
That is, as shown in FIG. 17, when the value of the new physical sector address D added in step B5 is “γ”, block information belonging to the physical sector address D (= “γ”) is obtained in step B6. As shown in p101, all block information of the physical sector address D (= “γ”) becomes an unwritten block, and belongs to the new physical sector address in the existing block information table 25 (p102) by step B8. Each physical block is registered.
[0102]
If the physical sector address D is detected in step B4, or if a physical block belonging to the new physical sector address is registered in the block information table 25 in step B8, the physical sector address D and physical block address B are The memory address E is calculated, and a memory access command for instructing data read is transferred to the nonvolatile memory 1 via the memory interface 3, and the block data from the system control unit 4 in the data buffer 22 is transferred to the physical memory address E. Is transferred (steps B9 and B10).
[0103]
That is, in this memory read processing, when data is written to the virtual sector address by associating a physical sector address that is not used by all blocks with a virtual sector address that is not yet associated with the sector address conversion table 23, Since the new physical sector association process becomes unnecessary, the write processing speed is improved.
[0104]
FIG. 18 is a flowchart showing memory combination processing (part 1) by the memory control apparatus according to the embodiment.
[0105]
FIG. 19 is a flowchart showing memory combination processing (part 2) by the memory control apparatus according to the embodiment.
[0106]
FIG. 20 is a flowchart showing memory combination processing (part 3) by the memory control apparatus according to the embodiment.
[0107]
In this memory combining process, when a virtual sector address specified by a virtual memory address is associated with a plurality of physical sector addresses by the sector address conversion table 23, each effective block (the newest physical sector address is assigned to the plurality of physical sector addresses). This is an instruction to join a physical block) to each physical block belonging to one physical sector address.
[0108]
It is assumed that a new physical sector address and an existing physical sector address can be arbitrarily selected as the physical sector address to be combined.
[0109]
  As shown in FIGS. 18 to 20, first, the system control unit 4 via the command bus 11.Memory management unit 2When a memory combination instruction is given and a virtual memory address is transferred to the memory control unit 21 via the virtual memory address bus 12, the virtual memory address is converted into a virtual sector address A and a virtual block address B by the memory control unit 21. (Step C1).
[0110]
Next, the sector address conversion control unit 24 reads the sector address conversion table 23, and the sector address conversion table 23 searches the physical sector address group H associated with the virtual sector address A (step C2). From this physical sector address group H, a joining source physical sector address group C as a joining source is arbitrarily determined (step C3). It is assumed that the registration order of the physical sector addresses in the combination source physical sector address group C is continuous.
[0111]
Next, it is determined whether or not the source physical sector address group C is a physical sector address group composed of two or more physical sector addresses (step C4).
[0112]
If “NO” is determined in step C4, the physical sector address group to be combined does not exist and the termination process is performed. If “YES” is determined, the combined physical sector address F to be combined is determined. Is one of the combination source physical sector address group C or a new physical sector address that does not belong to the combination source physical sector address group C (step C5).
[0113]
If “YES” is determined in step C5, that is, if one physical sector address is used as the combining destination physical sector address F from the combining source physical sector address group C, When the physical sector addresses registered in the latest, for example, the physical sector addresses constituting the joining source physical sector address group C are “3”, “8” and “N”, the physical sector address “N” is the joining destination. The physical sector address F is selected (step C6).
[0114]
The selection method of the combined physical sector address F may be a method of selecting the physical sector address immediately after the physical sector address group C. In this case, each physical sector constituting the physical sector address group H corresponding to the virtual memory address is selected. The addresses are “3”, “8”, “N”, and “K”, and among these, the physical sector addresses constituting the source physical sector address group C are “3”, “8”, and “N”. "," The physical sector address "K" is selected as the combined physical sector address F.
[0115]
When the latest physical sector address of the physical sector address group H is the combined physical sector address F itself, for example, each physical sector address constituting the physical sector address group H and the combined physical sector address group C are configured. When the physical sector addresses to be performed are all “3”, “8” and “N”, the physical sector address “N” is selected as the combined physical sector address F.
[0116]
If “NO” is determined in step C5, that is, if it is specified that the joining physical sector address F is not included in the joining source physical sector address group C, the physical that is not registered in the sector address conversion table 23 The sector address is additionally registered in the block information table 25, and this physical sector address is set as the combined physical sector address F (step C7).
[0117]
Here, since there is a possibility that each block of the combined physical sector address F has been written, the combined physical sector address F is erased through the memory interface 3 (step C8).
[0118]
Then, this physical sector address D is the physical registration address at the end of the physical memory sector address group C as a new physical sector address corresponding to the virtual sector address A in the sector address conversion table 23 via the sector address conversion control unit 24. Registered in the registration order immediately after the sector address (step C9), and each physical block belonging to this new physical sector address is registered in the block information table 25 through the block information control unit 26 as a physical block that is an unwritten block. (Step C10).
[0119]
FIG. 21 is a diagram showing registration processing and deletion processing in the block information table 25 in the memory combining processing according to the embodiment.
[0120]
That is, as shown in FIG. 21, for each physical block belonging to the joining source physical sector addresses “3”, “8”, and “N” shown in p111 to p113, the joining destination physical sector as shown in p114. Each physical block belonging to the address “α” is registered in the block information table 25 as an unwritten block.
[0121]
Next, a physical block address range I, which is a range of physical block addresses to be searched for the latest written block from among the physical blocks belonging to the combination source physical sector address group C, is specified, and the physical block address An initial value (= “0”) of the range I is set (step C11). Note that it is also possible to select only an arbitrarily selected physical block address.
[0122]
Then, it is determined whether the block information of each physical sector address which is the first physical block address in the specified physical block address range I is an unwritten block or a written block, and the first determined written A physical sector address belonging to the block is detected as a physical sector address D (step C12).
[0123]
FIG. 22 is a diagram illustrating an example of detecting a physical sector address D in which a written block exists in the memory combining process according to the embodiment.
[0124]
That is, as shown in FIG. 22, when the physical sector addresses belonging to the source physical sector address group C are “3”, “8”, and “N” from the oldest registration order, the physical block address When the first physical block address of the range I is “0”, the search target block is a search string surrounded by p121, and the search order is the physical sectors belonging to the physical sector address group C. A search is made from the physical block (p122) associated with the newest address registration order, that is, the physical sector address “N” and the physical block address “0”, and then the physical sector address “8”. ", The physical block (p123) associated with the physical block address" 0 "is searched, and finally the physical sector address" 3 " Click address is "0" in the associated physical block (p124) is to be searched.
[0125]
Then, according to the registration order of the physical sector address, the written block first detected in the search string, that is, the physical block having the physical sector address “8” and the physical block address “0” is the written block. The physical sector address D, which is the physical sector address to which the written block detected in this search string belongs, is “8”.
[0126]
FIG. 23 is a diagram illustrating an example in which the physical sector address D in which a written block exists is not detected in the memory combining process according to the embodiment.
[0127]
That is, as shown in FIG. 23, each element sector address of the memory sector address group C is composed of “3”, “8” and “N” from the oldest registration, and the physical block address B is “1”. In this case, the search string is a search string surrounded by p131, and the search is sequentially performed from the block corresponding to the new physical sector address in the registration order. In this case, since the retrieved block is an unwritten block, that is, a written block is not detected, the physical sector address D is not detected.
[0128]
Then, it is determined whether or not the physical sector address D is detected in step C12 (step C13). If “YES” is determined, the current search is performed in the physical sector address D and the physical block address range I. The physical memory address E is calculated from the physical block address to which each target physical block belongs, and the physical block that is currently searched within the combined physical sector address F and the physical block address range I is The physical memory address G is calculated from the physical block address to which it belongs, and the block data is reflected (copied) from the physical memory address E to the physical memory address G via the memory interface 3. However, if the physical memory addresses E and F are the same address, data copy is not necessary (step C14).
[0129]
Then, the block information corresponding to the physical block address range I of the physical sector address F registered in the block information table 25 via the block information control unit 26 is updated to the block information indicating written, that is, “1” (Step 1). C15).
[0130]
That is, as shown in FIG. 21, every time the data of the latest written block in the physical sector address group C is copied, the step C is selected from the physical blocks belonging to the physical sector address “α” indicated by p114. The block information of the same physical block as the physical block address at which the written block exists as a result of the search is updated to “1” which is the block information indicated by p115.
[0131]
Next, it is determined whether or not the physical block address is the last block address in the physical block address range I, that is, the physical block address M (step C16), and “NO” is determined in this step C, that is, the physical block If the physical block address that is not the physical sector address address M and still belongs to the physical block address to be searched remains, it belongs to the physical block address obtained by adding 1 to the value of the physical block address that is currently searched. The block information of each physical block is continuously determined (steps C16 → C17 → C12).
[0132]
FIG. 24 is a diagram showing an example of detecting the latest written block in the memory combining process according to the embodiment.
[0133]
As shown in FIG. 24, when the top of the physical block address range I is “0” and the last is “M”, the search order is the physical block addresses “N”, “8”, and “3”. In the case of the order, the physical block indicated by p132 is a physical block detected as the latest written block from the physical blocks belonging to each physical block address.
[0134]
Next, all block information of physical blocks belonging to the combination source physical sector address group C registered in the block information table 25 via the block information control unit 26 is erased, that is, updated to “0” (step C18). However, if the joining destination physical sector address F is the latest registered address among the physical sector addresses belonging to the joining source physical sector address group C, the physical block information belonging to the physical sector address F is not erased.
[0135]
Since all of the latest written block data for each physical block address range I with respect to the combination source physical sector address group C exists in the physical block of the combination destination physical sector address F, the sector is converted via the sector address conversion control unit 24. The source physical sector address group C is deleted from the address conversion table 23 (step C19).
[0136]
However, if the combined physical sector address F is the latest registered physical sector address in the combined physical sector address group C, the physical sector address F is not deleted.
[0137]
That is, as shown in FIG. 21, when the physical sector addresses of the physical sector address group C are “3”, “8”, and “N”, the physical sector addresses indicated by p111 to p113 are obtained in step C19. That is, all of “3”, “8” and “N” are deleted from the block information table 25 and the sector address conversion table 23, but the combined physical sector address F is the latest in the combined physical sector address group C. If the registered address is “N”, only the physical sector addresses indicated by p 111 and p 112, that is, “3” and “8” are deleted from the block information table 25 and the sector address conversion table 23.
[0138]
FIG. 25 is a diagram showing registration processing and deletion processing in the sector address conversion table 23 in the memory combining processing according to the embodiment.
[0139]
As shown in FIG. 25, the virtual sector address A is “0”, and the virtual sector address “0” is assigned to the physical sector addresses “3”, “8” belonging to the physical sector address group H by the sector address conversion table 23. “N” and “K” are associated, the combined physical sector address F is “α”, and “3”, “8”, and “N” of each physical sector address belonging to the combined physical sector address group C Is selected, the new physical sector address “α” is registered immediately after the last physical sector address “N” of the source physical sector address group C indicated by p141 (p142).
[0140]
As a result, the virtual sector address “0” is temporarily associated with the physical sector address groups “3”, “8”, “N”, “α”, and “K”.
[0141]
In this case, the processing of Step C19 shown in FIG. 20 deletes the registration of the combination source physical sector address group C “3”, “8” and “N” indicated by p141 (p143). As a result, the virtual sector address A is associated with “α” and “K” of the physical sector address of the physical sector address group H in the address conversion table.
[0142]
Further, the join source physical sector address group C is “3”, “8” and “N”, the join destination physical sector address F is the existing physical sector address “N”, and the virtual sector address A is “0”. Yes, when the virtual sector address A is associated with “3”, “8”, “N”, and “K” of the physical sector addresses belonging to the physical sector address group H in the address conversion table, the steps shown in FIG. The registration of physical sector addresses “3” and “8” belonging to the source physical sector address group C is deleted by the processing of C19 (p144). As a result, the virtual sector address A is physically stored in the address conversion table. The physical sector addresses belonging to the sector address group H are associated with “N” and “K”.
[0143]
Further, the physical sector addresses belonging to the joining source physical sector address group C are “3”, “8” and “N”, the joining destination physical sector address F is “K” which is an existing physical sector, and the virtual sector When address A is “0” and virtual sector address A is associated with physical sector addresses “3”, “8”, “N”, and “K” belonging to physical sector address group H in the address conversion table, The processing of step C19 shown in FIG. 20 deletes the registration of physical sector addresses “3”, “8”, and “N” belonging to the combination source physical sector address group C indicated by p141 (p143). As a result, the virtual sector address A is associated with “K” of the physical sector address belonging to the physical sector address group H in the address conversion table.
[0144]
  Figure 26 shows the frontRecord7 is a flowchart showing processing when a physical block address to be combined is arbitrarily selected in the memory combining processing according to the embodiment.
[0145]
The flowchart shown in FIG. 26 is obtained by replacing a part of the flowcharts shown in FIGS.
[0146]
First, as shown in FIG. 26, when a selection process of a combination destination sector address, that is, a process similar to Steps C1 to C10 shown in FIG. 19 is performed (Step C20), a group of physical block addresses to be combined. The range of J is arbitrarily set (step C21). Here, the setting method of the physical block address group J is not particularly limited. For example, the physical block address B divided in the process of step C1 shown in FIG. 18 may be used, or the setting may be performed by obtaining information of the physical block address group J via the data bus 13.
[0147]
Then, the head element of the physical block address group J is set based on the physical block address range I indicating the physical block address to be combined (step C22), and the combination process, that is, the same process as steps C12 to C15 shown in FIG. Is performed (step C23). When it is determined in step C23 whether the latest written physical sector address is detected, that is, when it is determined that the physical sector address D is not detected by the same processing as in step C12 shown in FIG. Is combined with the physical block address obtained by adding 1 to the physical block address value currently being combined in the physical block address range J (steps C13 → C17 → C12).
[0148]
Then, after the process up to step C23, it is determined whether or not the physical block address range I is the final element of the physical block address group J (step C24). If it is determined “YES”, the end process is performed. It is determined as “NO”. In other words, if it is not the final element, the combination processing related to the physical block address obtained by adding 1 to the physical block address value currently being combined in the physical block address range J is performed (steps C24 → C25 → C23).
[0149]
Note that the processing of steps C18 and C19 shown in FIG. 20 is not performed. This is because the join process shown in FIGS. 18 to 20 is a process for all blocks belonging to the physical sector address of the join source, but the join process is completed within the range of a part of the physical block addresses. This is also because there is a possibility that there is a physical block that has not been subjected to the joining process for the effective block, that is, the physical block that belongs to the joining physical sector address, among the physical blocks belonging to the joining physical sector address.
[0150]
  That is, by this memory combination processing, a virtual sector address in which a plurality of physical sector addresses are associated with each other by the sector address conversion table 23 and the block information table 25.ButSince it is associated with one physical sector address, memory resources can be used effectively depending on the situation.
In addition, the sector address conversion table 23 manages the correspondence order of the physical sector addresses to the virtual sector addresses as described above, and the virtual block address B and the combination source physical sector address group during the memory combination processing. Block to be reflected to the physical block belonging to the combined physical sector address F with respect to the physical block indicated by the address of the physical sector associated with the virtual sector address A in the latest order among the physical sectors indicated by C Information.
  Therefore, the block of the physical block in which the block information is reflected in the physical block belonging to the combined physical sector address F among the physical blocks indicated by the combined physical sector address group C managed by the block information table 25 in the memory combining process. No need to update information.
[0151]
FIG. 32 is a diagram showing an example of overwriting a virtual sector in which arbitrary data write has been performed on all blocks in the conventional memory control device. FIG. Is a diagram showing a state before data is written, and FIG. 5B is a diagram showing processing for a physical sector when data is written to a virtual sector.
[0152]
First, in FIG. 32A, a virtual sector G in which arbitrary data write has already been performed on all blocks is associated with the physical sector X by the sector address conversion control unit 24. Assuming that arbitrary block data (P151) is written to the 0th block of the virtual sector G, the physical block indicated by p152 on the physical sector X to be actually written has already been written. p151) is written to the newly prepared physical block (p153) with the physical block address “0” on the physical sector Y where the physical blocks are all unwritten blocks, and the physical sector X The block data of the physical block group indicated by p154 associated with all the blocks not to be written above, that is, the block group from the first block to the Mth block of the virtual sector G is newly associated with the physical sector Y. 32 is copied to the physical block group (p155) which is the M-th block, and FIG. ) By the sector address conversion control section 24 as shown in eliminates the correspondence between the virtual sector G and the physical sector X, a new physical sector Y is associated with the virtual sector.
[0153]
  That is, assuming that the write time of one block to the physical memory is x, the read time is y, and one sector is composed of M blocks.DataThe total memory access time T1 required for the write process is:
[Expression 1]
Figure 0003699942
It becomes.
[0154]
FIG. 27 is a diagram showing an example of overwriting a virtual sector in which arbitrary data write has been performed on all blocks in the memory control device according to the embodiment of the present invention. ) Is a diagram showing a state before the first data is written to the virtual sector, and FIG. 5B is a diagram illustrating the processing for the physical sector when the first data is written to the virtual sector. It is a figure which shows the state before writing the 2nd data, The figure (c) is a figure which shows the process with respect to the physical sector at the time of writing the 2nd data with respect to a virtual sector.
[0155]
First, in FIG. 27A, a virtual sector G in which arbitrary data write has already been performed on all blocks is associated with the physical sector X and the sector address conversion control unit 24 on a one-to-one basis. Here, it is assumed that arbitrary block data (p161) is written to the 0th block of the virtual sector G.
[0156]
At this time, since the physical block (p162) in the physical memory to be actually written has already been written, a new physical sector Y is prepared by the sector address conversion control unit 24 as shown in FIG. The block data (p161) is written to the 0th block on the physical sector Y, that is, the physical block (p163) whose physical block address is “0”, and the sector address conversion control unit 24 sets the physical sector Y to the virtual sector G. Newly associated. At this time, since the association between the virtual sector G and the physical sector X remains, the virtual sector G is associated with both the physical sector X and the physical sector Y. Further, either the 0th block (p162) of the physical sector X associated with the 0th block of the virtual sector G or the 0th block (p163) of the physical sector Y associated with the 0th block of the virtual sector G is also used. The block information control unit 26 manages the block information in order to determine whether the data written in is valid, that is, the latest written data.
[0157]
  As in FIG. 32, assuming that the write time of one block to the physical memory is x, the read time is y, and that one sector is composed of M blocks,DataThe total memory access time T2 required until the end of the write process is
[Expression 2]
Figure 0003699942
It becomes.
[0158]
In this case, the block data (p167) from the first block to the Mth block of the physical sector X is associated with the first block to the Mth block of the virtual sector G.
[0159]
Further, in FIG. 27B, it is assumed that arbitrary data (p164) is written to the first block of the virtual sector G.
[0160]
In this case, since the first block (p165) on the physical sector Y to be actually written is empty, the new block data (p164) is the first block on the physical sector Y as shown in FIG. (P165) is a block for determining whether the data written in the first block (p166) on the physical sector X or the first block (p165) on the physical sector Y is valid. Block information is managed by the information control unit 26.
[0161]
The block data (p168) from the second block to the Mth block of the physical sector X is associated with the second block to the Mth block of the virtual sector G.
[0162]
In this case, the total memory access time T3 required until the write processing of the new block data (p164) is completed is:
[Equation 3]
Figure 0003699942
It becomes.
[0163]
FIG. 28 is a diagram showing a configuration of the pointer type block information table 25 according to the embodiment.
[0164]
As shown in FIG. 28, this pointer type block information table 25 is used in place of the flag type block information table 25 shown in FIG. 6, and in the memory control device, a random block program in a sector, ie, each physical block. This block information management process is prohibited, and the block information table 25 used when the random block program is prohibited for the nonvolatile memory 1 itself.
[0165]
In this pointer type block information table 25, the information of the range of consecutive physical blocks that have not been written or have been written corresponding to this index is registered with the physical sector address as an index value under the control of the block information control unit 26. (P171), update (p172), and deletion (p173) can be performed, and the table value, that is, the physical block information, is the last physical block address value written to each physical sector or the first physical block address value not yet written. It is.
[0166]
  For example, when an unwritten head physical block address value is registered in the pointer-type block information table 25, the relationship between the physical sector address and the physical block address value indicated by p174 indicates that the physical sector address B is the physical block address. Unused from β to the final blockTheThe relationship between the physical sector address and the physical block address value indicated by p175 indicates that the physical sector address A is unused from the physical block address α to the last block of the sector.
[0167]
In addition, when the last physical block address that has been written is registered in the pointer-type block information table 25, the relationship between the physical sector address and the physical block address value indicated by p174 indicates that the physical sector address B is physical from the first block. The block address β indicates that it is in use, and the relationship between the physical sector address and the physical block address value indicated by p175 indicates that the physical sector address A is in use from the first block to the physical block address α. ing. However, when all the physical blocks are unused, an unused physical block address value such as “−1” is assigned.
[0168]
FIG. 29 is a diagram showing the correspondence between the virtual sector and each physical block of the physical sector in the pointer-type block information table 25 according to the embodiment, and FIG. 29A shows each physical sector having one virtual sector. It is a figure which shows the case where it is matched with a physical block, and the figure (b) is a figure which shows the case where a virtual sector is matched with each physical block of a plurality of physical sectors.
[0169]
  The correspondence between the virtual sector and each physical block of the physical sector is as follows:Sector address conversion table 23, The virtual sector K (p181) is the physical sector address from the oldest registered order.B, AWhen the virtual sector K that is assumed to be associated with each other in order is associated with physical sector addresses A and B as indicated by p174 and p175 in FIG. 28, each block of the virtual sector and each physical block of the physical sector The correspondence with is shown.
[0170]
As for the block address value common to the virtual sector and the physical sector, an unused head block offset address value is registered, and “α” and “β” are block addresses other than the maximum physical block address “M”. It is assumed to be a value.
[0171]
As shown in FIG. 29A, when “α”> “β”, as shown in p182, from block 0 of the virtual sector K to block β−1, from block 0 of the physical sector address B to β -1 block corresponds, and as shown at p183, from "β" block to "α-1" block, from "β" block to "α-1" block of physical sector address A, as shown at p184 In addition, “α” to “M” blocks are associated with unused blocks.
[0172]
As shown in FIG. 29 (b), when “α” ≦ “β”, the physical sector address from the “0” block to the “β-1” block of the virtual sector K is shown as p185. B from “0” block to “β−1” corresponds, and as shown in p186, “β” to “M” blocks are associated with unused blocks.
[0173]
That is, in the case shown in FIG. 29A, the block address range of the physical sector address A associated with the virtual sector K does not overlap with the range of the physical sector address B also associated with the virtual sector K. Therefore, each virtual block of the virtual sector K is associated with each physical block belonging to the physical sector address A and the physical sector address B. In the case shown in FIG. 29B, the virtual block is associated with the virtual sector. Since the range of the block address of the physical sector address A is included in the range of the physical sector address B that is also associated with the virtual sector, each virtual block of the virtual sector K is different from each physical block of the physical sector address A. Not associated with each physical block belonging to the physical sector address B.
[0174]
FIG. 30 is a flowchart showing a memory erase process by the memory control apparatus according to the embodiment.
[0175]
  As shown in FIG. 30, first, from the system control unit 4 via the command bus 11Memory management unit 2When a memory erase command (erase command) is given to the virtual memory address and the virtual memory address is transferred to the memory control unit 21 via the virtual memory address bus 12, the virtual memory address is transferred to the virtual sector address A and the virtual sector by the memory control unit 21. It is divided into block address B (step D1).
[0176]
Next, the sector address conversion control unit 24 reads out the sector address conversion table 23, compares the sector address conversion table 23 with the virtual sector address A, and It is determined whether there is a physical sector address group C composed of a plurality of physical sector addresses (steps D2 and D3).
[0177]
If “NO” is determined in step D3, that is, if the physical sector address group C associated with the virtual sector address A does not exist, the virtual sector address A is not associated with any physical sector, that is, an erase target. Since there is no, end processing is performed.
[0178]
  On the other hand, it is determined as “YES” in step D3, that is, the physical sector address group C associated with the virtual sector address AButIf it exists, all block information of the physical sector address group C registered in the block information table 25 via the block information control unit 26 is erased, that is, updated to “0” (step D4).
[0179]
Then, the physical sector address group C is deleted from the sector address conversion table 23 via the sector address conversion control unit 24 (step D5).
[0180]
By this memory erase process, the virtual sector address A is not associated with all physical sector addresses. At this time, when the virtual sector address A is read, the corresponding physical block address group does not exist, so that each block data of an appropriate physical sector address subjected to the erasure process is transferred.
[0181]
  That is, by this memory erase process, the information on the virtual sector address to be erased is deleted from the sector address conversion table 23 and the block information table 25, and the data of the associated physical sector address group is deleted from the memory.DoAs a result, the erase processing speed is improved.
[0182]
FIG. 31 is a diagram showing a memory copy process and a memory move process in the sector address conversion table 23 provided in the memory control device according to the embodiment.
[0183]
The memory copy process is a process of associating a physical sector address group associated with a copy source virtual sector address with a copy destination virtual sector address while keeping the association with the copy source virtual sector address. In other words, all the physical block information associated with the copy source virtual sector address is also associated with the copy destination virtual sector address by this memory copy process.
[0184]
In addition, the memory migration process is a process of eliminating the association between the physical sector address group associated with the migration source virtual sector address and the migration source virtual sector address and associating it with the copy destination virtual sector address. Through this memory migration process, all physical block information associated with the migration source virtual sector address is associated with the migration destination virtual sector address.
[0185]
Here, the transfer source virtual sector, the transfer destination virtual sector, and the means for specifying whether to copy or move are not considered.
[0186]
First, memory copy processing by the memory control device will be described.
[0187]
  As shown in FIG. 31, in the sector address conversion table 23, the transfer source virtual sector address A is associated with “3”, “8” and “N” of the physical sector address group (p191), and the transfer destination virtual sector address A When the sector address B is associated with another physical sector address group (p192) and all block data associated with the virtual sector address A is copied to the virtual sector address B, that is, from the system control unit 4 Via command bus 11Memory management unit 2When a memory copy command is given to the memory control unit 21 and the copy source and copy destination virtual memory addresses are transferred to the memory control unit 21 via the virtual memory address bus 12, they are associated with the virtual sector address B, that is, as shown in p192. Block information of all physical blocks in the physical sector address group is deleted, all data in the physical sector address group shown in p191, that is, belonging to physical sector addresses “3”, “8”, “N”, and virtual sectors All physical block addresses associated with address A and their block information are associated with virtual sector address B.
[0188]
At this time, since the virtual sector address B is associated with the same physical sector as the virtual sector address A, when the block data of the physical sector is changed, a new copy of all block data of the physical sector to be changed is copied. It is assumed that the processing is performed by using the physical sector and replacing the registration in the sector address conversion table 23.
[0189]
Next, memory movement processing by the memory control device will be described.
[0190]
  Similarly, in the sector address conversion table 23, the transfer source virtual sector address C is associated with “9”, “2”, and “5” of the physical sector address group (p193) in the sector address conversion table 23, and the transfer When the destination virtual sector address D is associated with another physical sector address group (p194) and all block data associated with the virtual sector address B is moved to the virtual sector address B, that is, the system control unit 4 through the command bus 11Memory management unit 2When a memory move command is given to the virtual memory address and the virtual memory address of the migration source and destination is transferred to the memory control unit 21 via the virtual memory address bus 12, it is associated with the virtual sector address D, that is, as shown in p194. The block information and all the physical blocks in the physical sector address group are deleted, all data in the physical sector address group shown in p193, that is, belong to the physical sector addresses “9”, “2”, “5”, and All physical block addresses and block information associated with the sector address C are associated with the virtual sector address D, and the association between the virtual sector address C and the physical sector address group (p193) is lost.
[0191]
In other words, when copying all block data from any virtual sector to any virtual sector or moving all block data from any virtual sector to any virtual sector by these memory copy processing or memory migration processing. Even in such a case, data copy or data movement on the non-volatile memory 1 does not occur, so the processing can be speeded up.
[0192]
Therefore, according to the memory control device having the above configuration, the virtual address to be written by the memory write process after one virtual sector is associated with a plurality of physical sectors by the sector address conversion table 23 and the block information table 25. A physical sector address in which an appropriate unwritten block exists is detected from the physical sector address group associated with the sector address, and the physical sector address group associated with the virtual sector address to be written by memory read processing A physical sector address in which an appropriate written block exists is detected, and a virtual sector address in which a plurality of physical sector addresses are associated with each other in the sector address conversion table 23 and the block information table 25 by the memory combining process. , One physical sector address The physical sector address group corresponding to the virtual sector address to be erased is deleted by the memory erase process, and the virtual sector address and the physical sector on the sector address conversion table 23 are deleted by the memory copy process and the memory move process. Since the address association information is rewritten, it is possible to shorten the processing time related to memory reading and writing and to efficiently use memory resources.
[0193]
【The invention's effect】
  As described above, the present inventionInAccording to the memory management system involved, eachMultiple physical blocks as write unitsHaveMultiple physical sectors as erasure unitsPhysical memoryandCorresponds to the physical sector of the physical memoryMultiple virtual sectorsA memory management method for managing reading and writing of data using a virtual memory having a virtual sector address and a single or a plurality of physical sector addresses.For each virtual sector addressA sector address management means to be associated;Order management means for managing the order of timing of correspondence of each address of a plurality of physical sectors associated with the address of the virtual sector by this sector address management means;Block information management means for managing block information indicating a use state of a physical block belonging to a physical sector;First calculation means for calculating the address of the physical block indicated by the virtual memory address to be written with data, second calculation means for calculating the address of the virtual sector indicated by the virtual memory address to be written, and block information management Based on the block information managed by the means and the order managed by the order management means, each address of the physical sector associated with the virtual sector address calculated by the second calculation means by the sector address management means and the first The virtual sector address calculated in the slowest order among the physical blocks in use corresponding to the address calculated by one calculating means is in an order after the physical sector address associated by the sector address managing means. Sector address for the calculated virtual sector address As the address of the physical sector write target address of the associated physical sector by physical meansSector address detecting means for detectingThe sector address management means newly associates with the address of the virtual sector that has calculated the address of the physical sector in which all physical blocks belonging to the case where the address is not detected by the sector address detection means. The order management means manages the address of the newly associated physical sector as being associated with the calculated virtual sector address in the latest order by the sector address management means. Sector address designating means for designating the address of the physical sector to be written, and the block information management means is the address designated by the sector address designating means and the address of the physical block calculated by the first computing means. Indicates the usage status of the block information of the identified physical block To be rewritten to broadcastBecome.
[0198]
  Therefore, the present invention shortens the processing time related to reading and writing of the non-volatile memory, and enables efficient use of memory resources..
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a memory control device according to an embodiment of the present invention.
FIG. 2 is a diagram showing a configuration of a memory management unit provided in the memory control device according to the embodiment.
FIG. 3 is a diagram showing a configuration of a sector address conversion table provided in the memory control device according to the embodiment.
FIG. 4 is a diagram showing an example of correspondence between virtual memory and physical memory by a sector address conversion table provided in the memory control device according to the embodiment.
FIG. 5 is a view showing an example of correspondence between virtual sectors and physical sectors according to the embodiment;
FIG. 6 is a diagram showing a configuration of a block information table provided in the memory control device according to the embodiment.
FIG. 7 is a flowchart showing memory write processing (part 1) by the memory control apparatus according to the embodiment;
FIG. 8 is a flowchart showing memory write processing (part 2) by the memory control apparatus according to the embodiment;
FIG. 9 is a diagram showing an example in which a physical sector address D in which an unwritten block exists is detected in the memory write processing according to the embodiment.
FIG. 10 relates to the embodiment.Memory lightThe figure which shows the example which cannot detect the physical sector address D in which the unwritten block exists in a process.
FIG. 11 is a view showing block information update processing in a block information table according to the embodiment;
FIG. 12 is a diagram showing a new physical sector address registration process for the block information table according to the embodiment and a block information update process associated with the registration process.
FIG. 13 is a flowchart showing memory read processing (part 1) by the memory control device according to the embodiment;
FIG. 14 is a flowchart showing memory read processing (part 2) by the memory control apparatus according to the embodiment;
FIG. 15 is a diagram showing an example in which a physical sector address D in which a written block exists is detected in the memory read processing according to the embodiment.
FIG. 16 shows a physical sector address D in which a written block exists in the memory read process according to the embodiment.AbsentThe figure which shows an example.
FIG. 17 is a view showing registration processing of a new physical sector address with respect to the block information table according to the embodiment.
FIG. 18 is a flowchart showing memory combination processing (part 1) by the memory control apparatus according to the embodiment;
FIG. 19 is a flowchart showing memory combination processing (part 2) by the memory control device according to the embodiment;
FIG. 20 is a flowchart showing memory combination processing (part 3) by the memory control apparatus according to the embodiment;
FIG. 21 is a view showing registration processing and deletion processing in the block information table in the memory combining processing according to the embodiment;
FIG. 22 is a diagram showing an example of detecting a physical sector address D in which a written block exists in the memory combining process according to the embodiment.
FIG. 23 is a diagram showing an example in which a physical sector address D in which a written block exists is not detected in the memory combining process according to the embodiment.
FIG. 24 is a view showing a detection example of the latest written block in the memory combining process according to the embodiment;
FIG. 25 shows registration processing and deletion processing in the sector address conversion table in the memory combining processing according to the embodiment.Figure.
FIG. 26RecordIn the memory combining process according to the embodiment, a process when arbitrarily selecting a physical block address to be combined is shown.flowchart.
FIG. 27 is a diagram showing an example of overwriting a virtual sector in which arbitrary data write has been performed on all blocks in the memory control device according to the embodiment of the present invention; ) Is a diagram showing a state before the first data is written to the virtual sector, and FIG. 5B is a diagram illustrating the processing for the physical sector when the first data is written to the virtual sector. It is a figure which shows the state before writing the 2nd data, The figure (c) shows the process with respect to the physical sector at the time of writing the 2nd data with respect to a virtual sector.Figure.
FIG. 28 is a diagram showing a configuration of a pointer-type block information table according to the embodiment.
FIG. 29 is a diagram showing a correspondence between a virtual sector and each physical block of a physical sector in the pointer-type block information table according to the embodiment, and FIG. 29A shows each physical sector having one virtual sector. It is a figure which shows the case where it is matched with a physical block, and the same figure (b) is a figure which shows the case where a virtual sector is matched with each physical block of a some physical sector.
FIG. 30 is a flowchart showing a memory erase process by the memory control device according to the embodiment;
FIG. 31 is a view showing a memory copy process and a memory move process in a sector address conversion table provided in the memory control device according to the embodiment;
FIG. 32 is a diagram showing an example of overwriting a virtual sector in which arbitrary data write has been performed on all blocks in the conventional memory control device. FIG. FIG. 5B shows a state before data is written to the physical sector, and FIG. 5B shows processing on the physical sector when data is written to the virtual sector.Figure.
[Explanation of symbols]
1 Non-volatile memory
2. Memory management unit
3. Memory interface
4 ... System control unit
11 ... Command bus
12 ... Virtual memory address bus
13 Data bus
14 ... Memory access command bus
15 ... Physical memory address bus
16 ... Memory data bus
17 ... Memory bus
21 ... Memory control unit
22 ... Data buffer
23 ... Sector address conversion table
24 ... Sector address conversion control unit
25 ... Block information table
26: Block information control unit

Claims (6)

各々が物理ブロックを書き込み単位として複数有してなる物理セクタを消去単位として複数有してなる物理メモリおよび当該物理メモリの物理セクタと対応付けた仮想セクタを複数有してなる仮想メモリを用いてデータの読み書きを管理するメモリ管理方式であって、
前記仮想セクタのアドレスと単一または複数の前記物理セクタのアドレスとを当該仮想セクタのアドレス毎に対応付けるセクタアドレス管理手段と、
このセクタアドレス管理手段により前記仮想セクタのアドレスと対応付けた複数の物理セクタの各アドレスの対応付けのタイミングの順序を管理する順序管理手段と、
前記物理セクタに属する物理ブロックの使用状態を示すブロック情報を管理するブロック情報管理手段と、
データ書き込み対象の仮想メモリアドレスで示される物理ブロックのアドレスを計算する第1の計算手段と、
前記書き込み対象の仮想メモリアドレスで示される仮想セクタのアドレスを計算する第2の計算手段と、
前記ブロック情報管理手段により管理されるブロック情報および前記順序管理手段により管理される順序に基づいて、前記第2の計算手段により計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により対応付けられる物理セクタの各アドレスおよび前記第1の計算手段により計算したアドレスと対応する使用状態にある物理ブロックのうち最も遅い順序で前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により対応付けられた物理セクタのアドレスより後の順序で前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして検出するセクタアドレス検出手段とを有し、
前記セクタアドレス管理手段は、前記セクタアドレス検出手段によりアドレスが検出されなかった場合に、属する全ての物理ブロックが未使用状態にある物理セクタのアドレスを前記計算した仮想セクタのアドレスと新たに対応付け、
前記順序管理手段は、この新たに対応付けられた物理セクタのアドレスが前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたとして管理し、
前記新たに対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして指定するセクタアドレス指定手段を有し、
前記ブロック情報管理手段は、前記セクタアドレス指定手段により指定されたアドレスおよび前記第1の計算手段により計算した物理ブロックのアドレスで特定される物理ブロックのブロック情報を使用状態を示す情報に書き換える
ことを特徴とするメモリ管理方式。
Using virtual memory, each formed by a plurality of virtual sectors correlated with multiple has been made physical memory and the physical sector of the physical memory physical sector formed by a plurality as a unit writes the physical block as an erase unit A memory management method for managing reading and writing of data,
A sector address management means for associating the address of the virtual sector address and a single or a plurality of the physical sector in each address of the virtual sector,
Order management means for managing the order of timing of correspondence of each address of a plurality of physical sectors associated with the address of the virtual sector by the sector address management means;
And block information management means for managing block information indicating the use state of the physical blocks belonging to the physical sector,
First calculation means for calculating an address of a physical block indicated by a virtual memory address to which data is to be written;
Second calculating means for calculating an address of a virtual sector indicated by the virtual memory address to be written;
Based on the block information managed by the block information management means and the order managed by the order management means, the sector address management means associates the virtual sector address calculated by the second calculation means. The sector address management means associates the calculated virtual sector address in the slowest order among the physical blocks in use corresponding to each address of the physical sector and the address calculated by the first calculation means. Sector address detecting means for detecting, as the address of the physical sector to be written, the address of the physical sector associated by the sector address management means with respect to the calculated virtual sector address in the order after the physical sector address. It has a door,
The sector address management means newly associates the address of the physical sector in which all the physical blocks to which it belongs is unused with the calculated virtual sector address when no address is detected by the sector address detection means. ,
The order management means manages that the address of the newly associated physical sector is associated with the calculated virtual sector address in the latest order by the sector address management means,
Sector address designating means for designating the address of the newly associated physical sector as the address of the physical sector to be written;
The block information management means rewrites the block information of the physical block specified by the address specified by the sector address specifying means and the address of the physical block calculated by the first calculation means into information indicating a use state. /> A memory management method characterized by this.
前記セクタアドレス管理手段は、属する全ての物理ブロックが未使用状態にある物理セクタのアドレスを任意の仮想セクタのアドレスと新たに対応付け、  The sector address management means newly associates the address of a physical sector in which all physical blocks to which it belongs to an unused virtual sector with an address of an arbitrary virtual sector,
前記順序管理手段は、この新たに対応付けられた物理セクタのアドレスが前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたとして管理し、  The order management means manages that the address of the newly associated physical sector is associated with the calculated virtual sector address in the latest order by the sector address management means,
前記ブロック情報管理手段は、前記セクタアドレス管理手段により前記任意の仮想セクタのアドレスと対応付けられ前記新たに対応付けられたアドレスと異なるアドレスで示される物理セクタに属する物理ブロックのうち、前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたと前記順序管理手段により管理されるアドレスで示される物理ブロックのブロック情報を当該物理ブロックのアドレスと同一のアドレスを有し前記新たに対応付けられたアドレスで示される物理セクタに属する物理ブロックに反映させ、  The block information management unit calculates the calculation among physical blocks belonging to a physical sector that is associated with the address of the arbitrary virtual sector by the sector address management unit and indicated by an address different from the newly associated address. The block information of the physical block indicated by the address managed by the order management means when associated with the virtual sector address in the latest order by the sector address management means has the same address as the address of the physical block. And reflected in the physical block belonging to the physical sector indicated by the newly associated address,
前記セクタアドレス管理手段は、前記任意の仮想セクタのアドレスと前記反映元の物理セクタのアドレスとの対応付けを消去することを特徴とする請求項1に記載のメモリ管理方式。  2. The memory management system according to claim 1, wherein the sector address management unit deletes the association between the address of the arbitrary virtual sector and the address of the reflection source physical sector.
前記セクタアドレス管理手段は、任意の仮想セクタのアドレスと対応付けられる物理セクタのアドレスのうち最も遅い順序で対応付けられたと前記順序管理手段により管理されるアドレスを検索し、  The sector address management means searches for an address managed by the order management means as being associated in the slowest order among physical sector addresses associated with an arbitrary virtual sector address,
前記ブロック情報管理手段は、前記任意の仮想セクタのアドレスと対応付けられ前記検索されたアドレスと異なるアドレスで示される物理セクタに属する物理ブロックのうち、前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたと前記順序管理手段により管理されるアドレスで示される物理ブロックのブロック情報を当該物理ブロックのアドレスと同一のアドレスを有し前記検索されたアドレスで示される物理セクタに属する物理ブロックに反映させ、  The block information management unit is configured to correspond to the calculated virtual sector address among physical blocks belonging to a physical sector associated with the address of the arbitrary virtual sector and indicated by an address different from the searched address. The block information of the physical block indicated by the address managed by the order management means that is associated in the latest order by the address management means is indicated by the retrieved address having the same address as the address of the physical block. Reflected in the physical block belonging to the physical sector,
前記セクタアドレス管理手段は、前記任意の仮想セクタのアドレスと前記反映元の物理セクタのアドレスとの対応付けを消去することを特徴とする請求項1に記載のメモリ管理方式。  2. The memory management system according to claim 1, wherein the sector address management unit deletes the association between the address of the arbitrary virtual sector and the address of the reflection source physical sector.
不揮発性メモリを備え、この不揮発性メモリにおける各々が物理ブロックを書き込み単位として複数有してなる物理セクタを消去単位として複数有してなる物理メモリおよび当該物理メモリの物理セクタと対応付けた仮想セクタを複数有してなる仮想メモリを用いてデータの読み書きを管理するメモリ管理装置であって、  A non-volatile memory, a physical sector having a plurality of physical sectors each having a physical block as a writing unit in the non-volatile memory, and a virtual sector associated with the physical sector of the physical memory A memory management device that manages the reading and writing of data using a virtual memory comprising a plurality of
前記仮想セクタのアドレスと単一または複数の前記物理セクタのアドレスとを当該仮想セクタのアドレス毎に対応付けるセクタアドレス管理手段と、  Sector address management means for associating the address of the virtual sector with the address of the single or plural physical sectors for each address of the virtual sector;
このセクタアドレス管理手段により前記仮想セクタのアドレスと対応付けた複数の物理セクタの各アドレスの対応付けのタイミングの順序を管理する順序管理手段と、  Order management means for managing the order of timing of correspondence of each address of a plurality of physical sectors associated with the address of the virtual sector by the sector address management means;
前記物理セクタに属する物理ブロックの使用状態を示すブロック情報を管理するブロック情報管理手段と、  Block information management means for managing block information indicating a use state of a physical block belonging to the physical sector;
データ書き込み対象の仮想メモリアドレスで示される物理ブロックのアドレスを計算する第1の計算手段と、  First calculation means for calculating an address of a physical block indicated by a virtual memory address to which data is to be written;
前記書き込み対象の仮想メモリアドレスで示される仮想セクタのアドレスを計算する第2の計算手段と、  Second calculating means for calculating an address of a virtual sector indicated by the virtual memory address to be written;
前記ブロック情報管理手段により管理されるブロック情報および前記順序管理手段により管理される順序に基づいて、前記第2の計算手段により計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により対応付けられる物理セクタの各アドレスおよび前記第1の計算手段により計算したアドレスと対応する使用状態にある物理ブロックのうち最も遅い順序で前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により対応付けられた物理セクタのアドレスより後の順序で前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして検出するセクタアドレス検出手段とを備え、  Based on the block information managed by the block information management means and the order managed by the order management means, the sector address management means associates the virtual sector address calculated by the second calculation means. The sector address management means associates the calculated virtual sector address in the slowest order among the physical blocks in use corresponding to each address of the physical sector and the address calculated by the first calculation means. Sector address detecting means for detecting, as the address of the physical sector to be written, the address of the physical sector associated by the sector address management means with respect to the calculated virtual sector address in the order after the physical sector address And
前記セクタアドレス管理手段は、前記セクタアドレス検出手段によりアドレスが検出されなかった場合に、属する全ての物理ブロックが未使用状態にある物理セクタのアドレスを前記計算した仮想セクタのアドレスと新たに対応付け、  The sector address management means newly associates the address of the physical sector in which all the physical blocks to which it belongs is unused with the calculated virtual sector address when no address is detected by the sector address detection means. ,
前記順序管理手段は、この新たに対応付けられた物理セクタのアドレスが前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたとして管理し、  The order management means manages that the address of the newly associated physical sector is associated with the calculated virtual sector address in the latest order by the sector address management means,
前記新たに対応付けられた物理セクタのアドレスを書き込み対象の物理セクタのアドレスとして指定するセクタアドレス指定手段を備え、  Sector address designating means for designating the address of the newly associated physical sector as the address of the physical sector to be written,
前記ブロック情報管理手段は、前記セクタアドレス指定手段により指定されたアドレスおよび前記第1の計算手段により計算した物理ブロックのアドレスで特定される物理ブロ  The block information management means is a physical block specified by the address designated by the sector address designation means and the physical block address calculated by the first calculation means. ックのブロック情報を使用状態を示す情報に書き換えるThe block information of the rack to the information indicating the usage status
ことを特徴とするメモリ管理装置。A memory management device.
前記セクタアドレス管理手段は、属する全ての物理ブロックが未使用状態にある物理セクタのアドレスを任意の仮想セクタのアドレスと新たに対応付け、  The sector address management means newly associates the address of a physical sector in which all physical blocks to which it belongs to an unused virtual sector with an address of an arbitrary virtual sector,
前記順序管理手段は、この新たに対応付けられた物理セクタのアドレスが前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたとして管理し、  The order management means manages that the address of the newly associated physical sector is associated with the calculated virtual sector address in the latest order by the sector address management means,
前記ブロック情報管理手段は、前記セクタアドレス管理手段により前記任意の仮想セクタのアドレスと対応付けられ前記新たに対応付けられたアドレスと異なるアドレスで示される物理セクタに属する物理ブロックのうち、前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたと前記順序管理手段により管理されるアドレスで示される物理ブロックのブロック情報を当該物理ブロックのアドレスと同一のアドレスを有し前記新たに対応付けられたアドレスで示される物理セクタに属する物理ブロックに反映させ、  The block information management unit calculates the calculation among physical blocks belonging to a physical sector that is associated with the address of the arbitrary virtual sector by the sector address management unit and indicated by an address different from the newly associated address. The block information of the physical block indicated by the address managed by the order management means when associated with the virtual sector address in the latest order by the sector address management means has the same address as the address of the physical block. And reflected in the physical block belonging to the physical sector indicated by the newly associated address,
前記セクタアドレス管理手段は、前記任意の仮想セクタのアドレスと前記反映元の物理セクタのアドレスとの対応付けを消去することを特徴とする請求項4に記載のメモリ管理装置。  5. The memory management apparatus according to claim 4, wherein the sector address management unit deletes the association between the address of the arbitrary virtual sector and the address of the reflection source physical sector.
前記セクタアドレス管理手段は、任意の仮想セクタのアドレスと対応付けられる物理セクタのアドレスのうち最も遅い順序で対応付けられたと前記順序管理手段により管理されるアドレスを検索し、  The sector address management means searches for an address managed by the order management means as being associated in the slowest order among physical sector addresses associated with an arbitrary virtual sector address,
前記ブロック情報管理手段は、前記任意の仮想セクタのアドレスと対応付けられ前記検索されたアドレスと異なるアドレスで示される物理セクタに属する物理ブロックのうち、前記計算した仮想セクタのアドレスに対して前記セクタアドレス管理手段により最も遅い順序で対応付けられたと前記順序管理手段により管理されるアドレスで示される物理ブロックのブロック情報を当該物理ブロックのアドレスと同一のアドレスを有し前記検索されたアドレスで示される物理セクタに属する物理ブロックに反映させ、  The block information management unit is configured to correspond to the calculated virtual sector address among physical blocks belonging to a physical sector associated with the address of the arbitrary virtual sector and indicated by an address different from the searched address. The block information of the physical block indicated by the address managed by the order management means that is associated in the latest order by the address management means is indicated by the retrieved address having the same address as the address of the physical block. Reflected in the physical block belonging to the physical sector,
前記セクタアドレス管理手段は、前記任意の仮想セクタのアドレスと前記反映元の物理セクタのアドレスとの対応付けを消去することを特徴とする請求項4に記載のメモリ管理装置。  5. The memory management apparatus according to claim 4, wherein the sector address management unit deletes the association between the address of the arbitrary virtual sector and the address of the reflection source physical sector.
JP2002084322A 2002-03-25 2002-03-25 Memory management method and memory management device Expired - Fee Related JP3699942B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002084322A JP3699942B2 (en) 2002-03-25 2002-03-25 Memory management method and memory management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002084322A JP3699942B2 (en) 2002-03-25 2002-03-25 Memory management method and memory management device

Publications (2)

Publication Number Publication Date
JP2003280822A JP2003280822A (en) 2003-10-02
JP3699942B2 true JP3699942B2 (en) 2005-09-28

Family

ID=29231732

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002084322A Expired - Fee Related JP3699942B2 (en) 2002-03-25 2002-03-25 Memory management method and memory management device

Country Status (1)

Country Link
JP (1) JP3699942B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4192129B2 (en) 2004-09-13 2008-12-03 株式会社東芝 Memory management device
JP4734033B2 (en) 2005-05-30 2011-07-27 株式会社東芝 Storage device
JP4751163B2 (en) 2005-09-29 2011-08-17 株式会社東芝 Memory system
JP2014203405A (en) * 2013-04-09 2014-10-27 富士通株式会社 Information processing device, memory control device, data transfer control method, and data transfer control program

Also Published As

Publication number Publication date
JP2003280822A (en) 2003-10-02

Similar Documents

Publication Publication Date Title
USRE42263E1 (en) Address conversion unit for memory device
KR101392174B1 (en) Apparatus and method for controlling flash memory storing mapping table of block to erase
US20080120488A1 (en) Apparatus and method of managing nonvolatile memory
TW589528B (en) Posted write-through cache for flash memory
JP4122972B2 (en) Data recording apparatus and data writing method for flash memory
US7606990B2 (en) Snapshot system
US20120030439A1 (en) Data Sharing for File Clones Using Reverse Ditto References
KR970007689A (en) An information processing system for enabling access to a heterogeneous file, a control method therefor, and a storage medium storing the program
KR20170097543A (en) Memory device comprising stream detector and operating method thereof
KR20100042455A (en) Flash memory system and method of flash translation layer design thereof
JP2008192154A (en) Memory mapping method and memory mapping system
WO2014208863A1 (en) Integrated data management apparatus and method for non-volatile buffer cache and non-volatile storage
US6510495B1 (en) Data write method into nonvolatile memory, information processing device and recording medium
US20040193781A1 (en) Flash memory access apparatus and method
WO2023116109A1 (en) Request processing method and apparatus, and device and non-volatile readable storage medium
WO2014185652A1 (en) Method for replacing cache memory block having low write traffic and information processing device having cache subsystem using same
JP3699942B2 (en) Memory management method and memory management device
US6931471B2 (en) Method, apparatus, and computer program product for migrating data subject to access by input/output devices
US10824570B2 (en) Memory system
JP5012016B2 (en) Cache memory device, arithmetic processing device, and control method for cache memory device
JPWO2012101983A1 (en) Storage system
JPH1173363A (en) Memory controller
JP2005115561A (en) Flash rom controller
JP2004326165A (en) Device and method for controlling memory
US6738791B2 (en) Data synchronizing device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050428

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050711

R151 Written notification of patent or utility model registration

Ref document number: 3699942

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

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

Free format text: PAYMENT UNTIL: 20090715

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090715

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100715

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110715

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120715

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130715

Year of fee payment: 8

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees