JP2023090896A - memory system - Google Patents

memory system Download PDF

Info

Publication number
JP2023090896A
JP2023090896A JP2023077290A JP2023077290A JP2023090896A JP 2023090896 A JP2023090896 A JP 2023090896A JP 2023077290 A JP2023077290 A JP 2023077290A JP 2023077290 A JP2023077290 A JP 2023077290A JP 2023090896 A JP2023090896 A JP 2023090896A
Authority
JP
Japan
Prior art keywords
data
write
host
memory
command
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
JP2023077290A
Other languages
Japanese (ja)
Other versions
JP7463598B2 (en
Inventor
伸一 菅野
Shinichi Sugano
英樹 吉田
Hideki Yoshida
直紀 江坂
Naoki Ezaka
裕史 西村
Yasushi Nishimura
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.)
Kioxia Corp
Original Assignee
Kioxia 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
Priority claimed from JP2022106938A external-priority patent/JP7281585B2/en
Application filed by Kioxia Corp filed Critical Kioxia Corp
Priority to JP2023077290A priority Critical patent/JP7463598B2/en
Publication of JP2023090896A publication Critical patent/JP2023090896A/en
Application granted granted Critical
Publication of JP7463598B2 publication Critical patent/JP7463598B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System (AREA)

Abstract

To provide a memory system capable of simultaneously using a plurality of write destination blocks.SOLUTION: A controller of a memory system acquires first data from a memory of a host in which the first data is stored according to reception of a write command specifying at least position on a memory of the host. The controller reacquires the first data from the memory of the host according to reception of a read command requesting reading of the first data from the host after acquiring the first data from the memory of the host, and returns the reacquired first data to the host.SELECTED DRAWING: Figure 6

Description

本発明の実施形態は、不揮発性メモリを制御する技術に関する。 Embodiments of the present invention relate to techniques for controlling non-volatile memory.

近年、不揮発性メモリを備えるメモリシステムが広く普及している。このようなメモリシステムの一つとして、NANDフラッシュ技術ベースのソリッドステートドライブ(SSD)が知られている。
データセンターのサーバにおいても、ストレージデバイスとしてSSDが使用されている。
In recent years, memory systems with nonvolatile memories have become widespread. As one of such memory systems, a solid state drive (SSD) based on NAND flash technology is known.
SSDs are also used as storage devices in servers in data centers.

サーバのようなホスト計算機システムにおいて利用されるストレージデバイスにおいては、高いI/O性能が求められている。
このため、最近では、ホストとストレージデバイスとの間の新たなインタフェースが提案され始めている。
また、最近のストレージデバイスにおいては、異なる種類のデータを異なる書き込み先ブロックに書き込むことを可能にすることが求められる場合がある。
High I/O performance is required for storage devices used in host computer systems such as servers.
For this reason, recently, new interfaces between hosts and storage devices have begun to be proposed.
Also, modern storage devices may be required to allow different types of data to be written to different destination blocks.

Yiying Zhang, 外, "De-indirection for flash-based SSDs with nameless writes." FAST. 2012, [online], [平成29年9月13日検索], インターネット<URL: https://www.usenix.org/system/files/conference/fast12/zhang.pdf >Yiying Zhang, et al., "De-indirection for flash-based SSDs with nameless writes." FAST. 2012, [online], [searched on September 13, 2017], Internet<URL: https://www.usenix. org/system/files/conference/fast12/zhang.pdf >

このため、複数の書き込み先ブロックを同時に利用可能にするための新たな技術の実現が要求される。
本発明が解決しようとする課題は、複数の書き込み先ブロックを同時に利用することができるメモリシステムを提供することである。
Therefore, it is required to realize a new technique for making multiple write destination blocks available at the same time.
A problem to be solved by the present invention is to provide a memory system that can simultaneously use a plurality of write destination blocks.

実施形態によれば、ホストに接続可能なメモリシステムは、不揮発性メモリと、前記不揮発性メモリに電気的に接続されたコントローラと、を具備する。前記コントローラは、第1のデータが格納されている前記ホストのメモリ上の位置を少なくとも指定するライトコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから取得する。前記コントローラは、前記第1のデータを前記ホストの前記メモリから取得した後に前記第1のデータの読み出しを要求するリードコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記ホストに返す。 According to an embodiment, a memory system connectable to a host includes a non-volatile memory and a controller electrically connected to the non-volatile memory. The controller acquires the first data from the memory of the host in response to receiving from the host a write command specifying at least a location on the memory of the host where the first data is stored. . The controller transfers the first data to the host in response to receiving from the host a read command requesting reading of the first data after obtaining the first data from the memory of the host. Reacquire from the memory and return the reacquired first data to the host.

ホストと実施形態に係るメモリシステム(フラッシュストレージデバイス)との関係を示すブロック図。3 is a block diagram showing the relationship between a host and a memory system (flash storage device) according to the embodiment; FIG. 同実施形態のメモリシステムの構成例を示すブロック図。FIG. 2 is a block diagram showing a configuration example of the memory system of the same embodiment; 同実施形態のメモリシステムにおいて使用される複数のチャンネルと複数のNAND型フラッシュメモリチップとの関係を示すブロック図。FIG. 2 is a block diagram showing the relationship between a plurality of channels and a plurality of NAND flash memory chips used in the memory system of the same embodiment; 同実施形態のメモリシステムにおいて使用される、あるスーパーブロックの構成例を示す図。FIG. 2 is a diagram showing a configuration example of a certain super block used in the memory system of the same embodiment; ホストに含まれるライトデータバッファおよびフラッシュトランスレーション部と同実施形態のメモリシステムに含まれるライト制御部、DMACおよび内部バッファとの関係を示すブロック図。FIG. 2 is a block diagram showing the relationship between a write data buffer and a flash translation unit included in a host and a write control unit, DMAC, and internal buffers included in the memory system of the same embodiment; 同実施形態のメモリシステムによって実行されるI/Oコマンド処理を説明するためのブロック図。4 is a block diagram for explaining I/O command processing executed by the memory system of the embodiment; FIG. 同実施形態のメモリシステムによって実行される複数段階の書き込み動作を説明するための図。FIG. 4 is a diagram for explaining a multistage write operation performed by the memory system of the embodiment; 同実施形態のメモリシステム内のある書き込み先ブロックへのデータの書き込み順序を説明するための図。4 is a diagram for explaining the order in which data is written to a certain write destination block in the memory system of the embodiment; FIG. 不揮発性メモリのデータ書き込み単位と同じサイズの単位でライトデータをホストから同実施形態のメモリシステムに転送する動作を説明するための図。FIG. 4 is a diagram for explaining the operation of transferring write data from the host to the memory system of the embodiment in units of the same size as data write units of the nonvolatile memory; 同実施形態のメモリシステムによって実行されるデータ書き込み処理の手順を示すフローチャート。4 is a flowchart showing the procedure of data write processing executed by the memory system of the same embodiment; ホストによって実行されるライトデータ破棄処理の手順を示すフローチャート。4 is a flowchart showing the procedure of write data discard processing executed by the host; 最後のライトコマンドが受信されてから閾期間、次のライトコマンドが受信されない場合に、同実施形態のメモリシステムによって実行されるダミーデータ書き込み処理を説明するための図。FIG. 7 is a diagram for explaining dummy data write processing performed by the memory system of the embodiment when the next write command is not received within a threshold period after the last write command is received; 同実施形態のメモリシステムによって実行されるダミーデータ書き込み処理の手順を示すフローチャート。4 is a flowchart showing the procedure of dummy data write processing executed by the memory system of the embodiment; 内部バッファを使用して同実施形態のメモリシステムによって実行されるデータ転送動作を示すブロック図。4 is a block diagram showing data transfer operations performed by the memory system of the embodiment using internal buffers; FIG. 内部バッファを使用して同実施形態のメモリシステムによって実行される書き込み処理と内部バッファ内のライトデータを破棄する処理とを説明するための図。FIG. 4 is a diagram for explaining a write process executed by the memory system of the embodiment using an internal buffer and a process of discarding write data in the internal buffer; 内部バッファに空き領域がない場合に同実施形態のメモリシステムによって実行される内部バッファ内のライトデータを破棄する処理を説明するための図。FIG. 4 is a diagram for explaining processing for discarding write data in the internal buffer, which is executed by the memory system of the embodiment when the internal buffer has no free space; 内部バッファを使用して同実施形態のメモリシステムによって実行されるデータ書き込み処理の手順を示すフローチャート。4 is a flowchart showing the procedure of data write processing executed by the memory system of the embodiment using an internal buffer; 同実施形態のメモリシステムによって実行されるデータ読み出し処理の手順を示すフローチャート。4 is a flowchart showing the procedure of data read processing executed by the memory system of the embodiment; ホストが書き込み先ブロックを指定し且つ同実施形態のメモリシステムが書き込み先ページを決定するデータ書き込み処理と、ホストがブロックアドレスとページアドレスとを指定するデータ読み出し処理とを説明するための図。FIG. 4 is a diagram for explaining data write processing in which a host designates a write destination block and the memory system of the same embodiment determines a write destination page, and data read processing in which the host designates a block address and a page address; 同実施形態のメモリシステムに適用されるブロックアロケートコマンド(ブロック割り当て要求)を説明するための図。FIG. 4 is a diagram for explaining a block allocate command (block allocation request) applied to the memory system of the embodiment; ブロックアロケートコマンドに対するレスポンスを説明するための図。FIG. 4 is a diagram for explaining a response to a block allocate command; FIG. 同実施形態のメモリシステムに適用されるライトコマンドを説明するための図。FIG. 4 is a diagram for explaining write commands applied to the memory system of the embodiment; ライトコマンドのコマンド完了を示すレスポンスを説明するための図。FIG. 4 is a diagram for explaining a response indicating command completion of a write command; 同実施形態のメモリシステムに適用されるリードコマンドを説明するための図。FIG. 4 is a diagram for explaining a read command applied to the memory system of the same embodiment;

以下、図面を参照して、実施形態を説明する。
まず、図1を参照して、本実施形態に係るメモリシステムとホストとの関係を説明する。
このメモリシステムは、不揮発性メモリにデータを書き込み、不揮発性メモリからデータを読み出すように構成された半導体ストレージデバイスである。このメモリシステムは、NANDフラッシュ技術ベースのフラッシュストレージデバイス3として実現されている。
Embodiments will be described below with reference to the drawings.
First, referring to FIG. 1, the relationship between the memory system and the host according to this embodiment will be described.
The memory system is a semiconductor storage device configured to write data to and read data from non-volatile memory. This memory system is implemented as a flash storage device 3 based on NAND flash technology.

ホスト(ホストデバイス)2は、複数のフラッシュストレージデバイス3を制御するように構成されている。ホスト2は、複数のフラッシュストレージデバイス3によって構成されるフラッシュアレイをストレージとして使用するように構成された情報処理装置によって実現される。この情報処理装置はパーソナルコンピュータであってもよいし、サーバコンピュータであってもよい。 A host (host device) 2 is configured to control a plurality of flash storage devices 3 . The host 2 is realized by an information processing device configured to use a flash array composed of a plurality of flash storage devices 3 as storage. This information processing apparatus may be a personal computer or a server computer.

なお、フラッシュストレージデバイス3は、ストレージアレイ内に設けられる複数のストレージデバイスの一つとして利用されてもよい。ストレージアレイは、サーバコンピュータのような情報処理装置にケーブルまたはネットワークを介して接続されてもよい。ストレージアレイは、このストレージアレイ内の複数のストレージ(例えば複数のフラッシュストレージデバイス3)を制御するコントローラを含む。フラッシュストレージデバイス3がストレージアレイに適用された場合には、このストレージアレイのコントローラが、フラッシュストレージデバイス3のホストとして機能してもよい。 Note that the flash storage device 3 may be used as one of a plurality of storage devices provided within the storage array. A storage array may be connected to an information processing device, such as a server computer, via a cable or network. The storage array includes a controller that controls multiple storages (eg, multiple flash storage devices 3) within the storage array. When the flash storage device 3 is applied to a storage array, the controller of this storage array may serve as the host for the flash storage device 3 .

以下では、サーバコンピュータのような情報処理装置がホスト2として機能する場合を例示して説明する。
ホスト(サーバ)2と複数のフラッシュストレージデバイス3は、インタフェース50を介して相互接続される(内部相互接続)。この相互接続のためのインタフェース50としては、これに限定されないが、PCI Express(PCIe)(登録商標)、NVM Express(NVMe)(登録商標)、Ethernet(登録商標)、NVMe over Fabrics(NVMeOF)等を使用し得る。
A case where an information processing apparatus such as a server computer functions as the host 2 will be described below as an example.
A host (server) 2 and multiple flash storage devices 3 are interconnected via an interface 50 (internal interconnect). The interface 50 for this interconnection may be, but is not limited to, PCI Express (PCIe) (registered trademark), NVM Express (NVMe) (registered trademark), Ethernet (registered trademark), NVMe over Fabrics (NVMeOF), etc. can be used.

ホスト2として機能するサーバコンピュータの典型例としては、データセンター内のサーバコンピュータ(以下、サーバと称する)が挙げられる。
ホスト2がデータセンター内のサーバによって実現されるケースにおいては、このホスト(サーバ)2は、ネットワーク60を介して複数のエンドユーザ端末(クライアント)61に接続されてもよい。ホスト2は、これらエンドユーザ端末61に対して様々なサービスを提供することができる。
A typical example of a server computer functioning as the host 2 is a server computer (hereinafter referred to as a server) in a data center.
In the case where the host 2 is implemented by a server in a data center, this host (server) 2 may be connected to multiple end-user terminals (clients) 61 via a network 60 . The host 2 can provide various services to these end user terminals 61 .

ホスト(サーバ)2によって提供可能なサービスの例には、(1)システム稼働プラットフォームを各クライアント(各エンドユーザ端末61)に提供するプラットホーム・アズ・ア・サービス(PaaS)、(2)仮想サーバのようなインフラストラクチャを各クライアント(各エンドユーザ端末61)に提供するインフラストラクチャ・アズ・ア・サービス(IaaS)、等がある。 Examples of services that can be provided by the host (server) 2 include (1) a platform as a service (PaaS) that provides a system operating platform to each client (each end-user terminal 61), (2) a virtual server and infrastructure as a service (IaaS) that provides each client (each end-user terminal 61) with such an infrastructure.

複数の仮想マシンが、このホスト(サーバ)2として機能する物理サーバ上で実行されてもよい。ホスト(サーバ)2上で走るこれら仮想マシンの各々は、この仮想マシンに対応するクライアント(エンドユーザ端末61)に各種サービスを提供するように構成された仮想サーバとして機能することができる。各仮想マシンにおいては、対応するエンドユーザ端末61によって使用される、オペレーティングシステムおよびユーザアプリケーションが実行される。各仮想マシンに対応するオペレーティングシステムは、I/Oサービスを含む。このI/Oサービスは、論理ブロックアドレス(LBA)ベースのブロックI/Oサービスであってもよいし、あるいは、キー・バリュー・ストアサービスであってもよい。I/Oサービスは、アクセス対象のデータを識別するためのタグそれぞれとフラッシュストレージデバイス3の物理アドレスそれぞれとの間のマッピングを管理するアドレス変換テーブルを含んでいてもよい。タグは、LBAのような論理アドレスであってもよいし、キー・バリュー・ストアのキーであってもよい。 A plurality of virtual machines may run on the physical server that functions as this host (server) 2 . Each of these virtual machines running on the host (server) 2 can function as a virtual server configured to provide various services to the client (end-user terminal 61) corresponding to this virtual machine. Each virtual machine runs an operating system and user applications used by the corresponding end-user terminal 61 . An operating system corresponding to each virtual machine includes I/O services. The I/O service may be a logical block address (LBA) based block I/O service or a key-value store service. The I/O service may include an address translation table that manages the mapping between each tag for identifying data to be accessed and each physical address of the flash storage device 3 . A tag can be a logical address, such as an LBA, or a key in a key-value store.

各仮想マシンに対応するオペレーティングシステムにおいては、I/Oサービスは、ユーザアプリケーションからのライト/リード要求に応答して、I/Oコマンド(ライトコマンド、リードコマンド)を発行する。これらI/Oコマンドはコマンドキューを介してフラッシュストレージデバイス3に送出される。 In the operating system corresponding to each virtual machine, the I/O service issues I/O commands (write command, read command) in response to write/read requests from user applications. These I/O commands are sent to the flash storage device 3 via the command queue.

フラッシュストレージデバイス3は、NAND型フラッシュメモリのような不揮発性メモリを含む。フラッシュストレージデバイス3は、不揮発性メモリ内の複数のブロックから割り当てられた複数の書き込み先ブロックを管理する。書き込み先ブロックとは、データが書き込まれるべきブロックを意味する。ホスト2からフラッシュストレージデバイス3に送出されるライトコマンドは、書き込むべきライトデータが存在するホスト2のメモリ上の位置と、このライトデータの長さと、このライトデータが書き込まれるべきブロックを示す識別子とを指定する。したがって、ホスト2は、データが書き込まれるべき特定の書き込み先ブロックを指定することができる。この結果、例えば、ホスト2は、あるエンドユーザ端末61(クライアント)に対応するユーザアプリケーションのデータが1以上の特定の書き込み先ブロックに書き込まれ、他のエンドユーザ端末61(クライアント)に対応するユーザアプリケーションのデータが別の1以上の特定の書き込み先ブロックに書き込まれる、といったデータ配置を実現することができる。 The flash storage device 3 includes non-volatile memory such as NAND flash memory. The flash storage device 3 manages multiple write destination blocks allocated from multiple blocks in the nonvolatile memory. A write destination block means a block to which data is to be written. A write command sent from the host 2 to the flash storage device 3 includes a location on the memory of the host 2 where the write data to be written exists, the length of this write data, and an identifier indicating the block to which this write data is to be written. Specify Therefore, the host 2 can specify a particular destination block to which data is to be written. As a result, for example, the host 2 writes data of a user application corresponding to a certain end-user terminal 61 (client) to one or more specific write destination blocks, and writes data to a user corresponding to another end-user terminal 61 (client). It is possible to implement a data arrangement in which application data is written to another one or more specific write destination blocks.

ライトデータが書き込まれるべきブロックを示す識別子は、特定の書き込み先ブロックを指定するブロックアドレス(ブロック番号)によって表されてもよい。フラッシュストレージデバイス3が複数のNAND型フラッシュメモリチップを含むケースにおいては、このブロックアドレスは、ブロックアドレスとチップ番号との組み合わせによって表されてもよい。 An identifier indicating a block to which write data is to be written may be represented by a block address (block number) that designates a specific write destination block. In the case where the flash storage device 3 includes multiple NAND flash memory chips, this block address may be represented by a combination of block address and chip number.

フラッシュストレージデバイス3がストリーム書き込みをサポートしているケースにおいては、ライトデータが書き込まれるべきブロックを示す識別子は、複数のストリーム内の一つのストリームの識別子(ストリームID)であってもよい。ストリーム書き込みにおいては、複数の書き込み先ブロックが複数のストリームにそれぞれ関連付けられる。換言すれば、フラッシュストレージデバイス3があるストリームIDを含むライトコマンドをホスト2から受信した場合、このフラッシュストレージデバイス3は、このストリームIDに対応するストリームに関連づけられた書き込み先ブロックにデータを書き込む。フラッシュストレージデバイス3が別のストリームIDを含むライトコマンドをホスト2から受信した場合、このフラッシュストレージデバイス3は、この別のストリームIDに対応する別のストリームに関連づけられた別の書き込み先ブロックにデータを書き込む。フラッシュストレージデバイス3においては、ストリームIDそれぞれとブロックアドレスそれぞれとの間のマッピングを管理するための管理テーブルが使用されてもよい。 In the case where the flash storage device 3 supports stream writing, the identifier indicating the block to which the write data should be written may be the identifier of one stream (stream ID) among multiple streams. In stream writing, multiple write destination blocks are associated with multiple streams, respectively. In other words, when the flash storage device 3 receives a write command containing a certain stream ID from the host 2, this flash storage device 3 writes data to the write destination block associated with the stream corresponding to this stream ID. When the flash storage device 3 receives a write command containing another stream ID from the host 2, this flash storage device 3 writes data to another write destination block associated with another stream corresponding to this another stream ID. write. The flash storage device 3 may use a management table for managing the mapping between each stream ID and each block address.

フラッシュストレージデバイス3は、以下のタイプ#1-ストレージデバイス、タイプ#2-ストレージデバイス、タイプ#3-ストレージデバイスのうちの任意のストレージデバイスとして実現されうる。
タイプ#1-ストレージデバイスは、ホスト2が、データが書き込まれるべきブロックとこのデータが書き込まれるべきページアドレスの双方を指定するタイプのストレージデバイスである。タイプ#1-ストレージデバイスに適用されるライトコマンドは、ブロックアドレス、ページアドレス、データポインタ、長さを含む。ブロックアドレスは、ホスト2から受信されるライトデータが書き込まれるべきブロックを指定する。ページアドレスは、このライトデータが書き込まれるべきこのブロック内のページを指定する。データポインタは、このライトデータが存在するホスト2内のメモリ上の位置を示す。長さは、このライトデータの長さを示す。
The flash storage device 3 can be implemented as any of the following type #1-storage device, type #2-storage device, type #3-storage device.
Type #1—storage device is a type of storage device in which the host 2 specifies both the block to which data is to be written and the page address to which this data is to be written. Type #1—A write command applied to a storage device contains block address, page address, data pointer, length. The block address specifies a block to which write data received from the host 2 should be written. The page address specifies the page within this block where this write data is to be written. The data pointer indicates the memory location within the host 2 where this write data exists. Length indicates the length of this write data.

タイプ#2-ストレージデバイスは、ホスト2がデータが書き込まれるべきブロックを指定し、ストレージデバイスがこのデータが書き込まれるべきこのブロック内の位置(ページ)を指定するタイプのストレージデバイスである。タイプ#2-ストレージデバイスに適用されるライトコマンドは、書き込まれるべきライトデータを識別するためのタグ(例えば、LBA、キー)、ブロックアドレス、データポインタ、長さを含む。さらに、ライトコマンドは、QoSドメインIDを含んでもよい。QoSドメインIDは、NAND型フラッシュメモリを論理的に分割することによって得られる複数の領域の一つを指定する。複数の領域の各々は、複数のブロックを含む。タイプ#2-ストレージデバイスは、不良ページ、ページ書き込み順序の制約を考慮して、データが書き込まれるべきページを決定することができる。 Type #2—Storage device is a type of storage device where the host 2 specifies the block to which data is to be written and the storage device specifies the location (page) within this block where this data is to be written. Type #2—A write command applied to a storage device includes a tag (eg, LBA, key) to identify the write data to be written, block address, data pointer, length. Additionally, the write command may include a QoS domain ID. The QoS domain ID designates one of multiple areas obtained by logically dividing the NAND flash memory. Each of the multiple regions includes multiple blocks. Type #2—The storage device can consider bad pages, page write order constraints, and determine the pages to which data should be written.

つまり、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、ブロックをホスト2にハンドリングさせつつ、ページ書き込み順序制約、バッドページ、ページサイズ等を隠蔽することができる。この結果、ホスト2は、ブロック境界を認識でき、且つページ書き込み順序制約、バッドページ、ページサイズについては意識することなく、どのユーザデータがどのブロックに存在するかを管理することができる。 That is, in the case where the flash storage device 3 is implemented as a type #2-storage device, the flash storage device 3 hides page write order constraints, bad pages, page size, etc. while allowing the host 2 to handle the blocks. can do. As a result, the host 2 can recognize block boundaries and manage which user data exists in which block without being aware of page write order restrictions, bad pages, and page sizes.

タイプ#3-ストレージデバイスは、ホスト2がデータを識別するタグ(例えばLBA)を指定し、ストレージデバイスがこのデータが書き込まれるべきブロックおよびページの双方を決定するタイプのストレージデバイスである。タイプ#3-ストレージデバイスに適用されるライトコマンドは、書き込まれるべきライトデータを識別するためのタグ(例えば、LBA、キー)、ストリームID、データポインタ、長さを含む。ストリームIDは、このライトデータに関連付けられたストリームの識別子である。フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、ストリームIDそれぞれとブロックアドレスそれぞれとの間のマッピングを管理する管理テーブルを参照して、このライトデータが書き込まれるべきブロックを決定する。さらに、フラッシュストレージデバイス3は、論理物理アドレス変換テーブルと称されるアドレス変換テーブルを使用して、タグ(LBA)それぞれとNAND型フラッシュメモリの物理アドレスそれぞれとの間のマッピングを管理する。 Type #3—A storage device is a type of storage device in which the host 2 specifies a tag (eg, LBA) that identifies the data, and the storage device determines both the block and page to which this data should be written. Type #3—A write command applied to a storage device includes a tag (eg, LBA, key) to identify the write data to be written, stream ID, data pointer, length. A stream ID is an identifier of a stream associated with this write data. In the case where the flash storage device 3 is implemented as a type #2-storage device, the flash storage device 3 refers to a management table that manages the mapping between each stream ID and each block address to perform this write. Determine the block to which the data should be written. Furthermore, the flash storage device 3 uses an address translation table called a logical-physical address translation table to manage the mapping between each tag (LBA) and each physical address of the NAND flash memory.

