JP4042898B2 - Memory controller, memory system including the same, and flash memory control method - Google Patents
Memory controller, memory system including the same, and flash memory control method Download PDFInfo
- Publication number
- JP4042898B2 JP4042898B2 JP2002229635A JP2002229635A JP4042898B2 JP 4042898 B2 JP4042898 B2 JP 4042898B2 JP 2002229635 A JP2002229635 A JP 2002229635A JP 2002229635 A JP2002229635 A JP 2002229635A JP 4042898 B2 JP4042898 B2 JP 4042898B2
- Authority
- JP
- Japan
- Prior art keywords
- zone
- address
- address conversion
- logical
- conversion table
- 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 - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、メモリコントローラ及びこれを備えるメモリシステムに関し、特に、フラッシュメモリを制御するためのメモリコントローラ及びこれを備えるメモリシステムに関する。また、本発明はフラッシュメモリの制御方法に関する。
【0002】
【従来の技術】
近年、メモリカードやシリコンディスクなどに用いられる半導体メモリとして、フラッシュメモリ、特にNAND型フラッシュメモリが用いられることが多い。NAND型フラッシュメモリは、メモリセルを消去状態(論理値=1)から書込状態(論理値=0)に変化させる場合は、これをメモリセル単位で行うことが可能である一方、メモリセルを書込状態(0)から消去状態(1)に変化させる場合は、これをメモリセル単位で行うことができず、複数のメモリセルからなるブロック単位でしかこれを行うことができない。かかる一括消去動作は、一般的に「ブロック消去」と呼ばれる。
【0003】
このように、フラッシュメモリでは、ブロック単位でしかメモリセルを書込状態(0)から消去状態(1)に変化させることができないことから、既にデータが割り当てられている論理アドレスに対して新しいデータを上書きする場合であっても、旧データが格納されているブロックに対して新しいデータを直接上書きすることはできない。このため、既にデータが割り当てられている論理アドレスに対して新しいデータを上書きするようホストコンピュータから指示されると、旧データが格納されているブロック内における上書き対象外のデータを消去済みブロックに転送するとともに、新しいデータを当該消去済みブロックに書き込むという処理が必要となる。かかる処理は「ブロック間転送」と呼ばれ、ホストコンピュータからデータの上書きが指示される度に実行される。ブロック間転送が行われた後、転送元のブロックはブロック消去され、これにより転送元のブロックは新たな消去済みブロックとなる。
【0004】
したがって、論理アドレスと各ブロックに一義的に割り当てられた物理アドレスとの関係は固定されず、これらの関係はデータの上書きが指示される度に動的に変化することになる。このため、フラッシュメモリを制御するためのコントローラ内には、論理アドレスと物理アドレスとの関係を保持するためのアドレス変換テーブルが必要となり、ホストコンピュータからデータの読み出しが要求される度にこれを参照してアドレス変換が行われるとともに、データの書き込みが要求される度にその内容が更新される。
【0005】
しかしながら、アドレス変換テーブルに必要とされる記録容量は、コントローラの制御対象となるブロック数に比例することから、制御対象となるブロック数が非常に多い場合には大容量のアドレス変換テーブルが必要となる。しかも、アドレス変換テーブルには一般にSRAM(Static Random Access Memory)が用いられるため、大容量のアドレス変換テーブルを用いるとコントローラの製品コストを大幅に増大させてしまう。
【0006】
このような問題を解消するためには、制御対象となる全てのブロックに関するアドレス変換情報をアドレス変換テーブルに格納するのではなく、一部のブロックに関するアドレス変換情報のみをアドレス変換テーブルに格納することが有効である。例えば、アドレス変換テーブルに格納するアドレス変換情報を半分のブロックに関する情報のみとすれば、アドレス変換テーブルに必要とされる記憶容量を半分とすることができ、コントローラの製品コストを下げることが可能となる。
【0007】
【発明が解決しようとする課題】
しかしながら、一部のブロックに関するアドレス変換情報のみをアドレス変換テーブルに展開する方式においては、アドレス変換テーブルにアドレス変換情報が展開されていないブロックに対してデータの読み出しが要求された場合、アドレス変換テーブル内の一部のデータを破棄し、新たに当該ブロックに関するアドレス変換情報をアドレス変換テーブル内に格納するといった更新作業が必要となる。当然ながら、更新作業が完了するまでは要求されたデータの読み出しを行うことができないので、かかる更新作業の発生はメモリシステムのパフォーマンスを低下させる原因となる。
【0008】
このような更新作業の発生頻度は、アドレス変換テーブルにアドレス変換情報が格納されるブロックの割合によって決まり、この割合が少ないほど更新作業は高頻度で発生することになる。つまり、アドレス変換テーブルの容量を節約することによってアドレス変換情報を格納可能なブロックの割合を減らせば減らすほど、コントローラの製品コストが低下するとともにパフォーマンスも低下し、逆に、アドレス変換テーブルの容量を増大することによってアドレス変換情報を格納可能なブロックの割合を増やせば増やすほど、コントローラの製品コストが上昇するとともにパフォーマンスも向上する。すなわち、アドレス変換テーブルの容量に基づく製品コストとパフォーマンスとはトレードオフの関係にあり、その両方を満足させることは困難であった。
【0009】
したがって、本発明の目的は、アドレス変換テーブルの容量を節約しつつ、パフォーマンスの低下を効果的に抑制可能なメモリコントローラ及びこれを備えるメモリシステムを提供することである。
【0010】
また、本発明の他の目的は、アドレス変換テーブルの容量を節約しつつ、パフォーマンスの低下を効果的に抑制可能なフラッシュメモリの制御方法を提供することである。
【0011】
【課題を解決するための手段】
本発明の第1の観点によるメモリコントローラは、
ホストシステムから与えられるセクタ単位のホストアドレスに基づいて、複数のページを含む物理ブロック単位で消去が行われるフラッシュメモリにアクセスするメモリコントローラであって、
前記ホストアドレスが割り当てられている複数セクタの領域で構成された論理ブロックが複数個含まれる論理ゾーンと、前記物理ブロックが複数個含まれる物理ゾーンとの対応関係を管理するゾーン管理手段と、
前記ホストシステムから与えられるホストアドレスに基づいて、アクセス対象の前記論理ゾーンを特定する第1のゾーン特定手段と、
前記第1のゾーン特定手段によって特定された前記論理ゾーンに含まれるホストアドレスに後続するホストアドレスが含まれる前記論理ゾーンを特定する第2のゾーン特定手段と、
前記論理ゾーンに含まれる前記論理ブロックと、該論理ゾーンに対応する前記物理ゾーンに含まれる前記物理ブロックの対応関係を記述した論理ゾーン毎のアドレス変換テーブルを複数個保持するアドレス変換テーブル保持手段と、
前記アドレス変換テーブル保持手段に保持されている複数個の前記論理ゾーン毎のアドレス変換テーブルに関する優先順位を管理する優先順位管理手段と、
前記第1のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルが前記アドレス変換テーブル保持手段に保持されているか否かを判断する第1のテーブル有無判断手段と、
前記第1のテーブル有無判断手段の判断が否定の判断であるときに、前記第1のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成する第 1 のアドレス変換テーブル作成手段と、
前記第2のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルが前記アドレス変換テーブル保持手段に保持されているか否かを判断する第2のテーブル有無判断手段と、
前記第2のテーブル有無判断手段の判断が否定の判断であるときに、前記第2のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成する第2のアドレス変換テーブル作成手段と、
前記アドレス変換テーブル保持手段に保持されている前記論理ゾーン毎のアドレス変換テーブルに基づいて、前記第1のゾーン特定手段で特定された前記論理ゾーンと対応する前記物理ゾーン内の前記物理ブロックにアクセスするアクセス手段と、
を備え、
前記第2のアドレス変換テーブル作成手段は、前記アクセス手段が前記第1のゾーン特定手段によって特定された前記論理ゾーンと対応する前記物理ゾーン内の前記物理ブロックへのアクセスを中断している期間に、前記論理ゾーン毎のアドレス変換テーブルの作成処理を実行し、
前記アドレス変換テーブル保持手段が保持することができる前記論理ゾーン毎のアドレス変換テーブルの最大個数は、前記論理ゾーンの総数よりも少なく、
前記アドレス変換テーブル保持手段は、前記最大個数の前記論理ゾーン毎のアドレス変換テーブルを保持しているときに、該アドレス変換テーブル保持手段に保持されていない前記論理ゾーン毎のアドレス変換テーブルを前記第1のアドレス変換テーブル作成手段又は第2のアドレス変換テーブル作成手段が作成する場合、前記アドレス変換テーブル保持手段は、前記優先順位管理手段で管理されている優先順位が最下位の前記論理ゾーン毎のアドレス変換テーブルに代えて、前記第1のアドレス変換テーブル作成手段又は第2のアドレス変換テーブル作成手段によって作成される前記論理ゾーン毎のアドレス変換テーブルを保持する、
ことを特徴とする。
【0013】
本発明のフラッシュメモリシステムは、複数のページを含む物理ブロック単位で消去が行われるフラッシュメモリと、上述のメモリコントローラとを備える。
【0014】
また、この発明の第2の観点に係るフラッシュメモリの制御方法は、
ホストシステムから供給されるセクタ単位のホストアドレスに基づいて、複数のページを含む物理ブロック単位で消去が行われるフラッシュメモリに対するアクセスを制御するフラッシュメモリの制御方法であって、
前記ホストアドレスが割り当てられている複数セクタの領域で構成された論理ブロックが複数個含まれる論理ゾーンと、前記物理ブロックが複数個含まれる物理ゾーンとの対応関係を管理するゾーン管理ステップと、
前記ホストシステムから与えられるホストアドレスに基づいて、アクセス対象の前記論理ゾーンを特定する第1のゾーン特定ステップと、
前記第1のゾーン特定ステップで特定された前記論理ゾーンに対応する論理ゾーン毎のアドレス変換テーブルがアドレス変換テーブル保持手段に保持されているか否かを判断する第1のテーブル有無判断ステップと、
前記第1のテーブル有無判断ステップでの判断が否定の判断であるときに、前記第1のゾーン特定ステップで特定された前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成し、前記アドレス変換テーブル保持手段に保持する第1のアドレス変換テーブル作成ステップと、
前記アドレス変換テーブル保持手段に保持されている前記論理ゾーン毎のアドレス変換テーブルに基づいて、前記第1のゾーン特定ステップで特定された前記論理ゾーンと対応する前記物理ゾーン内の前記物理ブロックにアクセスするアクセスステップと、
前記第1のゾーン特定ステップで特定された前記論理ゾーンに含まれるホストアドレスに後続するホストアドレスが含まれる前記論理ゾーンを特定する第2のゾーン特定ステップと、
前記第2のゾーン特定ステップで特定された前記論理ゾーンに対応する該論理ゾーン毎のアドレス変換テーブルがアドレス変換テーブル保持手段に保持されているか否かを判断する第2のテーブル有無判断ステップと、
前記第2のテーブル有無判断ステップでの判断が否定の判断であるときに、前記第2のゾーン特定ステップで特定された前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成し、前記アドレス変換テーブル保持手段に保持する第2のアドレス変換テーブル作成ステップと、
前記アドレス変換テーブル保持手段に保持されている複数個の前記論理ゾーン毎のアドレス変換テーブルに関する優先順位を管理する優先順位管理ステップと、を有し、
前記論理ゾーン毎のアドレス変換テーブルは、前記論理ゾーンに含まれる前記論理ブロックと、該論理ゾーンに対応する前記物理ゾーンに含まれる前記物理ブロックの対応関係を記述したテーブルであり、
前記アドレス変換テーブル保持手段が保持することができる前記論理ゾーン毎のアドレス変換テーブルの最大個数は、前記論理ゾーンの総数よりも少なく、
前記第2のアドレス変換テーブル作成ステップは、前記第1のゾーン特定ステップで特定された前記論理ゾーンと対応する前記物理ゾーンにアクセスするアクセスステップで前記フラッシュメモリから読み出したデータを前記ホストシステムに転送している期間に実行し、
前記第1のアドレス変換テーブル作成ステップ及び前記第2のアドレス変換テーブル作成ステップは、前記アドレス変換テーブル保持手段に前記最大個数の前記論理ゾーン毎のアドレス変換テーブルが保持されているときに、該アドレス変換テーブル保持手段に保持されていない前記論理ゾーン毎のアドレス変換テーブルを新たに作成する場合、前記優先順位が最下位の前記論理ゾーン毎のアドレス変換テーブルに代えて、新たに作成する前記論理ゾーン毎のアドレス変換テーブルを前記アドレス変換テーブル保持手段に保持する
ことを特徴とする。
【0025】
【発明の実施の形態】
以下、添付図面を参照しながら、本発明の好ましい実施態様について詳細に説明する。
【0026】
図1は、本発明の好ましい実施態様にかかるフラッシュメモリシステム1の構成を概略的に示すブロック図である。図1に示すように、本実施態様にかかるフラッシュメモリシステム1は、フラッシュメモリ2及びコントローラ3からなる。特に限定されるものではないが、フラッシュメモリシステム1はフラッシュメモリ2及びコントローラ3が一つのカード内に集積されて構成され、ホストコンピュータに対して着脱可能な一種の外部記憶装置として用いることができる。ホストコンピュータとしては、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置が挙げられる。
【0027】
フラッシュメモリ2は、多数のメモリセルを含む1又は2以上の半導体チップからなり、n個(例えば8192個)のブロックによって構成される。これらn個のブロックはいずれもk個(例えば32個)のページ(セクタ)からなり、各ページは例えば512バイトの記録容量を有する最小アクセス単位として用いられる。したがって、上記の例のように、
n=8192(=8K)
k=32
である場合、フラッシュメモリ2は256Kページのアドレス空間を含み、このためホストコンピュータ側から特定のページにアクセスするためには、少なくとも18ビットのアドレス情報が必要となる。本明細書においては、ホストコンピュータよりフラッシュメモリシステム1に供給されるアドレス情報を「ホストアドレス」と呼ぶ。
【0028】
コントローラ3は、少なくともCPU4、RAM5、ROM6及びFIFO7を含む種々の機能ブロックによって構成される。特に限定されるものではないが、コントローラ3は一つの半導体チップ上に集積されていることが好ましい。CPU4は、コントローラ3を構成する各機能ブロック全体の動作を制御するための機能ブロックである。また、RAM5は、CPU4によるフラッシュメモリ2の制御に必要なデータが一時的に格納される作業領域であり、特に限定されるものではないが、複数のSRAMセルによって構成することが好ましい。以下に詳述するが、アドレス変換テーブルもRAM5内に格納される。ROM6は、CPU4が実行すべき制御プログラム(ファームウェア)を格納するための機能ブロックである。また、FIFO7は、フラッシュメモリ2に書き込むべきデータ及びフラッシュメモリ2から読み出されたデータを一時的に格納するためのメモリである。
【0029】
次に、フラッシュメモリ2に含まれるメモリセルの具体的な構造について説明する。
【0030】
図2は、フラッシュメモリ2に含まれる各メモリセル10の構造を概略的に示す断面図である。図2に示すように、メモリセル10は、P型半導体基板11に形成されたN型のソース拡散領域12及びドレイン拡散領域13と、ソース拡散領域12とドレイン拡散領域13との間のP型半導体基板11を覆って形成されたトンネル酸化膜14と、トンネル酸化膜14上に形成されたフローティングゲート電極15と、フローティングゲート電極15上に形成された絶縁膜16と、絶縁膜16上に形成されたコントロールゲート電極17とから構成される。このような構成を有するメモリセル10は、フラッシュメモリ2内において、複数個直列に接続されて、NAND型フラッシュメモリを構成する。
【0031】
メモリセル10は、フローティングゲート電極15に電子が注入されているか否かによって、「消去状態」と「書込状態」のいずれかの状態となる。メモリセル10が消去状態であることは、当該メモリセル10にデータ「1」が保持されていることを意味し、メモリセル10が書込状態であることは、当該メモリセル10にデータ「0」が保持されていることを意味する。すなわち、メモリセル10は、1ビットのデータを保持することが可能である。
【0032】
図2に示すように、消去状態とは、フローティングゲート電極15に電子が注入されていない状態を指す。消去状態におけるメモリセル10は、デプレッション型のトランジスタとなり、コントロールゲート電極17に読み出し電圧が印加されているか否かに関わらず、ソース拡散領域12とドレイン拡散領域13との間のP型半導体基板11の表面にはチャネル18が形成される。したがって、ソース拡散領域12とドレイン拡散領域13とは、コントロールゲート電極17に読み出し電圧が印加されているか否かに関わらず、チャネル18によって常に電気的に接続状態となる。
【0033】
図3は、書込状態であるメモリセル10を概略的に示す断面図である。図3に示すように、書込状態とは、フローティングゲート電極15に電子が蓄積されている状態を指す。フローティングゲート電極15はトンネル酸化膜14及び絶縁膜16に挟まれているため、一旦、フローティングゲート電極15に注入された電子は、きわめて長時間フローティングゲート電極15内にとどまる。書込状態におけるメモリセル10は、エンハンスメント型のトランジスタとなり、コントロールゲート電極17に読み出し電圧が印加されていないときには、ソース拡散領域12とドレイン拡散領域13との間のP型半導体基板11の表面にはチャネルが形成されず、コントロールゲート電極17に読み出し電圧が印加されているときには、ソース拡散領域12とドレイン拡散領域13との間のP型半導体基板11の表面にチャネル(図示せず)が形成される。したがって、コントロールゲート電極17に読み出し電圧が印加されていない状態では、ソース拡散領域12とドレイン拡散領域13とは電気的に絶縁され、コントロールゲート電極17に読み出し電圧が印加された状態では、ソース拡散領域12とドレイン拡散領域13とが電気的に接続される。
【0034】
ここで、選択されたメモリセル10が消去状態であるか書込状態であるかは、次のようにして読み出すことができる。すなわち、複数個直列に接続されたメモリセル10のうち、選択されたメモリセル10以外の全てのメモリセル10のコントロールゲート電極17に読み出し電圧を印加し、この状態において、これらメモリセル10の直列体に電流が流れるか否かを検出する。その結果、かかる直列体に電流が流れれば、選択されたメモリセル10が消去状態であると判断することができ、かかる直列体に電流が流れなければ、選択されたメモリセル10が書込状態であると判断することができる。このようにして、直列体に含まれる任意のメモリセル10に保持されたデータが「0」であるのか「1」であるのかを読み出すことができる。但し、NAND型フラッシュメモリにおいては、ひとつの直列体に含まれる2以上のメモリセル10に保持されたデータを同時に読み出すことはできない。
【0035】
また、消去状態であるメモリセル10を書込状態に変化させる場合、コントロールゲート電極17に正の高電圧が印加され、これによって、トンネル酸化膜14を介してフローティングゲート電極15へ電子が注入される。フローティングゲート電極15への電子の注入は、FNトンネル電流による注入が可能である。一方、書込状態であるメモリセル10を消去状態に変化させる場合、コントロールゲート電極17に負の高電圧が印加され、これによって、トンネル酸化膜14を介してフローティングゲート電極15に蓄積された電子が排出される。
【0036】
次に、フラッシュメモリ2の持つアドレス空間の具体的な構成について説明する。
【0037】
図4は、フラッシュメモリ2のアドレス空間の構造を概略的に示す図である。図4に示すように、フラッシュメモリ2のアドレス空間は、ブロック#0〜#n−1からなるn個のブロックによって構成される。ここで、各ブロックは、データの消去単位である。すなわち、フラッシュメモリ2では、各メモリセル10ごとに、その状態を書込状態から消去状態に変化させることはできず、メモリセル10を書込状態から消去状態に変化させる場合は、当該メモリセル10が属するブロックに含まれる全てのメモリセル10を一括して消去状態とする必要がある。逆に、各メモリセル10ごとにその状態を消去状態から書込状態に変化させることは可能である。
【0038】
さらに、図4に示すように、フラッシュメモリ2を構成する各ブロック#0〜#n−1は、それぞれページ#0〜#k−1からなるk個のページによって構成されている。これら各ページはデータの読み出し及び書き込みにおけるアクセス単位であり、図4に示すように、ビットb0〜b7からなる8ビットを1バイトとして、例えばそれぞれ512バイトのユーザ領域21と16バイトの冗長領域22によって構成される。ユーザ領域21は、ホストコンピュータより供給されるユーザデータが格納される領域である。
【0039】
ここで、n個のブロック#0〜#n−1は、ゾーン#0〜#p−1(pは3以上の整数であり、且つ、nの約数である)からなるp個のゾーンに分類される。したがって、各ゾーンはn/p(=m)個のブロックによって構成されることになる。また、ゾーン#q(qは0〜p−1のいずれか)はブロック#m×q〜#m×q+m−1によって構成される。例えば、
n=8192(=8K)
p=8
であるとすれば、各ゾーンはm=1024個のブロックによって構成され、具体的には、ゾーン#qはブロック#1024q〜#1024q+1023によって構成されることになる。フラッシュメモリ2のアドレス空間をp個のゾーンに分類するのは、アドレス変換テーブルの記録容量を節約するためであり、その詳細については後述する。
【0040】
図5は、冗長領域22のデータ構造を概略的に示す図である。図5に示すように、冗長領域22は、論理ブロックアドレス格納領域23及びその他の付加情報を格納するための領域24によって構成される。
【0041】
論理ブロックアドレス格納領域23は、当該ブロックに対応する論理ブロックアドレスを格納するための領域であり、少なくともx個(x=log2m)のメモリセル10が割り当てられる。ここで、論理ブロックアドレスとは、ホストアドレスの一部若しくはホストアドレスの一部に基づいて生成されたアドレスであり、ホストコンピュータ側から見た各ゾーンにおけるブロック番号を示している。したがって、論理ブロックアドレスは各ゾーンにおいて一義的に割り当てられ、少なくともxビットで構成される。論理ブロックアドレス格納領域23は、各ページに含まれる冗長領域22が共通に備える要素であるが、一つのブロックはk個のページからなるため、一つのブロックを構成する全てのページの論理ブロックアドレス格納領域23に論理ブロックアドレスを格納しておく必要はなく、少なくとも各ブロックの先頭ページ(ページ#0)の論理ブロックアドレス格納領域23に論理ブロックアドレスを格納すれば足りる。また、消去済みのブロックについては全てのメモリセル10が消去状態(1)となっていることから、論理ブロックアドレス格納領域23がx個のメモリセル10からなる場合、論理ブロックアドレス格納領域23に格納される値はm−1(=2x−1)となる。一方、何らかのユーザデータが格納されているブロックについては、対応する論理ブロックアドレスの値が論理ブロックアドレス格納領域23に格納されている。
【0042】
尚、領域24には、対応するユーザ領域21に格納されたユーザデータの誤りを訂正するための付加情報(エラーコレクションコード)や、当該ブロックについての異常を表示するブロックステータス等が格納されているが、これらについては、本発明の要旨と直接関係がないため、説明は省略する。
【0043】
以上のように、フラッシュメモリ2はn個のブロックによって構成され、これらはそれぞれm個のブロックからなるp個のゾーンに分類されているが、各ゾーンに含まれるm個のブロックのうち、m’(<m)個のブロックは実際にデータを格納することができる実使用ブロックとして取り扱われ、残りのm−m’個のブロックは冗長ブロックとして取り扱われる。フラッシュメモリ2のアドレス空間は、実使用ブロックのみによって構成され、あるブロックに不良が発生し使用不能となった場合には、不良が発生したブロックの数だけ冗長ブロックとして用いられるブロックの数が減らされる。
【0044】
次に、RAM5内に作成される各種テーブルについて説明する。
【0045】
RAM5内に作成される各種テーブルには、少なくとも、アドレス変換テーブル、管理テーブル、優先リンク及び書き込みキューが含まれ、これらはコントローラ3に対して電源投入またはリセット動作がなされた場合に、ROM6に格納されているファームウェアに基づきCPU4によって作成される。
【0046】
アドレス変換テーブルは、ホストアドレスに基づき生成される論理ブロックアドレスと各ブロックに対して一義的に割り当てられた物理ブロックアドレスとの対応関係を保持するためのテーブルであり、以下の構造を有している。
【0047】
図6は、RAM5内に作成されるアドレス変換テーブル31のデータ構造を示す図である。図6に示すように、アドレス変換テーブル31は、テーブル#0〜#r−1(rは2〜p−1の整数)からなるr個のテーブルからなる。各テーブル#0〜#r−1は、それぞれゾーン#0〜ゾーン#p−1のいずれか一つのゾーンに関するアドレス変換情報を格納するための領域であり、上述の通りr<pであることから、アドレス変換テーブル31に全て(p個)のゾーンに関するアドレス変換情報を格納することはできず、一部(r個)のゾーンに関するアドレス変換情報しか格納することができない。これは、アドレス変換テーブル31に必要とされる記憶容量を節約することにより、製品コストを下げるために他ならない。
【0048】
各テーブル#0〜#r−1は、物理ブロックアドレス格納領域#0〜物理ブロックアドレス格納領域#m−1からなるm個の物理ブロックアドレス格納領域と、これら物理ブロックアドレス格納領域にそれぞれ対応して設けられたm個のフラグからなる。ここで、各物理ブロックアドレス格納領域に対して一義的に割り当てられた領域番号(#0〜#m−1)は論理ブロックアドレスを示し、各物理ブロックアドレス格納領域に格納された内容は、対応する物理ブロックアドレスを示している。したがって、例えば物理ブロックアドレス格納領域#i(iは0〜m−1のいずれか)に格納されている物理ブロックアドレスが#jであれば、論理ブロックアドレス=#iが物理ブロックアドレス=#jに対応することになる。
【0049】
また、フラグ#0〜フラグ#m−1は、それぞれ対応する物理ブロックアドレス格納領域の内容(物理ブロックアドレス)が有効であるか否かを示している。具体的には、フラグが「0」であれば、対応する物理ブロックアドレス格納領域の内容が有効であることを意味し、フラグが「1」であれば、対応する物理ブロックアドレス格納領域の内容が無効であることを意味する。もちろん、逆に、物理ブロックアドレス格納領域の内容が有効である場合に、対応するフラグを「1」としても構わない。
【0050】
管理テーブルは、各テーブル#0〜#r−1に格納されているアドレス変換情報がそれぞれどのゾーンに関するアドレス変換情報であるのかを示すためのテーブルであり、以下の構造を有している。
【0051】
図7は、RAM5内に作成される管理テーブル32のデータ構造を示す図である。図7に示すように、管理テーブル32は、ゾーン番号格納領域#0〜#r−1からなるr個のゾーン番号格納領域からなる。各ゾーン番号格納領域#0〜#r−1はそれぞれテーブル#0〜#r−1に対応しており、ここに格納されている値が対応するゾーン番号を示している。一例として、テーブル#2に格納されているアドレス変換情報がゾーン#5に関するアドレス変換情報である場合には、ゾーン番号格納領域#2にはゾーン番号として「5」が格納される。したがって、管理テーブル32を参照すれば、各テーブル#0〜#r−1と各ゾーン#0〜#p−1との関係を知ることが可能となる。
【0052】
優先リンクは、アドレス変換テーブル31を構成する各テーブル#0〜#r−1の優先順位を示す要素であり、以下の構造を有している。
【0053】
図8は、RAM5内に作成される優先リンク33のデータ構造を示す図である。図8に示すように、優先リンク33は、ポインタ#0〜#r−1からなるr個のポインタによって構成される。優先リンク33によって、アドレス変換テーブル31を構成するr個のテーブル#0〜#r−1の優先順位を示す具体的な方法について説明する前に、これらr個のテーブル#0〜#r−1に優先順位を設ける必要性について説明する。
【0054】
上述のとおり、アドレス変換テーブル31を構成するテーブルの数(r個)は、フラッシュメモリ2のアドレス空間を構成するゾーンの数(p個)よりも少なく、このため、アドレス変換テーブル31に展開されるアドレス変換情報は、一部のゾーンに関わるアドレス変換情報に限られる。したがって、アドレス変換テーブル31にアドレス変換情報が展開されていないゾーンに対して、ホストコンピュータからアクセスが要求された場合には、アドレス変換テーブル31の内容を更新する必要がある。すなわち、CPU4は、アドレス変換テーブル31を構成するr個のテーブル#0〜#r−1の中からいずれか1つのテーブルを選び、その内容を消去して、アクセスが要求されたゾーンに関わるアドレス変換情報を当該テーブル内に新たに格納する必要がある。したがって、テーブル#0〜#r−1の中から、その内容が消去されるべきテーブルを選ぶためには、テーブル#0〜#r−1に優先順位を設け、優先順位の低いテーブルから順にその内容を消去する必要がある。
【0055】
かかる理由から、アドレス変換テーブル31を構成するr個のテーブル#0〜#r−1には優先順位が与えられ、かかる優先順位を記憶するために優先リンク33が設けられるのである。優先リンク33を用いたテーブル#0〜#r−1の優先順位の記憶方法は次の通りである。
【0056】
すなわち、優先リンク33を構成するポインタ#0〜#r−1には、リンク先ポインタ番号として値「0」〜「r−1」及びデータ「NULL」のいずれかが互いに重複しないように格納され、その結果、いずれのポインタにも格納されていない値(0〜r−1)に対応するテーブルが最も優先順位の高いテーブルとなる。例えば、値「2」がいずれのポインタにも格納されていない場合には、テーブル#2が最も優先順位の高いテーブルとなる。
【0057】
次に、最も優先順位の高いテーブルと同じ番号を持つポインタに格納されている値(0〜r−1)に対応するテーブルが2番目に優先順位の高いテーブルとなる。上記の例のように、テーブル#2が最も優先順位の高いテーブルである場合、ポインタ#2に格納されている値(例えば「0」)に対応するテーブルが2番目に優先順位の高いテーブルとなる。
【0058】
同様に、2番目に優先順位の高いテーブルと同じ番号を持つポインタに格納されている値(0〜r−1)に対応するテーブルが3番目に優先順位の高いテーブルとなり、以下、このようなリンク作業を次々と行うことによって、全てのテーブル#0〜#r−1についての優先順位を特定することができる。最も優先順位の低いテーブルと同じ番号を持つポインタにはデータ「NULL」が格納され、これにより、優先リンク33を参照すれば現在最も優先順位の低いテーブルを直ちに特定することが可能となる。
【0059】
書き込みキューは、消去済みの空きブロックの登録テーブルであり、以下の構造を有している。
【0060】
図9は、RAM5内に作成される書き込みキュー34のデータ構造を示す図である。図9に示すように、書き込みキュー34は、キュー#0〜キュー#r−1からなるr個のキューによって構成され、各キューには、対応するゾーンに含まれる消去済みブロックの物理ブロックアドレスが格納されている。ここで、対応するゾーンとは、各キューのキュー番号と同じ番号を持つテーブルにアドレス変換情報が格納されているゾーンを指す。例えば、ゾーン#7に関するアドレス変換情報がテーブル#1に格納されているとすれば、キュー#1に対応するゾーンはゾーン#7であり、ゾーン#7を構成するブロックのうち消去済みであるブロックの物理ブロックアドレスがキュー#1に格納される。
【0061】
尚、図9に示す書き込みキュー34はr個のキューによって構成されているが、rの整数倍個のキューを用いることにより、対応するゾーンに含まれる消去済みブロックの物理ブロックアドレスを複数個格納可能に構成しても構わない。
【0062】
以上が、本実施態様にかかるフラッシュメモリシステムの構成である。次に、本実施態様にかかるフラッシュメモリシステム1の動作について説明する。
【0063】
図10は、アドレス変換テーブル31の新規作成方法を示すフローチャートである。アドレス変換テーブル31の新規作成は、コントローラ3に対して電源投入またはリセット動作がなされたことに応答して、CPU4がROM6に格納されているファームウェアを実行することにより行われる動作であり、電源投入またはリセット動作に応答したコントローラ3の初期設定動作の一つを構成する。
【0064】
まず、コントローラ3に対して電源投入またはリセット動作がなされると、CPU4は、RAM5のうちアドレス変換テーブル31を構成するビットを全て「1」にリセットする(ステップS1)。次いで、CPU4は、内部変数a及びbの値を0にリセットし(ステップS2)、ブロック番号が
a×m+b
に一致するブロックの先頭ページ(ページ#0)に格納されている論理ブロックアドレスを読み出す(ステップS3)。上述の通り、「m」とは総ブロック数nをゾーン数pで除した値(=n/p)であり、一つのゾーンを構成するブロック数を表している。この場合、内部変数a=b=0であるから、ブロック#0のページ#0に格納されている論理ブロックアドレスが読み出されることになる。
【0065】
次に、CPU4は、読み出された論理ブロックアドレスが「オール1」であるか否か、すなわちm−1であるかを判断し(ステップS4)、その結果、読み出された論理ブロックアドレスが「オール1(=m−1)」以外であれば(S4:NO)、テーブル番号が内部変数aに一致するテーブルのうち、フラグ番号が論理ブロックアドレスに一致するフラグを「0」に書き替える(ステップS5)とともに、領域番号が論理ブロックアドレスに一致する物理ブロックアドレス格納領域に内部変数bを格納する(ステップS6)。一方、ステップS4において、読み出された論理ブロックアドレスが「オール1(=m−1)」であれば(S4:YES)、上記ステップS5及びステップS6は実行されない。
【0066】
そして、CPU4は、内部変数bをインクリメントした後(ステップS7)、内部変数bがmに一致しているか否かを判断し(ステップS8)、その結果、内部変数bがmではない場合(S8:NO)にはステップS3に戻って、内部変数a及びbを用いた論理ブロックアドレスの読み出しを行う。一方、内部変数bがmに一致している場合(S8:YES)には、内部変数aをインクリメントした後(ステップS9)、内部変数aがrに一致しているか否かを判断し(ステップS10)、その結果、内部変数aがrではない場合(S10:NO)にはステップS3に戻って、内部変数a及びbを用いた論理ブロックアドレスの読み出しを行う。一方、内部変数aがrに一致している場合(S10:YES)には、一連の処理を完了する。上述の通り、「r」とはアドレス変換テーブル31を構成するテーブルの数を表している。
【0067】
以上のようにして、内部変数aがrに一致するまでステップS3〜ステップS10が繰り返し実行され、これによってアドレス変換テーブル31が完成する。すなわち、内部変数bがmに一致するまでステップS3〜S8からなるループを繰り返すことによって、一つのゾーンに関するアドレス変換情報が所定のテーブルに格納され、内部変数aがrに一致するまでステップS3〜S10からなるループを繰り返すことによって、全てのテーブルにアドレス変換情報が格納されることになる。具体的には、図10に示す動作を実行することにより、ゾーン#0〜ゾーン#r−1に関するアドレス変換情報がそれぞれテーブル#0〜#r−1に格納されたことになる。
【0068】
尚、上記例では、アドレス変換テーブル31にアドレス変換情報を格納する対象としてゾーン#0〜ゾーン#r−1を選択しているが、本動作はコントローラ3に対する電源投入直後またはリセット直後に実行されるアドレス変換テーブル31の新規作成動作であることから、ゾーン#0〜ゾーン#r−1に限定されず、いずれのゾーンを対象としても構わない。
【0069】
また、アドレス変換テーブル31の新規作成動作が完了した後、或いは、アドレス変換テーブル31の新規作成動作と並行して、初期設定動作における他の動作、つまり、管理テーブル32の作成、優先リンク33の作成及び書き込みキュー34の作成が行われる。
【0070】
すなわち、管理テーブル32を構成するゾーン番号格納領域#0〜#r−1にはそれぞれゾーン番号として#0〜#r−1が格納され、これによりゾーン#0〜ゾーン#r−1に関するアドレス変換情報がそれぞれテーブル#0〜#r−1に格納されている旨が表示される。
【0071】
また、優先リンク33を構成するポインタ#0〜#r−2にはそれぞれ「1」〜「r−1」が格納され、ポインタ#r−1にはデータ「NULL」が格納される。これにより、テーブル#0〜#r−1の優先順位はこの順となる。但し、現時点ではまだ実際にアクセスがされておらず、優先順位を決める手がかりがないことから、ここで決定した優先順位はあくまで暫定的なものである。したがって、テーブル#0〜#r−1の優先順位としてはこの順とすることは必須ではなく、これと異なる順序としても構わない。
【0072】
そして、ゾーン#0〜#r−1に含まれる消去済みブロックが一つずつ選ばれ、その物理ブロックアドレスが書き込みキュー34を構成するキュー#0〜#r−1に登録される。
【0073】
以上により、電源投入またはリセット動作に応答したコントローラ3の初期設定動作が完了する。
【0074】
次に、アドレス変換テーブル31等が作成された後、すなわち初期設定が完了した後におけるフラッシュメモリ2へのアクセス方法について、データの読み出し動作及びデータの書き込み動作の順に説明する。また、データの書き込み動作については、データが全く割り当てられていない論理ブロックアドレスに対して新規にデータを割り当てる場合(データの新規書込動作)と、既にデータが割り当てられている論理ブロックアドレスに対して追加して或いは重ねてデータを割り当てる場合(データの上書き動作)に分けて説明する。
【0075】
まず、データの読み出し動作について説明する。
【0076】
図11は、データの読み出し動作を示すフローチャートである。かかる動作も、CPU4がROM6に格納されているファームウェアを実行することによって行われる。
【0077】
データの読み出し動作において、ホストコンピュータよりホストアドレスが供給されると、CPU4はまず、READY/BUSY信号(図1参照)をBUSY状態とするとともに、ホストアドレスに基づいてゾーンアドレス、論理ブロックアドレス及びページアドレスを作成する(ステップS11)。具体的には、ホストアドレスの上位ビットをm’(1ゾーンに含まれる実使用ブロック数)で除算し、その商に基づいてゾーンアドレスを特定するとともに、剰余に基づいて論理ブロックアドレスを特定する。一例として、フラッシュメモリ2が8個(p=23)のゾーンに分割されており、各ゾーンが1024個(m=210)のブロックからなり、さらに、一つのブロックが32個(k=25)のページからなる場合、少なくとも18ビットのホストアドレスが用いられ、その上位13ビットをm’(例えば1000)で除することにより得られる商がゾーンアドレスとなり、剰余が論理ブロックアドレスとなる。また、ホストアドレスの下位5ビットがそのままページアドレスとなる。
【0078】
次に、CPU4は、RAM5内に作成された管理テーブル32を参照することによって、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されているか否かを判断する(ステップS12)。ここで、アクセスすべきゾーンとは、ステップS11において得られたゾーンアドレスによって特定され、ゾーンアドレスと同じ番号を持つゾーンが該当する。また、上記判断は、管理テーブル32を構成するゾーン番号格納領域#0〜#r−1のいずれかにゾーンアドレスと同じ値が格納されているか否かによって行われ、これが格納されている場合には、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていると判断され、格納されていない場合には、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていないと判断される。
【0079】
その結果、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていると判断された場合(S12:YES)、さらにCPU4は、アクセスすべきゾーンに対応するテーブルが完全であるか不完全であるかを判断する(ステップS13)。ここで、アクセスすべきゾーンに対応するテーブルとは、ゾーンアドレスと同じ値が格納されていたゾーン番号格納領域と同じ番号を持つテーブルを指す。例えば、ゾーンアドレスと同じ値がゾーン番号格納領域#1に格納されていた場合には、完全であるか否かが判断されるテーブルはテーブル#1となる。テーブルが完全であるか否かの具体的な判断方法としては特に限定されず、例えば、テーブルが完全であるか否かを示すフラグを設けこれを参照することによって行うことができる。
【0080】
その結果、アクセスすべきゾーンに対応するテーブルが完全であると判断された場合(S13:YES)、CPU4はかかるテーブルを参照することにより論理ブロックアドレスを物理ブロックアドレスに変換する(ステップS14)。具体的なアドレス変換の方法は次の通りである。すなわち、選択されたテーブルの中から、領域番号が論理ブロックアドレスに一致する物理ブロックアドレス格納領域にアクセスし、ここに格納されている物理ブロックアドレスを読み出すことにより変換を行う。尚、本例はデータの読み出し動作であり、当該ホストアドレスに対応するブロックには原則としてユーザデータが割り当てられているはずであるから、対応するフラグは「0(有効)」となっているはずである。但し、ホストコンピュータによっては、ユーザデータの割り当てられていないホストアドレスに対して読み出し要求を行う場合もある。
【0081】
一方、ステップS12において、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていないと判断された場合には(S12:NO)、テーブルの更新動作が実行される。テーブルの更新動作については後述する。
【0082】
また、ステップS13において、アクセスすべきゾーンに対応するテーブルが不完全であると判断された場合には(S13:NO)、テーブルの完成動作が実行される。テーブルの完成動作についても後述する。
【0083】
次にCPU4は、上記ゾーンアドレス、アドレス変換テーブル31から読み出された物理ブロックアドレス及び上記ページアドレスに基づいてフラッシュメモリ2にアクセスし、対応するページに格納されているデータを読み出す(ステップS15)。この場合、アクセスされるブロックはゾーンアドレス及び物理ブロックアドレスによって特定され、アクセスされるページはページアドレスによって特定される。
【0084】
そして、読み出したデータをFIFO7に一時的に格納し、READY/BUSY信号をREADY状態とする(ステップS16)。READY状態とは、コントローラ3が待ち状態であり、ホストコンピュータからのアクセスを受け付け可能であることを意味し、ホストコンピュータはこれに応答してFIFO7に格納されているユーザデータを読み出す。ホストコンピュータがFIFO7に格納されているユーザデータを読み出す際には、そのデータ転送は一般に1バイトずつ実行される。したがって、1ページが512バイトのユーザデータからなる場合、ホストコンピュータは512回の読み出しを実行することによって一連のデータ転送を完了する。
【0085】
この間、CPU4は優先リンク33の更新を行う(ステップS17)。優先リンク33の具体的な更新手順は次の通りである。まず、いま使用されたテーブル(アクセスされたゾーンに対応するテーブル)のテーブル番号と同じ値が格納されているポインタに、いま使用されたテーブルのテーブル番号と同じ番号を持つポインタに格納されている値を上書きする。次に、いま使用されたテーブルのテーブル番号と同じ番号を持つポインタに、現在最も優先順位の高いテーブルのテーブル番号をリンク先ポインタ番号として上書きする。これにより優先リンク33の更新が完了し、いまアクセスされたゾーンに対応するテーブルの優先順位が最も高くなる。
【0086】
具体例を用いて説明すると、アドレス変換テーブル31を構成するテーブルの数(=優先リンク33を構成するポインタの数)であるrが「4」であり、上記初期設定動作が完了した直後の状態(ポインタ#0〜#2にそれぞれ「1」〜「3」が格納され、ポインタ#3にデータ「NULL」が格納されている状態)においてテーブル#2が使用された場合、いま使用されたテーブルのテーブル番号である「2」が格納されているポインタ#1に、いま使用されたテーブルのテーブル番号である「2」と同じ番号を持つポインタ#2に格納されている値「3」を上書きする。そして、いま使用されたテーブルのテーブル番号である「2」と同じ番号を持つポインタ#2に、現在最も優先順位の高いテーブルのテーブル番号である「0」を上書きする。これによりポインタ#0〜#3の内容はそれぞれ「1」、「3」、「0」及び「NULL」となるので、テーブル#0〜#3の優先順位はテーブル#2、#0、#1、#3の順となる。
【0087】
さらにCPU4は、今アクセスされたゾーンの次のゾーンに関するアドレス変換情報がアドレス変換テーブル31に格納されているか否かを判断する(ステップS18)。ここで、今アクセスされたゾーンの次のゾーンとは、ホスト側から見て今アクセスされたゾーンの次に位置するゾーンをいい、今アクセスされたゾーンをゾーン#q(qは0〜p−1のいずれか)とすれば、ゾーン#q+1を指す。したがって、今アクセスされたゾーンが最終ゾーンであるゾーン#p−1である場合には、次のゾーンは存在しない。また、上記判断はステップS12における判断と同様、管理テーブル32を構成するゾーン番号格納領域#0〜#r−1のいずれかに値「q+1」が格納されているか否かによって行われ、これが格納されている場合には、次のゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていると判断され、格納されていない場合には、次のゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていないと判断される。ここで、次のゾーンに関するアドレス変換情報がアドレス変換テーブル31に格納されているか否かを判断する理由は、後述するように、あるゾーンに対するデータの読み出しが行われた場合、その後、続けて次のゾーンに対するデータの読み出しが要求される可能性が高いことから、次のゾーンに対するデータの読み出しが実際に要求される前に、アドレス変換テーブル31を投機的に更新しておくためである。
【0088】
その結果、次のゾーンに関するアドレス変換情報がアドレス変換テーブル31に格納されていると判断された場合(S18:YES)には、当該次のゾーンに対応するテーブルが完全であるか不完全であるかを判断する(ステップS19)。その結果、次のゾーンに対応するテーブルが不完全であると判断された場合には(S19:NO)、後述するテーブルの完成動作が実行される。ステップS19において次のゾーンに対応するテーブルが完全であると判断された場合には(S19:YES)、一連の処理を完了する。
【0089】
一方、ステップS18において、次のゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていないと判断された場合には(S18:NO)、テーブルの更新動作が実行される。
【0090】
次に、テーブルの更新動作について説明する。
【0091】
図12は、テーブルの更新動作を示すフローチャートである。上述の通り、テーブルの更新動作は、図11に示すステップS12において、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていないと判断された場合や、図11に示すステップS18において、今アクセスされたゾーンの次のゾーンに関するアドレス変換情報がアドレス変換テーブル31に格納されていないと判断された場合に実行される。かかる動作も、CPU4がROM6に格納されているファームウェアを実行することによって行われる。
【0092】
テーブルの更新動作においては、CPU4はまず、RAM5内に作成された優先リンク33を参照することによって、優先順位の最も低いテーブルを特定する(ステップS21)。ここで、優先順位の最も低いテーブルの特定は、優先リンク33を構成するポインタ#0〜#r−1のうち、データ「NULL」が格納されているポインタを探すことにより行われ、データ「NULL」が格納されているポインタのポインタ番号と同じ番号を持つテーブルが優先順位の最も低いテーブルであると判断される。以下、新たにアドレス変換情報が格納されるゾーンのゾーンアドレスを「c」として説明を続ける。ここで、新たにアドレス変換情報が格納されるゾーンとは、図11に示すステップS12から分岐した場合(S12:NO)においてはアクセスすべきゾーン(ステップS11において得られたゾーンアドレスに対応するゾーン)を指し、図11に示すステップS18から分岐した場合(S18:NO)においては今アクセスされたゾーンの次のゾーンを指す。
【0093】
次に、CPU4は管理テーブル32の内容を更新し、ステップS21において優先順位が最も低いと判断されたテーブルと新たにアドレス変換情報が格納されるゾーンとを関連づける(ステップS22)。すなわち、対応するゾーン番号格納領域に「c」を格納する。
【0094】
次いで、CPU4は、内部変数dの値を0にリセットし(ステップS23)、ブロック番号が
c×m+d
に一致するブロックの先頭ページ(ページ#0)に格納されている論理ブロックアドレスを読み出す(ステップS24)。この場合、内部変数d=0であるから、新たにアドレス変換情報が格納されるゾーンの先頭ブロック#(c×m)のページ#0に格納されている論理ブロックアドレスが読み出されることになる。
【0095】
次に、CPU4は、読み出された論理ブロックアドレスが「オール1」であるか否か、すなわちm−1であるかを判断し(ステップS25)、その結果、読み出された論理ブロックアドレスが「オール1(=m−1)」以外であれば(S25:NO)、ステップS21において優先順位が最も低いと判断されたテーブルのうち、フラグ番号が論理ブロックアドレスに一致するフラグを「0」に書き替える(ステップS26)とともに、領域番号が論理ブロックアドレスに一致する物理ブロックアドレス格納領域に内部変数dを格納する(ステップS27)。一方、ステップS25において、読み出された論理ブロックアドレスが「オール1(=m−1)」であれば(S25:YES)、ステップS21において優先順位が最も低いと判断されたテーブルのうち、フラグ番号が論理ブロックアドレスに一致するフラグを「1」に書き替える(ステップS28)。
【0096】
そして、CPU4は、内部変数dをインクリメントした後(ステップS29)、内部変数dがmに一致しているか否かを判断し(ステップS30)、その結果、内部変数dがmではない場合(S30:NO)にはステップS24に戻って、内部変数d等を用いた論理ブロックアドレスの読み出しを行う。一方、内部変数dがmに一致している場合(S30:YES)には、テーブルの更新動作を完了し、図11に示すステップS12から分岐した場合(S12:NO)においてはステップS14に復帰し、図11に示すステップS18から分岐した場合(S18:NO)においては一連の処理を終了する。
【0097】
以上のようにして、内部変数dがmに一致するまでステップS24〜ステップS30からなるループを繰り返すことによって、優先順位が最も低いテーブルの内容が、アクセス対象となるゾーンに関するアドレス変換情報に更新される。
【0098】
尚、上記例では、優先順位が最も低いテーブルに対応するゾーンがどのゾーンであるかに関わらず当該テーブルの内容を更新しているが、優先順位が最も低いテーブルに対応するゾーンが先頭ゾーンであるゾーン#0である場合には、優先順位が次に低いテーブルを更新対象とすることが好ましい。これは、上述の通り、先頭ゾーンであるゾーン#0にはアクセス頻度の高いファイルが格納されることが多く、このため、ゾーン#0に関するアドレス変換情報を破棄するとパフォーマンスが低下するおそれがあるからである。
【0099】
また、テーブルの更新動作が完了した後、或いは、テーブルの更新動作と並行して書き込みキュー34の作成が行われる。すなわち、ゾーン#cに含まれる消去済みブロックが一つ選ばれ、その物理ブロックアドレスが書き込みキュー34を構成するキュー#0〜#r−1のうち、更新されたテーブルに対応するキューに登録される。
【0100】
さて、図12に示すテーブルの更新動作は、図11に示すステップS12から分岐した場合(S12:NO)においてはステップS30において内部変数dがmに一致していると判断されるまで実行されるが、図11に示すステップS18から分岐した場合(S18:NO)においては、既にステップS16でREADY/BUSY信号がREADY状態とされているので、ホストコンピュータからの次のアクセスを受ける可能性がある。さらに、ホストコンピュータより要求されたデータの読み出し(図11)が連続する複数ページを対象としている場合、FIFO7に格納されたデータの転送が完了すると、コントローラ3は次のページに対するデータの読み出しを開始する必要がある。このような場合には、図12に示すテーブルの更新動作を一旦中断し、コントローラ3は、ホストコンピュータから新たに要求された処理(例えば、次のデータ読み出し処理)や次のページに対するデータの読み出しを実行する。テーブルの更新動作を中断する場合には、RAM5内に内部変数dを保存しておく必要がある。不完全なテーブルが発生するのは、主にこのような理由によるものである。
【0101】
そして、この中断がホストコンピュータから次のアクセスを受けたためである場合、要求された処理が同じゾーンに対する読み出し処理であれば、これを実行しREADY/BUSY信号を再びREADY状態とした後に、中断したテーブルの更新動作を再開すればよい。また、この中断がホストコンピュータから次のアクセスを受けたためであって、要求された処理が次のゾーン、すなわち対応するテーブルが不完全な状態となっているゾーンに対する読み出し処理であれば、図11に示すステップS13においてテーブルが不完全であると判断されて(S13:NO)、後述するテーブルの完成動作が行われる。但し、ホストコンピュータから要求された処理が、同じゾーン及び次のゾーンのいずれでもないゾーンに対する読み出し処理であれば、かかる不完全なテーブルの内容は破棄される。
【0102】
また、この中断が次のページに対するデータの読み出しを行うためである場合には、次のページのデータが読み出されFIFO7に格納されたことに応答して中断したテーブルの更新動作を再開すればよい。この様子をタイミング図を用いてより詳細に説明する。
【0103】
図13は、ホストコンピュータより要求されたデータの読み出しが連続する複数ページを対象としている場合における、テーブルの更新動作の中断/再開のタイミングを示すタイミング図である。
【0104】
図13に示すように、まずホストコンピュータよりアドレス及びコマンドが発行され、コントローラ3がこれを受信すると(アドレス受信、コマンド受信)、READY/BUSY信号がREADY状態からBUSY状態に変化し、内部アドレスが生成される(アドレス生成)。ここで、ホストコンピュータより供給されるアドレスは、読み出し対象となる複数ページのうち先頭のページを特定するためのアドレスであり、ホストコンピュータより供給されるコマンドは、読み出し命令であることを示すとともに、読み出しを行うべきページ数(例えば、前記先頭ページから100ページ等)を特定するためのコマンドである。また、アドレス生成とは、図11に示すステップS11〜S14に対応する動作であり、上述の通り、必要なアドレス変換情報がアドレス変換テーブル31内に格納されていない場合には(S12:NO)、図12に示すテーブルの更新動作が含まれることになる。また、参照すべきテーブルが不完全である場合には(S13:NO)、後述するテーブルの完成動作が含まれることになる。
【0105】
内部アドレスが生成されると、これを用いて実際にフラッシュメモリ2への読み出しが実行され、読み出されたユーザデータがFIFO7に格納される(Read)。かかる動作は、図11に示すステップS15及びS16に対応する動作である。
【0106】
ユーザデータがFIFO7に格納されると、READY/BUSY信号がREADY状態に変化し、ホストコンピュータはこれに応答してFIFO7に格納されたデータの読み出しを行う。すなわち、フラッシュメモリ2からホストコンピュータへのデータ転送が行われる。この間、次のゾーンに関するアドレス変換情報をアドレス変換テーブル31に格納するためのテーブルの更新動作が行われる(テーブル更新)。ホストコンピュータへのデータ転送速度やフラッシュメモリ2及びコントローラ3の動作速度にもよるが、一般的には、1ページ分のデータをホストコンピュータに転送する間にテーブルの更新動作を完了することは困難である。すなわち、テーブルの更新動作の途中でホストコンピュータへのデータ転送が完了するため、コントローラ3はテーブルの更新動作を中断して、次のページに対するデータの読み出し及びFIFO7への格納を行う必要がある。
【0107】
このようにして、実際の読み出し動作(Read)とテーブルの更新動作(テーブル更新)とを交互に行うことにより、本来コントローラ3にとって空き時間となるデータ転送期間を活用して、次のゾーンに関するアドレス変換情報の一部又は全部をアドレス変換テーブル31に投機的に格納しておくことが可能となる。
【0108】
ここで、次のゾーンに関するアドレス変換情報をアドレス変換テーブル31に格納しておくのは、あるゾーンに対するデータの読み出しが行われた場合、その後、次のゾーンに対するデータの読み出しが要求される可能性が高いためであり、実際に次のゾーンに対するデータの読み出しが要求された場合におけるパフォーマンスを向上させるためである。すなわち、空き時間となるデータ転送期間を活用して次のゾーンに関するアドレス変換情報の一部又は全部をアドレス変換テーブル31に格納しておけば、実際に次のゾーンに対するデータの読み出しが要求された場合に、図11に示すステップS12において必要なアドレス変換情報が格納されていると判断されることから(S12:YES)、一連のデータ読み出し動作を高速に完了することが可能となる。
【0109】
但し、投機的なテーブルの更新動作が完全に終了する前に、次のゾーンに対するデータの読み出しが実際に要求された場合においては、当該ゾーンに関するアドレス変換情報の一部のみが所定のテーブルに格納された状態、すなわちテーブルが不完全な状態となっていることから(S13:NO)、次に説明するテーブルの完成動作を行う必要がある。
【0110】
図14は、テーブルの完成動作を示すフローチャートである。上述の通り、テーブルの完成動作は、図11に示すステップS13において、アクセスすべきゾーンに対応するテーブルが不完全であると判断された場合に実行される。かかる動作も、CPU4がROM6に格納されているファームウェアを実行することによって行われる。
【0111】
テーブルの完成動作においては、CPU4はまず、RAM5内に保存された内部変数dの値をロードし(ステップS31)、ブロック番号が
c×m+d
に一致するブロックの先頭ページ(ページ#0)に格納されている論理ブロックアドレスを読み出す(ステップS32)。かかる動作は、図12に示したステップS24と同様である。
【0112】
次に、CPU4は、読み出された論理ブロックアドレスが「オール1」であるか否か、すなわちm−1であるかを判断し(ステップS33)、その結果、読み出された論理ブロックアドレスが「オール1(=m−1)」以外であれば(S33:NO)、対象テーブルのうちフラグ番号が論理ブロックアドレスに一致するフラグを「0」に書き替える(ステップS34)とともに、領域番号が論理ブロックアドレスに一致する物理ブロックアドレス格納領域に内部変数dを格納する(ステップS35)。一方、ステップS33において、読み出された論理ブロックアドレスが「オール1(=m−1)」であれば(S33:YES)、対象テーブルのうち、フラグ番号が論理ブロックアドレスに一致するフラグを「1」に書き替える(ステップS36)。上記ステップS33〜S36の動作は、図12に示したステップS25〜S28と同様である。
【0113】
そして、CPU4は、内部変数dをインクリメントした後(ステップS37)、内部変数dがmに一致しているか否かを判断し(ステップS38)、その結果、内部変数dがmではない場合(S38:NO)にはステップS32に戻って、内部変数d等を用いた論理ブロックアドレスの読み出しを行う。一方、内部変数dがmに一致している場合(S38:YES)には、テーブルの完成動作を完了し、図11に示すステップS14に復帰する。上記ステップS37及びS38の動作は、図12に示したステップS29及びS30と同様である。
【0114】
以上のようにして、内部変数dがmに一致するまでステップS32〜ステップS38からなるループを繰り返すことによって、不完全であったテーブルが完成し、アドレス変換が可能な状態となる。
【0115】
また、テーブルの完成動作が完了した後、或いは、テーブルの完成動作と並行して、書き込みキュー34の作成が行われる。すなわち、現在アクセスされているゾーンに含まれる消去済みブロックが一つ選ばれ、その物理ブロックアドレスが書き込みキュー34を構成するキュー#0〜#r−1のうち、対象テーブルに対応するキューに登録される。
【0116】
このように、投機的なテーブルの更新動作が完全に終了する前に、次のゾーンに対するデータの読み出しが実際に要求された場合においては、上述したテーブルの完成動作を行う必要があるが、かかるテーブルの完成動作は、内部変数dをロードしている分、図12に示すテーブルの更新動作よりも高速に完了することができる。このため、上記のようなケースであっても、対応するアドレス変換情報がアドレス変換テーブル31に全く格納されていない場合と比べて、一連のデータ読み出し動作を高速に行うことが可能となる。
【0117】
次に、データの書き込み動作について説明する。データの書き込み動作は、上述の通り、データの新規書込動作とデータの上書き動作に分けられることから、ホストコンピュータからデータの書き込み要求がなされた場合、まず、これがデータの新規書込であるのかデータの上書きであるのかの判断が行われる。
【0118】
図15は、かかる判断動作を示すフローチャートである。かかる動作も、CPU4がROM6に格納されているファームウェアを実行することによって行われる。
【0119】
データの書き込み動作において、ホストコンピュータよりホストアドレスが供給されると、CPU4はまず、ホストアドレスに基づいてゾーンアドレス、論理ブロックアドレス及びページアドレスを作成する(ステップS41)。その生成方法は上述の通りである。次に、CPU4は、RAM5内に作成された管理テーブル32を参照することによって、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されているか否かを判断する(ステップS42)。その判断方法についても上述した通りである。
【0120】
その結果、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていると判断された場合(S42:YES)、CPU4は、アクセスすべきゾーンに対応するテーブル内のフラグのうち、フラグ番号が論理ブロックアドレスに一致するフラグを読み出し(ステップS43)、その内容を参照することによって、当該論理ブロックアドレスに対応するブロックが既に割り当てられているか否かを判断する(ステップS44)。これは、本データの書き込み動作がデータの新規書込動作であるのか、或いはデータの上書き動作であるのかを判断することに等しい。
【0121】
その結果、読み出されたフラグが「1(無効)」であれば(S44:NO)、当該論理ブロックアドレスに対応するブロックがまだ割り当てられていない、すなわち、本データの書き込み動作がデータの新規書込動作であると判断することができるので、図16に示すデータの新規書込動作が実行され、逆に、読み出されたフラグが「0(有効)」であれば(S44:YES)、当該論理ブロックアドレスに対応するブロックが既に割り当てられている、すなわち、本データの書き込み動作がデータの上書き動作であると判断することができるので、図17に示すデータの上書き動作が実行される。
【0122】
一方、ステップS42において、アクセスすべきゾーンに関するアドレス変換情報がアドレス変換テーブル31内に格納されていないと判断された場合には(S42:NO)、図12に示したテーブルの更新動作が実行された後、上記ステップS43及びS44が実行される。
【0123】
まず、図16を用いてデータの新規書込動作について説明する。かかる動作も、CPU4がROM6に格納されているファームウェアを実行することによって行われる。
【0124】
データの新規書込動作においては、CPU4はまず、書き込みキュー34にアクセスし、対応するキューに格納されている物理ブロックアドレスを読み出す(ステップS51)。ここで、対応するキューとは、ステップS43においてフラグの読み出しを行ったテーブルのテーブル番号と同じ番号を有するキューを指す。
【0125】
次に、CPU4は、ゾーンアドレス、書き込みキュー34から読み出された物理ブロックアドレス及び上記ページアドレスに基づいてフラッシュメモリ2にアクセスし、対応するページ及び当該ブロックの先頭ページ(ページ#0)に必要なデータを格納する(ステップS52)。ここで、対応するページに格納すべきデータには少なくともユーザデータが含まれ、先頭ページ(ページ#0)に格納すべきデータには少なくとも論理ブロックアドレスが含まれる。このうちユーザデータは、対応するページのユーザ領域21に格納され、論理ブロックアドレスは、当該ブロックの先頭ページ(ページ#0)の論理ブロックアドレス格納領域23に格納される。
【0126】
そして、CPU4は、アドレス変換テーブル31、優先リンク33及び書き込みキュー34の内容を更新する(ステップS53、S54、S55)。具体的には、アドレス変換テーブル31の更新については、対応するテーブルにおいてフラグ番号が論理ブロックアドレスに一致するフラグの値を「0(有効)」に書き替えるとともに、対応する物理ブロックアドレス格納領域に書き込みキュー34から読み出された物理ブロックアドレスを格納する。また、優先リンク33の更新については、ステップS17における動作と同様である。さらに、書き込みキュー34の更新については、アクセスしたゾーンに含まれる別の消去済みの空きブロックの物理ブロックアドレスを前記キューに上書きすることにより行う。
【0127】
以上によりデータの新規書込動作が完了する。
【0128】
尚、アドレス変換テーブル31、優先リンク33及び書き込みキュー34の更新は、図16に示す順に行う必要はなく、これとは異なる順で行っても構わない。
【0129】
次に、図17を用いてデータの上書き動作について説明する。かかる動作も、CPU4がROM6に格納されているファームウェアを実行することによって行われる。
【0130】
データの上書き動作においては、CPU4はまず、対応するテーブル内の物理ブロックアドレス格納領域のうち、領域番号が論理ブロックアドレスに一致する物理ブロックアドレス格納領域にアクセスし、ここに格納されている物理ブロックアドレスを読み出す(ステップS61)。以下、ステップS61において得られた物理ブロックアドレスを「転送元ブロックアドレス」と呼ぶ。
【0131】
次に、CPU4は、書き込みキュー34にアクセスし、対応するキューに格納されている物理ブロックアドレスを読み出す(ステップS62)。以下、ステップS62において得られた物理ブロックアドレスを「転送先ブロックアドレス」と呼ぶ。
【0132】
次に、CPU4は、内部変数eの値を0にリセットし(ステップS63)、内部変数eの値がページアドレスと一致しているか否かを判断する(ステップS64)。その結果、内部変数eの値がページアドレスと一致していれば(S64:YES)、ゾーンアドレス、転送先ブロックアドレス及びページアドレスに基づいてフラッシュメモリ2にアクセスし、対応するページに必要なデータを格納する(ステップS65)。ここで、対応するページに格納されるデータには少なくともユーザデータが含まれ、かかるユーザデータは、対応するページのユーザ領域21に格納される。一方、内部変数eの値がページアドレスと一致していなければ、「ブロック間転送」が行われる(ステップS66)。ブロック間転送においては、ゾーンアドレス及び転送元ブロックアドレスにより特定されるブロック内の内部変数eにより特定されるページの内容が、ゾーンアドレス及び転送先ブロックアドレスにより特定されるブロック内の内部変数eにより特定されるページに転送される。尚、内部変数eが「0」である場合には、ステップS65が実行されるかステップS66が実行されるかに関わらず、ゾーンアドレス及び転送先ブロックアドレスにより特定されるブロックの先頭ページ(ページ#0)の論理ブロックアドレス格納領域23に論理ブロックアドレスが格納される。
【0133】
次に、CPU4は、内部変数eをインクリメントした後(ステップS67)、内部変数eがkに一致しているか否かを判断し(ステップS68)、その結果、内部変数eがkではない場合にはステップS64に戻って内部変数eとページアドレスとの比較を行い、内部変数eがkに一致している場合には、後述するステップが実行される。上述の通り、「k」とは1ブロックに含まれるページ数である。以上のようにして、内部変数eがkに一致するまでステップS64〜ステップS68が繰り返し実行され、これによって、ホストコンピュータより与えられたユーザデータが転送先のブロックの所定のページに書き込まれるとともに、転送元のブロック内に格納されていた上書き対象外のデータが転送先のブロックの同じページに書き込まれることになる。
【0134】
ステップS68において内部変数eがkに一致した場合、CPU4は、アドレス変換テーブル31、優先リンク33及び書き込みキュー34の内容を更新する(ステップS69〜S71)。かかる動作は上述したステップS53〜S55と同様である。したがって、アドレス変換テーブル31、優先リンク33及び書き込みキュー34の更新は、図17に示す順に行う必要はなく、これと異なる順序で行っても構わない。
【0135】
そして、CPU4は、ゾーンアドレス及び転送元ブロックアドレスにより特定されるブロックをブロック消去し(ステップS72)、一連のデータの上書き動作が完了する。
【0136】
以上説明したように、本実施態様においては、一部のブロックに関するアドレス変換情報のみをアドレス変換テーブルに展開するとともに、あるゾーンに対してデータの読み出しが要求されたことに応答して次のゾーンに関するアドレス変換情報の作成を開始していることから、実際に次のゾーンに対するアクセスが要求された場合であっても、当該ゾーンに関するアドレス変換情報を初めから作成する必要がない。すなわち、従来のフラッシュメモリシステムにおいては、次のゾーンに関するアドレス変換情報がアドレス変換テーブル内に格納されていない場合には、このゾーンに対するアクセスが要求されると、このゾーンを構成する全てのブロックに対して読み出しを行うことによりアドレス変換情報を初めから作成する必要があるが、本実施態様においてはこれを初めから作成する必要がないので、BUSY状態となる期間を短縮することができる。このため、実使用時において要求されることの多い、連続するホストアドレスに対するデータの読み出しを高速に行うことが可能となるので、アドレス変換テーブルの容量を節約しつつ、パフォーマンスの低下を効果的に抑制することが可能となる。
【0137】
本発明は、以上の実施態様に限定されることなく、特許請求の範囲に記載された発明の範囲内で種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることはいうまでもない。
【0138】
例えば、上記実施態様では、アドレス変換テーブル31内に次のゾーンに関するアドレス変換情報が格納されているか否かを、データの読み出し時において常に判断しているが(ステップS18)、これを所定の条件下においてのみ行っても構わない。例えば、データの読み出し対象ブロックの対応論理ブロックアドレスが所定値以上である場合にのみかかる判断を行い、対応論理ブロックアドレスが所定値未満である場合にはこれを省略しても構わない。このような条件を設ければ、投機的なテーブル作成が必要以上に早期に行われることがないので、アドレス変換テーブル31に現在格納されているテーブルの内容が不必要に破棄される可能性を低くすることができる。したがってこの場合には、しきい値となる上記対応論理ブロックアドレスの所定値をテーブル作成に必要な時間等を考慮して決定することが好ましい。
【0139】
また、本発明において、手段とは、必ずしも物理的手段を意味するものではなく、各手段の機能がソフトウエアによって実現される場合も包含する。さらに、一つの手段の機能が二以上の物理的手段により実現されても、二以上の手段の機能が一つの物理的手段により実現されてもよい。
【0140】
尚、本発明は、PCMCIA(Personal Computer Memory Card International Association)が発表した統一規格に基づくPCカードとして実現することが可能である。さらに、近年、半導体素子の高集積化技術の発展に伴い、より小型化された小型メモリカード、例えば、CFA(CompactFlash Association)が提唱する「CompactFlash」や、MultiMediaCardAssociationの提唱する「MMC(MultiMediaCard)」、ソニー株式会社が提唱する「メモリースティック」、松下電器産業株式会社等が提唱する「SDメモリーカード」などに本発明を適用することが可能である。
【0141】
【発明の効果】
以上説明したように、本発明によれば、アドレス変換テーブルの容量を節約しつつ、パフォーマンスの低下を効果的に抑制することが可能となる。しかも、本発明においては、コントローラが本来待ち状態となる期間にアドレス変換情報の投機的な作成作業を行っていることから、この作業によってフラッシュメモリシステムのパフォーマンスを低下させることがない。
【0142】
したがって、本発明は、コントローラが本来待ち状態となる期間が長い場合、例えば、ホストコンピュータの動作が遅い場合や、FIFOの容量が小さい場合において特に効果的である。
【図面の簡単な説明】
【図1】本発明の好ましい実施態様にかかるフラッシュメモリシステム1の構成を概略的に示すブロック図である。
【図2】消去状態であるメモリセル10を概略的に示す断面図である。
【図3】書込状態であるメモリセル10を概略的に示す断面図である。
【図4】フラッシュメモリ2のアドレス空間の構造を概略的に示す図である。
【図5】冗長領域22のデータ構造を概略的に示す図である。
【図6】アドレス変換テーブル31のデータ構造を示す図である。
【図7】管理テーブル32のデータ構造を示す図である。
【図8】優先リンク33のデータ構造を示す図である。
【図9】書き込みキュー34のデータ構造を示す図である。
【図10】アドレス変換テーブル31の新規作成方法を示すフローチャートである。
【図11】データの読み出し動作を示すフローチャートである。
【図12】テーブルの更新動作を示すフローチャートである。
【図13】ホストコンピュータより要求されたデータの読み出しが連続する複数ページを対象としている場合における、テーブルの更新動作の中断/再開のタイミングを示すタイミング図である。
【図14】テーブルの完成動作を示すフローチャートである。
【図15】ホストコンピュータからデータの書き込み要求がデータの新規書込であるのかデータの上書きであるのかを判断するためのフローチャートである。
【図16】データの新規書込動作を示すフローチャートである。
【図17】データの上書き動作を示すフローチャートである。
【符号の説明】
1 フラッシュメモリシステム
2 フラッシュメモリ
3 コントローラ
4 CPU
5 RAM
6 ROM
7 FIFO
10 メモリセル
11 P型半導体基板
12 ソース拡散領域
13 ドレイン拡散領域
14 トンネル酸化膜
15 フローティングゲート電極
16 絶縁膜
17 コントロールゲート電極
18 チャネル
21 ユーザ領域
22 冗長領域
23 論理ブロックアドレス格納領域
24 その他の付加情報を格納するための領域
31 アドレス変換テーブル
32 管理テーブル
33 優先リンク
34 書き込みキュー[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a memory controller and a memory system including the memory controller, and more particularly to a memory controller for controlling a flash memory and a memory system including the memory controller. The present invention also relates to a flash memory control method.
[0002]
[Prior art]
In recent years, flash memories, particularly NAND flash memories, are often used as semiconductor memories used for memory cards, silicon disks, and the like. In the NAND flash memory, when a memory cell is changed from an erased state (logical value = 1) to a written state (logical value = 0), this can be performed in units of memory cells. When changing from the written state (0) to the erased state (1), this cannot be performed in units of memory cells, and this can be performed only in units of blocks composed of a plurality of memory cells. Such a batch erase operation is generally called “block erase”.
[0003]
As described above, in the flash memory, since the memory cell can be changed from the write state (0) to the erase state (1) only in units of blocks, new data can be obtained for the logical address to which data has already been assigned. Even if the old data is overwritten, the new data cannot be directly overwritten on the block storing the old data. For this reason, when the host computer instructs the logical address to which data has already been assigned to overwrite the new data, the data that is not overwritten in the block in which the old data is stored is transferred to the erased block. In addition, a process of writing new data to the erased block is required. Such processing is called “inter-block transfer”, and is executed each time an instruction to overwrite data is given from the host computer. After the inter-block transfer is performed, the transfer source block is erased by a block, whereby the transfer source block becomes a new erased block.
[0004]
Therefore, the relationship between the logical address and the physical address uniquely assigned to each block is not fixed, and these relationships change dynamically every time data overwriting is instructed. For this reason, an address conversion table for maintaining the relationship between the logical address and the physical address is required in the controller for controlling the flash memory, and this is referred to every time data reading is requested from the host computer. Then, address conversion is performed and the contents are updated each time data writing is requested.
[0005]
However, since the recording capacity required for the address conversion table is proportional to the number of blocks to be controlled by the controller, a large capacity address conversion table is required when the number of blocks to be controlled is very large. Become. In addition, since an SRAM (Static Random Access Memory) is generally used for the address conversion table, the use of a large capacity address conversion table greatly increases the product cost of the controller.
[0006]
To solve this problem, instead of storing the address translation information for all the blocks to be controlled in the address translation table, store only the address translation information for some blocks in the address translation table. Is effective. For example, if the address conversion information stored in the address conversion table is only information relating to half of the blocks, the storage capacity required for the address conversion table can be halved, and the product cost of the controller can be reduced. Become.
[0007]
[Problems to be solved by the invention]
However, in the system in which only the address translation information relating to some blocks is developed in the address translation table, when data read is requested for a block in which the address translation information is not developed in the address translation table, the address translation table It is necessary to perform an update operation such as discarding a part of the data and newly storing address conversion information related to the block in the address conversion table. Of course, since the requested data cannot be read until the update operation is completed, the occurrence of the update operation causes the performance of the memory system to deteriorate.
[0008]
The occurrence frequency of such update work is determined by the ratio of the blocks in which the address translation information is stored in the address translation table. The smaller this ratio, the more frequently the update work occurs. In other words, the smaller the proportion of blocks that can store address translation information by saving the capacity of the address translation table, the lower the product cost and performance of the controller, and conversely, the capacity of the address translation table is reduced. As the proportion of blocks that can store address translation information increases, the controller product cost increases and the performance improves. That is, the product cost based on the capacity of the address conversion table and the performance are in a trade-off relationship, and it is difficult to satisfy both.
[0009]
Therefore, an object of the present invention is to provide a memory controller and a memory system including the memory controller that can effectively suppress a decrease in performance while saving the capacity of an address conversion table.
[0010]
Another object of the present invention is to provide a flash memory control method capable of effectively suppressing a decrease in performance while saving the capacity of an address conversion table.
[0011]
[Means for Solving the Problems]
The present inventionThe first point of viewBy the memory controller
A memory controller that accesses a flash memory that is erased in physical block units including a plurality of pages based on a host address in sector units given from a host system,
Zone management means for managing a correspondence relationship between a logical zone including a plurality of logical blocks composed of areas of a plurality of sectors to which the host address is allocated, and a physical zone including a plurality of the physical blocks;
First zone specifying means for specifying the logical zone to be accessed based on a host address given from the host system;
Second zone specifying means for specifying the logical zone including a host address subsequent to a host address included in the logical zone specified by the first zone specifying means;
Address conversion table holding means for holding a plurality of address conversion tables for each logical zone describing a correspondence relationship between the logical block included in the logical zone and the physical block included in the physical zone corresponding to the logical zone; ,
Priority management means for managing the priority order of the plurality of logical zone address translation tables held in the address translation table holding means;
First table presence / absence determining means for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified by the first zone specifying means is held in the address conversion table holding means; ,
When the determination by the first table presence / absence determining means is negative, an address conversion table for each logical zone corresponding to the logical zone specified by the first zone specifying means is created. 1 Address translation table creation means,
Second table presence / absence determining means for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified by the second zone specifying means is held in the address conversion table holding means; ,
Creating an address conversion table for each logical zone corresponding to the logical zone identified by the second zone identifying means when the second table presence / absence judging means is a negative judgment; An address translation table creation means;
Based on the address conversion table for each logical zone held in the address conversion table holding means, the physical block in the physical zone corresponding to the logical zone specified by the first zone specifying means is accessed. Access means to
With
The second address conversion table creating means is configured to interrupt the access to the physical block in the physical zone corresponding to the logical zone specified by the first zone specifying means. , Execute an address conversion table creation process for each logical zone,
The maximum number of address conversion tables for each logical zone that can be held by the address conversion table holding means is less than the total number of logical zones,
The address conversion table holding means holds the address conversion table for each logical zone that is not held in the address conversion table holding means when holding the maximum number of address conversion tables for each logical zone. When the address translation table creation unit or the second address translation table creation unit creates the address translation table holding unit, the address translation table holding unit is provided for each logical zone with the lowest priority managed by the priority management unit. In place of the address translation table, the address translation table for each logical zone created by the first address translation table creation means or the second address translation table creation means is held.
It is characterized by that.
[0013]
The flash memory system of the present invention includes a flash memory that is erased in units of physical blocks including a plurality of pages, and the above-described memory controller.
[0014]
In addition, the present invention2The flash memory control method according to this aspect is
A flash memory control method for controlling access to a flash memory that is erased in units of physical blocks including a plurality of pages, based on a sector-unit host address supplied from a host system,
A zone management step for managing a correspondence relationship between a logical zone including a plurality of logical blocks composed of areas of a plurality of sectors to which the host address is allocated, and a physical zone including a plurality of the physical blocks;
A first zone specifying step of specifying the logical zone to be accessed based on a host address given from the host system;
A first table presence / absence determining step for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified in the first zone specifying step is held in an address conversion table holding unit;
When the determination in the first table presence determination step is a negative determination, an address conversion table for each logical zone corresponding to the logical zone specified in the first zone specifying step is created, A first address conversion table creation step held in the address conversion table holding means;
Based on the address conversion table for each logical zone held in the address conversion table holding means, access to the physical block in the physical zone corresponding to the logical zone specified in the first zone specifying step An access step to
A second zone specifying step for specifying the logical zone including a host address subsequent to a host address included in the logical zone specified in the first zone specifying step;
A second table presence / absence determining step for determining whether an address conversion table for each logical zone corresponding to the logical zone specified in the second zone specifying step is held in an address conversion table holding unit;
When the determination in the second table presence determination step is a negative determination, an address conversion table for each logical zone corresponding to the logical zone specified in the second zone specifying step is created, A second address conversion table creation step held in the address conversion table holding means;
A priority order management step for managing a priority order for the plurality of logical zone address translation tables held in the address translation table holding means;
The address conversion table for each logical zone is a table describing a correspondence relationship between the logical block included in the logical zone and the physical block included in the physical zone corresponding to the logical zone.
The maximum number of address conversion tables for each logical zone that can be held by the address conversion table holding means is less than the total number of logical zones,
In the second address conversion table creation step, the data read from the flash memory is transferred to the host system in the access step of accessing the physical zone corresponding to the logical zone specified in the first zone specifying step. Run during the period
In the first address conversion table creating step and the second address conversion table creating step, the address conversion table holding unit holds the address when the maximum number of address conversion tables for each logical zone is held. When creating a new address conversion table for each logical zone that is not held in the conversion table holding means, the logical zone is newly created instead of the address conversion table for each logical zone with the lowest priority. Each address conversion table is held in the address conversion table holding means
It is characterized by that.
[0025]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0026]
FIG. 1 is a block diagram schematically showing a configuration of a
[0027]
The
n = 8192 (= 8K)
k = 32
In this case, the
[0028]
The
[0029]
Next, a specific structure of the memory cell included in the
[0030]
FIG. 2 is a cross-sectional view schematically showing the structure of each
[0031]
The
[0032]
As shown in FIG. 2, the erased state refers to a state where electrons are not injected into the floating
[0033]
FIG. 3 is a cross-sectional view schematically showing the
[0034]
Here, whether the selected
[0035]
When the
[0036]
Next, a specific configuration of the address space that the
[0037]
FIG. 4 is a diagram schematically showing the structure of the address space of the
[0038]
Further, as shown in FIG. 4, each
[0039]
Here, n blocks # 0 to # n-1 are divided into p zones consisting of
n = 8192 (= 8K)
p = 8
In this case, each zone is configured by m = 1024 blocks, and specifically, zone #q is configured by blocks # 1024q to # 1024q + 1023. The reason why the address space of the
[0040]
FIG. 5 is a diagram schematically showing the data structure of the
[0041]
The logical block
[0042]
The
[0043]
As described above, the
[0044]
Next, various tables created in the
[0045]
The various tables created in the
[0046]
The address conversion table is a table for holding the correspondence between the logical block address generated based on the host address and the physical block address uniquely assigned to each block, and has the following structure: Yes.
[0047]
FIG. 6 is a diagram showing the data structure of the address conversion table 31 created in the
[0048]
Each
[0049]
[0050]
The management table is a table for indicating which zone the address conversion information stored in each of the
[0051]
FIG. 7 is a diagram showing the data structure of the management table 32 created in the
[0052]
The priority link is an element indicating the priority order of the
[0053]
FIG. 8 is a diagram showing the data structure of the
[0054]
As described above, the number (r) of tables constituting the address translation table 31 is smaller than the number of zones (p) constituting the address space of the
[0055]
For this reason, priority is given to the
[0056]
That is, the
[0057]
Next, the table corresponding to the value (0 to r-1) stored in the pointer having the same number as the highest priority table becomes the second highest priority table. As in the above example, when the
[0058]
Similarly, the table corresponding to the value (0 to r-1) stored in the pointer having the same number as the second highest priority table becomes the third highest priority table. By sequentially performing the link work, it is possible to specify priorities for all the
[0059]
The write queue is a registration table of erased empty blocks, and has the following structure.
[0060]
FIG. 9 is a diagram showing the data structure of the
[0061]
Although the
[0062]
The above is the configuration of the flash memory system according to this embodiment. Next, the operation of the
[0063]
FIG. 10 is a flowchart showing a new creation method of the address conversion table 31. The new creation of the address conversion table 31 is an operation performed by the
[0064]
First, when the
a × m + b
The logical block address stored in the first page (page # 0) of the block that matches is read (step S3). As described above, “m” is a value (= n / p) obtained by dividing the total number of blocks n by the number of zones p (= n / p), and represents the number of blocks constituting one zone. In this case, since the internal variable a = b = 0, the logical block address stored in
[0065]
Next, the
[0066]
Then, after incrementing the internal variable b (step S7), the
[0067]
As described above, steps S3 to S10 are repeatedly executed until the internal variable a matches r, thereby completing the address conversion table 31. That is, by repeating the loop consisting of steps S3 to S8 until the internal variable b matches m, the address translation information relating to one zone is stored in a predetermined table, and steps S3 to S3 are repeated until the internal variable a matches r. By repeating the loop consisting of S10, the address conversion information is stored in all the tables. Specifically, by executing the operation shown in FIG. 10, the address conversion information related to
[0068]
In the above example,
[0069]
In addition, after the new creation operation of the address translation table 31 is completed, or in parallel with the new creation operation of the address translation table 31, other operations in the initial setting operation, that is, creation of the management table 32, priority link 33 A creation and write
[0070]
That is,
[0071]
Also, “1” to “r−1” are stored in the
[0072]
Then, erased blocks included in the
[0073]
Thus, the initial setting operation of the
[0074]
Next, a method of accessing the
[0075]
First, a data read operation will be described.
[0076]
FIG. 11 is a flowchart showing a data read operation. Such an operation is also performed by the
[0077]
In a data read operation, when a host address is supplied from the host computer, the
[0078]
Next, the
[0079]
As a result, when it is determined that the address conversion information related to the zone to be accessed is stored in the address conversion table 31 (S12: YES), the
[0080]
As a result, when it is determined that the table corresponding to the zone to be accessed is complete (S13: YES), the
[0081]
On the other hand, when it is determined in step S12 that the address conversion information regarding the zone to be accessed is not stored in the address conversion table 31 (S12: NO), the table update operation is executed. The table update operation will be described later.
[0082]
If it is determined in step S13 that the table corresponding to the zone to be accessed is incomplete (S13: NO), a table completion operation is executed. The table completion operation will also be described later.
[0083]
Next, the
[0084]
Then, the read data is temporarily stored in the
[0085]
During this time, the
[0086]
To explain using a specific example, r, which is the number of tables constituting the address conversion table 31 (= the number of pointers constituting the priority link 33) is “4”, and is a state immediately after the initialization operation is completed. When
[0087]
Further, the
[0088]
As a result, when it is determined that the address conversion information related to the next zone is stored in the address conversion table 31 (S18: YES), the table corresponding to the next zone is complete or incomplete. Is determined (step S19). As a result, when it is determined that the table corresponding to the next zone is incomplete (S19: NO), a table completion operation to be described later is executed. If it is determined in step S19 that the table corresponding to the next zone is complete (S19: YES), a series of processing is completed.
[0089]
On the other hand, if it is determined in step S18 that the address conversion information related to the next zone is not stored in the address conversion table 31 (S18: NO), the table update operation is executed.
[0090]
Next, the table update operation will be described.
[0091]
FIG. 12 is a flowchart showing the table update operation. As described above, the table update operation is performed when it is determined in step S12 shown in FIG. 11 that the address conversion information related to the zone to be accessed is not stored in the address conversion table 31, or in step S18 shown in FIG. When the address conversion information on the next zone after the currently accessed zone is determined not to be stored in the address conversion table 31, the process is executed. Such an operation is also performed by the
[0092]
In the table update operation, the
[0093]
Next, the
[0094]
Next, the
c × m + d
The logical block address stored in the first page (page # 0) of the block that matches is read (step S24). In this case, since the internal variable d = 0, the logical block address stored in
[0095]
Next, the
[0096]
Then, after incrementing the internal variable d (step S29), the
[0097]
As described above, by repeating the loop consisting of step S24 to step S30 until the internal variable d matches m, the contents of the table with the lowest priority are updated to the address conversion information related to the zone to be accessed. The
[0098]
In the above example, the contents of the table are updated regardless of which zone corresponds to the table with the lowest priority, but the zone corresponding to the table with the lowest priority is the first zone. In the case of a
[0099]
Further, the
[0100]
Now, when the table update operation shown in FIG. 12 branches from step S12 shown in FIG. 11 (S12: NO), it is executed until it is determined in step S30 that the internal variable d matches m. However, if the process branches off from step S18 shown in FIG. 11 (S18: NO), the READY / BUSY signal is already in the READY state in step S16, so there is a possibility of receiving the next access from the host computer. . Further, when the data requested by the host computer (FIG. 11) is for a plurality of continuous pages, the
[0101]
If this interruption is due to the next access from the host computer, if the requested process is a read process for the same zone, the process is executed and the READY / BUSY signal is again set to the READY state and then interrupted. The table update operation may be resumed. If this interruption is due to the next access from the host computer and the requested process is a read process for the next zone, that is, a zone in which the corresponding table is incomplete, FIG. In step S13, it is determined that the table is incomplete (S13: NO), and a table completion operation to be described later is performed. However, if the process requested by the host computer is a read process for a zone that is neither the same zone nor the next zone, the contents of the incomplete table are discarded.
[0102]
If the interruption is to read data for the next page, the updating operation of the interrupted table can be resumed in response to the data of the next page being read and stored in the
[0103]
FIG. 13 is a timing chart showing the timing of interrupting / resuming the table update operation when a plurality of pages in which data requested by the host computer is continuously read are targeted.
[0104]
As shown in FIG. 13, when an address and a command are first issued from the host computer and the
[0105]
When the internal address is generated, reading to the
[0106]
When the user data is stored in the
[0107]
In this way, by alternately performing the actual read operation (Read) and the table update operation (table update), the address related to the next zone is utilized by utilizing the data transfer period that is originally free for the
[0108]
Here, the address conversion information related to the next zone is stored in the address conversion table 31. When data is read from a certain zone, there is a possibility that data read from the next zone is requested thereafter. This is because the performance in the case where the reading of data for the next zone is actually requested is improved. In other words, if a part or all of the address conversion information related to the next zone is stored in the address conversion table 31 by utilizing the data transfer period which is a free time, the data reading for the next zone is actually requested. In this case, since it is determined in step S12 shown in FIG. 11 that necessary address conversion information is stored (S12: YES), a series of data read operations can be completed at high speed.
[0109]
However, if data reading for the next zone is actually requested before the speculative table update operation is completely completed, only a part of the address translation information related to the zone is stored in the predetermined table. In this state, that is, because the table is in an incomplete state (S13: NO), it is necessary to perform a table completion operation described next.
[0110]
FIG. 14 is a flowchart showing a table completion operation. As described above, the table completion operation is executed when it is determined in step S13 shown in FIG. 11 that the table corresponding to the zone to be accessed is incomplete. Such an operation is also performed by the
[0111]
In the table completion operation, the
c × m + d
The logical block address stored in the first page (page # 0) of the block that matches is read (step S32). This operation is the same as step S24 shown in FIG.
[0112]
Next, the
[0113]
Then, after incrementing the internal variable d (step S37), the
[0114]
As described above, by repeating the loop consisting of step S32 to step S38 until the internal variable d matches m, the incomplete table is completed and the address can be converted.
[0115]
Further, after the completion operation of the table is completed, or in parallel with the completion operation of the table, the
[0116]
As described above, when the reading of data for the next zone is actually requested before the speculative table update operation is completely completed, it is necessary to perform the above-described table completion operation. The table completion operation can be completed faster than the table update operation shown in FIG. 12 by loading the internal variable d. Therefore, even in the above case, a series of data read operations can be performed at a higher speed than when the corresponding address conversion information is not stored in the address conversion table 31 at all.
[0117]
Next, a data write operation will be described. As described above, the data write operation is divided into a new data write operation and a data overwrite operation. When a data write request is made from the host computer, first, is this a new data write? A determination is made as to whether the data is overwritten.
[0118]
FIG. 15 is a flowchart showing such a determination operation. Such an operation is also performed by the
[0119]
In the data write operation, when a host address is supplied from the host computer, the
[0120]
As a result, when it is determined that the address conversion information related to the zone to be accessed is stored in the address conversion table 31 (S42: YES), the
[0121]
As a result, if the read flag is “1 (invalid)” (S44: NO), the block corresponding to the logical block address has not been allocated yet, that is, the write operation of this data is a new data. Since it can be determined that it is a write operation, the new data write operation shown in FIG. 16 is executed. Conversely, if the read flag is “0 (valid)” (S44: YES). Since it can be determined that the block corresponding to the logical block address has already been allocated, that is, the data write operation is the data overwrite operation, the data overwrite operation shown in FIG. 17 is executed. .
[0122]
On the other hand, when it is determined in step S42 that the address conversion information regarding the zone to be accessed is not stored in the address conversion table 31 (S42: NO), the table update operation shown in FIG. 12 is executed. Then, the above steps S43 and S44 are executed.
[0123]
First, a new data writing operation will be described with reference to FIG. Such an operation is also performed by the
[0124]
In the new data writing operation, the
[0125]
Next, the
[0126]
Then, the
[0127]
Thus, the new data writing operation is completed.
[0128]
The address conversion table 31, the
[0129]
Next, the data overwrite operation will be described with reference to FIG. Such an operation is also performed by the
[0130]
In the data overwriting operation, the
[0131]
Next, the
[0132]
Next, the
[0133]
Next, after incrementing the internal variable e (step S67), the
[0134]
If the internal variable e coincides with k in step S68, the
[0135]
Then, the
[0136]
As described above, in the present embodiment, only the address translation information related to a part of the blocks is expanded in the address translation table, and in response to a request for reading data from a certain zone, the next zone Since the creation of the address translation information for the zone is started, it is not necessary to create the address translation information for the zone from the beginning even when access to the next zone is actually requested. That is, in the conventional flash memory system, when the address conversion information related to the next zone is not stored in the address conversion table, when access to this zone is requested, all the blocks constituting this zone are transferred. On the other hand, it is necessary to create the address conversion information from the beginning by performing reading, but in the present embodiment, it is not necessary to create the address conversion information from the beginning, so the period of the BUSY state can be shortened. For this reason, it is possible to read data from consecutive host addresses, which is often required during actual use, at high speed, effectively reducing the performance while saving the capacity of the address translation table. It becomes possible to suppress.
[0137]
The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the invention described in the claims, and these are also included in the scope of the present invention. Needless to say.
[0138]
For example, in the above embodiment, whether or not the address conversion information related to the next zone is stored in the address conversion table 31 is always determined at the time of data reading (step S18). You can do it only below. For example, such a determination may be made only when the corresponding logical block address of the data reading target block is greater than or equal to a predetermined value, and may be omitted when the corresponding logical block address is less than the predetermined value. If such a condition is provided, speculative table creation will not be performed earlier than necessary, so the contents of the table currently stored in the address translation table 31 may be unnecessarily discarded. Can be lowered. Therefore, in this case, it is preferable that the predetermined value of the corresponding logical block address serving as a threshold value is determined in consideration of the time required for table creation.
[0139]
In the present invention, the means does not necessarily mean a physical means, but includes cases where the functions of the means are realized by software. Further, the function of one means may be realized by two or more physical means, or the functions of two or more means may be realized by one physical means.
[0140]
The present invention can be realized as a PC card based on a unified standard published by PCMCIA (Personal Computer Memory Card International Association). Furthermore, in recent years, with the development of high integration technology of semiconductor elements, more compact miniaturized memory cards, for example, “CompactFlash” proposed by CFA (CompactFlash Association) and “MMC (MultiMediaCard)” proposed by MultiMediaCardAssociation. The present invention can be applied to “Memory Stick” proposed by Sony Corporation and “SD Memory Card” proposed by Matsushita Electric Industrial Co., Ltd.
[0141]
【The invention's effect】
As described above, according to the present invention, it is possible to effectively suppress a decrease in performance while saving the capacity of the address conversion table. In addition, in the present invention, since the speculative creation of the address translation information is performed during the period in which the controller is originally waiting, this work does not degrade the performance of the flash memory system.
[0142]
Therefore, the present invention is particularly effective when the period during which the controller is originally waiting is long, for example, when the operation of the host computer is slow or when the capacity of the FIFO is small.
[Brief description of the drawings]
FIG. 1 is a block diagram schematically showing a configuration of a
FIG. 2 is a cross-sectional view schematically showing a
FIG. 3 is a cross-sectional view schematically showing a
FIG. 4 is a diagram schematically showing the structure of the address space of the
FIG. 5 is a diagram schematically showing a data structure of a
6 is a diagram showing a data structure of an address conversion table 31. FIG.
7 is a diagram showing a data structure of a management table 32. FIG.
8 is a diagram showing a data structure of a
9 is a diagram showing a data structure of a
10 is a flowchart showing a new creation method of an address conversion table 31. FIG.
FIG. 11 is a flowchart showing a data read operation.
FIG. 12 is a flowchart showing a table update operation.
FIG. 13 is a timing chart showing the timing of interrupting / resuming the table update operation when a plurality of pages in which data requested by the host computer is read are targeted.
FIG. 14 is a flowchart showing a table completion operation.
FIG. 15 is a flowchart for determining whether a data write request from the host computer is a new data write or a data overwrite.
FIG. 16 is a flowchart showing a new data writing operation.
FIG. 17 is a flowchart showing a data overwrite operation.
[Explanation of symbols]
1 Flash memory system
2 Flash memory
3 Controller
4 CPU
5 RAM
6 ROM
7 FIFO
10 memory cells
11 P-type semiconductor substrate
12 Source diffusion region
13 Drain diffusion region
14 Tunnel oxide film
15 Floating gate electrode
16 Insulating film
17 Control gate electrode
18 channels
21 User area
22 Redundant area
23 Logical block address storage area
24 Area for storing other additional information
31 Address conversion table
32 Management table
33 Preferred links
34 Write queue
Claims (3)
前記ホストアドレスが割り当てられている複数セクタの領域で構成された論理ブロックが複数個含まれる論理ゾーンと、前記物理ブロックが複数個含まれる物理ゾーンとの対応関係を管理するゾーン管理手段と、
前記ホストシステムから与えられるホストアドレスに基づいて、アクセス対象の前記論理ゾーンを特定する第1のゾーン特定手段と、
前記第1のゾーン特定手段によって特定された前記論理ゾーンに含まれるホストアドレスに後続するホストアドレスが含まれる前記論理ゾーンを特定する第2のゾーン特定手段と、
前記論理ゾーンに含まれる前記論理ブロックと、該論理ゾーンに対応する前記物理ゾーンに含まれる前記物理ブロックの対応関係を記述した論理ゾーン毎のアドレス変換テーブルを複数個保持するアドレス変換テーブル保持手段と、
前記アドレス変換テーブル保持手段に保持されている複数個の前記論理ゾーン毎のアドレス変換テーブルに関する優先順位を管理する優先順位管理手段と、
前記第1のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルが前記アドレス変換テーブル保持手段に保持されているか否かを判断する第1のテーブル有無判断手段と、
前記第1のテーブル有無判断手段の判断が否定の判断であるときに、前記第1のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成する第1のアドレス変換テーブル作成手段と、
前記第2のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルが前記アドレス変換テーブル保持手段に保持されているか否かを判断する第2のテーブル有無判断手段と、
前記第2のテーブル有無判断手段の判断が否定の判断であるときに、前記第2のゾーン特定手段によって特定される前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成する第2のアドレス変換テーブル作成手段と、
前記アドレス変換テーブル保持手段に保持されている前記論理ゾーン毎のアドレス変換テーブルに基づいて、前記第1のゾーン特定手段で特定された前記論理ゾーンと対応する前記物理ゾーン内の前記物理ブロックにアクセスするアクセス手段と、
を備え、
前記第2のアドレス変換テーブル作成手段は、前記アクセス手段が前記第1のゾーン特定手段によって特定された前記論理ゾーンと対応する前記物理ゾーン内の前記物理ブロックへのアクセスを中断している期間に、前記論理ゾーン毎のアドレス変換テーブルの作成処理を実行し、
前記アドレス変換テーブル保持手段が保持することができる前記論理ゾーン毎のアドレス変換テーブルの最大個数は、前記論理ゾーンの総数よりも少なく、
前記アドレス変換テーブル保持手段は、前記最大個数の前記論理ゾーン毎のアドレス変換テーブルを保持しているときに、該アドレス変換テーブル保持手段に保持されていない前記論理ゾーン毎のアドレス変換テーブルを前記第1のアドレス変換テーブル作成手段又は第2のアドレス変換テーブル作成手段が作成する場合、前記アドレス変換テーブル保持手段は、前記優先順位管理手段で管理されている優先順位が最下位の前記論理ゾーン毎のアドレス変換テーブルに代えて、前記第1のアドレス変換テーブル作成手段又は第2のアドレス変換テーブル作成手段によって作成される前記論理ゾーン毎のアドレス変換テーブルを保持する、
ことを特徴とするメモリコントローラ。A memory controller that accesses a flash memory that is erased in physical block units including a plurality of pages based on a host address in sector units given from a host system,
Zone management means for managing a correspondence relationship between a logical zone including a plurality of logical blocks composed of areas of a plurality of sectors to which the host address is allocated, and a physical zone including a plurality of the physical blocks;
First zone specifying means for specifying the logical zone to be accessed based on a host address given from the host system;
Second zone specifying means for specifying the logical zone including a host address subsequent to a host address included in the logical zone specified by the first zone specifying means;
Address conversion table holding means for holding a plurality of address conversion tables for each logical zone describing a correspondence relationship between the logical block included in the logical zone and the physical block included in the physical zone corresponding to the logical zone; ,
Priority management means for managing the priority order of the plurality of logical zone address translation tables held in the address translation table holding means;
First table presence / absence determining means for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified by the first zone specifying means is held in the address conversion table holding means; ,
Creating an address conversion table for each logical zone corresponding to the logical zone specified by the first zone specifying means when the judgment of the first table presence / absence judging means is negative; An address translation table creation means;
Second table presence / absence determining means for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified by the second zone specifying means is held in the address conversion table holding means; ,
Creating an address conversion table for each logical zone corresponding to the logical zone identified by the second zone identifying means when the second table presence / absence judging means is a negative judgment; An address translation table creation means;
Based on the address conversion table for each logical zone held in the address conversion table holding means, the physical block in the physical zone corresponding to the logical zone specified by the first zone specifying means is accessed. Access means to
With
The second address conversion table creating means is configured to interrupt the access to the physical block in the physical zone corresponding to the logical zone specified by the first zone specifying means. , Execute an address conversion table creation process for each logical zone,
The maximum number of address conversion tables for each logical zone that can be held by the address conversion table holding means is less than the total number of logical zones,
The address conversion table holding means holds the address conversion table for each logical zone that is not held in the address conversion table holding means when holding the maximum number of address conversion tables for each logical zone. When the address translation table creation unit or the second address translation table creation unit creates the address translation table holding unit, the address translation table holding unit is provided for each logical zone with the lowest priority managed by the priority management unit. In place of the address translation table, the address translation table for each logical zone created by the first address translation table creation means or the second address translation table creation means is held.
A memory controller characterized by that.
前記ホストアドレスが割り当てられている複数セクタの領域で構成された論理ブロックが複数個含まれる論理ゾーンと、前記物理ブロックが複数個含まれる物理ゾーンとの対応関係を管理するゾーン管理ステップと、
前記ホストシステムから与えられるホストアドレスに基づいて、アクセス対象の前記論理ゾーンを特定する第1のゾーン特定ステップと、
前記第1のゾーン特定ステップで特定された前記論理ゾーンに対応する論理ゾーン毎のアドレス変換テーブルがアドレス変換テーブル保持手段に保持されているか否かを判断する第1のテーブル有無判断ステップと、
前記第1のテーブル有無判断ステップでの判断が否定の判断であるときに、前記第1のゾーン特定ステップで特定された前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成し、前記アドレス変換テーブル保持手段に保持する第1のアドレス変換テーブル作成ステップと、
前記アドレス変換テーブル保持手段に保持されている前記論理ゾーン毎のアドレス変換テーブルに基づいて、前記第1のゾーン特定ステップで特定された前記論理ゾーンと対応する前記物理ゾーン内の前記物理ブロックにアクセスするアクセスステップと、
前記第1のゾーン特定ステップで特定された前記論理ゾーンに含まれるホストアドレスに後続するホストアドレスが含まれる前記論理ゾーンを特定する第2のゾーン特定ステップと、
前記第2のゾーン特定ステップで特定された前記論理ゾーンに対応する該論理ゾーン毎のアドレス変換テーブルがアドレス変換テーブル保持手段に保持されているか否かを判断する第2のテーブル有無判断ステップと、
前記第2のテーブル有無判断ステップでの判断が否定の判断であるときに、前記第2のゾーン特定ステップで特定された前記論理ゾーンに対応する前記論理ゾーン毎のアドレス変換テーブルを作成し、前記アドレス変換テーブル保持手段に保持する第2のアドレス変換テーブル作成ステップと、
前記アドレス変換テーブル保持手段に保持されている複数個の前記論理ゾーン毎のアドレス変換テーブルに関する優先順位を管理する優先順位管理ステップと、を有し、
前記論理ゾーン毎のアドレス変換テーブルは、前記論理ゾーンに含まれる前記論理ブロックと、該論理ゾーンに対応する前記物理ゾーンに含まれる前記物理ブロックの対応関係を記述したテーブルであり、
前記アドレス変換テーブル保持手段が保持することができる前記論理ゾーン毎のアドレス変換テーブルの最大個数は、前記論理ゾーンの総数よりも少なく、
前記第2のアドレス変換テーブル作成ステップは、前記第1のゾーン特定ステップで特定された前記論理ゾーンと対応する前記物理ゾーンにアクセスするアクセスステップで前記フラッシュメモリから読み出したデータを前記ホストシステムに転送している期間に実行し、
前記第1のアドレス変換テーブル作成ステップ及び前記第2のアドレス変換テーブル作成ステップは、前記アドレス変換テーブル保持手段に前記最大個数の前記論理ゾーン毎のアドレス変換テーブルが保持されているときに、該アドレス変換テーブル保持手段に保持されていない前記論理ゾーン毎のアドレス変換テーブルを新たに作成する場合、前記優先順位が最下位の前記論理ゾーン毎のアドレス変換テーブルに代えて、新たに作成する前記論理ゾーン毎のアドレス変換テーブルを前記アドレス変換テーブル保持手段に保持することを特徴とするフラッシュメモリの制御方法。A flash memory control method for controlling access to a flash memory that is erased in units of physical blocks including a plurality of pages, based on a sector-unit host address supplied from a host system,
A zone management step for managing a correspondence relationship between a logical zone including a plurality of logical blocks configured by areas of a plurality of sectors to which the host address is allocated, and a physical zone including a plurality of the physical blocks;
A first zone specifying step of specifying the logical zone to be accessed based on a host address given from the host system;
A first table presence / absence determining step for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified in the first zone specifying step is held in an address conversion table holding unit;
When the determination in the first table presence determination step is a negative determination, an address conversion table for each logical zone corresponding to the logical zone specified in the first zone specifying step is created, A first address conversion table creation step held in the address conversion table holding means;
Based on the address conversion table for each logical zone held in the address conversion table holding means, access to the physical block in the physical zone corresponding to the logical zone specified in the first zone specifying step An access step to
A second zone specifying step for specifying the logical zone including a host address subsequent to a host address included in the logical zone specified in the first zone specifying step;
A second table presence / absence determining step for determining whether or not an address conversion table for each logical zone corresponding to the logical zone specified in the second zone specifying step is held in an address conversion table holding unit;
When the determination in the second table presence determination step is a negative determination, an address conversion table for each logical zone corresponding to the logical zone specified in the second zone specifying step is created, A second address conversion table creation step held in the address conversion table holding means;
A priority order management step for managing a priority order for the plurality of logical zone address translation tables held in the address translation table holding means;
The address conversion table for each logical zone is a table describing a correspondence relationship between the logical block included in the logical zone and the physical block included in the physical zone corresponding to the logical zone.
The maximum number of address conversion tables for each logical zone that can be held by the address conversion table holding means is less than the total number of logical zones,
In the second address conversion table creation step, the data read from the flash memory is transferred to the host system in the access step of accessing the physical zone corresponding to the logical zone specified in the first zone specifying step. Run during the period
In the first address conversion table creation step and the second address conversion table creation step, the address conversion table holding unit stores the address when the maximum number of address conversion tables for each logical zone is held. When creating a new address conversion table for each logical zone that is not held in the conversion table holding means, the logical zone is newly created instead of the address conversion table for each logical zone with the lowest priority. A method of controlling a flash memory, wherein each address conversion table is held in the address conversion table holding means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002229635A JP4042898B2 (en) | 2002-08-07 | 2002-08-07 | Memory controller, memory system including the same, and flash memory control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002229635A JP4042898B2 (en) | 2002-08-07 | 2002-08-07 | Memory controller, memory system including the same, and flash memory control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004070691A JP2004070691A (en) | 2004-03-04 |
JP4042898B2 true JP4042898B2 (en) | 2008-02-06 |
Family
ID=32015951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002229635A Expired - Lifetime JP4042898B2 (en) | 2002-08-07 | 2002-08-07 | Memory controller, memory system including the same, and flash memory control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4042898B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4661191B2 (en) * | 2004-11-30 | 2011-03-30 | Tdk株式会社 | Memory controller, flash memory system, and flash memory control method |
JP5535128B2 (en) * | 2010-12-16 | 2014-07-02 | 株式会社東芝 | Memory system |
CN111078128B (en) * | 2018-10-22 | 2023-05-16 | 浙江宇视科技有限公司 | Data management method and device and solid state disk |
-
2002
- 2002-08-07 JP JP2002229635A patent/JP4042898B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004070691A (en) | 2004-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4256600B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP3921174B2 (en) | Memory controller, flash memory system, and flash memory control method | |
US7552311B2 (en) | Memory device with preread data management | |
JP3905037B2 (en) | Memory controller, flash memory system, and flash memory control method | |
US5953737A (en) | Method and apparatus for performing erase operations transparent to a solid state storage system | |
JP5440883B2 (en) | Moving sectors in blocks in flash memory | |
US6145051A (en) | Moving sectors within a block of information in a flash memory mass storage architecture | |
US5930815A (en) | Moving sequential sectors within a block of information in a flash memory mass storage architecture | |
JP2001243110A (en) | Memory controller, flash memory system and access method to flash memory | |
JP2000020252A (en) | Storage device using nonvolatile semiconductor memory | |
KR100914646B1 (en) | Management Scheme for Flash Memory with the Multi-Plane Architecture | |
JP3621051B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4042898B2 (en) | Memory controller, memory system including the same, and flash memory control method | |
JP2000181784A (en) | Non-volatile storage device which can be rewritten | |
JP4316824B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4233213B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4248772B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4220690B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP3999564B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP3999959B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4183550B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP2003122630A (en) | Memory controller, flash memory system having memory controller, and method for controlling flash memory | |
JP4194473B2 (en) | Memory controller and flash memory system including the memory controller | |
JP4251950B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JPH0877081A (en) | File memory system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050418 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20051208 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070322 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070327 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070528 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070807 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070928 |
|
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: 20071023 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071108 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4042898 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101122 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111122 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121122 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121122 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131122 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313115 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |