JP2012164114A - Non-volatile semiconductor storage device and data processing system - Google Patents

Non-volatile semiconductor storage device and data processing system Download PDF

Info

Publication number
JP2012164114A
JP2012164114A JP2011023746A JP2011023746A JP2012164114A JP 2012164114 A JP2012164114 A JP 2012164114A JP 2011023746 A JP2011023746 A JP 2011023746A JP 2011023746 A JP2011023746 A JP 2011023746A JP 2012164114 A JP2012164114 A JP 2012164114A
Authority
JP
Japan
Prior art keywords
data
area
host system
unit
page
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.)
Withdrawn
Application number
JP2011023746A
Other languages
Japanese (ja)
Inventor
Ikuo Hara
郁夫 原
Takayuki Tamura
隆之 田村
Mengru Wang
夢茹 王
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2011023746A priority Critical patent/JP2012164114A/en
Publication of JP2012164114A publication Critical patent/JP2012164114A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To accelerate writing of a small amount of data on a non-volatile semiconductor storage device without using a cache function.SOLUTION: A non-volatile semiconductor storage device (1) connectable to a host system (2) includes a non-volatile semiconductor storage unit (11), and a controller (12) that controls the operation of the non-volatile semiconductor storage unit. The controller separately manages a correspondence relationship between a physical address and a logical address by using either the access unit on the host system side or the access unit on the non-volatile storage unit side. Based on the data size in a write command from the host system, the controller determines whether the data should be managed by using the access unit on the host system side or not, and whether the data should be managed by using the access unit on the non-volatile semiconductor storage unit or not, and then writes the data on the corresponding area in the non-volatile storage unit, thereby eliminating the need for saving the data on a buffer memory.

Description

本発明は、不揮発性半導体記憶装置及びそれを備えたデータ処理システムに係り、不揮発性半導体記憶装置における小容量書込みの高速化技術に関する。   The present invention relates to a nonvolatile semiconductor memory device and a data processing system including the nonvolatile semiconductor memory device, and to a technique for speeding up small capacity writing in the nonvolatile semiconductor memory device.

特許文献1には、不揮発性メモリの書き換え技術が記載されている。それによれば、フラッシュメモリの各セクタを順次処理対象として書込み済みデータの消去及びダウンロードデータの書込みを繰り返すことによりフラッシュメモリの書き換え処理を実行するに際し、各セクタの書込み済みデータのチェックサムを示すチェックサムテーブルをフラッシュメモリに記憶しておく。各セクタに対応する記憶容量単位で作成されたダウンロードデータのチェックサムテーブルを取得して、各セクタに対応するチェックサムテーブルとチェックサムテーブルとを比較し、値が一致すると判定されたセクタを処理対象とした前記消去及び書込みの実行を省略して、書き換え処理が実行される毎にチェックサムテーブルを更新する。   Patent Document 1 describes a technique for rewriting a nonvolatile memory. According to this, when executing the flash memory rewrite process by repeatedly erasing the written data and writing the download data for each sector of the flash memory, a check indicating the checksum of the written data of each sector is performed. The thumb table is stored in the flash memory. Acquires the checksum table of the download data created in the storage capacity unit corresponding to each sector, compares the checksum table corresponding to each sector with the checksum table, and processes the sector determined to match the value The execution of the erasure and writing as targets is omitted, and the checksum table is updated every time the rewriting process is executed.

特許文献2には、非選択データの冗長な書込み操作を不要とでき、ページの配列を書き換えに効率の良い状態に最適化することが可能な記憶装置が記載されている。それによれば、外部との入出力インタフェース回路には内部バスBSを介してNAND型フラッシュメモリよりなる大容量のメインメモリと、強誘電体メモリよりなる比較的小容量の補助メモリが接続されている。さらにメインメモリは内部が高並列化されており、32kBのデータ群が単位ページとして同時にアクセスされ、内部バスBSに入出力転送される。装置内部にはページを管理単位としたアドレステーブルが構築されている。   Patent Document 2 describes a storage device that can eliminate the need for redundant writing of non-selected data and can optimize the page arrangement to a state that is efficient for rewriting. According to this, a large-capacity main memory composed of a NAND flash memory and a relatively small-capacity auxiliary memory composed of a ferroelectric memory are connected to an external input / output interface circuit via an internal bus BS. . Further, the main memory is highly parallelized inside, and a 32 kB data group is simultaneously accessed as a unit page and transferred to and from the internal bus BS. An address table with pages as management units is constructed in the apparatus.

特開2007−199985号公報JP 2007-199985 A 特開2006−236304号公報JP 2006-236304 A

不揮発性半導体記憶装置の一例として、フラッシュSSD(Solid State Drive)を挙げることができる。フラッシュSSDは、半導体記憶素子であるフラッシュメモリを使用した記憶装置であり、ハードディスクドライブの機能をエミュレートする仕様であり、ハードディスクドライブと同等のインタフェースを持つ。デバイス内には、フラッシュメモリの他、専用のコントローラなどが組み込まれ、利用上はハードディスクドライブと大差はないと考えられる。フラッシュSSD内のフラッシュメモリには、NAND型が用いられる。フラッシュSSDは、ハードディスクドライブと比較して、小容量の高速アクセスが可能という特徴があり、それはフラッシュSSDの性能を表す重要な指標となっている。小容量の高速アクセスは、NAND型のフラッシュメモリよりも高速アクセス可能なDRAM(ダイナミック・ランダム・アクセス・メモリ)のような揮発性メモリに一時的にデータを保存するキャッシュ機能を用いて実現される。   An example of a nonvolatile semiconductor memory device is a flash SSD (Solid State Drive). A flash SSD is a storage device that uses a flash memory, which is a semiconductor storage element, is a specification that emulates the functions of a hard disk drive, and has an interface equivalent to that of a hard disk drive. In addition to the flash memory, a dedicated controller and the like are incorporated in the device. A NAND type is used for the flash memory in the flash SSD. The flash SSD is characterized by being capable of high-speed access with a small capacity as compared with a hard disk drive, which is an important index representing the performance of the flash SSD. Small-capacity high-speed access is realized by using a cache function that temporarily stores data in a volatile memory such as a DRAM (dynamic random access memory) that can be accessed at a higher speed than a NAND flash memory. .

しかしながら、NAND型フラッシュメモリにおけるキャッシュは、DRAMなどの揮発性メモリであるため、不所望な電源遮断により、キャッシュ内のデータが消失するおそれがある。従って、フラッシュSSDの用途によっては、キャッシュ機能を用いないで、小容量書込みの高速化を図ることが強く望まれる。   However, since the cache in the NAND flash memory is a volatile memory such as a DRAM, there is a possibility that data in the cache may be lost due to an undesired power shutdown. Therefore, depending on the use of the flash SSD, it is strongly desired to increase the speed of small-capacity writing without using the cache function.

また、従来のフラッシュSSDにおいては、NAND型フラッシュメモリの消去単位やプログラム(書込み)単位毎に論理アドレスを管理している。論理アドレスの単位はセクタとされる。プログラム(書込み)単位は、「ページ」とされ、一つのページは、複数のセクタで構成される。このため、ホストシステムからフラッシュSSD内のNAND型フラッシュメモリに1セクタ分のデータを書込む場合には、当該セクタを含むページのデータがNAND型フラッシュメモリからバッファメモリに読出され、このバッファメモリ内の該当するセクタのデータが更新される。このデータ更新後にバッファメモリ内のデータが、NAND型フラッシュメモリ内の別のアドレスに書込まれ、その書込みが完了した後に、論理アドレスと物理アドレスの変換を行うテーブルが更新される。   In the conventional flash SSD, logical addresses are managed for each erase unit and program (write) unit of the NAND flash memory. The unit of the logical address is a sector. The program (write) unit is “page”, and one page is composed of a plurality of sectors. Therefore, when data for one sector is written from the host system to the NAND flash memory in the flash SSD, the page data including the sector is read from the NAND flash memory to the buffer memory. The data of the corresponding sector is updated. After this data update, the data in the buffer memory is written to another address in the NAND flash memory. After the writing is completed, the table for converting the logical address and the physical address is updated.

しかしながら、上記のように、ホストシステムからフラッシュSSD内のNAND型フラッシュメモリに1セクタ分のデータを書込む場合に、当該セクタを含むページのデータがNAND型フラッシュメモリからバッファメモリに読出す必要があるため、小容量の書込みが低速化するおそれがある。   However, as described above, when data for one sector is written from the host system to the NAND flash memory in the flash SSD, the page data including the sector needs to be read from the NAND flash memory to the buffer memory. For this reason, writing of a small capacity may be slowed down.

本発明の目的は、キャッシュ機能を用いないで、不揮発性半導体記憶装置における小容量書込みの高速化を図るための技術を提供する。   An object of the present invention is to provide a technique for speeding up small-capacity writing in a nonvolatile semiconductor memory device without using a cache function.

本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面から明らかになるであろう。   The above and other objects and novel features of the present invention will be apparent from the description of this specification and the accompanying drawings.

本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記の通りである。   The following is a brief description of an outline of typical inventions disclosed in the present application.

すなわち、ホストシステムに接続可能とされ不揮発性半導体記憶装置は、不揮発性記憶部と、その動作制御を行うコントローラとを含む。上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ホストシステム側のアクセス単位と、上記不揮発性記憶部側のアクセス単位とに分けて管理し、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とを判定する。そして上記コントローラは、上記判定結果に基づいて、上記不揮発性記憶部における対応領域に、上記ホストシステムからの書込み指示に係るデータを書込む。   That is, the nonvolatile semiconductor memory device that can be connected to the host system includes a nonvolatile memory unit and a controller that controls the operation thereof. The controller manages the correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit separately for the access unit on the host system side and the access unit on the nonvolatile storage unit side Then, the management in the access unit on the host system side and the management in the access unit on the nonvolatile storage unit side are determined according to the size of the data related to the write instruction from the host system. Based on the determination result, the controller writes data related to a write instruction from the host system in a corresponding area in the nonvolatile storage unit.

本願において開示される発明のうち代表的なものによって得られる効果を簡単に説明すれば下記のとおりである。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows.

すなわち、キャッシュ機能を用いないで、不揮発性半導体記憶装置における小容量書込みの高速化を図ることができる。   That is, it is possible to increase the speed of small capacity writing in the nonvolatile semiconductor memory device without using the cache function.

