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 PDF

Info

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
Application number
JP2007009970A
Other languages
Japanese (ja)
Other versions
JP4697146B2 (en
Inventor
Takeo Kikuchi
健雄 菊池
Sukenao Kobayashi
資尚 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TDK Corp
Original Assignee
TDK Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TDK Corp filed Critical TDK Corp
Priority to JP2007009970A priority Critical patent/JP4697146B2/en
Publication of JP2008176606A publication Critical patent/JP2008176606A/en
Application granted granted Critical
Publication of JP4697146B2 publication Critical patent/JP4697146B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Read Only Memory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently transmit internal information in a flash memory system required from a host system side to a host system side in a flash memory system connected to an ATA interface, and enable the host system to acquire status information longer than the length of a status register from a flash memory with a simple means. <P>SOLUTION: A memory controller writes internal information about a status in the flash memory in a buffer responding to instruction information given from the host system, and when writing of internal information to the buffer is completed, notifies the host system that data which can be transmitted to the buffer is held, and transmits the internal information currently held in the buffer to the host system. The host system can acquire internal information by the same operation as when reading data stored in the flash memory. <P>COPYRIGHT: (C)2008,JPO&INPIT

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 ATA register 15 such as a command register 15a, a sector count register 15b, an LBA (Logical Block Address) register 15c, a data register 15d, and a status register 15e. It has. By writing to or reading from the ATA register 15, access is made to peripheral devices connected to the ATA interface. Therefore, even in the case of a flash memory system in which the peripheral device uses a flash memory as a storage medium, when accessing the flash memory system from the host system side, the access is made by setting instruction information such as commands and addresses in the ATA register 15. Done.

例えば、ホストシステム側からフラッシュメモリシステムに対して、読み出し若しくは書き込みを実行する場合、ホストシステム側から、読み出し若しくは書き込みを実行するセクタの先頭アドレスが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 LBA register 15c from the host system side, and the number of sectors to be read or the sector to be written The number is set in the sector count register 15b, and a read or write command is set in the command register 15a. Based on this setting, in the case of writing, data is written to the flash memory, and in the case of reading, data is read from the flash memory.

また、ホストシステムは、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 status register 15e. That is, when it is desired to know the state of the peripheral device connected to the ATA interface, information set in the status register 15e (hereinafter referred to as status information) is disclosed in Patent Document 1 below. Read out. Predetermined information is assigned to each bit of the status register 15e. Therefore, the state of the peripheral device can be determined based on the logical value of each bit of the status information read from the status register 15e.

特開2005−71560号公報JP 2005-71560 A

しかしながら、ステータスレジスタ15eから読み出されたステータス情報からは、ステータスレジスタ15eの各ビットに割り当てられている情報だけしか知ることができない。従って、ATAインターフェースに接続されたフラッシュメモリシステムでは、フラッシュメモリ内の不良ブロック数、空きブロック数等の内部状態を示す情報(以下、内部情報と言う)を取得することができかった。   However, only the information assigned to each bit of the status register 15e can be known from the status information read from the status register 15e. Therefore, in the flash memory system connected to the ATA interface, information indicating the internal state such as the number of defective blocks and the number of free blocks in the flash memory (hereinafter referred to as internal information) could not be acquired.

そこで、本発明は、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 flash memory system 1 according to the present invention. As shown in FIG. 1, a flash memory system 1 includes a flash memory 2 that is a NAND flash memory and a controller 3 that controls the flash memory 2.

なお、フラッシュメモリシステム1は、外部バス13を介してホストシステム4と接続される。ホストシステム4は、ホストシステム4の全体の動作を制御するためのCPU(Central Processing Unit)、フラッシュメモリシステム1との情報の授受を担うコンパニオンチップ等から構成される。ホストシステム4は、例えば、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置であってもよい。   The flash memory system 1 is connected to the host system 4 via the external bus 13. The host system 4 includes a CPU (Central Processing Unit) for controlling the entire operation of the host system 4, a companion chip for transferring information to and from the flash memory system 1, and the like. The host system 4 may be various information processing apparatuses such as a personal computer and a digital still camera that process various types of information such as characters, sounds, and image information.

フラッシュメモリ2は、不揮発性メモリであり、レジスタと、メモリセルアレイと、から構成される。フラッシュメモリ2は、レジスタとメモリセルアレイとの間でデータの書き込み又は読み出しを行なう。   The flash memory 2 is a non-volatile memory and includes a register and a memory cell array. The flash memory 2 writes or reads data between the register and the memory cell array.

メモリセルアレイは、複数のメモリセル群と、ワード線と、を備える。各メモリセル群は、複数のメモリセルが直列に接続されたものである。ワード線は、メモリセル群の特定のメモリセルを選択するためのものである。このワード線を介して選択されたメモリセルとレジスタとの間で、データの書き込み又は読み出しが行われる。   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 flash memory 2 which is a NAND flash memory. The flash memory 2 includes “pages” and “blocks (physical blocks)”.

ページは、フラッシュメモリ2にて行われるデータ読み出し動作及びデータ書き込み動作における処理単位である。物理ブロックは、フラッシュメモリ2にて行われるデータ消去動作における処理単位であり、複数個のページで構成されている。   A page is a processing unit in a data read operation and a data write operation performed in the flash memory 2. The physical block is a processing unit in the data erasing operation performed in the flash memory 2, and is composed of a plurality of pages.

上記物理ブロックとページの構成は、フラッシュメモリの仕様によって異なるが、図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) user area 25 and a 16-byte redundant area 26. It consists of In the large block configuration, as shown in FIG. 2B, one block is composed of 64 pages (P0 to P63), and each page has a user area 25 of 2048 bytes (4 sectors) and a redundancy of 64 bytes. The area 26 is configured.