フラッシュストレージデバイス3はタイプ#1-ストレージデバイス、タイプ#2-ストレージデバイス、またはタイプ#3-ストレージデバイスのいずれであってもよいが、フラッシュストレージデバイス3は、NAND型フラッシュメモリに含まれる複数のブロックから割り当てられる複数の書き込み先ブロックを管理し、あるライトコマンドに関連付けられたライトデータを、このライトコマンドによって指定される書き込み先ブロックに書き込む。 The flash storage device 3 may be either a type #1-storage device, a type #2-storage device, or a type #3-storage device, but the flash storage device 3 includes multiple storage devices included in a NAND flash memory. A plurality of write destination blocks allocated from blocks are managed, and write data associated with a certain write command is written to the write destination block specified by this write command.

タイプ#1-ストレージデバイスにおいては、書き込み先ブロック内のページ書き込み順序はホスト2によって指定される。したがって、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、ホスト2からのライトコマンドそれぞれによって指定されるページアドレスに対応する順序で、書き込み先ブロック内のページそれぞれにデータを書き込む。 For Type #1—storage devices, the page write order within the destination block is specified by the host 2 . Therefore, in the case where the flash storage device 3 is implemented as a type #1-storage device, the flash storage device 3 writes destination blocks in an order corresponding to the page addresses specified by each write command from the host 2. Write data to each page in the

タイプ#2-ストレージデバイスにおいては、書き込み先ブロックはホスト2からのライトコマンドに含まれるブロックアドレスによって指定されるが、この書き込み先ブロック内の書き込み先ページはフラッシュストレージデバイス3によって決定される。したがって、フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、ライトコマンドに含まれるブロックアドレスによって指定される書き込み先ブロックの先頭のページから最後のページの順序でデータが書き込まれるように書き込み先ページを決定する。 In Type #2—storage devices, the destination block is specified by the block address included in the write command from the host 2, but the destination page within this destination block is determined by the flash storage device 3. Therefore, in the case where the flash storage device 3 is implemented as a type #2-storage device, the flash storage device 3 reads from the first page to the last page of the write destination block specified by the block address included in the write command. The write destination page is determined so that the data is written in the order of

タイプ#3-ストレージデバイスにおいては、フラッシュストレージデバイス3は、ライトコマンドに含まれるストリームIDに関連付けられたブロックを書き込み先ブロックとして選択し、この書き込み先ブロック内の書き込み先ページを決定する。したがって、フラッシュストレージデバイス3がタイプ#3-ストレージデバイスとして実現されているケースにおいては、フラッシュストレージデバイス3は、例えば、この書き込み先ブロックの先頭のページから最後のページの順序でデータが書き込まれるように書き込み先ページを決定する。 For Type #3—Storage Device, the flash storage device 3 selects the block associated with the stream ID included in the write command as the destination block and determines the destination page within this destination block. Therefore, in the case where the flash storage device 3 is implemented as a type #3-storage device, the flash storage device 3 is configured such that data is written in order from the first page to the last page of this write destination block, for example. determines the write destination page.

フラッシュストレージデバイス3によって管理される複数の書き込み先ブロックは、このフラッシュストレージデバイス3を共有する複数のエンドユーザ(クライアント)によってそれぞれ使用され得る。この場合、フラッシュストレージデバイス3においては、フラッシュストレージデバイス3を共有するエンドユーザの数と同数の、またはそれ以上の数の書き込み先ブロックが同時にオープンされる。 A plurality of write destination blocks managed by the flash storage device 3 can be used by a plurality of end users (clients) sharing this flash storage device 3, respectively. In this case, in the flash storage device 3, the same number of write destination blocks as the number of end users sharing the flash storage device 3 or more are opened at the same time.

図2は、フラッシュストレージデバイス3の構成例を示す。
フラッシュストレージデバイス3は、コントローラ4および不揮発性メモリ(NAND型フラッシュメモリ)5を備える。フラッシュストレージデバイス3は、ランダムアクセスメモリ、例えば、DRAM6も備えていてもよい。
FIG. 2 shows a configuration example of the flash storage device 3 .
The flash storage device 3 has a controller 4 and a nonvolatile memory (NAND type flash memory) 5 . Flash storage device 3 may also comprise random access memory, eg DRAM 6 .

NAND型フラッシュメモリ5は、マトリクス状に配置された複数のメモリセルを含むメモリセルアレイを含む。NAND型フラッシュメモリ5は、2次元構造のNAND型フラッシュメモリであってもよいし、3次元構造のNAND型フラッシュメモリであってもよい。 The NAND flash memory 5 includes a memory cell array including a plurality of memory cells arranged in a matrix. The NAND flash memory 5 may be a two-dimensional NAND flash memory or a three-dimensional NAND flash memory.

NAND型フラッシュメモリ5のメモリセルアレイは、複数のブロックBLK0~BLKm-1を含む。ブロックBLK0~BLKm-1の各々は複数のページ(ここではページP0~Pn-1)を含む。ブロックBLK0~BLKm-1は、消去単位として機能する。ブロックは、「消去ブロック」、「物理ブロック」、または「物理消去ブロック」と称されることもある。ページP0~Pn-1は、データ書き込み動作およびデータ読み込み動作の単位である。 A memory cell array of the NAND flash memory 5 includes a plurality of blocks BLK0 to BLKm-1. Each of the blocks BLK0 to BLKm-1 includes a plurality of pages (pages P0 to Pn-1 here). Blocks BLK0 to BLKm-1 function as erase units. Blocks may also be referred to as "erase blocks," "physical blocks," or "physical erase blocks." Pages P0 to Pn-1 are units for data write operations and data read operations.

コントローラ4は、ToggleNANDフラッシュインタフェース、オープンNANDフラッシュインタフェース(ONFI)のようなNANDインタフェース13を介して、不揮発性メモリであるNAND型フラッシュメモリ5に電気的に接続されている。コントローラ4は、NAND型フラッシュメモリ5を制御するように構成されたメモリコントローラとして動作する。このコントローラ4は、System-on-a-chip(SoC)のような回路によって実現されてもよい。 The controller 4 is electrically connected to a NAND flash memory 5, which is a non-volatile memory, via a NAND interface 13 such as a Toggle NAND flash interface or an open NAND flash interface (ONFI). Controller 4 operates as a memory controller configured to control NAND flash memory 5 . This controller 4 may be implemented by a circuit such as a System-on-a-chip (SoC).

NAND型フラッシュメモリ5は、図3に示すように、複数のNAND型フラッシュメモリチップ(NAND型フラッシュメモリダイ)を含んでいてもよい。個々のNAND型フラッシュメモリチップは独立して動作可能である。このため、NAND型フラッシュメモリチップは、並列動作可能な単位として機能する。図3においては、NANDインタフェース13に16個のチャンネルCh.1~Ch.16が接続されており、16個のチャンネルCh.1~Ch.16の各々に2つのNAND型フラッシュメモリチップが接続されている場合が例示されている。この場合、チャンネルCh.1~Ch.16に接続された16個のNAND型フラッシュメモリチップ#1~#16がバンク#0として編成されてもよく、またチャンネルCh.1~Ch.16に接続された残りの16個のNAND型フラッシュメモリチップ#17~#32がバンク#1として編成されてもよい。バンクは、複数のメモリモジュールをバンクインタリーブによって並列動作させるための単位として機能する。図3の構成例においては、16チャンネルと、2つのバンクを使用したバンクインタリーブとによって、最大32個のNAND型フラッシュメモリチップを並列動作させることができる。 The NAND flash memory 5 may include a plurality of NAND flash memory chips (NAND flash memory dies), as shown in FIG. Individual NAND flash memory chips can operate independently. Therefore, the NAND flash memory chip functions as a unit capable of parallel operation. 3, the NAND interface 13 has 16 channels Ch. 1 to Ch. 16 are connected, and 16 channels Ch. 1 to Ch. 16 are connected to two NAND flash memory chips. In this case, channel Ch. 1 to Ch. 16 NAND flash memory chips #1 to #16 connected to channel Ch.16 may be organized as bank #0, and channel Ch. 1 to Ch. The remaining 16 NAND flash memory chips #17-#32 connected to 16 may be organized as bank #1. A bank functions as a unit for operating a plurality of memory modules in parallel by bank interleaving. In the configuration example of FIG. 3, a maximum of 32 NAND flash memory chips can be operated in parallel by 16 channels and bank interleaving using two banks.

消去動作は、一つのブロック(物理ブロック)の単位で実行されてもよいし、並列動作可能な複数の物理ブロックの集合を含む並列単位(スーパーブロック)の単位で実行されてもよい。一つの並列単位、つまり複数の物理ブロックの集合を含む一つのスーパーブロックは、これに限定されないが、NAND型フラッシュメモリチップ#1~#32から一つずつ選択される計32個の物理ブロックを含んでいてもよい。なお、NAND型フラッシュメモリチップ#1~#32の各々はマルチプレーン構成を有していてもよい。例えば、NAND型フラッシュメモリチップ#1~#32の各々が、2つのプレーンを含むマルチプレーン構成を有する場合には、一つのスーパーブロックは、NAND型フラッシュメモリチップ#1~#32に対応する64個のプレーンから一つずつ選択される計64個の物理ブロックを含んでいてもよい。 The erase operation may be performed in units of one block (physical block), or may be performed in units of parallel units (super blocks) including a set of a plurality of physical blocks capable of parallel operation. One parallel unit, that is, one super block including a set of multiple physical blocks includes, but is not limited to, a total of 32 physical blocks selected one by one from NAND flash memory chips #1 to #32. may contain. Each of the NAND flash memory chips #1 to #32 may have a multiplane configuration. For example, when each of the NAND flash memory chips #1 to #32 has a multiplane configuration including two planes, one super block is 64 superblocks corresponding to the NAND flash memory chips #1 to #32. It may contain a total of 64 physical blocks selected one by one from the planes.

図4には、32個の物理ブロック(ここでは、NAND型フラッシュメモリチップ#1内の物理ブロックBLK2、NAND型フラッシュメモリチップ#2内の物理ブロックBLK3、NAND型フラッシュメモリチップ#3内の物理ブロックBLK7、NAND型フラッシュメモリチップ#4内の物理ブロックBLK4、NAND型フラッシュメモリチップ#5内の物理ブロックBLK6、…、NAND型フラッシュメモリチップ#32内の物理ブロックBLK3)を含む一つのスーパーブロック(SB)が例示されている。 FIG. 4 shows 32 physical blocks (here, physical block BLK2 in NAND flash memory chip #1, physical block BLK3 in NAND flash memory chip #2, physical block BLK3 in NAND flash memory chip #3). One super block including block BLK7, physical block BLK4 in NAND flash memory chip #4, physical block BLK6 in NAND flash memory chip #5, . . . , physical block BLK3 in NAND flash memory chip #32. (SB) is exemplified.

書き込み先ブロックは一つの物理ブロックであってもよいし、一つのスーパーブロックであってもよい。なお、一つのスーパーブロックが一つの物理ブロックのみを含む構成が利用されてもよく、この場合には、一つのスーパーブロックは一つの物理ブロックと等価である。 The write destination block may be one physical block or one superblock. A configuration in which one superblock includes only one physical block may be used, in which case one superblock is equivalent to one physical block.

次に、図2のコントローラ4の構成について説明する。
コントローラ4は、ホストインタフェース11、CPU12、NANDインタフェース13、およびDRAMインタフェース14、直接メモリアクセスコントローラ(DMAC)15、ECCエンコード/デコード部16等を含む。これらホストインタフェース11、CPU12、NANDインタフェース13、DRAMインタフェース14、DMAC15、ECCエンコード/デコード部16は、バス10を介して相互接続される。
Next, the configuration of the controller 4 shown in FIG. 2 will be described.
The controller 4 includes a host interface 11, a CPU 12, a NAND interface 13, a DRAM interface 14, a direct memory access controller (DMAC) 15, an ECC encode/decode unit 16 and the like. These host interface 11 , CPU 12 , NAND interface 13 , DRAM interface 14 , DMAC 15 and ECC encoding/decoding unit 16 are interconnected via bus 10 .

このホストインタフェース11は、ホスト2との通信を実行するように構成されたホストインタフェース回路である。このホストインタフェース11は、例えば、PCIeコントローラ(NVMeコントローラ)であってもよい。あるいは、フラッシュストレージデバイス3がEthernet(登録商標)を介してホスト2に接続される構成においては、ホストインタフェース11は、NVMe over Fabrics(NVMeOF)コントローラであってもよい。 The host interface 11 is a host interface circuit configured to communicate with the host 2 . This host interface 11 may be, for example, a PCIe controller (NVMe controller). Alternatively, in configurations where the flash storage device 3 is connected to the host 2 via Ethernet (registered trademark), the host interface 11 may be an NVMe over Fabrics (NVMeOF) controller.

ホストインタフェース11は、ホスト2から様々なコマンドを受信する。これらコマンドには、ライトコマンド、リードコマンド、他の様々なコマンドが含まれる。
CPU12は、ホストインタフェース11、NANDインタフェース13、DRAMインタフェース14を制御するように構成されたプロセッサである。CPU12は、フラッシュストレージデバイス3の電源オンに応答してNAND型フラッシュメモリ5または図示しないROMから制御プログラム(ファームウェア)をDRAM6にロードし、そしてこのファームウェアを実行することによって様々な処理を行う。なお、ファームウェアはコントローラ4内の図示しないSRAM上にロードされてもよい。このCPU12は、ホスト2からの様々なコマンドを処理するためのコマンド処理等を実行することができる。CPU12の動作は、CPU12によって実行される上述のファームウェアによって制御される。なお、コマンド処理の一部または全部は、コントローラ4内の専用ハードウェアによって実行してもよい。
Host interface 11 receives various commands from host 2 . These commands include write commands, read commands, and various other commands.
The CPU 12 is a processor configured to control the host interface 11 , NAND interface 13 and DRAM interface 14 . The CPU 12 loads a control program (firmware) from the NAND flash memory 5 or a ROM (not shown) into the DRAM 6 in response to power-on of the flash storage device 3, and executes various processes by executing this firmware. Note that the firmware may be loaded onto an SRAM (not shown) within the controller 4 . This CPU 12 can execute command processing and the like for processing various commands from the host 2 . The operation of CPU 12 is controlled by the aforementioned firmware executed by CPU 12 . Part or all of the command processing may be executed by dedicated hardware within the controller 4 .

CPU12は、ライト制御部21およびリード制御部22として機能することができる。なお、これらライト制御部21およびリード制御部22の各々一部または全部も、コントローラ4内の専用ハードウェアによって実現されてもよい。
ライト制御部21は、NAND型フラッシュメモリ5の複数のブロックから割り当てられた複数の書き込み先ブロックを管理する。現代のNAND型フラッシュメモリの多くにおいては、プログラムディスターブを低減するための複雑な書き込み動作が実行される場合が多い。このため、現代のNAND型フラッシュメモリの多くにおいては、たとえブロック内のあるページにデータが書き込まれても、このページに書き込まれたデータは、その書き込み直後には正常に読み出すことができず、このページに後続する1以上のページへのデータ書き込みの完了後に、このページからのデータの読み出しが可能となるケースがある。
The CPU 12 can function as a write controller 21 and a read controller 22 . Part or all of the write control unit 21 and the read control unit 22 may also be implemented by dedicated hardware within the controller 4 .
The write control unit 21 manages multiple write destination blocks allocated from multiple blocks of the NAND flash memory 5 . Many modern NAND flash memories often perform complex write operations to reduce program disturb. Therefore, in many modern NAND flash memories, even if data is written to a certain page in a block, the data written to this page cannot be read normally immediately after the writing. After data has been written to one or more pages following this page, it may be possible to read data from this page.

また、現代のNAND型フラッシュメモリにおいては、同じライトデータをNAND型フラッシュメモリに複数回転送することを伴う複数段階の書き込み動作が適用されるケースもある。このような複数段階の書き込み動作の例の一つとしては、フォギー・ファイン書き込み動作が挙げられる。 In addition, in modern NAND flash memories, there are cases where a multi-step write operation is applied, which involves transferring the same write data to the NAND flash memory multiple times. One example of such a multi-step write operation is a foggy-fine write operation.

複数段階の書き込み動作は、少なくとも、フォギー書き込み動作のような第1段階の書き込み動作とファイン書き込み動作のような第2段階の書き込み動作とを含む。フォギー書き込み動作は各メモリセルの閾値分布を荒く設定する書き込み動作であり、ファイン書き込み動作は各メモリセルの閾値分布を調整する書き込み動作である。さらに、フォギー書き込み動作とファイン書き込み動作との間に、中間の書き込み動作が実行されてもよい。 A multi-phase write operation includes at least a first phase write operation, such as a foggy write operation, and a second phase write operation, such as a fine write operation. The foggy write operation is a write operation that roughly sets the threshold distribution of each memory cell, and the fine write operation is a write operation that adjusts the threshold distribution of each memory cell. Additionally, intermediate write operations may be performed between the foggy write operation and the fine write operation.

ライト制御部21は、フォギー・ファイン書き込み動作のように同じライトデータをNAND型フラッシュメモリ5に複数回転送することを伴う書き込み動作(複数段階の書き込み動作)によってこのライトデータを書き込み先ブロックに書き込んでもよいし、フル・シーケンス書き込み動作または他の様々な種類の書き込み動作のようにライトデータをNAND型フラッシュメモリ5に1回転送することを伴う書き込み動作によってこのライトデータを書き込み先ブロックに書き込んでもよい。 The write control unit 21 writes the write data to the write destination block by a write operation (multi-step write operation) that involves transferring the same write data to the NAND flash memory 5 multiple times, such as the foggy fine write operation. Alternatively, the write data may be written to the destination block by a write operation that involves transferring the write data to the NAND flash memory 5 once, such as a full sequence write operation or various other types of write operations. good.

ライト制御部21は、ライトコマンドそれぞれをホスト2から受信する。これら各ライトコマンドは、書き込むべきライトデータが存在するホスト2のメモリ上の位置と、ライトデータの長さと、ライトデータが書き込まれるべきブロックを示す識別子とを指定する。 The write control unit 21 receives each write command from the host 2 . Each of these write commands specifies the location on the memory of the host 2 where the write data to be written exists, the length of the write data, and an identifier indicating the block to which the write data is to be written.

ライトデータの長さは、個々のライトコマンド毎に異なる。例えば、あるライトコマンドは例えば1Mバイト程度の大きなサイズのライトデータの書き込みを要求するかもしれないし、他のライトコマンドは例えば4Kバイト程度の小さなサイズのライトデータの書き込みを要求するかもしれない。このため、もしフラッシュストレージデバイス3が個々のライトコマンドによって指定されたサイズのライトデータそのものをホスト2からフラッシュストレージデバイス3の内部バッファに単純に転送するという方法が使用されたならば、ある特定の書き込み先ブロックへ書き込むべき大きなサイズのライトデータによって内部バッファが長い時間専有されてしまい、他の各書き込み先ブロックへのデータ書き込み動作が実行できなくなる可能性がある。この結果、複数の書き込み先ブロックを同時に利用することが困難となる。 The length of write data differs for each individual write command. For example, one write command may request writing of large size write data, such as 1 Mbyte, while another write command may request writing of small size write data, such as 4K bytes. For this reason, if the flash storage device 3 were to simply transfer the write data of the size specified by each write command from the host 2 to the internal buffer of the flash storage device 3, a particular The internal buffer may be occupied for a long time by large write data to be written to the destination block, and data write operations to other destination blocks may not be performed. As a result, it becomes difficult to use multiple write destination blocks at the same time.

そこで、ライト制御部21は、個々のライトコマンドによって指定されたサイズとは関係なく、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位で、ホスト2からライトデータを取得する。NAND型フラッシュメモリ5のデータ書き込み単位とは、NAND型フラッシュメモリ5へのデータ書き込みのためのデータ転送サイズを意味する。NAND型フラッシュメモリ5のデータ書き込み単位の典型例は、ページサイズ(例えば16Kバイト)である。あるいは、複数ページに対応するデータサイズ(ページサイズの数倍のサイズ)がデータ書き込み単位として使用されてもよい。 Therefore, the write control unit 21 acquires write data from the host 2 in the same data size unit as the data write unit of the NAND flash memory 5 regardless of the size specified by each write command. A data write unit of the NAND flash memory 5 means a data transfer size for writing data to the NAND flash memory 5 . A typical example of the data write unit of the NAND flash memory 5 is the page size (eg, 16 Kbytes). Alternatively, a data size corresponding to multiple pages (several times the page size) may be used as the data write unit.

ある書き込み先ブロックを指定するライトコマンドに関連付けられたライトデータのサイズがNAND型フラッシュメモリ5のデータ書き込み単位よりも小さい場合には、ライト制御部21は、この書き込み先ブロックを指定する次のライトコマンドを待つ。この書き込み先ブロックを指定する幾つかのライトコマンドに関連付けられた幾つかのライトデータの総サイズがNAND型フラッシュメモリ5のデータ書き込み単位以上になると、ライト制御部21は、これらライトデータを結合することによって得られる、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズのデータを、ホスト2から取得する。例えば、同じ書き込み先ブロックを指定する4つのライトコマンドが4つの4Kバイトライトデータの書き込みをそれぞれ要求するケースにおいては、ライト制御部21は、これら4つの4Kバイトライトデータを互いに結合することによって得られる16Kバイトのライトデータをホスト2から取得してもよい。この場合、ライト制御部21は、4回のDMA転送によってこれら4つの4Kバイトライトデータをホスト2から順次取得してもよい。そして、ライト制御部21は、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有する、この取得したライトデータを、NAND型フラッシュメモリ5に転送し、このライトデータをNAND型フラッシュメモリ5のこの書き込み先ブロックに書き込む。 When the size of the write data associated with the write command specifying a certain write destination block is smaller than the data write unit of the NAND flash memory 5, the write control unit 21 executes the next write command specifying this write destination block. wait for command. When the total size of some write data associated with some write commands specifying this write destination block is greater than or equal to the data write unit of the NAND flash memory 5, the write control unit 21 combines these write data. Data of the same size as the data write unit of the NAND flash memory 5 obtained by the above is obtained from the host 2 . For example, in a case where four write commands specifying the same write destination block each request writing of four pieces of 4K-byte write data, the write control unit 21 combines these four pieces of 4K-byte write data to obtain 16 Kbytes of write data may be obtained from the host 2 . In this case, the write control unit 21 may sequentially acquire these four pieces of 4K-byte write data from the host 2 through four DMA transfers. Then, the write control unit 21 transfers the acquired write data having the same size as the data write unit of the NAND flash memory 5 to the NAND flash memory 5, and transfers this write data to the NAND flash memory 5. Write to the destination block.

一方、ある書き込み先ブロックを指定するライトコマンドに関連付けられたライトデータのサイズがNAND型フラッシュメモリ5のデータ書き込み単位よりも大きい場合には、ライト制御部21は、このライトデータを複数のライトデータ(複数のデータ部)に分割することによって得られる、データ書き込み単位と同じサイズを有する1つ以上のライトデータを得る。そして、ライト制御部21は、データ書き込み単位と同じサイズを有する、得られた一つのライトデータをホスト2から取得する。この場合、ライト制御部21は、1回のDMA転送によってこの得られたライトデータをホスト2から取得してもよい。そして、ライト制御部21は、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有する、この取得したライトデータを、NAND型フラッシュメモリ5に転送し、このライトデータをNAND型フラッシュメモリ5のこの書き込み先ブロックに書き込む。 On the other hand, when the size of the write data associated with the write command specifying a certain write destination block is larger than the data write unit of the NAND flash memory 5, the write control unit 21 divides this write data into a plurality of write data. One or more pieces of write data having the same size as the data write unit obtained by dividing into (a plurality of data portions) are obtained. Then, the write control unit 21 acquires from the host 2 the obtained write data having the same size as the data write unit. In this case, the write control unit 21 may acquire the write data obtained by one DMA transfer from the host 2 . Then, the write control unit 21 transfers the acquired write data having the same size as the data write unit of the NAND flash memory 5 to the NAND flash memory 5, and transfers this write data to the NAND flash memory 5. Write to the destination block.

このように、ライト制御部21は、同じ書き込み先ブロックを示す識別子を有する一つ以上のライトコマンドを受信した後、受信されたライトコマンド内の一つのライトコマンドに関連付けられたライトデータを複数のライトデータ(複数のデータ部)に分割、または受信されたライトコマンド内の2以上のライトコマンドにそれぞれ関連付けられたライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有するライトデータを、ホスト2から取得する。 In this way, after receiving one or more write commands having an identifier indicating the same write destination block, the write control unit 21 converts the write data associated with one write command in the received write commands into a plurality of write commands. A data write unit of the NAND flash memory 5 obtained by dividing the write data into write data (a plurality of data portions) or combining the write data respectively associated with two or more write commands in the received write command; Write data having the same size is obtained from the host 2 .

ここで、ライトデータの分割/結合とは、同じ書き込み先ブロックを示す識別子を有する一つ以上のライトコマンドの各々によってそれぞれ指定されるデータポインタおよび長さに基づいて、これら一つ以上のライトコマンドに関連付けられたライトデータの集合を、その先頭からNAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有する境界で区切り、各境界に対応するホストメモリ内の位置を特定する動作を意味する。 Here, dividing/combining write data means that one or more write commands having an identifier indicating the same write destination block are divided based on the data pointers and lengths respectively specified by these write commands. It means an operation of separating a set of write data associated with from the head by boundaries having the same size as the data write unit of the NAND flash memory 5, and specifying positions in the host memory corresponding to each boundary.

したがって、個々のライトコマンドによって指定されるライトデータのサイズとは関係なく、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位でホスト2からライトデータを取得できるので、この取得したライトデータをNAND型フラッシュメモリ5に即座に転送することができる。よって、たとえある書き込み先ブロックへの大きなサイズのライトデータの書き込みを要求するライトコマンドが受信されても、これによって他の書き込み先ブロックへのデータ書き込み動作が滞ることを防ぐことができる。 Therefore, regardless of the write data size specified by each write command, the write data can be obtained from the host 2 in the same data size unit as the data write unit of the NAND flash memory 5. can be transferred to the NAND flash memory 5 immediately. Therefore, even if a write command requesting writing of large-sized write data to a certain write destination block is received, it is possible to prevent delays in data write operations to other write destination blocks.

また、内部バッファがフラッシュストレージデバイス3内に存在しない、または内部バッファの容量がほぼゼロに近い、というバッファレスの構成をフラッシュストレージデバイス3に適用することが可能となる。
なお、複数の書き込み先ブロックが異なるNAND型フラッシュメモリチップにそれぞれ属している場合においては、ライトデータをNAND型フラッシュメモリ5に転送する動作は、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップにこのライトデータを転送することを意味する。
In addition, it is possible to apply a bufferless configuration to the flash storage device 3 in which no internal buffer exists in the flash storage device 3 or the capacity of the internal buffer is close to zero.
Note that when a plurality of write destination blocks belong to different NAND flash memory chips, the operation of transferring the write data to the NAND flash memory 5 is performed by transferring the write data to the NAND flash memory including the write destination block to which the write data is to be written. means to transfer this write data to the type flash memory chip.

また、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位でホスト2からライトデータを取得するという上述の処理は、個々の書き込み先ブロックに対する書き込み動作の進行に合わせて実行される。
つまり、ライト制御部21は、書き込み先ブロック毎に書き込み動作の進行を管理する。そして、ライト制御部21は、例えば、ある書き込み先ブロックの次の書き込み先ページへのデータ転送が可能となる度に、この書き込み先ブロック内の書き込み先ページの位置を進め、次の書き込み先ページに書き込むべきライトデータをホストメモリから取得し、この取得したライトデータを書き込み先ブロックに書き込む。
The above-described process of acquiring write data from the host 2 in units of the same data size as the data write unit of the NAND flash memory 5 is executed in accordance with the progress of the write operation for each write destination block.
That is, the write control unit 21 manages the progress of the write operation for each write destination block. Then, for example, each time data transfer to the next write destination page of a certain write destination block becomes possible, the write control unit 21 advances the position of the write destination page in this write destination block, and transfers the data to the next write destination page. The write data to be written to is acquired from the host memory, and the acquired write data is written to the write destination block.

さらに、ライト制御部21は、ある書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送する書き込み動作)の全てが終了した場合、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す。 Furthermore, the write control unit 21 performs a write operation (a write operation of transferring the same data to the NAND flash memory 5 once or multiple times) associated with one write command specifying a certain write destination block. When everything is completed, a response indicating command completion of this write command is returned to the host 2 .