本発明にかかるデータ処理システムの構成例ブロック図である。1 is a block diagram illustrating a configuration example of a data processing system according to the present invention. 図1に示されるデータ処理システムに含まれるフラッシュSSDで参照されるテーブルの説明図である。It is explanatory drawing of the table referred with the flash SSD contained in the data processing system shown by FIG. 図1に示されるデータ処理システムに含まれるフラッシュSSDにおけるフラッシュアレイのデータ構成についての説明図である。It is explanatory drawing about the data structure of the flash array in the flash SSD contained in the data processing system shown by FIG. 図1に示されるデータ処理システムに含まれるフラッシュSSDにおけるライト処理のフローチャートである。2 is a flowchart of a write process in a flash SSD included in the data processing system shown in FIG. 図4に示されるライト処理のフローチャートにおける主要部の詳細を示すフローチャートである。5 is a flowchart showing details of a main part in the flowchart of the write process shown in FIG. 4. 図4に示されるライト処理のフローチャートにおける主要部の詳細を示すフローチャートである。5 is a flowchart showing details of a main part in the flowchart of the write process shown in FIG. 4. 図4に示されるライト処理のフローチャートにおける主要部の詳細を示すフローチャートである。5 is a flowchart showing details of a main part in the flowchart of the write process shown in FIG. 4. ブロック単位に管理する領域の論物変換テーブルの説明図である。It is explanatory drawing of the logical-physical conversion table of the area | region managed in a block unit. 消去可能PBAテーブルの説明図である。It is explanatory drawing of the erasable PBA table. ページ単位に管理する領域の論物変換テーブルの説明図である。It is explanatory drawing of the logical-physical conversion table of the area | region managed in a page unit. 書込み可能ページテーブルの説明図である。It is explanatory drawing of a writable page table. セクタ単位に管理する領域の論物変換テーブルの説明図である。It is explanatory drawing of the logical-physical conversion table of the area | region managed in a sector unit. ガベージコレクションをリセット処理毎に実行する場合のフローチャートである。It is a flowchart in the case of performing garbage collection for every reset process. ガベージコレクションをリセット処理毎に実行する場合のフローチャートである。It is a flowchart in the case of performing garbage collection for every reset process. 本発明にかかるデータ処理システムの別の構成例ブロック図である。It is a block diagram of another example of a structure of the data processing system concerning this invention. 図14に示されるデータ処理システムで行われるガベージコレクションのフローチャートである。It is a flowchart of the garbage collection performed with the data processing system shown by FIG. 図14に示されるデータ処理システムで行われるガベージコレクションのフローチャートである。It is a flowchart of the garbage collection performed with the data processing system shown by FIG. 「ブロックより小さい単位で論物変換する領域」に書込むための領域が不足する場合のガベージコレクションのフローチャートである。It is a flowchart of the garbage collection when the area | region for writing in "the area | region to logically convert in a unit smaller than a block" is insufficient. 消去回数カウント値テーブルの説明図である。It is explanatory drawing of the erasure count value table. 図17に示される消去回数カウント値テーブルを用いたガベージコレクションのフローチャートである。18 is a garbage collection flowchart using the erase count value table shown in FIG.

1.実施の形態の概要
先ず、本願において開示される発明の代表的な実施の形態について概要を説明する。代表的な実施の形態についての概要説明で括弧を付して参照する図面中の参照符号はそれが付された構成要素の概念に含まれるものを例示するに過ぎない。
1. First, an outline of a typical embodiment of the invention disclosed in the present application will be described. Reference numerals in the drawings referred to in parentheses in the outline description of the representative embodiments merely exemplify what are included in the concept of the components to which the reference numerals are attached.

〔1〕本発明の代表的な実施の形態に係る不揮発性半導体記憶装置(1)は、ホストシステム(2)に接続可能とされ、不揮発性記憶部(11)と、その動作制御を行うコントローラ(12)とを含む。上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ホストシステム側のアクセス単位と、上記不揮発性記憶部側のアクセス単位とに分けて管理し、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とを判定する。そして上記コントローラは、上記判定結果に基づいて、上記不揮発性記憶部における対応領域に、上記ホストシステムからの書込み指示に係るデータを書込む。   [1] A nonvolatile semiconductor memory device (1) according to a typical embodiment of the present invention is connectable to a host system (2), and includes a nonvolatile memory unit (11) and a controller for controlling its operation. (12). The controller manages the correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit separately for the access unit on the host system side and the access unit on the nonvolatile storage unit side Then, the management in the access unit on the host system side and the management in the access unit on the nonvolatile storage unit side are determined according to the size of the data related to the write instruction from the host system. Based on the determination result, the controller writes data related to a write instruction from the host system in a corresponding area in the nonvolatile storage unit.

ここで従来装置でのデータ書込みにおいてバッファメモリへのデータ退避が必要となるのは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ホストシステム側のアクセス単位で管理していないことに起因する。この結果、例えばホストシステムから1セクタ分のデータを書込む場合には、当該セクタを含むページのデータをバッファメモリに読出し、このバッファメモリにおいて、該当する1セクタ分のデータを更新する必要がある。   Here, in the data writing in the conventional apparatus, the data saving to the buffer memory is necessary because the correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit side is shown on the host system side. This is because it is not managed in units of access. As a result, for example, when data for one sector is written from the host system, it is necessary to read the data of the page including the sector into the buffer memory and update the data for the corresponding sector in the buffer memory. .

これに対して、本発明の代表的な実施の形態に係る不揮発性半導体記憶装置によれば、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とが判定され、その判定結果に基づいて、上記データの上記不揮発性記憶部における書込み先が決定される。このように上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記不揮発性記憶部における書込み先として適切な領域が決定されることにより、バッファメモリへのデータ退避が不要とされるので、ホストシステムから不揮発性半導体記憶装置への小容量書込みの高速化を図ることができる。また、このような小容量書込みの高速化は、DRAM等のキャッシュ機能を用いるものではないので、キャッシュ内のデータが不所望な電源遮断により消失することを心配する必要もない。   On the other hand, according to the nonvolatile semiconductor memory device according to the representative embodiment of the present invention, in the access unit on the host system side according to the size of data related to the write instruction from the host system. Management and management in units of access on the nonvolatile storage unit side are determined, and a write destination of the data in the nonvolatile storage unit is determined based on the determination result. As described above, it is not necessary to save data to the buffer memory by determining an appropriate area as a write destination in the nonvolatile storage unit according to the size of the data related to the write instruction from the host system. Therefore, it is possible to increase the speed of small capacity writing from the host system to the nonvolatile semiconductor memory device. In addition, such high-speed writing of small capacity does not use a cache function such as a DRAM, so there is no need to worry that data in the cache is lost due to undesired power interruption.

〔2〕上記〔1〕において、上記不揮発性記憶部の消去単位をブロックとし、上記不揮発性記憶部の書込み単位をページとし、上記ホストシステムからの書込み単位をセクタとするとき、上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ブロック単位と、上記ページ単位と、上記セクタ単位とに分けて管理することができる。   [2] In the above [1], when the erase unit of the nonvolatile storage unit is a block, the write unit of the nonvolatile storage unit is a page, and the write unit from the host system is a sector, the controller The correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit side can be managed separately for the block unit, the page unit, and the sector unit.

〔3〕上記〔2〕において、上記不揮発性記憶部には、上記ブロック単位での管理に対応する第1領域と、上記ページ単位での管理に対応する第2領域と、上記セクタ単位での管理に対応する第3領域とを形成することができる。このとき上記コントローラは、上記ホストシステムからの書込み指示に係るデータのサイズが上記ブロックのサイズより大きい場合には上記第1領域に上記データを書込む。また上記コントローラは、上記ホストシステムからの書込み指示に係るデータのサイズが上記ブロックのサイズより小さく、且つ、上記ページのサイズより大きい場合には上記第2領域に上記データを書込む。さらに上記コントローラは、上記ホストシステムからの書込み指示に係るデータのサイズが上記ブロックのサイズより小さく、且つ、上記ページのサイズより小さい場合には上記第3領域に上記データを書込む。   [3] In the above [2], the nonvolatile storage unit includes a first area corresponding to the management in the block unit, a second area corresponding to the management in the page unit, and the sector unit. A third region corresponding to management can be formed. At this time, the controller writes the data in the first area when the size of the data related to the write instruction from the host system is larger than the size of the block. The controller writes the data in the second area when the size of the data related to the write instruction from the host system is smaller than the block size and larger than the page size. Further, the controller writes the data in the third area when the size of the data related to the write instruction from the host system is smaller than the block size and smaller than the page size.

〔4〕上記〔3〕において、上記コントローラは、上記第2領域に対応するブロック又は上記第3領域に対応するブロックにおける有効データを別の領域に移動することによって、上記第2領域又は上記第3領域の空きを増やすためのガベージコレクション処理を実行するように構成することができる。   [4] In the above [3], the controller moves the valid data in the block corresponding to the second area or the block corresponding to the third area to another area, thereby moving the second area or the second area. A garbage collection process for increasing the free space in the three areas can be executed.

〔5〕上記〔4〕において、リセット処理毎に上記ガベージコレクション処理を実行させることができる(図13A,図13B)。   [5] In the above [4], the garbage collection process can be executed for each reset process (FIGS. 13A and 13B).

〔6〕上記〔4〕において、上記フラッシュメモリとの間で信号のやり取りを可能とするバスがアイドル状態のときに上記ガベージコレクション処理を実行させることができる(図15A,図15B)。   [6] In the above [4], the garbage collection process can be executed when the bus enabling the exchange of signals with the flash memory is in an idle state (FIGS. 15A and 15B).

〔7〕上記〔4〕において、上記第2領域又は上記第3領域の書込み可能ページ数が所定数よりも小さい場合に上記ガベージコレクション処理を実行させることができる(図16)。   [7] In the above [4], the garbage collection process can be executed when the number of writable pages in the second area or the third area is smaller than a predetermined number (FIG. 16).

〔8〕本発明の代表的な実施の形態に係るデータ処理システム(100)は、不揮発性半導体記憶装置(1)と、上記不揮発性半導体記憶装置にアクセス可能なホストシステム(2)とを含む。上記不揮発性半導体記憶装置は、不揮発性記憶部(11)と、その動作制御を行うコントローラ(12)とを含む。上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ホストシステム側のアクセス単位と、上記不揮発性記憶部側のアクセス単位とに分けて管理し、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とを判定し、それに基づいて、上記不揮発性記憶部における対応領域に、上記ホストシステムからの書込み指示に係るデータを書込む。   [8] A data processing system (100) according to a representative embodiment of the present invention includes a nonvolatile semiconductor memory device (1) and a host system (2) capable of accessing the nonvolatile semiconductor memory device. . The non-volatile semiconductor memory device includes a non-volatile memory unit (11) and a controller (12) for controlling the operation thereof. The controller manages the correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit separately for the access unit on the host system side and the access unit on the nonvolatile storage unit side In accordance with the size of the data related to the write instruction from the host system, the management in the access unit on the host system side and the management in the access unit on the nonvolatile storage unit side are determined, and based on The data related to the write instruction from the host system is written into the corresponding area in the nonvolatile storage unit.

上記の構成のデータ処理システムによれば、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とが判定され、その判定結果に基づいて、上記データの上記不揮発性記憶部における書込み先が決定される。このように上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記不揮発性記憶部における書込み先として適切な領域が決定されることにより、バッファメモリへのデータ退避が不要とされるので、ホストシステムから不揮発性半導体記憶装置への小容量書込みの高速化を図ることができる。また、このような小容量書込みの高速化は、DRAM等のキャッシュ機能を用いるものではないので、キャッシュ内のデータが不所望な電源遮断により消失することを心配する必要もない。   According to the data processing system having the above configuration, according to the size of the data related to the write instruction from the host system, the management in the access unit on the host system side and the access unit on the nonvolatile storage unit side Management is determined, and the write destination of the data in the nonvolatile storage unit is determined based on the determination result. As described above, it is not necessary to save data to the buffer memory by determining an appropriate area as a write destination in the nonvolatile storage unit according to the size of the data related to the write instruction from the host system. Therefore, it is possible to increase the speed of small capacity writing from the host system to the nonvolatile semiconductor memory device. In addition, such high-speed writing of small capacity does not use a cache function such as a DRAM, so there is no need to worry that data in the cache is lost due to undesired power interruption.

2.実施の形態の詳細
実施の形態について更に詳述する。
2. Details of Embodiments Embodiments will be further described in detail.

《実施の形態1》
図1には、本発明にかかるデータ処理システムが示される。図1に示されるデータ処理システム100は、フラッシュSSD1と、このフラッシュSSD1にアクセス可能なホストシステム(単に「ホスト」という)2とを含む。
Embodiment 1
FIG. 1 shows a data processing system according to the present invention. A data processing system 100 shown in FIG. 1 includes a flash SSD 1 and a host system (simply referred to as “host”) 2 that can access the flash SSD 1.