ここで、ユーザ領域25は、ホストシステム4から供給されるユーザデータを記憶するための領域である。   Here, the user area 25 is an area for storing user data supplied from the host system 4.

また、冗長領域26は、誤り訂正符号、論理アドレス情報、ブロックステータス等の付加データを記憶するための領域である。   The redundant area 26 is an area for storing additional data such as an error correction code, logical address information, and block status.

誤り訂正符号は、ユーザ領域25に記憶されているユーザデータに含まれる誤りを検出し、訂正するためのデータである。   The error correction code is data for detecting and correcting an error included in user data stored in the user area 25.

論理アドレス情報は、物理ブロックに有効なユーザデータが記憶されている場合に、そのユーザデータに対応する論理ブロックを特定するために用いられる情報である。論理ブロックは、ホストシステム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 host system 4 side, and the logical address and flash memory managed by the host system 4 are managed by managing the correspondence between the logical block and the physical block. 2 is managed. The address space on the host system 4 side is managed by an LBA (Logical Block Address) which is a serial number assigned to an area divided in units of sectors (512 bytes). The host system 4 designates an access area in the flash memory 2 with this LBA.

物理ブロックに有効なユーザデータが記憶されていない場合、その物理ブロックの冗長領域26には、冗長領域26に、論理アドレス情報が書き込まれていない。従って、冗長領域26に論理アドレス情報が書き込まれているか否かで、その物理ブロックが空きブロック(消去済ブロック)であるか否かを判断することができる。つまり、論理アドレス情報が書き込まれていない場合は、空きブロック(消去済ブロック)であると判断される。   When valid user data is not stored in the physical block, the logical address information is not written in the redundant area 26 of the physical block. Accordingly, whether or not the physical block is an empty block (erased block) can be determined based on whether or not the logical address information is written in the redundant area 26. That is, if logical address information is not written, it is determined that the block is an empty block (erased block).

ブロックステータスは、その物理ブロックが不良ブロック(正常にデータの書き込み等を行なうことができない物理ブロック)であるか否かを示す情報であり、この情報に基づいて不良ブロックであるか否かが識別される。従って、不良ブロックであると判断された物理ブロックの冗長領域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 redundant area 26 of the physical block determined to be a defective block.

このようなフラッシュメモリ2は、コントローラ3から、データ、アドレス情報、内部コマンド等を受信して、データの読み出し、書き込み、消去等の各動作を実行する。   Such a flash memory 2 receives data, address information, internal commands, and the like from the controller 3 and executes operations such as data reading, writing, and erasing.

