JP2009217603A - Memory system - Google Patents

Memory system Download PDF

Info

Publication number
JP2009217603A
JP2009217603A JP2008061346A JP2008061346A JP2009217603A JP 2009217603 A JP2009217603 A JP 2009217603A JP 2008061346 A JP2008061346 A JP 2008061346A JP 2008061346 A JP2008061346 A JP 2008061346A JP 2009217603 A JP2009217603 A JP 2009217603A
Authority
JP
Japan
Prior art keywords
data
cluster
track
logical
unit
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
JP2008061346A
Other languages
Japanese (ja)
Other versions
JP4643671B2 (en
Inventor
Junji Yano
純二 矢野
Hidenori Matsuzaki
秀則 松崎
Kosuke Hatsuda
幸輔 初田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008061346A priority Critical patent/JP4643671B2/en
Priority to US12/394,875 priority patent/US8706950B2/en
Publication of JP2009217603A publication Critical patent/JP2009217603A/en
Application granted granted Critical
Publication of JP4643671B2 publication Critical patent/JP4643671B2/en
Priority to US14/199,808 priority patent/US9201717B2/en
Priority to US14/923,028 priority patent/US20160062675A1/en
Priority to US16/293,144 priority patent/US10901625B2/en
Priority to US17/124,954 priority patent/US11409442B2/en
Priority to US17/880,546 priority patent/US20220374151A1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory system for preventing writen-in of data from becoming suddenly disabled. <P>SOLUTION: A memory system includes a DRAM from which data are read out/in which the data are written, wherein data are managed by a cluster unit as the magnification of a natural number which is 2 or larger of a sector; an NAND memory, from which data are read out and in which data are written, wherein the data are managed by the cluster unit or the like, and erased by a block unit; and a controller for writing data requested by a host device in the NAND memory via the DRAM, and for reading out data requested by the host device from the NAND memory, and for transferring the data via the DRAM to the host device. The controller manages the number of bad clusters and the number of bad blocks generated in the NAND memory, and switches, according to the number of bad clusters and/or the number of bad clusters, the operation mode in writing data from the host device to the NAND memory. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、不揮発性半導体メモリを備えたメモリシステムに関する。   The present invention relates to a memory system including a nonvolatile semiconductor memory.

コンピュータシステムに用いられる外部記憶装置として、NAND型フラッシュメモリなどの不揮発性半導体メモリを搭載したSSD(Solid State Drive)が注目されている。フラッシュメモリは、磁気ディスク装置に比べ、高速、軽量などの利点を有している。   As an external storage device used in a computer system, an SSD (Solid State Drive) equipped with a nonvolatile semiconductor memory such as a NAND flash memory has attracted attention. The flash memory has advantages such as high speed and light weight compared with the magnetic disk device.

SSD内には、複数のフラッシュメモリチップ、ホスト装置からの要求に応じて各フラッシュメモリチップのリード/ライト制御を行うコントローラ、各フラッシュメモリチップとホスト装置との間でデータ転送を行うためのバッファメモリ、電源回路、ホスト装置に対する接続インタフェースなどを備えている(例えば、特許文献1参照)。   The SSD includes a plurality of flash memory chips, a controller that performs read / write control of each flash memory chip in response to a request from the host device, and a buffer that performs data transfer between each flash memory chip and the host device. A memory, a power supply circuit, a connection interface for a host device, and the like are provided (for example, see Patent Document 1).

不揮発性半導体メモリには、NAND型フラッシュメモリのように、データを記憶させる場合にブロック単位で一度データを消去してからその後に書き込みを行うもの、ページ単位で書き込み/読み出しを行うものなど、消去/書き込み/読み出しの単位が固定されているものがある。   Non-volatile semiconductor memory, such as NAND flash memory, erases data that is erased once in blocks and then written, or that performs writing / reading in pages. Some units have fixed / write / read units.

一方、パーソナルコンピュータなどのホスト機器がハードディスクをはじめとする2次記憶装置に対してデータの書き込み/読み出しを行う単位は、セクタと呼ばれる。セクタは、半導体記憶装置の消去/書き込み/読み出しの単位とは独立に定められる。   On the other hand, a unit in which a host device such as a personal computer writes / reads data to / from a secondary storage device such as a hard disk is called a sector. The sector is determined independently of the unit of erasing / writing / reading of the semiconductor memory device.

例えば、不揮発性半導体メモリのブロックの大きさ(ブロックサイズ)は、512kB、ページの大きさ(ページサイズ)は、4kBであるのに対して、ホスト機器のセクタの大きさ(セクタサイズ)は、512Bのように定められている。   For example, the block size (block size) of the nonvolatile semiconductor memory is 512 kB and the page size (page size) is 4 kB, whereas the sector size (sector size) of the host device is It is determined as 512B.

このように、不揮発性半導体メモリの消去/書き込み/読み出しの単位は、ホスト機器の書き込み/読み出しの単位よりも大きい場合がある。   As described above, the erase / write / read unit of the nonvolatile semiconductor memory may be larger than the write / read unit of the host device.

ところで、SSDにおいては、フラッシュメモリとホスト装置との間に、キャッシュメモリを介在させて、フラッシュメモリから高速にデータを読み出すように構成されたSSDが開示されている(例えば、特許文献2参照)。このようなキャッシュメモリを有したメモリシステムでは、データの書き込み要求が発生した際にキャッシュメモリが満杯であれば、キャッシュメモリからフラッシュメモリへのデータ追い出しを行ってから、キャッシュメモリにデータが書き込まれる。   By the way, in the SSD, an SSD configured to read data from the flash memory at high speed by interposing a cache memory between the flash memory and the host device is disclosed (for example, see Patent Document 2). . In a memory system having such a cache memory, if the cache memory is full when a data write request occurs, data is written from the cache memory to the flash memory and then written to the cache memory. .

また、フラッシュメモリを用いてパーソナルコンピュータの二次記憶装置を構成する場合、誤りが多いなどの理由によって記憶領域として使用できなくなるブロック(不良ブロック)や、読み出せなくなる領域(不良領域)などが生じる場合がある。このような不良ブロック数や不良領域数が上限値を超えた場合には、新たな不良ブロックや不良領域を登録することができないので、キャッシュメモリに格納されているデータと書き込み要求のあったデータの両方をフラッシュメモリへ書き込むことは保障できない。このため、不良ブロック数や不良領域数が所定値を超えた場合には、フラッシュメモリに空き容量があるにも関わらず、突然データの書き込みが不能になるといった問題があった。   In addition, when a secondary storage device of a personal computer is configured using a flash memory, a block (bad block) that cannot be used as a storage area due to many errors or an area that cannot be read (defective area) occurs. There is a case. If the number of defective blocks or defective areas exceeds the upper limit, new defective blocks or defective areas cannot be registered, so data stored in the cache memory and data requested to be written It is not guaranteed to write both to the flash memory. For this reason, when the number of defective blocks or the number of defective areas exceeds a predetermined value, there is a problem that data writing is suddenly disabled even though the flash memory has free space.

特許第3688835号公報Japanese Patent No. 3688835 特表2007−528079号公報Special table 2007-528079 gazette

本発明は、データの書き込みが突然不能になることを防止することが可能なメモリシステムを提供する。   The present invention provides a memory system capable of preventing data writing from being suddenly disabled.

本願発明の一態様によれば、第1の単位でデータの読み出し/書き込みが行われ、前記第1の単位の2以上の自然数倍である第2の単位で管理が行われる揮発性の半導体記憶素子から構成されるキャッシュメモリとしての第1の記憶部と、前記データの読み出し/書き込みが行われ、前記第2の単位および当該第2の単位の2以上の自然数倍である第3の単位で管理され、前記第1の単位の2以上の自然数倍である第4の単位で消去が行われる不揮発性の半導体記憶素子から構成される第2の記憶部と、前記第1および第2の記憶部でのデータ管理を行なうとともに、ホスト装置からデータの書き込み要求があった場合には、書き込み要求のあったデータを前記第1の記憶部を介して前記第2の記憶部に書き込み、前記ホスト装置からデータの読み出し要求があった場合には、読み出し要求のあったデータを前記第2の記憶部から前記第1の記憶部に読み出すとともに前記第1の記憶部から前記ホスト装置に転送するコントローラと、を具備し、前記コントローラは、前記第2の記憶部で発生した前記第2の単位の不良領域の数を第1の不良領域数として管理する第1の管理テーブルと、前記第2の記憶部で発生した前記第4の単位の不良領域の数を第2の不良領域数として管理する第2の管理テーブルと、を備え、前記第1の不良領域数および/または前記第2の不良領域数に応じて、前記ホスト装置から前記第2の記憶部へのデータの書き込みの際の動作モードを切り替えることを特徴とするメモリシステム、が提供される。   According to one aspect of the present invention, a volatile semiconductor in which data is read / written in a first unit and is managed in a second unit that is a natural number multiple of two or more of the first unit. A first storage unit serving as a cache memory composed of storage elements, and a third read unit that reads / writes the data and is a natural number multiple of two or more of the second unit and the second unit. A second storage unit configured by a non-volatile semiconductor storage element that is managed in units and is erased in a fourth unit that is a natural number multiple of two or more of the first unit; In addition to managing data in the second storage unit, if there is a data write request from the host device, the data requested to be written is written to the second storage unit via the first storage unit. , Data from the host device A controller that reads data requested to be read from the second storage unit to the first storage unit and transfers the data from the first storage unit to the host device when there is a read request. The controller includes a first management table for managing the number of defective areas of the second unit generated in the second storage unit as a first number of defective areas, and generated in the second storage unit. A second management table that manages the number of defective areas in the fourth unit as the number of second defective areas, and according to the number of first defective areas and / or the number of second defective areas Thus, there is provided a memory system characterized by switching an operation mode at the time of writing data from the host device to the second storage unit.

本発明によれば、データの書き込みが突然不能になることを防止することが可能なメモリシステムを提供できる。   ADVANTAGE OF THE INVENTION According to this invention, the memory system which can prevent that the writing of data becomes suddenly impossible can be provided.

以下、本発明の実施の形態について図面を参照して説明する。なお、以下の説明において、同一の機能および構成を有する要素については、同一符号を付し、重複説明は必要な場合にのみ行う。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, elements having the same function and configuration are denoted by the same reference numerals, and redundant description will be given only when necessary.

先ず、本明細書で用いる用語について定義しておく。
・物理ページ:NANDメモリチップ内部において一括して書き込み/読み出しが可能な単位のこと。物理ページサイズは、例えば4kB。ただし、主データ(ユーザデータなど)に対してSSD内で付加される誤り訂正符号などの冗長ビットは含まないものとする。通常、4kB+冗長ビット(例えば、数10B)が同時にメモリセルに書き込まれる単位となるが、説明の便宜上、上記のように定義する。
・論理ページ:SSD内で設定される書き込み/読み出し単位であり、1以上の物理ページに対応付けられている。論理ページサイズは、例えば8ビットノーマルモードでは、4kB、32ビット倍速モードでは、32kB。ただし、冗長ビットは含まないものとする。
・物理ブロック:NANDメモリチップ内部において独立して消去可能な最小単位のことであり、複数の物理ページから構成される。物理ブロックサイズは、例えば512kB。ただし、主データに対してSSD内で付加される誤り訂正符号などの冗長ビットは含まないものとする。通常、512kB+冗長ビット(例えば、数10kB)が同時に消去される単位となるが、説明の便宜上、上記のように定義する。
・論理ブロック:SSD内で設定される消去単位であり、1以上の物理ブロックに対応付けられている。論理ブロックサイズは、例えば8ビットノーマルモードでは、512kB、32ビット倍速モードでは、4MB。ただし、冗長ビットは含まないものとする。
・セクタ:ホストからの最小アクセス単位のこと。セクタサイズ(第1の単位)は、例えば512B。
・クラスタ:SSD内で「小さなデータ」を管理する管理単位。クラスタサイズ(第2の単位)はセクタサイズ以上であり、クラスタサイズの2以上の自然数倍が論理ページサイズとなるように定められる。
・トラック:SSD内で「大きなデータ」を管理する管理単位。クラスタサイズの2以上の自然数倍がトラックサイズに、かつ、トラックサイズ(第3の単位)の2以上の自然数倍が論理ブロックサイズ(第4の単位)となるように定められる。
・フリーブロック(FB):用途未割り当てのNAND型フラッシュメモリ上の論理ブロックのこと。用途を割り当てる際に消去してから使用する。
・バッドブロック(BB):NAND型フラッシュメモリ上の、誤りが多いなど記憶領域として使用できない物理ブロックのこと。例えば、消去動作が正常に終了しなかった物理ブロックがバッドブロックBBとして登録される。
・書き込み効率:所定期間内における、ホストから書き込んだデータ量に対する、論理ブロックの消去量の統計値のこと。小さいほどNAND型フラッシュメモリの消耗度が小さい。
・有効クラスタ:最新のデータを保持しているクラスタ。
・無効クラスタ:最新ではないデータを保持しているクラスタ。
・有効トラック:最新のデータを保持しているトラック。
・無効トラック:最新ではないデータを保持しているトラック。
・コンパクション:管理対象内の論理ブロックから、有効クラスタや有効トラックのみを取り出して、新しい論理ブロックに書き直すこと。
First, terms used in this specification are defined.
Physical page: A unit that can be written / read collectively in the NAND memory chip. The physical page size is 4 kB, for example. However, redundant bits such as error correction codes added in the SSD to main data (user data, etc.) are not included. Normally, 4 kB + redundant bit (for example, several tens of bytes) is a unit to be simultaneously written in the memory cell, but for convenience of explanation, it is defined as described above.
Logical page: A write / read unit set in the SSD, and is associated with one or more physical pages. The logical page size is, for example, 4 kB in the 8-bit normal mode and 32 kB in the 32-bit double speed mode. However, redundant bits are not included.
Physical block: the smallest unit that can be independently erased inside the NAND memory chip, and is composed of a plurality of physical pages. The physical block size is, for example, 512 kB. However, redundant bits such as an error correction code added to the main data in the SSD are not included. Normally, 512 kB + redundant bit (for example, several tens of kB) is a unit to be erased at the same time, but for convenience of explanation, it is defined as described above.
Logical block: An erasing unit set in the SSD, and is associated with one or more physical blocks. The logical block size is, for example, 512 kB in the 8-bit normal mode and 4 MB in the 32-bit double speed mode. However, redundant bits are not included.
Sector: The minimum access unit from the host. The sector size (first unit) is, for example, 512B.
Cluster: A management unit that manages “small data” in the SSD. The cluster size (second unit) is equal to or larger than the sector size, and is determined so that a natural number multiple of 2 or more of the cluster size becomes the logical page size.
Track: A management unit that manages “big data” in the SSD. It is determined that a natural number multiple of 2 or more of the cluster size is the track size, and a natural number multiple of 2 or more of the track size (third unit) is the logical block size (fourth unit).
Free block (FB): A logical block on a NAND flash memory to which no use is assigned. Use it after erasing it when assigning usages.
Bad block (BB): A physical block on a NAND flash memory that cannot be used as a storage area due to many errors. For example, a physical block for which the erase operation has not ended normally is registered as a bad block BB.
Write efficiency: A statistical value of the erase amount of a logical block with respect to the amount of data written from a host within a predetermined period. The smaller the size, the smaller the consumption of the NAND flash memory.
Valid cluster: A cluster that holds the latest data.
Invalid cluster: A cluster that holds data that is not up-to-date.
Valid track: A track that holds the latest data.
Invalid track: A track that holds data that is not up-to-date.
Compaction: Extracting only valid clusters and valid tracks from the logical block within the management target and rewriting them into a new logical block.

[第1の実施形態]
図1は、SSD(Solid State Drive)100の構成例を示すブロック図である。SSD100は、ATAインタフェース(ATA I/F)2などのメモリ接続インタフェースを介してパーソナルコンピュータあるいはCPUコアなどのホスト装置1と接続され、ホスト装置1の外部メモリとして機能する。また、SSD100は、RS232Cインタフェース(RS232C I/F)などの通信インタフェース3を介して、デバッグ用/製造検査用機器200との間でデータを送受信することができる。SSD100は、不揮発性半導体メモリとしてのNAND型フラッシュメモリ(以下、NANDメモリと略す)10と、コントローラとしてのドライブ制御回路4と、揮発性半導体メモリとしてのDRAM20と、電源回路5と、状態表示用のLED6と、ドライブ内部の温度を検出する温度センサ7と、フューズ8とを備えている。
[First Embodiment]
FIG. 1 is a block diagram illustrating a configuration example of an SSD (Solid State Drive) 100. The SSD 100 is connected to a host device 1 such as a personal computer or a CPU core via a memory connection interface such as an ATA interface (ATA I / F) 2 and functions as an external memory of the host device 1. Further, the SSD 100 can transmit / receive data to / from the debugging / manufacturing inspection device 200 via the communication interface 3 such as an RS232C interface (RS232C I / F). The SSD 100 includes a NAND flash memory (hereinafter abbreviated as a NAND memory) 10 as a nonvolatile semiconductor memory, a drive control circuit 4 as a controller, a DRAM 20 as a volatile semiconductor memory, a power supply circuit 5, and a status display. LED 6, a temperature sensor 7 for detecting the temperature inside the drive, and a fuse 8.

電源回路5は、ホスト装置1側の電源回路から供給される外部直流電源から複数の異なる内部直流電源電圧を生成し、これら内部直流電源電圧をSSD100内の各回路に供給する。また、電源回路5は、外部電源の立ち上がりまたは立ち下がりを検知し、パワーオンリセット信号を生成して、ドライブ制御回路4に供給する。フューズ8は、ホスト装置1側の電源回路とSSD100内部の電源回路5との間に設けられている。外部電源回路から過電流が供給された場合フューズ8が切断され、内部回路の誤動作を防止する。   The power supply circuit 5 generates a plurality of different internal DC power supply voltages from an external DC power supply supplied from the power supply circuit on the host device 1 side, and supplies these internal DC power supply voltages to each circuit in the SSD 100. The power supply circuit 5 detects the rise or fall of the external power supply, generates a power-on reset signal, and supplies it to the drive control circuit 4. The fuse 8 is provided between the power supply circuit on the host device 1 side and the power supply circuit 5 inside the SSD 100. When an overcurrent is supplied from the external power supply circuit, the fuse 8 is blown to prevent malfunction of the internal circuit.

NANDメモリ(第2の記憶部)10は、この場合、4並列動作を行う4つの並列動作要素10a〜10dを有し、1つの並列動作要素は、2つのNANDメモリパッケージを有する。各NANDメモリパッケージは、積層された複数のNANDメモリチップ(例えば、1チップ=2GB)によって構成されている。図1の場合は、各NANDメモリパッケージは、積層された4枚のNANDメモリチップによって構成されており、NANDメモリ10は64GBの容量を有する。各NANDメモリパッケージが、積層された8枚のNANDメモリチップによって構成されている場合は、NANDメモリ10は128GBの容量を有することになる。   In this case, the NAND memory (second storage unit) 10 includes four parallel operation elements 10a to 10d that perform four parallel operations, and one parallel operation element includes two NAND memory packages. Each NAND memory package includes a plurality of stacked NAND memory chips (for example, 1 chip = 2 GB). In the case of FIG. 1, each NAND memory package is constituted by four stacked NAND memory chips, and the NAND memory 10 has a capacity of 64 GB. When each NAND memory package is constituted by eight stacked NAND memory chips, the NAND memory 10 has a capacity of 128 GB.

DRAM(第1の記憶部)20は、ホスト装置1とNANDメモリ10間でのデータ転送用キャッシュおよび作業領域用メモリとして機能する。また、DRAM20の代わりに、FeRAMを使用しても良い。ドライブ制御回路4は、ホスト装置1とNANDメモリ10との間でDRAM20を介してデータ転送制御を行うとともに、SSD100内の各構成要素を制御する。また、ドライブ制御回路4は、状態表示用LED6にステータス表示用信号を供給するとともに、電源回路5からのパワーオンリセット信号を受けて、リセット信号およびクロック信号を自回路内およびSSD100内の各部に供給する機能も有している。   The DRAM (first storage unit) 20 functions as a data transfer cache and work area memory between the host device 1 and the NAND memory 10. Further, instead of the DRAM 20, FeRAM may be used. The drive control circuit 4 controls data transfer between the host device 1 and the NAND memory 10 via the DRAM 20 and controls each component in the SSD 100. In addition, the drive control circuit 4 supplies a status display signal to the status display LED 6 and receives a power-on reset signal from the power supply circuit 5 to send a reset signal and a clock signal to each part in the own circuit and the SSD 100. It also has a function to supply.

各NANDメモリチップは、データ消去の単位である物理ブロックを複数配列して構成されている。図2(a)は、NANDメモリチップに含まれる1個の物理ブロックの構成例を示す回路図である。各物理ブロックは、X方向に沿って順に配列された(p+1)個のNANDストリングを備えている(pは、0以上の整数)。(p+1)個のNANDストリングにそれぞれ含まれる選択トランジスタST1は、ドレインがビット線BL0〜BLpに接続され、ゲートが選択ゲート線SGDに共通接続されている。また、選択トランジスタST2は、ソースがソース線SLに共通接続され、ゲートが選択ゲート線SGSに共通接続されている。   Each NAND memory chip is configured by arranging a plurality of physical blocks, which are data erasing units. FIG. 2A is a circuit diagram illustrating a configuration example of one physical block included in the NAND memory chip. Each physical block includes (p + 1) NAND strings arranged in order along the X direction (p is an integer of 0 or more). The selection transistors ST1 included in each of the (p + 1) NAND strings have drains connected to the bit lines BL0 to BLp and gates commonly connected to the selection gate line SGD. In addition, the selection transistor ST2 has a source commonly connected to the source line SL and a gate commonly connected to the selection gate line SGS.

各メモリセルトランジスタMTは、半導体基板上に形成された積層ゲート構造を備えたMOSFET(Metal Oxide Semiconductor Field Effect Transistor)から構成される。積層ゲート構造は、半導体基板上にゲート絶縁膜を介在して形成された電荷蓄積層(浮遊ゲート電極)、および電荷蓄積層上にゲート間絶縁膜を介在して形成された制御ゲート電極を含んでいる。メモリセルトランジスタMTは、浮遊ゲート電極に蓄えられる電子の数に応じて閾値電圧が変化し、この閾値電圧の違いに応じてデータを記憶する。メモリセルトランジスタMTは、1ビットを記憶するように構成されていてもよいし、多値(2ビット以上のデータ)を記憶するように構成されていてもよい。   Each memory cell transistor MT is composed of a MOSFET (Metal Oxide Semiconductor Field Effect Transistor) having a stacked gate structure formed on a semiconductor substrate. The stacked gate structure includes a charge storage layer (floating gate electrode) formed on a semiconductor substrate with a gate insulating film interposed therebetween, and a control gate electrode formed on the charge storage layer with an inter-gate insulating film interposed therebetween. It is out. In the memory cell transistor MT, the threshold voltage changes according to the number of electrons stored in the floating gate electrode, and data is stored according to the difference in threshold voltage. The memory cell transistor MT may be configured to store 1 bit, or may be configured to store multiple values (data of 2 bits or more).

また、メモリセルトランジスタMTは、浮遊ゲート電極を有する構造に限らず、MONOS(Metal-Oxide-Nitride-Oxide-Silicon)型など、電荷蓄積層としての窒化膜界面に電子をトラップさせることで閾値調整可能な構造であってもよい。MONOS構造のメモリセルトランジスタMTについても同様に、1ビットを記憶するように構成されていてもよいし、多値(2ビット以上のデータ)を記憶するように構成されていてもよい。   In addition, the memory cell transistor MT is not limited to a structure having a floating gate electrode, and a threshold value is adjusted by trapping electrons at the interface of a nitride film as a charge storage layer such as a MONOS (Metal-Oxide-Nitride-Oxide-Silicon) type. Possible structures may be used. Similarly, the memory cell transistor MT having the MONOS structure may be configured to store 1 bit, or may be configured to store multiple values (data of 2 bits or more).

各NANDストリングにおいて、(q+1)個のメモリセルトランジスタMTは、選択トランジスタST1のソースと選択トランジスタST2のドレインとの間に、それぞれの電流経路が直列接続されるように配置されている。すなわち、複数のメモリセルトランジスタMTは、隣接するもの同士で拡散領域(ソース領域若しくはドレイン領域)を共有するような形でY方向に直列接続される。   In each NAND string, (q + 1) memory cell transistors MT are arranged such that their current paths are connected in series between the source of the selection transistor ST1 and the drain of the selection transistor ST2. That is, the plurality of memory cell transistors MT are connected in series in the Y direction so that adjacent ones share a diffusion region (source region or drain region).

そして、最もドレイン側に位置するメモリセルトランジスタMTから順に、制御ゲート電極がワード線WL0〜WLqにそれぞれ接続されている。従って、ワード線WL0に接続されたメモリセルトランジスタMTのドレインは選択トランジスタST1のソースに接続され、ワード線WLqに接続されたメモリセルトランジスタMTのソースは選択トランジスタST2のドレインに接続されている。   The control gate electrodes are connected to the word lines WL0 to WLq in order from the memory cell transistor MT located closest to the drain side. Therefore, the drain of the memory cell transistor MT connected to the word line WL0 is connected to the source of the selection transistor ST1, and the source of the memory cell transistor MT connected to the word line WLq is connected to the drain of the selection transistor ST2.

ワード線WL0〜WLqは、物理ブロック内のNANDストリング間で、メモリセルトランジスタMTの制御ゲート電極を共通に接続している。つまり、ブロック内において同一行にあるメモリセルトランジスタMTの制御ゲート電極は、同一のワード線WLに接続される。この同一のワード線WLに接続される(p+1)個のメモリセルトランジスタMTは1ページ(物理ページ)として取り扱われ、この物理ページごとにデータの書き込みおよびデータの読み出しが行われる。   The word lines WL0 to WLq connect the control gate electrodes of the memory cell transistors MT in common between the NAND strings in the physical block. That is, the control gate electrodes of the memory cell transistors MT in the same row in the block are connected to the same word line WL. The (p + 1) memory cell transistors MT connected to the same word line WL are handled as one page (physical page), and data writing and data reading are performed for each physical page.

また、ビット線BL0〜BLpは、ブロック間で、選択トランジスタST1のドレインを共通に接続している。つまり、複数のブロック内において同一列にあるNANDストリングは、同一のビット線BLに接続される。   The bit lines BL0 to BLp connect the drains of the selection transistors ST1 in common between the blocks. That is, NAND strings in the same column in a plurality of blocks are connected to the same bit line BL.

図2(b)は、例えば、1個のメモリセルトランジスタMTに2ビットの記憶を行う4値データ記憶方式での閾値分布を示す模式図である。4値データ記憶方式では、上位ページデータ“x”と下位ページデータ“y”で定義される4値データ“xy”の何れか1つをメモリセルトランジスタMTに保持可能である。   FIG. 2B is a schematic diagram showing a threshold distribution in a quaternary data storage system in which 2 bits are stored in one memory cell transistor MT, for example. In the quaternary data storage system, any one of the quaternary data “xy” defined by the upper page data “x” and the lower page data “y” can be held in the memory cell transistor MT.

この、4値データ“xy”は、メモリセルトランジスタMTの閾値電圧の順に、例えば、データ“11”、“01”、“00”、“10”が割り当てられる。データ“11”は、メモリセルトランジスタMTの閾値電圧が負の消去状態である。   For example, data “11”, “01”, “00”, and “10” are assigned to the quaternary data “xy” in the order of the threshold voltage of the memory cell transistor MT. Data “11” is an erased state in which the threshold voltage of the memory cell transistor MT is negative.

下位ページ書き込み動作においては、データ“11”(消去状態)のメモリセルトランジスタMTに対して選択的に、下位ビットデータ“y”の書き込みによって、データ“10”が書き込まれる。上位ページ書き込み前のデータ“10”の閾値分布は、上位ページ書き込み後のデータ“01”とデータ“00”の閾値分布の中間程度に位置しており、上位ページ書き込み後の閾値分布よりブロードであってもよい。上位ページ書き込み動作においては、データ“11”のメモリセルと、データ“10”のメモリセルに対して、それぞれ選択的に上位ビットデータ“x”の書き込みが行われて、データ“01”およびデータ“00”が書き込まれる。   In the lower page write operation, data “10” is written to the memory cell transistor MT of data “11” (erased state) selectively by writing lower bit data “y”. The threshold distribution of the data “10” before the upper page write is located in the middle of the threshold distribution of the data “01” and the data “00” after the upper page write, and is broader than the threshold distribution after the upper page write. There may be. In the upper page write operation, upper bit data “x” is selectively written into the memory cell of data “11” and the memory cell of data “10”, respectively, and data “01” and data “00” is written.

図3は、ドライブ制御回路4のハードウェア的な内部構成例を示すブロック図である。ドライブ制御回路4は、データアクセス用バス101、第1の回路制御用バス102、および第2の回路制御用バス103を備えている。第1の回路制御用バス102には、ドライブ制御回路4全体を制御するプロセッサ104が接続されている。第1の回路制御用バス102には、NANDメモリ10に記憶された各管理プログラム(FW:ファームウエア)をブートするブート用プログラムが格納されたブートROM105がROMコントローラ106を介して接続されている。また、第1の回路制御用バス102には、図1に示した電源回路5からのパワーオンリセット信号を受けて、リセット信号およびクロック信号を各部に供給するクロックコントローラ107が接続されている。   FIG. 3 is a block diagram illustrating an example of a hardware internal configuration of the drive control circuit 4. The drive control circuit 4 includes a data access bus 101, a first circuit control bus 102, and a second circuit control bus 103. A processor 104 that controls the entire drive control circuit 4 is connected to the first circuit control bus 102. A boot ROM 105 storing a boot program for booting each management program (FW: firmware) stored in the NAND memory 10 is connected to the first circuit control bus 102 via a ROM controller 106. . The first circuit control bus 102 is connected to a clock controller 107 that receives a power-on reset signal from the power supply circuit 5 shown in FIG. 1 and supplies a reset signal and a clock signal to each unit.

第2の回路制御用バス103は、第1の回路制御用バス102に接続されている。第2の回路制御用バス103には、図1に示した温度センサ7からのデータを受けるためのIC回路108、状態表示用LED6にステータス表示用信号を供給するパラレルIO(PIO)回路109、RS232C I/F3を制御するシリアルIO(SIO)回路110が接続されている。 The second circuit control bus 103 is connected to the first circuit control bus 102. The second circuit control bus 103 has an I 2 C circuit 108 for receiving data from the temperature sensor 7 shown in FIG. 1, and a parallel IO (PIO) circuit for supplying a status display signal to the status display LED 6 109, a serial IO (SIO) circuit 110 for controlling the RS232C I / F3 is connected.

ATAインタフェースコントローラ(ATAコントローラ)111、第1のECC(Error Checking and Correction)回路112、NANDコントローラ113、およびDRAMコントローラ114は、データアクセス用バス101と第1の回路制御用バス102との両方に接続されている。ATAコントローラ111は、ATAインタフェース2を介してホスト装置1との間でデータを送受信する。データアクセス用バス101には、データ作業領域作業領域およびファームウェア展開領域として使用されるSRAM115がSRAMコントローラ116を介して接続されている。NANDメモリ10に記憶されているファームウェアは起動時、ブートROM105に記憶されたブート用プログラムによってSRAM115に転送される。   An ATA interface controller (ATA controller) 111, a first ECC (Error Checking and Correction) circuit 112, a NAND controller 113, and a DRAM controller 114 are provided on both the data access bus 101 and the first circuit control bus 102. It is connected. The ATA controller 111 transmits and receives data to and from the host device 1 via the ATA interface 2. An SRAM 115 used as a data work area work area and a firmware development area is connected to the data access bus 101 via an SRAM controller 116. The firmware stored in the NAND memory 10 is transferred to the SRAM 115 by a boot program stored in the boot ROM 105 at startup.

NANDコントローラ113は、NANDメモリ10とのインタフェース処理を行うNAND I/F117、第2のECC回路118、およびNANDメモリ10−DRAM20間のアクセス制御を行うDMA転送制御用DMAコントローラ119を備えている。第2のECC回路118は第2の訂正符号のエンコードを行い、また、第1の誤り訂正符合のエンコードおよびデコードを行う。第1のECC回路112は、第2の誤り訂正符号のデコードを行う。第1の誤り訂正符号、第2の誤り訂正符号は、例えば、ハミング符号、BCH(Bose Chaudhuri Hocqenghem)符号、RS(Reed Solomon)符号、或いはLDPC(Low Density Parity Check)符号等であり、第2の誤り訂正符号の訂正能力は、第1の誤り訂正符号の訂正能力よりも高いとする。   The NAND controller 113 includes a NAND I / F 117 that performs interface processing with the NAND memory 10, a second ECC circuit 118, and a DMA transfer control DMA controller 119 that performs access control between the NAND memory 10 and the DRAM 20. The second ECC circuit 118 encodes the second correction code, and encodes and decodes the first error correction code. The first ECC circuit 112 decodes the second error correction code. The first error correction code and the second error correction code are, for example, a Hamming code, a BCH (Bose Chaudhuri Hocqenghem) code, an RS (Reed Solomon) code, an LDPC (Low Density Parity Check) code, or the like. It is assumed that the error correction code has a higher correction capability than the first error correction code.

図1および図3に示したように、NANDメモリ10においては、4つの並列動作要素10a〜10dが各8ビットの4チャネル(4ch)を介して、ドライブ制御回路4内部のNANDコントローラ112に並列接続されている。4つの並列動作要素10a〜10dを単独動作させるか、並列動作させるか、NANDメモリチップの備える倍速モード(Multi Page Program / Multi Page Read / Multi Block Erase)を使用するか否か、という組み合わせにより、下記3種類のアクセスモードが提供される。
(1)8ビットノーマルモード
1chだけ動作させ、8ビット単位でデータ転送を行うモードである。物理ページサイズ(4kB)で書き込み/読み出しが行われる。また、物理ブロックサイズ(512kB)で消去が行われる。1つの物理ブロックに対して1つの論理ブロックが対応付けられ、論理ブロックサイズは512kBとなる。
(2)32ビットノーマルモード
4ch並列で動作させ、32ビット単位でデータ転送を行うモードである。物理ページサイズ×4(16kB)で書き込み/読み出しが行われる。また、物理ブロックサイズ×4(2MB)で消去が行われる。4つの物理ブロックに対して1つの論理ブロックが対応付けられ、論理ブロックサイズは2MBとなる。
(3)32ビット倍速モード
4ch並列で動作させ、更に、NANDメモリチップの倍速モードを利用して書き込み/読み出しを行うモードである。物理ページサイズ×4×2(32kB)で書き込み/読み出しが行われる。また、物理ブロックサイズ×4×2(4MB)で消去が行われる。8つの物理ブロックに対して1つの論理ブロックが対応付けられ、論理ブロックサイズは4MBとなる。
As shown in FIGS. 1 and 3, in the NAND memory 10, four parallel operation elements 10a to 10d are connected in parallel to the NAND controller 112 in the drive control circuit 4 via four channels (4ch) each having 8 bits. It is connected. Depending on the combination of whether the four parallel operation elements 10a to 10d are operated independently or in parallel, or whether the double speed mode (Multi Page Program / Multi Page Read / Multi Block Erase) of the NAND memory chip is used, The following three access modes are provided.
(1) 8-bit normal mode In this mode, only one channel is operated and data is transferred in 8-bit units. Writing / reading is performed with a physical page size (4 kB). Also, erasure is performed with a physical block size (512 kB). One logical block is associated with one physical block, and the logical block size is 512 kB.
(2) 32-bit normal mode This mode operates in parallel with 4 channels and transfers data in units of 32 bits. Writing / reading is performed with physical page size × 4 (16 kB). Further, erasure is performed with physical block size × 4 (2 MB). One logical block is associated with four physical blocks, and the logical block size is 2 MB.
(3) 32-bit double speed mode In this mode, the 4ch parallel operation is performed, and further, writing / reading is performed using the double speed mode of the NAND memory chip. Writing / reading is performed with physical page size × 4 × 2 (32 kB). Further, erasure is performed with physical block size × 4 × 2 (4 MB). One logical block is associated with eight physical blocks, and the logical block size is 4 MB.

4ch並列動作する32ビットノーマルモードまたは32ビット倍速モードでは、並列動作する4または8物理ブロックが、NANDメモリ10としての消去単位となり、並列動作する4または8物理ページが、NANDメモリ10としての書き込み単位および読み出し単位となる。以下の動作では、基本的に32ビット倍速モードを使用し、例えば、1論理ブロック=4MB=2トラック=2ページ=2クラスタ=2セクタとして説明する(i、j、k、lは自然数、かつ、i<j<k<lの関係が成立する)。 In the 32-bit normal mode or the 32-bit double speed mode operating in parallel with 4 channels, 4 or 8 physical blocks operating in parallel serve as an erasing unit as the NAND memory 10, and 4 or 8 physical pages operating in parallel are written as the NAND memory 10. Unit and readout unit. In the following operations, the 32-bit double speed mode is basically used, and for example, 1 logical block = 4 MB = 2 i track = 2 j page = 2 k cluster = 2 l sector (i, j, k, l Is a natural number and a relationship of i <j <k <l is established).

32ビット倍速モードでアクセスされる論理ブロックは4MB単位であり、8個(2×4ch)の物理ブロック(1物理ブロック=512KB)が対応付けられている。物理ブロック単位で管理されるバッドブロックBBが発生すると、そのバッドブロックBBは使用不可になるので、そのようなときには、論理ブロックに対応付けられた8個の物理ブロックの組み合わせが、バッドブロックBBを含まないように変更される。   A logical block accessed in the 32-bit double speed mode is in units of 4 MB, and 8 (2 × 4 ch) physical blocks (1 physical block = 512 KB) are associated with each other. When a bad block BB managed in units of physical blocks is generated, the bad block BB becomes unusable. In such a case, a combination of eight physical blocks associated with the logical block becomes a bad block BB. It is changed not to include.

図4は、プロセッサ104により実現されるファームウェアの機能構成例を示すブロック図である。プロセッサ104により実現されるファームウェアの各機能は、大きく、データ管理部120、ATAコマンド処理部121、セキュリティ管理部122、ブートローダ123、初期化管理部124、デバッグサポート部125に分類される。   FIG. 4 is a block diagram illustrating a functional configuration example of firmware realized by the processor 104. The functions of the firmware realized by the processor 104 are roughly classified into a data management unit 120, an ATA command processing unit 121, a security management unit 122, a boot loader 123, an initialization management unit 124, and a debug support unit 125.

データ管理部120は、NANDコントローラ112、第1のECC回路114を介して、NANDメモリ10−DRAM20間のデータ転送、NANDメモリ10に関する各種機能を制御する。ATAコマンド処理部121は、ATAコントローラ110、およびDRAMコントローラ113を介して、データ管理部120と協動してDRAM20−ホスト装置1間のデータ転送処理を行う。セキュリティ管理部122は、データ管理部120およびATAコマンド処理部121と協動して各種のセキュリティ情報を管理する。   The data management unit 120 controls data transfer between the NAND memory 10 and the DRAM 20 and various functions related to the NAND memory 10 via the NAND controller 112 and the first ECC circuit 114. The ATA command processing unit 121 performs data transfer processing between the DRAM 20 and the host device 1 in cooperation with the data management unit 120 via the ATA controller 110 and the DRAM controller 113. The security management unit 122 manages various types of security information in cooperation with the data management unit 120 and the ATA command processing unit 121.

ブートローダ123は、パワーオン時、各管理プログラム(ファームウェア)をNANDメモリ10からSRAM120にロードする。初期化管理部124は、ドライブ制御回路4内の各コントローラ/回路の初期化を行う。デバッグサポート部125は、外部からRS232Cインタフェースを介して供給されたデバッグ用データを処理する。主に、データ管理部120、ATAコマンド処理部121、およびセキュリティ管理部122が、SRAM114に記憶される各管理プログラムをプロセッサ104が実行することによって実現される機能部である。   The boot loader 123 loads each management program (firmware) from the NAND memory 10 to the SRAM 120 when the power is turned on. The initialization manager 124 initializes each controller / circuit in the drive control circuit 4. The debug support unit 125 processes the debug data supplied from the outside via the RS232C interface. The data management unit 120, the ATA command processing unit 121, and the security management unit 122 are mainly functional units realized by the processor 104 executing each management program stored in the SRAM 114.

本実施形態では、主としてデータ管理部120が実現する機能について説明する。データ管理部120は、ATAコマンド処理部121が記憶デバイスであるNANDメモリ10やDRAM20に対して要求する機能の提供(ホスト装置からのWrite要求、Cache Flush要求、Read要求等の各種コマンドへの応答)と、アドレス領域とNANDメモリ10との対応関係の管理および管理情報の保護と、DRAM10およびNANDメモリ10を利用した高速で効率の良いデータ読み出し/書き込み機能の提供、NANDメモリ10の信頼性の確保などを行う。   In the present embodiment, functions realized by the data management unit 120 will be mainly described. The data management unit 120 provides functions requested by the ATA command processing unit 121 to the NAND memory 10 and the DRAM 20 as storage devices (responses to various commands such as a write request, a cache flush request, and a read request from the host device). ), Management of the correspondence between the address area and the NAND memory 10, protection of management information, provision of a high-speed and efficient data read / write function using the DRAM 10 and the NAND memory 10, and reliability of the NAND memory 10 Secure it.