ホスト2は、特に制限されないが、携帯して利用できるコンピュータシステム(モバイルPC)や、デジタルカメラとされる。このホスト2には、端子を介してフラッシュSSD1が結合されている。   The host 2 is not particularly limited, but may be a computer system (mobile PC) that can be carried around or a digital camera. A flash SSD 1 is coupled to the host 2 via a terminal.

フラッシュSSD1は、フラッシュメモリ11、コントローラ12、及び外部RAM13を含み、ホスト2によってリード/ライト可能とされる。フラッシュメモリ11、コントローラ12、及び外部RAM13は、それぞれ公知の半導体集積回路製造技術により、例えば単結晶シリコン基板などの一つの半導体基板に形成されている。   The flash SSD 1 includes a flash memory 11, a controller 12, and an external RAM 13, and can be read / written by the host 2. The flash memory 11, the controller 12, and the external RAM 13 are each formed on one semiconductor substrate such as a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique.

フラッシュメモリ11は、特に制限されないが、NAND型とされ、バッファ111と、フラッシュアレイ112とを含む。フラッシュアレイ112へのデータ書込みや、フラッシュアレイ112からのデータ読出しは、バッファ111を介して行われる。フラッシュアレイ112に対する書込み単位(「ページ」という)は、例えば図3に示されるように、2kB+64Bとされ、消去単位(「ブロック」という)は64ページとなっている。また、ホスト2からの書込みの最小単位(「セクタ」という)は、512Bとなっている。尚、セクタ、ページ、及びブロックのサイズは任意に設定することができる。フラッシュメモリ11とコントローラ12とは、バスBSを介して結合されている。   The flash memory 11 is not particularly limited, but is a NAND type, and includes a buffer 111 and a flash array 112. Data writing to the flash array 112 and data reading from the flash array 112 are performed via the buffer 111. For example, as shown in FIG. 3, the write unit (referred to as “page”) for the flash array 112 is 2 kB + 64 B, and the erase unit (referred to as “block”) is 64 pages. The minimum unit of writing from the host 2 (referred to as “sector”) is 512B. The sector, page, and block sizes can be set arbitrarily. The flash memory 11 and the controller 12 are coupled via a bus BS.

コントローラ12は、ホスト2から与えられたコマンドを解釈してフラッシュメモリ11の動作制御を行う。このコントローラ12は、特に制限されないが、ROM(リード・オンリー・メモリ)121、RAM(ランダム・アクセス・メモリ)122、CPU(中央処理装置)123、ECC(エラー検出訂正)回路124、フラッシュインタフェース125、ページバッファ126、バッファインタフェース127、ホストインタフェース128を含む。ROM121には、CPU123で実行されるプログラムが格納される。CPU123は、ROM121内のプログラムを実行することによって、各部の動作制御を行う。RAM122は、CPU123でプログラムが実行される際の作業領域などに利用される。ECC回路124は、フラッシュメモリ1から読出されるデータに符号誤り(エラー)が発生した場合にそれを検出して訂正する。フラッシュインタフェース125は、CPU123、ECC回路124、バッファインタフェース127と、フラッシュメモリ11との間の情報のやり取りを仲介する。ページバッファ126は、フラッシュメモリ11の書込み単位に相当する記憶容量を有する。バッファインタフェース127は、フラッシュインタフェース125、ホストインタフェース128、外部RAM13と、ページバッファ126との間の情報のやり取りを仲介する。ホストインタフェース128は、CPU123、バッファインタフェース127と、ホスト2との間の情報のやり取りを仲介する。   The controller 12 interprets the command given from the host 2 and controls the operation of the flash memory 11. The controller 12 is not particularly limited, but includes a ROM (Read Only Memory) 121, a RAM (Random Access Memory) 122, a CPU (Central Processing Unit) 123, an ECC (Error Detection and Correction) circuit 124, and a flash interface 125. , Page buffer 126, buffer interface 127, and host interface 128. The ROM 121 stores a program executed by the CPU 123. The CPU 123 controls the operation of each unit by executing a program in the ROM 121. The RAM 122 is used as a work area when the CPU 123 executes a program. The ECC circuit 124 detects and corrects a code error (error) that has occurred in the data read from the flash memory 1. The flash interface 125 mediates information exchange between the CPU 123, the ECC circuit 124, the buffer interface 127, and the flash memory 11. The page buffer 126 has a storage capacity corresponding to the writing unit of the flash memory 11. The buffer interface 127 mediates exchange of information between the flash buffer 125, the host interface 128, the external RAM 13, and the page buffer 126. The host interface 128 mediates exchange of information between the CPU 123, the buffer interface 127, and the host 2.

外部RAM13は、一定周期のクロック信号に同期して動作するSDRAMとされる。ホスト2は、特に制限されないが、コンピュータシステムとされる。ホスト2から書込まれるデータは、外部RAM13又はページバッファ126に一時格納され、フラッシュメモリ11のバッファ111を介して、フラッシュアレイ112に書込まれる。ここで、フラッシュアレイ112の各ブロックは、消去後に、データの書込みが可能になる。ホスト2がフラッシュメモリ11からデータを読み出す場合には、フラッシュアレイ112からバッファ111を介して、外部RAM13又はページバッファ126に格納され、その後、ホスト2に出力される。   The external RAM 13 is an SDRAM that operates in synchronization with a clock signal having a fixed period. The host 2 is not particularly limited, but is a computer system. Data to be written from the host 2 is temporarily stored in the external RAM 13 or the page buffer 126 and written to the flash array 112 via the buffer 111 of the flash memory 11. Here, each block of the flash array 112 can be written with data after being erased. When the host 2 reads data from the flash memory 11, the data is stored in the external RAM 13 or the page buffer 126 from the flash array 112 via the buffer 111 and then output to the host 2.

CPU123による演算処理においては、各種テーブルが参照される。上記各種テーブルとしては、例えば図2に示されるように、ブロック単位で管理する領域の論物変換テーブルTB1、消去可能PBAテーブルTB2、ページ単位で管理する領域の論物変換テーブルTB3、書込み可能ページテーブルTB4、セクタ単位で管理する領域の論物変換テーブルTB5を挙げることができる。   Various tables are referred to in the arithmetic processing by the CPU 123. As the above-mentioned various tables, for example, as shown in FIG. 2, an area logical-physical conversion table TB1, an erasable PBA table TB2, an area logical-physical conversion table TB3 managed in page units, and a writable page A table TB4 and a logical-physical conversion table TB5 for areas managed in units of sectors can be listed.

図8には、ブロック単位で管理する領域の論物変換テーブルTB1の構成例が示される。   FIG. 8 shows a configuration example of the logical-physical conversion table TB1 for the area managed in units of blocks.

ブロック単位で管理する領域の論物変換テーブルTB1は、ブロック単位で管理する領域の論理アドレスと物理アドレスとの対応を把握可能とするもので、そのサイズは2048Byteである。論物変換テーブルには、複数のエントリー(Entry−0〜Entry−1023)が形成される。Entry−0〜Entry−1023は、物理情報とされ、それぞれ1ブロックを管理するためのテーブル上の領域である。一つのEntryは、16bit(=2B)とされる。各Entryは、そのうちの一つが拡大して示されるように、PBAの格納領域(11bit)とフラッシュアレイのチップ(Chip)番号の格納領域(5bit)が形成される。PBAは0〜7FFhで示され、チップ番号は0〜1Fhで示される。論物変換テーブルの縦軸には、論理情報であるLBAが割り当てられる。Entryの添え字(0〜1023)に対応してLBAが昇順に割り当てられる。例えばEntry−0は、LBA=0から1エントリー分のサイズが割り当てられ、Entry−1は、Entry−0の次のアドレスから1Entry分のサイズが割り当てられる。例えばホスト2がフラッシュメモリ11にLBA0のデータを書込む場合、Entry−0の内容が書き替えられることで、論物変換テーブルが更新される。   The logical-physical conversion table TB1 of the area managed in units of blocks makes it possible to grasp the correspondence between the logical address and the physical address of the area managed in units of blocks, and the size thereof is 2048 bytes. A plurality of entries (Entry-0 to Entry-1023) are formed in the logical-physical conversion table. Entry-0 to Entry-1023 are physical information and are areas on the table for managing one block. One Entry is 16 bits (= 2B). As each Entry is enlarged, a PBA storage area (11 bits) and a flash array chip (Chip) number storage area (5 bits) are formed. PBA is indicated by 0-7FFh, and the chip number is indicated by 0-1Fh. LBA which is logical information is assigned to the vertical axis of the logical-physical conversion table. LBAs are assigned in ascending order corresponding to the Entry subscript (0 to 1023). For example, Entry-0 is assigned a size of one entry from LBA = 0, and Entry-1 is assigned a size of 1 Entry from the address next to Entry-0. For example, when the host 2 writes LBA0 data to the flash memory 11, the logical-physical conversion table is updated by rewriting the contents of Entry-0.

図9には、消去可能PBAテーブルTB2の構成例が示される。   FIG. 9 shows a configuration example of the erasable PBA table TB2.

消去可能PBAテーブルTB2は、論理アドレスにかかるデータが格納されていないブロックがどのチップのどの物理アドレスにあるかを把握可能とするテーブルとされ、そのサイズは、2048Byte(バイト)とされる。消去可能PBAテーブルTB2には、複数のエントリー(Entry−0〜Entry−1023)が形成される。Entry−0〜Entry−1023は、物理情報とされ、それぞれ1ブロックを管理するためのテーブル上の領域である。一つのEntryは、16bit(=2B)とされる。各Entryは、そのうちの一つが拡大して示されるように、PBAの格納領域(11bit)とフラッシュアレイのチップ(Chip)番号の格納領域(5bit)が形成される。PBAは0〜7FFhで示され、チップ番号は0〜1Fhで示される。尚、消去可能PBAテーブルTB2は、論理アドレスにかかるデータ格納されていないブロックがどのチップのどの物理アドレスにあるかを把握するためのテーブルとされ、論理情報は不要であるため、LBAは割り当てられていない。   The erasable PBA table TB2 is a table that makes it possible to grasp which physical address of which chip has a block in which data relating to a logical address is not stored, and its size is 2048 bytes (bytes). A plurality of entries (Entry-0 to Entry-1023) are formed in the erasable PBA table TB2. Entry-0 to Entry-1023 are physical information and are areas on the table for managing one block. One Entry is 16 bits (= 2B). As each Entry is enlarged, a PBA storage area (11 bits) and a flash array chip (Chip) number storage area (5 bits) are formed. PBA is indicated by 0-7FFh, and the chip number is indicated by 0-1Fh. The erasable PBA table TB2 is a table for ascertaining which physical address of which chip has a block in which no data related to the logical address is stored. Since logical information is unnecessary, an LBA is assigned. Not.

図10には、ページ単位で管理する領域の論物変換テーブルTB3の構成例が示される。   FIG. 10 shows a configuration example of the logical-physical conversion table TB3 for the area managed in units of pages.