コントローラ3は、図1に示すように、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(Error Correcting Code)ブロック11と、ROM(Read Only Memory)12と、から構成される。これら機能ブロックによって構成されるコントローラ3は、一つの半導体チップ上に集積される。以下に各機能ブロックについて説明する。   As shown in FIG. 1, the controller 3 includes a microprocessor 6, a host interface block 7, a work area 8, a buffer 9, a flash memory interface block 10, an ECC (Error Correcting Code) block 11, a ROM ( Read Only Memory) 12. The controller 3 constituted by these functional blocks is integrated on one semiconductor chip. Each functional block will be described below.

マイクロプロセッサ6は、ROM12に記憶されているプログラムに従って、コントローラ3の全体の動作を制御する。例えば、マイクロプロセッサ6は、各種処理等を定義したコマンドセット(シーケンスコマンド)をROM12から読み出してフラッシュメモリインターフェースブロック10に供給し、フラッシュメモリインターフェースブロック10に処理を実行させる。   The microprocessor 6 controls the overall operation of the controller 3 in accordance with a program stored in the ROM 12. For example, the microprocessor 6 reads a command set (sequence command) defining various processes from the ROM 12, supplies the command set to the flash memory interface block 10, and causes the flash memory interface block 10 to execute processes.

ホストインターフェースブロック7は、ホストシステム4との間の、データ、アドレス情報、ステータス情報、外部コマンド等の授受を行なう。ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインターフェースブロック7を入口としてフラッシュメモリシステム1の内部(例えば、バッファ9)に取り込まれる。また、フラッシュメモリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口としてホストシステム4に供給される。   The host interface block 7 exchanges data, address information, status information, external commands, and the like with the host system 4. Data or the like supplied from the host system 4 to the flash memory system 1 is taken into the flash memory system 1 (for example, the buffer 9) using the host interface block 7 as an entrance. Data supplied from the flash memory system 1 to the host system 4 is supplied to the host system 4 through the host interface block 7 as an exit.

ワークエリア8は、フラッシュメモリ2の制御等に必要なデータが一時的に記憶される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成される。ワークエリア8には、例えば、論理アドレスと物理アドレスを変換するためのアドレス変換テーブル、空きブロックを検索する空きブロック検索テーブルなどが記憶される。   The work area 8 is a work area in which data necessary for controlling the flash memory 2 and the like is temporarily stored, and includes a plurality of SRAM (Static Random Access Memory) cells. The work area 8 stores, for example, an address conversion table for converting a logical address and a physical address, an empty block search table for searching for an empty block, and the like.

バッファ9は、フラッシュメモリ2から読み出されたデータ及びフラッシュメモリ2に書き込むべきデータを1セクタ単位又は複数セクタ単位で一時的に保持する。すなわち、フラッシュメモリ2から読み出されたデータは、ホストシステム4が受け取り可能な状態となるまでバッファ9に保持され、フラッシュメモリ2に書き込むべきデータは、フラッシュメモリ2が書き込み可能な状態となるまでバッファ9に保持される。   The buffer 9 temporarily holds data read from the flash memory 2 and data to be written to the flash memory 2 in units of one sector or a plurality of sectors. That is, data read from the flash memory 2 is held in the buffer 9 until the host system 4 can receive the data, and data to be written to the flash memory 2 is stored until the flash memory 2 becomes writable. It is held in the buffer 9.

フラッシュメモリインターフェースブロック10は、バッファ9からフラッシュメモリ2への書き込み処理やフラッシュメモリ2からバッファ9への読み出し処理を制御するブロックである。書き込み処理や読み出し処理を実行するときの一連の制御動作は、ROM12に記憶されている一連の制御動作を指示するシーケンスコマンドに基づいて実行される。   The flash memory interface block 10 is a block that controls writing processing from the buffer 9 to the flash memory 2 and reading processing from the flash memory 2 to the buffer 9. A series of control operations when executing the writing process and the reading process are executed based on a sequence command instructing a series of control operations stored in the ROM 12.

ECCブロック11は、フラッシュメモリ2に書き込むデータに付加される誤り訂正符号(ECC:Error Correcting Code)を生成するとともに、フラッシュメモリ2から読み出したデータに付加された誤り訂正符号(ECC)に基づいて、読み出したデータに含まれる誤りを検出・訂正する。   The ECC block 11 generates an error correcting code (ECC) to be added to data to be written to the flash memory 2, and based on the error correcting code (ECC) added to the data read from the flash memory 2. Then, an error included in the read data is detected and corrected.