図5は、NANDメモリ10およびDRAM20内に形成された機能ブロックを示すものである。ホスト1とNANDメモリ10との間には、DRAM20上に構成されたライトキャッシュ(WC)21およびリードキャッシュ(RC)22が介在している。WC21はホスト装置1からのWriteデータを一時保存し、RC22はNANDメモリ10からのReadデータを一時保存する。NANDメモリ10内の論理ブロックは、書き込み時のNANDメモリ10に対する消去の量を減らすために、データ管理部120により、前段ストレージ領域(FS:Front Storage)12、中段ストレージ領域(IS:Intermediate Storage)13およびメインストレージ領域(MS:Main Storage)11という各管理領域に割り当てられている。FS12は、WC21からのデータを「小さな単位」であるクラスタ単位に管理するものであり、小データを短期間保存する。IS13は、FS12から溢れたデータを「小さな単位」であるクラスタ単位に管理するものであり、小データを長期間保存する。MS11は、WC21、FS12、IS13からのデータを「大きな単位」であるトラック単位で長期間記憶する。例えば、記憶容量は、MS>IS、FS>WCの関係となる。   FIG. 5 shows functional blocks formed in the NAND memory 10 and the DRAM 20. A write cache (WC) 21 and a read cache (RC) 22 configured on the DRAM 20 are interposed between the host 1 and the NAND memory 10. The WC 21 temporarily stores write data from the host device 1, and the RC 22 temporarily stores read data from the NAND memory 10. In order to reduce the amount of erasure to the NAND memory 10 at the time of writing, the logical block in the NAND memory 10 is processed by the data management unit 120 by the preceding storage area (FS: Front Storage) 12 and the intermediate storage area (IS: Intermediate Storage). 13 and main storage area (MS: Main Storage) 11 are assigned to each management area. The FS 12 manages data from the WC 21 in cluster units, which are “small units”, and stores small data for a short period of time. The IS 13 manages data overflowing from the FS 12 in cluster units, which are “small units”, and stores small data for a long period of time. The MS 11 stores data from the WC 21, FS 12, and IS 13 for a long period in units of tracks that are “large units”. For example, the storage capacity has a relationship of MS> IS, FS> WC.

小さな管理単位を、NANDメモリ10の記憶領域全てに適用すると、後述する管理テーブルのサイズが肥大化し、DRAM20に収まらないので、小さな管理単位で管理するのは、最近書き込まれたばかりのデータと、NANDメモリ10への書き込み効率が悪い小さなデータのみとするようにNANDメモリ10の各ストレージを構成している。   If a small management unit is applied to all the storage areas of the NAND memory 10, the size of a management table to be described later will be enlarged and will not fit in the DRAM 20. Therefore, management with a small management unit is not limited to recently written data and NAND. Each storage of the NAND memory 10 is configured so as to have only small data with low writing efficiency to the memory 10.

図6は、WC21からNANDメモリ10への書き込み処理(WR処理)に係わるより詳細な機能ブロック図を示すものである。FS12の前段には、WC21からのデータをバッファリングするFSインプットバッファ(FSIB)12aが設けられている。また、MS11の前段には、WC21、FS12、またはIS13からのデータをバッファリングするMSインプットバッファ(MSIB)11aが設けられている。また、MS11には、トラック前段ストレージ領域(TFS)11bが設けられている。TFS11bは、MSIB11aとMS11の間に介在するFIFO(First in First out)構造を有するバッファであり、TFS11bに記録されたデータは、MSIB11aから直接MS11に書き込まれるデータよりも更新頻度が高いデータである。MS11、MSIB11a、TFS11b、FS12、FSIB12a、およびIS13には、NANDメモリ10内の各論理ブロックの何れかが割り当てられている。   FIG. 6 shows a more detailed functional block diagram related to the writing process (WR process) from the WC 21 to the NAND memory 10. An FS input buffer (FSIB) 12a for buffering data from the WC 21 is provided at the front stage of the FS 12. Further, an MS input buffer (MSIB) 11a for buffering data from WC21, FS12, or IS13 is provided in the preceding stage of MS11. The MS 11 is provided with a track pre-stage storage area (TFS) 11b. The TFS 11b is a buffer having a FIFO (First in First Out) structure interposed between the MSIB 11a and the MS 11, and the data recorded in the TFS 11b is data having a higher update frequency than the data directly written in the MS 11 from the MSIB 11a. . Any of the logical blocks in the NAND memory 10 is assigned to the MS 11, MSIB 11 a, TFS 11 b, FS 12, FSIB 12 a, and IS 13.

つぎに、図5、図6の各構成要素の具体的な機能構成について詳述する。ホスト装置1はSSD100対し、ReadまたはWriteする際には、ATAインタフェースを介して論理アドレスとしてのLBA(Logical Block Addressing)を入力する。LBAは、図7に示すように、セクタ(サイズ:512B)に対して0からの通し番号をつけた論理アドレスである。本実施の形態においては、図5の各構成要素であるWC21、RC22、FS12、IS13、MS11の管理単位として、LBAの下位(l−k+1)ビット目から上位のビット列で構成される論理クラスタアドレスと、LBAの下位(l−i+1)ビットから上位のビット列で構成される論理トラックアドレスとを定義する。1クラスタ=2(l−k)セクタで、1トラック=2(k−i)クラスタである。 Next, specific functional configurations of the components shown in FIGS. 5 and 6 will be described in detail. When reading or writing to the SSD 100, the host device 1 inputs an LBA (Logical Block Addressing) as a logical address via the ATA interface. As shown in FIG. 7, LBA is a logical address in which a serial number from 0 is assigned to a sector (size: 512B). In the present embodiment, as a management unit of each component WC21, RC22, FS12, IS13, and MS11 in FIG. 5, a logical cluster address composed of a bit string from the lower (1-k + 1) th bit of the LBA And a logical track address composed of an upper bit string from the lower (l−i + 1) bits of the LBA. One cluster = 2 (1-k) sectors and one track = 2 (ki) clusters.

・リードキャッシュ(RC)22
RC22について説明する。RC22は、ATAコマンド処理部121からのRead要求に対して、NANDメモリ10(FS12、IS13、MS11)からのReadデータを一時的に保存するための領域である。RC22は、本実施形態では例えば、m-line、n-way(mは2(k−i)以上の自然数、nは2以上の自然数)セットアソシアティブ方式で管理されており、1エントリに1クラスタ分のデータを保持できる。論理クラスタアドレスのLSB(k−i)ビットでlineが決定される。なお、RC22は、フルアソシアティブ方式で管理されていても良いし、単純なFIFO方式で管理されていてもよい。
Read cache (RC) 22
The RC 22 will be described. The RC 22 is an area for temporarily storing Read data from the NAND memory 10 (FS12, IS13, MS11) in response to a Read request from the ATA command processing unit 121. In this embodiment, the RC 22 is managed by, for example, an m-line, n-way (m is a natural number of 2 ( ki ) or more, n is a natural number of 2 or more) set associative method, and one cluster per entry Can hold minute data. The line is determined by the LSB (ki) bits of the logical cluster address. Note that the RC 22 may be managed by a full associative method or may be managed by a simple FIFO method.

・ライトキャッシュ(WC)21
WC21について説明する。WC21は、ATAコマンド処理部121からのWrite要求に対して、ホスト装置1からのWriteデータを一時的に保存するための領域である。m-line、n-way(mは2(k−i)以上の自然数、nは2以上の自然数)セットアソシアティブ方式で管理されており、1エントリに1クラスタ分のデータを保持できる。論理クラスタアドレスのLSB(k−i)ビットでlineが決定される。例えば、way1〜waynの順で書き込み可能なwayが検索される。また、WC21に登録されているトラックは最も古く更新された順が分かるように後述するWCトラック管理テーブル24のFIFO構造によってLRU(Least Recently Used)で管理される。なお、WC21は、フルアソシアティブ方式で管理されていても良い。また、WC21は、RC22とline数、way数が互いに異なっていてもよい。
-Write cache (WC) 21
The WC 21 will be described. The WC 21 is an area for temporarily storing write data from the host device 1 in response to a write request from the ATA command processing unit 121. m-line, n-way (m is a natural number of 2 (ki) or more, n is a natural number of 2 or more), and is managed by a set associative method, and one entry can hold data for one cluster. The line is determined by the LSB (ki) bits of the logical cluster address. For example, a writable way is searched in the order of way1 to wayn. Also, the tracks registered in the WC 21 are managed by LRU (Least Recently Used) by the FIFO structure of the WC track management table 24 described later so that the order of the oldest update is known. Note that the WC 21 may be managed by a full associative method. WC21 may differ from RC22 in the number of lines and the number of ways.

Write要求により書き込まれたデータは、一旦WC21上に格納される。WC21からNANDメモリ10へ追い出すデータの決定方法は以下のルールに従う。
(i)タグによって決定されたlineの書き込み可能なwayが最後の(本実施形態では、n個目の)空きwayだった場合、則ち最後の空きwayが使用される場合は、そのlineに登録されたトラックのうち、LRUに基づいて最も古く更新されたトラックを追い出し確定する。
(ii)WC21に登録されている異なるトラックの個数が所定数を超えた場合、LRU順で、当該トラックに属するWC中のクラスタ数が所定数未満のトラックの追い出しを確定する。
Data written by the Write request is temporarily stored on the WC 21. The method for determining data to be expelled from the WC 21 to the NAND memory 10 follows the following rules.
(I) When the writable way of the line determined by the tag is the last (in the present embodiment, nth) free way, that is, when the last free way is used, Of the registered tracks, the oldest updated track is checked out based on the LRU.
(Ii) When the number of different tracks registered in the WC 21 exceeds a predetermined number, in the LRU order, the eviction of tracks whose number of clusters in the WC belonging to the track is less than the predetermined number is determined.

以上の方針で追い出すトラックを決定する。その際、追い出すのは同一トラックに含まれる全てのデータであり、追い出されるデータ量が、例えばトラックサイズの50%を超えていればMS11へ、超えていなければFS12へ追い出す。   The truck to be driven is determined according to the above policy. At that time, all data included in the same track is evicted, and if the amount of data evicted exceeds 50% of the track size, for example, it is evicted to MS11, and if not, it is evicted to FS12.

さらに(i)の条件でトラック追い出しが発生した場合で、MS11へ追い出す場合は、追い出されるトラック数が2個(もともと2個以上のときは2i+1個)になるまで、WC21内のトラックのうち上記追い出されるデータ量がトラックサイズの50%を超えるという条件を満たすトラックを上記(i)のポリシーで選択して追い出し候補に追加する。別言すれば、追い出されるトラックが2個未満の場合、WC中のトラックの古いものから2個になるまで、2(k−i−1)個以上有効クラスタをもつトラックを選択して追い出し候補に追加する。 Further, when track eviction occurs under the condition (i) and when eviction to MS11, the tracks in WC21 until the number of eviction tracks is 2 i (originally 2 i + 1 when 2 i or more). Of these, tracks that satisfy the condition that the amount of data to be evicted exceeds 50% of the track size are selected by the policy (i) and added to the evicting candidates. In other words, if there are less than 2 i tracks to be evicted, select tracks with 2 (k−i−1) or more valid clusters until there are 2 i tracks from the oldest one in the WC. Add to eviction candidates.

また、(i)の条件でトラック追い出しが発生した場合で、FS12に追い出す場合は、追い出されるクラスタ数が2個になるまでWC21内のトラックのうちLRU順に上記追い出されるデータ量がトラックサイズの50%未満であるという条件を満たすトラックを探してそのクラスタを追い出し候補に追加する。別言すれば、WC中のトラックを古い順に辿って2(k−i−1)個未満の有効クラスタしかもたないトラックからクラスタを取り出していき、有効クラスタ数が2(k−i−1)個になったら、それらクラスタをFSIB12aに論理ブロック単位で追い出しする。ただし、2(k−i−1)個見つからなかった場合は、FSIB12aに論理ページ単位で追い出しする。なお、FS12への追い出しを論理ブロック単位とするか、論理ページ単位とするかの有効クラスタ数の閾値は、2(k−i−1)個という1論理ブロック分の値にかぎるわけではなく、1論理ブロック分より若干少ない値であってもよい。 Also, when track flush is performed under the conditions in, the data is flushed to the FS 12, the data amount of expelled LRU order above of tracks in WC21 until the number of clusters expelled is 2 k pieces of track size (i) A track that satisfies the condition that it is less than 50% is searched, and the cluster is added to the candidate for eviction. In other words, the tracks in the WC are traced in order from the oldest, and the clusters are extracted from the track having less than 2 (ki-1) valid clusters, and the number of valid clusters is 2 (ki-1). When the number is reached, the clusters are expelled to the FSIB 12a in units of logical blocks. However, if 2 (k−i−1) pieces are not found, the FSIB 12a is evicted in units of logical pages. Note that the threshold value of the number of effective clusters for determining whether the eviction to the FS 12 is in units of logical blocks or units of logical pages is not limited to a value of one (1) logical block of 2 ( ki -1) . The value may be slightly less than one logical block.