例えば、一つのライトコマンドに関連付けられた大きなサイズのライトデータが、複数のライトデータ部に分割された場合には、これら複数のライトデータ部の全ての書き込みに必要な全てのデータ転送および全ての書き込み動作が終了した場合に、このライトコマンドのコマンド完了を示すレスポンスがホスト2に返される。この結果、コマンド完了をライトコマンドの単位でホスト2に正しく通知することができる。よって、一つのライトコマンドによって書き込みが要求された大きなサイズのライトデータが複数のライトデータ部に分割されて処理された場合であっても、ホスト2は、この一つのライトコマンドのコマンド完了を示す一つのレスポンスのみをフラッシュストレージデバイス3から正しく受け取ることができる。よって、ホスト2は、コマンド完了が通知されたライトコマンドに対応するライトデータをホストメモリから破棄するという単純な処理を行うだけでよい。 For example, when large-sized write data associated with one write command is divided into a plurality of write data portions, all data transfer and all data required for writing all of these plurality of write data portions When the write operation is completed, a response indicating command completion of this write command is returned to the host 2 . As a result, command completion can be correctly notified to the host 2 in units of write commands. Therefore, even if large-sized write data requested to be written by one write command is divided into a plurality of write data portions and processed, the host 2 indicates command completion of this one write command. Only one response can be correctly received from the flash storage device 3. Therefore, the host 2 only needs to perform a simple process of discarding from the host memory the write data corresponding to the write command for which command completion has been notified.

また、ライト制御部21は、ある書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送することを伴う書き込み動作)の全てが終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能になった場合に、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す。 The write control unit 21 also performs a write operation for all write data associated with one write command that specifies a certain write destination block (a write operation involving transferring the same data to the NAND flash memory 5 once or multiple times). operation) is completed and the entire write data can be read from the NAND flash memory 5, a response indicating command completion of this write command is returned to the host 2. FIG.

例えば、ある書き込み先ブロックのあるページに書き込まれたデータが、後続の1以上のページにデータが書き込まれた後に読み出し可能となるケースを想定する。この場合、ライト制御部21は、一つのライトコマンドに関連付けられた大きなサイズのライトデータを分割する事によって得られた複数のライトデータ部の全ての書き込みに必要な全てのデータ転送および全ての書き込み動作が終了した時点では、コマンド完了を示すレスポンスをホスト2に返さない。そして、後続の1以上のページにデータが書き込まれた後に、ライト制御部21は、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す。 For example, assume that data written to a page in a write destination block becomes readable after the data is written to one or more subsequent pages. In this case, the write control unit 21 performs all data transfers and all writes necessary for writing all of the plurality of write data portions obtained by dividing the large size write data associated with one write command. When the operation is finished, it does not return a command completion response to the host 2 . Then, after data is written to one or more succeeding pages, the write control unit 21 returns a response indicating command completion of this write command to the host 2 .

これにより、ホスト2は、コマンド完了が通知されたライトコマンドに対応するライトデータをホストメモリから破棄するという単純な処理を行うだけで、各ライトコマンドのライトデータが読み出し可能になるまでこのライトデータをホストメモリ内に維持することができる。 As a result, the host 2 performs a simple process of discarding the write data corresponding to the write command for which command completion has been notified from the host memory. can be maintained in host memory.

リード制御部22は、ホスト2からリードコマンドを受信し、この受信されたリードコマンドによって指定されたデータをNAND型フラッシュメモリ5または内部バッファ31から読み出す。
リードコマンドによって指定されたデータ(第1のデータ)が、書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送することを伴う書き込み動作)の全てが終了していないデータ、または書き込み動作の全てが終了しているがNAND型フラッシュメモリ5からまだ読み出し可能となっていないデータである場合、リード制御部22は、この第1のデータが内部バッファ31に存在するか否かを判定する。第1のデータが内部バッファ31に存在しない場合、リード制御部22は、この第1のデータをホストメモリから取得し、この取得した第1のデータを内部バッファ31に格納し、この取得した第1のデータを内部バッファ31からホスト2に返す。これにより、ホスト2は、リードしたいデータがNAND型フラッシュメモリ5から読み出し可能な状態であるか否かを管理するための複雑な処理を行うことなく、リードしたいデータを指定するリードコマンドをフラッシュストレージデバイス3に送出するという単純な処理を行うだけで、リードしたいデータをフラッシュストレージデバイス3から受け取ることができる。
The read control unit 22 receives a read command from the host 2 and reads data specified by the received read command from the NAND flash memory 5 or the internal buffer 31 .
The data (first data) specified by the read command is data for which all write operations (write operations involving transferring the same data to the NAND flash memory 5 once or multiple times) have not been completed, or If the data has not yet become readable from the NAND flash memory 5 even though all of the write operations have been completed, the read control unit 22 determines whether or not this first data exists in the internal buffer 31 . judge. If the first data does not exist in the internal buffer 31, the read control unit 22 acquires the first data from the host memory, stores the acquired first data in the internal buffer 31, and stores the acquired first data in the internal buffer 31. 1 data is returned from the internal buffer 31 to the host 2 . As a result, the host 2 can issue a read command designating the data to be read from the flash storage without performing complicated processing for managing whether the data to be read is in a readable state from the NAND flash memory 5. Data to be read can be received from the flash storage device 3 simply by performing a simple process of sending the data to the device 3 .

NANDインタフェース13は、CPU12の制御の下、NAND型フラッシュメモリ5を制御するように構成されたメモリ制御回路である。
DRAMインタフェース14は、CPU12の制御の下、DRAM6を制御するように構成されたDRAM制御回路である。DRAM6の記憶領域の一部は、内部バッファ(共有キャッシュ)31として利用されてもよい。この内部バッファ(共有キャッシュ)31は複数の書き込み先ブロックによって共有され、ホスト2から受信される任意のライトコマンドに関連付けられたライトデータを一時的に格納するために使用される。なお、上述したように、内部バッファ(共有キャッシュ)31がフラッシュストレージデバイス3内に存在しない、または内部バッファ(共有キャッシュ)31の容量がほぼゼロに近い、というバッファレス構成がフラッシュストレージデバイス3に適用されてもよい。
The NAND interface 13 is a memory control circuit configured to control the NAND flash memory 5 under control of the CPU 12 .
DRAM interface 14 is a DRAM control circuit configured to control DRAM 6 under the control of CPU 12 . A part of the storage area of the DRAM 6 may be used as an internal buffer (shared cache) 31 . This internal buffer (shared cache) 31 is shared by multiple write destination blocks and is used to temporarily store write data associated with any write command received from the host 2 . As described above, the flash storage device 3 has a bufferless configuration in which the internal buffer (shared cache) 31 does not exist in the flash storage device 3 or the capacity of the internal buffer (shared cache) 31 is almost zero. may be applied.

また、DRAM6の記憶領域の他の一部は、ブロック管理テーブル32、不良情報管理テーブル33の格納のために使用されてもよい。ブロック管理テーブル32は、NAND型フラッシュメモリ5内の複数のブロックそれぞれに対応する複数の管理テーブルを含む。各管理テーブルは、この管理テーブルに対応するブロックに含まれている複数のデータにそれぞれ対応する複数の有効/無効管理情報を含む。各有効/無効管理情報は、この有効/無効管理情報に対応するデータが有効データまたは無効データのいずれであるかを示す。不良情報管理テーブル33は、不良ブロックのリストを管理する。 Also, another part of the memory area of the DRAM 6 may be used for storing the block management table 32 and the defect information management table 33 . The block management table 32 includes multiple management tables corresponding to multiple blocks in the NAND flash memory 5 . Each management table includes a plurality of valid/invalid management information corresponding to a plurality of data included in blocks corresponding to this management table. Each valid/invalid management information indicates whether the data corresponding to this valid/invalid management information is valid data or invalid data. The defect information management table 33 manages a list of defect blocks.

これら内部バッファ(共有キャッシュ)31、ブロック管理テーブル32、不良情報管理テーブル33は、コントローラ4内の図示しないSRAMに格納されてもよい。
DMAC15は、CPU12の制御の下、ホストメモリと内部バッファ(共有キャッシュ)31との間のデータ転送を実行する。ホストメモリから内部バッファ(共有キャッシュ)31にライトデータを転送すべき場合には、CPU12は、ホストメモリ上の位置を示す転送元アドレス、データサイズ、内部バッファ(共有キャッシュ)31上の位置を示す転送先アドレスをDMAC15に対して指定する。
These internal buffer (shared cache) 31 , block management table 32 and defect information management table 33 may be stored in an SRAM (not shown) within the controller 4 .
DMAC 15 performs data transfers between host memory and internal buffers (shared cache) 31 under the control of CPU 12 . When write data is to be transferred from the host memory to the internal buffer (shared cache) 31, the CPU 12 indicates the transfer source address indicating the position on the host memory, the data size, and the position on the internal buffer (shared cache) 31. A transfer destination address is specified for the DMAC 15 .

ECCエンコード/デコード部16は、NAND型フラッシュメモリ5にデータをライトすべき時、データ(書き込むべきデータ)をエンコード(ECCエンコード)することによってこのデータにエラー訂正コード(ECC)を冗長コードとして付加する。NAND型フラッシュメモリ5からデータがリードされた時、ECCエンコード/デコード部16は、リードされたデータに付加されたECCを使用して、このデータのエラー訂正を行う(ECCデコード)。 When data is to be written to the NAND flash memory 5, the ECC encoder/decoder 16 encodes the data (data to be written) to add an error correction code (ECC) to the data as a redundant code. do. When data is read from the NAND flash memory 5, the ECC encoder/decoder 16 uses the ECC added to the read data to correct errors in the data (ECC decode).

図5は、ホスト2に含まれるライトデータバッファ51およびフラッシュトランスレーション部52とフラッシュストレージデバイス3に含まれるライト制御部21、DMAC15および内部バッファ(共有キャッシュ)31との関係を示す。
ホスト2は、ライトデータをホストメモリ上のライトデータバッファ51に格納し、そしてライトコマンドをフラッシュストレージデバイス3に発行する。このライトコマンドは、このライトデータが存在するライトデータバッファ51上の位置を示すデータポインタと、このライトデータを識別するタグ(例えばLBA)と、このライトデータの長さと、ライトデータが書き込まれるべきブロックを示す識別子(ブロックアドレス、またはストリームID)とを含んでいてもよい。
FIG. 5 shows the relationship between the write data buffer 51 and flash translation unit 52 included in the host 2 and the write control unit 21, DMAC 15 and internal buffer (shared cache) 31 included in the flash storage device 3. FIG.
The host 2 stores write data in the write data buffer 51 on the host memory and issues a write command to the flash storage device 3 . This write command consists of a data pointer indicating the position on the write data buffer 51 where this write data exists, a tag (for example, LBA) identifying this write data, the length of this write data, and the write data to be written. Identifiers (block addresses or stream IDs) indicating blocks may be included.

フラッシュストレージデバイス3においては、ライト制御部21の制御の下、このブロックの識別子によって指定される書き込み先ブロックの書き込み動作の進行に合わせて、ライトデータバッファ51から内部バッファ(共有キャッシュ)31へのデータ転送がDMAC15によって実行される。このデータ転送は、上述したように、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位で実行される。ライト制御部21の制御の下、書き込むべきライトデータが、内部バッファ(共有キャッシュ)31から、この書き込み先ブロックを含むNAND型フラッシュメモリチップに転送され、そして、ライト制御部21からこのNAND型フラッシュメモリチップに書き込み指示用のNANDコマンドが送出される。 In the flash storage device 3, under the control of the write control unit 21, data is transferred from the write data buffer 51 to the internal buffer (shared cache) 31 in accordance with the progress of the write operation of the write destination block specified by the block identifier. Data transfer is performed by DMAC 15 . This data transfer is executed in the same data size unit as the data write unit of the NAND flash memory 5, as described above. Under the control of the write control unit 21, the write data to be written is transferred from the internal buffer (shared cache) 31 to the NAND flash memory chip containing the write destination block, and the write control unit 21 transfers the write data to the NAND flash memory chip. A NAND command for a write instruction is sent to the memory chip.

フラッシュストレージデバイス3がタイプ#2-ストレージデバイスとして実現されている場合には、ライト制御部21は、ホスト2から受信されるブロック割り当て要求に応答して、フリーブロックの一つを書き込み先ブロックとしてホスト2に割り当てる処理も実行する。ブロック割り当て要求は、QoSドメインIDを含んでいてもよい。ライト制御部21は、このQoSドメインIDに属するフリーブロックの一つを書き込み先ブロックとして決定し、この書き込み先ブロックのブロックアドレスをホスト2に通知する。これにより、ホスト2は、このブロックアドレスと、データポインタと、タグ(例えばLBA)と、長さとを指定するライトコマンドを発行することができる。このライトデータがこの書き込み先ブロックに書き込まれた後、ライト制御部21は、このライトデータが書き込まれた書き込み先ブロックを示すブロックアドレスと、このライトデータが書き込まれたこの書き込み先ブロック内のページを示すページアドレスと、このライトデータのタグ(例えばLBA)とをホスト2に通知する。ホスト2のフラッシュトランスレーション部52は、タグ(例えばLBA)それぞれとNAND型フラッシュメモリ5の物理アドレス(ブロックアドレス、ページアドレス、等)それぞれとの間のマッピングを管理するアドレス変換テーブルであるLUT404Aを含む。ブロックアドレス、ページアドレス、およびタグ(例えばLBA)がフラッシュストレージデバイス3から通知された場合、フラッシュトランスレーション部52は、LUT404Aを更新し、通知されたタグ(例えばLBA)に、通知された物理アドレス(ブロックアドレス、ページアドレス)をマッピングする。フラッシュトランスレーション部52は、LUT404Aを参照することによって、リード要求に含まれるタグ(例えばLBA)を物理アドレス(ブロックアドレス、ページアドレス)に変換することができ、これによって物理アドレスを含むリードコマンドをフラッシュストレージデバイス3に発行することができる。 If the flash storage device 3 is implemented as a type #2-storage device, the write control unit 21 responds to a block allocation request received from the host 2 and selects one of the free blocks as the write destination block. It also executes processing for assigning to host 2 . A block allocation request may include a QoS domain ID. The write control unit 21 determines one of the free blocks belonging to this QoS domain ID as a write destination block, and notifies the host 2 of the block address of this write destination block. This allows the host 2 to issue a write command specifying this block address, data pointer, tag (for example, LBA), and length. After the write data is written to the write destination block, the write control unit 21 generates a block address indicating the write destination block to which the write data is written and the page in the write destination block to which the write data is written. and the tag (for example, LBA) of this write data to the host 2 . The flash translation unit 52 of the host 2 creates an LUT 404A, which is an address translation table for managing mapping between each tag (for example, LBA) and each physical address (block address, page address, etc.) of the NAND flash memory 5. include. When the block address, page address, and tag (for example, LBA) are notified from the flash storage device 3, the flash translation unit 52 updates the LUT 404A and assigns the notified tag (for example, LBA) to the notified physical address. Map (block address, page address). By referring to the LUT 404A, the flash translation unit 52 can translate the tag (for example, LBA) included in the read request into a physical address (block address, page address), thereby converting the read command including the physical address. It can be issued to the flash storage device 3.

図6は、フラッシュストレージデバイス3によって実行されるI/Oコマンド処理を示す。
上述したように、本実施形態では、フラッシュストレージデバイス3はタイプ#1-ストレージデバイス、タイプ#2-ストレージデバイス、タイプ#3-ストレージデバイスのいずれであってもよいが、図6では、フラッシュストレージデバイス3がタイプ#1-ストレージデバイスである場合を例示する。
FIG. 6 shows I/O command processing performed by the flash storage device 3 .
As described above, in this embodiment, the flash storage device 3 may be any of type #1-storage device, type #2-storage device, and type #3-storage device, but in FIG. An example is given where device 3 is a type #1-storage device.

ホスト2によって発行される各ライトコマンドは、ブロックアドレス、ページアドレス、データポインタ、長さを含む。発行された各ライトコマンドはI/Oコマンドキュー42に入れられる。ホスト2によって発行される各リードコマンドも、ブロックアドレス、ページアドレス、データポインタ、長さを含む。発行された各リードコマンドもI/Oコマンドキュー42に入れられる。 Each write command issued by the host 2 contains block address, page address, data pointer and length. Each issued write command is placed in the I/O command queue 42 . Each read command issued by the host 2 also contains a block address, page address, data pointer and length. Each issued read command is also entered into the I/O command queue 42 .

ホスト2がライトデータの書き込みをフラッシュストレージデバイス3に要求することを望む場合、ホスト2は、まず、このライトデータをホストメモリ上のライトデータバッファ51に格納し、そして、ライトコマンドをフラッシュストレージデバイス3に発行する。このライトコマンドは、このライトデータが書き込まれるべき書き込み先ブロックを示すブロックアドレスと、このライトデータが書き込まれるべきこの書き込み先ブロック内のページを示すページアドレスと、このライトデータが存在するライトデータバッファ51内の位置を示すデータポインタと、このライトデータの長さとを含む。 When the host 2 wishes to request the flash storage device 3 to write write data, the host 2 first stores this write data in the write data buffer 51 on the host memory, and then sends a write command to the flash storage device. 3 issued. This write command consists of a block address indicating a write destination block to which this write data is to be written, a page address indicating a page within this write destination block to which this write data is to be written, and a write data buffer where this write data resides. 51 and the length of this write data.

フラッシュストレージデバイス3は、プログラム/リードシーケンサ41を含む。このプログラム/リードシーケンサ41は、上述のライト制御部21およびリード制御部22によって実現される。プログラム/リードシーケンサ41は、I/Oコマンドキュー42に入れられたコマンドそれぞれを任意の順序で実行することができる。 Flash storage device 3 includes program/read sequencer 41 . The program/read sequencer 41 is realized by the write control section 21 and the read control section 22 described above. The program/read sequencer 41 can execute each command entered in the I/O command queue 42 in any order.

プログラム/リードシーケンサ41が、ある同じ書き込み先ブロックを指定する1以上のライトコマンドをI/Oコマンドキュー42から取得した後、プログラム/リードシーケンサ41は、この書き込み先ブロックの書き込み動作の進行に合わせて、この書き込み先ブロックに書き込むべき次のライトデータ(例えば、1ページサイズ分のライトデータ)を内部バッファ(共有キャッシュ)31またはライトデータバッファ51から取得するための転送要求を内部バッファ(共有キャッシュ)31に送出する。この転送要求は、データポインタと長さとを含んでいてもよい。この転送要求に含まれるデータポインタは、1つのライトコマンドに関連付けられたライトデータを分割、または同じ書き込み先ブロックを指定する2以上のライトコマンドに関連付けられた2以上のライトデータを結合する処理によって算出される。つまり、プログラム/リードシーケンサ41は、同じ書き込み先ブロックを示す識別子を有する一つ以上のライトコマンドに関連付けられたライトデータの集合を、その先頭からNAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有する境界で区切り、各境界に対応するホストメモリ内の位置を特定する。これによって、プログラム/リードシーケンサ41は、書き込み単位と同じサイズの単位でライトデータをホスト2から取得することができる。 After the program/read sequencer 41 acquires one or more write commands specifying the same write destination block from the I/O command queue 42, the program/read sequencer 41 executes the write operation in accordance with the progress of the write operation for this write destination block. Then, the internal buffer (shared cache) 31 or the write data buffer 51 sends a transfer request to acquire the next write data to be written to this write destination block (for example, write data of one page size) from the internal buffer (shared cache) 31 or the write data buffer 51 . ) 31. This transfer request may include a data pointer and length. The data pointer included in this transfer request is divided by the process of dividing write data associated with one write command or combining two or more write data associated with two or more write commands specifying the same write destination block. Calculated. In other words, the program/read sequencer 41 divides a set of write data associated with one or more write commands having identifiers indicating the same write destination block into the same size as the data write unit of the NAND flash memory 5 from the top. and identify the locations in host memory that correspond to each boundary. This allows the program/read sequencer 41 to acquire write data from the host 2 in units of the same size as the write unit.

この転送要求に含まれるデータポインタは、この1ページサイズ分のライトデータが存在するライトデータバッファ51上の位置を示す。この1ページサイズ分のライトデータは、この書き込み先ブロックを指定する複数のライトコマンドに関連付けられた複数の小さなサイズのライトデータの集合であってもよいし、この書き込み先ブロックを指定する一つのライトコマンドに関連付けられた大きなサイズのライトデータの一部分であってもよい。 The data pointer included in this transfer request indicates the position on the write data buffer 51 where the write data of this one page size exists. This one-page-size write data may be a set of a plurality of small size write data associated with a plurality of write commands specifying this write destination block, or a set of multiple small size write data specifying this write destination block. It may be part of a large size write data associated with the write command.

さらに、プログラム/リードシーケンサ41は、この1ページサイズ分のライトデータが書き込まれるべき書き込み先ブロックのブロックアドレスと、この1ページサイズ分のライトデータが書き込まれるべきページのページアドレスとを内部バッファ(共有キャッシュ)31に送出する。 Further, the program/read sequencer 41 stores the block address of the write destination block to which the write data of one page size is to be written and the page address of the page to which the write data of one page size is to be written into the internal buffer ( shared cache) 31.

フラッシュストレージデバイス3のコントローラ4は内部バッファ(共有キャッシュ)31を制御するキャッシュコントローラを含んでいてもよい。この場合、このキャッシュコントローラは内部バッファ(共有キャッシュ)31をあたかも制御ロジックであるかのように動作させることができる。内部バッファ(共有キャッシュ)31と複数の書き込み先ブロック#0、#1、#2、…、#nとの間には、複数のフラッシュコマンドキュー43が存在する。これらフラッシュコマンドキュー43は、複数のNAND型フラッシュメモリチップにそれぞれ対応づけられている。 Controller 4 of flash storage device 3 may include a cache controller that controls an internal buffer (shared cache) 31 . In this case, this cache controller can operate the internal buffer (shared cache) 31 as if it were control logic. A plurality of flush command queues 43 exist between the internal buffer (shared cache) 31 and the plurality of write destination blocks #0, #1, #2, . . . , #n. These flash command queues 43 are respectively associated with a plurality of NAND flash memory chips.