ページ単位で管理する領域の論物変換テーブルTB3は、ページ単位で管理する領域の論理アドレスと物理アドレスとの対応を把握可能とするもので、そのサイズは、2048Byteとされる。ページ単位で管理する領域の論物変換テーブルTB3には、複数のエントリー(Entry−0〜Entry−168)が形成される。Entry−0〜Entry−168は、それぞれ1ページを管理するためのテーブル上の領域である。一つのEntryは、70bitとされる。各Entryは、そのうちの一つが拡大して示されるように、LBAの格納領域(48bit)、PBAの格納領域(11bit)、ページアドレスを意味するページ番号の格納領域(6bit)、フラッシュアレイのチップ(Chip)番号の格納領域(5bit)が形成される。PBAは0〜7FFF FFFF FFFFhで示され、PBAは0〜7FFhで示され、ページ番号は0〜3Fhで示され、チップ番号は0〜1FFhで示される。   The logical / physical conversion table TB3 of the area managed in units of pages makes it possible to grasp the correspondence between the logical address and the physical address of the area managed in units of pages, and the size thereof is 2048 bytes. A plurality of entries (Entry-0 to Entry-168) are formed in the logical-physical conversion table TB3 of the area managed in units of pages. Entry-0 to Entry-168 are areas on the table for managing one page. One Entry is 70 bits. As each of the entries is enlarged, an LBA storage area (48 bits), a PBA storage area (11 bits), a page number storage area (6 bits) indicating a page address, and a flash array chip. A (Chip) number storage area (5 bits) is formed. PBA is indicated by 0-7FFF FFFF FFFFh, PBA is indicated by 0-7FFh, page number is indicated by 0-3Fh, and chip number is indicated by 0-1FFh.

図11には、書込み可能ページテーブルTB4の構成例が示される。   FIG. 11 shows a configuration example of the writable page table TB4.

書込み可能ページテーブルTB4は、書込み可能なページを把握可能とするテーブルであり、そのサイズは、2048Byteとされる。書込み可能ページテーブルTB4には、複数のエントリー(Entry−0〜Entry−681)が形成される。Entry−0〜Entry−681は、それぞれ1ページを管理するためのテーブル上の領域である。一つのEntryは、22bitとされる。各Entryは、そのうちの一つが拡大して示されるように、PBAの格納領域(11bit)、ページアドレスを意味するページ(Page)番号の格納領域(6bit)、フラッシュアレイのチップ(Chip)番号の格納領域(5bit)が形成される。PBAは0〜7FFhで示され、ページ番号は0〜3Fhで示され、チップ番号は0〜1FFhで示される。   The writable page table TB4 is a table that enables grasping of writable pages, and its size is 2048 bytes. A plurality of entries (Entry-0 to Entry-681) are formed in the writable page table TB4. Entry-0 to Entry-681 are areas on the table for managing one page. One Entry is 22 bits. Each Entry has a PBA storage area (11 bits), a page (Page) storage area (6 bits) indicating a page address, and a flash array chip (Chip) number. A storage area (5 bits) is formed. PBA is indicated by 0-7FFh, page number is indicated by 0-3Fh, and chip number is indicated by 0-1FFh.

図12には、セクタ単位で管理する領域の論物変換テーブルTB5の構成例が示される。   FIG. 12 shows a configuration example of the logical-physical conversion table TB5 for the area managed in units of sectors.

セクタ単位で管理する領域の論物変換テーブルTB5は、セクタ単位で管理する領域における論理アドレスと物理アドレスとの対応を把握可能とするもので、そのサイズは、2048Byteとされる。セクタ単位で管理する領域の論物変換テーブルTB5には、複数のエントリー(Entry−0〜Entry−168)が形成される。Entry−0〜Entry−168は、それぞれ1セクタを管理するためのテーブル上の領域である。一つのEntryは、72bitとされる。各Entryは、そのうちの一つが拡大して示されるように、LBAの格納領域(48bit)、PBAの格納領域(11bit)、ページアドレスを意味するページ(Page)番号の格納領域(6bit)、フラッシュアレイのチップ(Chip)番号の格納領域(5bit)、セクタ数(2bit)が形成される。LBAは0〜FFFF FFFF FFFFhで示され、PBAは0〜7FFhで示され、ページ番号は0〜3Fhで示され、チップ番号は0〜1FFhで示され、セクタ数は0〜3hで示される。   The logical-physical conversion table TB5 of the area managed in units of sectors makes it possible to grasp the correspondence between logical addresses and physical addresses in the areas managed in units of sectors, and the size thereof is 2048 bytes. A plurality of entries (Entry-0 to Entry-168) are formed in the logical-physical conversion table TB5 of the area managed in units of sectors. Entry-0 to Entry-168 are areas on the table for managing one sector. One Entry is 72 bits. Each Entry has an LBA storage area (48 bits), a PBA storage area (11 bits), a page (Page) number storage area (6 bits), a flash, as shown in an enlarged view of one of them. An array chip number (Chip) number storage area (5 bits) and a sector number (2 bits) are formed. The LBA is indicated by 0 to FFFF FFFF FFFFh, the PBA is indicated by 0 to 7FFh, the page number is indicated by 0 to 3Fh, the chip number is indicated by 0 to 1FFh, and the number of sectors is indicated by 0 to 3h.

上記ブロック単位で管理する領域の論物変換テーブルTB1、消去可能PBAテーブルTB2、ページ単位で管理する領域の論物変換テーブルTB3、書込み可能ページテーブルTB4、セクタ単位で管理する領域の論物変換テーブルTB5は、フラッシュアレイ112内に格納されており、フラッシュSSD1の初期化処理においてページバッファ126又は外部RAM13にロードされるようになっている。CPU123によるテーブル参照やテーブル情報の更新は、ページバッファ126又は外部RAM13にロードされたテーブルに対して行われる。そしてテーブル情報が更新された場合には、それに応じてフラッシュアレイ112内のテーブルが更新される。   Area logical-physical conversion table TB1 managed in block units, erasable PBA table TB2, area logical-physical conversion table TB3 managed in page units, writable page table TB4, area logical-physical conversion table managed in sector units TB5 is stored in the flash array 112 and is loaded into the page buffer 126 or the external RAM 13 in the initialization process of the flash SSD1. The table reference and update of the table information by the CPU 123 are performed on the table loaded in the page buffer 126 or the external RAM 13. When the table information is updated, the table in the flash array 112 is updated accordingly.

図4には、上記フラッシュSSD1におけるライト処理の流れが示される。   FIG. 4 shows the flow of write processing in the flash SSD 1.

ホスト2からフラッシュSSD1に対してライトコマンドが発行される(S301)。フラッシュSSD1内のCPU123は、上記ライトコマンドを解析して、書込み先LBA(Logical Block Address)と書込みセクタ数とを取得し(S302)、この書込みセクタ数を「ホストが指定したセクタ数」とする(S303)。ここで、「LBA」とは、ホスト側の論理的なブロックアドレスを意味する。書込み用データは、ホストインタフェース128及びバッファインタフェース127を介してページバッファ126に一時的に保存される。そしてCPU123は、書込みセクタ数がブロックサイズより大きいか否かの判別を行う(S304)。この判別において、書込みセクタ数がブロックサイズより大きい(Yes)と判断された場合には、上記ステップS302で取得された書込み先LBAにかかる書込みデータを、ブロックで管理する領域に書込むための処理がCPU123で実行される(S306)。また、上記ステップS304の判別において、書込みセクタ数がブロックサイズより小さい(No)と判断された場合には、書込みサイズがページサイズより大きいか否かの判別がCPU123で行われる(S305)。この判別において、書込みサイズがページサイズより大きい(Yes)と判断された場合には、上記ステップS302で取得された書込み先LBAをブロックで管理する領域に書込むための処理がCPU123で実行される(S307)。また上記ステップS305の判別において、書込みサイズがページサイズより小さい(No)と判断された場合には、上記ステップS302で取得された書込み先LBAをセクタ単位で管理する領域に書込むための処理がCPU123で実行される(S308)。尚、上記ステップS306、S307、S308の各処理については後に詳述する。   A write command is issued from the host 2 to the flash SSD 1 (S301). The CPU 123 in the flash SSD 1 analyzes the write command, obtains a write destination LBA (Logical Block Address) and the number of write sectors (S302), and sets the number of write sectors as “the number of sectors specified by the host”. (S303). Here, “LBA” means a logical block address on the host side. The write data is temporarily stored in the page buffer 126 via the host interface 128 and the buffer interface 127. Then, the CPU 123 determines whether or not the number of write sectors is larger than the block size (S304). In this determination, if it is determined that the number of write sectors is larger than the block size (Yes), the process for writing the write data relating to the write destination LBA acquired in step S302 to the area managed by the block Is executed by the CPU 123 (S306). If it is determined in step S304 that the number of write sectors is smaller than the block size (No), the CPU 123 determines whether the write size is larger than the page size (S305). In this determination, when it is determined that the write size is larger than the page size (Yes), the CPU 123 executes a process for writing the write destination LBA acquired in step S302 in the area managed by the block. (S307). If it is determined in step S305 that the write size is smaller than the page size (No), a process for writing the write destination LBA acquired in step S302 into the area managed in units of sectors is performed. This is executed by the CPU 123 (S308). Note that the processes in steps S306, S307, and S308 will be described in detail later.

上記ステップS306、S307、S308の各処理の後に、書込みセクタ数から、実際に書込んだセクタ数が減算され、書込みセクタ数が0より大きいか否かの判別が行われる(S310)。この判別において、書込みセクタ数が0より大きい(Yes)と判断された場合には、未だ書込み可能であるため、上記ステップS304の判別に戻る。また、上記ステップS310の判別において、書込みセクタ数が0より大きくない(No)と判断された場合には、書込みが不可能であるため、本フローチャートによる処理が終了される。   After each of the above steps S306, S307, and S308, the number of sectors actually written is subtracted from the number of write sectors, and it is determined whether or not the number of write sectors is greater than 0 (S310). In this determination, if it is determined that the number of write sectors is greater than 0 (Yes), since the writing is still possible, the process returns to the determination in step S304. If it is determined in step S310 that the number of write sectors is not greater than 0 (No), writing is impossible, and the processing according to this flowchart ends.

図5には、図4におけるステップS306における書込み処理(書込み先LBAにかかる書込み用データを、ブロック単位で管理する領域に書込むための処理)の詳細が示される。   FIG. 5 shows details of the write process (process for writing the write data relating to the write destination LBA to the area managed in block units) in step S306 in FIG.

書込み先LBAにかかる書込み用データを、ブロック単位で管理する領域に書込むための処理において、先ず、CPU123によって、消去可能PBA(Physical Block Address)テーブルが参照されて、消去可能ブロックのアドレスが取得され(S401)、当該アドレスに対応する消去可能ブロックが消去される。CPU123は、上記ステップ402で消去されたブロックに対して、上記ページバッファ126に保存されているホスト転送データを書込む(S403)。その後、CPU123によって、ブロック単位で管理する領域の論物変換テーブルTB1と、消去可能PBAテーブルTB2が更新される(S404)。ここで、ブロック単位で管理する領域の論物変換テーブルTB1は、ブロック単位で管理する領域における論理アドレスと物理アドレスとの変換を可能にするもので、ページバッファ126又は外部RAM13に形成される。   In the process for writing the write data relating to the write destination LBA to the area managed in block units, the CPU 123 first refers to an erasable PBA (Physical Block Address) table to obtain the address of the erasable block. (S401), the erasable block corresponding to the address is erased. The CPU 123 writes the host transfer data stored in the page buffer 126 to the block erased in step 402 (S403). Thereafter, the CPU 123 updates the logical-physical conversion table TB1 and the erasable PBA table TB2 of the area managed in block units (S404). Here, the logical-physical conversion table TB1 of the area managed in units of blocks enables conversion between logical addresses and physical addresses in the areas managed in units of blocks, and is formed in the page buffer 126 or the external RAM 13.

図6には、図4におけるステップS307の処理(書込み先LBAにかかる書込み用データを、ブロック単位で管理する領域に書込むための処理)の詳細が示される。   FIG. 6 shows details of the processing in step S307 in FIG. 4 (processing for writing the write data relating to the write destination LBA to the area managed in block units).