また、ATAコマンド処理部121からのCache Flush要求では、WC21の内容が全て、上記と同じ条件(追い出されるデータ量がトラックサイズの50%を超えていればMS11へ、超えていなければFS12へ)で、FS12もしくはMS11に対して追い出される。   Also, in the Cache Flush request from the ATA command processing unit 121, all the contents of the WC 21 are the same as above (if the amount of data to be evicted exceeds 50% of the track size, go to the MS 11 and if not, go to the FS 12). Then, it is driven out to FS12 or MS11.

・前段ストレージ領域(FS)12
つぎに、FS12について説明する。FS12はクラスタ単位でデータを管理されるFIFOである。FS12は、ここを通過しているデータは、後段のIS13よりも更新頻度が高いとみなすためのバッファである。すなわち、FS12のFIFO構造においては、FIFO中を通過中の有効クラスタ(最新クラスタ)は、ホストからの同じアドレスに対する再書き込みがあった場合無効化されるので、FS12を通過中のクラスタは、FS12からIS13やMS11に追い出されたクラスタよりも、更新頻度が高いとみなすことができる。
-Previous storage area (FS) 12
Next, the FS 12 will be described. The FS 12 is a FIFO that manages data in cluster units. The FS 12 is a buffer for assuming that the data passing through the FS 12 is updated more frequently than the IS 13 in the subsequent stage. In other words, in the FIFO structure of the FS 12, the valid cluster (latest cluster) passing through the FIFO is invalidated when rewriting to the same address from the host is performed, so the cluster passing through the FS 12 It can be considered that the update frequency is higher than that of the cluster evicted from IS13 or MS11.

FS12を設けることで、後段のIS13におけるコンパクション処理に更新頻度の高いデータが紛れ込む可能性を低減している。無効化によって古いクラスタを保持していた論理ブロック自体の持つ有効クラスタ数が0となった場合、その論理ブロックは開放され、フリーブロックFBに割り当てられる。また、論理ブロックが無効化された場合、新たなフリーブロックFBを取得し、FS12に割り当てる。   The provision of the FS 12 reduces the possibility that frequently updated data will be mixed in the compaction process in the subsequent IS13. When the number of valid clusters held by the logical block itself holding the old cluster becomes 0 due to invalidation, the logical block is released and assigned to the free block FB. If the logical block is invalidated, a new free block FB is acquired and assigned to the FS 12.

WC21からFS12に対してクラスタデータの移動が発生すると、そのクラスタはFSIB12aに割り当てられた論理ブロックに対して書き込まれる。FSIB12a中に全てのページの書き込みが完了したブロックが存在する場合、後述するCIB処理によってそれらのブロックはFSIB12aからFS12にMoveされる。このFSIB12aからFS12へのMoveの際に、FS12のブロック数がFS12として許容される所定の上限値を超えると、最も古いブロックがFS12からIS13またはMS11に追い出されることになる。例えば、トラック内の有効クラスタの割合が50%以上のトラックは、MS11(TFS11b)への書き込みを行い、有効クラスタが残ったブロックを、IS13へMoveする。   When movement of cluster data from the WC 21 to the FS 12 occurs, the cluster is written into the logical block assigned to the FSIB 12a. When there are blocks in which all pages have been written in the FSIB 12a, these blocks are moved from the FSIB 12a to the FS 12 by the CIB processing described later. During the move from the FSIB 12 a to the FS 12, if the number of blocks of the FS 12 exceeds a predetermined upper limit value permitted as the FS 12, the oldest block is evicted from the FS 12 to the IS 13 or the MS 11. For example, a track whose effective cluster ratio in the track is 50% or more is written to the MS 11 (TFS 11b), and the block in which the effective cluster remains is moved to the IS 13.

NANDメモリ10内の構成要素間のデータ移動には、MoveとCopyの二通りがある。Moveは、後述する管理テーブルのポインタの付け替えを行うだけで、実際のデータの書き換えは行わない方法である。Copyは、一方の構成要素に格納されているデータを、ページ単位、トラック単位、ブロック単位で他方の構成要素に実際に書き換える方法である。   There are two types of data movement between components in the NAND memory 10: Move and Copy. Move is a method that does not rewrite actual data, only by changing pointers in a management table, which will be described later. Copy is a method of actually rewriting data stored in one component to the other component in page units, track units, or block units.

・中段ストレージ領域(IS)13
つぎに、IS13について説明する。IS13は、FS13と同様にクラスタ単位でデータの管理が行われる。前述したように、IS13に格納されたデータは、更新頻度が低いデータとみなすことができる。FS12からIS13に対して論理ブロックの移動(Move)、すなわちFS12からの追い出しが発生すると、以前FS12の管理対象であった追い出し対象の論理ブロックはポインタの付け替えによりIS13の管理対象ブロックとなる。このFS12からIS13への論理ブロックの移動により、IS13のブロック数がIS13として許容される所定の上限値を超えると、すなわちIS内の書き込み可能なフリーブロックFBの数が閾値を下回ると、IS13からMS11へのデータ追い出しおよびコンパクション処理が実行され、IS13のブロック数は規定値に戻される。
-Middle storage area (IS) 13
Next, IS13 will be described. In the IS 13, data management is performed in cluster units as in the FS 13. As described above, the data stored in the IS 13 can be regarded as data with a low update frequency. When a logical block moves (Move) from the FS 12 to the IS 13, that is, an eviction from the FS 12 occurs, the eviction target logical block that was previously managed by the FS 12 becomes a management target block of the IS 13 by changing the pointer. When the number of blocks of IS13 exceeds a predetermined upper limit allowed as IS13 due to the movement of the logical block from FS12 to IS13, that is, when the number of writable free blocks FB in IS falls below a threshold value, from IS13 Data expulsion and compaction processing to the MS 11 is executed, and the number of blocks of the IS 13 is returned to a specified value.

IS13では、トラック内の有効クラスタ数を使って以下のような、追い出し処理およびコンパクション処理を、実行する。
・トラックをトラック内の有効クラスタ数×有効クラスタ係数(トラックがMS11内で無効トラックが存在する論理ブロックに存在するか否かによって重み付けされる数であり、存在したほうが存在しない場合より数が大きい)順にソートし、積の値が大きいトラック2i+1個(2論理ブロック分)を集めて論理ブロックサイズの自然数倍にしてMSIB11aに追い出す。
・有効クラスタ数が最も少ない2つの論理ブロックの合計有効クラスタ数が例えば、所定の設定値である2個(1論理ブロック分)以上ある場合は、上のステップを繰り返す(IS内の2つの論理ブロックから、フリーブロックFBを作れるようになるまで行うため)。
・有効クラスタ数の少ない論理ブロックから順にクラスタを2個集め、IS13内でコンパクションを行う。
なお、ここでは有効クラスタ数が最も少ない2つの論理ブロックを選択するとしたが、この数は2つに限定されず、2つ以上の数であればよい。また、所定の設定値は、選択する論路ブロック数よりも1つ少ない論理ブロック数に収容可能なクラスタ数以下であればよい。
In IS13, the following eviction process and compaction process are executed using the number of valid clusters in the track.
Number of effective clusters in the track × effective cluster coefficient (the number is weighted depending on whether or not the track exists in the logical block where the invalid track exists in the MS 11, and the number is larger than the case where the track does not exist ) Sort in order, collect 2 i + 1 tracks (2 logical blocks) having a large product value, make them a natural number multiple of the logical block size, and drive them to the MSIB 11a.
· The total number valid clusters smallest number two logical blocks is, for example, if 2 k (for one logical block) or a predetermined set value, and repeats the above steps (the two in IS This is done until a free block FB can be created from the logical block).
Valid clusters 2 k pieces collected from the cluster logical blocks with a smallest number of sequentially, and compaction is performed in the IS 13.
Although the two logical blocks having the smallest number of valid clusters are selected here, this number is not limited to two and may be two or more. The predetermined set value may be equal to or less than the number of clusters that can be accommodated in the number of logical blocks one less than the number of logical block to be selected.

・メインストレージ領域(MS)11
つぎに、MS11について説明する。MS11はトラック単位でデータの管理を行う。MS11に格納されたデータは、更新頻度が低いとみなすことができる。WC21、FS12、IS13からMS11に対してトラックデータのCopyまたはMoveが発生すると、そのトラックはMSIS11aに割り当てられた論理ブロックに対して書き込まれる。一方で、トラック中の一部のデータ(クラスタ)のみがWC等から書き込まれるような場合には、既存のMS中のトラックデータと新しいデータをマージして新しいトラックデータを作った上でMSIB11aに書き込む、後述する受動マージが行われる。MS11内に無効トラックが蓄積し、MS11に割り当てられている論理ブロックの個数がMS11として許容されるブロック数の上限値を越えるような状況が発生すると、コンパクション処理を行って、無効なフリーブロックFBを作る。
Main storage area (MS) 11
Next, the MS 11 will be described. The MS 11 manages data in units of tracks. The data stored in the MS 11 can be regarded as having a low update frequency. When track data is copied or moved from WC21, FS12, or IS13 to MS11, the track is written to a logical block allocated to MSIS11a. On the other hand, when only a part of the data (cluster) in the track is written from the WC or the like, the track data in the existing MS and the new data are merged to create new track data and then stored in the MSIB 11a. A passive merge described later is performed. When invalid tracks are accumulated in the MS 11 and the number of logical blocks allocated to the MS 11 exceeds the upper limit of the number of blocks allowed for the MS 11, a compaction process is performed and an invalid free block FB is generated. make.

MS11のコンパクション処理は、例えば、論理ブロック内の有効トラック数のみに注目した以下の方法を実施する。
・有効トラックが少ない論理ブロックから順番に、無効トラックを合わせることによって無効なフリーブロックFBが作れるようになるまで選択する。
・選択した論理ブロックに収容されたトラックを、WC21、FS12、IS13内のデータと統合する受動マージを行いながらコンパクションを実行する。
・2トラック統合できた論理ブロックは、TFS11bに出力し(2トラックMSコンパクション)、2トラックに満たない個数のトラックは、MSIB11aに出力して(2トラック未満コンパクション)、より多くの無効なフリーブロックFBを作る。
For the compaction processing of the MS 11, for example, the following method focusing on only the number of valid tracks in the logical block is performed.
Select in order from logical blocks with few valid tracks until invalid free blocks FB can be created by combining invalid tracks.
Compaction is performed while performing passive merging to integrate tracks contained in the selected logical block with data in the WC21, FS12, and IS13.
-2 i track integrated logical block is output to TFS 11b (2 i track MS compaction), 2 i track less than 2 i track is output to MSIB 11a (less than 2 i track compaction), more Create an invalid free block FB.

TFS11bは、トラック単位でデータを管理されるFIFOである。TFS11bは、ここを通過しているデータは、後段のMS11よりも更新頻度が高いとみなすためのバッファである。すなわち、TFS11bのFIFO構造においては、FIFO中を通過中の有効トラック(最新トラック)は、ホストからの同じアドレスに対する再書き込みがあった場合無効化されるので、TFS11bを通過中のトラックは、TFS11bからMS11に追い出されたトラックよりも、更新頻度が高いとみなすことができる。   The TFS 11b is a FIFO that manages data in units of tracks. The TFS 11b is a buffer for assuming that the data passing through the TFS 11b has a higher update frequency than the MS 11 in the subsequent stage. That is, in the FIFO structure of the TFS 11b, the valid track (latest track) passing through the FIFO is invalidated when rewriting to the same address from the host is performed, so that the track passing through the TFS 11b It can be considered that the update frequency is higher than that of the track evicted from MS11 to MS11.

図8は、データ管理部120が図5および図6に示した各構成要素を制御管理するための管理テーブルを示すものである。データ管理部120は、前述したように、ATAコマンド処理部121とNANDメモリ10とをブリッジする機能を有し、DRAM20に記憶したデータの管理を行うDRAM層管理部120aと、NANDメモリ10に記憶したデータの管理を行う論理NAND層管理部120bと、NANDメモリ10を物理記憶デバイスとして管理する物理NAND層管理部120cとから構成される。RCクラスタ管理テーブル23、WCトラック管理テーブル24、WCクラスタ管理テーブル25は、DRAM層管理部120aにより制御される。トラック管理テーブル30、FS/IS管理テーブル40、MS論理ブロック管理テーブル35、FS/IS論理ブロック管理テーブル42、FS/IS内クラスタ管理テーブル44は、論理NAND層管理部120bにより管理される。論物変換テーブル50は、物理NAND層管理部120cにより管理される。   FIG. 8 shows a management table for the data management unit 120 to control and manage the components shown in FIGS. As described above, the data management unit 120 has a function of bridging the ATA command processing unit 121 and the NAND memory 10, and stores the data stored in the DRAM 20 in the DRAM layer management unit 120 a that manages data stored in the DRAM 20. The logical NAND layer management unit 120b that manages the data, and the physical NAND layer management unit 120c that manages the NAND memory 10 as a physical storage device. The RC cluster management table 23, the WC track management table 24, and the WC cluster management table 25 are controlled by the DRAM layer management unit 120a. The track management table 30, the FS / IS management table 40, the MS logical block management table 35, the FS / IS logical block management table 42, and the FS / IS intra-cluster management table 44 are managed by the logical NAND layer management unit 120b. The logical-physical conversion table 50 is managed by the physical NAND layer management unit 120c.

RC22は、逆引きテーブルであるRCクラスタ管理テーブル23によって管理される。逆引きテーブルでは、記憶デバイスの位置からその位置に記憶されている論理アドレスを検索することができる。WC21は、逆引きテーブルであるWCクラスタ管理テーブル25および正引きテーブルであるWCトラック管理テーブル24によって管理される。正引きテーブルでは、論理アドレスからその論理アドレスに対応するデータが存在する記憶デバイス位置を検索することができる。   The RC 22 is managed by an RC cluster management table 23 that is a reverse lookup table. In the reverse lookup table, the logical address stored at the storage device position can be searched. The WC 21 is managed by a WC cluster management table 25 that is a reverse lookup table and a WC track management table 24 that is a forward lookup table. In the forward lookup table, the storage device position where the data corresponding to the logical address exists can be searched from the logical address.

NANDメモリ10内のFS12(FSIB12a)、IS13、MS11(TFS11b、MSIB11a)は、トラック管理テーブル30、FS/IS管理テーブル40、MS論理ブロック管理テーブル35、FS/IS論理ブロック管理テーブル42、FS/IS内クラスタ管理テーブル44によってその論理アドレスが管理される。また、NANDメモリ10内のFS12(FSIB12a)、IS13、MS11(TFS11b、MSIB11a)は、論物変換テーブル50によって論理アドレスと物理アドレスとの変換が行われる。これらの各管理テーブルは、NANDメモリ10上の領域に記憶されており、SSD100の初期化時にNANDメモリ10からDRAM20上に読み込まれて、使用される。   The FS12 (FSIB12a), IS13, and MS11 (TFS11b, MSIB11a) in the NAND memory 10 are a track management table 30, an FS / IS management table 40, an MS logical block management table 35, an FS / IS logical block management table 42, and an FS / IS. The logical address is managed by the intra-IS cluster management table 44. The logical address and the physical address of the FS 12 (FSIB 12a), IS 13 and MS 11 (TFS 11b, MSIB 11a) in the NAND memory 10 are converted by the logical / physical conversion table 50. Each of these management tables is stored in an area on the NAND memory 10, and is read from the NAND memory 10 onto the DRAM 20 and used when the SSD 100 is initialized.

・RCクラスタ管理テーブル23(逆引き)
まず、図9を用いてRCクラスタ管理テーブル23について説明する。RC22は、前述したように、論理クラスタアドレスLSB(k−i)ビットでインデックスされるn-wayセットアソシアティブ方式で管理されている。RCクラスタ管理テーブル23は、RC(クラスタサイズ×m-line×n-way)22の各エントリのタグを管理するためのテーブルであり、各タグは、複数ビットの状態フラグ23aと、論理トラックアドレス23bによって構成されている。状態フラグ23aには、当該エントリを使用しても良いか否か(有効/無効)を示すValidビットの他に、当該エントリがNANDメモリ10からの読み出し待ちか否かを示すビット、当該エントリがATAコマンド処理部121への読み出し待ちか否かを示すビットなどが含まれる。RCクラスタ管理テーブル23は、DRAM20上のタグ記憶位置からLBAに一致する論理トラックアドレスを検索する逆引きテーブルとして機能する。
RC cluster management table 23 (reverse lookup)
First, the RC cluster management table 23 will be described with reference to FIG. As described above, the RC 22 is managed by an n-way set associative method that is indexed by the logical cluster address LSB (ki) bits. The RC cluster management table 23 is a table for managing the tag of each entry of RC (cluster size × m-line × n-way) 22, and each tag includes a multi-bit status flag 23 a and a logical track address. 23b. In the status flag 23a, in addition to the Valid bit indicating whether or not the entry may be used (valid / invalid), a bit indicating whether or not the entry is waiting to be read from the NAND memory 10, A bit indicating whether or not to wait for reading to the ATA command processing unit 121 is included. The RC cluster management table 23 functions as a reverse lookup table for retrieving a logical track address that matches the LBA from the tag storage position on the DRAM 20.

・WCクラスタ管理テーブル25(逆引き)
つぎに、図10を用いてWCクラスタ管理テーブル25について説明する。WC21は、前述したように、論理クラスタアドレスLSB(k−i)ビットでインデックスされるn-wayセットアソシアティブ方式で管理されている。WCクラスタ管理テーブル25は、WC(クラスタサイズ×m-line×n-way)21の各エントリのタグを管理するためのテーブルであり、各タグは、複数ビットの状態フラグ25aと、セクタ位置ビットマップ25bと、論理トラックアドレス25cによって構成されている。
WC cluster management table 25 (reverse lookup)
Next, the WC cluster management table 25 will be described with reference to FIG. As described above, the WC 21 is managed by the n-way set associative method that is indexed by the logical cluster address LSB (ki) bits. The WC cluster management table 25 is a table for managing the tag of each entry of the WC (cluster size × m-line × n-way) 21. Each tag includes a multi-bit status flag 25a and a sector position bit. It is composed of a map 25b and a logical track address 25c.

状態フラグ25aには、当該エントリを使用しても良いか否か(有効/無効)を示すValidビットの他に、当該エントリがNANDメモリ10への追い出し待ちか否かを示すビット、当該エントリがATAコマンド処理部からの書き込み待ちか否かを示すビットなどが含まれる。セクタ位置ビットマップ25bは、1クラスタに含まれる2(l−k)セクタのうちのどのセクタに有効なデータを保持しているかを2(l−k)ビットに展開して示すものである。このセクタ位置ビットマップ25bによって、WC21において、LBAと同じセクタ単位の管理を行うことができる。WCクラスタ管理テーブル25は、DRAM20上のタグ記憶位置からLBAに一致する論理トラックアドレスを検索する逆引きテーブルとして機能する。 In the status flag 25a, in addition to the Valid bit indicating whether or not the entry may be used (valid / invalid), a bit indicating whether or not the entry is waiting to be evicted to the NAND memory 10, A bit indicating whether or not to wait for writing from the ATA command processing unit is included. The sector position bit map 25b shows, in 2 (1-k) bits, which of 2 (1-k) sectors included in one cluster holds valid data. With this sector position bitmap 25b, the same sector unit management as the LBA can be performed in the WC21. The WC cluster management table 25 functions as a reverse lookup table for retrieving a logical track address that matches the LBA from the tag storage position on the DRAM 20.

・WCトラック管理テーブル24(正引き)
つぎに、図11を用いてWCトラック管理テーブル24について説明する。WCトラック管理テーブル24は、WC21上に格納されているクラスタをトラック単位でまとめた情報を管理するものであり、FIFO的な機能を有するリンクドリスト構造によってトラック間のWC21に登録された順序(LRU)を表現している。なお、WC21で最後に更新された順序によってLRUを表現するようにしてもよい。各リストのエントリは、論理トラックアドレス24a、当該論理トラックアドレスに含まれるWC21中の有効クラスタ数24b、way-lineビットマップ24cおよび次のエントリへのポインタを示すnextポインタ24dから構成されている。WCトラック管理テーブル24は、論理トラックアドレス24aから所要情報を得るので、正引きテーブルとして機能する。
WC track management table 24 (forward lookup)
Next, the WC track management table 24 will be described with reference to FIG. The WC track management table 24 manages information in which the clusters stored on the WC 21 are grouped in units of tracks. The order registered in the WC 21 between tracks by a linked list structure having a FIFO function ( LRU). Note that the LRU may be expressed in the order last updated by the WC 21. Each list entry includes a logical track address 24a, the number of valid clusters 24b in the WC 21 included in the logical track address, a way-line bitmap 24c, and a next pointer 24d indicating a pointer to the next entry. The WC track management table 24 functions as a forward lookup table because necessary information is obtained from the logical track address 24a.

way-lineビットマップ24cは、WC21中で当該論理トラックアドレスに含まれる有効クラスタがWC21中のm×nのエントリ中のどのエントリに格納されているか示すマップ情報であり、有効クラスタが格納されているエントリではValidビットが”1”になっている。このway-lineビットマップ24cは、例えば、(1ビット(Valid)+log2nビット(n-way))×mビット(m-line)で構成されている。WCトラック管理テーブル24はリンクドリスト構造を有しており、WC21中に存在する論理トラックアドレスに関する情報のみがエントリされている。 The way-line bitmap 24c is map information indicating which entry in the m × n entry in the WC 21 the valid cluster included in the logical track address in the WC 21 is stored. In some entries, the Valid bit is “1”. The way-line bitmap 24c is composed of, for example, (1 bit (Valid) + log 2 n bits (n-way)) × m bits (m-line). The WC track management table 24 has a linked list structure, and only information relating to logical track addresses existing in the WC 21 is entered.

・トラック管理テーブル30(正引き)
つぎに、図12を用いてトラック管理テーブル30について説明する。トラック管理テーブル30は、論理トラックアドレス単位でMS11上の論理的なデータ位置を管理するためのテーブルであり、クラスタ単位でFS12やIS13にデータが保持されている場合には、それらに関する基本情報と、詳細情報へのポインタも保持している。論理トラックアドレス30aをインデックスとした配列形式で構成される。論理トラックアドレス30aをインデックスとした各エントリは、クラスタビットマップ30b、論理ブロックID30c+論理ブロック内トラック位置30d、クラスタテーブルポインタ30e、FSクラスタ数30f、ISクラスタ数30gなどの情報で構成されている。トラック管理テーブル30は、論理トラックアドレスをインデックスとして、その論理トラックアドレスに対応する論理トラックが記憶されている論理ブロックID(記憶デバイス位置に対応)などの所要情報を得るので、正引きテーブルとして機能する。
・ Track management table 30 (forward lookup)
Next, the track management table 30 will be described with reference to FIG. The track management table 30 is a table for managing logical data positions on the MS 11 in units of logical track addresses. When data is held in the FS 12 or the IS 13 in units of clusters, basic information about them and In addition, a pointer to detailed information is also held. It is configured in an array format with the logical track address 30a as an index. Each entry using the logical track address 30a as an index includes information such as a cluster bitmap 30b, a logical block ID 30c + a track position 30d in a logical block, a cluster table pointer 30e, an FS cluster number 30f, and an IS cluster number 30g. The track management table 30 functions as a forward lookup table because it obtains necessary information such as a logical block ID (corresponding to a storage device position) in which a logical track corresponding to the logical track address is stored using a logical track address as an index. To do.

クラスタビットマップ30bは、1つの論理トラックアドレス範囲に属する2(k−i)個のクラスタをクラスタアドレス昇順に例えば8分割したビットマップであり、8個の各ビットは、2(k−i−3)個のクラスタアドレスに対応するクラスタがMS11に存在するか、FS12もしくはIS13に存在するかを示している。ビットが“0”の場合は、その検索対象のクラスタは確実にMS11内に存在することを示し、ビットが“1”の場合は、そのクラスタはFS12もしくはIS13に存在する可能性があることを示している。 The cluster bitmap 30b is a bitmap in which 2 (ki) clusters belonging to one logical track address range are divided into, for example, 8 in ascending order of the cluster address. Each of the 8 bits is represented by 2 (ki-). 3) Indicates whether a cluster corresponding to one cluster address exists in the MS 11, FS 12 or IS 13. When the bit is “0”, it indicates that the cluster to be searched is surely present in the MS 11, and when the bit is “1”, the cluster may exist in the FS 12 or IS 13. Show.

論理ブロックID30cは、当該論理トラックアドレスに対応する論理トラックが記憶されている論理ブロックIDを識別するための情報である。論理ブロック内トラック位置30dは、論理ブロックID30cで指定された論理ブロック中における当該論理トラックアドレス(30a)に対応するトラックの記憶位置を示すものである。1論理ブロックは最大2個の有効トラックで構成されるので、論理ブロック内トラック位置30dは、iビットで2個のトラック位置を識別する。 The logical block ID 30c is information for identifying a logical block ID in which a logical track corresponding to the logical track address is stored. The intra-logical block track position 30d indicates the storage position of the track corresponding to the logical track address (30a) in the logical block specified by the logical block ID 30c. Since one logical block is composed of a maximum of 2 i effective tracks, the track position 30d in the logical block identifies 2 i track positions with i bits.

クラスタテーブルポインタ30eは、リンクドリスト構造を有するFS/IS管理テーブル40の各リストの先頭エントリへのポインタである。クラスタビットマップ30bの検索で、当該クラスタがFS12/IS13に存在する可能性があることを示していた場合、クラスタテーブルポインタ30eを用いてFS/IS管理テーブル40の検索を実行する。FSクラスタ数30fは、FS12内に存在する有効クラスタ数を示している。ISクラスタ数30gは、IS13内に存在する有効クラスタ数を示している。   The cluster table pointer 30e is a pointer to the top entry of each list of the FS / IS management table 40 having a linked list structure. If the search of the cluster bitmap 30b indicates that there is a possibility that the cluster exists in the FS 12 / IS 13, the search of the FS / IS management table 40 is executed using the cluster table pointer 30e. The number of FS clusters 30f indicates the number of valid clusters existing in the FS 12. The IS cluster number 30 g indicates the number of effective clusters existing in the IS 13.