内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在するか否かを判定する。
この転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在するならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、この1ページサイズ分のライトデータを、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップに転送する。さらに、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップに、この書き込み先ブロックのブロックアドレス、このライトデータが書き込まれるべきページアドレス、書き込み指示用のNANDコマンド(フラッシュライトコマンド)を、フラッシュコマンドキュー43を介して送出する。フラッシュコマンドキュー43は、NAND型フラッシュメモリチップ毎に設けられている。このため、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、このライトデータが書き込まれるべき書き込み先ブロックを含むNAND型フラッシュメモリチップに対応するフラッシュコマンドキュー43に、この書き込み先ブロックのブロックアドレス、このライトデータが書き込まれるべきページアドレス、書き込み指示用のNANDコマンド(フラッシュライトコマンド)を入れる。
The internal buffer (shared cache) 31, that is, the cache controller, determines whether or not the write data of this one page size designated by the transfer request exists in the internal buffer (shared cache) 31 or not.
If this 1-page size write data specified by this transfer request exists in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller, transfers this 1-page size write data. to the NAND flash memory chip containing the write destination block to which this write data is to be written. Furthermore, the internal buffer (shared cache) 31, that is, the cache controller, stores the block address of this write destination block and the page to which this write data is to be written in the NAND flash memory chip containing the write destination block to which this write data is to be written. A NAND command (flash write command) for address and write instruction is sent via the flash command queue 43 . A flash command queue 43 is provided for each NAND flash memory chip. Therefore, the internal buffer (shared cache) 31, that is, the cache controller stores the block address of this write destination block, A page address to which this write data is to be written and a NAND command (flash write command) for instructing writing are entered.

なお、内部バッファ(共有キャッシュ)31からNAND型フラッシュメモリチップへのこの1ページサイズ分のライトデータの転送が、このライトデータをNAND型フラッシュメモリチップに書き込むために必要な最終回のデータ転送であるならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、このライトデータを内部バッファ(共有キャッシュ)31から破棄し、このライトデータが格納されていた領域を空き領域として確保する。NAND型フラッシュメモリチップにデータを一回転送することを伴う書き込み動作(例えば、フル・シーケンス書き込み動作、等)によってライトデータを書き込み先ブロックに書き込むケースにおいては、NAND型フラッシュメモリチップへの初回のデータ転送が最終回のデータ転送となる。一方、NAND型フラッシュメモリチップにデータを複数回転送することを伴う書き込み動作(例えば、フォギー・ファイン書き込み動作)によってライトデータを書き込み先ブロックに書き込むケースにおいては、最後のファイン書き込みのために必要なNAND型フラッシュメモリチップへのデータ転送が最終回のデータ転送となる。 The transfer of write data of one page size from the internal buffer (shared cache) 31 to the NAND flash memory chip is the final data transfer required to write the write data to the NAND flash memory chip. If so, the internal buffer (shared cache) 31, that is, the cache controller discards this write data from the internal buffer (shared cache) 31 and secures the area where this write data was stored as a free area. In the case where the write data is written to the write destination block by a write operation (e.g., a full sequence write operation, etc.) that involves transferring the data once to the NAND flash memory chip, the first time to the NAND flash memory chip Data transfer is the final data transfer. On the other hand, in the case of writing write data to a write destination block by a write operation (for example, a foggy fine write operation) that involves transferring data to a NAND flash memory chip multiple times, Data transfer to the NAND flash memory chip is the final data transfer.

次に、転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在しない場合について説明する。
この転送要求によって指定されたこの1ページサイズ分のライトデータが内部バッファ(共有キャッシュ)31に存在しないならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、この転送要求(データポインタ、長さ)をDMAC15に送出する。この転送要求(データポインタ、長さ)に基づいて、DMAC15は、この1ページサイズ分のライトデータをホストメモリ上のライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送する。このデータ転送が終了すると、DMAC15は、転送完了(Done)と、このデータポインタ、この長さとを、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラに通知する。
Next, a case where the write data of one page size designated by the transfer request does not exist in the internal buffer (shared cache) 31 will be described.
If this 1-page size write data specified by this transfer request does not exist in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller, receives this transfer request (data pointer, length ) is sent to the DMAC 15 . Based on this transfer request (data pointer, length), the DMAC 15 transfers this one page size write data from the write data buffer 51 on the host memory to the internal buffer (shared cache) 31 . When this data transfer is completed, the DMAC 15 notifies the internal buffer (shared cache) 31, that is, the cache controller, of transfer completion (Done), this data pointer, and this length.

内部バッファ(共有キャッシュ)31に空き領域が存在するならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、DMA転送によってライトデータバッファ51から取得されたライトデータを、この空き領域に格納する。
内部バッファ(共有キャッシュ)31に空き領域が存在しないならば、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、内部バッファ(共有キャッシュ)31内の最も古いライトデータを内部バッファ(共有キャッシュ)31から破棄し、最も古いライトデータが格納されていた領域を空き領域として確保する。そして、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、DMA転送によってライトデータバッファ51から取得されたライトデータを、この空き領域に格納する。
If there is an empty area in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller stores the write data acquired from the write data buffer 51 by DMA transfer in this empty area. .
If there is no free space in the internal buffer (shared cache) 31, the internal buffer (shared cache) 31, that is, the cache controller, transfers the oldest write data in the internal buffer (shared cache) 31 to the internal buffer (shared cache) 31. , and secures the area where the oldest write data was stored as a free area. Then, the internal buffer (shared cache) 31, that is, the cache controller stores the write data obtained from the write data buffer 51 by DMA transfer in this free area.

フォギー・ファイン書き込み動作のような多段階の書き込み動作が使用されるケースにおいては、キャッシュコントローラは、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータのうちで、最も古いライトデータを破棄する。 In the case where a multi-stage write operation such as a foggy fine write operation is used, the cache controller reserves the cache in the internal buffer (shared cache) 31 where the first stage write operation such as a foggy write operation has finished. out of the write data, the oldest write data is discarded.

データ書き込み量の少ない書き込み先ブロックへのデータ書き込み動作の進行速度に比べ、データ書き込み量の多い書き込み先ブロックへのデータ書き込み動作の進行速度は速くなる傾向がある。このため、データ書き込み量の多い書き込み先ブロックに書き込まれるべきライトデータは頻繁にライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送される。この結果、この最も古いライトデータは、ホスト2から書き込まれるデータ量が比較的少ない書き込み先ブロックへのライトデータである可能性が高い。したがって、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータのうちで最も古いライトデータを破棄するという方法を使用することにより、ホスト2とフラッシュストレージデバイス3との間のデータトラフィックを効率よく低減することが可能となる。 The progress speed of the data write operation to the write destination block to which the data write amount is large tends to be faster than the progress speed of the data write operation to the write destination block to which the data write amount is small. Therefore, write data to be written to a write destination block with a large amount of data written is frequently transferred from the write data buffer 51 to the internal buffer (shared cache) 31 . As a result, there is a high possibility that this oldest write data is write data to a write destination block in which the amount of data written from the host 2 is relatively small. Therefore, by using a method of discarding the oldest write data among the write data in the internal buffer (shared cache) 31 for which the first stage write operation such as the foggy write operation has been completed, the host 2 and the flash storage device 3 can be efficiently reduced.

なお、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータの中から破棄すべきライトデータを選択するためのアルゴリズムは、最も古いデータを選択するファースト・イン・ファースト・アウトに限定されず、LRU、ランダムのような他のアルゴリズムを使用してもよい。 Note that the algorithm for selecting write data to be discarded from the write data in the internal buffer (shared cache) 31 for which the first stage write operation such as the foggy write operation has been completed is to select the oldest data. The selection is not limited to first in first out, other algorithms such as LRU, random may be used.

プログラム/リードシーケンサ41は、各NAND型フラッシュメモリチップからステータス、つまり、書き込み完了(Done)、書き込み失敗(Error)、ブロックアドレス、ページアドレス、を受信する。そして、これらステータスに基づいて、プログラム/リードシーケンサ41は、ライトコマンド毎に、このライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリチップに同じデータを1回または複数回転送する書き込み動作)の全てが終了したか否かを判定する。あるライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了したならば、プログラム/リードシーケンサ41は、このライトコマンドのコマンド完了を示すレスポンス(Done)をホスト2に送信する。このコマンド完了を示すレスポンス(Done)は、このライトコマンドを一意に識別するコマンドIDを含む。 The program/read sequencer 41 receives status from each NAND flash memory chip, that is, write completion (Done), write failure (Error), block address, page address. Based on these statuses, for each write command, the program/read sequencer 41 writes the entire write data associated with the write command (transfers the same data to the NAND flash memory chip once or multiple times). write operation) is completed. When all write operations for the entire write data associated with a certain write command are completed, the program/read sequencer 41 transmits a command completion response (Done) of this write command to the host 2 . A response (Done) indicating the completion of this command includes a command ID that uniquely identifies this write command.

次に、リードコマンドの処理について説明する。
リードコマンドは、リードすべきデータが格納されているブロックを示すブロックアドレスと、このデータが格納されているページを示すページアドレスと、このデータが転送されるべきホストメモリ上のリードデータバッファ53内の位置を示すデータポインタと、このデータの長さとを含む。
Next, read command processing will be described.
A read command consists of a block address indicating a block in which data to be read is stored, a page address indicating a page in which this data is stored, and a read data buffer 53 on the host memory to which this data is to be transferred. and the length of this data.

プログラム/リードシーケンサ41は、リードコマンドによって指定されたブロックアドレスおよびページアドレスを内部バッファ(共有キャッシュ)31に送出し、リードコマンドによって指定されたデータの読み出しを内部バッファ(共有キャッシュ)31に要求する。 The program/read sequencer 41 sends the block address and page address specified by the read command to the internal buffer (shared cache) 31 and requests the internal buffer (shared cache) 31 to read the data specified by the read command. .

内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、NAND型フラッシュメモリチップに、このブロックアドレスと、このページアドレスと、リード指示用のNANDコマンド(フラッシュリードコマンド)を、フラッシュコマンドキュー43を介して送出する。NAND型フラッシュメモリチップから読み出されたデータは、DMAC15によってリードデータバッファ53に転送される。 The internal buffer (shared cache) 31 , that is, the cache controller, sends this block address, this page address, and a NAND command for read instruction (flash read command) to the NAND flash memory chip via the flash command queue 43 . Send out. Data read from the NAND flash memory chip is transferred to the read data buffer 53 by the DMAC 15 .

なお、リードコマンドによって指定されたデータが、書き込み動作が終了していないデータ、または書き込み動作の全てが終了しているがNAND型フラッシュメモリ5からまだ読み出し可能となっていないデータである場合、内部バッファ(共有キャッシュ)31、つまりキャッシュコントローラは、内部バッファ(共有キャッシュ)31にこのデータが存在するか否かを判定してもよい。内部バッファ(共有キャッシュ)31にこのデータが存在するならば、このデータが内部バッファ(共有キャッシュ)31から読み出され、そしてDMAC15によってリードデータバッファ53に転送される。 If the data specified by the read command is data for which the write operation has not been completed, or data for which all the write operations have been completed but is not yet readable from the NAND flash memory 5, the internal Buffer (shared cache) 31 , the cache controller, may determine if this data exists in internal buffer (shared cache) 31 . If this data exists in internal buffer (shared cache) 31 , this data is read from internal buffer (shared cache) 31 and transferred by DMAC 15 to read data buffer 53 .

一方、内部バッファ(共有キャッシュ)31にこのデータが存在しないならば、このデータは、まず、DMAC15によってライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送される。そして、このデータが内部バッファ(共有キャッシュ)31から読み出され、そしてDMAC15によってリードデータバッファ53に転送される。 On the other hand, if the data does not exist in the internal buffer (shared cache) 31 , the data is first transferred from the write data buffer 51 to the internal buffer (shared cache) 31 by the DMAC 15 . This data is then read from the internal buffer (shared cache) 31 and transferred to the read data buffer 53 by the DMAC 15 .