ROM12は、マイクロプロセッサ6によって実行される処理の手順を定義するプログラム等を格納する不揮発性の記憶素子である。具体的には、ROM12は、例えば、アドレス変換テーブルの作成等の処理手順を定義するプログラムを格納する。   The ROM 12 is a non-volatile storage element that stores a program or the like that defines the procedure of processing executed by the microprocessor 6. Specifically, the ROM 12 stores a program that defines a processing procedure such as creation of an address conversion table, for example.

次にフラッシュメモリの記憶領域の管理方法について説明する。フラッシュメモリの記憶容量の大容量化が進んでいることにより、大容量化したフラッシュメモリの記憶領域を円滑に管理するため、この記憶領域を複数のゾーンに分割して管理する手法が用いられている。   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 flash memory 2 by dividing it into a plurality of zones (physical zones). A unique physical block address (PBA) is assigned to each physical block which is an erase unit of stored data. Each physical block is classified into one of a plurality of physical zones, and a physical zone number (PZN) is assigned to each physical zone. A serial number in each physical zone of a physical block included in each physical zone is called an intra-physical zone block number (PZIBN). In the example of FIG. 3, PBA continuous from # 0 is assigned to the physical block, and a total of 1024 physical blocks of PBA # 0 to # 1023 are included in the physical zone of PZN # 0, and PBA # 1024 to A total of 1024 physical blocks of # 2047 are included in the physical zone of PZN # 1, and a total of 1024 physical blocks of PBA # 2048 to # 3071 are included in the physical zone of PZN # 2.

一方、ホストシステム4側のアドレス空間も複数のゾーン(論理ゾーン)に分割され、1つの論理ゾーンに対して1つの物理ゾーンが割り当てられる。論理ゾーンに含まれる各論理ブロックに対応するデータは、その論理ゾーンに割り当てられた物理ゾーンに含まれる物理ブロックに書き込まれる。尚、論理ゾーンに含まれる論理ブロックの数は、物理ゾーンに含まれる物理ブロックの数よりも少なくなるように設定される。例えば、1000個の論理ブロックを含む論理ゾーンを、1024個の物理ブロックを含む物理ゾーンに割り当てる。このように、論理ゾーンに含まれる論理ブロックの数を、物理ゾーンに含まれる物理ブロックの数よりも少なくするのは、先天性の不良ブロックの数、及び後天的に不良化するブロックの数を考慮したものである。   On the other hand, the address space on the host system 4 side is also divided into a plurality of zones (logical zones), and one physical zone is assigned to one logical zone. Data corresponding to each logical block included in the logical zone is written into a physical block included in the physical zone assigned to the logical zone. Note that the number of logical blocks included in the logical zone is set to be smaller than the number of physical blocks included in the physical zone. For example, a logical zone including 1000 logical blocks is allocated to a physical zone including 1024 physical blocks. In this way, the number of logical blocks included in the logical zone is made smaller than the number of physical blocks included in the physical zone because the number of congenital bad blocks and the number of blocks that are acquired badly are reduced. It is taken into consideration.