・FS/IS管理テーブル40(正引き)
つぎに、図13を用いてFS/IS管理テーブル40について説明する。FS/IS管理テーブル40は、論理クラスタ単位でFS12(FSIB12aも含む)もしくはIS13に保持されているデータの位置を管理するためのテーブルである。図13に示すように、論理トラックアドレス毎に独立したリンクドリスト形式で構成され、各リストの先頭エントリへのポインタは、前述したように、トラック管理テーブル30のクラスタテーブルポインタ30eのフィールドに保持されている。図13では、2つの論理トラックアドレス分のリンクドリストが示されている。各エントリは、論理クラスタアドレス40a、論理ブロックID40b、論理ブロック内クラスタ位置40c、FS/ISブロックID40d、nextポインタ40eから構成されている。FS/IS管理テーブル40は、論理クラスタアドレス40aから、その論理クラスタアドレスに対応する論理クラスタが記憶されている論理ブロックID40b、論理ブロックン内クラスタ位置40c(記憶デバイス位置に対応)などの所要情報を得るので、正引きテーブルとして機能する。
FS / IS management table 40 (forward lookup)
Next, the FS / IS management table 40 will be described with reference to FIG. The FS / IS management table 40 is a table for managing the location of data held in the FS 12 (including the FSIB 12a) or the IS 13 in units of logical clusters. As shown in FIG. 13, it is configured in an independent linked list format for each logical track address, and the pointer to the head entry of each list is held in the field of the cluster table pointer 30e of the track management table 30 as described above. Has been. FIG. 13 shows a linked list for two logical track addresses. Each entry includes a logical cluster address 40a, a logical block ID 40b, a cluster position 40c in a logical block, an FS / IS block ID 40d, and a next pointer 40e. The FS / IS management table 40 includes necessary information from the logical cluster address 40a to the logical block ID 40b in which the logical cluster corresponding to the logical cluster address is stored and the intra-logical block cluster position 40c (corresponding to the storage device position). Therefore, it functions as a forward lookup table.

論理ブロックID40bは、当該論理クラスタアドレス40aに対応する論理クラスタが記憶されている論理ブロックIDを識別するための情報である。論理ブロック内クラスタ位置40cは、論理ブロックID40bで指定された論理ブロック中における当該論理クラスタアドレス40aに対応するクラスタの記憶位置を示すものである。1論理ブロックは最大2個の有効クラスタで構成されるので、論理ブロック内クラスタ位置40cは、kビットで2位置を識別する。FS/ISブロックID40dは、後述するFS/IS論理ブロック管理テーブル42のインデックスであるFS/ISブロックIDが登録されている。FS/ISブロックIDは、FS12またはIS13に所属する論理ブロックを識別するための情報であり、このFS/IS管理テーブル40でのFS/ISブロックID40dは、後述するFS/IS論理ブロック管理テーブル42とのリンクのために登録されている。nextポインタ40eは、論理トラックアドレス毎にリンクされる同じリスト内の次のエントリへのポインタを示している。 The logical block ID 40b is information for identifying the logical block ID in which the logical cluster corresponding to the logical cluster address 40a is stored. The intra-logical block cluster position 40c indicates the storage position of the cluster corresponding to the logical cluster address 40a in the logical block specified by the logical block ID 40b. Since one logical block is composed of a maximum of 2 k effective clusters, the intra-logical block cluster position 40c identifies 2 k positions with k bits. In the FS / IS block ID 40d, an FS / IS block ID that is an index of an FS / IS logical block management table 42 described later is registered. The FS / IS block ID is information for identifying a logical block belonging to FS12 or IS13, and an FS / IS block ID 40d in the FS / IS management table 40 is an FS / IS logical block management table 42 described later. Registered for a link with. The next pointer 40e indicates a pointer to the next entry in the same list linked for each logical track address.

・MS論理ブロック管理テーブル35(逆引き)
つぎに、図14を用いてMS論理ブロック管理テーブル35について説明する。MS論理ブロック管理テーブル35は、MS11に用いられている論理ブロックに関する情報(どの論理トラックが記憶されているか、追記可能か等)を一元管理するためのテーブルである。なお、MS論理ブロック管理テーブル35には、FS12(FSIB12も含む)、IS13に所属する論理ブロックに関する情報も登録されている。MS論理ブロック管理テーブル35は、論理ブロックID35aをインデックスとした配列形式で構成され、エントリ数は128GBのNANDメモリ10の場合は、32Kエントリまで持つことができる。各エントリは、2トラック分のトラック管理ポインタ35b、有効トラック数35c、書き込み可能先頭トラック35d、Validフラグ35eから構成されている。このMS論理ブロック管理テーブル35は、記憶デバイス位置に対応する論理ブロックID35aから、この論理ブロックに記憶されている論理トラックアドレスなどの所要情報を得るので、逆引きテーブルとして機能する。
MS logical block management table 35 (reverse lookup)
Next, the MS logical block management table 35 will be described with reference to FIG. The MS logical block management table 35 is a table for centrally managing information on logical blocks used in the MS 11 (which logical track is stored, whether additional recording is possible, etc.). In the MS logical block management table 35, information on logical blocks belonging to FS12 (including FSIB12) and IS13 is also registered. The MS logical block management table 35 is configured in an array format using the logical block ID 35a as an index. In the case of the NAND memory 10 having 128 GB of entries, the MS logical block management table 35 can have up to 32K entries. Each entry includes a track management pointer 35b for 2 i tracks, a valid track number 35c, a writable top track 35d, and a Valid flag 35e. The MS logical block management table 35 functions as a reverse lookup table because necessary information such as a logical track address stored in the logical block is obtained from the logical block ID 35a corresponding to the storage device position.

トラック管理ポインタ35bは、論理ブロックID35aで指定される当該論理ブロック内の2個のトラック位置毎に対応する論理トラックアドレスを保持する。この論理トラックアドレスを用いて、論理トラックアドレスをインデックスとするトラック管理テーブル30を検索することができる。有効トラック数35cは、論理ブロックID35aで指定される当該論理ブロックに記憶されているトラックのうちの有効なものの個数(最大2個)を示している。書き込み可能先頭トラック位置35dは、論理ブロックID35aで指定される当該論理ブロックが追記中のブロックであった場合における追記可能なトラック先頭位置(0〜2−1、追記終了時は2)を示している。Validフラグ35eは、当該論理ブロックエントリがMS11(MSIB11aも含む)として管理されている場合に“1”である。 The track management pointer 35b holds a logical track address corresponding to every 2 i track positions in the logical block designated by the logical block ID 35a. Using this logical track address, the track management table 30 using the logical track address as an index can be searched. The number of valid tracks 35c indicates the number of valid tracks (up to 2 i ) among the tracks stored in the logical block specified by the logical block ID 35a. The writable head track position 35d is a track start position (0 to 2 i -1, 2 i at the end of additional writing) when the logical block specified by the logical block ID 35a is a block being additionally written. Show. The Valid flag 35e is “1” when the logical block entry is managed as the MS 11 (including the MSIB 11a).

・FS/IS論理ブロック管理テーブル42(逆引き)
つぎに、図15を用いてFS/IS論理ブロック管理テーブル42について説明する。FS/IS論理ブロック管理テーブル42は、FS/ISブロックID42aをインデックスとした配列形式で構成され、FS12またはIS13として利用されている論理ブロックに関する情報(論理ブロックIDとの対応、FS/IS内クラスタ管理テーブル44へのインデックス、追記可能か等)を管理するためのテーブルである。FS/IS論理ブロック管理テーブル42は、主にFS/IS管理テーブル40中のFS/ISブロックID40dを用いてアクセスされる。各エントリは、論理ブロックID42b、ブロック内クラスタテーブル42c、有効クラスタ数42d、書き込み可能先頭ページ42e、Validフラグ42fから構成されている。このMS論理ブロック管理テーブル35は、記憶デバイス位置に対応するFS/ISブロックID42aから、この論理ブロックに記憶されている論理クラスタなどの所要情報を得るので、逆引きテーブルとして機能する。
FS / IS logical block management table 42 (reverse lookup)
Next, the FS / IS logical block management table 42 will be described with reference to FIG. The FS / IS logical block management table 42 is configured in an array format using the FS / IS block ID 42a as an index, and information on logical blocks used as the FS 12 or IS 13 (corresponding to logical block ID, FS / IS internal cluster) This is a table for managing an index to the management table 44, whether additional writing is possible, and the like. The FS / IS logical block management table 42 is accessed mainly using the FS / IS block ID 40d in the FS / IS management table 40. Each entry includes a logical block ID 42b, an intra-block cluster table 42c, a valid cluster number 42d, a writable head page 42e, and a Valid flag 42f. The MS logical block management table 35 functions as a reverse lookup table because necessary information such as the logical cluster stored in the logical block is obtained from the FS / IS block ID 42a corresponding to the storage device position.

論理ブロックID42bには、MS論理ブロック管理テーブル35に登録された論理ブロックの中で、FS12(FSIB12も含む)、IS13に所属している論理ブロックに対応する論理ブロックIDが登録される。ブロック内クラスタテーブル42cには、論理ブロック中の各クラスタ位置にどの論理クラスタアドレスで指定される論理クラスタが記録されているかを示す後述するFS/IS内クラスタ管理テーブル44へのインデックスが登録される。有効クラスタ数42dは、FS/ISブロックID42aで指定される当該論理ブロックに記憶されているクラスタのうちの有効なものの個数(最大2個)を示している。書き込み可能先頭ページ位置42eは、FS/ISブロックID42aで指定される当該論理ブロックが追記中のブロックであった場合における追記可能な先頭ページ位置(0〜2−1、追記終了時は2)を示している。Validフラグ42fは、この論理ブロックエントリがFS12(FSIB12も含む)またはIS13として管理されている場合に“1”である。 Among the logical blocks registered in the MS logical block management table 35, the logical block ID 42b is registered with a logical block ID corresponding to a logical block belonging to FS12 (including FSIB12) and IS13. In the intra-block cluster table 42c, an index to a later-described intra-FS / IS intra-cluster management table 44 indicating which logical cluster address designated by each logical cluster address is recorded at each cluster position in the logical block is registered. . The number of valid clusters 42d indicates the number of valid clusters among clusters stored in the logical block designated by the FS / IS block ID 42a (maximum 2 k pieces). The writable first page position 42e is a writable first page position (0 to 2 j -1 when the logical block specified by the FS / IS block ID 42a is a block being additionally written, 2 i at the end of the additional writing. ). The Valid flag 42f is “1” when this logical block entry is managed as FS12 (including FSIB12) or IS13.

・FS/IS内クラスタ管理テーブル44(逆引き)
つぎに、図16を用いてFS/IS内クラスタ管理テーブル44について説明する。FS/IS内クラスタ管理テーブル44は、FS12もしくはIS13として利用されている論理ブロック中の各クラスタ位置にどの論理クラスタが記録されているのかを示すテーブルである。1論理ブロックあたり、2ページ×2(k−j)クラスタ=2個のエントリを持ち、当該論理ブロック内のクラスタ位置の0番目〜2−1番目に対応する情報が連続領域に配置される。さらにこの2個の情報を含むテーブルがFS12およびIS13に所属する論理ブロック数(P個)分だけ保持されており、FS/IS論理ブロック管理テーブル42のブロック内クラスタテーブル42cは、このP個のテーブルに対する位置情報(ポインタ)となっている。連続領域に配される各エントリ44aの位置は、1論理ブロック中のクラスタ位置を示し、また各エントリ44aの内容は、当該クラスタ位置にどの論理クラスタが記憶されているかが識別できるように、FS/IS管理テーブル40で管理される該当論理クラスタアドレスを含むリストへのポインタが登録されている。すなわち、エントリ44aは、リンクドリストの先頭を指し示すのではなく、リンクドリスト中の該当論理クラスタアドレスを含む1つのリストへのポインタが登録されている。
-FS / IS cluster management table 44 (reverse lookup)
Next, the FS / IS intra-cluster management table 44 will be described with reference to FIG. The FS / IS intra-cluster management table 44 is a table showing which logical cluster is recorded at each cluster position in the logical block used as the FS 12 or IS 13. Each logical block has 2 j pages × 2 (k−j) clusters = 2 k entries, and information corresponding to the 0th to 2 k −1st cluster positions in the logical block is arranged in a continuous area. Is done. Further the 2 k-number of logical blocks information table including belongs to FS12 and IS13 and (P pieces) amount corresponding held, block cluster table 42c of the FS / IS logical block management table 42, the P number Position information (pointer) for the table. The position of each entry 44a arranged in the continuous area indicates the cluster position in one logical block, and the content of each entry 44a is FS so that it can be identified which logical cluster is stored at the cluster position. A pointer to a list including the corresponding logical cluster address managed by the / IS management table 40 is registered. That is, the entry 44a does not indicate the head of the linked list, but a pointer to one list including the corresponding logical cluster address in the linked list is registered.

・論物変換テーブル50(正引き)
つぎに、図17を用いて論物変換テーブル50について説明する。論物変換テーブル50は、論理ブロックID50aをインデックスとした配列形式で構成され、エントリ数は、128GBのNANDメモリ10の場合は、最大32Kエントリまで持つことができる。論物変換テーブル50は、論理ブロックIDと物理ブロックIDとの変換、寿命に関する情報を管理するためのテーブルである。各エントリは、物理ブロックアドレス50b、消去回数50c、読み出し回数50dから構成される。この論物変換テーブル50は、論理ブロックIDから物理ブロックID(物理ブロックアドレス)などの所要情報を得るので、正引きテーブルとして機能する。
・ Conversion table 50 (forward lookup)
Next, the logical-physical conversion table 50 will be described with reference to FIG. The logical-physical conversion table 50 is configured in an array format using the logical block ID 50a as an index, and the number of entries can have a maximum of 32K entries in the case of the 128 GB NAND memory 10. The logical-physical conversion table 50 is a table for managing information about conversion between logical block IDs and physical block IDs and lifetime. Each entry includes a physical block address 50b, an erase count 50c, and a read count 50d. The logical-physical conversion table 50 functions as a forward lookup table because necessary information such as a physical block ID (physical block address) is obtained from the logical block ID.

物理ブロックアドレス50bは、1つの論理ブロックID50aに所属する8個の物理ブロックID(物理ブロックアドレス)を示している。消去回数50cは、当該論理ブロックIDの消去回数を示している。バッドブロック(BB)管理は、物理ブロック(512KB)単位に行われるが、消去回数の管理は、32ビット倍速モードによる1論理ブロック(4MB)単位に管理される。読み出し回数50dは、当該論理ブロックIDの読み出し回数を示している。消去回数50cは、例えば、NAND型フラッシュメモリの書き換え回数を平準化するウェアレベリング処理で利用することが可能である。読み出し回数50dは、リテンション特性の劣化した物理ブロックに保持されるデータの再書き込みを行うリフレッシュ処理で利用することが可能である。   The physical block address 50b indicates eight physical block IDs (physical block addresses) belonging to one logical block ID 50a. The erase count 50c indicates the erase count of the logical block ID. Bad block (BB) management is performed in units of physical blocks (512 KB), but the number of erasures is managed in units of one logical block (4 MB) in the 32-bit double speed mode. The read count 50d indicates the read count of the logical block ID. The erase count 50c can be used, for example, in a wear leveling process for leveling the number of rewrites of the NAND flash memory. The read count 50d can be used in a refresh process for rewriting data held in a physical block having a deteriorated retention characteristic.

図8に示した管理テーブルを管理対象毎にまとめると次のようになる。
RC管理:RCクラスタ管理テーブル
WC管理:WCクラスタ管理テーブル、WCトラック管理テーブル
MS管理:トラック管理テーブル30、MS論理ブロック管理テーブル35
FS/IS管理:トラック管理テーブル30、FS/IS管理テーブル40、MS論理ブロック管理テーブル35、FS/IS論理ブロック管理テーブル42、FS/IS内クラスタ管理テーブル44
The management table shown in FIG. 8 is summarized for each management target as follows.
RC management: RC cluster management table WC management: WC cluster management table, WC track management table MS management: track management table 30, MS logical block management table 35
FS / IS management: track management table 30, FS / IS management table 40, MS logical block management table 35, FS / IS logical block management table 42, FS / IS intra-cluster management table 44

なお、MS構造管理テーブル(図示せず)において、MS11,MSIB11a、TFS11bを含めたMS領域の構造を管理しており、具体的には、MS11、MSIB11a、TFS11bに割り当てた論理ブロックなどを管理している。また、FS/IS構造管理テーブル(図示せず)において、FS12、FSIB12a、IS13を含めたFS/IS領域の構造を管理しており、具体的には、FS12、FSIB12a、IS13に割り当てた論理ブロックなどを管理している。   The MS structure management table (not shown) manages the structure of the MS area including MS11, MSIB11a, and TFS11b. Specifically, it manages logical blocks assigned to MS11, MSIB11a, and TFS11b. ing. In addition, in the FS / IS structure management table (not shown), the structure of the FS / IS area including FS12, FSIB12a, and IS13 is managed. Specifically, logical blocks allocated to FS12, FSIB12a, and IS13 I manage.

・Read処理
つぎに、図18に示すフローチャートを参照して、読み出し処理について説明する。ATAコマンド処理部121から、Readコマンドおよび読み出しアドレスとしてのLBAが入力されると、データ管理部120は、図9に示したRCクラスタ管理テーブル23と図10に示したWCクラスタ管理テーブル25を検索する(ステップS100)。具体的には、LBAのクラスタアドレスのLSB(k−i)ビット(図7参照)に対応するlineをRCクラスタ管理テーブル23とWCクラスタ管理テーブル25から選択し、選択したlineの各wayにエントリされている論理トラックアドレス23b、25cをLBAのトラックアドレスと比較し(ステップS110)、一致したwayが存在している場合は、キャッシュヒットとし、ヒットしたRCクラスタ管理テーブル23またはWCクラスタ管理テーブル25の該当line、該当wayに対応するWC21またはRC22のデータを読み出して、ATAコマンド処理部121に送る(ステップS115)。
Read Process Next, the read process will be described with reference to the flowchart shown in FIG. When the Read command and the LBA as the read address are input from the ATA command processing unit 121, the data management unit 120 searches the RC cluster management table 23 shown in FIG. 9 and the WC cluster management table 25 shown in FIG. (Step S100). Specifically, a line corresponding to the LSB (ki) bit (see FIG. 7) of the cluster address of the LBA is selected from the RC cluster management table 23 and the WC cluster management table 25, and entered in each way of the selected line. The tracked logical track addresses 23b and 25c are compared with the track address of the LBA (step S110). If there is a matching way, a cache hit is determined and the hit RC cluster management table 23 or WC cluster management table 25 The data of WC21 or RC22 corresponding to the corresponding line and the corresponding way is read and sent to the ATA command processing unit 121 (step S115).

データ管理部120は、RC22またはWC21でヒットしなかった場合は(ステップS110)、検索対象のクラスタがNANDメモリ10のどこに格納されているかを検索する。データ管理部120は、まず、図12に示したトラック管理テーブル30を検索する(ステップS120)。トラック管理テーブル30は、論理トラックアドレス30aでインデックスされているため、LBAで指定された論理トラックアドレスに一致する論理トラックアドレス30aのエントリだけをチェックする。   If the data management unit 120 does not hit the RC 22 or the WC 21 (step S110), the data management unit 120 searches the NAND memory 10 where the search target cluster is stored. First, the data management unit 120 searches the track management table 30 shown in FIG. 12 (step S120). Since the track management table 30 is indexed by the logical track address 30a, only the entry of the logical track address 30a that matches the logical track address specified by the LBA is checked.

まず、チェックしたいLBAの論理クラスタアドレスに基づいてクラスタビットマップ30bから対応するビットを選択する。対応するビットが“0”を示していれば、そのクラスタは確実にMS内に最新のデータが存在していることを意味する(ステップS130)。この場合は、このトラックが存在する論理ブロックIDおよびトラック位置を、同じ論理トラックアドレス30aのエントリ中の論理ブロックID30cと論理ブロック内トラック位置30dから得て、さらにLBAのクラスタアドレスのLSB(k−i)ビットを利用して、トラック位置からのオフセットを算出することで、NANDメモリ10内の当該クラスタアドレスに対応するクラスタデータが格納されている位置を算出することができる。具体的には、論理NAND層管理部120bでは、上記のようにしてトラック管理テーブル30から取得した論理ブロックID30cと論理ブロック内トラック位置30dと、LBAの論理クラスタアドレスのLSB(k−i)ビットを物理NAND層管理部120cに与える。   First, the corresponding bit is selected from the cluster bitmap 30b based on the logical cluster address of the LBA to be checked. If the corresponding bit indicates “0”, it means that the cluster surely has the latest data in the MS (step S130). In this case, the logical block ID and the track position where this track exists are obtained from the logical block ID 30c and the intra-logical block track position 30d in the entry of the same logical track address 30a, and the LSB (k− i) By calculating the offset from the track position using the bit, the position where the cluster data corresponding to the cluster address in the NAND memory 10 is stored can be calculated. Specifically, in the logical NAND layer management unit 120b, the logical block ID 30c, the track position 30d in the logical block acquired from the track management table 30 as described above, and the LSB (ki) bit of the logical cluster address of the LBA. To the physical NAND layer management unit 120c.

物理NAND層管理部120cでは、論理ブロックID30cに対応する物理ブロックアドレス(物理ブロックID)を、論理ブロックIDをインデックスとしている図17に示す論物変換テーブル50から取得し(ステップS160)、さらに取得した物理ブロックID中のトラック位置(トラック先頭位置)を論理ブロック内トラック位置30dから算出し、さらにLBAのクラスタアドレスのLSB(k−i)ビットから、前記算出した物理ブロックID中のトラック先頭位置からのオフセットを算出することで、物理ブロック中のクラスタデータを取得することができる。NANDメモリ10のMS11から取得されたクラスタデータは、RC22を介してATAコマンド処理部121に送られる(ステップS180)。   In the physical NAND layer management unit 120c, the physical block address (physical block ID) corresponding to the logical block ID 30c is acquired from the logical-physical conversion table 50 shown in FIG. 17 using the logical block ID as an index (step S160), and further acquired. The track position (track start position) in the physical block ID is calculated from the track position 30d in the logical block, and the track start position in the physical block ID is calculated from the LSB (ki) bits of the LBA cluster address. By calculating the offset from, cluster data in the physical block can be acquired. The cluster data acquired from the MS 11 of the NAND memory 10 is sent to the ATA command processing unit 121 via the RC 22 (step S180).

一方、LBAのクラスタアドレスに基づくクラスタビットマップ30bの検索で、対応するビットが“1”を示していた場合は、そのクラスタがFS12またはIS13に格納されている可能性がある(ステップS130)。この場合は、トラック管理テーブル30の該当する論理トラックアドレス30aのエントリ中のクラスタテーブルポインタ30eのエントリを取り出し、このポインタを用いてFS/IS管理テーブル40の該当する論理トラックアドレスに対応するリンクドリストを順次検索する(ステップS140)。具体的には、該当する論理トラックアドレスのリンクドリスト中のLBAの論理クラスタアドレスに一致する論理クラスタアドレス40aのエントリを検索し、一致する論理クラスタアドレス40aのエントリが存在した場合は(ステップS150)、一致したリスト中の論理ブロックID40bおよび論理ブロック内クラスタ位置40cを取得し、前述と同様にして、論物変換テーブル50を用いて物理ブロック中のクラスタデータを取得する(ステップS160、S180)。具体的には、取得した論理ブロックIDに対応する物理ブロックアドレス(物理ブロックID)を、論物変換テーブル50から取得し(ステップS160)、さらに取得した物理ブロックID中のクラスタ位置を、論理ブロック内クラスタ位置40cのエントリから取得した論理ブロック内クラスタ位置から算出することで、物理ブロック中のクラスタデータを取得することができる。NANDメモリ10のFS12またはIS13から取得されたクラスタデータは、RC22を介してATAコマンド処理部121に送られる(ステップS180)。   On the other hand, if the corresponding bit indicates “1” in the search of the cluster bitmap 30b based on the cluster address of the LBA, there is a possibility that the cluster is stored in the FS 12 or the IS 13 (step S130). In this case, the entry of the cluster table pointer 30e in the entry of the corresponding logical track address 30a in the track management table 30 is extracted, and the linked link corresponding to the corresponding logical track address in the FS / IS management table 40 is used by using this pointer. The list is searched sequentially (step S140). Specifically, an entry of the logical cluster address 40a that matches the logical cluster address of the LBA in the linked list of the corresponding logical track address is searched, and if an entry of the matching logical cluster address 40a exists (step S150) ), The logical block ID 40b and the intra-logical block cluster position 40c in the matched list are acquired, and the cluster data in the physical block is acquired using the logical-physical conversion table 50 in the same manner as described above (steps S160 and S180). . Specifically, the physical block address (physical block ID) corresponding to the acquired logical block ID is acquired from the logical-physical conversion table 50 (step S160), and the cluster position in the acquired physical block ID is further converted into the logical block. By calculating from the cluster position in the logical block acquired from the entry in the inner cluster position 40c, the cluster data in the physical block can be acquired. The cluster data acquired from the FS 12 or the IS 13 of the NAND memory 10 is sent to the ATA command processing unit 121 via the RC 22 (step S180).

このFS/IS管理テーブル40の検索によって、検索対象のクラスタが存在しなかった場合は(ステップS150)、再度トラック管理テーブル30のエントリを検索してMS11上の位置を確定する(ステップS170)。   If there is no cluster to be searched by searching the FS / IS management table 40 (step S150), the entry in the track management table 30 is searched again to determine the position on the MS 11 (step S170).

・Write処理
つぎに、図19に示すフローチャートを参照して、書き込み処理について説明する。FUA(DRAMキャッシュをバイパスしてNANDへの直接書き込みを行う)でないWriteコマンドにより書き込まれたデータは必ず一旦WC21上に格納され、その後条件に応じてNANDメモリ10に対して書き込まれることになる。書き込み処理では、追い出し処理、コンパクション処理が発生する可能性がある。この実施の形態では、書き込み処理を、ライトキャッシュフラッシュ処理(以下WCF処理)と、クリーンインプットバッファ処理(以下CIB処理)との2ステージに大きく分割している。ステップS300からステップS320までは、ATAコマンド処理部121からのWrite要求からWCF処理までを示しており、ステップS330〜最終ステップまでがCIB処理を示している。
Write Process Next, the write process will be described with reference to the flowchart shown in FIG. Data written by a Write command other than FUA (bypassing the DRAM cache and performing direct writing to the NAND) is always stored once on the WC 21 and then written to the NAND memory 10 according to the conditions. In the writing process, an eviction process and a compaction process may occur. In this embodiment, the write process is largely divided into two stages, a write cache flush process (hereinafter referred to as WCF process) and a clean input buffer process (hereinafter referred to as CIB process). Steps S300 to S320 show from the Write request from the ATA command processing unit 121 to WCF processing, and steps S330 to the final step show CIB processing.

WCF処理は、WC21にあるデータをNANDメモリ10(FS12のFSIB12aまたはMS11のMSIB11a)にcopyする処理であり、ATAコマンド処理部121からのWrite要求もしくはCache Flush要求単体は、この処理のみで完結することができる。これにより処理が開始されたATAコマンド処理部121のWrite要求の処理遅延を最大でもWC21の容量分のNANDメモリ10への書き込み時間に限定することができるようになる。   The WCF process is a process of copying data in the WC 21 to the NAND memory 10 (FSIB 12a of the FS 12 or MSIB 11a of the MS 11), and a write request or a cache flush request from the ATA command processing unit 121 is completed only by this process. be able to. As a result, the processing delay of the write request of the ATA command processing unit 121 that has started processing can be limited to the time for writing to the NAND memory 10 corresponding to the capacity of the WC 21 at the maximum.