図7は、フラッシュストレージデバイス3によって実行される複数段階の書き込み動作を示す。
ここでは、4つのワード線を往復する場合のフォギー・ファイン書き込み動作を例示する。また、ここでは、NAND型フラッシュメモリ5が、メモリセル当たりに4ビットのデータを格納するQLC-フラッシュである場合を想定する。NAND型フラッシュメモリ5内の一つの特定の書き込み先ブロック(ここでは、書き込み先ブロックBLK#1)に対するフォギー・ファイン書き込み動作は以下のように実行される。
FIG. 7 shows a multi-stage write operation performed by flash storage device 3 .
Here, a foggy-fine write operation is exemplified in the case of round trips over four word lines. Also, here, it is assumed that the NAND flash memory 5 is a QLC-flash that stores 4-bit data per memory cell. A foggy fine write operation for one specific write destination block (here, write destination block BLK#1) in the NAND flash memory 5 is executed as follows.

(1)まず、4ページ(P0~P3)分のライトデータがページ単位でNAND型フラッシュメモリ5に転送され、この書き込み先ブロックBLK#1内のワード線WL0に接続された複数のメモリセルに、これら4ページ(P0~P3)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (1) First, four pages (P0 to P3) of write data are transferred page by page to the NAND flash memory 5, and transferred to a plurality of memory cells connected to the word line WL0 in the write destination block BLK#1. , a foggy write operation is performed to write write data for these four pages (P0 to P3).

(2)次いで、次の4ページ(P4~P7)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL1に接続された複数のメモリセルに、これら4ページ(P4~P7)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (2) Next, write data for the next four pages (P4 to P7) are transferred to the NAND flash memory 5 page by page, and a plurality of write data connected to the word line WL1 in the write destination block BLK#1 are transferred. A foggy write operation is performed to write the write data of these four pages (P4 to P7) to the memory cells.

(3)次いで、次の4ページ(P8~P11)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL2に接続された複数のメモリセルに、これら4ページ(P8~P11)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (3) Next, write data for the next four pages (P8 to P11) are transferred to the NAND flash memory 5 in units of pages, and the plurality of write data connected to the word line WL2 in the write destination block BLK#1 are transferred. A foggy write operation is performed to write the write data of these four pages (P8 to P11) to the memory cells.

(4)次いで、次の4ページ(P12~P15)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL3に接続された複数のメモリセルに、これら4ページ(P12~P15)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (4) Next, write data for the next four pages (P12 to P15) are transferred to the NAND flash memory 5 in units of pages, and the plurality of write data connected to the word line WL3 in the write destination block BLK#1 are transferred. A foggy write operation is performed to write the write data of these four pages (P12 to P15) to the memory cells.

(5)ワード線WL3に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、書き込み対象のワード線はワード線WL0に戻り、ワード線WL0に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。そして、ワード線WL0に対するフォギー書き込み動作で使用された4ページ(P0~P3)分のライトデータと同じ4ページ(P0~P3)分のライトデータがページ単位でNAND型フラッシュメモリ5に再び転送され、この書き込み先ブロックBLK#1内のワード線WL0に接続された複数のメモリセルに、これら4ページ(P0~P3)分のライトデータを書き込むためのファイン書き込み動作が実行される。これにより、ページP0~P3に対するフォギー・ファイン書き込み動作が終了する。 (5) When the foggy write operation to the memory cells connected to the word line WL3 is completed, the word line to be written returns to the word line WL0, and the fine write operation to the memory cells connected to the word line WL0 is started. execution becomes possible. Then, the write data of the same four pages (P0 to P3) as the write data of four pages (P0 to P3) used in the foggy write operation to the word line WL0 are transferred again to the NAND flash memory 5 in units of pages. , a fine write operation is performed to write write data for these four pages (P0 to P3) to a plurality of memory cells connected to the word line WL0 in the write destination block BLK#1. This completes the foggy fine write operation for pages P0-P3.

(6)次いで、次の4ページ(P16~P19)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL4に接続された複数のメモリセルに、これら4ページ(P16~P19)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (6) Next, write data for the next four pages (P16 to P19) are transferred to the NAND flash memory 5 in units of pages, and a plurality of write data connected to the word line WL4 in the write destination block BLK#1 are transferred. A foggy write operation is performed to write the write data of these four pages (P16 to P19) to the memory cells.

(7)ワード線WL4に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、書き込み対象のワード線はワード線WL1に戻り、ワード線WL1に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。そして、ワード線WL1に対するフォギー書き込み動作で使用された4ページ(P4~P7)分のライトデータと同じ4ページ(P4~P7)分のライトデータがページ単位でNAND型フラッシュメモリ5に再び転送され、この書き込み先ブロックBLK#1内のワード線WL1に接続された複数のメモリセルに、これら4ページ(P4~P7)分のライトデータを書き込むためのファイン書き込み動作が実行される。これにより、ページP4~P7に対するフォギー・ファイン書き込み動作が終了する。 (7) When the foggy write operation to the memory cells connected to the word line WL4 is completed, the word line to be written returns to the word line WL1, and the fine write operation to the memory cells connected to the word line WL1 is started. execution becomes possible. Then, the write data of the same four pages (P4 to P7) as the write data of four pages (P4 to P7) used in the foggy write operation to the word line WL1 are transferred again to the NAND flash memory 5 in units of pages. , a fine write operation is performed to write write data for these four pages (P4 to P7) to a plurality of memory cells connected to the word line WL1 in the write destination block BLK#1. This completes the foggy fine write operation for pages P4-P7.

(8)次いで、次の4ページ(P20~P23)分のライトデータがこのNAND型フラッシュメモリ5にページ単位で転送され、この書き込み先ブロックBLK#1内のワード線WL5に接続された複数のメモリセルに、これら4ページ(P20~P23)分のライトデータを書き込むためのフォギー書き込み動作が実行される。 (8) Next, the write data for the next four pages (P20 to P23) are transferred to the NAND flash memory 5 page by page, and the plurality of write data connected to the word line WL5 in the write destination block BLK#1 are transferred. A foggy write operation is performed to write the write data of these four pages (P20 to P23) to the memory cells.

(9)ワード線WL5に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、書き込み対象のワード線はワード線WL2に戻り、ワード線WL2に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。そして、ワード線WL2に対するフォギー書き込み動作で使用された4ページ(P8~P11)分のライトデータと同じ4ページ(P8~P11)分のライトデータがページ単位でNAND型フラッシュメモリ5に再び転送され、この書き込み先ブロックBLK#1内のワード線WL2に接続された複数のメモリセルに、これら4ページ(P8~P11)分のライトデータを書き込むためのファイン書き込み動作が実行される。これにより、ページP8~P11に対するフォギー・ファイン書き込み動作が終了する。 (9) When the foggy write operation to the memory cells connected to the word line WL5 is completed, the word line to be written returns to the word line WL2, and the fine write operation to the memory cells connected to the word line WL2 is started. execution becomes possible. Then, the write data of the same four pages (P8 to P11) as the write data of four pages (P8 to P11) used in the foggy write operation to the word line WL2 are transferred again to the NAND flash memory 5 in units of pages. , a fine write operation is performed to write write data for these four pages (P8 to P11) to a plurality of memory cells connected to the word line WL2 in the write destination block BLK#1. This completes the foggy fine write operation for pages P8-P11.

図8は、書き込み先ブロックBLK#1へのデータの書き込み順序を示す。
ここでは、図7と同様に、4つのワード線を往復する場合のフォギー・ファイン書き込み動作が実行される場合を想定する。
図8の左部に示されるデータd0、データd1、データd2、データd3、データd4、データd5、データd6、データd7、…、データd252、データd253、データd254、データd255は、書き込み先ブロックBLK#1を指定する複数のライトコマンドそれぞれに対応する複数のライトデータを示している。ここでは、図示の簡単化のために、全てのライトデータが同じサイズを有している場合が想定されている。
FIG. 8 shows the order of writing data to the write destination block BLK#1.
Here, as in FIG. 7, it is assumed that a foggy fine write operation is performed in which four word lines are reciprocated.
Data d0, data d1, data d2, data d3, data d4, data d5, data d6, data d7, . A plurality of write data corresponding to each of a plurality of write commands specifying BLK#1 are shown. Here, for the sake of simplification of illustration, it is assumed that all write data have the same size.

図8の右部は、書き込み先ブロックBLK#1へのデータの書き込み順序を示している。書き込み動作は、ワード線WL0に接続された複数のメモリセルへのデータd0の書き込み(フォギー書き込み)、ワード線WL1に接続された複数のメモリセルへのデータd1の書き込み(フォギー書き込み)、ワード線WL2に接続された複数のメモリセルへのデータd2の書き込み(フォギー書き込み)、ワード線WL3に接続された複数のメモリセルへのデータd3の書き込み(フォギー書き込み)、ワード線WL0に接続された複数のメモリセルへのデータd0の書き込み(ファイン書き込み)、ワード線WL4に接続された複数のメモリセルへのデータd4の書き込み(フォギー書き込み)、ワード線WL1に接続された複数のメモリセルへのデータd1の書き込み(ファイン書き込み)、ワード線WL5に接続された複数のメモリセルへのデータd5の書き込み(フォギー書き込み)、ワード線WL2に接続された複数のメモリセルへのデータd2の書き込み(ファイン書き込み)、…という順序で実行される。 The right part of FIG. 8 shows the order of writing data to the write destination block BLK#1. The write operation includes writing data d0 to multiple memory cells connected to word line WL0 (foggy write), writing data d1 to multiple memory cells connected to word line WL1 (foggy write), and writing data d1 to multiple memory cells connected to word line WL1 (foggy write). Writing data d2 to a plurality of memory cells connected to WL2 (foggy writing), writing data d3 to a plurality of memory cells connected to word line WL3 (foggy writing), and writing data d3 to a plurality of memory cells connected to word line WL3 (foggy writing). (fine write), data d4 is written to a plurality of memory cells connected to word line WL4 (foggy write), and data to a plurality of memory cells connected to word line WL1 are written. d1 is written (fine write), data d5 is written to a plurality of memory cells connected to word line WL5 (foggy write), data d2 is written to a plurality of memory cells connected to word line WL2 (fine write). ), and so on.

図9は、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズの単位でライトデータをホスト2からフラッシュストレージデバイス3に転送する動作を示す。
図9の左部に示されるデータd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10、…は、書き込み先ブロックBLK#1を指定する10個のライトコマンドにそれぞれ対応する10個のライトデータを示している。ライトデータの長さ(サイズ)は、個々のライトコマンド毎に異なる。図9では、データd1、データd2、データd3、データd4の各々が4Kバイトのサイズを有し、データd5が8Kバイトのサイズを有し、データd6が40Kバイトのサイズを有し、データd7が16Kバイトのサイズを有し、データd8、データd9の各々が8Kバイトのサイズを有し、データd10が1Mバイトのサイズを有する場合が想定されている。
FIG. 9 shows the operation of transferring write data from the host 2 to the flash storage device 3 in units of the same size as the data write unit of the NAND flash memory 5 .
Data d1, data d2, data d3, data d4, data d5, data d6, data d7, data d8, data d9, data d10, . 10 write data corresponding to 10 write commands are shown. The length (size) of write data differs for each individual write command. In FIG. 9, each of data d1, data d2, data d3, and data d4 has a size of 4K bytes, data d5 has a size of 8K bytes, data d6 has a size of 40K bytes, and data d7 has a size of 40K bytes. has a size of 16K bytes, each of data d8 and data d9 has a size of 8K bytes, and data d10 has a size of 1M bytes.

ホスト2から受信される各ライトコマンドはデータポインタ、長さ、ブロック識別子(例えばブロックアドレス)を含むので、フラッシュストレージデバイス3のコントローラ4は、ホスト2から受信されるライトコマンドを、複数の書き込み先ブロックにそれぞれ対応する複数のグループに分類することができる。上述のデータd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10、…は、書き込み先ブロックBLK#1に対応するグループに分類された10個のライトコマンドにそれぞれ対応している。これら10個のライトコマンドは、書き込み先ブロックBLK#1を示すブロック識別子(例えばブロックアドレス)を含むライトコマンドである。 Since each write command received from the host 2 includes a data pointer, length, and block identifier (e.g., block address), the controller 4 of the flash storage device 3 distributes the write commands received from the host 2 to multiple write destinations. It can be classified into multiple groups, each corresponding to a block. The data d1, data d2, data d3, data d4, data d5, data d6, data d7, data d8, data d9, data d10, . corresponding to each write command. These 10 write commands are write commands including a block identifier (for example, block address) indicating the write destination block BLK#1.

フラッシュストレージデバイス3のコントローラ4は、書き込み先ブロックBLK#1を指定するこれらライトコマンド内のデータポインタおよび長さに基づいて、データd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10がそれぞれ存在するライトデータバッファ51上の位置、およびデータd1、データd2、データd3、データd4、データd5、データd6、データd7、データd8、データd9、データd10それぞれの長さを管理する。そして、コントローラ4は、一つのライトコマンドに関連付けられた大きなサイズのライトデータを複数のライトデータ(複数のデータ部)に分割、または2以上のライトコマンドにそれぞれ関連付けられた小さなサイズの2以上のライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有するライトデータを、ホスト2から取得する。 The controller 4 of the flash storage device 3 writes data d1, data d2, data d3, data d4, data d5, data d6, data d1, data d2, data d3, data d4, data d5, data d6, Positions of data d7, data d8, data d9, and data d10 on write data buffer 51, and data d1, data d2, data d3, data d4, data d5, data d6, data d7, data d8, and data d9 , data d10. Then, the controller 4 divides the large size write data associated with one write command into a plurality of write data (a plurality of data portions), or divides the write data into a plurality of small size write data (a plurality of data portions), or divides the write data into two or more small size write data associated with two or more write commands. Write data having the same size as the data write unit of the NAND flash memory 5 obtained by combining the write data is obtained from the host 2 .

図9では、コントローラ4は、最初に、各々が4Kバイトのサイズを有するデータd1、データd2、データd3、データd4を互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、4回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。最初のDMA転送では、データd1の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd1の先頭位置を指定する転送元アドレスは、データd1に対応するライトコマンド内のデータポインタによって表される。2回目のDMA転送では、データd2の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd2の先頭位置を指定する転送元アドレスは、データd2に対応するライトコマンド内のデータポインタによって表される。3回目のDMA転送では、データd3の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd3の先頭位置を指定する転送元アドレスは、データd3に対応するライトコマンド内のデータポインタによって表される。4回目のDMA転送では、データd4の先頭位置を指定する転送元アドレスと、データ長=4KBがDMAC15にセットされてもよい。データd4の先頭位置を指定する転送元アドレスは、データd4に対応するライトコマンド内のデータポインタによって表される。 In FIG. 9, controller 4 first stores 16 Kbytes of write data obtained by combining data d1, data d2, data d3, and data d4, each having a size of 4 Kbytes, into write data buffer 51 of host 2. In FIG. Get from In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by, for example, four DMA transfers, although not limited to this. In the first DMA transfer, a transfer source address designating the head position of data d1 and a data length of 4 KB may be set in DMAC15. A transfer source address specifying the head position of data d1 is represented by a data pointer in the write command corresponding to data d1. In the second DMA transfer, a transfer source address designating the head position of data d2 and a data length of 4 KB may be set in the DMAC 15 . A transfer source address specifying the head position of data d2 is represented by a data pointer in the write command corresponding to data d2. In the third DMA transfer, the transfer source address designating the head position of data d3 and the data length=4 KB may be set in the DMAC15. A transfer source address specifying the head position of data d3 is represented by a data pointer in the write command corresponding to data d3. In the fourth DMA transfer, the transfer source address specifying the head position of data d4 and the data length=4 KB may be set in the DMAC15. A transfer source address specifying the head position of data d4 is represented by a data pointer in the write command corresponding to data d4.

そして、コントローラ4は、DMA転送によって取得されるこの16Kバイトライトデータ(d1、d2、d3、d4)を、書き込み先ブロックBLK#1のページP0に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP1に変更し、8Kバイトのサイズを有するデータd3と、データd6内の先頭の8Kバイトデータd6-1とを互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、2回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。最初のDMA転送では、データd5の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd5の先頭位置を指定する転送元アドレスは、データd5に対応するライトコマンド内のデータポインタによって表される。2回目のDMA転送では、データd6-1の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd6-1の先頭位置を指定する転送元アドレスは、データd6に対応するライトコマンド内のデータポインタによって表される。
Then, the controller 4 transfers the 16-Kbyte write data (d1, d2, d3, d4) obtained by DMA transfer to the NAND flash memory 5 as data to be written to page P0 of write destination block BLK#1. do.
The controller 4 changes the next write destination page of the write destination block BLK#1 to the page P1, and combines the data d3 having a size of 8 Kbytes and the leading 8 Kbyte data d6-1 in the data d6 with each other. The 16-Kbyte write data thus obtained is acquired from the write data buffer 51 of the host 2 . In this case, the controller 4 may transfer this 16-Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by, for example, two DMA transfers, although not limited to this. In the first DMA transfer, a transfer source address designating the head position of data d5 and a data length of 8 KB may be set in DMAC15. A transfer source address specifying the head position of data d5 is represented by a data pointer in the write command corresponding to data d5. In the second DMA transfer, a transfer source address designating the start position of data d6-1 and a data length of 8 KB may be set in DMAC15. A transfer source address specifying the head position of data d6-1 is represented by a data pointer in the write command corresponding to data d6.

そして、コントローラ4は、この16Kバイトライトデータ(d5、d6-1)を、書き込み先ブロックBLK#1のページP1に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP2に変更し、データd6の残りの32Kバイトデータのうちの最初の16Kバイトデータd6-2をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd6-2の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd6-2の先頭位置を指定する転送元アドレスは、データd6に対応するライトコマンド内のデータポインタの値に8KB分のオフセットを加算することによって求めることができる。
The controller 4 then transfers this 16-Kbyte write data (d5, d6-1) to the NAND flash memory 5 as data to be written to page P1 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to the page P2, and transfers the first 16 Kbyte data d6-2 of the remaining 32 Kbyte data of the data d6 to the write data buffer 51 of the host 2. Get from In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although not limited to this. In this DMA transfer, a transfer source address designating the head position of data d6-2 and a data length of 16 KB may be set in DMAC15. The transfer source address specifying the head position of data d6-2 can be obtained by adding an 8 KB offset to the value of the data pointer in the write command corresponding to data d6.

そして、コントローラ4は、この16Kバイトライトデータ(d6-2)を、書き込み先ブロックBLK#1のページP2に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP3に変更し、データd6の残りの16Kバイトデータd6-3をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd6-3の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd6-3の先頭位置を指定する転送元アドレスは、データd6に対応するライトコマンド内のデータポインタの値に24KB分のオフセットを加算することによって求めることができる。
The controller 4 then transfers this 16-Kbyte write data (d6-2) to the NAND flash memory 5 as data to be written to page P2 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to the page P3, and acquires the remaining 16 Kbyte data d6-3 of the data d6 from the write data buffer 51 of the host 2. FIG. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although not limited to this. In this DMA transfer, a transfer source address designating the head position of data d6-3 and a data length of 16 KB may be set in DMAC15. The transfer source address specifying the head position of data d6-3 can be obtained by adding an offset of 24 KB to the value of the data pointer in the write command corresponding to data d6.

そして、コントローラ4は、この16Kバイトライトデータ(d6-3)を、書き込み先ブロックBLK#1のページP3に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
そして、コントローラ4は、フォギー書き込み動作によって4ページ分のデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。
The controller 4 then transfers this 16-Kbyte write data (d6-3) to the NAND flash memory 5 as data to be written to page P3 of write destination block BLK#1.
Then, the controller 4 writes four pages of data (P0 to P3) to a plurality of memory cells connected to the word line WL0 of the write destination block BLK#1 by the foggy write operation.

コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP4に変更し、16Kバイトのサイズを有するデータd7をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd7の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データ7の先頭位置を指定する転送元アドレスは、データd7に対応するライトコマンド内のデータポインタによって表される。 The controller 4 changes the next write destination page of the write destination block BLK# 1 to page P 4 and acquires data d 7 having a size of 16 Kbytes from the write data buffer 51 of the host 2 . In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although not limited to this. In this DMA transfer, a transfer source address specifying the head position of data d7 and a data length of 16 KB may be set in DMAC15. A transfer source address specifying the head position of data 7 is represented by a data pointer in the write command corresponding to data d7.

そして、コントローラ4は、この16Kバイトライトデータ(d7)を、書き込み先ブロックBLK#1のページP4に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP5に変更し、8Kバイトのサイズを有するデータd8と、8Kバイトのサイズを有するデータd9とを互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、2回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。最初のDMA転送では、データd8の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd8の先頭位置を指定する転送元アドレスは、データd8に対応するライトコマンド内のデータポインタによって表される。2回目のDMA転送では、データd9の先頭位置を指定する転送元アドレスと、データ長=8KBがDMAC15にセットされてもよい。データd9の先頭位置を指定する転送元アドレスは、データd9に対応するライトコマンド内のデータポインタによって表される。
The controller 4 then transfers this 16-Kbyte write data (d7) to the NAND flash memory 5 as data to be written to page P4 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to page P5, and is obtained by combining data d8 having a size of 8 Kbytes and data d9 having a size of 8 Kbytes with each other. 16 Kbyte write data is obtained from the write data buffer 51 of the host 2 . In this case, the controller 4 may transfer this 16-Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by, for example, two DMA transfers, although not limited to this. In the first DMA transfer, a transfer source address specifying the head position of data d8 and data length=8 KB may be set in DMAC15. A transfer source address specifying the head position of data d8 is represented by a data pointer in the write command corresponding to data d8. In the second DMA transfer, a transfer source address designating the start position of data d9 and a data length of 8 KB may be set in DMAC15. A transfer source address specifying the head position of data d9 is represented by a data pointer in the write command corresponding to data d9.

そして、コントローラ4は、この16Kバイトライトデータ(d8、d9)を、書き込み先ブロックBLK#1のページP5に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP6に変更し、データd10内の先頭の16Kバイトデータd10-1をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd10-1の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd10-1の先頭位置を指定する転送元アドレスは、データd10に対応するライトコマンド内のデータポインタによって表される。
The controller 4 then transfers the 16-Kbyte write data (d8, d9) to the NAND flash memory 5 as data to be written to page P5 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to the page P6, and acquires the first 16 Kbyte data d10-1 in the data d10 from the write data buffer 51 of the host 2. FIG. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although not limited to this. In this DMA transfer, a transfer source address designating the head position of data d10-1 and a data length of 16 KB may be set in DMAC15. A transfer source address specifying the head position of data d10-1 is represented by a data pointer in the write command corresponding to data d10.

そして、コントローラ4は、この16Kバイトライトデータ(d10-1)を、書き込み先ブロックBLK#1のページP6に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP7に変更し、データd10内の次の16Kバイトデータd10-2をホスト2のライトデータバッファ51から取得する。この場合、コントローラ4は、これに限定されないが、例えば、1回のDMA転送によって、この16Kバイトライトデータをホスト2のライトデータバッファ51から内部バッファ31に転送してもよい。このDMA転送では、データd10-2の先頭位置を指定する転送元アドレスと、データ長=16KBがDMAC15にセットされてもよい。データd10-2の先頭位置を指定する転送元アドレスは、データd10に対応するライトコマンド内のデータポインタの値に16KB分のオフセットを加算することによって求めることができる。
The controller 4 then transfers this 16-Kbyte write data (d10-1) to the NAND flash memory 5 as data to be written to page P6 of write destination block BLK#1.
The controller 4 changes the next write destination page of the write destination block BLK#1 to the page P7, and acquires the next 16-Kbyte data d10-2 in the data d10 from the write data buffer 51 of the host 2. FIG. In this case, the controller 4 may transfer the 16 Kbyte write data from the write data buffer 51 of the host 2 to the internal buffer 31 by one DMA transfer, for example, although not limited to this. In this DMA transfer, a transfer source address designating the head position of data d10-2 and a data length of 16 KB may be set in DMAC15. The transfer source address specifying the head position of data d10-2 can be obtained by adding an offset of 16 KB to the value of the data pointer in the write command corresponding to data d10.

そして、コントローラ4は、この16Kバイトライトデータ(d10-2)を、書き込み先ブロックBLK#1のページP7に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。
そして、コントローラ4は、フォギー書き込み動作によって4ページ分のデータ(P4~P7)を書き込み先ブロックBLK#1のワード線WL1に接続された複数のメモリセルに書き込む。
The controller 4 then transfers this 16-Kbyte write data (d10-2) to the NAND flash memory 5 as data to be written to page P7 of write destination block BLK#1.
Then, the controller 4 writes four pages worth of data (P4 to P7) to a plurality of memory cells connected to the word line WL1 of the write destination block BLK#1 by the foggy write operation.

このように、コントローラ4は、書き込み先ブロックBLK#1の書き込み動作の進行に合わせて、書き込み先ブロックBLK#1の書き込み先ページに転送すべき16Kバイトデータをホスト2から取得する。
そして、ワード線WL3に接続された複数のメモリセルに対するフォギー書き込み動作が終了すると、ワード線WL0に接続された複数のメモリセルに対するファイン書き込み動作の実行が可能となる。コントローラ4は、書き込み先ブロックBLK#1の次の書き込み先ページをページP1に変更し、上述と同様の手順で、ライトデータ(P0~P3)をページ単位でNAND型フラッシュメモリ5に再び転送し、そしてファイン書き込み動作によってこれら4ページ分のライトデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。
In this way, the controller 4 acquires from the host 2 the 16-Kbyte data to be transferred to the write destination page of the write destination block BLK#1 in accordance with the progress of the write operation of the write destination block BLK#1.
When the foggy write operation for the plurality of memory cells connected to the word line WL3 is completed, the fine write operation for the plurality of memory cells connected to the word line WL0 can be executed. The controller 4 changes the next write destination page of the write destination block BLK#1 to the page P1, and transfers the write data (P0 to P3) to the NAND flash memory 5 page by page again in the same procedure as described above. Then, these four pages of write data (P0 to P3) are written to a plurality of memory cells connected to the word line WL0 of the write destination block BLK#1 by the fine write operation.

これにより、最初の6つのライトコマンド、つまりデータd1に対応するライトコマンド、データd2に対応するライトコマンド、データd3に対応するライトコマンド、データd4に対応するライトコマンド、データd5に対応するライトコマンド、データd6に対応するライトコマンドの各々に関しては、各ライトコマンドに関連付けせけたライトデータ全体に対するフォギー・ファイン書き込み動作の全てが終了し、且つデータd1~d6の各々はNAND型フラッシュメモリ5から読み出し可能となる。このため、コントローラ4は、最初の6つのライトコマンドにそれぞれに対応する6つのコマンド完了レスポンスをホスト2に返す。 As a result, the first six write commands, that is, a write command corresponding to data d1, a write command corresponding to data d2, a write command corresponding to data d3, a write command corresponding to data d4, and a write command corresponding to data d5 , for each of the write commands corresponding to the data d6, all of the foggy fine write operations for the entire write data associated with each write command are completed, and each of the data d1 to d6 is read from the NAND flash memory 5. It becomes possible. Therefore, the controller 4 returns to the host 2 six command completion responses respectively corresponding to the first six write commands.

なお、図9では、書き込み先ブロックBLK#1を指定するライトコマンドそれぞれに関連づけられたライトデータを、書き込み先ブロックBLK#1の書き込み動作の進行に合わせて16Kバイトの単位でホスト2からフラッシュストレージデバイス3に転送する動作を説明したが、他の各書き込み先ブロックBLK#に関しても、図9で説明した動作と同様の動作が実行される。 Note that in FIG. 9, the write data associated with each write command specifying the write destination block BLK#1 is transferred from the host 2 to the flash storage in units of 16 Kbytes in accordance with the progress of the write operation of the write destination block BLK#1. Although the operation of transferring data to device 3 has been described, the same operation as the operation described with reference to FIG. 9 is performed for other write destination blocks BLK#.

図10のフローチャートは、フラッシュストレージデバイス3によって実行されるデータ書き込み処理の手順を示す。
フラッシュストレージデバイス3のコントローラ4は、データポインタ、長さ、ブロック識別子(例えばブロックアドレス)を各々が含むライトコマンドそれぞれをホスト2から受信する(ステップS11)。
The flowchart of FIG. 10 shows the procedure of data write processing executed by the flash storage device 3 .
The controller 4 of the flash storage device 3 receives from the host 2 each write command each including a data pointer, length and block identifier (eg block address) (step S11).

次いで、コントローラ4は、特定の書き込み先ブロックを指定する一つのライトコマンドに対応する大きなサイズのライトデータを2以上のデータ部に分割、またはこの特定の書き込み先ブロックを指定する2以上のライトコマンドに対応する2以上のライトデータを結合し、これによってNAND型フラッシュメモリ5の書き込み単位(データ転送サイズ)と同じサイズの単位でデータをホスト2からフラッシュストレージデバイス3に転送する(ステップS12)。ステップS12では、図9で説明したように、例えば、小さなサイズを有する幾つかのライトデータ部を互いに結合することによって得られる一つの16Kバイトデータ、あるいは大きなサイズを有するライトデータを分割することによって得られる幾つかの16Kバイトデータの一つが、ホスト2からフラッシュストレージデバイス3に転送される。フラッシュストレージデバイス3が内部バッファ31を含む構成であるケースにおいては、ホスト2からフラッシュストレージデバイス3に転送される各16バイトライトデータは内部バッファ31に格納される。また、ステップS12では、小さなサイズを有する幾つかのライトデータ部を互いに結合するために、コントローラ4は、ある書き込み先ブロックを指定する識別子を有する先行するライトコマンドに関連付けられたライトデータのサイズが書き込み単位(例えば16Kバイト)よりも小さい場合、この書き込み先ブロックを指定する識別子を有する後続のライトコマンドの受信を待つ。 Next, the controller 4 divides the large-sized write data corresponding to one write command designating a specific write destination block into two or more data portions, or divides the write data into two or more data portions, or writes two or more write commands designating this specific write destination block. , and the data is transferred from the host 2 to the flash storage device 3 in units of the same size as the write unit (data transfer size) of the NAND flash memory 5 (step S12). In step S12, as described with reference to FIG. 9, for example, one 16 Kbyte data obtained by combining several small-sized write data parts with each other, or by dividing the large-sized write data One of the several 16K bytes of data obtained is transferred from the host 2 to the flash storage device 3 . In the case where the flash storage device 3 is configured to include an internal buffer 31 , each 16-byte write data transferred from the host 2 to the flash storage device 3 is stored in the internal buffer 31 . Also, in step S12, in order to join together several write data portions having small sizes, the controller 4 determines that the size of the write data associated with the preceding write command having an identifier designating a certain write destination block is If it is smaller than the write unit (eg, 16K bytes), wait for receipt of a subsequent write command with an identifier that specifies this destination block.

コントローラ4は、ホスト2から転送された16KバイトデータをNAND型フラッシュメモリ5に転送し、この16Kバイトデータを、この特定の書き込み先ブロックに書き込む(ステップS13)。
そして、コントローラ4は、この特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送することを伴う書き込み動作)の全てが終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能になったか否かを判定する(ステップS14)。
The controller 4 transfers the 16K-byte data transferred from the host 2 to the NAND flash memory 5, and writes the 16K-byte data to this specific write destination block (step S13).
Then, the controller 4 performs a write operation (a write operation involving transferring the same data to the NAND flash memory 5 once or multiple times) for the entire write data associated with one write command specifying this specific write destination block. operation) has been completed and the entire write data can be read from the NAND flash memory 5 (step S14).

この特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作の全てが終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能になったならば、コントローラ4は、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップS15)。 When all write operations for the entire write data associated with one write command designating this specific write destination block have been completed and the entire write data can be read from the NAND flash memory 5, the controller 4 returns a response indicating command completion of this write command to the host 2 (step S15).

なお、フォギー・ファイン書き込み動作のように、NAND型フラッシュメモリ5に同じデータを複数回転送することを伴う書き込み動作が使用されるケースにおいては、コントローラ4は、特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(複数段階の書き込み動作)の全てが終了した場合に、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返してもよい。フォギー・ファイン書き込み動作では、あるデータのファイン書き込み動作が終了すると、このデータを正しくNAND型フラッシュメモリ5から読み出すことが可能となるからである。 Note that in a case where a write operation involving transferring the same data to the NAND flash memory 5 a plurality of times, such as the foggy fine write operation, is used, the controller 4 is configured to specify a specific write destination block. When all the write operations (multi-step write operations) for the entire write data associated with one write command are completed, a response indicating command completion of this write command may be returned to the host 2 . This is because, in the foggy fine write operation, when the fine write operation of certain data is completed, this data can be correctly read from the NAND flash memory 5 .

また、あるページに対するデータのファイン書き込み動作が終了してもこのデータを読み出すことができず、後続の1以上のページへのデータの書き込みの終了後にこのデータを正しく読み出すことが可能となる、というタイプのNAND型フラッシュメモリが用いられてもよい。この場合には、特定の書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(複数段階の書き込み動作)の全てが終了し、且つ後続の1以上のページへのデータの書き込みによってこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能となった場合に、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返してもよい。 Also, even if a fine write operation of data to a certain page ends, this data cannot be read, and this data can be read correctly after writing data to one or more subsequent pages. type NAND flash memory may be used. In this case, all of the write operations (multi-step write operations) for the entire write data associated with one write command specifying a specific write destination block are completed, and data to one or more subsequent pages is completed. When the entire write data can be read from the NAND flash memory 5 by writing , a response indicating command completion of this write command may be returned to the host 2 .

このように、本実施形態では、あるライトコマンドに関連付けられたライトデータがホスト2からフラッシュストレージデバイス3に転送された時点でこのライトコマンドのコマンド完了を示すレスポンスがホスト2に返されるのではなく、あるライトコマンドに関連付けられたライトデータ全体の書き込みに必要な書き込み動作全てが終了するか、またはこのライトデータ全体の書き込み動作全てが終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能となった場合に、このライトコマンドのコマンド完了を示すレスポンスがホスト2に返される。 As described above, in this embodiment, when write data associated with a certain write command is transferred from the host 2 to the flash storage device 3, a response indicating completion of the write command is not returned to the host 2. , all write operations required to write the entire write data associated with a certain write command are completed, or all write operations for the entire write data are completed and the entire write data can be read from the NAND flash memory 5. Then, a response indicating command completion of this write command is returned to the host 2 .

これにより、ホスト2は、コマンド完了が通知されたライトコマンドに対応するライトデータをライトデータバッファ51から破棄するという単純な処理を行うだけで、各ライトコマンドのライトデータがフラッシュストレージデバイス3から読み出し可能になるまで、このライトデータをライトデータバッファ51に維持することができる。 As a result, the host 2 can read the write data of each write command from the flash storage device 3 simply by discarding from the write data buffer 51 the write data corresponding to the write command for which command completion has been notified. This write data can be maintained in the write data buffer 51 until it becomes available.

図11のフローチャートは、ホスト2によって実行されるライトデータ破棄処理の手順を示す。
ホスト2は、ライトコマンドのコマンド完了を示すレスポンスをフラッシュストレージデバイス3から受信したか否かを判定する(ステップS21)。あるライトコマンドのコマンド完了を示すレスポンスをフラッシュストレージデバイス3から受信した場合(ステップS22)、ホスト2は、このライトコマンドに関連付けられたライトデータをライトデータバッファ51から破棄する(ステップS22)。
The flowchart of FIG. 11 shows the procedure of write data discard processing executed by the host 2 .
The host 2 determines whether or not a response indicating completion of the write command has been received from the flash storage device 3 (step S21). When receiving a command completion response for a certain write command from the flash storage device 3 (step S22), the host 2 discards the write data associated with this write command from the write data buffer 51 (step S22).

図12は、ある書き込み先ブロックを指定する最後のライトコマンドが受信されてから閾期間、この書き込み先ブロックを指定する次のライトコマンドが受信されない場合に、フラッシュストレージデバイス3によって実行されるダミーデータ書き込み処理を示す。 FIG. 12 shows dummy data executed by the flash storage device 3 when the next write command specifying a certain write destination block is not received within a threshold period of time after the last write command specifying a certain write destination block was received. Indicates a write process.

図12の左部に示されるデータd1、データd2、データd3、データd4は、書き込み先ブロックBLK#1を指定する4個のライトコマンドそれぞれに対応する4個のライトデータを示している。図12では、データd1、データd2、データd3、データd4の各々が4Kバイトのサイズを有する場合が想定されている。 Data d1, data d2, data d3, and data d4 shown in the left part of FIG. 12 indicate four write data corresponding to four write commands specifying the write destination block BLK#1. In FIG. 12, it is assumed that each of data d1, data d2, data d3, and data d4 has a size of 4K bytes.

(1)コントローラ4は、データd1、データd2、データd3、データd4を互いに結合することによって得られる16Kバイトライトデータをホスト2のライトデータバッファ51から取得する。そして、コントローラ4は、この16Kバイトライトデータを、書き込み先ブロックBLK#1のページP0に書き込まれるべきデータとしてNAND型フラッシュメモリ5に転送する。書き込み先ブロックBLK#1を指定する最後のライトコマンド、つまりデータd4の書き込みを要求したライトコマンド、が受信されてから閾期間、書き込み先ブロックBLK#1を指定する後続のライトコマンドが受信されない場合、コントローラ4は、最後のライトコマンドのコマンド完了を示すレスポンスを所定時間内にホスト2に返すことを可能にするために、書き込み先ブロックBLK#1内の1以上のページにダミーデータを書き込み、次のライトデータが書き込まれるべき書き込み先ブロックBLK#1内の書き込み先ページの位置を進める。例えば、コントローラ4は、ページP1~P3に対応する3ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。 (1) The controller 4 acquires from the write data buffer 51 of the host 2 16 Kbyte write data obtained by combining data d1, data d2, data d3, and data d4. The controller 4 then transfers this 16-Kbyte write data to the NAND flash memory 5 as data to be written to page P0 of write destination block BLK#1. When the subsequent write command designating the write destination block BLK#1 is not received for a threshold period after the last write command designating the write destination block BLK#1, that is, the write command requesting the writing of data d4 is received. , the controller 4 writes dummy data to one or more pages in the write destination block BLK#1 in order to return a command completion response of the last write command to the host 2 within a predetermined time, The position of the write destination page in the write destination block BLK#1 to which the next write data is to be written is advanced. For example, the controller 4 transfers 3 pages of dummy data corresponding to pages P1 to P3 to the NAND flash memory 5 in page units, and performs a foggy write operation to transfer 4 pages of data (P0 to P3) to the write destination block. Write to a plurality of memory cells connected to word line WL0 of BLK#1.