書込み先LBAにかかる書込み用データを、ブロック単位で管理する領域に書込むための処理において、先ず、CPU123は、書込み可能ページテーブルTB4を参照して書込み可能ページのアドレスを取得する(S501)。書込み可能ページテーブルTB4は、ページバッファ126又は外部RAM13に形成される。そしてCPU123は、書込み可能ページがあるか否かの判別を行う(S502)。書込み可能ページがある(Yes)と判断した場合、ページバッファ126に一時的に保存されているホスト転送データをフラッシュアレイ112へ書込む(S506)。またCPU123は、上記ステップS502の判別において、書込み可能ページが無い(No)と判断した場合、消去可能PBAテーブルTB2を参照して、消去可能ブロックのアドレスを取得し(S503)、当該消去可能ブロックを消去し(S504)、その後、消去したブロックから書込み可能ページを取得する(S505)。そして、取得した着込み可能ページに対してホスト転送データの書込みが行われる(S506)。CPU123は、消去を実行したか否かの判別を行う(S507)。この判別において、消去を実行していない(No)と判断された場合、「ページ単位で管理する領域」の論物変換テーブルと、書込み可能ページテーブルTB4を更新する(S508)。また、上記ステップS507の判別において消去を実行した(Yes)と判断された場合、「ページ単位で管理する領域」の論物変換テーブルと書込み可能ページテーブルTB4と消去可能PBAテーブルTB2とを更新する(S509)。   In the process for writing the write data relating to the write destination LBA to the area managed in block units, the CPU 123 first acquires the address of the writable page with reference to the writable page table TB4 (S501). The writable page table TB4 is formed in the page buffer 126 or the external RAM 13. Then, the CPU 123 determines whether there is a writable page (S502). If it is determined that there is a writable page (Yes), the host transfer data temporarily stored in the page buffer 126 is written to the flash array 112 (S506). If it is determined in step S502 that there is no writable page (No), the CPU 123 refers to the erasable PBA table TB2 and acquires the address of the erasable block (S503). Is erased (S504), and then a writable page is obtained from the erased block (S505). Then, the host transfer data is written to the acquired landing-possible page (S506). The CPU 123 determines whether or not erasure has been executed (S507). In this determination, if it is determined that erasure is not executed (No), the logical-physical conversion table of “area managed in units of pages” and the writable page table TB4 are updated (S508). If it is determined in step S507 that erasure has been executed (Yes), the logical-physical conversion table, the writable page table TB4, and the erasable PBA table TB2 in “area managed in units of pages” are updated. (S509).

図7には、図4におけるステップS308の処理(書込み先LBAにかかる書込み用データを、セクタ単位で管理する領域に書込むための処理)の詳細が示される。   FIG. 7 shows details of the processing in step S308 in FIG. 4 (processing for writing the write data relating to the write destination LBA to the area managed in units of sectors).

書込み先LBAにかかる書込み用データを、セクタ単位で管理する領域に書込むための処理において、先ず、CPU123は、書込み可能ページテーブルTB4を参照して書込み可能ページのアドレスを取得する(S601)。そしてCPU123は、書込み可能ページがあるか否かの判別を行う(S602)。書込み可能ページがある(Yes)と判断した場合、ページバッファ126に一時的に保存されているホスト転送データをフラッシュアレイ112へ書込む(S606)。またCPU123は、上記ステップS602の判別において、書込み可能ページが無い(No)と判断した場合、消去可能PBAテーブルTB2を参照して、消去可能ブロックのアドレスを取得し(S603)、当該消去可能ブロックを消去し(S604)、その後、消去したブロックから書込み可能ページを取得する(S605)。そして、取得した着込み可能ページに対してホスト転送データの書込みが行われる(S606)。CPU123は、消去を実行したか否かの判別を行う(S607)。この判別において、消去を実行していない(No)と判断された場合、「セクタ単位で管理する領域」の論物変換テーブルと、書込み可能ページテーブルTB4を更新する(S608)。また、上記ステップS607の判別において消去を実行した(Yes)と判断された場合、「セクタ単位で管理する領域」の論物変換テーブルと書込み可能ページテーブルTB4と消去可能PBAテーブルTB2とを更新する(S609)。   In the process for writing the write data related to the write destination LBA to the area managed in units of sectors, first, the CPU 123 refers to the writable page table TB4 to obtain the address of the writable page (S601). Then, the CPU 123 determines whether there is a writable page (S602). If it is determined that there is a writable page (Yes), the host transfer data temporarily stored in the page buffer 126 is written to the flash array 112 (S606). When determining in step S602 that there is no writable page (No), the CPU 123 refers to the erasable PBA table TB2 to acquire the address of the erasable block (S603), and Is erased (S604), and then a writable page is obtained from the erased block (S605). Then, the host transfer data is written to the acquired landing-possible page (S606). The CPU 123 determines whether or not erasure has been executed (S607). In this determination, if it is determined that erasure is not executed (No), the logical-physical conversion table of “area managed in sector units” and the writable page table TB4 are updated (S608). If it is determined in step S607 that erasing has been executed (Yes), the logical / physical conversion table, the writable page table TB4, and the erasable PBA table TB2 of “area managed in sector units” are updated. (S609).

次に、ガベージコレクションについて説明する。   Next, garbage collection will be described.

「ブロックより小さい単位で論物変換する領域」は、フラッシュSSD1の全容量より少ない領域に限定される場合があるため、ホスト2から連続して書込みが行われると、空きページが無くなることがある。このため、コントローラ12では、「ブロックより小さい単位で論物変換する領域」に空きページを作るためのガベージコレクションが実行される。ガベージコレクションは、(1)フラッシュSSD1のリセット処理毎に実行することができる。   The “area for logical-physical conversion in units smaller than the block” may be limited to an area that is smaller than the entire capacity of the flash SSD 1, and therefore, if writing is performed continuously from the host 2, there may be no free pages. . For this reason, the controller 12 executes garbage collection for creating an empty page in the “area for logical-physical conversion in units smaller than the block”. Garbage collection can be executed (1) every time the flash SSD 1 is reset.

先ず、ガベージコレクションをフラッシュSSD1のリセット処理毎に実行する場合について説明する。   First, a case where garbage collection is executed for each reset process of the flash SSD 1 will be described.

図13A及び図13Bには、ガベージコレクションをリセット処理毎に実行する場合のフローチャートが示される。尚、図13A及び図13Bにおいて、「CON1」は、処理が連続していることを示している。   FIGS. 13A and 13B show a flowchart in a case where garbage collection is executed for each reset process. In FIG. 13A and FIG. 13B, “CON1” indicates that the processing is continuous.

フラッシュSSD1に対する電源投入や、リセット信号がアサートされた場合に、所定のリセット処理が起動される(S1301)。つまり、CPU123によって所定のリセットプログラムが実行される。フラッシュSSD1においてリセット処理が行われている期間は、ホスト2に対してビジー状態になる。このビジー状態が解除される前に、以下の処理がCPU123によって行われる。   When the flash SSD 1 is turned on or a reset signal is asserted, a predetermined reset process is started (S1301). That is, the CPU 123 executes a predetermined reset program. During the reset process in the flash SSD 1, the host 2 is busy. Before the busy state is canceled, the CPU 123 performs the following processing.

先ず「ブロックより小さい単位で論物変換する領域」の空きページ数の確認がCPU123によって行われる(S1302)。この確認は、ページ単位で管理する領域の論物変換テーブルTB3及びセクタ単位で管理する領域の論物変換テーブルTB5を参照することで行われる。そして、「ブロックより小さい単位で論物変換する領域」の空きページ数が規定値以下であるか否かの判別が行われる(S1303)。この判別において、「ブロックより小さい単位で論物変換する領域」の空きページ数が規定値以下である(Yes)と判断された場合には、ガベージコレクションの必要があるため、消去可能PBAテーブルTB2が参照されることにより、消去可能PBAの取得が行われ(S1304)、取得された消去可能PBAが消去される(S1305)。次に、「ブロックより小さい単位で論物変換する領域」のブロックで、空きページ数が規定値以下のブロックが選択され(S1306)、処理ページ番号を「0」にする。ここで、「処理ページ番号」とは、内部的な変数を意味する。そして、ガベージコレクション処理に要する時間が、規定時間を越えるか否かの判別が行われる(S1308)。ここで、「規定時間」とは、例えばリセット処理のために許容される時間を意味する。ガベージコレクション処理は、このリセット処理のために許容される時間内に終了する必要がある。ガベージコレクション処理に要する時間が、規定時間を越えない(No)と判断された場合には、処理ページ数が当該ブロックにおける最大ページ数未満であるか否かの判別が行われる(S1309)。つまり、これから処理しようとするページ番号が、上記ステップS1305で消去されたブロックにおける最大ページ数に達したか否かが判別される。この判別において、処理ページ数が当該ブロックにおける最大ページ数未満である(Yes)と判断された場合には、当該ページに有効なデータがあるか否かの判別が行われる(S1310)。この判別において、当該ページに有効なデータがある(Yes)と判断された場合には、その有効データがページバッファ126に読出される(S1312)。そして、ページバッファ126に読出された上記データはページサイズ以上であるか否かの判別が行われる(S1313)。この判別において、ページバッファ126に読出された上記データがページサイズ以上である(Yes)と判断された場合には、ページバッファ126に読出された上記データが、上記ステップS1305で消去されたPBAに書込まれる(S1314)。その後、処理ページ番号がインクリメントされた後に(S1311)、上記ステップS1308の判別に戻されることにより、次の処理ページ番号についてのガベージコレクション処理が行われる。   First, the CPU 123 checks the number of empty pages in the “region to be logically converted in units smaller than the block” (S1302). This confirmation is performed by referring to the logical / physical conversion table TB3 of the area managed in units of pages and the logical / physical conversion table TB5 of the area managed in units of sectors. Then, it is determined whether or not the number of empty pages in the “region for logical-physical conversion in units smaller than the block” is equal to or less than a specified value (S1303). In this determination, if it is determined that the number of free pages in the “area for logical-physical conversion in units smaller than the block” is equal to or less than the predetermined value (Yes), garbage collection is necessary, so the erasable PBA table TB2 Is referred to, erasable PBA is acquired (S1304), and the acquired erasable PBA is erased (S1305). Next, a block having the number of empty pages equal to or less than a predetermined value in the block of “region to be logically converted in units smaller than the block” is selected (S1306), and the processing page number is set to “0”. Here, “processing page number” means an internal variable. Then, it is determined whether or not the time required for the garbage collection process exceeds a specified time (S1308). Here, the “specified time” means a time allowed for the reset process, for example. The garbage collection process needs to be completed within the time allowed for this reset process. If it is determined that the time required for the garbage collection process does not exceed the specified time (No), it is determined whether the number of processed pages is less than the maximum number of pages in the block (S1309). That is, it is determined whether or not the page number to be processed has reached the maximum number of pages in the block erased in step S1305. In this determination, if it is determined that the number of processed pages is less than the maximum number of pages in the block (Yes), it is determined whether there is valid data on the page (S1310). In this determination, if it is determined that there is valid data on the page (Yes), the valid data is read to the page buffer 126 (S1312). Then, it is determined whether or not the data read to the page buffer 126 is equal to or larger than the page size (S1313). In this determination, if it is determined that the data read to the page buffer 126 is equal to or larger than the page size (Yes), the data read to the page buffer 126 is stored in the PBA erased in step S1305. It is written (S1314). Thereafter, after the process page number is incremented (S1311), the process returns to the determination in step S1308 to perform the garbage collection process for the next process page number.