又、データが書き込まれた物理ブロックの冗長領域には、書き込んだデータに対応する論理アドレス情報が書き込まれる。この論理アドレス情報は、論理ブロックに付けた通番である論理ブロック番号(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 flash memory 2 from the host system 4 side will be described. In the following description, it is assumed that the number of defective blocks and the number of free blocks for each physical zone as shown in FIG. 4 are acquired as internal information. Hereinafter, the memory controller 3 creates information regarding the number of bad blocks and the number of free blocks for each physical zone, and the information created from the host system 4 side is read (information created on the host system 4 side is transferred). Will be described with reference to FIGS.

尚、本実施形態では、物理ゾーン毎の不良ブロック数と空きブロック数を取得するためのコマンドに対して、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 host system 4 side (transfer to the host system 4 side) in the first embodiment of the present invention will be described. In the first embodiment, first, the host system 4 writes the command code of the internal information acquisition command in the command register (command register 15a of the ATA register 15 shown in FIG. 7) in the memory controller 3. In response to this internal information acquisition command, the memory controller 3 starts creating information on the number of defective blocks and the number of free blocks for each physical zone. In this creation process, the block status and logical address information written in the redundant area of each physical block are read sequentially, and the number of defective blocks and free blocks for each physical zone are counted based on the read block status and logical address information. To do.

最初に、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 blocks PBA # 0 to # 1023 are sequentially read, and the number of defective blocks and the number of free blocks in the physical zone of PZN # 0 are counted. Here, regarding the number of defective blocks, the number of physical blocks in which information indicating a defective block is written as a block status is counted. As for the number of free blocks, the number of physical blocks in which no information indicating a bad block is written as the block status and logical address information is not written is counted. When counting of the number of bad blocks and the number of free blocks in the physical zone of PZN # 0 is completed, the number of bad blocks and the number of free blocks in the physical zone of PZN # 0 are written into the buffer 9.

次に、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 PZN # 1 are counted. When counting of the number of bad blocks and the number of free blocks in the physical zone of PZN # 1 is completed, the number of bad blocks and the number of free blocks in the physical zone of PZN # 1 are written to the buffer 9. In this way, the number of bad blocks and the number of free blocks in the physical zones PZN # 0 to # 7 are counted, and the number of bad blocks and the number of free blocks for each physical zone are written in the buffer 9 as internal information. When counting the number of bad blocks and the number of free blocks for each physical zone, an area for writing the number of bad blocks and the number of free blocks for each physical zone is allocated on the buffer 9, and “0” is set as an initial value in the allocated area. When writing, bad blocks, or empty blocks are detected, the values written in those areas may be increased by one. For example, if a bad block included in the physical zone of PZN # 1 is detected and “3” is written in the area for writing the number of bad blocks in the physical zone of PZN # 1, the value is set to “4”. To "".

次に、バッファ9に書き込まれた内部情報(物理ゾーン毎の不良ブロック数と空きブロック数に関する情報)のホストシステム4側からの読み出し(ホストシステム4側への転送)について説明する。   Next, reading from the host system 4 side (transfer to the host system 4 side) of internal information (information regarding the number of defective blocks and the number of empty blocks for each physical zone) written in the buffer 9 will be described.

バッファ9に全ての内部情報が書き込まれたときに、メモリコントローラ3はホストシステム4に対して、その旨を通知する。この通知には、メモリコントローラ3のレディ・ビジー(R/B)端子から出力される信号が用いられる。つまり、レディ・ビジー(R/B)端子から出力される信号のレベル(ハイレベル又はローレベル)で、レディ状態又はビジー状態を示している(以下、レディ状態を示す信号をレディ信号と言い、ビジー状態を示す信号をビジー信号と言う)。例えば、ハイレベルをレディ状態に、ローレベルをビジー状態に設定した場合、バッファ9に対する内部情報の書き込みが終了するまでは、レディ・ビジー(R/B)端子からローレベル(ビジー信号)を出力し、バッファ9に対する内部情報の書き込みが終了したときにレディ・ビジー(R/B)端子からハイレベル(レディ信号)を出力する。   When all the internal information is written in the buffer 9, the memory controller 3 notifies the host system 4 to that effect. For this notification, a signal output from the ready / busy (R / B) terminal of the memory controller 3 is used. That is, the level (high level or low level) of the signal output from the ready / busy (R / B) terminal indicates a ready state or a busy state (hereinafter, a signal indicating the ready state is referred to as a ready signal, A signal indicating a busy state is called a busy signal). For example, when the high level is set to the ready state and the low level is set to the busy state, the low level (busy signal) is output from the ready / busy (R / B) terminal until the writing of the internal information to the buffer 9 is completed. When the writing of internal information to the buffer 9 is completed, a high level (ready signal) is output from the ready / busy (R / B) terminal.

尚、ホストシステム4に対して、バッファ9に全ての内部情報が書き込まれたことを通知する方法は、割り込み信号を出力したり、ステータスレジスタ15e内の特定のビットの論理値を書き換えたりする方法であってもよい。   A method for notifying the host system 4 that all internal information has been written to the buffer 9 is a method of outputting an interrupt signal or rewriting the logical value of a specific bit in the status register 15e. It may be.

メモリコントローラ3がホストシステム4に対して、バッファ9に全ての内部情報が書き込まれたことを通知すると、ホストシステム4はメモリコントローラ3のリードイネーブル(RE)端子にハイレベルとローレベルの信号を交互に入力する。メモリコントローラ3は、リードイネーブル(RE)端子に入力される信号のレベルが遷移するタイミング(ハイレベルからローレベル、又はローレベルからハイレベルに遷移するタイミング)でバッファ9に書き込まれた内部情報をデータレジスタ15dに転送する。ここで、データレジスタ15dのビット数が8ビットの場合は1バイト単位で、データレジスタ15dのビット数が16ビットの場合は2バイト単位で、バッファ9に書き込まれた内部情報が転送される。一方、ホストシステム4は、リードイネーブル(RE)端子にハイレベルとローレベルの信号を交互に入力すると共に、データレジスタ15dに保持されている情報を読み出す。   When the memory controller 3 notifies the host system 4 that all internal information has been written to the buffer 9, the host system 4 sends high level and low level signals to the read enable (RE) terminal of the memory controller 3. Input alternately. The memory controller 3 stores the internal information written in the buffer 9 at the timing at which the level of the signal input to the read enable (RE) terminal transitions (timing from high level to low level or from low level to high level). Transfer to the data register 15d. Here, the internal information written in the buffer 9 is transferred in units of 1 byte when the number of bits of the data register 15d is 8 bits, and in units of 2 bytes when the number of bits of the data register 15d is 16 bits. On the other hand, the host system 4 alternately inputs a high level signal and a low level signal to a read enable (RE) terminal, and reads information held in the data register 15d.

このようにして、バッファ9に書き込まれた内部情報はデータレジスタ15dに転送され、ホストシステム4によって読み出される。バッファ9に書き込まれた全ての内部情報がデータレジスタ15dにされたときに、メモリコントローラ3はレディ・ビジー(R/B)端子からビジー信号を出力し、ホストシステム4は、リードイネーブル(RE)端子への信号の入力と、データレジスタ15dに保持されている情報の読み出しを終了する。   In this way, the internal information written in the buffer 9 is transferred to the data register 15 d and read by the host system 4. When all the internal information written in the buffer 9 is stored in the data register 15d, the memory controller 3 outputs a busy signal from the ready / busy (R / B) terminal, and the host system 4 reads the read enable (RE). The input of the signal to the terminal and the reading of the information held in the data register 15d are finished.

次に、図6を参照して、本発明の第2の実施形態における内部情報の作成及び作成された内部情報のホストシステム4側からの読み出し(ホストシステム4側への転送)について説明する。第2の実施形態の場合には、ホストシステム4から内部情報取得コマンドが与えられたときに不良ブロック数と空きブロック数のカウントを開始するのではなく、アドレス変換テーブルと空きブロックテーブルを作成するときに、並行して不良ブロック数と空きブロック数のカウントを行い、物理ゾーン毎の不良ブロック数と空きブロック数をワークエリア8内に保持しておく。   Next, creation of internal information and reading of the created internal information from the host system 4 side (transfer to the host system 4 side) according to the second embodiment of the present invention will be described with reference to FIG. In the case of the second embodiment, instead of starting counting the number of defective blocks and the number of free blocks when an internal information acquisition command is given from the host system 4, an address conversion table and a free block table are created. At the same time, the number of defective blocks and the number of free blocks are counted in parallel, and the number of defective blocks and the number of free blocks for each physical zone are held in the work area 8.

その後、ホストシステム4から内部情報取得コマンドが与えられたときに、メモリコントローラ3は、ワークエリア8内に保持されている内部情報(物理ゾーン毎の不良ブロック数と空きブロック数に関する情報)をバッファ9に書き込み、レディ・ビジー(R/B)端子からレディ信号を出力する。この後、第1の実施形態の場合と同様に、バッファ9に書き込まれた内部情報はデータレジスタ15dに転送され、ホストシステム4によって読み出される。尚、アドレス変換テーブルと空きブロックテーブルを作成するときに、並行して不良ブロック数と空きブロック数のカウントをするの、アドレス変換テーブルと空きブロックテーブルを作成するときに、各物理ブロックの冗長領域に書き込まれているブロックステータスと論理アドレス情報を読み出すからである。   Thereafter, when an internal information acquisition command is given from the host system 4, the memory controller 3 buffers internal information (information on the number of defective blocks and the number of free blocks for each physical zone) held in the work area 8. 9 is written and a ready signal is output from the ready / busy (R / B) terminal. Thereafter, as in the case of the first embodiment, the internal information written in the buffer 9 is transferred to the data register 15 d and read by the host system 4. When creating the address translation table and the free block table, the number of defective blocks and the number of free blocks are counted in parallel. When creating the address translation table and the free block table, the redundant area of each physical block. This is because the block status and the logical address information written in are read out.

ここで、アドレス変換テーブルは、論理ブロックと物理ブロックの対応関係を示したテーブルであり、空きブロックテーブルは空きブロックの物理ブロックアドレス(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 host system 4, the number of defective blocks and the number of free blocks are only obtained for the physical zone corresponding to the logical zone in which the address conversion table and the free block table are not created. Count.

この実施形態の場合、内部情報がワークエリア8内に保持されているため、第1の実施形態のようにホストシステム4から、内部情報取得コマンドを与えられたときに、不良ブロック数と空きブロック数をカウントする必要がなくなり、内部情報取得コマンドに対して速く応答できるという利点を有している。   In this embodiment, since the internal information is held in the work area 8, when the internal information acquisition command is given from the host system 4 as in the first embodiment, the number of defective blocks and the free block There is no need to count the number, and there is an advantage that it can respond quickly to the internal information acquisition command.

ただし、この実施形態の場合、空きブロック数および不良ブロック数は随時変化していくため、変化する毎に内部情報を更新する必要がある。例えば、空きブロックにユーザデータが書き込まれた場合は、対応する物理ゾーンの空きブロック数をデクリメントし(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 memory controller 3 writes internal information to the buffer 9 and all internal information is written to the buffer 9 in response to a command given from the host system 4, the memory controller 3 This is notified to the host system 4. In response to this notification, the host system 4 alternately inputs a high level signal and a low level signal to the read enable (RE) terminal, and reads the information held in the data register 15d. Since the internal information written in the buffer 9 is transferred to the data register 15d at the timing when the signal input to the read enable (RE) terminal transitions, the host system 4 reads the data stored in the flash memory 2. Internal information can be acquired by the same operation as when.

また、本実施形態では、内部情報を、物理ゾーン毎の不良ブロック数および空きブロック数としたが、内部情報はこれらの情報に限定されるものではない。従って、内部情報は、不良ブロックの物理ブロックアドレス(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 is a block diagram schematically showing a flash memory system in an embodiment of the present invention. FIG. フラッシュメモリのブロックとページの関係を示す説明図である。It is explanatory drawing which shows the relationship between the block of a flash memory, and a page. ゾーンに分割して管理したフラッシュメモリの記憶領域の一例である。It is an example of a storage area of a flash memory that is divided into zones and managed. 本発明の実施形態における内部情報の一例である。It is an example of the internal information in the embodiment of the present invention. 本発明の第1の実施形態におけるメモリコントローラの動作を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining an operation of the memory controller according to the first embodiment of the present invention. 本発明の第2の実施形態におけるメモリコントローラの動作を説明するための説明図である。It is explanatory drawing for demonstrating operation | movement of the memory controller in the 2nd Embodiment of this invention. ATAレジスタを概略的に示す図である。It is a figure which shows an ATA register schematically.

符号の説明Explanation of symbols

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 SYMBOLS 1 Flash memory system 2 Flash memory 3 Memory controller 4 Host system 6 Microprocessor 7 Host interface block 8 Work area 9 Buffer 10 Flash memory interface block 11 ECC block 12 ROM
13 External Bus 14 Internal Bus 15 ATA Register 15a Command Register 15b Sector Count Register 15c LBA Register 15d Data Register 15e Status Register 25 User Area 26 Redundant Area

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に記載のメモリコントローラ。   2. The memory controller according to claim 1, wherein the internal information is the number of defective blocks and the number of empty blocks in the flash memory. 請求項1又は2に記載のメモリコントローラとフラッシュメモリを備えることを特徴とするフラッシュメモリシステム。   A flash memory system comprising the memory controller according to claim 1 and a flash memory. ホストシステムから与えられる指示情報に基づいて、記憶データの消去が物理ブロック単位で行われるフラッシュメモリへのアクセスを制御するフラッシュメモリの制御方法であって、
前記ホストシステムから与えられる指示情報に応答して、前記フラッシュメモリ内の状態に関する内部情報データを、前記フラッシュメモリに書き込むデータ又は前記フラッシュメモリから読み出したデータを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:
JP2007009970A 2007-01-19 2007-01-19 MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Expired - Fee Related JP4697146B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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