(2)次いで、コントローラ4は、ページP4~P7に対応する4ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P4~P7)を書き込み先ブロックBLK#1のワード線WL1に接続された複数のメモリセルに書き込む。 (2) Next, the controller 4 transfers four pages worth of dummy data corresponding to the pages P4 to P7 to the NAND flash memory 5 in units of pages, and performs the foggy write operation to transfer the four pages worth of data (P4 to P7). Write to a plurality of memory cells connected to word line WL1 of write destination block BLK#1.

(3)次いで、コントローラ4は、ページP8~P11に対応する4ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P8~P11)を書き込み先ブロックBLK#1のワード線WL2に接続された複数のメモリセルに書き込む。 (3) Next, the controller 4 transfers the four pages worth of dummy data corresponding to the pages P8 to P11 to the NAND flash memory 5 in page units, and performs the foggy write operation to transfer the four pages worth of data (P8 to P11). A plurality of memory cells connected to the word line WL2 of the write destination block BLK#1 are written.

(4)次いで、コントローラ4は、ページP12~P15に対応する4ページ分のダミーデータをページ単位でNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によって4ページ分のデータ(P12~P15)を書き込み先ブロックBLK#1のワード線WL3に接続された複数のメモリセルに書き込む。 (4) Next, the controller 4 transfers four pages of dummy data corresponding to the pages P12 to P15 to the NAND flash memory 5 in page units, and performs the foggy write operation to transfer the four pages of data (P12 to P15). Write to a plurality of memory cells connected to word line WL3 of write destination block BLK#1.

(5)次いで、コントローラ4は、データd1、データd2、データd3、データd4を互いに結合することによって得られる16Kバイトライトデータをライトデータバッファ51または内部バッファ31からNAND型フラッシュメモリ5に転送し、さらに、WL0のフォギー書き込み動作で使用した3ページ分のダミーデータ(P0~P3)と同じ3ページ分のダミーデータ(P0~P3)をページ単位でNAND型フラッシュメモリ5に転送する。そして、コントローラ4は、ファイン書き込み動作によって4ページ分のデータ(P0~P3)を書き込み先ブロックBLK#1のワード線WL0に接続された複数のメモリセルに書き込む。これにより、データd1、データd2、データd3、データd4の複数段階の書き込み動作が全て完了し、データd1、データd2、データd3、データd4がNAND型フラッシュメモリ5読み出し可能となる。コントローラ4は、データd1の書き込みを要求した最初のライトコマンドのコマンド完了を示すレスポンスと、データd2の書き込みを要求した2番目のライトコマンドのコマンド完了を示すレスポンスと、データd3の書き込みを要求した3番目のライトコマンドのコマンド完了を示すレスポンスと、データd4の書き込みを要求した4番目のライトコマンドのコマンド完了を示すレスポンスとをホスト2に返す。 (5) Next, controller 4 transfers 16 Kbyte write data obtained by combining data d1, data d2, data d3, and data d4 from write data buffer 51 or internal buffer 31 to NAND flash memory 5. Furthermore, the same three pages of dummy data (P0 to P3) as the three pages of dummy data (P0 to P3) used in the foggy write operation of WL0 are transferred to the NAND flash memory 5 in page units. Then, the controller 4 writes four pages of data (P0 to P3) to a plurality of memory cells connected to the word line WL0 of the write destination block BLK#1 by a fine write operation. As a result, the data d1, data d2, data d3, and data d4 are all written in multiple stages, and the data d1, data d2, data d3, and data d4 can be read from the NAND flash memory 5. FIG. The controller 4 requests a command completion response to the first write command requesting the writing of the data d1, a command completion response to the second write command requesting the writing of the data d2, and the writing of the data d3. It returns to the host 2 a response indicating command completion of the third write command and a response indicating command completion of the fourth write command requesting writing of data d4.

本実施形態では、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位でライトデータがホスト2からフラッシュストレージデバイス3に転送され、あるライトコマンドのライトデータ全体の書き込み動作の全てが終了した時点で、またはこのライトデータ全体の書き込み動作の全てが終了し且つこのライトデータ全体が読み出し可能となった時点で、このライトコマンドのコマンド完了を示すレスポンスがホスト2に返される。このため、例えば、小さなライトデータをある書き込み先ブロックに書き込むことを要求するライトコマンドがホスト2からフラッシュストレージデバイス3に発行された後にしばらくの間、この書き込み先ブロックを指定する後続のライトコマンドがホスト2から発行されない場合には、このライトコマンドのタイムアウトエラーが起こる可能性がある。本実施形態では、コントローラ4は、あるブロック識別子を有する最後のライトコマンドがホスト2から受信されてから閾期間このブロック識別子を有する次のライトコマンドが受信されない場合、ダミーデータを、このブロック識別子に対応する書き込み先ブロック内の次の1以上の未書き込みページに書き込む。したがって、必要に応じて、この書き込み先ブロックの書き込み動作を進行させることができるので、ライトコマンドのタイムアウトエラーが起こることを防止することができる。 In this embodiment, the write data is transferred from the host 2 to the flash storage device 3 in the same data size unit as the data write unit of the NAND flash memory 5, and all the write operations of the entire write data of a certain write command are completed. At this point in time, or at the point in time when the write operation for the entire write data is completed and the entire write data can be read, a response indicating command completion of this write command is returned to the host 2 . For this reason, for example, after the host 2 issues a write command requesting to write small write data to a certain write destination block to the flash storage device 3, for a while, subsequent write commands specifying this write destination block are If it is not issued from the host 2, there is a possibility that this write command timeout error will occur. In this embodiment, the controller 4 assigns dummy data to this block identifier if the next write command with this block identifier is not received for a threshold period after the last write command with this block identifier was received from the host 2 . Write to the next unwritten page or pages in the corresponding write destination block. Therefore, the write operation of this write destination block can be advanced as necessary, so that it is possible to prevent the write command timeout error from occurring.

図13のフローチャートは、フラッシュストレージデバイス3によって実行されるダミーデータ書き込み処理の手順を示す。ここでは、フォギー・ファイン書き込み動作のような複数段階の書き込み動作によってデータが書き込み先ブロックに書き込まれる場合を想定する。 The flowchart of FIG. 13 shows the procedure of dummy data write processing executed by the flash storage device 3 . Assume that data is written to the destination block in a multi-step write operation, such as a foggy fine write operation.

フラッシュストレージデバイス3のコントローラ4は、ある書き込み先ブロックを指定する最後のライトコマンドに関連付けられたライトデータをフォギー書き込み動作のような第1段階の書き込み動作によってこの書き込み先ブロックに書き込む。この最後のライトコマンドの受信から閾期間(Th)、この書き込み先ブロックを指定する次のライトコマンドが受信されない場合(ステップS31のYES)、コントローラ4は、最後のライトコマンドに関連付けられたライトデータが書き込まれた書き込み先ブロック内のページに後続する1以上のページにダミーデータを書き込み、これによって、次のライトデータが書き込まれるべきこの書き込み先ブロック内の書き込み先ページの位置を進める(ステップS32)。この書き込み先ブロックへのダミーデータの書き込みによって書き込み先ページの位置が進み、これによって最後のライトコマンドに関連付けられたライトデータのファイン書き込み動作(第2段階の書き込み動作)が実行可能となると、コントローラ4は、最後のライトコマンドに関連付けられたライトデータをライトデータバッファ51または内部バッファ(共有キャッシュ)31からNAND型フラッシュメモリ5に再び転送し、このライトデータのファイン書き込み動作を実行する(ステップS33)。 The controller 4 of the flash storage device 3 writes the write data associated with the last write command specifying a destination block to this destination block by a first phase write operation, such as a foggy write operation. If the next write command specifying this write destination block is not received within the threshold period (Th) from the reception of this last write command (YES in step S31), the controller 4 writes the write data associated with the last write command. writes dummy data in one or more pages following the page in the write destination block to which is written, thereby advancing the position of the write destination page in this write destination block to which the next write data is to be written (step S32 ). By writing the dummy data to the write destination block, the position of the write destination page advances, and when this makes it possible to execute the fine write operation (second stage write operation) of the write data associated with the last write command, the controller 4 transfers the write data associated with the last write command from the write data buffer 51 or the internal buffer (shared cache) 31 to the NAND flash memory 5 again, and executes the fine write operation of this write data (step S33). ).

最後のライトコマンドに関連付けられたライトデータのファイン書き込み動作が終了すると、つまりこのライトデータ全体の複数段階の書き込み動作の全てが終了すると、コントローラ4は、この最後のライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップS34)。 When the fine write operation of the write data associated with the last write command is completed, that is, when all of the multi-step write operations of the entire write data are completed, the controller 4 sends a response indicating command completion of this last write command. is returned to the host 2 (step S34).

このように、複数段階の書き込み動作によってライトデータを書き込み先ブロックに書き込むケースにおいては、コントローラ4は、最後のライトコマンドに関連付けられたライトデータの第2段階の書き込み動作が実行可能になるように、ダミーデータをこの書き込み先ブロック内の1以上のページに書き込み、次のライトデータが書き込まれるべきこの書き込み先ブロック内の書き込み先ページの位置を進める。 In this way, in the case where write data is written to a write destination block by a multi-stage write operation, the controller 4 performs the second-stage write operation of the write data associated with the last write command. , write dummy data to one or more pages within this destination block, and advance the position of the destination page within this destination block where the next write data is to be written.

図14は、内部バッファ(共有キャッシュ)31を使用してコントローラ4によって実行されるデータ転送動作を示す。
内部バッファ(共有キャッシュ)31は、複数の書き込み先ブロックBLK#1、BLK#2、…、BLK#nによって共有される。フラッシュストレージデバイス3のコントローラ4は、書き込み先ブロックBLK#1、BLK#2、…、BLK#nの各々について以下の処理を実行する。
FIG. 14 shows data transfer operations performed by controller 4 using internal buffers (shared cache) 31 .
An internal buffer (shared cache) 31 is shared by a plurality of write destination blocks BLK#1, BLK#2, . . . , BLK#n. The controller 4 of the flash storage device 3 executes the following processing for each of the write destination blocks BLK#1, BLK#2, . . . , BLK#n.

以下では、書き込み先ブロックBLK#1を例示して説明する。
コントローラ4が、書き込み先ブロックBLK#1を指定する1以上のライトコマンドを受信した後、コントローラ4は、書き込み先ブロックBLK#1を指定する一つのライトコマンドに関連付けられたライトデータを複数のライトデータに分割、または書き込み先ブロックBLK#1を指定する2以上のライトコマンドにそれぞれ関連付けられたライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5の書き込み単位と同じサイズを有するライトデータを、ライトデータバッファ51から取得する。そして、コントローラ4は、ライトデータバッファ51から取得される、各々がNAND型フラッシュメモリ5の書き込み単位と同じサイズを有する複数のライトデータを内部バッファ(共有キャッシュ)31に格納する。
The write destination block BLK#1 will be exemplified below.
After the controller 4 receives one or more write commands specifying the write destination block BLK#1, the controller 4 writes a plurality of write data associated with one write command specifying the write destination block BLK#1. Write data having the same size as the write unit of the NAND flash memory 5, obtained by dividing the data or combining the write data respectively associated with two or more write commands specifying the write destination block BLK#1. is obtained from the write data buffer 51 . Then, the controller 4 stores in the internal buffer (shared cache) 31 a plurality of write data each having the same size as the write unit of the NAND flash memory 5 , which is obtained from the write data buffer 51 .

ライトデータバッファ51は、必ずしも、ホストメモリ上の連続する一つの領域から構成される必要は無く、図14に示されているように、複数のライトデータバッファ51-1、51-2、…、51-nによって実現されてもよい。
コントローラ4は、書き込み先ブロックBLK#1に次に書き込むべきライトデータ(第1のライトデータ)を内部バッファ(共有キャッシュ)31から取得し、第1のライトデータをNAND型フラッシュメモリ5に転送し、フォギー書き込み動作のような第1段階の書き込み動作によってこのライトデータを書き込み先ブロックBLK#1に書き込む。
The write data buffer 51 does not necessarily have to consist of one continuous area on the host memory, and as shown in FIG. 14, a plurality of write data buffers 51-1, 51-2, . 51-n.
The controller 4 acquires write data (first write data) to be written next to the write destination block BLK# 1 from the internal buffer (shared cache) 31 and transfers the first write data to the NAND flash memory 5 . , write this write data to the write destination block BLK#1 by a first stage write operation, such as a foggy write operation.

内部バッファ(共有キャッシュ)31にホスト2からのライトデータを効率よく蓄積できるようにするため、ホスト2から取得されるライトデータを格納するための空き領域が内部バッファ(共有キャッシュ)31に無い場合には、コントローラ4は、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータ(フォギーステートのライトデータ)を破棄して、空き領域を内部バッファ(共有キャッシュ)31に確保する。 When the internal buffer (shared cache) 31 does not have a free area for storing the write data acquired from the host 2 so that the write data from the host 2 can be stored efficiently in the internal buffer (shared cache) 31 , the controller 4 discards the write data (foggy state write data) in the internal buffer (shared cache) 31 for which the first stage write operation such as the foggy write operation has been completed, and frees up the space. Secured in the internal buffer (shared cache) 31 .

例えば、内部バッファ(共有キャッシュ)31に空き領域がない状態でホスト2から任意の書き込み先ブロックを指定する新たなライトコマンドを受信した場合に、コントローラ4は、フォギー書き込み動作のような第1段階の書き込み動作が終了している内部バッファ(共有キャッシュ)31内のライトデータ(フォギーステートのライトデータ)を破棄して、新たなライトコマンドに対応するライトデータを格納可能な空き領域を内部バッファ(共有キャッシュ)31に確保してもよい。 For example, when a new write command specifying an arbitrary write destination block is received from the host 2 while there is no free space in the internal buffer (shared cache) 31, the controller 4 performs a first step such as a foggy write operation. The write data (write data in the foggy state) in the internal buffer (shared cache) 31 for which the write operation has been completed is discarded, and an empty area capable of storing write data corresponding to a new write command is created in the internal buffer ( shared cache) 31.

例えば、内部バッファ(共有キャッシュ)31全体が多数のフォギーステートのライトデータで満たされている状態でホスト2から新たなライトコマンドを受信した場合には、コントローラ4は、これらフォギーステートのライトデータの中から破棄すべき特定のライトデータを選択してもよく、この選択したライトデータを破棄してもよい。これにより、制限された容量を有する内部バッファ(共有キャッシュ)31を、複数の書き込み先ブロック間で効率よく共有することができる。 For example, when a new write command is received from the host 2 while the entire internal buffer (shared cache) 31 is filled with a large number of foggy-state write data, the controller 4 stores these foggy-state write data. Specific write data to be discarded may be selected from among them, and the selected write data may be discarded. As a result, the internal buffer (shared cache) 31 having a limited capacity can be efficiently shared among multiple write destination blocks.

コントローラ4は、第1のライトデータのファイン書き込み動作のような第2段階の書き込み動作を実行すべき時点において第1のライトデータが内部バッファ(共有キャッシュ)31に存在しない場合には、第1のライトデータを取得するための要求(転送要求:DMA転送要求)をホスト2に送信することによってホスト2のライトデータバッファ51から再び取得する。この取得された第1のライトデータは内部バッファ(共有キャッシュ)31に格納されてもよい。そして、コントローラ4は、取得された第1のライトデータをNAND型フラッシュメモリ5に転送し、ファイン書き込み動作のような第2段階の書き込み動作によってこの第1のライトデータを書き込み先ブロックBLK#1に書き込む。 If the first write data does not exist in the internal buffer (shared cache) 31 at the time when the second stage write operation, such as the fine write operation of the first write data, is to be executed, the controller 4 writes the first write data to the first write data. to the host 2 to acquire the write data (transfer request: DMA transfer request) from the write data buffer 51 of the host 2 again. This acquired first write data may be stored in the internal buffer (shared cache) 31 . Then, the controller 4 transfers the obtained first write data to the NAND flash memory 5, and transfers the first write data to the write destination block BLK#1 by a second stage write operation such as a fine write operation. write to

第1のライトデータのファイン書き込み動作のような第2段階の書き込み動作を実行すべき時点において第1のライトデータが内部バッファ(共有キャッシュ)31に存在している場合には、コントローラ4は、この内部バッファ(共有キャッシュ)31から第1のライトデータを取得し、取得された第1のライトデータをNAND型フラッシュメモリ5に転送し、ファイン書き込み動作のような第2段階の書き込み動作によってこの第1のライトデータを書き込み先ブロックBLK#1に書き込む。 If the first write data is present in the internal buffer (shared cache) 31 at the time a second phase write operation, such as a fine write operation of the first write data, is to be performed, the controller 4 will: The first write data is acquired from this internal buffer (shared cache) 31, the acquired first write data is transferred to the NAND flash memory 5, and a second stage write operation such as a fine write operation is performed. Write the first write data to the write destination block BLK#1.

NAND型フラッシュメモリ5への第1のライトデータの最終回のデータ転送(ここでは、ファイン書き込み動作のためのデータ転送)を行った後、コントローラ4は、この第1のライトデータを内部バッファ(共有キャッシュ)31から破棄することによって内部バッファ(共有キャッシュ)31に空き領域を確保する。あるいは、コントローラ4はこの第1のライトデータのファイン書き込み動作が終了した場合に、この第1のライトデータを内部バッファ(共有キャッシュ)31から破棄してもよい。 After performing the final data transfer of the first write data to the NAND flash memory 5 (here, data transfer for fine write operation), the controller 4 transfers the first write data to the internal buffer ( An empty area is secured in the internal buffer (shared cache) 31 by discarding the data from the shared cache) 31 . Alternatively, the controller 4 may discard the first write data from the internal buffer (shared cache) 31 when the fine write operation of the first write data is completed.

さらに、コントローラ4は、あるライトコマンドに関連付けられたライトデータ全体のファイン書き込み動作が終了した場合、あるいはこのライトデータ全体のファイン書き込み動作が終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能となった場合に、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す。 Further, the controller 4 may read out the entire write data from the NAND flash memory 5 when the fine write operation of the entire write data associated with a certain write command is completed, or when the fine write operation of the entire write data is completed and the entire write data is read from the NAND flash memory 5. When it becomes possible, it returns a response indicating command completion of this write command to the host 2 .

内部バッファ(共有キャッシュ)31はある限られた容量を有しているが、書き込み先ブロックの数がある一定数以下であるならば、第2段階の書き込み動作を実行すべき時点において第1のライトデータが内部バッファ(共有キャッシュ)31に存在する確率(ヒット率)は比較的高い。したがって、同じライトデータをホスト2からフラッシュストレージデバイス3に複数回転送すること無く、フォギー・ファイン書き込み動作のような複数段階の書き込み動作を実行することができる。これにより、ホスト2とフラッシュストレージデバイス3との間のデータトラフィックを削減できるので、データ書き込みの度に同じライトデータをホスト2からフラッシュストレージデバイス3に複数回転送する場合に比し、フラッシュストレージデバイス3のI/O性能を向上することができる。 The internal buffer (shared cache) 31 has a certain limited capacity, but if the number of destination blocks to be written is less than a certain number, the first The probability (hit rate) that write data exists in the internal buffer (shared cache) 31 is relatively high. Therefore, without transferring the same write data from the host 2 to the flash storage device 3 multiple times, a multi-step write operation such as a foggy fine write operation can be performed. As a result, data traffic between the host 2 and the flash storage device 3 can be reduced. 3 I/O performance can be improved.

書き込み先ブロックの数は、ホスト2を利用するクライアントの数と同数であってよい。この場合、あるクライアントに対応するデータはこのクライアントに対応する書き込み先ブロックに書き込まれ、他のクライアントに対応するデータは別の書き込み先ブロックに書き込まれる。したがって、ホスト2を利用するクライアントの数が増えるにつれて、内部バッファ(共有キャッシュ)31のヒット率は低下する。しかし、第1のライトデータが内部バッファ(共有キャッシュ)31に存在しない場合(ミス)には、コントローラ4はこの第1のライトデータをホスト2から取得する。したがって、クライアントの数が増加しても、フォギー・ファイン書き込み動作のような複数段階の書き込み動作を正常に実行することができる。 The number of write destination blocks may be the same as the number of clients using the host 2 . In this case, data corresponding to one client is written to the destination block corresponding to this client, and data corresponding to other clients is written to another destination block. Therefore, as the number of clients using the host 2 increases, the hit rate of the internal buffer (shared cache) 31 decreases. However, if the first write data does not exist in the internal buffer (shared cache) 31 (miss), the controller 4 acquires this first write data from the host 2 . Therefore, multi-stage write operations, such as foggy-fine write operations, can be successfully performed even if the number of clients increases.

よって、フラッシュストレージデバイス3は、フラッシュストレージデバイス3を共有するクライアントの数の増加(つまり、同時に利用可能な書き込み先ブロックの数の増加)に柔軟に対応でき且つホスト2とフラッシュストレージデバイス3との間のデータトラフィックを削減することができる。 Therefore, the flash storage device 3 can flexibly cope with an increase in the number of clients sharing the flash storage device 3 (that is, an increase in the number of write destination blocks that can be used at the same time). can reduce data traffic between

ここでは、書き込み先ブロックBLK#1にデータを書き込むための書き込み処理について説明したが、他の全ての書き込み先ブロックの各々に対しても同様の書き込み処理が実行される。
図15は、内部バッファ(共有キャッシュ)31を使用してコントローラ4よって実行される書き込み処理と内部バッファ(共有キャッシュ)31内のライトデータを破棄する処理とを示す。
Although the write process for writing data to the write destination block BLK#1 has been described here, the same write process is executed for each of all the other write destination blocks.
FIG. 15 shows the write process performed by the controller 4 using the internal buffer (shared cache) 31 and the process of discarding the write data in the internal buffer (shared cache) 31 .

図15においては、図示の簡単化のために、内部バッファ(共有キャッシュ)31が、領域101~109を含む場合が例示されている。また、図15においては、NAND型フラッシュメモリ5がQLC-フラッシュとして実現されており、4ページ分のデータサイズの単位でライトデータを破棄する処理を例示する。しかし、本実施形態は、これに限定されず、例えば1ページ分のデータサイズの単位でライトデータをライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送する処理が実行されてもよく、例えば1ページ分のデータサイズの単位でライトデータを破棄する処理が実行されてもよい。また、図15においては、3つのワード線WLを往復しながら、フォギー・ファイン書き込み動作が実行される場合を想定する。 FIG. 15 illustrates a case where the internal buffer (shared cache) 31 includes areas 101 to 109 for simplification of illustration. Also, in FIG. 15, the NAND flash memory 5 is implemented as a QLC-flash, and the process of discarding write data in units of data size for four pages is illustrated. However, the present embodiment is not limited to this. For example, a process of transferring write data from the write data buffer 51 to the internal buffer (shared cache) 31 in units of data size for one page may be executed. A process of discarding write data in units of data size for one page may be executed. Also, in FIG. 15, it is assumed that the foggy fine write operation is performed while reciprocating the three word lines WL.

内部バッファ(共有キャッシュ)31の領域101、102にそれぞれ格納されたライトデータD1、D2の各々は、書き込み先ブロックBLK#11を指定する1以上のライトコマンドに関連付けられている。ライトデータD1、D2の各々は、例えば、4ページ分のサイズを有していてもよい。コントローラ4は、(1)4ページ分のライトデータD1をフォギー書き込み動作によって書き込み先ブロックBLK#11のページP0-P3(ワード線WL0に接続された複数のメモリセル)に書き込み、そして、(2)4ページ分のライトデータD2をフォギー書き込み動作によって書き込み先ブロックBLK#11のページP4-P7(ワード線WL1に接続された複数のメモリセル)に書き込む。 Each of the write data D1 and D2 respectively stored in the areas 101 and 102 of the internal buffer (shared cache) 31 is associated with one or more write commands specifying the write destination block BLK#11. Each of the write data D1 and D2 may have a size of, for example, four pages. The controller 4 (1) writes four pages worth of write data D1 to pages P0 to P3 (a plurality of memory cells connected to the word line WL0) of the write destination block BLK#11 by a foggy write operation, and (2) ) Four pages of write data D2 are written to pages P4 to P7 (a plurality of memory cells connected to word line WL1) of write destination block BLK#11 by a foggy write operation.