上記ステップS1303の判別において、「ブロックより小さい単位で論物変換する領域」の空きページ数が規定値以下ではない(No)と判断された場合には、「ブロックより小さい単位で論物変換する領域」の空きページ数が十分に残っており、ガベージコレクションは不要である。この場合、ページバッファ126上にデータが残っているか否かの判別が行われる(S1315)。この判別において、ページバッファ126上にデータが残っている(Yes)(Yes)と判断された場合には、当該データが、上記ステップS1305で消去されたPBAに書込まれる(S1316)。その後、ガベージコレクションでデータが移動されたか否かの判別が行われる(S1317)。この判別において、ガベージコレクションでデータが移動された(Yes)と判断された場合には、「ブロックより小さい単位で論物変換する領域」の論物変換テーブル、すなわち、ページ単位で管理する領域の論物変換デーブルTB3及びセクタ単位で管理する領域の論物変換テーブルTB5、ブロック単位で管理する領域の領域の論物変換テーブルTBTB1、消去可能PBAテーブルTB2、書込み可能ページテーブルTB4が更新され(S1318)、その後、リセットビジーが解除されることで、リセット処理の終了がホスト2に伝えられる(S1319)。   In the determination in step S1303, if it is determined that the number of empty pages in the “region to be logically converted in units smaller than the block” is not less than the predetermined value (No), “logically convert in units smaller than the block”. There are enough free pages in the area, and garbage collection is not required. In this case, it is determined whether or not data remains on the page buffer 126 (S1315). In this determination, if it is determined that data remains on the page buffer 126 (Yes) (Yes), the data is written to the PBA erased in step S1305 (S1316). Thereafter, it is determined whether or not the data has been moved by garbage collection (S1317). In this determination, if it is determined that the data has been moved by garbage collection (Yes), the logical-physical conversion table of “area to logically convert in units smaller than blocks”, that is, the area to be managed in page units The logical / physical conversion table TB3 and the logical / physical conversion table TB5 of the area managed in units of sectors, the logical / physical conversion table TBTB1 of the area managed in units of blocks, the erasable PBA table TB2, and the writable page table TB4 are updated (S1318). After that, the reset busy is canceled, and the end of the reset process is notified to the host 2 (S1319).

また、上記ステップS1308の判別において、ガベージコレクション処理に要する時間が、規定時間を越える(Yes)と判断された場合には、ガベージコレクション処理を行うべきではないので、上記ステップS1303で「ブロックより小さい単位で論物変換する領域」の空きページ数が規定値以下ではない(No)と判断された場合と同様に、ページバッファ126上にデータが残っているか否かの判別に遷移される(S1315)。   If it is determined in step S1308 that the time required for the garbage collection process exceeds the specified time (Yes), the garbage collection process should not be performed. Similarly to the case where it is determined that the number of empty pages in the “area to be logically converted in units” is not less than or equal to the predetermined value (No), the process proceeds to the determination of whether data remains on the page buffer 126 (S1315). ).

上記ステップS1310の判別において、当該ページに有効なデータが無い(No)と判断された場合には、処理ページ番号がインクリメントされた後に(S1311)、上記ステップS1308の判別に戻されることにより、次の処理ページ番号についてのガベージコレクション処理が行われる。また、上記ステップS1313の判別で、ページバッファ上のデータはページサイズ以上ではない(No)と判断された場合には、ステップS1314のデータ書込みを行うことなく、処理ページ番号がインクリメントされた後に(S1311)、上記ステップS1308の判別に戻されることにより、次の処理ページ番号についてのガベージコレクション処理が行われる。そして上記ステップS1309の判別において、処理ページ数が当該ブロックにおける最大ページ数未満ではない(No)と判断された場合には、全ての処理ページ番号についてのガベージコレクション処理が終了したことから、上記ステップS1302の確認処理に戻される。   If it is determined in step S1310 that there is no valid data on the page (No), the processing page number is incremented (S1311) and then returned to the determination in step S1308. The garbage collection process for the process page number is performed. If it is determined in step S1313 that the data on the page buffer is not equal to or larger than the page size (No), the processing page number is incremented without writing the data in step S1314 ( In step S1311, the process returns to the determination in step S1308 to perform the garbage collection process for the next process page number. If it is determined in step S1309 that the number of processed pages is not less than the maximum number of pages in the block (No), the garbage collection processing for all the processed page numbers is completed. The process returns to the confirmation process in S1302.

尚、ホスト2からリードコマンドが発行された場合には、コントローラ12によって論物変換テーブルTB1、TB3、又はTB5が参照され、当該リードコマンドにかかるデータがフラッシュメモリ11から読出されて、ホスト2に伝達される。   When a read command is issued from the host 2, the controller 12 refers to the logical / physical conversion table TB 1, TB 3, or TB 5, and data related to the read command is read from the flash memory 11 and sent to the host 2. Communicated.

この実施の形態によれば、以下の効果を得ることができる。   According to this embodiment, the following effects can be obtained.

従来システムに従えば、フラッシュメモリの消去単位やプログラム(書込み)単位毎に論理アドレスを管理していることから、ホストシステムからフラッシュSSD内のフラッシュメモリに1セクタ分のデータを書込む場合には、当該セクタを含むページのデータがフラッシュメモリからバッファメモリに読出され、その後このバッファメモリ内の該当するセクタのデータが更新され、このデータ更新後にバッファメモリ内のデータがフラッシュメモリ内の別のアドレスに書込まれる。このようにホストシステムからフラッシュSSD内のフラッシュメモリに1セクタ分のデータを書込む場合には、ホストシステムが書込みたいセクタ以外のデータをフラッシュメモリから読出さなければならず、それによって、フラッシュSSDにおける小容量書込みの高速化が阻害される。   According to the conventional system, the logical address is managed for each flash memory erase unit or program (write) unit. Therefore, when writing data for one sector from the host system to the flash memory in the flash SSD. The data of the page including the sector is read from the flash memory to the buffer memory, and then the data of the corresponding sector in the buffer memory is updated. After the data update, the data in the buffer memory is changed to another address in the flash memory. Written in. Thus, when data for one sector is written from the host system to the flash memory in the flash SSD, data other than the sector to be written by the host system must be read from the flash memory. This hinders the speeding up of small capacity writing.

これに対して図1に示されるフラッシュSSD1においては、書込みセクタ数に応じて、データの上記不揮発性記憶部における書込み先が決定される。例えばフラッシュメモリ11に対して1セクタのデータ書込みを実行する場合には、セクタ単位で管理する領域にデータ書込みが行われることになり、上記従来システムでのデータ書込みの場合のように、バッファメモリへのデータ退避を行う必要がないので、小容量書込みの高速化を図ることができる。   On the other hand, in the flash SSD 1 shown in FIG. 1, the write destination of the data in the nonvolatile storage unit is determined according to the number of write sectors. For example, when one sector of data is written to the flash memory 11, data is written to an area managed in units of sectors. As in the case of data writing in the conventional system, the buffer memory is written. Since it is not necessary to save data to the memory, it is possible to increase the speed of small-capacity writing.

また、リセット処理毎にガベージコレクション処理が行われることにより、ブロック内に有効データが有る場合に、それが全て別の領域に移動され、当該ブロックは、消去によって再度書込み可能状態とされる。これにより、書込み可能な空き容量を増やすことができる。   In addition, by performing the garbage collection process for each reset process, if there is valid data in the block, it is all moved to another area, and the block is made writable again by erasing. Thereby, the writable free space can be increased.

《実施の形態2》
図14には、本発明にかかる不揮発性半導体記憶装置の一例とされるフラッシュSSD1の別の構成例が示される。
<< Embodiment 2 >>
FIG. 14 shows another configuration example of the flash SSD 1 as an example of the nonvolatile semiconductor memory device according to the present invention.

図14に示されるフラッシュSSD1が、図1に示されるのと大きく相違するのは、複数のフラッシュメモリ11A,11B,11C,11Dが設けられている点である。フラッシュメモリ11A,11B,11C,11Dは、それぞれ公知の半導体集積回路製造技術により、例えば単結晶シリコン基板などの一つの半導体基板に形成されている。コントローラ12内のフラッシュインタフェース125と、フラッシュメモリ11A,11B,11C,11Dとは、それぞれ専用のバスBS1,BS2,BS3,BS4によって互いに結合されている。コントローラ12は、バスBS1,BS2,BS3,BS4を介してフラッシュメモリ11A,11B,11C,11Dの動作制御を行う。各フラッシュメモリ11A,11B,11C,11Dに対する動作制御の基本的な内容は、図1に示されるフラッシュSSD1の場合と同様である。   The flash SSD 1 shown in FIG. 14 is greatly different from that shown in FIG. 1 in that a plurality of flash memories 11A, 11B, 11C, and 11D are provided. Each of the flash memories 11A, 11B, 11C, and 11D is formed on one semiconductor substrate such as a single crystal silicon substrate by a known semiconductor integrated circuit manufacturing technique. The flash interface 125 in the controller 12 and the flash memories 11A, 11B, 11C, and 11D are coupled to each other by dedicated buses BS1, BS2, BS3, and BS4, respectively. The controller 12 controls the operation of the flash memories 11A, 11B, 11C, and 11D via the buses BS1, BS2, BS3, and BS4. The basic contents of the operation control for the flash memories 11A, 11B, 11C, and 11D are the same as those of the flash SSD 1 shown in FIG.

図14に示される構成において、バスBS1,BS2,BS3,BS4が常に使用されているわけではない。例えばフラッシュメモリ11A〜11Cに対してはデータの書込みが行われているが、フラッシュメモリ11Dに対してはデータの書込みが行われていない場合には、バスBS4がアイドル状態(空き状態)であることが考えられる。そこでアイドル状態のバスが存在する場合に、当該バスを利用して、対応するフラッシュメモリ11A,11B,11C,11Dについてのガベージコレクション処理を実行することができる。   In the configuration shown in FIG. 14, the buses BS1, BS2, BS3, BS4 are not always used. For example, when data is written to the flash memories 11A to 11C, but data is not written to the flash memory 11D, the bus BS4 is in an idle state (empty state). It is possible. Therefore, when there is an idle bus, garbage collection processing for the corresponding flash memories 11A, 11B, 11C, and 11D can be executed using the bus.

図15A及び図15Bには、アイドル状態のバスを用いてガベージコレクション処理を実行する場合のフローチャートが示される。尚、図15A及び図15Bにおいて、「CON2」は、処理が連続していることを示している。このガベージコレクション処理は、CPU123によって行われる。   FIGS. 15A and 15B show a flowchart in the case of executing the garbage collection process using the idle bus. In FIGS. 15A and 15B, “CON2” indicates that the processing is continuous. This garbage collection process is performed by the CPU 123.

ホスト2からコマンドが受信された後に、書込むLBAとセクタ数が取得され(S1401,S1402)、アイドル状態のバスが存在するか否かの判別が行われる(S1403)。ステップS1402で取得された情報(書込むLBAとセクタ数)によって書込み先が決定される。書込み先が決定すれば、そのとき使用されるバスが判明するため、それに基づいて、アイドル状態のバスが存在するか否かの判別が可能になる。アイドル状態のバスが無い(No)と判断された場合には、ガベージコレクションは実行されない。空きのバスがあると判断された場合には、書込み可能ページテーブルTB4を参照して、当該バスに対応するフラッシュメモリにおいて空きページ数が規定値以下のブロックがあるか否かの確認が行われる(S1404,S1405)。ステップS1405の判別において、空きページ数が規定値以下のブロックがある(Yes)と判断された場合、消去可能PBAテーブルTB2を参照して、消去可能PBAが取得されて、対応データが消去される(S1406,1407)。   After the command is received from the host 2, the LBA to be written and the number of sectors are acquired (S1401, S1402), and it is determined whether or not there is an idle bus (S1403). The write destination is determined by the information (LBA to be written and the number of sectors) acquired in step S1402. When the write destination is determined, the bus to be used at that time is determined, so that it is possible to determine whether or not there is an idle bus. If it is determined that there is no idle bus (No), garbage collection is not executed. If it is determined that there is an empty bus, it is checked whether or not there is a block whose number of empty pages is equal to or less than a predetermined value in the flash memory corresponding to the bus with reference to the writable page table TB4. (S1404, S1405). If it is determined in step S1405 that there is a block whose number of empty pages is equal to or less than the predetermined value (Yes), the erasable PBA is acquired with reference to the erasable PBA table TB2, and the corresponding data is erased. (S1406, 1407).

ガベージコレクションによるデータの移動を行う前に、ホスト2から与えられたコマンドの処理が終了しているか否かの確認が行われる(S1410)。コマンド処理が終了している(Yes)と判断された場合には、ガベージコレクションは行われない。ホスト2から与えられたコマンドの処理が終了していない(No)と判断された場合には、ガベージコレクションが実行される(S1411〜S1416)。ステップS1411〜S1416のガベージコレクション処理は、図13AにおけるステップS1309〜S1314の処理に対応する。すなわち、ブロックより小さい単位で論物変換する領域の論物変換テーブル(TB3,TB5)を参照して、選択したブロック内の有効なデータがあるか確認され(S1412)、有効なデータがある場合は、当該データをページバッファに読出される。ページバッファにページサイズ以上のデータを読み出したか否かの確認が行われ(S1415)、ページサイズ以上のデータが読出された場合に、当該データの書込み行われる(S1416)。ページサイズ未満の場合は、書込みは行われずに、ガベージコレクションが継続される。   Before moving the data by garbage collection, it is confirmed whether or not the processing of the command given from the host 2 has been completed (S1410). If it is determined that the command processing has been completed (Yes), garbage collection is not performed. If it is determined that the processing of the command given from the host 2 has not ended (No), garbage collection is executed (S1411 to S1416). The garbage collection processing in steps S1411 to S1416 corresponds to the processing in steps S1309 to S1314 in FIG. 13A. That is, referring to the logical-physical conversion table (TB3, TB5) of the area to be logically converted in units smaller than the block, it is confirmed whether there is valid data in the selected block (S1412), and there is valid data The data is read into the page buffer. It is checked whether or not data larger than the page size has been read into the page buffer (S1415), and when data larger than the page size is read, the data is written (S1416). If it is less than the page size, the garbage collection is continued without writing.

ガベージコレクションの終了条件になった場合、書込んでいないデータがページバッファ126上に残っているか否かの確認が行われ(S1417)、データが残っている場合のみ、読み出したデータの書込みが実行される(S1418)。その後、ガベージコレクション中にデータの移動を行ったか否かの判定が行われ(S1419)、データ移動を行った場合に、ブロックより小さい単位で論物変換する領域の論物変換テーブル(TB3,TB5)、ブロック単位に管理する領域の論物変換テーブルTB1、消去可能PBAテーブルTB2を更新して論物変換の対応関係が変更される(S1420)。   When the garbage collection end condition is reached, it is checked whether or not unwritten data remains on the page buffer 126 (S1417), and writing of the read data is executed only when the data remains. (S1418). Thereafter, it is determined whether or not the data has been moved during the garbage collection (S1419). When the data is moved, the logical-physical conversion table (TB3, TB5) of the area to be logically converted in units smaller than the block. ), The logical-physical conversion table TB1 and the erasable PBA table TB2 of the area managed in block units are updated to change the correspondence relationship of logical-physical conversion (S1420).