CIB処理は、WCF処理によって書き込まれたFSIB12aのデータをFS12にMoveする処理と、WCF処理によって書き込まれたMSIB11aのデータをMS11にMoveする処理とを含む。CIB処理を開始すると、連鎖的にNANDメモリ10内の各構成要素(FS12、IS13、MS11など)間のデータ移動やコンパクション処理が発生する可能性があり、処理全体に要する時間は状態によって大きく変化する。   The CIB process includes a process of moving the data of the FSIB 12a written by the WCF process to the FS 12, and a process of moving the data of the MSIB 11a written by the WCF process to the MS 11. When CIB processing is started, there is a possibility that data movement and compaction processing between each component (FS12, IS13, MS11, etc.) in the NAND memory 10 may occur in a chain, and the time required for the entire processing varies greatly depending on the state. To do.

まず、WCF処理の詳細について説明する。ATAコマンド処理部121から、Writeコマンドおよび書き込みアドレスとしてのLBAが入力されると、DRAM層管理部120は、図10に示したWCクラスタ管理テーブル25を検索する(ステップS300,S305)。WC21の状態は、図10に示したWCクラスタ管理テーブル25の状態フラグ25a(例えば3ビット)によって規定されている。状態フラグ25aは、最も典型的には、Invalid(使用可能)→ATAからの書き込み待ち→Valid(使用不可)→NANDへの追い出し待ち→Invalid(使用可能)という順に状態が遷移していく。まず、LBAのクラスタアドレスLSB(k−i)ビットから書き込み先のlineを決定し、決定したlineのn個のwayを検索する。決定したlineのn個のway中に、入力されたLBAと同じ論理トラックアドレス25cが格納されている場合は(ステップS305)、このエントリに上書きするのでこのエントリをクラスタ書き込み用に確保する(Valid(使用不可)→ATAからの書き込み待ち)。   First, details of the WCF processing will be described. When a Write command and an LBA as a write address are input from the ATA command processing unit 121, the DRAM layer management unit 120 searches the WC cluster management table 25 shown in FIG. 10 (Steps S300 and S305). The state of the WC 21 is defined by the state flag 25a (for example, 3 bits) of the WC cluster management table 25 shown in FIG. Most typically, the status of the status flag 25a changes in the order of Invalid (usable) → Waiting for writing from the ATA → Valid (unusable) → Waiting for eviction to NAND → Invalid (usable). First, the write destination line is determined from the LBA cluster address LSB (ki) bits, and n ways of the determined line are searched. When the same logical track address 25c as the input LBA is stored in n ways of the determined line (step S305), this entry is overwritten, so this entry is reserved for cluster writing (Valid (Cannot be used) → Waiting for writing from ATA).

そして、DRAM層管理部120aは、該当エントリに対応するDRAMアドレスをATAコマンド処理部121に通知する。ATAコマンド処理部121による書き込みが終了すると、WCクラスタ管理テーブル25の該当エントリの状態フラグ25aをValid(使用不可)にし、さらにセクタ位置ビットマップ25bおよび論理トラックアドレス25cの欄に所要のデータを登録する。また、WCトラック管理テーブル24を更新する。具体的には、WCトラック管理テーブル24の各リスト中に既に登録済みの論理トラックアドレス24aと同じLBAアドレスが入力された場合は、該当するリストのWCクラスタ数24b、way−lineビットマップ24cを更新するとともに、当該リストが最新のリストとなるようにnextポインタ24dを変更する。また、WCトラック管理テーブル24の各リスト中に登録済みの論理トラックアドレス24aと異なるLBAアドレスが入力された場合は、新たに新しい論理トラックアドレス24a、WCクラスタ数24b、way−lineビットマップ24c、nextポインタ24dの各エントリを有するリストを作成し、最新のリストとして登録する。以上のようなテーブル更新を行って、書き込み処理が完了する(ステップS320)。   Then, the DRAM layer management unit 120a notifies the ATA command processing unit 121 of the DRAM address corresponding to the corresponding entry. When writing by the ATA command processing unit 121 is completed, the status flag 25a of the corresponding entry in the WC cluster management table 25 is set to Valid (unusable), and necessary data is registered in the fields of the sector position bitmap 25b and the logical track address 25c. To do. Also, the WC track management table 24 is updated. Specifically, when the same LBA address as the already registered logical track address 24a is input in each list of the WC track management table 24, the number of WC clusters 24b and the way-line bitmap 24c in the corresponding list are displayed. At the same time, the next pointer 24d is changed so that the list becomes the latest list. When an LBA address different from the registered logical track address 24a is input in each list of the WC track management table 24, a new logical track address 24a, a WC cluster number 24b, a way-line bitmap 24c, A list having each entry of the next pointer 24d is created and registered as the latest list. The table is updated as described above, and the writing process is completed (step S320).

一方、決定したlineのn個のway中に、入力されたLBAと同じ論理トラックアドレス25cが格納されていない場合は、NANDメモリへの追い出しが必要であるか否かを判断する(ステップS305)。すなわち、まず、決定したline中の書き込み可能なwayが最後のn個目のwayであるか否かを判断する。書き込み可能なwayとは、Invalid(使用可能)の状態フラグ25aをもつwayかあるいはValid(使用不可)でかつNANDへの追い出し待ちの状態フラグ25aを持つwayである。状態フラグ25aが、NANDへの追い出し待ちであるとは、追い出しが開始されて追い出しの終了待ちであることを意味する。そして、書き込み可能なwayが最後のn個目のwayでない場合であって、かつ書き込み可能なwayが、Invalid(使用可能)の状態フラグ25aをもつwayである場合は、このエントリをクラスタ書き込み用に確保する(Invalid(使用可能)→ATAからの書き込み待ち)。そして、該当エントリに対応するDRAMアドレスをATAコマンド処理部121に通知し、ATAコマンド処理部121によって書き込みを実行させる。そして、前記同様、WCクラスタ管理テーブル25およびWCトラック管理テーブル24を更新する(ステップS320)。   On the other hand, when the same logical track address 25c as the input LBA is not stored in the n ways of the determined line, it is determined whether or not eviction to the NAND memory is necessary (step S305). . That is, first, it is determined whether or not the writable way in the determined line is the last nth way. The writable way is a way having an invalid (usable) state flag 25a or a way having a valid (unusable) and waiting state flag 25a for NAND. When the status flag 25a is waiting to be ejected to the NAND, it means that the evicting is started and waiting for the end of the ejection. If the writable way is not the last n-th way and the writable way is a way having an Invalid state flag 25a, this entry is used for cluster writing. (Invalid (can be used) → Waiting for writing from ATA). Then, the ATA command processing unit 121 is notified of the DRAM address corresponding to the entry, and the ATA command processing unit 121 executes the writing. Then, similarly to the above, the WC cluster management table 25 and the WC track management table 24 are updated (step S320).

また、書き込み可能なwayが最後のn個目のwayでない場合であって、かつ書き込み可能なwayが、Valid(使用不可)でかつNANDへの追い出し待ちの状態フラグ25aを持つwayである場合は、このエントリをクラスタ書き込み用に確保する(Valid(使用不可)でかつNANDへの追い出し待ち→Valid(使用不可)でかつNANDへの追い出し待ちかつATAからの書き込み待ち)。そして、追い出しが終了すると、状態フラグ25aをATAからの書き込み待ちにし、さらに、該当エントリに対応するDRAMアドレスをATAコマンド処理部121に通知し、ATAコマンド処理部121によって書き込みを実行させる。そして、前記同様、WCクラスタ管理テーブル25およびWCトラック管理テーブル24を更新する(ステップS320)。   When the writable way is not the last nth way and the writable way is Valid (unusable) and has a status flag 25a waiting to be ejected to NAND. This entry is reserved for cluster writing (Valid (unusable) and waiting to be evicted to NAND → Valid (unusable) and evicting to NAND and waiting for writing from ATA). When the eviction is completed, the status flag 25a is set to wait for writing from the ATA, the DRAM address corresponding to the entry is notified to the ATA command processing unit 121, and the ATA command processing unit 121 executes the writing. Then, similarly to the above, the WC cluster management table 25 and the WC track management table 24 are updated (step S320).

以上の処理は、ATAコマンド処理部121からからの書き込み要求が入力された際に、追い出し処理をトリガしなくてもよい場合である。一方、この後の説明は、書き込み要求が入力された時点後に、追い出し処理をトリガする場合である。ステップS305において、決定したline中の書き込み可能なwayが最後のn個目のwayである場合は、前述したWC21からNANDメモリ10へ追い出すデータの決定方法の(i)の箇所で説明した条件、すなわち、
(i)タグによって決定されたlineの書き込み可能なwayが最後の(本実施形態では、n個目の)空きwayだった場合、則ち最後の空きwayが使用される場合は、そのlineに登録されたトラックのうちLRUに基づいて最も古く更新されたトラックを追い出し確定する
に基づいて追い出すトラックすなわちWC21内エントリを選択する。
The above process is a case where the eviction process need not be triggered when a write request from the ATA command processing unit 121 is input. On the other hand, the following description is a case in which the eviction process is triggered after a write request is input. In step S305, when the writable way in the determined line is the last nth way, the condition described in the section (i) of the method for determining the data to be expelled from the WC 21 to the NAND memory 10 described above, That is,
(I) When the writable way of the line determined by the tag is the last (in the present embodiment, nth) free way, that is, when the last free way is used, A track to be driven out, that is, an entry in the WC 21 is selected based on the confirmation of the eviction of the oldest updated track based on the LRU among the registered tracks.

DRAM層管理部120aは、以上の方針で追い出すトラックを決定すると、前述したように、その際追い出すのは同一トラックに含まれるWC21中の全クラスタであり、追い出されるクラスタ量がトラックサイズの50%を超えていれば、すなわち追い出し確定トラックのうちWC中に有効クラスタ数が2(k−i−1)個以上ある場合は、MSIB11aへ追い出しを行い(ステップS310)、超えていなければ、すなわち追い出し確定トラックのうちWC中に有効クラスタ数が2(k−i−1)個未満である場合は、FSIB12aへと追い出す(ステップS315)。WC21からMSIB11aへの追い出し、WC21からFSIB12aへの追い出しの詳細は、後述する。選択された追い出しエントリの状態フラグ25aは、Valid(使用不可)からNANDメモリ10への追い出し待ちに移行される。 When the DRAM layer management unit 120a determines the track to be ejected based on the above policy, as described above, the clusters to be ejected are all clusters in the WC 21 included in the same track, and the cluster amount to be ejected is 50% of the track size. Is exceeded, that is, if the number of valid clusters in the WC is 2 ( ki -1) or more in the eviction confirmed track, eviction is performed to the MSIB 11a (step S310). If the number of valid clusters in the WC is less than 2 (ki-1) among the confirmed tracks, it is driven out to the FSIB 12a (step S315). Details of the eviction from the WC 21 to the MSIB 11a and the eviction from the WC 21 to the FSIB 12a will be described later. The status flag 25a of the selected eviction entry is shifted from Valid (unusable) to wait for eviction to the NAND memory 10.

この追い出し先の判定は、WCトラック管理テーブル24を用いて実行される。すなわち、WCトラック管理テーブル24には、論理トラックアドレス毎に、有効なクラスタ数を示すWCクラスタ数24bのエントリが登録されており、このWCクラスタ数24bのエントリを参照することでWC21からの追い出し先を、FSIB12a、MSIB11aの何れにするかを決定する。また、way−lineビットマップ24cに、当該論理トラックアドレスに所属する全てのクラスタがビットマップ形式で登録されているので、追い出しを行う際には、このway−lineビットマップ24cを参照することで、容易に、追い出すべき各クラスタのWC21での記憶位置を知ることができる。   This determination of the eviction destination is executed using the WC track management table 24. That is, in the WC track management table 24, an entry for the number of WC clusters 24b indicating the number of valid clusters is registered for each logical track address. By referring to the entry for the number of WC clusters 24b, the entry from the WC 21 is performed. It is determined whether the destination is FSIB 12a or MSIB 11a. In addition, since all clusters belonging to the logical track address are registered in the bitmap format in the way-line bitmap 24c, refer to this way-line bitmap 24c when evicting. It is possible to easily know the storage position in the WC 21 of each cluster to be evicted.

また、上記書き込み処理中または書き込み処理後、前述の下記条件、
(ii)WC21に登録されているトラックの数が所定数を超えた場合、
が成立した場合も、上記同様にしてNANDメモリ10への追い出し処理を実行する。
In addition, after the writing process or after the writing process, the following conditions described above,
(Ii) When the number of tracks registered in the WC 21 exceeds a predetermined number,
Even if the above is established, the eviction process to the NAND memory 10 is executed in the same manner as described above.

WC→MSIB(Copy)
つぎに、上記有効クラスタ数(有効クラスタ数が2(k−i−1)個以上)に基づく判定によりWC21からMSIB11aへの追い出しが発生したときは、前述したように、次のような手順を実行する(ステップS310)。
1.WCクラスタ管理テーブル25を参照し、追い出しを行うクラスタに対応するタグ中のセクタ位置ビットマップ25bを参照し、セクタ位置ビットマップ25bが全て“1”でない場合は、NANDメモリ10に含まれる同一クラスタ中のセクタとマージする、後述のトラック内セクタ穴埋めを行う。また、トラック中のWC21内に存在しないクラスタについてはNANDメモリ10から読み出してマージする、受動マージ処理を実行する。
2.追い出し確定トラックが2個未満の場合、WC21中のトラックの古いものから2個になるまで2(k−i−1)個以上有効クラスタを持つ追い出し確定トラックを追加する。
3.Copyされるトラックが2個以上あれば、2個ずつを組として、MSIB11aに対して論理ブロック単位に書き込みを行う。
4.2個組みに出来なかったトラックをMSIB11aに対してトラック単位に書き込みを行う。
5.Copy終了後に既にFS、IS、MS上に存在していたクラスタ、トラックのうちコピーされたトラックに属するものを無効化する。
WC → MSIB (Copy)
Next, when eviction from the WC 21 to the MSIB 11a occurs due to the determination based on the number of effective clusters (the number of effective clusters is 2 (ki-1) or more), as described above, the following procedure is performed. Execute (Step S310).
1. Refer to the WC cluster management table 25, refer to the sector position bitmap 25b in the tag corresponding to the cluster to be evicted, and if the sector position bitmaps 25b are not all “1”, they are included in the NAND memory 10. Intra-track sector padding, which will be described later, is performed by merging with sectors in the same cluster. In addition, a passive merge process is executed in which clusters that do not exist in the WC 21 in the track are read from the NAND memory 10 and merged.
2. If tracks decided to be flushed is smaller than 2 i, adds tracks decided flush with valid cluster 2 (k-i-1) or more until the 2 i pieces to old tracks in WC 21.
3. If there are 2 i or more tracks to be copied, 2 i units are written as a set and written to the MSIB 11a in units of logical blocks.
4.2 Write tracks that could not be made into i sets to the MSIB 11a in units of tracks.
5. Clusters and tracks that already existed on the FS, IS, and MS after the copy are completed are invalidated.

このようなWC21からMSIB11aへのCopy処理に伴う各管理テーブルの更新処理について説明する。WCクラスタ管理テーブル25中の追い出されたトラックに所属するWC21中の全クラスタに対応するエントリ中の状態フラグ25aはInvalidとされ、この後これらエントリに対する書き込みが可能となる。また、WCトラック管理テーブル24中の追い出されたトラックに対応するリストについては、例えば直前のリストのnextポインタ24dが変更または削除されて、無効化される。   The update process of each management table associated with the copy process from the WC 21 to the MSIB 11a will be described. The status flag 25a in the entries corresponding to all the clusters in the WC 21 belonging to the evicted track in the WC cluster management table 25 is set to Invalid, and thereafter writing to these entries becomes possible. Further, the list corresponding to the evicted track in the WC track management table 24 is invalidated, for example, by changing or deleting the next pointer 24d of the previous list.

一方、WC21からMSIB11aに対するトラック移動が発生すると、これに伴いトラック管理テーブル30およびMS論理ブロック管理テーブル35が更新される。まず、トラック管理テーブル30のインデックスである論理トラックアドレス30aを検索することで、移動されたトラックに対応する論理トラックアドレス30aが既に登録されているか否かを判定する。既に登録されている場合は、該当インデックスのクラスタビットマップ30b(MS11側への移動であるので、該当ビットを全て“0”にする)、論理ブロックID30c+論理ブロック内トラック位置30dのフィールドを更新する。移動されたトラックに対応する論理トラックアドレス30aが未登録の場合は、該当する論理トラックアドレス30aのエントリに対し、クラスタビットマップ30b、論理ブロックID30c+論理ブロック内トラック位置30dを登録する。また、トラック管理テーブル30の変更に応じて、MS論理ブロック管理テーブル35における、論理ブロックID35a、該当トラック管理ポインタ35b、有効トラック数35c、書き込み可能先頭トラック35dなどのエントリを必要に応じて更新する。   On the other hand, when a track movement from the WC 21 to the MSIB 11a occurs, the track management table 30 and the MS logical block management table 35 are updated accordingly. First, the logical track address 30a that is an index of the track management table 30 is searched to determine whether or not the logical track address 30a corresponding to the moved track is already registered. If already registered, update the fields of the cluster bitmap 30b of the corresponding index (because it is moving to the MS11 side, so that all the corresponding bits are set to “0”), the logical block ID 30c + the track position 30d in the logical block. . When the logical track address 30a corresponding to the moved track is not registered, the cluster bitmap 30b, the logical block ID 30c + the track position 30d in the logical block is registered for the entry of the corresponding logical track address 30a. Further, according to the change of the track management table 30, entries such as the logical block ID 35a, the corresponding track management pointer 35b, the number of valid tracks 35c, and the writable head track 35d in the MS logical block management table 35 are updated as necessary. .

なお、他の領域(FS12やIS13)等からMS11に対してトラック書き込みが発生した場合、もしくはMS11内部のコンパクション処理によるMS内トラック書き込みが発生した場合、書き込み対象のトラックに含まれるWC21内有効クラスタも同時にMSに書き込まれる。WC21からMS11への書き込みとしてこのような受動的マージも存在する。そのような受動的マージが行われた場合は、それらのクラスタはWC21上から削除(無効化)されることになる。   When track writing to the MS 11 from another area (FS12, IS13) or the like, or when track writing in the MS by the compaction process inside the MS 11 occurs, the effective cluster in the WC 21 included in the track to be written is included. Are simultaneously written to the MS. There is such a passive merge as a write from the WC 21 to the MS 11. When such a passive merge is performed, those clusters are deleted (invalidated) from the WC 21.

WC→FSIB(Copy)
つぎに、上記有効クラスタ数(有効クラスタ数が2(k−i−1)個未満)に基づく判定によりWC21からFSIB12aへの追い出しが発生したときは、前述したように、次のような手順を実行する。
1.WCクラスタ管理テーブル25における追い出しを行うクラスタに対応するタグ中のセクタ位置ビットマップ25bを参照し、セクタ位置ビットマップ25bが全て“1”でない場合は、NANDメモリ10に含まれる同一クラスタ中のセクタとマージする、クラスタ内セクタ穴埋めを行う。
2.WC内のトラックを古い順に辿って2(k−i−1)個未満の有効クラスタしか持たないトラックからクラスタを取り出して行き、有効クラスタ数が2個になったらそれら全クラスタをFSIB12aに論理ブロック単位に書き込む。
3.2個見つからなかった場合には、有効クラスタ数が2(k−i−1)個未満の全てのトラックを必要な論理ページ数分だけFSIB12aに書き込む。
4.Copy終了後に既にFS、IS上に存在していたクラスタのうちコピーされたのと同じものを無効化する。
WC → FSIB (Copy)
Next, when eviction from the WC 21 to the FSIB 12a occurs due to the determination based on the number of effective clusters (the number of effective clusters is less than 2 (ki-1)) , as described above, the following procedure is performed. Execute.
1. If the sector position bitmap 25b in the tag corresponding to the cluster to be evicted in the WC cluster management table 25 is referred to and the sector position bitmaps 25b are not all “1”, the sectors in the same cluster included in the NAND memory 10 And merge sectors in the cluster.
2. The tracks in the WC follow in chronological order 2 (k-i-1) clusters are extracted from tracks that you do not only have an effective cluster of less than number, if the number of valid cluster becomes 2 k number logical them all cluster in FSIB12a Write in blocks.
If 3.2 k pieces are not found, all tracks having an effective cluster number of less than 2 (ki-1) are written in the FSIB 12a by the required number of logical pages.
4). After the copy is completed, the same cluster that was already copied on the FS and IS is invalidated.

このようなWC21からFSIB12aへのCopy処理に伴う各管理テーブルの更新処理について説明する。WCクラスタ管理テーブル25中の追い出されたトラックに所属するWC21中の全クラスタに対応するエントリ中の状態フラグ25aはInvalidとされ、この後これらエントリに対する書き込みが可能となる。また、WCトラック管理テーブル24中の追い出されたトラックに対応するリストについては、例えば直前のリストのnextポインタ24dが変更または削除されて、無効化される。一方、WC21からFSIB12aに対するクラスタ移動が発生すると、これに伴いトラック管理テーブル30のクラスタテーブルポインタ30e、FSクラスタ数30fなどを更新するとともに、FS/IS管理テーブル40の論理ブロックID40b、論理ブロック内クラスタ位置40cなどを更新する。なお、もともとFS12に存在していなかったクラスタについては、FS/IS管理テーブル40のリンクドリストへのリストが追加される。この更新に伴い、MS論理ブロック管理テーブル35、FS/IS論理ブロック管理テーブル42、およびFS/IS内クラスタ管理テーブル44の該当個所を更新する。   The update process of each management table associated with the copy process from the WC 21 to the FSIB 12a will be described. The status flag 25a in the entries corresponding to all the clusters in the WC 21 belonging to the evicted track in the WC cluster management table 25 is set to Invalid, and thereafter writing to these entries becomes possible. Further, the list corresponding to the evicted track in the WC track management table 24 is invalidated, for example, by changing or deleting the next pointer 24d of the previous list. On the other hand, when cluster movement from the WC 21 to the FSIB 12a occurs, the cluster table pointer 30e of the track management table 30, the number of FS clusters 30f, etc. are updated accordingly, and the logical block ID 40b of the FS / IS management table 40, cluster within the logical block The position 40c and the like are updated. For clusters that did not originally exist in the FS 12, a list to the linked list of the FS / IS management table 40 is added. Along with this update, the corresponding portions of the MS logical block management table 35, the FS / IS logical block management table 42, and the FS / IS intra-cluster management table 44 are updated.

CIB処理
上記のようなWCF処理が終了すると、つぎに、論理NAND層管理部120bは、WCF処理によって書き込まれたFSIB12aのデータをFS12にMoveする処理と、WCF処理によって書き込まれたMSIB11aのデータをMS11にMoveする処理などを含むCIB処理を実行する。CIB処理を開始すると、前述したように、連鎖的に各ブロック間のデータ移動やコンパクション処理が発生する可能性があり、処理全体に要する時間は状態によって大きく変化する。このCIB処理においては、基本的には、先ずMS11でのCIB処理が行われ(ステップS330)、つぎに、FS12でのCIB処理が行われ(ステップS340)、つぎに再びMS11でのCIB処理が行われ(ステップS350)、つぎにIS13でのCIB処理が行われ(ステップS360)、最後に再びMS11でのCIB処理が行われる(ステップS370)。なお、FS12からMSIB11aへの追い出し処理、あるいはFS12からIS13への追い出し処理、あるいはIS13からMSIB11aへの追い出し処理の際に、手順にループが発生した場合は、上記順番通りにならない場合もある。MS11、FS12およびIS13でのCIB処理を別々に説明する。
CIB Processing When the WCF processing as described above is completed, the logical NAND layer management unit 120b then moves the data of the FSIB 12a written by the WCF processing to the FS 12, and the data of the MSIB 11a written by the WCF processing. A CIB process including a process of moving to the MS 11 is executed. When the CIB process is started, there is a possibility that data movement or compaction process between blocks occurs in a chain as described above, and the time required for the entire process varies greatly depending on the state. In this CIB process, basically, the CIB process in the MS 11 is first performed (step S330), then the CIB process in the FS 12 is performed (step S340), and then the CIB process in the MS 11 is performed again. Is performed (step S350), then CIB processing is performed at IS13 (step S360), and finally CIB processing is performed again at MS11 (step S370). If a loop occurs in the procedure during the eviction process from the FS 12 to the MSIB 11a, the eviction process from the FS 12 to the IS13, or the eviction process from the IS 13 to the MSIB 11a, the order may not be as described above. CIB processing in MS11, FS12 and IS13 will be described separately.

MS11のCIB処理
まず、MS11でのCIB処理について説明する(ステップS330)。WC21、FS12、IS13からMS11に対してトラックデータの移動が発生すると、そのトラックデータはMSIB11aに書き込まれる。MSIB11aへの書き込み完了後は、前述したように、トラック管理テーブル30を更新してトラックが配置される論理ブロックID30cとブロック内トラック位置30dなどを変更する(Move)。MSIB11aに新たなトラックデータが書き込まれた場合、もともとMS11もしくはTFS11bに存在していたトラックデータは無効化される。この無効化処理は、MS論理ブロック管理テーブル35における古いトラック情報が保存されていた論理ブロックのエントリからトラックを無効化することで実現する。具体的には、MS論理ブロック管理テーブル35の該当エントリ中のトラック管理ポインタ35bのフィールド中の該当トラックのポインタが削除され、有効トラック数が−1される。このトラック無効化によって1論理ブロック中の全てのトラックが無効になった場合は、Validフラグ35eが無効化される。このような無効化などにより、MS11のブロックは無効なトラックを含んだものが発生し、これが繰り返されるとブロックの利用効率が低下して、使用可能な論理ブロックに不足が生じることがある。
CIB Process of MS 11 First, the CIB process in the MS 11 will be described (step S330). When movement of track data from WC21, FS12, IS13 to MS11 occurs, the track data is written to MSIB 11a. After the writing to the MSIB 11a is completed, as described above, the track management table 30 is updated to change the logical block ID 30c where the track is arranged, the intra-block track position 30d, and the like (Move). When new track data is written in the MSIB 11a, the track data originally existing in the MS 11 or the TFS 11b is invalidated. This invalidation processing is realized by invalidating the track from the entry of the logical block in which the old track information is stored in the MS logical block management table 35. Specifically, the pointer of the corresponding track in the field of the track management pointer 35b in the corresponding entry of the MS logical block management table 35 is deleted, and the number of valid tracks is decremented by one. When all the tracks in one logical block are invalidated by this track invalidation, the Valid flag 35e is invalidated. Due to such invalidation or the like, a block of the MS 11 includes an invalid track, and if this is repeated, the use efficiency of the block may be reduced, and a usable logical block may be insufficient.