内部バッファ(共有キャッシュ)31の領域103、104、105にそれぞれ格納されたライトデータD11、D12、D13の各々は、書き込み先ブロックBLK#101を指定する1以上のライトコマンドに関連付けられている。ライトデータD11、D12、D13の各々は、例えば、4ページ分のサイズを有していてもよい。コントローラ4は、(3)4ページ分のライトデータD11をフォギー書き込み動作によって書き込み先ブロックBLK#101のページP0-P3(ワード線WL0に接続された複数のメモリセル)に書き込み、(4)4ページ分のライトデータD12をフォギー書き込み動作によって書き込み先ブロックBLK#101のページP4-P7(ワード線WL1に接続された複数のメモリセル)に書き込み、(5)4ページ分のライトデータD13をフォギー書き込み動作によって書き込み先ブロックBLK#101のページP8-P11(ワード線WL2に接続された複数のメモリセル)に書き込む。 Each of the write data D11, D12, D13 stored in the areas 103, 104, 105 of the internal buffer (shared cache) 31 is associated with one or more write commands specifying the write destination block BLK#101. Each of the write data D11, D12, and D13 may have a size of, for example, four pages. The controller 4 (3) writes four pages worth of write data D11 to pages P0 to P3 (a plurality of memory cells connected to the word line WL0) of the write destination block BLK#101 by the foggy write operation, and (4) 4 A page worth of write data D12 is written to pages P4 to P7 (a plurality of memory cells connected to word line WL1) of write destination block BLK#101 by a foggy write operation, and (5) four pages worth of write data D13 is written to foggy write data. A write operation writes to pages P8 to P11 (a plurality of memory cells connected to word line WL2) of write destination block BLK#101.

書き込み先ブロックBLK#101のワード線WL2に対する4ページ分のライトデータD13のフォギー書き込み動作が終了した後、コントローラ4は、(6)4ページ分のライトデータD11をファイン書き込み動作によって書き込み先ブロックBLK#101のページP0-P3(ワード線WL0に接続された複数のメモリセル)に書き込む。ライトデータD11のファイン書き込み動作が終了すると、あるいは書き込み先ブロックBLK#101を含むNAND型フラッシュメモリチップへのライトデータD11のファイン書き込み動作のための転送(最終回の転送)が終了すると、このライトデータD11のステートはフォギーステートからファインステートに変わる。そして、コントローラ4は、(7)ファイン書き込み動作が終了したこのライトデータD11(ファインステートのライトデータ)を内部バッファ(共有キャッシュ)31から破棄して領域103を空き領域にする。 After the foggy write operation of the four pages of write data D13 to the word line WL2 of the write destination block BLK#101 is completed, the controller 4 (6) writes the four pages of write data D11 to the write destination block BLK#101 by performing a fine write operation. Pages P0-P3 of #101 (multiple memory cells connected to word line WL0) are written. When the fine write operation of the write data D11 is completed, or when the transfer (final transfer) for the fine write operation of the write data D11 to the NAND flash memory chip including the write destination block BLK#101 is completed, this write operation is completed. The state of data D11 changes from the foggy state to the fine state. Then, the controller 4 (7) discards the write data D11 (fine state write data) for which the fine write operation has been completed from the internal buffer (shared cache) 31 and makes the area 103 an empty area.

図16は、内部バッファ(共有キャッシュ)31に空き領域がない場合にコントローラ4によって実行される内部バッファ(共有キャッシュ)31内のライトデータを破棄する処理を示す。
図16の上部は、内部バッファ(共有キャッシュ)31全体が、フォギー書き込み動作(第1段階の書き込み動作)が終了しているフォギーステートのライトデータ(D21~D23、D31~D33、D41~D43)で満たされており、内部バッファ(共有キャッシュ)31に空き領域がない状態を示している。
FIG. 16 shows a process of discarding write data in the internal buffer (shared cache) 31 executed by the controller 4 when the internal buffer (shared cache) 31 has no free space.
The upper part of FIG. 16 shows write data (D21 to D23, D31 to D33, D41 to D43) in the foggy state in which the entire internal buffer (shared cache) 31 has completed the foggy write operation (first stage write operation). , indicating that the internal buffer (shared cache) 31 has no free space.

この状態でライトデータバッファ51から内部バッファ(共有キャッシュ)31へライトデータを転送することが必要とされた場合、例えばホスト2から新たなライトコマンドを受信した場合、コントローラ4は、図16の中部に示すように、フォギー書き込み動作(第1段階の書き込み動作)が終了しているライトデータ(フォギーステートのライトデータ)の中から最も古いライトデータ(ここではライトデータD11)を破棄すべきライトデータとして選択し、この最も古いライトデータ(ここではライトデータD11)を内部バッファ(共有キャッシュ)31から破棄する。 In this state, when it is necessary to transfer write data from the write data buffer 51 to the internal buffer (shared cache) 31, for example, when a new write command is received from the host 2, the controller 4 changes the middle part of FIG. , the write data to be discarded is the oldest write data (here, write data D11) among the write data (write data in the foggy state) for which the foggy write operation (first stage write operation) has been completed. , and this oldest write data (here, write data D11) is discarded from the internal buffer (shared cache) 31 .

そして、フラッシュストレージデバイス3のコントローラ4は、図16の下部に示すように、ライトデータD11を破棄することによって空き領域となった領域101に、ライトデータバッファ51から受信される新たなライトデータ(ここではライトデータD51)を格納する。 Then, as shown in the lower part of FIG. 16, the controller 4 of the flash storage device 3 stores new write data ( Here write data D51) is stored.

なお、フォギー書き込み動作が終了しているライトデータ(フォギーステートのライトデータ)のうちで最も古いライトデータを破棄する代わりに、フォギー書き込み動作が終了しているライトデータ(フォギーステートのライトデータ)のうちで、NAND型フラッシュメモリ5への残りデータ転送回数が最も少ないライトデータを破棄してもよい。この場合、例えば、NAND型フラッシュメモリ5に同じデータを3回転送することを伴う複数段階の書き込み動作が使用されるケースにおいては、NAND型フラッシュメモリ5への2回の転送が既に実行済みのデータが、NAND型フラッシュメモリ5への1回の転送のみが実行済みのデータよりも優先して、破棄すべきデータとして選択される。 Note that instead of discarding the oldest write data among the write data for which the foggy write operation has ended (write data in the foggy state), write data for which the foggy write operation has ended (write data in the foggy state) Among them, write data with the least number of remaining data transfers to the NAND flash memory 5 may be discarded. In this case, for example, in a case where a multi-step write operation involving transferring the same data to the NAND flash memory 5 three times is used, two transfers to the NAND flash memory 5 have already been executed. Data is selected as data to be discarded in preference to data that has been transferred to the NAND flash memory 5 only once.

図17のフローチャートは、内部バッファ(共有キャッシュ)31を使用してコントローラ4によって実行されるデータ書き込み処理の手順を示す。
コントローラ4は、データポインタと、ライトデータの長さと、複数の書き込み先ブロックのいずれか一つを指定する識別子(例えばブロックアドレス)とを各々が含む1つ以上のライトコマンドをホスト2から受信する(ステップS101)。同じ書き込み先ブロックを示す識別子を有する一つ以上のライトコマンドを受信した後、コントローラ4は、これらライトコマンド内の一つのライトコマンドに関連付けられたライトデータを複数のライトデータに分割、または同じ書き込み先ブロックを示す識別子を有する2以上のライトコマンドにそれぞれ関連付けられたライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5の書き込み単位と同じサイズを有するライトデータを、ライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送する(ステップS102)。
The flowchart of FIG. 17 shows the data write processing procedure executed by the controller 4 using the internal buffer (shared cache) 31 .
The controller 4 receives from the host 2 one or more write commands each including a data pointer, a write data length, and an identifier (for example, block address) designating one of a plurality of write destination blocks. (Step S101). After receiving one or more write commands having an identifier indicating the same write destination block, the controller 4 divides the write data associated with one write command in these write commands into a plurality of write data or writes the same write data. Write data having the same size as the write unit of the NAND flash memory 5 obtained by combining write data respectively associated with two or more write commands each having an identifier indicating a destination block is transferred from the write data buffer 51. Transfer to the internal buffer (shared cache) 31 (step S102).

コントローラ4は、この書き込み先ブロックに次に書き込むべきライトデータを内部バッファ(共有キャッシュ)31から取得し、このライトデータをNAND型フラッシュメモリ5に転送し、フォギー書き込み動作によってこの第1のライトデータをこの書き込み先ブロックに書き込む(ステップS103、S104)。NAND型フラッシュメモリ5がQLC-フラッシュとして実現されている場合には、ステップS103では、4ページ分のライトデータがページ単位でNAND型フラッシュメモリ5に転送され、ステップS104では、4ページ分のライトデータがフォギー書き込み動作によってこの書き込み先ブロック内の書き込み対象の一つのワード線に接続された複数のメモリセルに書き込まれる。 The controller 4 acquires the write data to be written next to this write destination block from the internal buffer (shared cache) 31, transfers this write data to the NAND flash memory 5, and converts this first write data by foggy write operation. is written to this write destination block (steps S103 and S104). When the NAND flash memory 5 is realized as a QLC-flash, in step S103, 4 pages of write data are transferred to the NAND flash memory 5 in page units. Data is written by a foggy write operation to a plurality of memory cells connected to a word line to be written in the destination block.

なお、ライトデータバッファ51から内部バッファ(共有キャッシュ)31へのライトデータの転送は、各書き込み先ブロックの書き込み動作の進行に合わせて実行される。例えば、ある書き込み先ブロックのあるページに書き込むべきライトデータをNAND型フラッシュメモリチップに転送する動作が終了した場合に、この書き込み先ブロックの次のページに書き込むべきライトデータがライトデータバッファ51から内部バッファ(共有キャッシュ)31へ転送されてもよい。あるいは、ある書き込み先ブロックのあるページに書き込むべきライトデータをこの書き込み先ブロックを含むNAND型フラッシュメモリチップに転送する動作が終了し、且つこのライトデータをこの書き込み先ブロックに書き込む動作が終了した場合に、この書き込み先ブロックの次のページに書き込むべきライトデータがライトデータバッファ51から内部バッファ(共有キャッシュ)31へ転送されてもよい。 The transfer of write data from the write data buffer 51 to the internal buffer (shared cache) 31 is executed in accordance with the progress of the write operation of each write destination block. For example, when the operation of transferring write data to be written to a certain page of a certain write destination block to the NAND flash memory chip is completed, the write data to be written to the next page of this write destination block is transferred from the write data buffer 51 to the internal memory. It may be transferred to the buffer (shared cache) 31 . Alternatively, when the operation of transferring write data to be written to a certain page of a certain write destination block to the NAND flash memory chip containing this write destination block is completed, and the operation of writing this write data to this write destination block is completed. Then, the write data to be written to the next page of this write destination block may be transferred from the write data buffer 51 to the internal buffer (shared cache) 31 .

フォギー書き込み動作が行われたこのライトデータのファイン書き込み動作を開始すべき時点において、コントローラ4は、このライトデータが、内部バッファ(共有キャッシュ)31に存在するか否かを判定する。
このライトデータが内部バッファ(共有キャッシュ)31に存在するならば(ステップS106のYES)、コントローラ4は、このライトデータを内部バッファ(共有キャッシュ)31から取得し、このライトデータをNAND型フラッシュメモリ5に転送し、ファイン書き込み動作によってこのライトデータをこの書き込み先ブロックに書き込む(ステップS107、S108、S109)。これにより、このライトデータはNAND型フラッシュメモリ5から読み出し可能となる。
At the time when the fine write operation of the write data for which the foggy write operation was performed is to be started, the controller 4 determines whether or not the write data exists in the internal buffer (shared cache) 31 .
If this write data exists in the internal buffer (shared cache) 31 (YES in step S106), the controller 4 acquires this write data from the internal buffer (shared cache) 31 and stores this write data in the NAND flash memory. 5, and this write data is written to this write destination block by a fine write operation (steps S107, S108, S109). As a result, this write data can be read from the NAND flash memory 5 .

コントローラ4は、ライトコマンド毎に、そのライトデータ全体のフォギー・ファイン書き込み動作が終了し且つそのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能となったか否かを判定する。そして、コントローラ4は、フォギー・ファイン書き込み動作が終了し且つNAND型フラッシュメモリ5から読み出し可能となったライトデータに対応するライトコマンドのコマンド完了を示すレスポンスをホスト2に返す(ステップS110)。もしステップS109の処理によってあるライトコマンドに関連付けられたライトデータ全体のファイン書き込み動作が終了したならば、ステップS110では、このライトコマンドのコマンド完了を示すレスポンスがホスト2に返されてもよい。 For each write command, the controller 4 determines whether or not the foggy/fine write operation for the entire write data has been completed and the entire write data can be read from the NAND flash memory 5 . Then, the controller 4 returns to the host 2 a response indicating the command completion of the write command corresponding to the write data that has become readable from the NAND flash memory 5 after the foggy fine write operation is completed (step S110). If the fine write operation of the entire write data associated with a certain write command is completed by the processing of step S109, a response indicating command completion of this write command may be returned to the host 2 in step S110.

図18のフローチャートは、コントローラ4によって実行されるデータ読み出し処理の手順を示す。
上述したように、コントローラ4は、ホスト2から受信されるリードコマンドによって指定されたデータが、その書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送する書き込み動作)の全てが終了していないデータ、またはその書き込み動作の全てが終了しているがNAND型フラッシュメモリ5からまだ読み出し可能となっていないデータである場合、このデータが内部バッファ(共有キャッシュ)31に存在するか否かを判定する。このデータが内部バッファ(共有キャッシュ)31に存在しない場合、コントローラ4は、このデータをライトデータバッファ51から取得し、このデータを内部バッファ(共有キャッシュ)31に格納し、このデータを内部バッファ(共有キャッシュ)31からホスト2に返す。
The flowchart of FIG. 18 shows the procedure of data reading processing executed by the controller 4 .
As described above, the controller 4 allows the data specified by the read command received from the host 2 to be transferred to the NAND-type flash memory 5 in all of its write operations (write operations in which the same data is transferred to the NAND flash memory 5 once or multiple times). In the case of unfinished data, or data whose write operations have all been completed but is not yet readable from the NAND flash memory 5, is this data present in the internal buffer (shared cache) 31? determine whether or not If this data does not exist in the internal buffer (shared cache) 31, the controller 4 acquires this data from the write data buffer 51, stores this data in the internal buffer (shared cache) 31, and stores this data in the internal buffer (shared cache) 31. shared cache) 31 to the host 2.

具体的には、以下のデータ読み出し処理が実行される。
コントローラ4がホスト2からリードコマンドを受信した場合(ステップS121のYES)、コントローラ4は、このリードコマンドによって指定されたデータが、その書き込み動作の全てが終了し、且つNAND型フラッシュメモリ5から読み出し可能なデータであるか否かを判定する(ステップS122)。
Specifically, the following data read processing is executed.
If the controller 4 receives a read command from the host 2 (YES in step S121), the controller 4 reads the data specified by this read command from the NAND flash memory 5 after all the write operations have been completed. It is determined whether or not the data is possible (step S122).

このデータがNAND型フラッシュメモリ5から読み出し可能であるならば(ステップS122のYES)、コントローラ4は、このデータをNAND型フラッシュメモリ5から読み出し、読み出されたデータをホスト2に返す(ステップS126)。ステップS126では、コントローラ4は、この読み出されたデータを、リードコマンドに含まれるデータポインタによって指定されるリードデータバッファ53内の位置に転送する。 If this data can be read from the NAND flash memory 5 (YES in step S122), the controller 4 reads this data from the NAND flash memory 5 and returns the read data to the host 2 (step S126). ). At step S126, the controller 4 transfers the read data to a position within the read data buffer 53 designated by the data pointer included in the read command.

このデータがNAND型フラッシュメモリ5から読み出し可能でないならば(ステップS122のNO)、コントローラ4は、このデータが内部バッファ(共有キャッシュ)31に存在するか否かを判定する(ステップS123)。
このデータが内部バッファ(共有キャッシュ)31に存在するならば(ステップS123のYES)、コントローラ4は、このデータを内部バッファ(共有キャッシュ)31から読み出し、この読み出したデータをホスト2に返す(ステップS124)。
If this data cannot be read from the NAND flash memory 5 (NO in step S122), the controller 4 determines whether this data exists in the internal buffer (shared cache) 31 (step S123).
If this data exists in the internal buffer (shared cache) 31 (YES in step S123), the controller 4 reads this data from the internal buffer (shared cache) 31 and returns the read data to the host 2 (step S124).

ステップS124では、コントローラ4は、この読み出されたデータを、リードコマンドに含まれるデータポインタによって指定されるリードデータバッファ53内の位置に転送する。
このデータが内部バッファ(共有キャッシュ)31に存在しないならば(ステップS123のNO)、コントローラ4は、このデータをライトデータバッファ51から取得し、内部バッファ(共有キャッシュ)31に格納する(ステップS125)。ステップS125では、DMAC15によってこのデータがライトデータバッファ51から内部バッファ(共有キャッシュ)31の空き領域に転送される。内部バッファ(共有キャッシュ)31の空き領域が無い場合には、内部バッファ(共有キャッシュ)31の空き領域を確保する処理が実行される。そして、コントローラ4は、このデータを内部バッファ(共有キャッシュ)31から読み出し、この読み出したデータをホスト2に返す(ステップS124)。ステップS124では、コントローラ4は、この読み出されたデータを、リードコマンドに含まれるデータポインタによって指定されるリードデータバッファ53内の位置に転送する。
At step S124, the controller 4 transfers the read data to a position within the read data buffer 53 designated by the data pointer included in the read command.
If this data does not exist in the internal buffer (shared cache) 31 (NO in step S123), the controller 4 acquires this data from the write data buffer 51 and stores it in the internal buffer (shared cache) 31 (step S125). ). At step S 125 , the DMAC 15 transfers this data from the write data buffer 51 to the free area of the internal buffer (shared cache) 31 . If there is no free space in the internal buffer (shared cache) 31, processing for securing free space in the internal buffer (shared cache) 31 is executed. The controller 4 then reads this data from the internal buffer (shared cache) 31 and returns the read data to the host 2 (step S124). At step S124, the controller 4 transfers the read data to a position within the read data buffer 53 designated by the data pointer included in the read command.

図19は、タイプ#2-ストレージデバイスとして実現されたフラッシュストレージデバイス3に適用されるデータ書き込み動作およびデータ読み出し動作を示す。
このデータ書き込み動作では、ホスト2が書き込み先ブロックを指定し、且つフラッシュストレージデバイス3が書き込み先ページを決定する。また、このデータ読み出し動作では、ホスト2がブロックアドレスとページアドレスとを指定する。
FIG. 19 shows data write and data read operations applied to a flash storage device 3 implemented as a type #2-storage device.
In this data write operation, the host 2 specifies the write destination block and the flash storage device 3 determines the write destination page. Also, in this data read operation, the host 2 designates a block address and a page address.

ホスト2はフラッシュストレージデバイス3を管理するストレージ管理部404を含む。ストレージ管理部404はフラッシュストレージデバイス3にブロック割り当てコマンドおよびライトコマンドをフラッシュストレージデバイス3に送出する。
フラッシュストレージデバイス3のコントローラ4は、ブロック割り当て部701、およびページ割り当て部702を含む。ブロック割り当て部701、およびページ割り当て部702は、図2で説明したライト制御部21に含まれていてもよい。
The host 2 includes a storage manager 404 that manages the flash storage device 3 . The storage management unit 404 sends a block allocation command and a write command to the flash storage device 3 .
The controller 4 of the flash storage device 3 includes a block allocator 701 and a page allocator 702 . The block allocation unit 701 and page allocation unit 702 may be included in the write control unit 21 described with reference to FIG.