このようにアイドル状態のバスを利用することにより、フラッシュメモリのリード/ライト動作に支障を与えることなく、ガベージコレクション処理を実行することができる。   By using the bus in the idle state in this way, the garbage collection process can be executed without hindering the read / write operation of the flash memory.

《実施の形態3》
図1や図14に示される構成において、「ブロックより小さい単位で論物変換する領域」がフラッシュSSD1の全容量より少ない場合や、「ブロックより小さい単位で論物変換する領域」に書込むための領域が不足する場合にもガベージコレクションを実行することができる。
<< Embodiment 3 >>
In the configuration shown in FIG. 1 or FIG. 14, when “the area for logical-physical conversion in units smaller than the block” is less than the entire capacity of the flash SSD 1, or in the “area for logical-physical conversion in units smaller than the block” Garbage collection can be executed even when there is not enough space.

図16には、「ブロックより小さい単位で論物変換する領域」に書込むための領域が不足する場合のガベージコレクションのフローチャートが示される。   FIG. 16 shows a garbage collection flowchart in the case where there is a shortage of an area for writing in “an area for logical-physical conversion in units smaller than a block”.

ホストからライトコマンドが受信された後(S1501)、「ブロックより小さい単位で論物変換する領域」に書込むための書込み可能ページが存在するか否かの判別が行われる(S1502)。この判別において、書込み可能ページが存在する(Yes)と判断された場合には、その書込み可能ページへの書込みが実行され(S1510)、「ブロックより小さい単位で論物変換する領域」の論物変換テーブル(TB3,TB5)、書込み可能ページテーブルTB4が更新されて(S1511)、本フローチャートによる処理が終了される。上記ステップS1502の判別において、書込み可能ページが存在しない(No)と判断された場合には、消去可能PBAが規定以下か否かの判定が行われる(S1503)。この判別において、規定値以下ではない(No)と判断された場合には、消去可能ページが消去され(S1504)、消去した領域が書込み可能ページとされて、上記ステップS1510の書込み処理に遷移される。上記ステップS1503の判別において、消去可能PBAが規定値以下である(Yes)と判断された場合には、「ブロックより小さい単位で論物変換する領域」の論物変換テーブル(TB3,TB5)が参照されて、有効なデータが最小のブロックの選択が行われる(S1505)。選択したブロックの有効なデータがページバッファ126に読出され(S1506)、消去可能PBAが消去され(S1507)、ページバッファ126上の有効なデータが、消去されたブロックに書込まれる(S1508)。そして「ブロックより小さい単位で論物変換する領域」の論物変換テーブル(TB3,TB5)、書込み可能ページテーブルTB4、消去可能PBAテーブル(TB4)が更新される(S1509)。これにより、有効なデータが最小のブロックを消去可能PBAとすることができ、書込みができない無効なデータを保存した領域を空けることができる。そして上記ステップS1509の処理後に、上記ステップS1510の書込み処理に遷移される。このように、図16に示される処理によれば、「ブロックより小さい単位で論物変換する領域」がフラッシュSSD1の全容量より少ない場合や、「ブロックより小さい単位で論物変換する領域」に書込むための領域が不足する場合にもガベージコレクションを実行することができる。   After the write command is received from the host (S1501), it is determined whether or not there is a writable page to be written in the “area to be logically converted in units smaller than the block” (S1502). In this determination, when it is determined that a writable page exists (Yes), writing to the writable page is executed (S1510), and the logical area of “region to be logically converted in units smaller than the block” The conversion table (TB3, TB5) and the writable page table TB4 are updated (S1511), and the processing according to this flowchart ends. If it is determined in step S1502 that there is no writable page (No), it is determined whether or not the erasable PBA is equal to or less than a specified value (S1503). In this determination, if it is determined that it is not less than the specified value (No), the erasable page is erased (S1504), the erased area is made a writable page, and the process proceeds to the write process in step S1510. The If it is determined in step S1503 that the erasable PBA is equal to or less than the specified value (Yes), the logical-physical conversion table (TB3, TB5) of “region for logical-physical conversion in units smaller than the block” is stored. With reference to the block, the block having the smallest valid data is selected (S1505). Valid data of the selected block is read to the page buffer 126 (S1506), the erasable PBA is erased (S1507), and valid data on the page buffer 126 is written to the erased block (S1508). Then, the logical-physical conversion table (TB3, TB5), the writable page table TB4, and the erasable PBA table (TB4) of “area for logical-physical conversion in units smaller than the block” are updated (S1509). As a result, the block having the smallest valid data can be made an erasable PBA, and an area storing invalid data that cannot be written can be made free. After the process of step S1509, the process proceeds to the write process of step S1510. As described above, according to the processing shown in FIG. 16, the “area to be logically converted in units smaller than the block” is smaller than the total capacity of the flash SSD 1 or the “area to logically convert in units smaller than the block”. Garbage collection can be executed even when the area for writing is insufficient.

《実施の形態4》
フラッシュメモリの記憶素子は動作原理上絶縁体となる酸化膜を貫通する電子により劣化するため、消去回数が限られている。そこでフラッシュSSD1の製品寿命を延ばすには、ブロック毎の消去回数を平準化するのが望ましい。ブロック毎の消去回数を平準化するには、消去可能PBAテーブルTB2の他に図17に示されるような消去回数の管理するテーブルを持つ構成にすると良い。図17に示される消去回数カウント値テーブルは、図9に示されるエントリー(Entry−0〜Entry−1023)毎に、消去回数をカウントする。
<< Embodiment 4 >>
A memory element of a flash memory is deteriorated by electrons penetrating an oxide film serving as an insulator on the principle of operation, so that the number of erasures is limited. Therefore, in order to extend the product life of the flash SSD 1, it is desirable to equalize the number of erases for each block. In order to equalize the erase count for each block, it is preferable to have a table for managing the erase count as shown in FIG. 17 in addition to the erasable PBA table TB2. The erase count value table shown in FIG. 17 counts the erase count for each entry (Entry-0 to Entry-1023) shown in FIG.

図18には、図17に示される消去回数カウント値テーブルを用いた処理の流れが示される。   FIG. 18 shows the flow of processing using the erase count value table shown in FIG.

先ず、図17に示される消去回数カウント値テーブルを参照して、消去回数が最小のPBAがガベージコレクション実行PBAとして取得され(S1701)、論物変換テーブル(TB1,TB3,TB5)にガベージコレクション実行PBAが登録されていないことを確認することで、ガベージコレクション実行PBAに有効なデータが存在するか否かの判別が行われる(S1702)。この判別において、ガベージコレクション実行PBAに有効なデータが存在しない(No)と判断された場合には、ガベージコレクション実行PBAを用いてガベージコレクションが実行される(S1706)。このガベージコレクションの具体的な処理内容は、図13A,13Bや、図15A,15Bを用いて説明した通りである。そして消去回数カウント値テーブルにおける、消去を行なったPBAの消去回数がインクリメントされる(S1707)。   First, referring to the erase count value table shown in FIG. 17, the PBA having the smallest erase count is acquired as the garbage collection execution PBA (S1701), and the garbage collection is executed in the logical-physical conversion tables (TB1, TB3, TB5). By confirming that the PBA is not registered, it is determined whether or not valid data exists in the garbage collection execution PBA (S1702). In this determination, if it is determined that there is no valid data in the garbage collection execution PBA (No), garbage collection is executed using the garbage collection execution PBA (S1706). The specific processing contents of the garbage collection are as described with reference to FIGS. 13A and 13B and FIGS. 15A and 15B. Then, the erase count of the erased PBA in the erase count value table is incremented (S1707).

上記ステップS1702の判別において、ガベージコレクション実行PBAに有効なデータが存在する(Yes)と判断された場合には、消去回数が最大の消去可能PBAが消去され(S1703)、ガベージコレクション実行PBAに保存されている有効データが、上記ステップS1703で消去されたPBAに移動される(S1704)。そして、論物変換テーブルTB1,TB3,TB5、消去可能PBAテーブルTB2、書込み可能ページテーブルTB5が更新されることで、ガベージコレクション実行PBAが消去可能PBAに変更される(S1705)。   If it is determined in step S1702 that there is valid data in the garbage collection execution PBA (Yes), the erasable PBA having the maximum number of deletions is deleted (S1703) and stored in the garbage collection execution PBA. The valid data that has been deleted is moved to the PBA erased in step S1703 (S1704). The logical-physical conversion tables TB1, TB3, TB5, the erasable PBA table TB2, and the writable page table TB5 are updated, whereby the garbage collection execution PBA is changed to the erasable PBA (S1705).