データ管理部120は、このような事態が発生して、MS11に割り当てられている論理ブロックの個数がMS11として許容されるブロック数の上限値を越えるような状況が発生すると、コンパクション処理を行って、無効なフリーブロックFBを作る。無効なフリーブロックFBは、物理NAND層管理部120cに返却される。そして、論理NAND層管理部120bは、MS11に割り当てられている論理ブロックの個数を減らした後、新たに書き込み可能なフリーブロックFBを物理NAND層管理部120cから取得する。コンパクション処理とは、コンパクション対象の論理ブロックが持つ有効クラスタを新しい論理ブロックに集めたり、あるいはコンパクション対象の論理ブロック中の有効トラックを他の論理ブロックにCopyしたりすることで、物理NAND層管理部120cに返却する無効なフリーブロックFBを作り、論理ブロックの利用効率を向上させるための処理である。なお、コンパクションを行う際には、コンパクション対象となったトラック領域に対して、WC、FS、IS上の有効なクラスタが存在する場合、それらを全てマージする受動マージを実行する。また、TFS11bに登録されている論理ブロックについては、コンパクション対象に含めない。   When such a situation occurs, the data management unit 120 performs compaction processing when the number of logical blocks allocated to the MS 11 exceeds the upper limit of the number of blocks allowed for the MS 11. Create an invalid free block FB. The invalid free block FB is returned to the physical NAND layer management unit 120c. Then, after reducing the number of logical blocks allocated to the MS 11, the logical NAND layer management unit 120b acquires a new writable free block FB from the physical NAND layer management unit 120c. The compaction process is a physical NAND layer management unit that collects valid clusters of a logical block targeted for compaction into a new logical block or copies valid tracks in the logical block targeted for compaction to another logical block. This is a process for creating an invalid free block FB to be returned to 120c and improving the utilization efficiency of the logical block. When performing compaction, if there are valid clusters on the WC, FS, and IS for the track area targeted for compaction, passive merge is performed to merge all of them. Further, the logical block registered in the TFS 11b is not included in the compaction target.

以下に、MSIB11aにフルに成ったブロックが存在する場合を発生条件とした、MSIB11aからMS11またはTFS11bへの追い出しとコンパクション処理の一例について具体的に説明する。
1.MS論理ブロック管理テーブル35のValidフラグ35eを参照することにより、MS11内に無効となった論理ブロックが存在する場合、そのブロックを無効なフリーブロックFBとする。
2.MSIB11aでフルに成った論理ブロックをMS11に追い出す。具体的には、前述したMS構造管理テーブル(図示せず)を更新して、該当論理ブロックをMSIB管理下からMS管理下に移し変える。
3.MS11に割り当てられている論理ブロックの個数がMS11として許容されるブロック数の上限値を越えるような状況が発生するか否かを判断し、発生している場合に、以下のMSコンパクションを実行する。
4.MS論理ブロック管理テーブル35の有効トラック数35cのフィールドなどを参照することにより、TFS11bに含まれない論理ブロックのうち無効にされたトラックを持つものを、有効トラック数でソートする。
5.有効トラック数の少ない論理ブロックから、トラックを集めてコンパクションを実施する。この際にまず、1論理ブロック分(2トラック)ずつCopyしてコンパクションを実施する。なお、コンパクション対象のトラックがWC21、FS12、IS13に有効クラスタを持つ場合にはそれらもマージする。
6.コンパクション元の論理ブロックを無効なフリーブロックFBとする。
7.コンパクションして有効な2トラックで構成された1論理ブロックができたら、TFS11bの先頭にMoveする。
8.論理ブロック内の有効トラックを他の論理ブロックにCopyして、無効なフリーブロックFBが作れる場合は、2トラック未満の個数の有効トラックをMSIB11aに対し、トラック単位で追記書き込みする。
9.コンパクション元の論理ブロックを無効なフリーブロックFBとする。
10.MS11に割り当てられている論理ブロックの個数がMS11として許容されるブロック数の上限値を下回ると、MSコンパクション処理を終了する。
Hereinafter, an example of the eviction from the MSIB 11a to the MS 11 or the TFS 11b and the compaction process on the condition that a full block exists in the MSIB 11a will be specifically described.
1. By referring to the Valid flag 35e of the MS logical block management table 35, if there is an invalid logical block in the MS 11, that block is set as an invalid free block FB.
2. The logical block that has become full in the MSIB 11a is driven out to the MS 11. Specifically, the above-described MS structure management table (not shown) is updated, and the corresponding logical block is transferred from under MSIB management to under MS management.
3. It is determined whether or not a situation occurs in which the number of logical blocks allocated to the MS 11 exceeds the upper limit of the number of blocks allowed for the MS 11, and if so, the following MS compaction is executed. .
4). By referring to the field of the effective track number 35c in the MS logical block management table 35, the logical blocks not included in the TFS 11b having invalidated tracks are sorted by the effective track number.
5. Compaction is performed by collecting tracks from logical blocks with a small number of valid tracks. At this time, the compaction is performed by copying one logical block (2 i tracks) at a time. If the compaction target track has valid clusters in WC21, FS12, and IS13, they are also merged.
6). The logical block of the compaction source is set as an invalid free block FB.
7). When one logical block composed of valid 2 i tracks is obtained by compaction, move to the head of the TFS 11b.
8). When an invalid free block FB can be created by copying the valid track in the logical block to another logical block, the number of valid tracks less than 2 i tracks is additionally written in the track unit to the MSIB 11a.
9. The logical block of the compaction source is set as an invalid free block FB.
10. When the number of logical blocks allocated to the MS 11 falls below the upper limit value of the number of blocks allowed for the MS 11, the MS compaction process is terminated.

FS12のCIB処理
つぎに、FS12でのCIB処理について説明する(ステップS340)。WC21からFSIB12aへのクラスタ書き込み処理によって全ページ書き込み済みの論理ブロックがFSIB12a中に作られた場合、FSIB12a中のそれらのブロックは、FSIB12aからFS12に対してMoveされる。このMoveにともなって複数の論理ブロックで構成されるFIFO構造のFS12から古い論理ブロックが追い出される状況が発生する。
Next, the CIB process in the FS 12 will be described (step S340). When logical pages on which all pages have been written are created in the FSIB 12a by the cluster write processing from the WC 21 to the FSIB 12a, those blocks in the FSIB 12a are moved from the FSIB 12a to the FS 12. Along with this Move, a situation occurs in which an old logical block is evicted from the FS 12 having a FIFO structure composed of a plurality of logical blocks.

FSIB12aからFS12に対する追い出しおよびFS12からのブロック追い出しは、具体的には、次のように実現される。
1.FS/IS論理ブロック管理テーブル42のValidフラグ35eなどを参照することにより、FS12内に無効となった論理ブロックが存在する場合、そのブロックを無効なフリーブロックFBとする。
2.FSIB12aでフルに成ったブロックをFS12に追い出す。具体的には、前述したFS/IS構造管理テーブル(図示せず)を更新して、該当ブロックをFSIB管理下からFS管理下に移し変える。
3.FS12に割り当てられている論理ブロックの個数がFS12として許容されるブロック数の上限値を越えるような状況が発生するか否かを判断し、発生している場合に、以下の追い出しを実行する。
4.まず追い出し対象の最古の論理ブロック中のクラスタデータのうちIS13に移動せずに、直接MS11に移動すべきものを決定する(実際には、MSの管理単位がトラックであるので、トラック単位での決定)。
(ア)追い出し対象の論理ブロック中の有効クラスタをページの先頭から順にスキャンする。
(イ)クラスタが属するトラックがFS中に何個の有効クラスタを保有しているか、トラック管理テーブル30のFSクラスタ数30fのフィールドを参照して検索する。
(ウ)トラック内有効クラスタ数が所定の閾値(例えば2k−i個の50%)以上だった場合、そのトラックをMSへの追い出し候補とする。
5.MS11に追い出すべきトラックをMSIB11aに対して書き込む。
6.追い出しトラックが残っている場合、さらにMSIB11への追い出しを実行する。
7.上記2〜4の処理の後も追い出し対象の論理ブロックに有効なクラスタが存在している場合、この論理ブロックをIS13にMoveする。
なお、FS12からMSIB11aへの追い出しが発生したときには、その直後、MS11での前述したCIB処理が実行される(ステップS350)。
The eviction from the FSIB 12a to the FS 12 and the block eviction from the FS 12 are specifically realized as follows.
1. When there is an invalid logical block in the FS 12 by referring to the Valid flag 35e of the FS / IS logical block management table 42, the block is set as an invalid free block FB.
2. The block that has become full in the FSIB 12a is driven out to the FS 12. Specifically, the FS / IS structure management table (not shown) described above is updated, and the corresponding block is transferred from under FSIB management to under FS management.
3. It is determined whether or not a situation occurs in which the number of logical blocks allocated to the FS 12 exceeds the upper limit of the number of blocks allowed for the FS 12, and if so, the following eviction is executed.
4). First, the cluster data in the oldest logical block to be evicted is determined to be moved directly to the MS 11 without moving to the IS 13 (in practice, since the management unit of the MS is a track, Decision).
(A) Scan valid clusters in the logical block to be evicted sequentially from the top of the page.
(A) A search is made by referring to the field of the number of FS clusters 30 f in the track management table 30 to determine how many valid clusters the FS belongs to.
(C) If the number of effective clusters in a track is equal to or greater than a predetermined threshold (for example, 50% of 2 k-i ), that track is set as a candidate for egress to MS.
5. Write the track to MS11 to MSIB 11a.
6). If the eviction track remains, further eviction to the MSIB 11 is executed.
7). If a valid cluster still exists in the logical block to be evicted after the processes 2 to 4, the logical block is moved to the IS 13.
Note that when the FS 12 is evicted to the MSIB 11a, immediately after that, the above-described CIB processing in the MS 11 is executed (step S350).

IS13のCIB処理
つぎに、IS13でのCIB処理について説明する(ステップS360)。上記したFS12からIS13へのブロック移動によって論理ブロックがIS13に追加されるが、これにともなって複数個の論理ブロックで構成されるIS13に対して管理可能なブロック数の上限を超えてしまう状況が発生する。このような状況が発生した場合、IS13では、まずMS11への1〜複数個の論理ブロックの追い出しを行った後、ISコンパクションを実行する。具体的には、次のような手順を実行する。
1.IS13に含まれるトラックをトラック内の有効クラスタ数×有効クラスタ係数でソートし、積の値が大きいトラック2i+1個(2論理ブロック分)を集めてMSIB11aに追い出す。
2.有効クラスタ数が最も少ない2i+1個の論理ブロックの合計有効クラスタ数が例えば、所定の設定値である2個(1論理ブロック分)以上ある場合は、上のステップを繰り返す。
3.上記の追い出しを行った後、有効クラスタ数の少ない論理ブロックから順にクラスタを2個集め、IS13内でコンパクションを行う。
4.コンパクション元の論理ブロックのうち有効クラスタがなくなったものを無効なフリーブロックFBとして返還する。
なお、IS13からMSIB11aへの追い出しが発生したときには、その直後、MS11での前述したCIB処理が実行される(ステップS370)。
IS13 CIB Processing Next, the CIB processing in IS13 will be described (step S360). A logical block is added to IS13 by the above block movement from FS12 to IS13, but there is a situation in which the upper limit of the number of blocks manageable to IS13 composed of a plurality of logical blocks is exceeded. appear. When such a situation occurs, the IS 13 first carries out one or more logical blocks to the MS 11 and then executes IS compaction. Specifically, the following procedure is executed.
1. The tracks included in the IS 13 are sorted by the number of effective clusters in the track × the effective cluster coefficient, and 2 i + 1 tracks (two logical blocks) having a large product value are collected and driven out to the MSIB 11a.
2. When the total number of effective clusters of 2 i + 1 logical blocks with the smallest number of effective clusters is, for example, 2 k (one logical block) or more which is a predetermined set value, the above steps are repeated.
3. After the above eviction, 2 k clusters are collected in order from the logical block with the smallest number of valid clusters, and compaction is performed in the IS 13.
4). A compaction source logical block whose valid cluster is lost is returned as an invalid free block FB.
Note that when the eviction from the IS 13 to the MSIB 11a occurs, immediately after that, the above-described CIB processing in the MS 11 is executed (step S370).

図20は、各構成要素間のデータの流れにおける入力と出力の組み合わせ、およびそのデータの流れが何をトリガとして発生するかを示すものである。FS12は、基本的には、WC21からのクラスタ追い出しによってデータが書き込まれるが、WC21からFS12への追い出しに付随してクラスタ内セクタ穴埋め(クラスタ穴埋め)が必要な場合は、FS12、IS13、MS11からのデータがコピーされる。WC21では、WCクラスタ管理テーブル25のタグ中のセクタ位置ビットマップ25bによって当該クラスタアドレス中の2(l−k)個のセクタの有無を識別させることによってセクタ(512B)単位の管理をすることが可能である。これに対し、NANDメモリ10での機能要素であるFS12、IS13の管理単位はクラスタであり、MS11の管理単位は、トラックである。このように、NANDメモリ10での管理単位は、セクタより大きいため、WC21からNANDメモリ10に対して、データを書き込む際に、書き込まれるデータと同一クラスタアドレスのデータがNANDメモリ10中に存在する場合、WC21からNANDメモリ10に書き込まれるクラスタ中のセクタと、NANDメモリ10中に存在する同一クラスタアドレス内のセクタとをマージしてから、NANDメモリ10に書き込む必要がある。 FIG. 20 shows combinations of input and output in the data flow between the components and what triggers the data flow. The data is basically written in the FS 12 by the cluster eviction from the WC 21, but when the intra-cluster sector filling (cluster filling) is necessary accompanying the eviction from the WC 21 to the FS 12, the FS 12, IS 13, MS 11 Data is copied. In the WC 21, the sector (512B) unit can be managed by identifying the presence / absence of 2 (1-k) sectors in the cluster address by the sector position bitmap 25b in the tag of the WC cluster management table 25. Is possible. On the other hand, the management unit of FS12 and IS13, which are functional elements in the NAND memory 10, is a cluster, and the management unit of the MS 11 is a track. Thus, since the management unit in the NAND memory 10 is larger than the sector, when data is written from the WC 21 to the NAND memory 10, data having the same cluster address as the data to be written exists in the NAND memory 10. In this case, it is necessary to merge the sector in the cluster written in the NAND memory 10 from the WC 21 and the sector in the same cluster address existing in the NAND memory 10 before writing to the NAND memory 10.

この処理が、図20に示したクラスタ内セクタ穴埋め処理(クラスタ穴埋め)と、トラック内セクタ穴埋め(トラック穴埋め)であり、これらの処理を行わないと、正しいデータが読み出せなくなる。そこで、WC21からFSIB12aまたはMSIB11aにデータを追い出す際には、WCクラスタ管理テーブル25を参照し、追い出しを行うクラスタに対応するタグ中のセクタ位置ビットマップ25bを参照し、セクタ位置ビットマップ25bが全て“1”でない場合は、NANDメモリ10に含まれる同一クラスタまたは同一トラック中のセクタとマージする、クラスタ内セクタ穴埋めまたはトラック内セクタ穴埋めを行う。この処理には、DRAM20の作業領域が使用され、DRAM20の作業領域からMSIB11aに書き込まれたり、FSIB12aに書き込まれたりする。   This process includes the intra-cluster sector filling process (cluster filling) and the intra-track sector filling process (track filling) shown in FIG. 20. If these processes are not performed, correct data cannot be read. Therefore, when data is expelled from the WC 21 to the FSIB 12a or the MSIB 11a, the WC cluster management table 25 is referred to, the sector position bitmap 25b in the tag corresponding to the cluster to be expelled is referred to, and all the sector position bitmaps 25b are When it is not “1”, the intra-cluster sector filling or the intra-track sector filling is performed by merging with the sector in the same cluster or the same track included in the NAND memory 10. For this processing, the work area of the DRAM 20 is used, and data is written from the work area of the DRAM 20 to the MSIB 11a or written to the FSIB 12a.

IS13は、基本的には、FS12からのブロック追い出しによってデータが書き込まれる(Move)か、IS内部のコンパクションによってデータが書き込まれる。MS11は、全ての箇所からデータが書き込まれ得る。その際、MS11は、トラック単位にしかデータを書き込めないために、MS自身のデータによる穴埋めが発生しうる。また、トラック単位の書き込みを行う際には、他のブロックにある断片化されたデータも受動マージによって書き込まれることになる。さらにMS11は、MSコンパクションによる書き込みもある。なお、受動マージにおいては、WC21、FS12またはIS13の3つの構成要素のうちの1つの構成要素からMS11へのトラック追い出しまたは論理ブロック追い出し(2トラック分の追い出し)が発生した際、1つの構成要素での追い出し対象のトラック(または論理ブロック)に含まれる他の2つの構成要素内の有効クラスタおよびMS11内の有効クラスタが、DRAM20の作業領域に集められて、DRAM20の作業領域から1トラック分のデータとしてMSIB11aに書き込まれる。 In the IS 13, data is basically written by moving the block from the FS 12 (Move), or data is written by compaction inside the IS. In the MS 11, data can be written from all locations. At that time, since the MS 11 can write data only in units of tracks, filling with the MS's own data may occur. In addition, when writing in units of tracks, fragmented data in other blocks is also written by passive merging. Further, the MS 11 also has writing by MS compaction. In passive merging, when one of the three components of WC21, FS12, or IS13 causes track eviction or logical block eviction (ejecting 2 i tracks) from MS11, one configuration The valid clusters in the other two components included in the track (or logical block) to be ejected by the element and the valid clusters in the MS 11 are collected in the work area of the DRAM 20 and one track worth from the work area of the DRAM 20. Is written in the MSIB 11a.

つぎに、本実施の形態をより詳細に説明する。まず、物理NAND層について説明する。前述したように、32ビット倍速モードでは、4ch(ch0、ch1、ch2、ch3)を並列で動作させ、更に、NANDメモリチップの備える倍速モードを利用して消去/書き込み/読み出しを行う。図21に示すように、4つの並列動作要素10a〜10d内の各NANDメモリチップは、例えば、プレーン0、プレーン1の2つの領域(District)に分割されている。なお、分割数は2に限定されるものではない。プレーン0およびプレーン1は、互いに独立した周辺回路(例えば、ロウデコーダ、カラムデコーダ、ページバッファ、データキャッシュ等)を備えており、NANDコントローラ112から入力されるコマンドに基づき、同時に消去/書き込み/読み出しを行うことが可能である。NANDメモリチップの倍速モードでは、上記プレーン0およびプレーン1を並列制御することにより、高速書き込みを実現している。   Next, this embodiment will be described in more detail. First, the physical NAND layer will be described. As described above, in the 32-bit double speed mode, 4ch (ch0, ch1, ch2, ch3) are operated in parallel, and erase / write / read is performed using the double speed mode provided in the NAND memory chip. As shown in FIG. 21, each NAND memory chip in the four parallel operation elements 10a to 10d is divided into, for example, two areas (District) of a plane 0 and a plane 1. Note that the number of divisions is not limited to two. The plane 0 and the plane 1 include peripheral circuits independent of each other (for example, a row decoder, a column decoder, a page buffer, a data cache, etc.), and simultaneously erase / write / read based on a command input from the NAND controller 112. Can be done. In the double speed mode of the NAND memory chip, high speed writing is realized by controlling the plane 0 and the plane 1 in parallel.

物理ブロックサイズは512kBであるので、32ビット倍速モードでは、4chの並列動作および2つのプレーンに対する同時アクセスにより、その消去単位は512kB×4×2=4MBとなる。すなわち、この32ビット倍速モードでは、結果的に、8プレーンが並列動作することになる。   Since the physical block size is 512 kB, in the 32-bit double speed mode, the erase unit is 512 kB × 4 × 2 = 4 MB due to 4ch parallel operation and simultaneous access to two planes. That is, in this 32-bit double speed mode, as a result, 8 planes operate in parallel.

図8に示した物理NAND層管理部120cは、論物変換テーブル50の他に、後述するバッドブロック管理テーブル(BB管理テーブル)200を備えており、この管理テーブルを用いてNANDメモリ10の物理NAND層の管理を行う。   The physical NAND layer management unit 120c shown in FIG. 8 includes a bad block management table (BB management table) 200 described later in addition to the logical-physical conversion table 50, and the physical memory of the NAND memory 10 is used by using this management table. The NAND layer is managed.

(BB管理テーブル)
BB管理テーブル(第2の管理テーブル)200は、物理ブロック(512kB)単位でバッドブロック(第2の不良領域)BBを管理するためのテーブルである。BB管理テーブル200は、図22に示すように、例えば、4(チャネル)×2(プレーン/チャネル)個のチャネル内プレーン毎に、(物理ブロック数/プレーン)×(NANDメモリチップ数/1並列動作要素)個数分の物理ブロックに関する情報をもつ二次元配列形式で構成されており、各エントリには、各物理ブロックに対する物理ブロックID200aが保持されている。
(BB management table)
The BB management table (second management table) 200 is a table for managing bad blocks (second defective areas) BB in units of physical blocks (512 kB). As shown in FIG. 22, the BB management table 200 has, for example, (physical block number / plane) × (number of NAND memory chips / 1 parallel) for every 4 (channels) × 2 (plane / channel) in-channel planes. (Operation element) It is configured in a two-dimensional array format having information on the number of physical blocks, and each entry holds a physical block ID 200a for each physical block.