データ書き込み動作は以下の手順で実行される。
(1)ホスト2のストレージ管理部404がフラッシュストレージデバイス3にデータ(ライトデータ)を書き込むことが必要な時、ストレージ管理部404は、書き込み先ブロックとして使用可能なフリーブロックを割り当てるようにフラッシュストレージデバイス3に要求してもよい。ブロック割り当て部701がこの要求(ブロック割り当てコマンド)を受信した時、ブロック割り当て部701は、フリーブロック群の一つのフリーブロックを書き込み先ブロックとしてホスト2に割り当て、割り当てられた書き込み先ブロックのブロックアドレス(BLK#)をホスト2に通知する。
A data write operation is performed in the following procedure.
(1) When the storage management unit 404 of the host 2 needs to write data (write data) to the flash storage device 3, the storage management unit 404 assigns a usable free block as a write destination block to the flash storage device. Device 3 may be requested. When the block allocation unit 701 receives this request (block allocation command), the block allocation unit 701 allocates one free block in the free block group to the host 2 as the write destination block, and the block address of the allocated write destination block. (BLK#) is notified to the host 2.

(2)ホスト2のストレージ管理部404は、割り当てられた書き込み先ブロックを指定するブロックアドレスと、ライトデータを識別するタグと、このライトデータのデータ長と、データポインタとを含むライトコマンドを、フラッシュストレージデバイス3に送信する。また、ストレージ管理部404は、ライトデータをライトデータバッファ51に格納する。 (2) The storage management unit 404 of the host 2 sends a write command that includes a block address that specifies the allocated write destination block, a tag that identifies write data, the data length of this write data, and a data pointer. Send to flash storage device 3. Also, the storage management unit 404 stores the write data in the write data buffer 51 .

(3)ページ割り当て部702がライトコマンドを受信した時、ページ割り当て部702は、ライトコマンドによって指定されたブロックアドレスを有するブロック(書き込み先ブロック)内の書き込み先ページを示すページアドレスを決定する。コントローラ4は、ライトデータを、例えばページサイズの単位で、ライトデータバッファ51から内部バッファ(共有キャッシュ)31に転送し、書き込み先ブロック内のこの決定された書き込み先ページにこのライトデータを書き込む。 (3) When the page allocation unit 702 receives a write command, the page allocation unit 702 determines a page address indicating a write destination page within a block (write destination block) having the block address specified by the write command. The controller 4 transfers the write data from the write data buffer 51 to the internal buffer (shared cache) 31 in units of page size, for example, and writes the write data to the determined write destination page in the write destination block.

(4)コントローラ4は、この書き込み先ページを示すページアドレスを、このライトコマンドのコマンド完了を示すレスポンスとしてホスト2に通知してもよい。あるいは、コントローラ4は、このライトコマンドに含まれているタグと、このライトコマンドに含まれているブロックアドレスと、決定されたページアドレスとの組を、このライトコマンドのコマンド完了を示すレスポンスとしてホスト2に通知してもよい。ホスト2においては、ライトデータが書き込まれた物理記憶位置を示す物理アドレス(ブロックアドレス、ページアドレス)が、このライトデータのタグにマッピングされるように、LUT404Aが更新される。 (4) The controller 4 may notify the host 2 of the page address indicating the write destination page as a response indicating completion of the write command. Alternatively, the controller 4 sends a set of the tag included in this write command, the block address included in this write command, and the determined page address as a response indicating command completion of this write command. 2 may be notified. In the host 2, the LUT 404A is updated so that the physical address (block address, page address) indicating the physical storage location where the write data is written is mapped to the tag of this write data.

データリード動作は以下の手順で実行される。
(1)’ホスト2がフラッシュストレージデバイス3からデータをリードすることが必要な時、ホスト2は、LUT404Aを参照することによって、リードすべきデータのタグに対応する物理アドレス(ブロックアドレス、ページアドレス)をLUT404Aから取得する。
A data read operation is executed in the following procedure.
(1) 'When the host 2 needs to read data from the flash storage device 3, the host 2 reads the physical address (block address, page address) corresponding to the tag of the data to be read by referring to the LUT 404A. ) from LUT 404A.

(2)’ホスト2は、取得されたブロックアドレスおよびページアドレスを指定するリードコマンドをフラッシュストレージデバイス3に送出する。フラッシュストレージデバイス3のコントローラ4がこのリードコマンドをホスト2から受信した時、コントローラ4は、ブロックアドレスおよびページアドレスに基づいて、データを、リード対象のブロック内のリード対象の物理記憶位置からリードする。 (2)' The host 2 sends to the flash storage device 3 a read command designating the obtained block address and page address. When the controller 4 of the flash storage device 3 receives this read command from the host 2, the controller 4 reads data from the read target physical storage location within the read target block based on the block address and page address. .

図20は、タイプ#2-ストレージデバイスとして実現されたフラッシュストレージデバイス3に適用されるブロックアロケートコマンドを示す。
ブロックアロケートコマンドは、フラッシュストレージデバイス3に書き込み先ブロック(フリーブロック)の割り当てを要求するコマンド(ブロック割り当て要求)である。ホスト2は、ブロックアロケートコマンドをフラッシュストレージデバイス3に送信することによって、書き込み先ブロックを割り当てるようにフラッシュストレージデバイス3に要求し、これによってブロックアドレス(割り当てられた書き込み先ブロックのブロックアドレス)を取得することができる。
FIG. 20 shows the block allocation command applied to a flash storage device 3 implemented as a type #2-storage device.
A block allocation command is a command (block allocation request) that requests the flash storage device 3 to allocate a write destination block (free block). The host 2 requests the flash storage device 3 to allocate a write destination block by sending a block allocate command to the flash storage device 3, thereby obtaining a block address (the block address of the allocated write destination block). can do.

図21は、ブロックアロケートコマンドに対するレスポンスを示す。
ブロックアロケートコマンドをホスト2から受信した時、フラッシュストレージデバイス3のコントローラ4は、フリーブロックリストから、ホスト2に割り当てるべきフリーブロックを選択し、選択したフリーブロックを書き込み先ブロックとして割り当て、そしてこの書き込み先ブロックのブロックアドレスを含むレスポンスをホスト2に返す。
FIG. 21 shows the response to the block allocate command.
Upon receiving a block allocate command from the host 2, the controller 4 of the flash storage device 3 selects a free block to be allocated to the host 2 from the free block list, allocates the selected free block as the write destination block, and performs this write. A response containing the block address of the previous block is returned to the host 2.

図22は、タイプ#2-ストレージデバイスとして実現されたフラッシュストレージデバイス3に適用されるライトコマンドを示す。
ライトコマンドは、フラッシュストレージデバイス3にデータの書き込みを要求するコマンドである。このライトコマンドは、コマンドID、ブロックアドレス、タグ、長さ、等を含んでもよい。
FIG. 22 shows write commands applied to a flash storage device 3 implemented as a type #2-storage device.
A write command is a command that requests the flash storage device 3 to write data. This write command may include a command ID, block address, tag, length, and so on.

コマンドIDはこのコマンドがライトコマンドであることを示すID(コマンドコード)であり、ライトコマンドにはライトコマンド用のコマンドIDが含まれる。
ブロックアドレスは、データが書き込まれるべき書き込み先ブロックを指定する物理アドレスである。
The command ID is an ID (command code) indicating that this command is a write command, and the write command includes a command ID for write commands.
A block address is a physical address that specifies a destination block to which data is to be written.

タグは、書き込まれるべきライトデータを識別するための識別子である。このタグは、上述したように、LBAのような論理アドレスであってもよいし、キー・バリュー・ストアのキーであってもよい。タグがLBAのような論理アドレスである場合には、このライトコマンドに含まれる論理アドレス(開始LBA)は、ライトデータが書き込まれるべき、論理アドレス空間内の論理位置(最初の論理位置)を示す。 A tag is an identifier for identifying write data to be written. This tag can be a logical address, such as an LBA, as described above, or a key in a key-value store. If the tag is a logical address such as LBA, the logical address (starting LBA) included in this write command indicates the logical location (first logical location) within the logical address space where the write data should be written. .

長さは、書き込まれるべきライトデータの長さを示す。
ライトコマンドは、さらに、ライトデータが格納されているライトデータバッファ51内の位置を示すデータポインタを含む。
ホスト2からライトコマンドを受信した時、コントローラ4は、ライトコマンドによって指定されたブロックアドレスを有する書き込み先ブロック内の書き込み先位置(書き込み先ページ)を決定する。この書き込み先ページは、ページ書き込み順序の制約およびバッドページ等を考慮して決定される。そして、コントローラ4は、このライトコマンドに関連付けられたライトデータを、この書き込み先ブロック内のこの書き込み先位置(書き込み先ページ)に書き込む。
Length indicates the length of write data to be written.
The write command further includes a data pointer that indicates the location within the write data buffer 51 where the write data is stored.
Upon receiving a write command from the host 2, the controller 4 determines the write destination location (write destination page) within the write destination block having the block address specified by the write command. This write destination page is determined in consideration of page write order restrictions, bad pages, and the like. Then, the controller 4 writes the write data associated with this write command to this write destination position (write destination page) in this write destination block.

図23は、図22のライトコマンドに対するレスポンスを示す。
このレスポンスは、ページアドレス、長さを含む。ページアドレスは、データが書き込まれた、書き込み先ブロック内の物理記憶位置を示す物理アドレスである。この物理アドレスは、ブロック内オフセット(つまりページアドレスとページ内オフセットとの組)によって表されてもよい。長さは、書き込まれたデータの長さを示す。
FIG. 23 shows responses to the write commands of FIG.
This response contains the page address and length. A page address is a physical address that indicates a physical storage location within a destination block to which data has been written. This physical address may be represented by an intra-block offset (ie, a pair of page address and intra-page offset). Length indicates the length of the data written.

あるいは、このレスポンスは、ページアドレス(ブロック内オフセット)および長さだけでなく、タグ、ブロックアドレスをさらに含んでいてもよい。タグは、図22のライトコマンドに含まれていたタグである。ブロックアドレスは、図22のライトコマンドに含まれていたブロックアドレスである。 Alternatively, this response may include not only the page address (offset within the block) and length, but also the tag and block address. The tag is the tag included in the write command in FIG. The block address is the block address included in the write command in FIG.

図24は、タイプ#2-ストレージデバイスとして実現されたフラッシュストレージデバイス3に適用されるリードコマンドを示す。
リードコマンドは、フラッシュストレージデバイス3にデータの読み出しを要求するコマンドである。このリードコマンドは、コマンドID、タグ、ブロックアドレス、ページアドレス、長さを含む。
FIG. 24 shows read commands applied to a flash storage device 3 implemented as a type #2-storage device.
A read command is a command that requests the flash storage device 3 to read data. This read command includes command ID, tag, block address, page address and length.

コマンドIDはこのコマンドがリードコマンドであることを示すID(コマンドコード)であり、リードコマンドにはリードコマンド用のコマンドIDが含まれる。
ブロックアドレスは、リードすべきデータが格納されているブロックを指定する。ページアドレスは、リードすべきデータが格納されているページを指定する。このページアドレスは、リードすべきデータが格納されているブロック内の物理記憶位置を示すブロック内オフセット(つまりページアドレスとページ内オフセットとの組)によって表されてもよい。長さは、リードすべきデータの長さを示す。
The command ID is an ID (command code) indicating that this command is a read command, and the read command includes a command ID for read commands.
A block address designates a block in which data to be read is stored. The page address designates the page in which data to be read is stored. This page address may be represented by an intra-block offset (that is, a pair of page address and intra-page offset) that indicates the physical storage location within the block where the data to be read is stored. Length indicates the length of data to be read.

さらに、リードコマンドは、リードコマンドによって指定されたデータが転送されるべきリードデータバッファ53内の位置を示すデータポインタを含む。
以上説明したように、本実施形態によれば、コントローラ4は、同じ書き込み先ブロックを示す第1の識別子を有する一つ以上のライトコマンドを受信した後、受信されたライトコマンド内の一つのライトコマンドに関連付けられたライトデータを複数のライトデータ(複数のデータ部)に分割、または受信されたライトコマンド内の2以上のライトコマンドにそれぞれ関連付けられたライトデータを互いに結合することによって得られる、NAND型フラッシュメモリ5のデータ書き込み単位と同じサイズを有するライトデータを、ホスト2から取得する。そして、コントローラ4は、同じデータを一回または複数回転送することを伴う第1の書き込み動作によって、この取得したライトテータを、第1の識別子によって指定される書き込み先ブロックに書き込む。
Further, the read command includes a data pointer that indicates the location within read data buffer 53 to which the data specified by the read command is to be transferred.
As described above, according to the present embodiment, after receiving one or more write commands having the first identifier indicating the same write destination block, the controller 4 receives one write command in the received write command. obtained by dividing write data associated with a command into a plurality of write data (a plurality of data portions), or combining write data associated with two or more write commands in a received write command, Write data having the same size as the data write unit of the NAND flash memory 5 is acquired from the host 2 . Then, the controller 4 writes the obtained write data to the write destination block specified by the first identifier by a first write operation involving transferring the same data once or multiple times.

したがって、個々のライトコマンドによって指定されるライトデータのサイズとは関係なく、NAND型フラッシュメモリ5のデータ書き込み単位と同じデータサイズの単位でホスト2からライトデータを取得でき、このライトデータをNAND型フラッシュメモリ5に転送することができる。よって、たとえある書き込み先ブロックへの大きなサイズのライトデータの書き込みを要求するライトコマンドが受信されても、これによって他の書き込み先ブロックへのデータ書き込み動作が滞ることを防ぐことができる。よって、複数の書き込み先ブロックの任意の一つをそれぞれ指定する複数のライトコマンドそれぞれを効率よく処理することが可能となり、大容量の内部バッファ31をデバイス側に設けずとも、あるいは内部バッファ31の容量がほぼゼロに近いバッファレスの構成であっても、複数の書き込み先ブロックを同時に利用することが可能となる。 Therefore, regardless of the write data size specified by each write command, write data can be obtained from the host 2 in units of the same data size as the data write unit of the NAND flash memory 5. It can be transferred to the flash memory 5 . Therefore, even if a write command requesting writing of large-sized write data to a certain write destination block is received, it is possible to prevent delays in data write operations to other write destination blocks. Therefore, it becomes possible to efficiently process each of a plurality of write commands that specify any one of a plurality of write destination blocks, without providing a large-capacity internal buffer 31 on the device side, or Even in a bufferless configuration with a capacity close to zero, multiple write destination blocks can be used simultaneously.

つまり、このようにホストメモリ(ライトデータバッファ51)をデバイス側で流用することにより、大容量の内部バッファ31をデバイス側に設けることなく、書き込み先ブロックの増加つまりフラッシュストレージデバイス3を共有するクライアントの数の増加に柔軟に対応できるようになり、フラッシュストレージデバイス3の限られたリソースで、同時に利用可能な書き込み先ブロックの数を上限を最大化することができる。 In other words, by using the host memory (write data buffer 51) on the device side in this way, the number of write destination blocks can be increased without providing a large-capacity internal buffer 31 on the device side. It is possible to flexibly cope with an increase in the number of blocks, and it is possible to maximize the upper limit of the number of write destination blocks that can be used simultaneously with the limited resources of the flash storage device 3 .

また、コントローラ4は、ある書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送する書き込み動作)の全てが終了した場合、またはある書き込み先ブロックを指定する一つのライトコマンドに関連付けられたライトデータ全体に対する書き込み動作(NAND型フラッシュメモリ5に同じデータを1回または複数回転送することを伴う書き込み動作)の全てが終了し且つこのライトデータ全体がNAND型フラッシュメモリ5から読み出し可能になった場合に、このライトコマンドのコマンド完了を示すレスポンスをホスト2に返す。 In addition, the controller 4 performs all write operations for the entire write data associated with one write command specifying a certain write destination block (write operations for transferring the same data to the NAND flash memory 5 once or multiple times). If completed, or if the write operation for the entire write data associated with one write command specifying a certain write destination block (the write operation that involves transferring the same data to the NAND flash memory 5 once or multiple times) When all the write data have been completed and the entire write data can be read from the NAND flash memory 5, a response indicating completion of the write command is returned to the host 2. FIG.

これにより、ホスト2は、コマンド完了が通知されたライトコマンドに対応するライトデータをライトデータバッファ51から破棄するという単純な処理を行うだけで、各ライトコマンドのライトデータが読み出し可能になるまでこのライトデータをライトデータバッファ51内に維持することができる。 As a result, the host 2 performs a simple process of discarding the write data corresponding to the write command for which the command completion has been notified from the write data buffer 51, until the write data of each write command becomes readable. Write data may be maintained in write data buffer 51 .

また、コントローラ4は、ファイン書き込み動作のような第2段階の書き込み動作を実行すべき時点において、ライトすべきデータが内部バッファ31に存在しない場合にのみ、このライトデータをホスト2のライトデータバッファ51から内部バッファ31に再度転送する。したがって、データ書き込みの度に、同じデータをライトデータバッファ51から内部バッファ31に複数回転送する必要が無くなる。このように、ホスト2のライトデータバッファ51をデバイス側で流用することにより、複数段階の書き込み動作のために大容量の内部バッファ31をデバイス側に設けることなく、書き込み先ブロックの増加つまりフラッシュストレージデバイス3を共有するクライアントの数の増加に柔軟に対応でき、且つホスト2とフラッシュストレージデバイス3との間のデータトラフィックを削減することができる。 Further, the controller 4 stores the write data in the write data buffer of the host 2 only when the data to be written does not exist in the internal buffer 31 at the time when the second stage write operation such as the fine write operation is to be executed. 51 to the internal buffer 31 again. Therefore, it is not necessary to transfer the same data from the write data buffer 51 to the internal buffer 31 a plurality of times each time data is written. In this way, by using the write data buffer 51 of the host 2 on the device side, it is possible to increase the number of write destination blocks, ie, flash storage, without providing a large-capacity internal buffer 31 on the device side for multistage write operations. An increase in the number of clients sharing the device 3 can be flexibly accommodated, and data traffic between the host 2 and the flash storage device 3 can be reduced.

また、本実施形態では、各ライトコマンドによって指定されたサイズのライトデータそのものをホスト2からフラッシュストレージデバイス3に転送し且つこのライトデータの転送が終了した時点でコマンド完了のレスポンスをホスト2に返すのではなく、フラッシュの書き込み単位と同じサイズの単位でホスト2からフラッシュストレージデバイス3にライトデータを転送し且つライトコマンド毎にコマンド完了のレスポンスをホスト2に返す構成であるので、NVMeのような標準規格を利用しつつ、書き込み先ブロックの増加つまりフラッシュストレージデバイス3を共有するクライアントの数の増加に柔軟に対応できる。 In this embodiment, the write data of the size specified by each write command itself is transferred from the host 2 to the flash storage device 3, and a command completion response is returned to the host 2 when the transfer of this write data is completed. Instead, the configuration is such that write data is transferred from the host 2 to the flash storage device 3 in units of the same size as the flash write unit, and a command completion response is returned to the host 2 for each write command. It is possible to flexibly cope with an increase in the number of write destination blocks, that is, an increase in the number of clients sharing the flash storage device 3, while using the standard.

なお、ライトデータバッファ51はホスト2上で実行される各仮想マシンからアクセスできる領域として実現することができる。また、ホスト2とフラッシュストレージデバイス3とがEthernetのようなネットワークを介して接続されるケースにおいては、ライトデータバッファ51と内部バッファ31との間のDMA転送は、リモートDMA転送によって実行されてもよい。 Note that the write data buffer 51 can be realized as an area accessible from each virtual machine executed on the host 2 . Also, in a case where the host 2 and the flash storage device 3 are connected via a network such as Ethernet, DMA transfer between the write data buffer 51 and the internal buffer 31 may be performed by remote DMA transfer. good.

また、本実施形態では、不揮発性メモリとしてNAND型フラッシュメモリを例示した。しかし、本実施形態の機能は、例えば、MRAM(Magnetoresistive
Random Access Memory)、PRAM(Phase change
Random Access Memory)、ReRAM(Resistive Random Access Memory)、又は、FeRAM(Ferroelectric Random Access Memory)のような他の様々な不揮発性メモリにも適用できる。
Moreover, in this embodiment, the NAND flash memory is exemplified as the nonvolatile memory. However, the function of this embodiment is, for example, MRAM (Magnetoresistive
Random Access Memory), PRAM (Phase change
Random Access Memory), ReRAM (Resistive Random Access Memory), or FeRAM (Ferroelectric Random Access Memory).

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 While several embodiments of the invention have been described, these embodiments have been presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and modifications can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the scope of the invention described in the claims and equivalents thereof.

2…ホスト、3…フラッシュストレージデバイス、4…コントローラ、5…NAND型フラッシュメモリ、21…ライト制御部、22…リード制御部、31…内部バッファ、51…ライトデータバッファ、53…リードデータバッファ。 2 Host, 3 Flash Storage Device, 4 Controller, 5 NAND Flash Memory, 21 Write Control Unit, 22 Read Control Unit, 31 Internal Buffer, 51 Write Data Buffer, 53 Read Data Buffer.

Claims (9)

ホストに接続可能なメモリシステムであって、
不揮発性メモリと、
前記不揮発性メモリに電気的に接続されたコントローラと、を具備し、
前記コントローラは、
第1のデータが格納されている前記ホストのメモリ上の位置を少なくとも指定するライトコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから取得し、
前記第1のデータを前記ホストの前記メモリから取得した後に前記第1のデータの読み出しを要求するリードコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記ホストに返すように構成されている、
メモリシステム。
A memory system connectable to a host,
non-volatile memory;
a controller electrically connected to the non-volatile memory;
The controller is
obtaining the first data from the memory of the host in response to receiving from the host a write command specifying at least a location on the memory of the host where the first data is stored;
receiving the first data from the memory of the host in response to receiving from the host a read command requesting reading of the first data after acquiring the first data from the memory of the host; configured to acquire and return said re-acquired first data to said host;
memory system.
前記コントローラは、
前記ライトコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから取得した後に、前記第1のデータを前記不揮発性メモリに送信し、
前記第1のデータを前記不揮発性メモリに送信した後に前記リードコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記ホストに返すように構成されている、
請求項1記載のメモリシステム。
The controller is
transmitting the first data to the nonvolatile memory after acquiring the first data from the memory of the host in response to receiving the write command from the host;
in response to receiving the read command from the host after transmitting the first data to the nonvolatile memory, obtaining the first data again from the memory of the host; configured to return to said host data of
2. The memory system of claim 1.
バッファをさらに具備し、
前記コントローラは、
前記ライトコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから取得し前記バッファに格納し、前記第1のデータを前記バッファから前記不揮発性メモリに送信し、
前記第1のデータを前記不揮発性メモリに送信した後に前記リードコマンドを前記ホストから受信したことに応じ、前記第1のデータが前記バッファにまだ格納されているか否かを判断し、前記第1のデータが前記バッファに格納されていない場合、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記バッファに格納し、前記第1のデータを前記バッファから前記ホストに返すように構成されている、
請求項1記載のメモリシステム。
further equipped with a buffer,
The controller is
acquiring the first data from the memory of the host and storing it in the buffer in response to receiving the write command from the host, transmitting the first data from the buffer to the nonvolatile memory;
determining whether the first data is still stored in the buffer in response to receiving the read command from the host after transmitting the first data to the nonvolatile memory; is not stored in the buffer, the first data is reacquired from the memory of the host, the reacquired first data is stored in the buffer, and the first data is stored in the buffer. configured to return from said buffer to said host;
2. The memory system of claim 1.
前記コントローラは、
前記第1のデータを前記不揮発性メモリに送信した後に前記リードコマンドを前記ホストから受信したことに応じ、前記第1のデータが前記バッファにまだ格納されているか否かを判断し、前記第1のデータが前記バッファに格納されている場合、前記第1のデータを前記ホストの前記メモリから再度取得することなく、前記第1のデータを前記バッファから前記ホストに返すように構成されている、
請求項3記載のメモリシステム。
The controller is
determining whether the first data is still stored in the buffer in response to receiving the read command from the host after transmitting the first data to the nonvolatile memory; is stored in the buffer, the first data is returned from the buffer to the host without retrieving the first data from the memory of the host.
4. The memory system of claim 3.
前記コントローラは、
前記ライトコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから取得した後に、前記第1のデータを前記不揮発性メモリに送信し、
前記第1のデータを前記不揮発性メモリに送信した後、前記第1のデータの書き込みを前記不揮発性メモリに指示し、
前記第1のデータの書き込みを前記不揮発性メモリに指示した後、前記第1のデータがまだ前記不揮発性メモリから読み出し可能となっていない期間に前記リードコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記ホストに返すように構成されている、
請求項1記載のメモリシステム。
The controller is
transmitting the first data to the nonvolatile memory after acquiring the first data from the memory of the host in response to receiving the write command from the host;
After transmitting the first data to the nonvolatile memory, instructing the nonvolatile memory to write the first data;
After instructing the nonvolatile memory to write the first data, in response to receiving the read command from the host while the first data is not yet readable from the nonvolatile memory, configured to re-acquire the first data from the memory of the host and return the re-acquired first data to the host;
2. The memory system of claim 1.
前記不揮発性メモリは、メモリセルアレイを含み、
前記不揮発性メモリは、
前記第1のデータを、少なくとも第1段階の書き込み動作と第2段階の書き込み動作とを含む複数段階の書き込み動作により前記メモリセルアレイに書き込むように構成され、
前記コントローラは、
前記第1のデータを前記不揮発性メモリに送信し、前記不揮発性メモリに前記第1のデータに対する前記第1段階の書き込み動作を指示した後、前記不揮発性メモリに前記第1のデータに対する前記第2段階の書き込み動作を指示する前に前記リードコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記ホストに返すように構成されている、
請求項5記載のメモリシステム。
The nonvolatile memory includes a memory cell array,
The nonvolatile memory is
configured to write the first data to the memory cell array by a multi-stage write operation including at least a first-stage write operation and a second-stage write operation;
The controller is
After transmitting the first data to the non-volatile memory and instructing the non-volatile memory to perform the first stage write operation for the first data, In response to receiving the read command from the host before instructing a two-step write operation, the first data is reacquired from the memory of the host, and the reacquired first data is transferred to the read command. configured to return to the host,
6. The memory system of claim 5.
前記不揮発性メモリは、メモリセルアレイを含み、
前記不揮発性メモリは、
前記第1のデータを、少なくとも第1段階の書き込み動作と第2段階の書き込み動作とを含む複数段階の書き込み動作により前記メモリセルアレイに書き込むように構成され、
前記コントローラは、
前記第1のデータを前記不揮発性メモリに送信し、前記不揮発性メモリに前記第1のデータに対する前記第1段階の書き込み動作を指示した後、前記不揮発性メモリが前記第1のデータに対する前記第2段階の書き込み動作を完了する前に前記リードコマンドを前記ホストから受信したことに応じ、前記第1のデータを前記ホストの前記メモリから再度取得し、前記再度取得された第1のデータを前記ホストに返すように構成されている、
請求項5記載のメモリシステム。
The nonvolatile memory includes a memory cell array,
The nonvolatile memory is
configured to write the first data to the memory cell array by a multi-stage write operation including at least a first-stage write operation and a second-stage write operation;
The controller is
After transmitting the first data to the non-volatile memory and instructing the non-volatile memory to perform the first stage write operation on the first data, the non-volatile memory writes the first data on the first data. retrieving the first data from the memory of the host in response to receiving the read command from the host before completing the two-step write operation; configured to return to the host,
6. The memory system of claim 5.
前記メモリセルアレイは、閾値電圧に応じてデータを不揮発に記憶するメモリセルを含み、
前記第2段階の書き込み動作は、前記第1段階の書き込み動作により設定された前記メモリセルの前記閾値電圧を調整する動作である、
請求項6又は請求項7に記載のメモリシステム。
The memory cell array includes memory cells that store data in a nonvolatile manner according to threshold voltages,
The second stage write operation is an operation for adjusting the threshold voltage of the memory cell set by the first stage write operation.
8. The memory system according to claim 6 or 7.
前記不揮発性メモリは、各々がデータ消去動作の単位である複数のブロックを含み、
前記ライトコマンドは、前記第1のデータが書き込まれるべき前記複数のブロックのいずれかを示す識別子をさらに指定し、
前記コントローラは、前記第1のデータを、前記識別子で示される前記複数のブロックのうちの一つのブロックに書き込むように構成されている、
請求項1に記載のメモリシステム。
The non-volatile memory includes a plurality of blocks, each of which is a unit of data erase operation,
the write command further specifies an identifier indicating one of the plurality of blocks to which the first data is to be written;
The controller is configured to write the first data to one of the plurality of blocks indicated by the identifier.
2. The memory system of claim 1.
JP2023077290A 2022-07-01 2023-05-09 Memory System Active JP7463598B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023077290A JP7463598B2 (en) 2022-07-01 2023-05-09 Memory System

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022106938A JP7281585B2 (en) 2018-04-25 2022-07-01 memory system
JP2023077290A JP7463598B2 (en) 2022-07-01 2023-05-09 Memory System

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2022106938A Division JP7281585B2 (en) 2018-04-25 2022-07-01 memory system

Publications (2)

Publication Number Publication Date
JP2023090896A true JP2023090896A (en) 2023-06-29
JP7463598B2 JP7463598B2 (en) 2024-04-08

Family

ID=82849348

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2023077290A Active JP7463598B2 (en) 2022-07-01 2023-05-09 Memory System

Country Status (1)

Country Link
JP (1) JP7463598B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9658963B2 (en) 2014-12-23 2017-05-23 Intel Corporation Speculative reads in buffered memory
JP6448571B2 (en) 2016-03-08 2019-01-09 東芝メモリ株式会社 Storage system, information processing system, and control method

Also Published As

Publication number Publication date
JP7463598B2 (en) 2024-04-08

Similar Documents

Publication Publication Date Title
US11861218B2 (en) Memory system and method for controlling nonvolatile memory
JP7051546B2 (en) Memory system and control method
US11720487B2 (en) Memory system and method of controlling nonvolatile memory
JP7155028B2 (en) Memory system and control method
US11762591B2 (en) Memory system and method of controlling nonvolatile memory by controlling the writing of data to and reading of data from a plurality of blocks in the nonvolatile memory
US11662952B2 (en) Memory system and method of controlling nonvolatile memory and for reducing a buffer size
JP2019133391A (en) Memory system and control method
JP2021033845A (en) Memory system and control method
JP7281585B2 (en) memory system
JP7463598B2 (en) Memory System
JP7337228B2 (en) Memory system and control method
US20240201904A1 (en) Memory system and method of controlling nonvolatile memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230509

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

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240229

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240327

R150 Certificate of patent or registration of utility model

Ref document number: 7463598

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150