図18に示される処理が定期的に行われることで、ホスト2からのコマンドによるデータ書込みが著しく少ないブロックについても、ステップS1704での処理により定期的にデータが移動され、消去可能PBAテーブルTB2や、書込み可能ページテーブルTB5に記述されることになるため、フラッシュメモリ内の全ブロックが定期的に消去対象となる。これにより、ブロック毎の消去回数を平準化することができるので、フラッシュSSD1の製品寿命を延ばすことができる。   Since the processing shown in FIG. 18 is periodically performed, even for a block in which data writing by a command from the host 2 is extremely small, data is periodically moved by the processing in step S1704, and the erasable PBA table TB2 or Therefore, all blocks in the flash memory are periodically erased because they are described in the writable page table TB5. As a result, the number of times of erasing for each block can be leveled, so that the product life of the flash SSD 1 can be extended.

以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、本発明はそれに限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist thereof.

1 フラッシュSSD
2 ホスト
11,11A〜11D フラッシュメモリ
12 コントローラ
13 外部RAM
111 バッファ
112 フラッシュアレイ
121 ROM
122 RAM
123 CPU
124 ECC
125 フラッシュインタフェース
126 ページバッファ
127 バッファインタフェース
128 ホストインタフェース
BS,BS1〜BS4 バス
1 Flash SSD
2 Host 11, 11A to 11D Flash memory 12 Controller 13 External RAM
111 Buffer 112 Flash array 121 ROM
122 RAM
123 CPU
124 ECC
125 Flash interface 126 Page buffer 127 Buffer interface 128 Host interface BS, BS1 to BS4 bus

Claims (8)

ホストシステムに接続可能な不揮発性半導体記憶装置であって、
不揮発性記憶部と、その動作制御を行うコントローラと、を含み、
上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ホストシステム側のアクセス単位と、上記不揮発性記憶部側のアクセス単位とに分けて管理し、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とを判定し、それに基づいて、上記不揮発性記憶部における対応領域に、上記ホストシステムからの書込み指示に係るデータを書込むことを特徴とする不揮発性半導体記憶装置。
A non-volatile semiconductor storage device connectable to a host system,
A nonvolatile storage unit and a controller for controlling the operation thereof,
The controller manages the correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit separately for the access unit on the host system side and the access unit on the nonvolatile storage unit side In accordance with the size of the data related to the write instruction from the host system, the management in the access unit on the host system side and the management in the access unit on the nonvolatile storage unit side are determined, and based on A nonvolatile semiconductor memory device, wherein data related to a write instruction from the host system is written into a corresponding area in the nonvolatile memory unit.
上記不揮発性記憶部の消去単位をブロックとし、上記不揮発性記憶部の書込み単位をページとし、上記ホストシステムからの書込み単位をセクタとするとき、上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ブロック単位と、上記ページ単位と、上記セクタ単位とに分けて管理する請求項1記載の不揮発性半導体記憶装置。   When the erase unit of the non-volatile storage unit is a block, the write unit of the non-volatile storage unit is a page, and the write unit from the host system is a sector, the controller has a logical address on the host system side and the The nonvolatile semiconductor memory device according to claim 1, wherein the correspondence relationship with the physical address on the nonvolatile memory unit side is managed separately for the block unit, the page unit, and the sector unit. 上記不揮発性記憶部は、上記ブロック単位での管理に対応する第1領域と、上記ページ単位での管理に対応する第2領域と、上記セクタ単位での管理に対応する第3領域とを含み、
上記コントローラは、上記ホストシステムからの書込み指示に係るデータのサイズが上記ブロックのサイズより大きい場合には上記第1領域に上記データを書込み、上記ホストシステムからの書込み指示に係るデータのサイズが上記ブロックのサイズより小さく、且つ、上記ページのサイズより大きい場合には上記第2領域に上記データを書込み、上記ホストシステムからの書込み指示に係るデータのサイズが上記ブロックのサイズより小さく、且つ、上記ページのサイズより小さい場合には上記第3領域に上記データを書込む請求項2記載の不揮発性半導体記憶装置。
The nonvolatile storage unit includes a first area corresponding to the management in the block unit, a second area corresponding to the management in the page unit, and a third area corresponding to the management in the sector unit. ,
The controller writes the data in the first area when the size of the data related to the write instruction from the host system is larger than the size of the block, and the size of the data related to the write instruction from the host system is When the size is smaller than the block size and larger than the page size, the data is written to the second area, the size of the data related to the write instruction from the host system is smaller than the block size, and 3. The nonvolatile semiconductor memory device according to claim 2, wherein when the size is smaller than a page size, the data is written in the third area.
上記コントローラは、上記第2領域に対応するブロック又は上記第3領域に対応するブロックにおける有効データを別の領域に移動することによって、上記第2領域又は上記第3領域の空きを増やすためのガベージコレクション処理を実行する請求項3記載の不揮発性半導体記憶装置。   The controller moves the valid data in the block corresponding to the second area or the block corresponding to the third area to another area, thereby increasing the garbage in the second area or the third area. The nonvolatile semiconductor memory device according to claim 3, wherein the collection process is executed. 上記コントローラは、リセット処理毎に上記ガベージコレクション処理を実行する請求項4記載の不揮発性半導体記憶装置。   The nonvolatile semiconductor memory device according to claim 4, wherein the controller executes the garbage collection process every reset process. 上記コントローラは、上記フラッシュメモリとの間で信号のやり取りを可能とするバスがアイドル状態の際に上記ガベージコレクション処理を実行する請求項4記載の不揮発性半導体記憶装置。   The nonvolatile semiconductor memory device according to claim 4, wherein the controller executes the garbage collection process when a bus that enables signal exchange with the flash memory is in an idle state. 上記コントローラは、上記第2領域又は上記第3領域の書込み可能ページ数が所定数よりも小さい場合に上記ガベージコレクション処理を実行する請求項4記載の不揮発性半導体記憶装置。   5. The nonvolatile semiconductor memory device according to claim 4, wherein the controller executes the garbage collection process when the number of writable pages in the second area or the third area is smaller than a predetermined number. 不揮発性半導体記憶装置と、上記不揮発性半導体記憶装置にアクセス可能なホストシステムと、を含むデータ処理システムであって、
上記不揮発性半導体記憶装置は、不揮発性記憶部と、その動作制御を行うコントローラと、を含み、
上記コントローラは、上記ホストシステム側の論理アドレスと上記不揮発性記憶部側の物理アドレスとの対応関係を、上記ホストシステム側のアクセス単位と、上記不揮発性記憶部側のアクセス単位とに分けて管理し、上記ホストシステムからの書込み指示に係るデータのサイズに応じて、上記ホストシステム側のアクセス単位での管理と、上記不揮発性記憶部側のアクセス単位での管理とを判定し、それに基づいて、上記不揮発性記憶部における対応領域に、上記ホストシステムからの書込み指示に係るデータを書込むことを特徴とするデータ処理システム。
A data processing system comprising a nonvolatile semiconductor memory device and a host system accessible to the nonvolatile semiconductor memory device,
The non-volatile semiconductor storage device includes a non-volatile storage unit and a controller that controls the operation thereof,
The controller manages the correspondence between the logical address on the host system side and the physical address on the nonvolatile storage unit separately for the access unit on the host system side and the access unit on the nonvolatile storage unit side In accordance with the size of the data related to the write instruction from the host system, the management in the access unit on the host system side and the management in the access unit on the nonvolatile storage unit side are determined, and based on A data processing system, wherein data related to a write instruction from the host system is written into a corresponding area in the nonvolatile storage unit.
JP2011023746A 2011-02-07 2011-02-07 Non-volatile semiconductor storage device and data processing system Withdrawn JP2012164114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011023746A JP2012164114A (en) 2011-02-07 2011-02-07 Non-volatile semiconductor storage device and data processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011023746A JP2012164114A (en) 2011-02-07 2011-02-07 Non-volatile semiconductor storage device and data processing system

Publications (1)

Publication Number Publication Date
JP2012164114A true JP2012164114A (en) 2012-08-30

Family

ID=46843450

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011023746A Withdrawn JP2012164114A (en) 2011-02-07 2011-02-07 Non-volatile semiconductor storage device and data processing system

Country Status (1)

Country Link
JP (1) JP2012164114A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150142583A (en) * 2014-06-12 2015-12-22 삼성전자주식회사 A method of organizing an address mapping table in a flash storage device
WO2016046880A1 (en) * 2014-09-22 2016-03-31 株式会社日立製作所 Storage device, semiconductor memory device, and method for controlling same
CN110321065A (en) * 2018-03-30 2019-10-11 东芝存储器株式会社 Storage device and computer system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150142583A (en) * 2014-06-12 2015-12-22 삼성전자주식회사 A method of organizing an address mapping table in a flash storage device
KR102430198B1 (en) 2014-06-12 2022-08-05 삼성전자주식회사 A method of organizing an address mapping table in a flash storage device
WO2016046880A1 (en) * 2014-09-22 2016-03-31 株式会社日立製作所 Storage device, semiconductor memory device, and method for controlling same
US10049042B2 (en) 2014-09-22 2018-08-14 Hitachi, Ltd. Storage device, semiconductor memory device, and method for controlling same
CN110321065A (en) * 2018-03-30 2019-10-11 东芝存储器株式会社 Storage device and computer system

Similar Documents

Publication Publication Date Title
TWI579693B (en) Mapping table loading method, memory control circuit unit and mempry storage apparatus
TWI506430B (en) Method of recording mapping information method, and memory controller and memory storage apparatus using the same
US8055873B2 (en) Data writing method for flash memory, and controller and system using the same
US8417875B2 (en) Non-volatile memory controller processing new request before completing current operation, system including same, and method
US9176865B2 (en) Data writing method, memory controller, and memory storage device
JP2018049522A (en) Memory system and control method
TWI592865B (en) Data reading method, data writing method and storage controller using the same
CN110781096A (en) Apparatus and method for performing garbage collection by predicting demand time
TWI607448B (en) Data writing method, memory control circuit unit and mempry storage apparatus
US9436267B2 (en) Data storage device
US20150277786A1 (en) Method, device, and program for managing a flash memory for mass storage
US10606484B2 (en) NAND flash storage device with NAND buffer
TW201719415A (en) Buffer memory management method, memory control circuit unit and memory storage device
US9389998B2 (en) Memory formatting method, memory controller, and memory storage apparatus
JP4745465B1 (en) Semiconductor memory device and method for controlling semiconductor memory device
US11762590B2 (en) Memory system and data processing system including multi-core controller for classified commands
US9037781B2 (en) Method for managing buffer memory, memory controllor, and memory storage device
TW202006553A (en) Methods for internal data movement of a flash memory and apparatuses using the same
TW201801089A (en) Data writing method, memory control circuit unit and memory storage apparatus
US11210226B2 (en) Data storage device and method for first processing core to determine that second processing core has completed loading portion of logical-to-physical mapping table thereof
CN111796759A (en) Computer readable storage medium and method for fragment data reading on multiple planes
WO2017022082A1 (en) Flash memory package and storage system including flash memory package
KR101465460B1 (en) Execution method for trim and data managing apparatus
JP2012164114A (en) Non-volatile semiconductor storage device and data processing system
JP5204265B2 (en) Semiconductor memory device and method for controlling semiconductor memory device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513