本実施形態の場合、1NANDメモリチップは2GBサイズであり、第1番目のチップのプレーン0には、「0」〜「2047」の物理ブロックIDが割り当てられ、第1番目のチップのプレーン1には、「2048」〜「4095」の物理ブロックIDが割り当てられる。物理NAND層管理部120cは、使用中に発生したバッドブロックBBをBB管理テーブル200に登録する際には、ソートはせずに対応するチャネル内プレーンID(ID#0〜ID#7)の最後尾の有効エントリの直後に順に追加する。このように、BB管理テーブル200には、バッドブロックBBに対応する物理ブロックIDのみが順次登録される。   In the present embodiment, the 1 NAND memory chip is 2 GB in size, and the physical block IDs “0” to “2047” are assigned to the plane 0 of the first chip, and the plane 1 of the first chip is assigned to the plane 1 of the first chip. Are assigned physical block IDs of “2048” to “4095”. When the physical NAND layer management unit 120c registers the bad block BB generated during use in the BB management table 200, the physical NAND layer management unit 120c does not sort, but ends the corresponding in-channel plane ID (ID # 0 to ID # 7). Add in order immediately after the last valid entry. Thus, only the physical block ID corresponding to the bad block BB is sequentially registered in the BB management table 200.

ところで、データ管理部120(図4参照)は、NANDメモリ10(図1、図5参照)から読み出したクラスタが第2のECC回路118(図3参照)によって訂正不能だった場合、更に、第1のECC回路112(図3参照)による誤り訂正を行う。ここで、第2のECC回路118は、例えばハミング符号を用いた軽微な誤り訂正を行い、第1のECC回路112は、例えばBCH符号を用いた通常の誤り訂正を行う。なお、第1のECC回路112では、誤り訂正処理のみを行い、誤り訂正のための符号化処理については、第2のECC回路118にて行うようにしてもよい。   Incidentally, if the cluster read from the NAND memory 10 (see FIGS. 1 and 5) cannot be corrected by the second ECC circuit 118 (see FIG. 3), the data management unit 120 (see FIG. 4) further The error correction is performed by one ECC circuit 112 (see FIG. 3). Here, the second ECC circuit 118 performs minor error correction using, for example, a Hamming code, and the first ECC circuit 112 performs normal error correction using, for example, a BCH code. Note that the first ECC circuit 112 may perform only error correction processing, and the encoding processing for error correction may be performed by the second ECC circuit 118.

また、第1のECC回路112におけるデコード処理は、第2のECC回路118による誤り訂正処理で訂正ができなかった場合のみ、プロセッサ104(図3参照)による割り込みがかけられる。例えば、ホスト装置1からのRead要求に対するNANDメモリ10の読み出し動作において、第2のECC回路118による誤り訂正処理で訂正ができなかった場合、プロセッサ104の制御により、NANDコントローラ113(図3参照)から第1のECC回路112に対し誤りのあったデータが転送される。第1のECC回路112によって訂正されたデータは、RC22(図5参照)に書き込まれた後、ホスト装置1に出力される。なお、NANDメモリ10の信頼性の監視のため、第1のECC回路112による誤り訂正時、およびプロセッサ104の割り込み制御時において、誤り訂正数をプロセッサ104に通知することが好ましい。   Further, the decoding process in the first ECC circuit 112 is interrupted by the processor 104 (see FIG. 3) only when the error correction process by the second ECC circuit 118 cannot be corrected. For example, in the read operation of the NAND memory 10 in response to a read request from the host device 1, if correction cannot be performed by the error correction processing by the second ECC circuit 118, the NAND controller 113 (see FIG. 3) is controlled by the processor 104. The erroneous data is transferred to the first ECC circuit 112. The data corrected by the first ECC circuit 112 is written to the RC 22 (see FIG. 5) and then output to the host device 1. In order to monitor the reliability of the NAND memory 10, it is preferable to notify the processor 104 of the number of error corrections at the time of error correction by the first ECC circuit 112 and at the time of interrupt control of the processor 104.

(バッドクラスタテーブル)
図23は、バッドクラスタテーブル90の構造を示す図である。図23において、バッドクラスタテーブル(第1の管理テーブル)90は、NANDメモリ10から読み出せなくなったクラスタアドレス(第1の不良領域)を記録しておくためのテーブルであり、本テーブルには、クラスタアドレス90aおよびセクタビットマップ90bによる2つのフィールドが設けられている。また、バッドクラスタテーブル90は、1論理ブロックのクラスタ数に対応して2個のエントリを有する。なお、このバッドクラスタテーブル90は、正引きテーブルであるFS/IS管理テーブル40から参照され、論理トラックアドレスからその論理アドレスに対応するデータが存在する記憶デバイス位置を検索することができるので、正引きテーブルとして機能する。
(Bad cluster table)
FIG. 23 is a diagram illustrating the structure of the bad cluster table 90. In FIG. 23, a bad cluster table (first management table) 90 is a table for recording a cluster address (first defective area) that can no longer be read from the NAND memory 10, and this table includes: Two fields are provided: cluster address 90a and sector bit map 90b. Also, the bad cluster table 90 has a 2 k entries corresponding to the number of clusters of one logical block. The bad cluster table 90 is referenced from the FS / IS management table 40, which is a forward lookup table, and the storage device position where the data corresponding to the logical address exists can be searched from the logical track address. Functions as a pull table.

バッドクラスタテーブル90において、クラスタアドレス90aには、昇順または降順にソートされたクラスタアドレス(Addr0〜Addr(2−1))が配置され、セクタビットマップ90bには、各クラスタアドレスに対応する2(l−k)個のセクタの状態(有効:“0”/無効:“1”)を示す2(l−k)ビットのビットマップが記録される。このように、バッドクラスタテーブル90のクラスタアドレス90aには、バッドクラスタに対応するバッドクラスタアドレスのみが登録される。バッドクラスタテーブル90では、例えば、図23のAddr0に示すように、セクタビットマップが“0000…1000”である場合、クラスタアドレスAddr0に属する2(l−k)セクタのうちの4セクタ目が、無効の状態であることを示している。 In the bad cluster table 90, cluster addresses (Addr0 to Addr (2 k −1)) sorted in ascending or descending order are arranged in the cluster address 90a, and the sector bitmap 90b has 2 corresponding to each cluster address. A 2 (1-k) bit bitmap indicating the state (valid: “0” / invalid: “1”) of (1−k) sectors is recorded. Thus, only the bad cluster address corresponding to the bad cluster is registered in the cluster address 90a of the bad cluster table 90. In the bad cluster table 90, for example, as shown in Addr0 of FIG. 23, when the sector bitmap is “0000... 1000”, the 4th sector of 2 (1-k) sectors belonging to the cluster address Addr0 is Indicates an invalid state.

データ管理部120は、上述したRead処理において、トラック管理テーブル30、及びFS/IS管理テーブル40を用いたクラスタ単位のデータ検索を行う際に、バッドクラスタテーブル90の検索を同時に行う。読み出し対象クラスタがバッドクラスタであった場合は、ATAコマンド処理部121に対してエラーを通知する。ただし、エラーとなる直前までは通常通りRead処理を行い、ATAコマンド処理部121に対してデータを転送する。   The data management unit 120 simultaneously retrieves the bad cluster table 90 when performing data retrieval in units of clusters using the track management table 30 and the FS / IS management table 40 in the above-described read processing. When the cluster to be read is a bad cluster, an error is notified to the ATA command processing unit 121. However, the read process is performed as usual until immediately before an error occurs, and the data is transferred to the ATA command processing unit 121.

(バッドクラスタテーブルを用いた登録処理)
つぎに、バッドクラスタテーブル90に対する登録処理について図24を参照して説明する。図24は、バッドクラスタテーブル90にバッドクラスタ情報を登録する処理を示すフローチャートである。
(Registration process using bad cluster table)
Next, registration processing for the bad cluster table 90 will be described with reference to FIG. FIG. 24 is a flowchart showing processing for registering bad cluster information in the bad cluster table 90.

図24において、データ管理部120からの要求により、「NANDメモリ10に記憶されているデータのNANDメモリ10への書き込み処理に伴うNANDメモリ10のデータの読み出し処理」が実行され(ステップST101)、このとき、L2−ECCエラーの有無が判定される(ステップST102)。ここで、「L2−ECCエラー」とは、第1のECC回路112(図3参照)による第2の誤り訂正符号を用いた誤り訂正処理で訂正ができなかった場合を意味する。なお、第2の誤り訂正符号を用いた誤り訂正処理の前に、第2のECC回路118による第1の誤り訂正符号を用いた誤り訂正処理が行われることについては、前述したとおりである。   24, in response to a request from the data management unit 120, “data reading process of the NAND memory 10 accompanying a process of writing data stored in the NAND memory 10 to the NAND memory 10” is executed (step ST101). At this time, the presence or absence of an L2-ECC error is determined (step ST102). Here, “L2-ECC error” means a case where correction cannot be performed by error correction processing using the second error correction code by the first ECC circuit 112 (see FIG. 3). As described above, the error correction process using the first error correction code by the second ECC circuit 118 is performed before the error correction process using the second error correction code.

なお、「NANDメモリ10に記憶されているデータのNANDメモリ10への書き込み処理に伴うNANDメモリ10のデータの読み出し処理」とは、例えば、以下の処理が該当する(図20参照)。
(1)FS12/IS13/MS11からFS12へのクラスタ穴埋め処理
(2)MS11およびIS13でのコンパクション処理
(3)MS11への受動マージ処理
(4)MS11に対するトラック追い出し処理
For example, the following process corresponds to the “data read process of the NAND memory 10 accompanying the process of writing the data stored in the NAND memory 10 to the NAND memory 10” (see FIG. 20).
(1) Cluster filling process from FS12 / IS13 / MS11 to FS12 (2) Compaction process at MS11 and IS13 (3) Passive merge process to MS11 (4) Track eviction process for MS11

図24に戻り、L2−ECCエラーが検出されない場合(ステップST102、No)、NANDメモリ10への書き込み処理が行われる(ステップST103)。なお、このステップST103による書き込み処理は、前述の図19に示すフローなどに従って行われる。   Returning to FIG. 24, when the L2-ECC error is not detected (No in step ST102), a write process to the NAND memory 10 is performed (step ST103). Note that the writing process in step ST103 is performed according to the flow shown in FIG.

一方、L2−ECCエラーが検出された場合(ステップST102、Yes)、L2−ECCエラーが生じたクラスタのエントリを、バッドクラスタテーブル90に登録する(ステップST104)。この際、セクタビットマップ90bにおいて、無効なセクタには“1”を、また、クラスタ中の一部のセクタをWCから書き込もうとしている場合には、当該セクタのみ“0”をセットする。また、バッドクラスタテーブル90に既にエントリが登録されている場合には、該当セクタビットを“1”に変更する。なお、上記ステップST104の処理に関し、後述のログ情報が取得され、所定の記憶領域に保存される(ステップST105)。その後、NANDメモリ10から読み出す必要のあるデータの内、データ読み出し元がバッドクラスタテーブル90に登録されているものに対しては、読み出し元をDRAM20のダミーデータ領域にあるダミーデータ(例えば、オール“0”)として、書き込みが再実行される(ステップST106)。その後、ログ情報が保存され(ステップST107)、処理を終了する。なお、ステップST104の処理と、ステップST106の処理とでは、書き込み処理の内容が異なるので、ログの保存は必要である。   On the other hand, when an L2-ECC error is detected (step ST102, Yes), the cluster entry in which the L2-ECC error has occurred is registered in the bad cluster table 90 (step ST104). At this time, in the sector bitmap 90b, “1” is set to an invalid sector, and “0” is set only to the sector when a part of sectors in the cluster is to be written from the WC. If an entry has already been registered in the bad cluster table 90, the corresponding sector bit is changed to “1”. Regarding the processing in step ST104, log information described later is acquired and stored in a predetermined storage area (step ST105). Thereafter, for data that needs to be read from the NAND memory 10 and whose data read source is registered in the bad cluster table 90, the read source is dummy data (for example, all “ 0 "), the writing is executed again (step ST106). Thereafter, the log information is stored (step ST107), and the process ends. In addition, since the contents of the writing process are different between the process of step ST104 and the process of step ST106, it is necessary to save the log.

ここで、ログ情報について説明する。ログ情報は、データの書き込み処理や消去処理などに対する履歴である。具体的には、ログ情報は、例えばバッドクラスタテーブル90に登録される情報(クラスタビットマップ90aやセクタビットマップ90b)やBB管理テーブル200の内容に変更が生じた場合の、変更に関する内容(変更前後の差分情報)を示している。例えば、NANDメモリ10内やDRAM20内では、所定のタイミングでバッドクラスタテーブル90やBB管理テーブル200のバックアップコピーが取られ、このバックアップコピーに対する更新を記録したログ情報が取られる。その後、所定の時間ごとにバックアップコピーが取られるとともに、バックアップコピーが取られる前の過去のログ情報を無効にし、新しいログ情報を生成するという処理が繰り返し行われる。そして、データが無効になってしまった場合には、バックアップコピーとログ情報とを基にそのデータが復元される。   Here, the log information will be described. The log information is a history of data write processing, erase processing, and the like. Specifically, the log information includes, for example, information related to the change (change) when information registered in the bad cluster table 90 (cluster bitmap 90a or sector bitmap 90b) or the content of the BB management table 200 changes. (Difference information before and after). For example, in the NAND memory 10 or the DRAM 20, a backup copy of the bad cluster table 90 or the BB management table 200 is taken at a predetermined timing, and log information that records an update to this backup copy is taken. Thereafter, a backup copy is taken every predetermined time, past log information before the backup copy is taken is invalidated, and new log information is generated repeatedly. When the data becomes invalid, the data is restored based on the backup copy and log information.

(バッドクラスタ情報の削除処理)
つぎに、バッドクラスタテーブル90に登録されたバッドクラスタ情報の削除について説明する。バッドクラスタ情報の削除は、バッドクラスタとして登録されたアドレスに対し、例えばWC21からのデータの追い出しに伴い、NANDメモリ10にデータが書き込まれる場合などに行われる。このような書き込み処理が行われる場合、ダミーデータで置き換えられていた記憶領域は、無効クラスタとなるので、もはやバッドクラスタとして記憶しておく必要はなく、バッドクラスタ情報の削除が可能となる。このとき、バッドクラスタテーブルにおいて、無効クラスタとなったクラスタの該当セクタビットの値が、“1”から“0”に変更される。
(Bad cluster information deletion process)
Next, deletion of bad cluster information registered in the bad cluster table 90 will be described. The deletion of the bad cluster information is performed, for example, when data is written in the NAND memory 10 with respect to an address registered as a bad cluster, for example, with the eviction of data from the WC 21. When such a writing process is performed, the storage area replaced with the dummy data becomes an invalid cluster. Therefore, it is no longer necessary to store it as a bad cluster, and it is possible to delete the bad cluster information. At this time, the value of the corresponding sector bit of the cluster that has become an invalid cluster in the bad cluster table is changed from “1” to “0”.

(バッドクラスタテーブルを用いた処理−補足説明)
ここで、上述したバッドクラスタテーブル90に対する登録処理および削除処理に関して、若干の補足説明を加える。
(Process using bad cluster table-supplementary explanation)
Here, some supplementary explanation will be added regarding the registration processing and deletion processing for the bad cluster table 90 described above.

NANDメモリ10に対する読み出し処理においてL2−ECCエラーが発生した場合、前述したように、NANDメモリ10上の当該クラスタを無効クラスタとして識別するためのバッドクラスタテーブル90への登録処理が行われる。ここで、バッドクラスタテーブル90に該当クラスタが既にエントリされている場合には、該当クラスタに対応するセクタビットマップ90bにおける該当セクタのビットが、“0”(有効)から“1”(無効)に変更される。   When an L2-ECC error occurs in the read process for the NAND memory 10, as described above, a registration process to the bad cluster table 90 for identifying the cluster on the NAND memory 10 as an invalid cluster is performed. Here, when the corresponding cluster is already entered in the bad cluster table 90, the bit of the corresponding sector in the sector bitmap 90b corresponding to the corresponding cluster is changed from “0” (valid) to “1” (invalid). Be changed.

また、バッドクラスタテーブル90は、図8で説明した論理NAND層管理部120bや物理NAND層管理部120cで管理される情報テーブルであり、電源オフなどの際にメモリシステムの次回起動時まで保存しておくことが必要な情報である。このため、バッドクラスタテーブル90は、不揮発性領域であるNANDメモリ10に格納される。また、前述したように、バッドクラスタテーブル90の登録処理に併せて、必要なバックアップコピーやログ情報が保存される。ログ情報を保存する理由は、バッドクラスタテーブル90が不揮発性テーブル(不揮発性領域に格納される情報)の一つであるため、管理テーブルの一つとして正確な情報を管理しておく必要があるからである。   The bad cluster table 90 is an information table managed by the logical NAND layer management unit 120b and the physical NAND layer management unit 120c described in FIG. 8, and is stored until the next startup of the memory system when the power is turned off. It is necessary information to keep. For this reason, the bad cluster table 90 is stored in the NAND memory 10 which is a non-volatile area. Further, as described above, necessary backup copies and log information are stored in conjunction with the bad cluster table 90 registration process. The reason for saving the log information is that the bad cluster table 90 is one of the non-volatile tables (information stored in the non-volatile area), and therefore it is necessary to manage accurate information as one of the management tables. Because.

なお、上記の説明では、バッドクラスタの数については、特に言及していなかったが、バッドクラスタテーブルへの登録処理に際し、バッドクラスタテーブル90の残エントリ数に判定閾値を設けるようにして、バッドクラスタの数を管理するようにしてもよい。例えば、バッドクラスタテーブル90の残エントリ数が所定値以下となった場合には、第1の警告情報を通知し、残エントリ数が0になった場合には、第2の警告情報を通知するようにしてもよい。   In the above description, the number of bad clusters was not particularly mentioned. However, in the registration process to the bad cluster table, a determination threshold is set for the number of remaining entries in the bad cluster table 90 so that the bad cluster May be managed. For example, the first warning information is notified when the number of remaining entries in the bad cluster table 90 is a predetermined value or less, and the second warning information is notified when the number of remaining entries is zero. You may do it.

また、L2−ECCエラーが解消した場合、L2−ECCエラーの解消されたクラスタに対応するセクタビットマップ90bにおける該当セクタのビットマップを変更することについて説明したが、変更した時点で、当該エントリのセクタビットマップ90bがオール“0”(全てのセクタが有効)となった場合には、バッドクラスタテーブル90から、このエントリを削除する。この処理により、バッドクラスタテーブル90のサイズが不必要に大きくなるのを防止することができるとともに、エントリそのものがない場合には、セクタビットマップ90bの中身を見るまでもなく、着目するクラスタが有効であると判定できるので、処理の迅速化が図られ、書き込み処理の効率化にも繋がる。   Further, when the L2-ECC error has been resolved, the description has been given of changing the bitmap of the sector in the sector bitmap 90b corresponding to the cluster in which the L2-ECC error has been resolved. When the sector bitmap 90b becomes all “0” (all sectors are valid), this entry is deleted from the bad cluster table 90. This process can prevent the size of the bad cluster table 90 from becoming unnecessarily large, and if there is no entry itself, it is not necessary to look at the contents of the sector bitmap 90b, and the target cluster is effective. Therefore, it is possible to speed up the process and to improve the efficiency of the writing process.

(Write_FUA処理)
つぎに、Write_FUA(Force Unit Access)について説明する。WC21からNANDメモリ10への追い出しが発生しないWrite要求に対しては、書き込み処理の終了通知は、データがWC21に書き込まれた時点でホスト装置1に通知される。従って、この時点で電源障害などが起きた場合は、WC21内のデータは失われる。そこで、ホスト装置1からのデータをWC21からNANDメモリ10に書き込んだ時点で書き込み処理の終了通知をホスト装置1へ返す処理としてWrite_FUAが用いられる場合がある。このようなWrite_FUAでは、WC21に書き込まれたホスト装置1からのデータを迅速にNANDメモリ10へ書き込まなければ、電源障害時のデータ消失の防止に繋がらない。そこで、本実施の形態では、Write_FUA処理を行なう際に、ホスト装置1からのデータを、RC22を介してNANDメモリ10に書き込む。
(Write_FUA processing)
Next, Write_FUA (Force Unit Access) will be described. In response to a Write request in which no eviction from the WC 21 to the NAND memory 10 occurs, a notice of completion of the write process is sent to the host device 1 when data is written to the WC 21. Therefore, if a power failure occurs at this time, the data in the WC 21 is lost. Therefore, Write_FUA may be used as a process of returning a write process end notification to the host apparatus 1 when data from the host apparatus 1 is written from the WC 21 to the NAND memory 10. In such Write_FUA, unless the data from the host device 1 written in the WC 21 is quickly written into the NAND memory 10, it will not prevent the data loss at the time of power failure. Therefore, in this embodiment, when the Write_FUA process is performed, data from the host device 1 is written to the NAND memory 10 via the RC 22.

図25は、本実施の形態に係るメモリシステムが行なうWrite_FUA処理を説明するための図である。ホスト装置1から図1のSSD100(図3及び図25のプロセッサ104)にWrite_FUA要求(NANDメモリ10への強制書き込み命令)が送られると、プロセッサ104は、このWrite_FUA要求で指定されたデータをホスト装置1からRC22へ書き込む。さらに、RC22へ書き込まれたデータは、NANDメモリ10へ書き込まれる。   FIG. 25 is a diagram for explaining the Write_FUA process performed by the memory system according to the present embodiment. When a Write_FUA request (forced write command to the NAND memory 10) is sent from the host device 1 to the SSD 100 in FIG. 1 (the processor 104 in FIGS. 3 and 25), the processor 104 sends the data specified by the Write_FUA request to the host Write from device 1 to RC22. Further, the data written to the RC 22 is written to the NAND memory 10.

通常のWrite処理(Write_FUA以外のWrite)のように、Write要求で指定されたデータをホスト装置1からWC21を介してNANDメモリ10へ書き込む場合、DRAM20領域確保のために、WC21からNANDメモリ10へのデータの追い出し判定、追い出し処理などが発生する。さらに、管理テーブルの複雑な更新処理などが発生する。   When data specified by a write request is written from the host device 1 to the NAND memory 10 via the WC 21 as in normal Write processing (Write other than Write_FUA), the WC 21 is transferred to the NAND memory 10 to secure the DRAM 20 area. Data eviction judgment, eviction processing, etc. occur. Further, complicated update processing of the management table occurs.

一方、RC22内に格納していたデータは既にホスト装置1によって読み出されたデータであるので、RC22内に格納していたデータは、NANDメモリ10へ追い出しや消去を行なうことなく上書きされてもよいデータである。   On the other hand, since the data stored in the RC 22 has already been read by the host device 1, the data stored in the RC 22 can be overwritten without being expelled or erased to the NAND memory 10. Good data.

本実施の形態では、Write_FUA要求で指定されたデータをホスト装置1からRC22を介してNANDメモリ10へ書き込んでいるので、RC22内に格納していたデータの追い出しなどが不要になるとともに、管理テーブルの複雑な更新処理などが不要となる。   In this embodiment, since the data specified by the Write_FUA request is written from the host device 1 to the NAND memory 10 via the RC 22, it is not necessary to expel the data stored in the RC 22 and the management table. No complicated update processing is required.

図26は、本実施の形態に係るメモリシステムが行なうWrite_FUA処理の処理手順を示すフローチャートである。なお、図26の説明では、図4で説明したデータ管理部120をDMといい、ATAコマンド処理部121をAMという。   FIG. 26 is a flowchart showing a processing procedure of Write_FUA processing performed by the memory system according to the present embodiment. In the description of FIG. 26, the data management unit 120 described in FIG. 4 is referred to as DM, and the ATA command processing unit 121 is referred to as AM.

ホスト装置1からSSD100にWrite_FUA要求が送られると、プロセッサ104のAMは、DMへWrite_FUA要求を送る(ステップS400)。これにより、DMは、Write_FUA要求で指定されたデータを、RC22に書き込む(ステップS410)。   When a Write_FUA request is sent from the host device 1 to the SSD 100, the AM of the processor 104 sends a Write_FUA request to the DM (step S400). As a result, the DM writes the data designated by the Write_FUA request to the RC 22 (step S410).

さらに、DMはAMへ、RC22上の書き込み先エントリの通知を送る(ステップS420)。AMは、DMから書き込み先エントリの通知を受けると、上述したエントリへの書き込み完了通知をDMへ送る(ステップS430)。   Further, the DM sends a notification of the write destination entry on the RC 22 to the AM (step S420). When the AM receives the notification of the write destination entry from the DM, the AM sends a write completion notification to the entry to the DM (step S430).

この後、DMは、ホスト装置1からのデータであってRC22に格納させたデータを、NANDメモリ10へ書き込む(ステップS440)。このように、ホスト装置1からWrite_FUA要求があった場合には、DRAM20上のバッファ(RC22)にデータを一瞬だけ書き込んで、すぐにそこからNANDメモリ10に書き込む処理が行なわれる。換言すると、ホスト装置1からWrite_FUA要求があった場合には、RC22が一時的にFUA書き込み用のバッファとして用いられる。   Thereafter, the DM writes the data from the host device 1 and stored in the RC 22 to the NAND memory 10 (step S440). As described above, when there is a Write_FUA request from the host device 1, data is written into the buffer (RC 22) on the DRAM 20 for a moment, and then immediately written into the NAND memory 10 from there. In other words, when there is a Write_FUA request from the host device 1, the RC 22 is temporarily used as a buffer for FUA writing.

NANDメモリ10にデータが書き込まれると、NANDメモリ10へ書き込んだRC22上のデータ(書き込みに利用したエントリ)を無効化する(ステップS450)。そして、DMはAMへ、上述したエントリからNANDメモリ10へデータ書き込みが完了したことの通知を行なう(ステップS460)。   When data is written to the NAND memory 10, the data on the RC 22 written to the NAND memory 10 (entry used for writing) is invalidated (step S450). Then, the DM notifies the AM that the data writing from the entry described above to the NAND memory 10 is completed (step S460).

なお、本実施の形態では、ホスト装置1からWrite_FUA要求があった場合に、RC22を介してNANDメモリ10へデータの書き込みを行なったが、RC22やWC21以外のDRAM20領域を用いてNANDメモリ10へデータの書き込みを行なってもよい。   In the present embodiment, when there is a Write_FUA request from the host device 1, data is written to the NAND memory 10 via the RC 22. However, the DRAM 20 area other than the RC 22 and the WC 21 is used to write the data to the NAND memory 10. Data may be written.

つぎに、本実施の形態の要部について詳細に説明する。本実施の形態では、バッドクラスタテーブル90やバッドブロック管理テーブル200などに基づいて、データ管理部120(SSD100)の動作モードを切り替える。例えば、バッドクラスタテーブル90のサイズに上限値を設定しておく。そして、バッドクラスタテーブル90の残エントリ数が所定数(第1の閾値)以下となった場合に、データ管理部120が後述のWBモードへ遷移して動作し、バッドクラスタテーブル90の残エントリ数が所定数(第2の閾値)以下となった場合に、データ管理部120が後述のRDオンリーモードへ遷移して動作する。   Next, the main part of the present embodiment will be described in detail. In the present embodiment, the operation mode of the data management unit 120 (SSD 100) is switched based on the bad cluster table 90, the bad block management table 200, and the like. For example, an upper limit value is set for the size of the bad cluster table 90. When the number of remaining entries in the bad cluster table 90 becomes equal to or less than a predetermined number (first threshold), the data management unit 120 operates by shifting to the WB mode described later, and the number of remaining entries in the bad cluster table 90. Is less than or equal to a predetermined number (second threshold), the data management unit 120 shifts to an RD-only mode described later and operates.

また、例えば、BB管理テーブル200のサイズに上限値を設定しておく。そして、BB管理テーブル200の残エントリ数が所定数(第3の閾値)以下となった場合に、データ管理部120が後述のWBモードへ遷移して動作し、BB管理テーブル200の残エントリ数が所定数(第4の閾値)以下となった場合に、データ管理部120が後述のRDオンリーモードへ遷移して動作する。   For example, an upper limit value is set for the size of the BB management table 200. When the number of remaining entries in the BB management table 200 becomes equal to or smaller than a predetermined number (third threshold), the data management unit 120 operates by shifting to a WB mode described later, and the number of remaining entries in the BB management table 200. Becomes equal to or less than the predetermined number (fourth threshold value), the data management unit 120 shifts to an RD-only mode described later and operates.

データ管理部120の動作モードには、ライトバックモード(WBモード、Write Back)、ライトスルーモード(WTモード、Write Through)、リードオンリーモード(RDオンリーモード)、保護モードがあり、図27のように遷移する。図27での実線は動作中の遷移を示し、点線は起動時の遷移を示している。   The operation mode of the data management unit 120 includes a write back mode (WB mode, Write Back), a write through mode (WT mode, Write Through), a read only mode (RD only mode), and a protection mode, as shown in FIG. Transition to. A solid line in FIG. 27 indicates a transition during operation, and a dotted line indicates a transition at the time of activation.

WBモードは、WC21に一旦データ書き込み、所定の条件に基づきNANDメモリ10への追い出しを行う通常の動作モードである。WTモードは、一回のWrite要求でWC21(RC22)に書き込まれたデータを、都度NANDメモリ10に書き込む動作モードである。RDオンリーモードは、NANDメモリ10への書き込みを伴う処理を全て禁ずるモードである。   The WB mode is a normal operation mode in which data is once written to the WC 21 and is evicted to the NAND memory 10 based on a predetermined condition. The WT mode is an operation mode in which data written to the WC 21 (RC 22) with a single write request is written to the NAND memory 10 each time. The RD only mode is a mode in which all processes involving writing to the NAND memory 10 are prohibited.

・WBモード
上述したように、Writeコマンドにより書き込まれたデータは必ず一旦WC21上に格納され、その後条件に応じてNANDメモリ10に対して書き込まれることになる。書き込み処理では、追い出し処理、コンパクション処理が発生する可能性がある。この実施の形態では、書き込み処理を、ライトキャッシュフラッシュ処理(以下WCF処理)と、クリーンインプットバッファ処理(以下CIB処理)との2ステージに大きく分割している(図19参照)。WBモードは、通常の動作モードであり、AM(ATAコマンド処理部121)は、標準的な処理動作を行う。
WB Mode As described above, data written by the Write command is always stored once on the WC 21 and then written to the NAND memory 10 according to the conditions. In the writing process, an eviction process and a compaction process may occur. In this embodiment, the write process is largely divided into two stages, a write cache flush process (hereinafter referred to as WCF process) and a clean input buffer process (hereinafter referred to as CIB process) (see FIG. 19). The WB mode is a normal operation mode, and AM (ATA command processing unit 121) performs standard processing operation.

・WTモード
データ管理部120は、WBモードからWTモードへの遷移が必要となると、WTモードに遷移したことをATAコマンド処理部121に通知する。データ管理部120から通知を受けたATAコマンド処理部121は、ホスト装置1からの全てのWrite要求をWRITE_FUAに置き換えて発行する。WTモードは、SSD100が寿命に近づいた時に、ホスト装置1から書き込まれたデータをできるだけ保障するために用いられる動作モードである。WTモードの場合、AMはホスト装置1から要求されたデータの書き込み時に通常のWrite要求の代わりにWrite_FUA要求によってデータの書き込みを行う。なお、一度WTモードに遷移すると、リセットもしくは電源がOFFされるまでWTモードのまま処理を続けるか、さらにRDオンリーモードへ遷移する。またリセット直後、もしくは電源ON直後は必ずデータ管理部120の内部状態を検査し、条件に達していた場合は再びWTモードで起動される。
データ管理部120がWTモードに遷移する条件は次の通りである。
・バッドクラスタテーブル90の残エントリ数が所定数(第1の閾値)以下となった(論理NAND層管理部120bによる判定)
・バッドブロック管理テーブル200の残エントリ数が所定数(第3の閾値)以下となった(物理NAND層管理部120cによる判定)
データ管理部120では、これらの条件の何れか一方を満たした場合に、WBモードからWTモードへ遷移することとなる。このように、WTモードへ遷移することによって、書き込み要求のあったデータを都度NANDメモリ10に書き込むことが可能となる。これにより、バッドクラスタ、或いはバッドブロックBBの数が増加傾向にある疲弊状態のSSD100にあっても、データの書き込みが突然不能になることはなく、所定量まではNANDメモリ10へのデータの書き込みを保障することが可能となる。
WT mode When the data management unit 120 needs to change from the WB mode to the WT mode, the data management unit 120 notifies the ATA command processing unit 121 that the WT mode has been changed. The ATA command processing unit 121 that has received the notification from the data management unit 120 issues all the write requests from the host device 1 by replacing them with WRITE_FUA. The WT mode is an operation mode that is used to guarantee data written from the host device 1 as much as possible when the SSD 100 approaches the end of its life. In the WT mode, the AM writes data using a Write_FUA request instead of a normal Write request when writing data requested from the host device 1. Once transitioning to the WT mode, the processing is continued in the WT mode until reset or the power is turned off, or further transitioning to the RD only mode. Also, immediately after resetting or immediately after turning on the power, the internal state of the data management unit 120 is always inspected, and if the condition is reached, the WT mode is started again.
The conditions for the data management unit 120 to transition to the WT mode are as follows.
The number of remaining entries in the bad cluster table 90 has become a predetermined number (first threshold) or less (determination by the logical NAND layer management unit 120b)
The number of remaining entries in the bad block management table 200 has become a predetermined number (third threshold) or less (determination by the physical NAND layer management unit 120c)
The data management unit 120 transitions from the WB mode to the WT mode when any one of these conditions is satisfied. Thus, by making the transition to the WT mode, it becomes possible to write the data requested to be written to the NAND memory 10 each time. As a result, even in the fatigued SSD 100 in which the number of bad clusters or bad blocks BB is increasing, data writing is not suddenly disabled, and data writing to the NAND memory 10 is performed up to a predetermined amount. Can be guaranteed.

・RDオンリーモード
データ管理部120は、WTモードからRDオンリーモードへの遷移条件が満たされると、Write要求に対して処理を開始せずに、RDオンリーモードのため受け付け出来ないことを明記してエラーを返す。RDオンリーモードは、SSD100が寿命に近づいた時に、ホスト装置1から既に書き込まれていたデータをできるだけ保障するために用いられる動作モードである。RDオンリーモードの場合、AMはホスト装置1から要求されたデータの書き込み処理を、DMに要求することなくエラーで返す。なお一度RDオンリーモードに遷移すると、リセットもしくは電源がOFFされるまでRDオンリーモードのまま処理を続ける。またリセット直後、もしくは電源がON直後は必ずデータ管理部120の内部状態を検査し、条件に達していた場合は再びRDオンリーモードで起動される。
データ管理部120がRDオンリーモードに遷移する条件は以下の通りである。
・バッドクラスタテーブル90の残エントリ数が所定数(第2の閾値、例えば、0個)以下となった(論理NAND層管理部120bによる判定)
・BB管理テーブル200の残エントリ数が所定数(第4の閾値、例えば、0個)以下となった(物理NAND層管理部120cによる判定)
・フリーブロックFBが不足となった(論理NAND層管理部120bによる判定)
フリーブロックFBが不足となった場合とは、例えばコンパクション処理を行ったとしても、フリーブロックFBを作ることができず、且つ、MS11内の論理ブロック数が規定数を上回る場合などである。具体的には、NANDメモリ10に書き込むエリアが無くなった状態である。
-RD-only mode The data management unit 120 specifies that when the transition condition from the WT mode to the RD-only mode is satisfied, the processing cannot be accepted for the RD-only mode without starting processing for the Write request. Returns an error. The RD only mode is an operation mode used to guarantee as much as possible the data already written from the host device 1 when the SSD 100 approaches the end of its life. In the RD only mode, the AM returns the data write processing requested from the host device 1 with an error without requesting the DM. Once the transition to the RD-only mode is made, the processing is continued in the RD-only mode until reset or the power is turned off. In addition, immediately after resetting or immediately after the power is turned on, the internal state of the data management unit 120 is always inspected, and if the condition is reached, it is started again in the RD-only mode.
The conditions for the data management unit 120 to transition to the RD only mode are as follows.
The number of remaining entries in the bad cluster table 90 is equal to or less than a predetermined number (second threshold, for example, 0) (determination by the logical NAND layer management unit 120b)
The number of remaining entries in the BB management table 200 is equal to or less than a predetermined number (fourth threshold, for example, 0) (determination by the physical NAND layer management unit 120c).
-The free block FB is insufficient (determination by the logical NAND layer management unit 120b)
The case where the free block FB becomes insufficient is, for example, the case where the free block FB cannot be created even if the compaction process is performed, and the number of logical blocks in the MS 11 exceeds the specified number. Specifically, there is no area for writing to the NAND memory 10.

データ管理部120では、上述した4つの条件の何れか1つを満たした場合に、WTモードからRDオンリーモードへ遷移することとなる。上述した4つの条件が達成された場合、データ管理部120はNANDメモリ10への書き込みを伴うWrite要求に対してエラーを返す。換言すると、データ管理部120は、NANDメモリ10へのデータの書き込みを保障できない場合には、データの書き込み要求を受け付けることなくエラー処理を行う。   The data management unit 120 transitions from the WT mode to the RD only mode when any one of the above-described four conditions is satisfied. When the four conditions described above are achieved, the data management unit 120 returns an error in response to a Write request that involves writing to the NAND memory 10. In other words, when data writing to the NAND memory 10 cannot be guaranteed, the data management unit 120 performs error processing without accepting a data write request.

ホスト装置1からのデータをNANDメモリ10に書き込む際には、バッドブロックBBやバッドクラスタが発生する場合がある。このような場合に、バッドブロックBBやバッドクラスタをBB管理テーブル200やバッドクラスタテーブル90に正しく登録できなければ、バッドブロックBBやバッドクラスタを正しく管理できない。したがって、上述した4つの条件の何れか1つでも満たした場合に新たなデータの書き込みを許可すると、バッドブロックBBやバッドクラスタを正しく管理できない状況が生じる場合がある。本実施の形態では、バッドブロックBBやバッドクラスタをBB管理テーブル200やバッドクラスタテーブル90に正しく登録できない状況が生じる可能性がある場合に、データ管理部120がRDオンリーモードへ遷移することによってNANDメモリ10へのデータの書き込みを禁止しているので、バッドブロックBBやバッドクラスタを正しく管理できない状況が生じることはない。   When writing data from the host device 1 to the NAND memory 10, a bad block BB or a bad cluster may occur. In such a case, if the bad block BB or bad cluster cannot be correctly registered in the BB management table 200 or bad cluster table 90, the bad block BB or bad cluster cannot be correctly managed. Therefore, if writing of new data is permitted when any one of the four conditions described above is satisfied, a situation may arise in which the bad block BB or bad cluster cannot be managed correctly. In the present embodiment, when there is a possibility that a bad block BB or bad cluster cannot be correctly registered in the BB management table 200 or bad cluster table 90, the data management unit 120 shifts to the RD only mode to perform NAND. Since writing of data to the memory 10 is prohibited, a situation in which the bad block BB and the bad cluster cannot be managed correctly does not occur.

・保護モード
データ管理部120は、タスク起動時にログなどを参照して電源OFF直前の状態を復元する。このとき、ログが保存されているブロックがL2−ECCエラーによって読み出せなかった場合には、データ管理部120は、初期化が失敗したと見做してエラーフラグを立てて初期化管理部124に初期化完了通知メッセージを返す。
Protection mode The data management unit 120 restores the state immediately before the power is turned off by referring to a log or the like when the task is activated. At this time, when the block in which the log is stored cannot be read due to the L2-ECC error, the data management unit 120 sets the error flag by assuming that the initialization has failed and sets the error flag. An initialization completion notification message is returned to.

このように、本実施の形態によれば、バッドクラスタテーブル90やバッドブロック管理テーブル200に基づいて、データ管理部120の動作モードを切り替えるので、バッドブロックBBやバッドクラスタが増加した場合であっても、NANDメモリ10の領域を効率良く用いてデータの書き込みを行うことが可能となる。したがって、NANDメモリ10に空き容量があるにも関わらず突然データの書き込みが不能になることはない。   As described above, according to the present embodiment, since the operation mode of the data management unit 120 is switched based on the bad cluster table 90 and the bad block management table 200, the number of bad blocks BB and bad clusters increases. However, it is possible to write data using the area of the NAND memory 10 efficiently. Therefore, even though the NAND memory 10 has free space, data writing is not suddenly disabled.

また、所定の条件を満たした場合には、データ管理部120がRDオンリーモードへ遷移するので、バッドブロックBBやバッドクラスタを正しく管理することが可能となる。   Further, when the predetermined condition is satisfied, the data management unit 120 shifts to the RD only mode, so that the bad block BB and the bad cluster can be correctly managed.

また、バッドクラスタテーブル90やバッドブロック管理テーブル200に基づいて、データ管理部120が切り替える動作モードを判断するので、動作モードを容易かつ迅速に切り替えることが可能となる。   Further, since the data management unit 120 determines the operation mode to be switched based on the bad cluster table 90 and the bad block management table 200, the operation mode can be easily and quickly switched.

SSDの構成例を示すブロック図。The block diagram which shows the structural example of SSD. NANDメモリチップに含まれる1個のブロックの構成例と、4値データ記憶方式での閾値分布を示す図。The figure which shows the example of a structure of one block contained in a NAND memory chip, and the threshold value distribution by a quaternary data storage system. ドライブ制御回路のハードウェア的な内部構成例を示すブロック図。The block diagram which shows the hardware internal structural example of a drive control circuit. プロセッサの機能構成例を示すブロック図。The block diagram which shows the function structural example of a processor. NANDメモリおよびDRAM内に形成された機能構成を示すブロック図。The block diagram which shows the function structure formed in NAND memory and DRAM. WCからNANDメモリへの書き込み処理に係わるより詳細な機能ブロック図。FIG. 3 is a more detailed functional block diagram related to a writing process from a WC to a NAND memory. LBA論理アドレスを示す図。The figure which shows a LBA logical address. データ管理部内の管理テーブルの構成例を示す図。The figure which shows the structural example of the management table in a data management part. RCクラスタ管理テーブルの一例を示す図。The figure which shows an example of RC cluster management table. WCクラスタ管理テーブルの一例を示す図。The figure which shows an example of a WC cluster management table. WCトラック管理テーブルの一例を示す図。The figure which shows an example of a WC track management table. トラック管理テーブルの一例を示す図。The figure which shows an example of a track management table. FS/IS管理テーブルの一例を示す図。The figure which shows an example of a FS / IS management table. MS論理ブロック管理テーブルの一例を示す図。The figure which shows an example of MS logic block management table. FS/IS論理ブロック管理テーブルの一例を示す図。The figure which shows an example of a FS / IS logical block management table. FS/IS内クラスタ管理テーブルの一例を示す図。The figure which shows an example of the cluster management table in FS / IS. 論物変換テーブルの一例を示す図。The figure which shows an example of a logical-physical conversion table. 読み出し処理の動作例を示すフローチャート。10 is a flowchart showing an example of operation of read processing. 書き込み処理の動作例を示すフローチャート。The flowchart which shows the operation example of a writing process. 各構成要素間のデータの流れにおける入力と出力の組み合わおよびその発生要因を示す図。The figure which shows the combination of the input and output in the data flow between each component, and its generation | occurrence | production factor. 並列動作要素とプレーンとチャネルの関係を示す図。The figure which shows the relationship between a parallel operation | movement element, a plane, and a channel. BB管理テーブルの一例を示す図。The figure which shows an example of a BB management table. バッドクラスタテーブルの一例を示す図。The figure which shows an example of a bad cluster table. バッドクラスタテーブルにバッドクラスタ情報を登録する処理を示すフローチャート。The flowchart which shows the process which registers bad cluster information in a bad cluster table. Write_FUA処理を説明するための図。The figure for demonstrating Write_FUA processing. Write_FUA処理の処理手順を示すフローチャート。The flowchart which shows the process sequence of Write_FUA process. データ管理部の動作モードを説明するための図。The figure for demonstrating the operation mode of a data management part.

符号の説明Explanation of symbols

1 ホスト装置、10 NANDメモリ、11、メインストレージ領域(MS)、11a MS入力バッファ(MSIB)、11b トラック前段ストレージ領域(TFS)、12 前段ストレージ領域(FS)、12a FS入力バッファ(FSIB)、13 中段ストレージ領域(IS)、20 DRAM、21 ライトキャッシュ(WC)、22 リードキャッシュ(RC)、30 トラック管理テーブル、35 MS論理ブロック管理テーブル、40 FS/IS管理テーブル、42 FS/IS論理ブロック管理テーブル、44 FS/IS内クラスタ管理テーブル。   1 host device, 10 NAND memory, 11, main storage area (MS), 11a MS input buffer (MSIB), 11b track previous storage area (TFS), 12 previous storage area (FS), 12a FS input buffer (FSIB), 13 middle storage area (IS), 20 DRAM, 21 write cache (WC), 22 read cache (RC), 30 track management table, 35 MS logical block management table, 40 FS / IS management table, 42 FS / IS logical block Management table, 44 FS / IS internal cluster management table.

Claims (8)

第1の単位でデータの読み出し/書き込みが行われ、前記第1の単位の2以上の自然数倍である第2の単位で管理が行われる揮発性の半導体記憶素子から構成されるキャッシュメモリとしての第1の記憶部と、
前記データの読み出し/書き込みが行われ、前記第2の単位および当該第2の単位の2以上の自然数倍である第3の単位で管理され、前記第3の単位の2以上の自然数倍である第4の単位で消去が行われる不揮発性の半導体記憶素子から構成される第2の記憶部と、
前記第1および第2の記憶部でのデータ管理を行なうとともに、ホスト装置からデータの書き込み要求があった場合には、書き込み要求のあったデータを前記第1の記憶部を介して前記第2の記憶部に書き込み、前記ホスト装置からデータの読み出し要求があった場合には、読み出し要求のあったデータを前記第2の記憶部から前記第1の記憶部に読み出すとともに前記第1の記憶部から前記ホスト装置に転送するコントローラと、
を具備し、
前記コントローラは、
前記第2の記憶部で発生した前記第2の単位の不良領域の数を第1の不良領域数として管理する第1の管理テーブルを備え、
前記第1の不良領域数に応じて、前記ホスト装置から前記第2の記憶部へのデータの書き込みの際の動作モードを切り替えることを特徴とするメモリシステム。
As a cache memory composed of a volatile semiconductor memory element in which data is read / written in the first unit and managed in a second unit that is a natural number multiple of 2 or more of the first unit. A first storage unit of
The data is read / written and managed in the second unit and a third unit that is a natural number multiple of 2 or more of the second unit, and is a natural number multiple of 2 or more of the third unit. A second storage unit composed of a nonvolatile semiconductor storage element that is erased in a fourth unit of
The data management is performed in the first and second storage units, and when there is a data write request from the host device, the data requested to be written is sent to the second storage unit via the first storage unit. When there is a data read request from the host device, the requested data is read from the second storage unit to the first storage unit and the first storage unit A controller for transferring from to the host device;
Comprising
The controller is
A first management table that manages the number of defective areas of the second unit generated in the second storage unit as a first number of defective areas;
A memory system, wherein an operation mode at the time of writing data from the host device to the second storage unit is switched according to the first number of defective areas.
前記コントローラは、
前記第2の記憶部で発生した前記第4の単位の不良領域の数を第2の不良領域数として管理する第2の管理テーブルを更に備え、
前記第2の不良領域数に応じて、前記ホスト装置から前記第2の記憶部へのデータの書き込みの際の動作モードを切り替えることを特徴とする請求項1に記載のメモリシステム。
The controller is
A second management table that manages the number of defective areas of the fourth unit generated in the second storage unit as a second number of defective areas;
The memory system according to claim 1, wherein an operation mode at the time of writing data from the host device to the second storage unit is switched according to the second number of defective areas.
前記動作モードは、ライトバックモード、ライトスルーモード、リードオンリーモードの何れかであることを特徴とする請求項2に記載のメモリシステム。   The memory system according to claim 2, wherein the operation mode is any one of a write back mode, a write through mode, and a read only mode. 前記コントローラは、前記前記第1の不良領域数が第1の閾値以下である場合に、前記ライトバックモードから前記ライトスルーモードへ動作モードを切り替えることを特徴とする請求項3に記載のメモリシステム。   4. The memory system according to claim 3, wherein the controller switches an operation mode from the write-back mode to the write-through mode when the first number of defective areas is equal to or less than a first threshold. . 前記コントローラは、前記前記第1の不良領域数が第2の閾値以下である場合に、前記ライトスルーモードから前記リードオンリーモードへ動作モードを切り替えることを特徴とする請求項4に記載のメモリシステム。   5. The memory system according to claim 4, wherein the controller switches an operation mode from the write-through mode to the read-only mode when the first number of defective areas is equal to or less than a second threshold value. . 前記コントローラは、前記前記第2の不良領域数が第3の閾値以下である場合に、前記ライトバックモードから前記ライトスルーモードへ動作モードを切り替えることを特徴とする請求項5に記載のメモリシステム。   The memory system according to claim 5, wherein the controller switches an operation mode from the write-back mode to the write-through mode when the second number of defective areas is equal to or less than a third threshold. . 前記コントローラは、前記前記第2の不良領域数が第4の閾値以下である場合に、前記ライトスルーモードから前記リードオンリーモードへ動作モードを切り替えることを特徴とする請求項6に記載のメモリシステム。   The memory system according to claim 6, wherein the controller switches an operation mode from the write-through mode to the read-only mode when the second number of defective areas is equal to or less than a fourth threshold value. . 前記第1の単位はセクタであり、前記第2の単位はクラスタであり、前記第3の単位はトラックであり、前記第4の単位はブロックであることを特徴とする請求項1に記載のメモリシステム。   2. The first unit according to claim 1, wherein the first unit is a sector, the second unit is a cluster, the third unit is a track, and the fourth unit is a block. Memory system.
JP2008061346A 2008-03-01 2008-03-11 Memory system Expired - Fee Related JP4643671B2 (en)

Priority Applications (7)

Application Number Priority Date Filing Date Title
JP2008061346A JP4643671B2 (en) 2008-03-11 2008-03-11 Memory system
US12/394,875 US8706950B2 (en) 2008-03-01 2009-02-27 Memory system
US14/199,808 US9201717B2 (en) 2008-03-01 2014-03-06 Memory system
US14/923,028 US20160062675A1 (en) 2008-03-01 2015-10-26 Memory system
US16/293,144 US10901625B2 (en) 2008-03-01 2019-03-05 Memory system
US17/124,954 US11409442B2 (en) 2008-03-01 2020-12-17 Memory system
US17/880,546 US20220374151A1 (en) 2008-03-01 2022-08-03 Memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008061346A JP4643671B2 (en) 2008-03-11 2008-03-11 Memory system

Publications (2)

Publication Number Publication Date
JP2009217603A true JP2009217603A (en) 2009-09-24
JP4643671B2 JP4643671B2 (en) 2011-03-02

Family

ID=41189373

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008061346A Expired - Fee Related JP4643671B2 (en) 2008-03-01 2008-03-11 Memory system

Country Status (1)

Country Link
JP (1) JP4643671B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5002719B1 (en) * 2011-03-10 2012-08-15 株式会社東芝 Information processing device, external storage device, host device, relay device, control program, and information processing device control method
JP2013041547A (en) * 2011-08-19 2013-02-28 Toshiba Corp Information processing apparatus, performance evaluation tool, and performance evaluation tool of external storage device
WO2013027642A1 (en) * 2011-08-19 2013-02-28 Kabushiki Kaisha Toshiba Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
JP2013047913A (en) * 2011-08-29 2013-03-07 Toshiba Corp Information processor, control method of the same, control tool and host device
JP2013246479A (en) * 2012-05-23 2013-12-09 Fujitsu Ltd Processing device, processing method, processing program and management device
US8626992B2 (en) 2010-11-30 2014-01-07 Kabushiki Kaisha Toshiba Storage device with identification information
JP2014032679A (en) * 2013-09-02 2014-02-20 Toshiba Corp Host device and control tool
US9811277B2 (en) 2013-03-18 2017-11-07 Toshiba Memory Corporation Information processing system
US10042725B2 (en) 2013-09-06 2018-08-07 Kabushiki Kaisha Toshiba Memory control circuit, cache memory and memory control method
CN109801668A (en) * 2017-11-17 2019-05-24 慧荣科技股份有限公司 Data memory device and the operating method being applied thereon
JP2021177401A (en) * 2020-05-18 2021-11-11 キオクシア株式会社 Information processing device
CN114415961A (en) * 2022-01-21 2022-04-29 珠海奔图电子有限公司 Bad block processing method of Nand flash memory, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6464047A (en) * 1987-09-04 1989-03-09 Fujitsu Ltd Disk cache control system
JPH0683708A (en) * 1992-04-10 1994-03-25 Fujitsu Ltd Method and device for storing data
JPH06309232A (en) * 1993-04-20 1994-11-04 Hitachi Ltd Control system for disk cache
JP2000173289A (en) * 1998-12-10 2000-06-23 Toshiba Corp Flash memory system which can correct error
JP2005115561A (en) * 2003-10-06 2005-04-28 Media Logic:Kk Flash rom controller
JP2007505406A (en) * 2003-09-11 2007-03-08 インテル・コーポレーション Cache algorithm adaptable to temperature sensitive memory
JP2010521014A (en) * 2008-02-29 2010-06-17 株式会社東芝 Information processing apparatus and nonvolatile semiconductor memory drive

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6464047A (en) * 1987-09-04 1989-03-09 Fujitsu Ltd Disk cache control system
JPH0683708A (en) * 1992-04-10 1994-03-25 Fujitsu Ltd Method and device for storing data
JPH06309232A (en) * 1993-04-20 1994-11-04 Hitachi Ltd Control system for disk cache
JP2000173289A (en) * 1998-12-10 2000-06-23 Toshiba Corp Flash memory system which can correct error
JP2007505406A (en) * 2003-09-11 2007-03-08 インテル・コーポレーション Cache algorithm adaptable to temperature sensitive memory
JP2005115561A (en) * 2003-10-06 2005-04-28 Media Logic:Kk Flash rom controller
JP2010521014A (en) * 2008-02-29 2010-06-17 株式会社東芝 Information processing apparatus and nonvolatile semiconductor memory drive

Cited By (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8626992B2 (en) 2010-11-30 2014-01-07 Kabushiki Kaisha Toshiba Storage device with identification information
JP5002719B1 (en) * 2011-03-10 2012-08-15 株式会社東芝 Information processing device, external storage device, host device, relay device, control program, and information processing device control method
US9785494B2 (en) 2011-03-10 2017-10-10 Toshiba Memory Corporation Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US8683117B2 (en) 2011-03-10 2014-03-25 Kabushiki Kaisha Toshiba Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US10936394B2 (en) 2011-03-10 2021-03-02 Toshiba Memory Corporation Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
CN103403691A (en) * 2011-03-10 2013-11-20 株式会社东芝 Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US8756367B2 (en) 2011-03-10 2014-06-17 Kabushiki Kaisha Toshiba Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
WO2012120717A1 (en) * 2011-03-10 2012-09-13 Kabushiki Kaisha Toshiba Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US8631191B2 (en) 2011-03-10 2014-01-14 Kabushiki Kaisha Toshiba Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US11880267B2 (en) 2011-03-10 2024-01-23 Kioxia Corporation Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US8667216B2 (en) 2011-03-10 2014-03-04 Kabushiki Kaisha Toshiba Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US10338985B2 (en) 2011-03-10 2019-07-02 Toshiba Memory Corporation Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
US11544131B2 (en) 2011-03-10 2023-01-03 Kioxia Corporation Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
CN103403691B (en) * 2011-03-10 2016-04-06 株式会社东芝 The control method of signal conditioning package, external storage device, host apparatus, relay, signal conditioning package
US9201602B2 (en) 2011-03-10 2015-12-01 Kabushiki Kaisha Toshiba Information processing device, external storage device, host device, relay device, control program, and control method of information processing device
KR101475645B1 (en) * 2011-03-10 2014-12-22 가부시끼가이샤 도시바 Information processing device, external storage device, host device, relay device, computer-readable recording medium, and control method of information processing device
US9594611B2 (en) 2011-08-19 2017-03-14 Kabushiki Kaisha Toshiba Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
JP2013041547A (en) * 2011-08-19 2013-02-28 Toshiba Corp Information processing apparatus, performance evaluation tool, and performance evaluation tool of external storage device
US10452283B2 (en) 2011-08-19 2019-10-22 Toshiba Memory Corporation Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
US11726661B2 (en) 2011-08-19 2023-08-15 Kioxia Corporation Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
US11119661B2 (en) 2011-08-19 2021-09-14 Toshiba Memory Corporation Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
US10101923B2 (en) 2011-08-19 2018-10-16 Toshiba Memory Corporation Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
WO2013027642A1 (en) * 2011-08-19 2013-02-28 Kabushiki Kaisha Toshiba Information processing apparatus, method for controlling information processing apparatus, non-transitory recording medium storing control tool, host device, non-transitory recording medium storing performance evaluation tool, and performance evaluation method for external memory device
JP2013047913A (en) * 2011-08-29 2013-03-07 Toshiba Corp Information processor, control method of the same, control tool and host device
JP2013246479A (en) * 2012-05-23 2013-12-09 Fujitsu Ltd Processing device, processing method, processing program and management device
US9811277B2 (en) 2013-03-18 2017-11-07 Toshiba Memory Corporation Information processing system
US10089027B2 (en) 2013-03-18 2018-10-02 Toshiba Memory Corporation Information processing system
JP2014032679A (en) * 2013-09-02 2014-02-20 Toshiba Corp Host device and control tool
US10042725B2 (en) 2013-09-06 2018-08-07 Kabushiki Kaisha Toshiba Memory control circuit, cache memory and memory control method
US10915388B2 (en) 2017-11-17 2021-02-09 Silicon Motion, Inc. Data storage device and associated operating method capable of detecting errors and effectively protecting data
JP2019096281A (en) * 2017-11-17 2019-06-20 慧榮科技股▲分▼有限公司 Data storage device and associated operating method
CN109801668A (en) * 2017-11-17 2019-05-24 慧荣科技股份有限公司 Data memory device and the operating method being applied thereon
CN109801668B (en) * 2017-11-17 2021-11-30 慧荣科技股份有限公司 Data storage device and operation method applied to same
JP2021177401A (en) * 2020-05-18 2021-11-11 キオクシア株式会社 Information processing device
JP7143487B2 (en) 2020-05-18 2022-09-28 キオクシア株式会社 Information processing equipment
JP7362863B2 (en) 2020-05-18 2023-10-17 キオクシア株式会社 information processing equipment
CN114415961A (en) * 2022-01-21 2022-04-29 珠海奔图电子有限公司 Bad block processing method of Nand flash memory, electronic equipment and storage medium
CN114415961B (en) * 2022-01-21 2023-10-27 珠海奔图电子有限公司 Bad block processing method of Nand flash memory, electronic equipment and storage medium

Also Published As

Publication number Publication date
JP4643671B2 (en) 2011-03-02

Similar Documents

Publication Publication Date Title
JP4745356B2 (en) Memory system
US10901625B2 (en) Memory system
JP5010505B2 (en) Memory system
JP4498426B2 (en) Memory system
JP4675985B2 (en) Memory system
JP4653817B2 (en) Memory system
JP4643671B2 (en) Memory system
JP4691122B2 (en) Memory system
JP4551940B2 (en) Memory system
JP4643667B2 (en) Memory system
JP5032371B2 (en) Memory system
JP4691123B2 (en) Memory system
JP4762261B2 (en) Memory system
JP2009211234A (en) Memory system
JP2009211233A (en) Memory system
JP4592774B2 (en) Memory system
JP5221593B2 (en) Memory system
JP4621749B2 (en) Memory system
JP4510107B2 (en) Memory system
JP4746641B2 (en) Memory system
JP4703673B2 (en) Memory system
JP2009211224A (en) Memory system
JP5178857B2 (en) Memory system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100809

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100817

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101018

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101202

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

Free format text: PAYMENT UNTIL: 20131210

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees