JP2008176606A - Memory controller and flash memory system equipped with memory controller and control method of flash memory - Google Patents
Memory controller and flash memory system equipped with memory controller and control method of flash memory Download PDFInfo
- Publication number
- JP2008176606A JP2008176606A JP2007009970A JP2007009970A JP2008176606A JP 2008176606 A JP2008176606 A JP 2008176606A JP 2007009970 A JP2007009970 A JP 2007009970A JP 2007009970 A JP2007009970 A JP 2007009970A JP 2008176606 A JP2008176606 A JP 2008176606A
- Authority
- JP
- Japan
- Prior art keywords
- data
- flash memory
- host system
- block
- internal information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000015654 memory Effects 0.000 title claims abstract description 153
- 238000000034 method Methods 0.000 title claims description 19
- 230000002950 deficient Effects 0.000 claims description 27
- 238000012546 transfer Methods 0.000 claims description 8
- 230000004044 response Effects 0.000 claims description 7
- 239000000872 buffer Substances 0.000 abstract description 31
- 238000006243 chemical reaction Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000002093 peripheral effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 206010010356 Congenital anomaly Diseases 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Read Only Memory (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
- Debugging And Monitoring (AREA)
- Memory System (AREA)
Abstract
Description
本発明は、メモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びにフラッシュメモリの制御方法に関する。 The present invention relates to a memory controller, a flash memory system including the memory controller, and a flash memory control method.
近年、不揮発性の記憶媒体であるフラッシュメモリの開発が盛んに行われ、デジタルカメラ等の情報機器(ホストシステム)の記憶媒体として普及している。そして、このような情報機器が扱うデータが大容量化したことに伴い、フラッシュメモリの記憶容量も大容量化が進んでいる。そのため、集積度に優れ、大容量化が容易なNAND型フラッシュメモリが注目されている。 In recent years, flash memory, which is a non-volatile storage medium, has been actively developed, and is widely used as a storage medium for information devices (host systems) such as digital cameras. As the data handled by such information devices has increased in capacity, the storage capacity of the flash memory has been increased. For this reason, attention has been focused on NAND flash memories that have a high degree of integration and are easy to increase in capacity.
NAND型フラッシュメモリは、メモリセルを消去状態(論理値=1)から書込状態(論理値=0)に変化させる場合には、メモリセル単位で行なうことができる。しかし、メモリセルを書込状態(論理値=0)から消去状態(論理値=1)に変化させる場合には、複数のメモリセルからなる所定の消去単位(ブロック単位)でしか行なうことができない。データの読み出し及び書き込みはページ単位で行われ、消去単位であるブロックは複数のページで構成されている。 The NAND flash memory can be performed in units of memory cells when the memory cells are changed from the erased state (logic value = 1) to the written state (logic value = 0). However, when the memory cell is changed from the written state (logic value = 0) to the erased state (logic value = 1), it can be performed only in a predetermined erase unit (block unit) composed of a plurality of memory cells. . Data reading and writing are performed in units of pages, and a block as an erasing unit is composed of a plurality of pages.
NAND型フラッシュメモリのページは、磁気ディスク装置における1又は複数のセクタに対応している。従って、NAND型フラッシュメモリを用いたメモリシステムは、従来の磁気ディスク装置を置換える用途に使用されることが多くなっている。このような理由により、NAND型フラッシュメモリを用いたメモリシステムのインターフェースには、通常、磁気ディスク装置で用いられているATA(AT Attachment)が採用されている。 A page of the NAND flash memory corresponds to one or a plurality of sectors in the magnetic disk device. Accordingly, a memory system using a NAND flash memory is often used for a purpose of replacing a conventional magnetic disk device. For this reason, ATA (AT Attachment), which is usually used in magnetic disk devices, is employed as an interface for a memory system using a NAND flash memory.
ATAに準拠したインターフェース(以下、ATAインターフェースと言う)は、図7のようにコマンドレジスタ15a、セクタカウントレジスタ15b、LBA(Logical Block Address)レジスタ15c、データレジスタ15d及びステータスレジスタ15e等のATAレジスタ15を備えている。このATAレジスタ15に対して書き込み又は読み出しを行なうことにより、ATAインターフェースに接続された周辺機器に対するアクセスが行なわれる。従って、周辺機器が記憶媒体としてフラッシュメモリを用いたフラッシュメモリシステムの場合も、ホストシステム側からフラッシュメモリシステムにアクセスするときには、ATAレジスタ15にコマンド、アドレス等の指示情報を設定することによりアクセスが行なわれる。
As shown in FIG. 7, the ATA-compliant interface (hereinafter referred to as the ATA interface) includes an
例えば、ホストシステム側からフラッシュメモリシステムに対して、読み出し若しくは書き込みを実行する場合、ホストシステム側から、読み出し若しくは書き込みを実行するセクタの先頭アドレスがLBAレジスタ15cに設定され、読み出すセクタ数若しくは書き込むセクタ数がセクタカウントレジスタ15bに設定され、読み出し若しく書き込みのコマンドは、コマンドレジスタ15aに設定される。この設定に基づいて、書き込みの場合は、フラッシュメモリにデータが書き込まれ、読み出しの場合は、フラッシュメモリからデータが読み出される。
For example, when reading or writing is performed from the host system side to the flash memory system, the start address of the sector to be read or written is set in the
また、ホストシステムは、ATAインターフェースに接続された周辺機器の状態を、ステータスレジスタ15eに設定されている情報に基づいて知ることができる。つまり、ATAインターフェースに接続された周辺機器の状態を知りたいときは、下記特許文献1にも開示されているように、ステータスレジスタ15eに設定されている情報(以下、ステータス情報と言う。)が読み出される。この、ステータスレジスタ15eの各ビットには所定の情報が割り当てられている。従って、ステータスレジスタ15eから読み出されたステータス情報の各ビットの論理値に基づいて、周辺機器の状態を判断することができる。
In addition, the host system can know the state of the peripheral device connected to the ATA interface based on information set in the
しかしながら、ステータスレジスタ15eから読み出されたステータス情報からは、ステータスレジスタ15eの各ビットに割り当てられている情報だけしか知ることができない。従って、ATAインターフェースに接続されたフラッシュメモリシステムでは、フラッシュメモリ内の不良ブロック数、空きブロック数等の内部状態を示す情報(以下、内部情報と言う)を取得することができかった。
However, only the information assigned to each bit of the
そこで、本発明は、ATAインターフェースに接続されたフラッシュメモリシステムの内部情報を、ホストシステム側から取得するのに好適なメモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びに、フラッシュメモリの制御方法を提供することを目的とする。 Therefore, the present invention provides a memory controller suitable for acquiring internal information of the flash memory system connected to the ATA interface from the host system side, a flash memory system including the memory controller, and a flash memory control method. The purpose is to do.
上記目的を達成するために、本発明によるメモリコントローラは、ホストシステムから与えられる指示情報に基づいて、記憶データの消去が物理ブロック単位で行われるフラッシュメモリへのアクセスを制御するメモリコントローラであって、前記フラッシュメモリに書き込む書き込みデータ又は前記フラッシュメモリから読み出した読み出しデータを1又は複数セクタ単位で保持するデータ保持手段と、前記ホストシステムに対して、前記データ保持手段に転送可能なデータが保持されていることを通知する通知手段と、前記データ保持手段に保持されているデータを、前記ホストシステムに転送するデータ転送手段と、前記ホストシステムから与えられる指示情報に応答して、前記フラッシュメモリ内の状態に関する内部情報データを前記データ保持手段に書き込むデータ設定手段とを備え、前記通知手段は、前記ホストシステムに転送可能な前記読み出しデータが前記データ保持手段に保持されたとき、又は前記情報設定手段による前記データ保持手段への前記内部情報データの書き込みが終了したときに、前記データ保持手段に転送可能なデータが保持されていることを通知することを特徴とする。 In order to achieve the above object, a memory controller according to the present invention is a memory controller that controls access to a flash memory in which erasure of stored data is performed in units of physical blocks based on instruction information given from a host system. Data holding means for holding write data to be written to the flash memory or read data read from the flash memory in units of one or more sectors, and data that can be transferred to the data holding means are held for the host system. In the flash memory in response to the instruction information given from the host system, the data transfer means for transferring the data held in the data holding means to the host system Before internal information data on the state of A data setting means for writing to the data holding means, wherein the notifying means stores the read data that can be transferred to the host system when the data holding means is held or when the information setting means sends the data holding means to the data holding means. When the writing of the internal information data is completed, the data holding unit is notified that data that can be transferred is held.
前記内部情報は、前記フラッシュメモリ内の不良ブロック数および空きブロック数であることが好ましい。 The internal information is preferably the number of defective blocks and the number of empty blocks in the flash memory.
上記目的を達成するために、本発明によるフラッシュメモリシステムは、前記メモリコントローラのいずれか1つとフラッシュメモリを備えている。 In order to achieve the above object, a flash memory system according to the present invention includes any one of the memory controllers and a flash memory.
上記目的を達成するために、本発明によるフラッシュメモリの制御方法は、ホストシステムから与えられる指示情報に基づいて、記憶データの消去が物理ブロック単位で行われるフラッシュメモリへのアクセスを制御するフラッシュメモリの制御方法であって、前記ホストシステムから与えられる指示情報に応答して、前記フラッシュメモリ内の状態に関する内部情報データを、前記フラッシュメモリに書き込むデータ又は前記フラッシュメモリから読み出したデータを1又は複数セクタ単位で保持するデータ保持手段に書き込むデータ設定ステップと、前記データ保持手段への前記内部情報データの書き込みが終了したときに、前記ホストシステムに対して、前記データ保持手段に転送可能なデータが保持されていることを通知する通知ステップと、前記データ保持手段に保持されている前記内部情報データを、前記ホストシステムに転送するデータ転送ステップとを含むことを特徴とする。 In order to achieve the above object, a flash memory control method according to the present invention is a flash memory for controlling access to a flash memory in which erasure of stored data is performed in units of physical blocks based on instruction information given from a host system. In response to the instruction information given from the host system, the internal information data relating to the state in the flash memory, the data to be written to the flash memory, or the data read from the flash memory A data setting step for writing to the data holding means to be held in sector units, and when the writing of the internal information data to the data holding means is completed, there is data that can be transferred to the data holding means to the host system Notifications to notify that they are held And-up, the internal information data held in the data holding means, characterized in that it comprises a data transfer step of transferring to the host system.
本発明によれば、ATAインターフェースに接続されたフラッシュメモリシステムで、ホストシステム側から要求されるフラッシュメモリシステム内の内部情報を、ホストシステム側に効率的に転送することができる。又、ホストシステムは、フラッシュメモリに記憶されているデータを読み出すときと同様の動作で内部情報を取得することができる。 According to the present invention, in the flash memory system connected to the ATA interface, internal information in the flash memory system requested from the host system side can be efficiently transferred to the host system side. Further, the host system can acquire internal information by the same operation as when reading data stored in the flash memory.
以下、図面に基づき、本発明の実施の形態について詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は、本発明に係るフラッシュメモリシステム1を概略的に示すブロック図である。図1に示すように、フラッシュメモリシステム1は、NAND型フラッシュメモリであるフラッシュメモリ2と、それを制御するコントローラ3で構成されている。
FIG. 1 is a block diagram schematically showing a
なお、フラッシュメモリシステム1は、外部バス13を介してホストシステム4と接続される。ホストシステム4は、ホストシステム4の全体の動作を制御するためのCPU(Central Processing Unit)、フラッシュメモリシステム1との情報の授受を担うコンパニオンチップ等から構成される。ホストシステム4は、例えば、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置であってもよい。
The
フラッシュメモリ2は、不揮発性メモリであり、レジスタと、メモリセルアレイと、から構成される。フラッシュメモリ2は、レジスタとメモリセルアレイとの間でデータの書き込み又は読み出しを行なう。
The
メモリセルアレイは、複数のメモリセル群と、ワード線と、を備える。各メモリセル群は、複数のメモリセルが直列に接続されたものである。ワード線は、メモリセル群の特定のメモリセルを選択するためのものである。このワード線を介して選択されたメモリセルとレジスタとの間で、データの書き込み又は読み出しが行われる。 The memory cell array includes a plurality of memory cell groups and word lines. Each memory cell group includes a plurality of memory cells connected in series. The word line is for selecting a specific memory cell in the memory cell group. Data is written or read between the selected memory cell and the register via the word line.
メモリセルアレイを構成するメモリセルは、コントロールゲートとフローティングゲートを備えており、フローティングゲートに電荷(電子)を注入若しくはフローティングゲートから電荷(電子)を排出することによって、データの書き込み若しくはデータの消去が行われる。ここで、消去状態が論理値「1」に対応し、書き込み状態が論理値「0」に対応している。 A memory cell constituting a memory cell array includes a control gate and a floating gate. Data can be written or erased by injecting charges (electrons) into the floating gate or discharging charges (electrons) from the floating gate. Done. Here, the erase state corresponds to the logical value “1”, and the write state corresponds to the logical value “0”.
NAND型フラッシュメモリであるフラッシュメモリ2の構造を図2に示す。フラッシュメモリ2は、「ページ」及び「ブロック(物理ブロック)」で構成されている。
FIG. 2 shows the structure of the
ページは、フラッシュメモリ2にて行われるデータ読み出し動作及びデータ書き込み動作における処理単位である。物理ブロックは、フラッシュメモリ2にて行われるデータ消去動作における処理単位であり、複数個のページで構成されている。
A page is a processing unit in a data read operation and a data write operation performed in the
上記物理ブロックとページの構成は、フラッシュメモリの仕様によって異なるが、図2(a)に示したような小ブロックのフラッシュメモリと、図2(b)に示したような大ブロックのフラッシュメモリが一般的に使用されている。小ブロック構成では、図2(a)に示したように、1ブロックが32ページ(P0〜P31)で構成され、各ページが512バイト(1セクタ)のユーザ領域25と16バイトの冗長領域26で構成されている。また、大ブロック構成では、図2(b)に示したように、1ブロックが64ページ(P0〜P63)で構成され、各ページが2048バイト(4セクタ)のユーザ領域25と64バイトの冗長領域26で構成されている。
The physical block and page configuration differ depending on the specifications of the flash memory, but there are a small block flash memory as shown in FIG. 2 (a) and a large block flash memory as shown in FIG. 2 (b). Commonly used. In the small block configuration, as shown in FIG. 2A, one block is composed of 32 pages (P0 to P31), and each page has a 512-byte (one sector)
ここで、ユーザ領域25は、ホストシステム4から供給されるユーザデータを記憶するための領域である。
Here, the
また、冗長領域26は、誤り訂正符号、論理アドレス情報、ブロックステータス等の付加データを記憶するための領域である。
The
誤り訂正符号は、ユーザ領域25に記憶されているユーザデータに含まれる誤りを検出し、訂正するためのデータである。
The error correction code is data for detecting and correcting an error included in user data stored in the
論理アドレス情報は、物理ブロックに有効なユーザデータが記憶されている場合に、そのユーザデータに対応する論理ブロックを特定するために用いられる情報である。論理ブロックは、ホストシステム4側のアドレス空間におけるセクタを複数個まとめたものであり、この論理ブロックと物理ブロックの対応関係を管理することにより、ホストシステム4で管理されている論理アドレスとフラッシュメモリ2内の物理アドレスの対応関係を管理している。尚、ホストシステム4側のアドレス空間は、セクタ(512バイト)単位で分割した領域に付けた通番であるLBA(Logical Block Address)で管理されている。ホストシステム4は、このLBAでフラッシュメモリ2内のアクセス領域を指定する。
The logical address information is information used to specify a logical block corresponding to user data when valid user data is stored in the physical block. The logical block is a collection of a plurality of sectors in the address space on the
物理ブロックに有効なユーザデータが記憶されていない場合、その物理ブロックの冗長領域26には、冗長領域26に、論理アドレス情報が書き込まれていない。従って、冗長領域26に論理アドレス情報が書き込まれているか否かで、その物理ブロックが空きブロック(消去済ブロック)であるか否かを判断することができる。つまり、論理アドレス情報が書き込まれていない場合は、空きブロック(消去済ブロック)であると判断される。
When valid user data is not stored in the physical block, the logical address information is not written in the
ブロックステータスは、その物理ブロックが不良ブロック(正常にデータの書き込み等を行なうことができない物理ブロック)であるか否かを示す情報であり、この情報に基づいて不良ブロックであるか否かが識別される。従って、不良ブロックであると判断された物理ブロックの冗長領域26には、不良ブロックであることを示す情報がブロックステータスとして設定される。
The block status is information indicating whether or not the physical block is a bad block (a physical block in which data cannot be normally written). Based on this information, the block status is identified. Is done. Therefore, information indicating a defective block is set as a block status in the
このようなフラッシュメモリ2は、コントローラ3から、データ、アドレス情報、内部コマンド等を受信して、データの読み出し、書き込み、消去等の各動作を実行する。
Such a
コントローラ3は、図1に示すように、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(Error Correcting Code)ブロック11と、ROM(Read Only Memory)12と、から構成される。これら機能ブロックによって構成されるコントローラ3は、一つの半導体チップ上に集積される。以下に各機能ブロックについて説明する。
As shown in FIG. 1, the
マイクロプロセッサ6は、ROM12に記憶されているプログラムに従って、コントローラ3の全体の動作を制御する。例えば、マイクロプロセッサ6は、各種処理等を定義したコマンドセット(シーケンスコマンド)をROM12から読み出してフラッシュメモリインターフェースブロック10に供給し、フラッシュメモリインターフェースブロック10に処理を実行させる。
The
ホストインターフェースブロック7は、ホストシステム4との間の、データ、アドレス情報、ステータス情報、外部コマンド等の授受を行なう。ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を入口としてフラッシュメモリシステム1の内部(例えば、バッファ9)に取り込まれる。また、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口としてホストシステム4に供給される。
The
ワークエリア8は、フラッシュメモリ2の制御等に必要なデータが一時的に記憶される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成される。ワークエリア8には、例えば、論理アドレスと物理アドレスを変換するためのアドレス変換テーブル、空きブロックを検索する空きブロック検索テーブルなどが記憶される。
The
バッファ9は、フラッシュメモリ2から読み出されたデータ及びフラッシュメモリ2に書き込むべきデータを1セクタ単位又は複数セクタ単位で一時的に保持する。すなわち、フラッシュメモリ2から読み出されたデータは、ホストシステム4が受け取り可能な状態となるまでバッファ9に保持され、フラッシュメモリ2に書き込むべきデータは、フラッシュメモリ2が書き込み可能な状態となるまでバッファ9に保持される。
The
フラッシュメモリインターフェースブロック10は、バッファ9からフラッシュメモリ2への書き込み処理やフラッシュメモリ2からバッファ9への読み出し処理を制御するブロックである。書き込み処理や読み出し処理を実行するときの一連の制御動作は、ROM12に記憶されている一連の制御動作を指示するシーケンスコマンドに基づいて実行される。
The flash
ECCブロック11は、フラッシュメモリ2に書き込むデータに付加される誤り訂正符号(ECC:Error Correcting Code)を生成するとともに、フラッシュメモリ2から読み出したデータに付加された誤り訂正符号(ECC)に基づいて、読み出したデータに含まれる誤りを検出・訂正する。
The
ROM12は、マイクロプロセッサ6によって実行される処理の手順を定義するプログラム等を格納する不揮発性の記憶素子である。具体的には、ROM12は、例えば、アドレス変換テーブルの作成等の処理手順を定義するプログラムを格納する。
The
次にフラッシュメモリの記憶領域の管理方法について説明する。フラッシュメモリの記憶容量の大容量化が進んでいることにより、大容量化したフラッシュメモリの記憶領域を円滑に管理するため、この記憶領域を複数のゾーンに分割して管理する手法が用いられている。 Next, a method for managing the storage area of the flash memory will be described. As the storage capacity of flash memory has been increasing, in order to smoothly manage the storage area of the flash memory whose capacity has been increased, a method of managing this storage area by dividing it into a plurality of zones has been used. Yes.
図3は、フラッシュメモリ2の記憶領域を複数のゾーン(物理ゾーン)に分割して管理する場合の一例である。記憶データの消去単位である物理ブロックには、それぞれに固有の物理ブロックアドレス(PBA)が割り当てられている。各物理ブロックは、複数の物理ゾーンのいずれかに分類され、各物理ゾーンには、それぞれ物理ゾーン番号(PZN)が割り当てられる。各物理ゾーンに含まれる物理ブロックの各物理ゾーン内での通番を物理ゾーン内ブロック番号(PZIBN)と呼んでいる。図3の例では、物理ブロックには#0から連続するPBAが割り当てられており、PBA#0〜#1023の計1024個の物理ブロックがPZN#0の物理ゾーンに含まれ、PBA#1024〜#2047の計1024個の物理ブロックがPZN#1の物理ゾーンに含まれ、PBA#2048〜#3071の計1024個の物理ブロックがPZN#2の物理ゾーンに含まれる。
FIG. 3 shows an example of managing the storage area of the
一方、ホストシステム4側のアドレス空間も複数のゾーン(論理ゾーン)に分割され、1つの論理ゾーンに対して1つの物理ゾーンが割り当てられる。論理ゾーンに含まれる各論理ブロックに対応するデータは、その論理ゾーンに割り当てられた物理ゾーンに含まれる物理ブロックに書き込まれる。尚、論理ゾーンに含まれる論理ブロックの数は、物理ゾーンに含まれる物理ブロックの数よりも少なくなるように設定される。例えば、1000個の論理ブロックを含む論理ゾーンを、1024個の物理ブロックを含む物理ゾーンに割り当てる。このように、論理ゾーンに含まれる論理ブロックの数を、物理ゾーンに含まれる物理ブロックの数よりも少なくするのは、先天性の不良ブロックの数、及び後天的に不良化するブロックの数を考慮したものである。
On the other hand, the address space on the
又、データが書き込まれた物理ブロックの冗長領域には、書き込んだデータに対応する論理アドレス情報が書き込まれる。この論理アドレス情報は、論理ブロックに付けた通番である論理ブロック番号(LBN)であっても、各論理ゾーンに含まれる論理ブロックの各論理ゾーン内での通番である論理ゾーン内ブロック番号(LZIBN)であってもよい。 Further, logical address information corresponding to the written data is written in the redundant area of the physical block in which the data is written. Even if this logical address information is a logical block number (LBN) which is a serial number assigned to a logical block, a logical zone block number (LZIBN) which is a serial number within each logical zone of the logical block included in each logical zone. ).
次にホストシステム4側からフラッシュメモリ2の内部状態を示す情報(内部情報)を取得する手順を説明する。以下の説明では、内部情報として、図4に示したような物理ゾーン毎の不良ブロック数と空きブロック数を取得するものとする。以下、メモリコントローラ3によって物理ゾーン毎の不良ブロック数と空きブロック数に関する情報が作成され、ホストシステム4側から作成された情報が読み出されるまで(ホストシステム4側に作成された情報が転送されるまで)を、図4から図6を参照して説明する。
Next, a procedure for acquiring information (internal information) indicating the internal state of the
尚、本実施形態では、物理ゾーン毎の不良ブロック数と空きブロック数を取得するためのコマンドに対して、ATA規格では動作が規定されていないコマンドコードを割り当てている。このようなATA規格に規定されていないベンダーユニークな特殊コマンドは、ベンダーコマンドと呼ばれている。以下の説明で、物理ゾーン毎の不良ブロック数と空きブロック数を取得するためのベンダーコマンドを内部情報取得コマンドと言う。 In this embodiment, a command code whose operation is not defined in the ATA standard is assigned to a command for acquiring the number of defective blocks and the number of empty blocks for each physical zone. Such a vendor-specific special command not defined in the ATA standard is called a vendor command. In the following description, a vendor command for acquiring the number of defective blocks and the number of free blocks for each physical zone is referred to as an internal information acquisition command.
図5を参照して、本発明の第1の実施形態における内部情報の作成及び作成された内部情報のホストシステム4側からの読み出し(ホストシステム4側への転送)について説明する。第1の実施形態では、まず、ホストシステム4により、メモリコントローラ3内のコマンドレジスタ(図7に示したATAレジスタ15のコマンドレジスタ15a)に内部情報取得コマンドのコマンドコードが書き込まれる。メモリコントローラ3は、この内部情報取得コマンドに応答して物理ゾーン毎の不良ブロック数と空きブロック数に関する情報の作成を開始する。この作成処理では、各物理ブロックの冗長領域に書き込まれているブロックステータスと論理アドレス情報が順次読み出し、読み出したブロックステータスと論理アドレス情報に基づいて物理ゾーン毎の不良ブロック数と空きブロック数をカウントする。
With reference to FIG. 5, creation of internal information and reading of the created internal information from the
最初に、PBA#0〜#1023の物理ブロックの冗長領域に書き込まれているブロックステータスと論理アドレス情報を順次読み出し、PZN#0の物理ゾーンの不良ブロック数と空きブロック数をカウントする。ここで、不良ブロック数については、ブロックステータスとして不良ブロックであることを示す情報が書き込まれている物理ブロックの数がカウントされる。空きブロック数については、ブロックステータスとして不良ブロックであることを示す情報が書き込まれておらず、かつ、論理アドレス情報が書き込まれていない物理ブロックの数がカウントされる。PZN#0の物理ゾーンの不良ブロック数と空きブロック数のカウントが終了すると、PZN#0の物理ゾーンの不良ブロック数と空きブロック数がバッファ9に書き込まれる。
First, the block status and logical address information written in the redundant areas of the physical
次に、PBA#1024〜#2047の物理ブロックの冗長領域に書き込まれているブロックステータスと論理アドレス情報を順次読み出し、PZN#1の物理ゾーンの不良ブロック数と空きブロック数をカウントする。PZN#1の物理ゾーンの不良ブロック数と空きブロック数のカウントが終了すると、PZN#1の物理ゾーンの不良ブロック数と空きブロック数がバッファ9に書き込まれる。このようにして、PZN#0〜#7の物理ゾーンの不良ブロック数と空きブロック数がカウントされ、この物理ゾーン毎の不良ブロック数と空きブロック数が内部情報としてバッファ9に書き込まれる。物理ゾーン毎の不良ブロック数と空きブロック数をカウントするときは、物理ゾーン毎の不良ブロック数と空きブロック数を書き込む領域をバッファ9上に割り当て、割り当てられた領域に初期値として「0」を書き込み、不良ブロック又は空きブロックが検出されたときにそれらの領域に書き込まれている値を1ずつ増加させていってもよい。例えば、PZN#1の物理ゾーンに含まれる不良ブロックが検出されたときに、PZN#1の物理ゾーンの不良ブロック数を書き込む領域に「3」が書き込まれていた場合は、その値を「4」に書き換える。
Next, the block status and logical address information written in the redundant areas of the physical blocks PBA # 1024 to # 2047 are sequentially read, and the number of defective blocks and the number of free blocks in the physical zone of
次に、バッファ9に書き込まれた内部情報(物理ゾーン毎の不良ブロック数と空きブロック数に関する情報)のホストシステム4側からの読み出し(ホストシステム4側への転送)について説明する。
Next, reading from the
バッファ9に全ての内部情報が書き込まれたときに、メモリコントローラ3はホストシステム4に対して、その旨を通知する。この通知には、メモリコントローラ3のレディ・ビジー(R/B)端子から出力される信号が用いられる。つまり、レディ・ビジー(R/B)端子から出力される信号のレベル(ハイレベル又はローレベル)で、レディ状態又はビジー状態を示している(以下、レディ状態を示す信号をレディ信号と言い、ビジー状態を示す信号をビジー信号と言う)。例えば、ハイレベルをレディ状態に、ローレベルをビジー状態に設定した場合、バッファ9に対する内部情報の書き込みが終了するまでは、レディ・ビジー(R/B)端子からローレベル(ビジー信号)を出力し、バッファ9に対する内部情報の書き込みが終了したときにレディ・ビジー(R/B)端子からハイレベル(レディ信号)を出力する。
When all the internal information is written in the
尚、ホストシステム4に対して、バッファ9に全ての内部情報が書き込まれたことを通知する方法は、割り込み信号を出力したり、ステータスレジスタ15e内の特定のビットの論理値を書き換えたりする方法であってもよい。
A method for notifying the
メモリコントローラ3がホストシステム4に対して、バッファ9に全ての内部情報が書き込まれたことを通知すると、ホストシステム4はメモリコントローラ3のリードイネーブル(RE)端子にハイレベルとローレベルの信号を交互に入力する。メモリコントローラ3は、リードイネーブル(RE)端子に入力される信号のレベルが遷移するタイミング(ハイレベルからローレベル、又はローレベルからハイレベルに遷移するタイミング)でバッファ9に書き込まれた内部情報をデータレジスタ15dに転送する。ここで、データレジスタ15dのビット数が8ビットの場合は1バイト単位で、データレジスタ15dのビット数が16ビットの場合は2バイト単位で、バッファ9に書き込まれた内部情報が転送される。一方、ホストシステム4は、リードイネーブル(RE)端子にハイレベルとローレベルの信号を交互に入力すると共に、データレジスタ15dに保持されている情報を読み出す。
When the
このようにして、バッファ9に書き込まれた内部情報はデータレジスタ15dに転送され、ホストシステム4によって読み出される。バッファ9に書き込まれた全ての内部情報がデータレジスタ15dにされたときに、メモリコントローラ3はレディ・ビジー(R/B)端子からビジー信号を出力し、ホストシステム4は、リードイネーブル(RE)端子への信号の入力と、データレジスタ15dに保持されている情報の読み出しを終了する。
In this way, the internal information written in the
次に、図6を参照して、本発明の第2の実施形態における内部情報の作成及び作成された内部情報のホストシステム4側からの読み出し(ホストシステム4側への転送)について説明する。第2の実施形態の場合には、ホストシステム4から内部情報取得コマンドが与えられたときに不良ブロック数と空きブロック数のカウントを開始するのではなく、アドレス変換テーブルと空きブロックテーブルを作成するときに、並行して不良ブロック数と空きブロック数のカウントを行い、物理ゾーン毎の不良ブロック数と空きブロック数をワークエリア8内に保持しておく。
Next, creation of internal information and reading of the created internal information from the
その後、ホストシステム4から内部情報取得コマンドが与えられたときに、メモリコントローラ3は、ワークエリア8内に保持されている内部情報(物理ゾーン毎の不良ブロック数と空きブロック数に関する情報)をバッファ9に書き込み、レディ・ビジー(R/B)端子からレディ信号を出力する。この後、第1の実施形態の場合と同様に、バッファ9に書き込まれた内部情報はデータレジスタ15dに転送され、ホストシステム4によって読み出される。尚、アドレス変換テーブルと空きブロックテーブルを作成するときに、並行して不良ブロック数と空きブロック数のカウントをするの、アドレス変換テーブルと空きブロックテーブルを作成するときに、各物理ブロックの冗長領域に書き込まれているブロックステータスと論理アドレス情報を読み出すからである。
Thereafter, when an internal information acquisition command is given from the
ここで、アドレス変換テーブルは、論理ブロックと物理ブロックの対応関係を示したテーブルであり、空きブロックテーブルは空きブロックの物理ブロックアドレス(PBA)を示したテーブルである。このアドレス変換テーブルと空きブロックテーブルは、論理ゾーン毎に作成することができる。従って、アクセスされなかった論理ゾーンについては、アドレス変換テーブルと空きブロックテーブルが作成されない場合がある。従って、そのような場合は、ホストシステム4から内部情報取得コマンドが与えられたときに、アドレス変換テーブルと空きブロックテーブルが作成されない論理ゾーンに対応する物理ゾーンについてだけ、不良ブロック数と空きブロック数のカウントを行なう。
Here, the address conversion table is a table showing the correspondence between logical blocks and physical blocks, and the free block table is a table showing physical block addresses (PBA) of free blocks. The address conversion table and the empty block table can be created for each logical zone. Therefore, an address conversion table and an empty block table may not be created for a logical zone that has not been accessed. Therefore, in such a case, when an internal information acquisition command is given from the
この実施形態の場合、内部情報がワークエリア8内に保持されているため、第1の実施形態のようにホストシステム4から、内部情報取得コマンドを与えられたときに、不良ブロック数と空きブロック数をカウントする必要がなくなり、内部情報取得コマンドに対して速く応答できるという利点を有している。
In this embodiment, since the internal information is held in the
ただし、この実施形態の場合、空きブロック数および不良ブロック数は随時変化していくため、変化する毎に内部情報を更新する必要がある。例えば、空きブロックにユーザデータが書き込まれた場合は、対応する物理ゾーンの空きブロック数をデクリメントし(1つ減らし)、逆にユーザデータが書き込まれていたブロックが消去され空きブロックになった場合は、対応する物理ゾーンの空きブロック数をインクリメントする(1つ増やす)。不良ブロックの場合も同様に、新たな不良ブロックが発生した場合、対応する物理ゾーンの不良ブロック数をインクリメントする(1つ増やす)。 However, in this embodiment, since the number of empty blocks and the number of defective blocks change at any time, it is necessary to update the internal information every time it changes. For example, when user data is written in an empty block, the number of empty blocks in the corresponding physical zone is decremented (decremented by 1), and conversely, the block in which user data has been written is erased to become an empty block. Increments (increases by 1) the number of free blocks in the corresponding physical zone. Similarly, in the case of a defective block, when a new defective block occurs, the number of defective blocks in the corresponding physical zone is incremented (increased by one).
以上のように、本発明では、ホストシステム4から与えられるコマンド応答して、メモリコントローラ3がバッファ9に内部情報を書き込み、全ての内部情報がバッファ9に書き込まれたときに、メモリコントローラ3はその旨をホストシステム4に通知する。ホストシステム4は、この通知に応答してリードイネーブル(RE)端子にハイレベルとローレベルの信号を交互に入力すると共に、データレジスタ15dに保持されている情報を読み出す。リードイネーブル(RE)端子に入力される信号が遷移するタイミングでバッファ9に書き込まれた内部情報がデータレジスタ15dに転送されるため、ホストシステム4は、フラッシュメモリ2に記憶されているデータを読み出すときと同様の動作で内部情報を取得することができる。
As described above, according to the present invention, when the
また、本実施形態では、内部情報を、物理ゾーン毎の不良ブロック数および空きブロック数としたが、内部情報はこれらの情報に限定されるものではない。従って、内部情報は、不良ブロックの物理ブロックアドレス(PBA)等の情報であってもよい。 In the present embodiment, the internal information is the number of defective blocks and the number of empty blocks for each physical zone, but the internal information is not limited to these information. Therefore, the internal information may be information such as a physical block address (PBA) of a bad block.
また、以上述べた実施形態は全て本発明を例示的に示すものであって限定的に示すものではなく、本発明は他の種々の変形態様及び変更態様で実施することができる。従って本発明の範囲は特許請求の範囲及びその均等範囲によってのみ規定されるものである。 Moreover, all the embodiment described above shows the present invention exemplarily, and does not limit the present invention, and the present invention can be implemented in other various modifications and changes. Therefore, the scope of the present invention is defined only by the claims and their equivalents.
1 フラッシュメモリシステム
2 フラッシュメモリ
3 メモリコントローラ
4 ホストシステム
6 マイクロプロセッサ
7 ホストインターフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインターフェースブロック
11 ECCブロック
12 ROM
13 外部バス
14 内部バス
15 ATAレジスタ
15a コマンドレジスタ
15b セクタカウントレジスタ
15c LBAレジスタ
15d データレジスタ
15e ステータスレジスタ
25 ユーザ領域
26 冗長領域
DESCRIPTION OF
13
Claims (4)
前記フラッシュメモリに書き込む書き込みデータ又は前記フラッシュメモリから読み出した読み出しデータを1又は複数セクタ単位で保持するデータ保持手段と、
前記ホストシステムに対して、前記データ保持手段に転送可能なデータが保持されていることを通知する通知手段と、
前記データ保持手段に保持されているデータを、前記ホストシステムに転送するデータ転送手段と、
前記ホストシステムから与えられる指示情報に応答して、前記フラッシュメモリ内の状態に関する内部情報データを前記データ保持手段に書き込むデータ設定手段とを備え、
前記通知手段は、前記ホストシステムに転送可能な前記読み出しデータが前記データ保持手段に保持されたとき、又は前記情報設定手段による前記データ保持手段への前記内部情報データの書き込みが終了したときに、前記データ保持手段に転送可能なデータが保持されていることを通知することを特徴とするメモリコントローラ。 A memory controller for controlling access to a flash memory in which erasure of stored data is performed in units of physical blocks based on instruction information given from a host system,
Data holding means for holding write data to be written to the flash memory or read data read from the flash memory in units of one or more sectors;
Notification means for notifying the host system that data that can be transferred to the data holding means is held;
Data transfer means for transferring data held in the data holding means to the host system;
In response to the instruction information given from the host system, data setting means for writing internal information data relating to the state in the flash memory to the data holding means,
When the read data that can be transferred to the host system is held in the data holding unit, or when the writing of the internal information data to the data holding unit by the information setting unit is completed, A memory controller that notifies the data holding means that transferable data is held.
前記ホストシステムから与えられる指示情報に応答して、前記フラッシュメモリ内の状態に関する内部情報データを、前記フラッシュメモリに書き込むデータ又は前記フラッシュメモリから読み出したデータを1又は複数セクタ単位で保持するデータ保持手段に書き込むデータ設定ステップと、
前記データ保持手段への前記内部情報データの書き込みが終了したときに、前記ホストシステムに対して、前記データ保持手段に転送可能なデータが保持されていることを通知する通知ステップと、
前記データ保持手段に保持されている前記内部情報データを、前記ホストシステムに転送するデータ転送ステップと、
を含むことを特徴とするフラッシュメモリの制御方法。 A flash memory control method for controlling access to a flash memory in which erasure of stored data is performed in units of physical blocks based on instruction information given from a host system,
In response to instruction information given from the host system, data holding for holding internal information data relating to the state in the flash memory, data to be written to the flash memory, or data read from the flash memory in units of one or more sectors A data setting step for writing to the means;
A notification step of notifying the host system that data that can be transferred to the data holding means is held when the writing of the internal information data to the data holding means is completed;
A data transfer step of transferring the internal information data held in the data holding means to the host system;
A method for controlling a flash memory, comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007009970A JP4697146B2 (en) | 2007-01-19 | 2007-01-19 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007009970A JP4697146B2 (en) | 2007-01-19 | 2007-01-19 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008176606A true JP2008176606A (en) | 2008-07-31 |
JP4697146B2 JP4697146B2 (en) | 2011-06-08 |
Family
ID=39703575
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007009970A Expired - Fee Related JP4697146B2 (en) | 2007-01-19 | 2007-01-19 | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4697146B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020511714A (en) * | 2017-03-09 | 2020-04-16 | ネットアップ,インコーポレイテッド | Selective storage of data using streams in allocated areas |
US10936245B2 (en) | 2017-11-13 | 2021-03-02 | Samsung Electronics Co., Ltd. | Storage device sharing attribute information with host device to use host memory buffer and electronic device including the same |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05282857A (en) * | 1992-04-02 | 1993-10-29 | Toshiba Corp | Memory card device |
JP2003085054A (en) * | 2001-06-27 | 2003-03-20 | Mitsubishi Electric Corp | Device life warning generation system for semiconductor storage device mounted with flash memory, and method for the same |
JP2003233529A (en) * | 2002-02-07 | 2003-08-22 | Hitachi Ltd | Memory system |
JP2005071068A (en) * | 2003-08-25 | 2005-03-17 | Renesas Technology Corp | Storage device |
-
2007
- 2007-01-19 JP JP2007009970A patent/JP4697146B2/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05282857A (en) * | 1992-04-02 | 1993-10-29 | Toshiba Corp | Memory card device |
JP2003085054A (en) * | 2001-06-27 | 2003-03-20 | Mitsubishi Electric Corp | Device life warning generation system for semiconductor storage device mounted with flash memory, and method for the same |
JP2003233529A (en) * | 2002-02-07 | 2003-08-22 | Hitachi Ltd | Memory system |
JP2005071068A (en) * | 2003-08-25 | 2005-03-17 | Renesas Technology Corp | Storage device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020511714A (en) * | 2017-03-09 | 2020-04-16 | ネットアップ,インコーポレイテッド | Selective storage of data using streams in allocated areas |
JP7097379B2 (en) | 2017-03-09 | 2022-07-07 | ネットアップ,インコーポレイテッド | Selective storage of data allocation area using streams |
US10936245B2 (en) | 2017-11-13 | 2021-03-02 | Samsung Electronics Co., Ltd. | Storage device sharing attribute information with host device to use host memory buffer and electronic device including the same |
US11435943B2 (en) | 2017-11-13 | 2022-09-06 | Samsung Electronics Co., Ltd. | Storage device sharing attribute information with host device to use host memory buffer and electronic device including the same |
Also Published As
Publication number | Publication date |
---|---|
JP4697146B2 (en) | 2011-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9268687B2 (en) | Data writing method, memory control circuit unit and memory storage apparatus | |
JP4373943B2 (en) | Memory controller, flash memory system, and flash memory control method | |
US9383929B2 (en) | Data storing method and memory controller and memory storage device using the same | |
US20070047308A1 (en) | Memory controller, flash memory system and control method for flash memory | |
US9778862B2 (en) | Data storing method for preventing data losing during flush operation, memory control circuit unit and memory storage apparatus | |
JP4661497B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4636005B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4697146B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP2005115562A (en) | Flash rom controller | |
JP4655034B2 (en) | Memory controller, flash memory system, and flash memory control method | |
US9830077B2 (en) | Data writing method, memory control circuit unit and memory storage apparatus | |
JP4710918B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP4241741B2 (en) | Memory controller and flash memory system | |
JP4273106B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP2005292925A (en) | Memory controller, flash memory system, and control method for flash memory | |
JP3934659B1 (en) | Memory controller and flash memory system | |
JP4661748B2 (en) | MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD | |
JP6260395B2 (en) | Memory controller, memory system, and memory control method | |
JP4177301B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP2006178909A (en) | Memory controller, flash memory system and method for controlling flash memory | |
JP4254930B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP4273109B2 (en) | Memory controller and flash memory system | |
JP4273038B2 (en) | Memory controller, flash memory system, and flash memory data transfer method | |
JP4366283B2 (en) | Memory controller and flash memory system including the memory controller | |
JP2005293177A (en) | Memory controller and flash memory system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100728 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100803 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20100730 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100927 |
|
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: 20110201 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110214 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4697146 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |