JP4837144B2 - Semiconductor memory device and control method thereof - Google Patents

Semiconductor memory device and control method thereof Download PDF

Info

Publication number
JP4837144B2
JP4837144B2 JP2011169992A JP2011169992A JP4837144B2 JP 4837144 B2 JP4837144 B2 JP 4837144B2 JP 2011169992 A JP2011169992 A JP 2011169992A JP 2011169992 A JP2011169992 A JP 2011169992A JP 4837144 B2 JP4837144 B2 JP 4837144B2
Authority
JP
Japan
Prior art keywords
access
time
main memory
compaction
request
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.)
Expired - Fee Related
Application number
JP2011169992A
Other languages
Japanese (ja)
Other versions
JP2011227930A (en
Inventor
浩尚 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2011169992A priority Critical patent/JP4837144B2/en
Publication of JP2011227930A publication Critical patent/JP2011227930A/en
Application granted granted Critical
Publication of JP4837144B2 publication Critical patent/JP4837144B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はフラッシュメモリを用いた半導体記憶装置及びその制御方法に関し、特にコンパクションサーチの制御に関する。   The present invention relates to a semiconductor memory device using a flash memory and a control method thereof, and more particularly to control of a compaction search.

一般に不揮発性メモリ、例えばフラッシュメモリはデータの書き込みの際に上書きができないので、一旦消去してからデータ書き込みを行う必要がある。このようなデータの書き込みや消去を繰り返すと、分断された不要な領域が消去されずに残る。この不要な領域を消去し、使用している領域を連続した領域に纏める処理はコンパクション、あるいはガーベジコレクションと呼ばれる。従来の半導体記憶装置のガーベジコレクション処理は例えば、特許文献1に記載されている。   In general, a nonvolatile memory, for example, a flash memory cannot be overwritten when data is written. Therefore, it is necessary to erase data once and then write data. When such data writing and erasing are repeated, the divided unnecessary areas remain without being erased. The process of erasing unnecessary areas and collecting used areas into a continuous area is called compaction or garbage collection. A conventional garbage collection process of a semiconductor memory device is described in Patent Document 1, for example.

メモリ部のアドレス(A,a)にホストからのライト要求に基づき、データDが書き込まれる。その後、再度ホストからアドレス(A,a)のフレームにライト要求があり、データが書き込まれていないフレーム、例えばアドレス(B,m)のデータ部にデータの新しいバージョンであるD−1が書き込まれる。アドレス(A,a)のポインタ部には、リンク先のアドレスとして“B,m”が書き込まれる。その後、さらにホストからアドレス(A,a)にライト要求があると、上記と同様にデータが書き込まれていないフレーム、例えばアドレス(C,n)のデータ部にデータD−2が書き込まれる。アドレス(B,m)のポインタ部には、リンク先のアドレスとして“C,n”が書き込まれる。   Data D is written to the address (A, a) of the memory unit based on a write request from the host. Thereafter, there is a write request from the host to the frame at address (A, a) again, and a new version of data D-1 is written to the frame where no data is written, for example, the data portion at address (B, m). . In the pointer portion of the address (A, a), “B, m” is written as the link destination address. Thereafter, when there is a write request from the host to the address (A, a), the data D-2 is written to the frame in which no data is written, for example, the data portion of the address (C, n), as described above. In the pointer portion of the address (B, m), “C, n” is written as the link destination address.

このような状態でガーベジコレクションを行う場合、アドレス(B,m)のフレームは単にリンク関係を示しているだけであって、データとしては意味を持たないものである。従って、ガーベジコレクションはこの“B,m”のフレームを消去する。   When garbage collection is performed in such a state, the frame at the address (B, m) merely indicates a link relationship and has no meaning as data. Therefore, garbage collection erases the frame “B, m”.

この処理としては、先ずアドレス(A,a)のフレームデータをバッファ部に退避させ、バッファ上でそのポインタをC,nに書き換える。とともに、アドレス(B,m)、(A,a)のデータを消去する。その後、ポインタを書き換えたアドレス(A,a)のデータをメモリ部の同じアドレスに書き込む。これによって、アドレス(A,a)のリンク先は直接(C,n)となり、アドレス(B,m)のフレームはデータが書き込み可能なフレームとなる。   In this process, first, the frame data at the address (A, a) is saved in the buffer unit, and the pointer is rewritten to C, n on the buffer. At the same time, the data at addresses (B, m) and (A, a) are erased. Thereafter, the data at the address (A, a) with the rewritten pointer is written to the same address in the memory unit. As a result, the link destination of the address (A, a) is directly (C, n), and the frame of the address (B, m) is a frame into which data can be written.

しかし、このようにポインタ部に従って書き換え制御をすると、ホストからのライト要求に対してそのリンク先をたどっていく必要があり、時間がかかる問題があり、特許文献1では、指示アドレス部、バリッドビット部、論理アドレス部からなるテーブル部を設けている。指示アドレス部はホストから不揮発性メモリに対してデータをアクセスする際に、ホストから指示されるアドレスを示す部分である。バリッドビット部は該当するメモリ部のメモリブロックにデータが格納されているか否かを示す部分である。論理アドレス部はホストから指示されたアドレスを論理的に変換し、メモリ部のメモリブロックのアドレスを決定する部分である。   However, when rewriting control is performed according to the pointer portion in this way, it is necessary to follow the link destination in response to a write request from the host, which is time consuming. A table part comprising a part and a logical address part is provided. The instruction address part is a part indicating an address instructed by the host when accessing data from the host to the nonvolatile memory. The valid bit part is a part indicating whether or not data is stored in the memory block of the corresponding memory part. The logical address part is a part that logically converts an address instructed by the host and determines the address of the memory block in the memory part.

ガーベジコレクション制御手段は予め設定した閾値を有し、ホストからライト要求があった場合、上記テーブル部を参照してデータ書き込み済みブロック数とライト要求を実行するためのメモリブロック数の加算値が閾値を超えているか否かを判定し、加算値が閾値を超えている場合はメモリ部のガーベジコレクションを実行する。閾値はメモリ部の代替領域の90%を示す値等、適宜の値が設定される。このように閾値を基にガーベジコレクションを行うので、ホストからのライト要求を実行している最中にガーベジコレクション処理を実行しなければならないといったことを防止することができる。   The garbage collection control means has a preset threshold value, and when there is a write request from the host, the added value of the number of data written blocks and the number of memory blocks for executing the write request with reference to the table section is the threshold value. If the sum exceeds the threshold, garbage collection of the memory unit is executed. As the threshold value, an appropriate value such as a value indicating 90% of the alternative area of the memory unit is set. Since garbage collection is performed based on the threshold value in this way, it is possible to prevent the garbage collection process from being executed while a write request from the host is being executed.

さらに、特許文献1では、ガーベジコレクション制御手段はタイマ機能を備えている。メモリ部16におけるメモリブロックの使用状況をテーブル部19を参照して監視し、当該メモリブロックの状況が閾値を超えていない場合はメモリブロックに書き込みを行うと共に、タイマをセットし、メモリブロックの状況が閾値を超えている場合はメモリ部のガーベジコレクションを行うとともに、タイマをリセットする。そして、タイマがセット状態でかつ、その所定時間経過後はガーベジコレクションを実行するといった機能を有する。このようにガーベジコレクションを定期的に行うことによっても、ホストからのライト要求を実行している最中にガーベジコレクション処理を実行しなければならないといったことを防止することができる。   Furthermore, in Patent Document 1, the garbage collection control means has a timer function. The usage status of the memory block in the memory unit 16 is monitored with reference to the table unit 19, and when the status of the memory block does not exceed the threshold value, the memory block is written and a timer is set to determine the status of the memory block. When the threshold value exceeds the threshold value, the memory part is garbage collected and the timer is reset. The timer is in a set state and has a function of executing garbage collection after the predetermined time has elapsed. By periodically performing garbage collection in this way, it is possible to prevent the garbage collection process from having to be executed while the write request from the host is being executed.

特開平6−222985号公報(段落0011−0015、0028、0039、0050)JP-A-6-222985 (paragraphs 0011-0015, 0028, 0039, 0050)

特許文献1記載の装置はガーベジコレクションを定期的に実施している。ガーベジコレクションを実施するためには、ガーベジコレクション制御手段がテーブル部を参照してデータが書き込まれていないフレームのアドレスを探す必要があり、ガーベジコレクション処理の全体に対するこのサーチ処理の時間の占める割合が大きいことが問題であった。   The apparatus described in Patent Document 1 periodically performs garbage collection. In order to perform garbage collection, the garbage collection control means needs to look up the address of the frame in which no data is written with reference to the table portion, and the ratio of the time of this search processing to the entire garbage collection processing is Big was the problem.

本発明はコンパクション候補の検索を効率良く行うことができる半導体記憶装置を提供することを目的とする。   An object of the present invention is to provide a semiconductor memory device that can efficiently search for a compaction candidate.

本発明の一態様による半導体記憶装置は、不揮発性メモリと、前記不揮発性メモリに接続されるコントローラと、を具備する半導体記憶装置であって、前記コントローラは、前記不揮発性メモリのコンパクション候補を決定するための候補情報を格納するメインメモリと、前記メインメモリの候補情報のアクセス要求を発行する要求発行手段と、前記要求発行手段により発行されたアクセス要求を所定時間遅延する遅延手段と、前記遅延手段により遅延されたアクセス要求に基づいて前記メインメモリの候補情報をアクセスするアクセス手段を具備する。   A semiconductor memory device according to an aspect of the present invention is a semiconductor memory device including a nonvolatile memory and a controller connected to the nonvolatile memory, and the controller determines a compaction candidate for the nonvolatile memory. Main memory for storing candidate information for requesting, request issuing means for issuing an access request for candidate information in the main memory, delay means for delaying an access request issued by the request issuing means, and the delay Access means for accessing the candidate information in the main memory based on the access request delayed by the means;

本発明の一態様によれば、メインメモリのコンパクション候補情報のアクセス要求が遅延されて実行されるので、コンパクション候補情報のためのメインメモリのアクセスが単位時間内に集中することが防止され、ユーザデータ転送に係るメインメモリの本来のアクセスがコンパクション対象候補情報のためのアクセスにより妨害されず、半導体記憶装置の性能劣化を防止できる。   According to one aspect of the present invention, since the access request for the compaction candidate information in the main memory is executed with a delay, it is possible to prevent access to the main memory for the compaction candidate information from being concentrated within a unit time. The original access of the main memory for data transfer is not hindered by the access for the compaction target candidate information, and the performance degradation of the semiconductor memory device can be prevented.

本発明の実施の形態に係る半導体記憶装置の図である。1 is a diagram of a semiconductor memory device according to an embodiment of the present invention. コンパクションサーチのための有効ページ管理ビットマップテーブルを示す図である。It is a figure which shows the effective page management bitmap table for a compaction search. 本発明の実施の形態に係るコンパクションサーチを示すフローチャートである。It is a flowchart which shows the compaction search which concerns on embodiment of this invention. アクセス要求とその確認を遅延する遅延回路の様子を示す図である。It is a figure which shows the mode of the delay circuit which delays an access request and its confirmation.

以下、図面を参照して本発明の実施の形態について詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は第1実施形態の半導体記憶装置の全体構成を示す図である。実施形態は複数の半導体不揮発性メモリ、例えばNAND型フラッシュメモリ10、10…10とフラッシュメモリコントローラ12を具備する。各フラッシュメモリ10、10…10は例えば2〜16個のメモリチップからなる。フラッシュメモリコントローラ12はフラッシュメモリ10、10…10に接続されるフラッシュメモリI/F30を具備する。フラッシュメモリ10、10…10が並列にアクセス可能な場合は、図示していないがフラッシュメモリI/F30もn個設けられ、それぞれがフラッシュメモリ10、10…10に接続される。フラッシュメモリI/F30はプログラム、リード、イレース等の動作モードに関してフラッシュメモリ10、10…10を個別に制御する。 FIG. 1 is a diagram showing an overall configuration of the semiconductor memory device of the first embodiment. The embodiment includes a plurality of semiconductor nonvolatile memories, for example, NAND flash memories 10 0 , 10 1 ... 10 n and a flash memory controller 12. Each flash memory 10 0 , 10 1 ... 10 n is composed of, for example, 2 to 16 memory chips. The flash memory controller 12 includes a flash memory I / F 30 connected to the flash memories 10 0 , 10 1 ... 10 n . If the flash memory 10 0, 10 1 ... 10 n are accessible in parallel, not shown flash memory I / F30 also provided n pieces are connected respectively to the flash memory 10 0, 10 1 ... 10 n The The flash memory I / F 30 individually controls the flash memories 10 0 , 10 1 ... 10 n regarding operation modes such as program, read, and erase.

フラッシュメモリコントローラ12はCPU22と、メインメモリ24と、コマンドプロセッサ40と、データプロセッサ42と、調停回路28と、コンパクションサーチエンジン36とを具備する。これらの構成要素はCPUバス20に接続される。メインメモリ24はDRAMからなり、フラッシュメモリ10、10…10のコンパクション処理のためのブロック内有効ページ管理ビットマップテーブル26とコンパクション候補管理テーブル25とを含む。 The flash memory controller 12 includes a CPU 22, a main memory 24, a command processor 40, a data processor 42, an arbitration circuit 28, and a compaction search engine 36. These components are connected to the CPU bus 20. The main memory 24 is composed of DRAM and includes an in-block effective page management bitmap table 26 and a compaction candidate management table 25 for compaction processing of the flash memories 10 0 , 10 1 ... 10 n .

フラッシュメモリコントローラ12のCPUバス20には外付けのROM14も接続される。ROM14はファームウェア16を含む。ファームウェア16はCPU22を使用し、フラッシュメモリI/F30内部へのI/Oコマンドアクセスによりフラッシュメモリ10、10、…10へのリードコマンド、ライトコマンドの発行を行う。 An external ROM 14 is also connected to the CPU bus 20 of the flash memory controller 12. The ROM 14 includes firmware 16. The firmware 16 uses the CPU 22 to issue a read command and a write command to the flash memories 10 1 , 10 2 ,... 10 n by an I / O command access to the flash memory I / F 30.

フラッシュメモリI/F30はCPU22からの命令を受理し、NAND型フラッシュメモリ10、10、…10とメインメモリ24間のデータ転送を実施する。 The flash memory I / F 30 receives an instruction from the CPU 22 and performs data transfer between the NAND flash memories 10 1 , 10 2 ,... 10 n and the main memory 24.

ファームウェア16はROM14にプログラムされた内容が、システム電源起動時に、CPU22内部の一時記憶部もしくはメインメモリ24に転送されて動作するものとする。   It is assumed that the firmware 16 operates by transferring the content programmed in the ROM 14 to the temporary storage unit in the CPU 22 or the main memory 24 when the system power supply is activated.

ブロック内有効ページ管理ビットマップテーブル26は、図2に示すように構成されている。NAND型フラッシュメモリ10、10、…10の各ページが有効(Valid)か無効(Invalid)かを示すためのビットマップ構成をとる。NAND型フラッシュメモリ10、10、…10の全体を所定のバイト、例えば2112バイトに分け、それ毎に1ページを構成し、所定のページ、例えば64ページが1ブロックを構成する。有効とは、当該ページ内に書き込まれたデータが存在し、そのデータは有効であることを示している。無効とは、当該ページ内に何も書き込まれていないか、もしくは当該ページ内に以前書き込まれていたデータが無効になった場合(データが上書きされた場合)を示している。 The intra-block valid page management bitmap table 26 is configured as shown in FIG. The NAND flash memory 10 1 , 10 2 ,... 10 n has a bit map configuration for indicating whether each page is valid (Valid) or invalid (Invalid). The entire NAND flash memory 10 1 , 10 2 ,... 10 n is divided into predetermined bytes, for example, 2112 bytes, and one page is formed for each of them, and predetermined pages, for example, 64 pages form one block. Valid indicates that there is data written in the page and that the data is valid. “Invalid” indicates that nothing has been written in the page, or data previously written in the page has become invalid (when data has been overwritten).

ブロック内有効ページ管理ビットマップテーブル26はNAND型フラッシュメモリ10、10、…10への書き込みが発生すると、有効/無効状態が更新される。ここで、ファームウェア16からの書き込み操作は論理ブロックアドレス(LBA: Logical Block Address)を用いて実施される。従って、NAND型フラッシュメモリ10、10、…10に対して実際に書き込む場合は、論理アドレスを物理アドレス(ブロックアドレス、ページアドレス)に変換して、データが書き込まれる。 The valid / invalid state of the intra-block valid page management bitmap table 26 is updated when writing to the NAND flash memories 10 1 , 10 2 ,... 10 n occurs. Here, the write operation from the firmware 16 is performed using a logical block address (LBA). Therefore, when data is actually written to the NAND flash memories 10 1 , 10 2 ,... 10 n , the logical address is converted into a physical address (block address, page address) and data is written.

NAND型フラッシュメモリ10、10、…10は同一セルへの書き込みを実施することによる寿命の極端な低下を防ぐため、同じLBAでデータを複数回書き込む場合でも、以前書き込んだ物理アドレスとは異なる物理アドレスのページにデータを新規に書き込み、以前書き込んだ物理アドレスのページに格納されているデータを無効とするコンパクション処理を行う。この有効/無効管理を実施するためにブロック内有効ページ管理ビットマップテーブル26が存在している。 The NAND flash memories 10 1 , 10 2 ,..., 10 n prevent the lifetime from being drastically reduced by performing writing to the same cell, so even if data is written multiple times with the same LBA, Performs a compaction process that newly writes data to pages with different physical addresses and invalidates the data stored in pages with previously written physical addresses. In order to carry out this valid / invalid management, an intra-block valid page management bitmap table 26 exists.

従って、このような書き込み操作を実施しながらシステムが動作しているうちに、いずれは有効ページ数の少ないブロック(すなわち、コンパクション処理の候補対象となるブロック)が発生してくるのは必須である。   Therefore, while the system is operating while performing such a write operation, it is essential that a block with a small number of valid pages (that is, a block targeted for compaction processing) is generated. .

ファームウェア16はブロック内有効ページ数を一意にカウントし、有効数がある一定数以下であれば、そのブロックをコンパクション対象の一つとしてコンパクション候補管理テーブル25にエントリし、その中のいずれかのブロックをコンパクション処理に適用する。コンパクション処理とは、コンパクション対象の複数のブロック内の有効ページデータをかき集めて、別のブロックに移動させ、移動元のページを無効化し、何も書かれていない空きブロックを作り出す操作のことである。   The firmware 16 uniquely counts the number of valid pages in the block, and if the valid number is equal to or less than a certain number, the block is entered in the compaction candidate management table 25 as one of compaction targets, and one of the blocks in the block Is applied to the compaction process. Compaction processing is an operation that collects valid page data in multiple blocks to be compacted, moves them to another block, invalidates the source page, and creates an empty block in which nothing is written. .

ブロック内有効ページ管理ビットマップテーブル26が示すブロック内有効ページ数のカウント用の専用のハードウェアとしてコンパクションサーチエンジン36が設けられている。ファームウェア16は定期的、もしくは一意に該エンジン36を動作させてメインメモリ24内のブロック内有効ページ管理ビットマップテーブル26にアクセスしてブロック内有効ページ数をカウントして、コンパクション対象を検索特定し、コンパクション候補管理テーブル25に追加する。そのため、検索動作中はメインメモリ24へのアクセスが一時的に集中することがあり、NAND型フラッシュメモリ10、10、…10あるいはCPU22とのデータ転送に必要なメモリアクセスを阻害し、ユーザに対するデータ提供速度性能を劣化させることがあった。 A compaction search engine 36 is provided as dedicated hardware for counting the number of in-block valid pages indicated by the in-block valid page management bitmap table 26. The firmware 16 periodically or uniquely operates the engine 36 to access the intra-block valid page management bitmap table 26 in the main memory 24 and count the number of valid pages in the block to search and specify the compaction target. , Added to the compaction candidate management table 25. Therefore, during the search operation may access to the main memory 24 is temporarily centralized, NAND-type flash memory 10 1, 10 2, ... inhibit a memory access required for data transfer between the 10 n or CPU 22, Data provision speed performance for users may be degraded.

本実施形態ではコンパクションサーチエンジン36がブロック内有効ページ管理ビットマップテーブル26を検索するために発行するメインメモリ24へのアクセス要求REQ1を遅延回路32を介して遅延し要求REQCとしてから調停回路28に供給している。調停回路28には、要求REQCに加えて、フラッシュメモリI/F30から発行されたメインメモリ24へのアクセス要求REQAと、CPU22から発行されたメインメモリ24へのアクセス要求REQBが入力され、これらの3つの要求間でバスの使用権を与える要求を決める調停(アービトレーション)が行われる。調停の結果、バスの使用権が与えられたアクセス要求が順番に実施される。バス使用権が与えられメインメモリ24へのアクセスが終了すると、確認ACKC、ACKA、ACKBが遅延回路32、フラッシュメモリI/F30、CPU22に返送される。   In the present embodiment, the compaction search engine 36 delays the access request REQ1 to the main memory 24 issued to search the intra-block valid page management bitmap table 26 via the delay circuit 32, and the request request REQC is sent to the arbitration circuit 28. Supply. In addition to the request REQC, the arbitration circuit 28 receives an access request REQA to the main memory 24 issued from the flash memory I / F 30 and an access request REQB to the main memory 24 issued from the CPU 22. Arbitration (arbitration) is performed to determine a request to give the right to use the bus among the three requests. As a result of the arbitration, access requests to which the right to use the bus is given are executed in order. When the bus use right is given and the access to the main memory 24 is completed, confirmation ACKC, ACKA, and ACKB are returned to the delay circuit 32, the flash memory I / F 30, and the CPU 22.

遅延回路32は要求PRQ1と同様に確認ACKCも遅延(遅延時間は要求に対する遅延時間と同じでもよいし、異なっていてもよい)して確認AKC1としてコンパクションサーチエンジン36に送信する。遅延回路32の遅延時間はCPU22により調整値が設定される遅延時間調整回路34により調整される。CPU22はファームウェア16が管理するコマンドによりメインメモリ24のアクセス頻度を検出することができるようになっている。このため、遅延時間はメインメモリ24のアクセス頻度に応じて調整される。あるいは、ファームウェア16が管理するコマンドを利用しないで、図示しないハードウェアによりバスライン20を直接モニタすることにより、メインメモリのアクセス頻度を検出してもよい。   Similarly to the request PRQ1, the delay circuit 32 also delays the confirmation ACKC (the delay time may be the same as or different from the delay time for the request) and transmits it to the compaction search engine 36 as the confirmation AKC1. The delay time of the delay circuit 32 is adjusted by a delay time adjustment circuit 34 in which an adjustment value is set by the CPU 22. The CPU 22 can detect the access frequency of the main memory 24 by a command managed by the firmware 16. For this reason, the delay time is adjusted according to the access frequency of the main memory 24. Alternatively, the access frequency of the main memory may be detected by directly monitoring the bus line 20 with hardware (not shown) without using a command managed by the firmware 16.

フラッシュメモリコントローラ12はコマンドプロセッサ40とデータプロセッサ42も含む。コマンドプロセッサ40はCPU22からのリードコマンド、ライトコマンドをNAND型フラッシュメモリ10、10、…10に与える。データプロセッサ42はNAND型フラッシュメモリ10、10、…10のリードデータやライトデータを処理する。 The flash memory controller 12 also includes a command processor 40 and a data processor 42. The command processor 40 gives a read command and a write command from the CPU 22 to the NAND flash memories 10 1 , 10 2 ,... 10 n . The data processor 42 processes read data and write data of the NAND flash memories 10 1 , 10 2 ,... 10 n .

図3はコンパクションサーチの処理を示すフローチャートである。ブロック#12でCPU22はコンパクションサーチを行うためのコンパクションサーチエンジン36を起動する。起動時には、コンパクションサーチエンジン36に検索開始アドレスと検索データサイズを与える。コンパクションサーチエンジン36はこれらで指定されたメインメモリ24の領域のデータをリードする。すなわち、ここでは検索開始アドレスの初期値はメインメモリ24の有効ページ管理ビットマップテーブル26の最初のアドレスであり、検索データサイズは有効ページ管理ビットマップテーブル26のサイズである。CPU22はユーザデータの転送とNANDフラッシュに関わるデータの転送が実施中でも、コンパクションサーチを開始できる。   FIG. 3 is a flowchart showing the compaction search process. In block # 12, the CPU 22 activates a compaction search engine 36 for performing a compaction search. At startup, the compaction search engine 36 is provided with a search start address and a search data size. The compaction search engine 36 reads the data in the area of the main memory 24 designated by these. That is, here, the initial value of the search start address is the first address of the valid page management bitmap table 26 in the main memory 24, and the search data size is the size of the valid page management bitmap table 26. The CPU 22 can start the compaction search even while user data transfer and data transfer related to the NAND flash are being executed.

ブロック#14でCPU22はファームウェア16が管理するコマンドによりメインメモリ24のアクセス頻度を検出し、アクセス頻度情報を遅延時間調整回路34に設定する。アクセス頻度が基準の頻度より混雑しているか否かブロック#16で判定する。基準の頻度よりアクセスが混雑している場合は、ブロック#18で遅延時間を長くし、逆に基準の頻度よりアクセスが空いている場合は、ブロック#20で遅延時間を短くする。このため、アクセスが混雑している場合は遅延回路32の遅延時間は長くなり、アクセスが空いている場合は遅延時間は短くなる。遅延時間は要求REQ1に対する遅延時間と、確認ACKCに対する遅延時間が異なっても良いし、同じでも良い。   In block # 14, the CPU 22 detects the access frequency of the main memory 24 by a command managed by the firmware 16, and sets the access frequency information in the delay time adjustment circuit 34. It is determined in block # 16 whether or not the access frequency is more crowded than the reference frequency. When the access is more congested than the reference frequency, the delay time is lengthened in block # 18, and conversely, when the access is vacant than the reference frequency, the delay time is shortened in block # 20. For this reason, when the access is congested, the delay time of the delay circuit 32 becomes long, and when the access is free, the delay time becomes short. The delay time for the request REQ1 may be different from the delay time for the confirmation ACKC or may be the same.

ブロック#22でコンパクションサーチエンジン36はメインメモリ24へのアクセス要求REQ1をアサートする。アクセス要求REQ1がアサートされてから遅延時間T後にブロック#24で調停回路28へのアクセス要求REQCがアサートされる。このため、遅延時間Tが長くなれば、コンパクションサーチエンジン36からのメインメモリ24へのアクセス要求REQ1の実行頻度が低下する。 In block # 22, the compaction search engine 36 asserts an access request REQ1 to the main memory 24. After a delay time T 0 from the assertion of the access request REQ1, the access request REQC to the arbitration circuit 28 is asserted in block # 24. Therefore, the longer the delay time T 0, the execution frequency of the access request REQ1 to the main memory 24 from the compaction search engine 36 is reduced.

調停回路28はブロック#26でフラッシュメモリI/F30から発行されたメインメモリ24へのアクセス要求REQAと、CPU22から発行されたメインメモリ24へのアクセス要求REQBと、遅延回路32から発行されたアクセス要求REQC(コンパクションサーチエンジン36から発行されたアクセス要求REQ1が時間Tだけ遅延された要求)との間で一般的なアービトレーション(バス使用権の調停)を行う。アクセス要求REQCがバス使用権を持つと、ブロック#28で有効ページ管理ビットマップテーブル26のデータがアクセスされ、コンパクション候補を決定するための候補情報(ブロック内有効ページ数が一定数以下であるブロックを見つけるための各ページの有効/無効の情報)が読み出される。なお、ブロック#28での1回のアクセスによるデータのサイズは例えば16バイトであり、1回のコンパクションサーチでは有効ページ管理ビットマップテーブル26のデータを16バイトずつアクセスする。 The arbitration circuit 28 receives an access request REQA to the main memory 24 issued from the flash memory I / F 30 in block # 26, an access request REQB to the main memory 24 issued from the CPU 22, and an access issued from the delay circuit 32. General arbitration (arbitration of bus use right) is performed with the request REQC (a request in which the access request REQ1 issued from the compaction search engine 36 is delayed by time T 0 ). If the access request REQC has the right to use the bus, the data in the valid page management bitmap table 26 is accessed in block # 28, and candidate information for determining a compaction candidate (a block in which the number of valid pages in the block is a certain number or less (Effective / invalid information of each page for finding). Note that the size of data by one access in block # 28 is, for example, 16 bytes. In one compaction search, the data in the valid page management bitmap table 26 is accessed 16 bytes at a time.

有効ページ管理ビットマップテーブル26のデータ(コンパクション候補情報)の読み出しが終了すると、ブロック#30で調停回路28は確認ACKCをアサートする。遅延回路32は確認ACKCがアサートされてから遅延時間T後にブロック#32でコンパクションサーチエンジン36への確認ACK1をアサートする。読み出されたコンパクション候補情報は確認ACK1とともにコンパクションサーチエンジン36に送られる。コンパクション候補情報はコンパクションサーチエンジン36によりコンパクション候補管理テーブル25にエントリされる。 When the reading of the data (compaction candidate information) in the valid page management bitmap table 26 is completed, the arbitration circuit 28 asserts a confirmation ACCC at block # 30. Delay circuit 32 asserts a confirmation ACK1 to compaction search engine 36 in block # 32 after a delay time T 1 since the asserted confirmation ACKC. The read compaction candidate information is sent to the compaction search engine 36 together with the confirmation ACK1. The compaction candidate information is entered into the compaction candidate management table 25 by the compaction search engine 36.

ブロック#34で検索データサイズ分のサーチが行われたか否か判定され、否の場合は、ブロック#14に戻り、有効ページ管理ビットマップテーブル26の次の16バイトのサーチが行われ、起動時に指定された検索データサイズ分のサーチが行われるまで上記の処理が繰り返される。これにより、コンパクション候補情報(例えば、ブロック内有効ページ数がある一定数以下のブロック)がコンパクション候補管理テーブル25に格納される。   In block # 34, it is determined whether or not a search for the search data size has been performed. If not, the process returns to block # 14, and the next 16 bytes of the valid page management bitmap table 26 are searched. The above process is repeated until a search for the specified search data size is performed. Thereby, compaction candidate information (for example, a block having a certain number or less of valid pages in a block) is stored in the compaction candidate management table 25.

コンパクション処理そのもの、すなわちコンパクション候補管理テーブル25からコンパクション候補情報を読み出して、コンパクション候補ブロック内の有効ページデータをかき集めて、別のブロックに移動させ、移動元のページを無効化し、コンパクション候補ブロックを空きブロックとする処理は、サーチ後に適宜な別のタイミングで行うことが出来る。サーチを事前に行っておくことにより、コンパクション処理を効率よく実施することが出来る。   Compaction processing itself, that is, reading compaction candidate information from the compaction candidate management table 25, collecting valid page data in the compaction candidate block, moving it to another block, invalidating the source page, and freeing the compaction candidate block The process of making a block can be performed at a different timing after the search. By performing the search in advance, the compaction process can be performed efficiently.

図4は遅延回路32の遅延動作を説明する図である。遅延回路32はコンパクションサーチエンジン36からコンパクションサーチのためのアクセス要求REQ1がアサートされても、すぐには要求REQCをアサートせずに、所定の遅延時間Tだけ遅延して要求REQCをアサートする。同様に、調停回路28でアサートされた確認ACKCも所定の遅延時間Tだけ遅延されて、確認ACK1としてコンパクションサーチエンジン36に戻される。コンパクションサーチエンジン36はアクセス要求REQ1を発行した後、その確認ACK1を受信しないと、次のコンパクションサーチのためのアクセス要求REQ1を発行できない。 FIG. 4 is a diagram for explaining the delay operation of the delay circuit 32. Be an access request REQ1 is asserted for the compaction search from the delay circuit 32 is compaction search engine 36, immediately without asserting a request REQC, it asserts a request REQC delayed by a predetermined delay time T 0. Similarly, confirmation is asserted by the arbitration circuit 28 ACKC be delayed by a predetermined delay time T 1, it is returned to the compaction search engine 36 as a confirmation ACK1. The compaction search engine 36 cannot issue the access request REQ1 for the next compaction search unless it receives the confirmation ACK1 after issuing the access request REQ1.

このため、コンパクションサーチのためのアクセス要求REQ1の発行頻度は遅延時間T,Tに応じて決まってしまう。本実施形態によれば、遅延時間T,Tはメインメモリのアクセス頻度に応じているので、結局、コンパクションサーチのためのアクセス要求REQ1の発行頻度はメインメモリのアクセス頻度に応じて制御される。従って、コンパクションサーチの実行がある時間内に集中して、CPUあるいはフラッシュメモリによるメインメモリのアクセスがコンパクションサーチにより妨害されることが無い。さらに、コンパクションサーチの実行頻度はメインメモリのアクセス頻度に応じて調整されているので、メインメモリのアクセスの空いている期間にコンパクションサーチを実施することができ、メインメモリのアクセス性能を低下することなく、コンパクション処理を効率よく実施することが出来る。 For this reason, the issuing frequency of the access request REQ1 for compaction search is determined according to the delay times T 0 and T 1 . According to the present embodiment, since the delay times T 0 and T 1 depend on the access frequency of the main memory, the issue frequency of the access request REQ1 for compaction search is eventually controlled according to the access frequency of the main memory. The Therefore, the compaction search is not concentrated in a certain time, and the main memory access by the CPU or the flash memory is not hindered by the compaction search. Furthermore, the compaction search execution frequency is adjusted according to the access frequency of the main memory, so that the compaction search can be performed during a period when the main memory access is not available, thereby reducing the access performance of the main memory. And compaction processing can be performed efficiently.

なお、この発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。例えば、メインメモリ24に格納されコンパクション候補を決定するための候補情報としては有効ページ管理ビットマップテーブル26のデータの例を説明したが、これに限らず、各ブロック毎の有効ページ数を示す情報そのものを用いても良い。また、遅延回路32はコンパクションサーチエンジン36からコンパクションサーチのためのアクセス要求REQ1とともに調停回路28でアサートされた確認ACKCも遅延させているが、アクセス要求REQ1のみを遅延してもコンパクションサーチのためのアクセス要求REQ1の発行の集中を防ぐことが出来るので、確認ACKCは遅延しないでそのままコンパクションサーチエンジン36に渡してもよい。さらに、遅延時間はメインメモリのアクセス頻度に応じてアクセス要求REQ1の発行毎に可変しているが、必ずしも発行毎に可変する必要は無く、一定時間毎に可変としてもよい。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine suitably the component covering different embodiment. For example, the example of data in the valid page management bitmap table 26 has been described as candidate information stored in the main memory 24 for determining a compaction candidate. However, the present invention is not limited to this, and information indicating the number of valid pages for each block. You may use itself. The delay circuit 32 also delays the confirmation ACKC asserted by the arbitration circuit 28 together with the access request REQ1 for compaction search from the compaction search engine 36. However, even if only the access request REQ1 is delayed, Since concentration of issuing access requests REQ1 can be prevented, the confirmation ACKC may be passed to the compaction search engine 36 without delay. Furthermore, although the delay time is variable for each issue of the access request REQ1 according to the access frequency of the main memory, it is not always necessary to change for each issue, and may be variable for every fixed time.

12…フラッシュメモリコントローラ、20…CPUバス、22…CPU、24…メインメモリ、25…コンパクション候補管理テーブル、26…ブロック内有効ページ管理ビットマップテーブル、28…調停回路、30…フラッシュメモリI/F、32…遅延回路、34…遅延時間調整回路、36…コンパクションサーチエンジン。   DESCRIPTION OF SYMBOLS 12 ... Flash memory controller, 20 ... CPU bus, 22 ... CPU, 24 ... Main memory, 25 ... Compaction candidate management table, 26 ... In-block effective page management bitmap table, 28 ... Arbitration circuit, 30 ... Flash memory I / F 32 ... Delay circuit 34 ... Delay time adjustment circuit 36 ... Compaction search engine

Claims (11)

不揮発性メモリと、
前記不揮発性メモリに接続されるコントローラと、
を具備する半導体記憶装置であって、
前記コントローラは、
前記不揮発性メモリのコンパクション候補を決定するための候補情報を格納するメインメモリと、
前記候補情報を検索するための前記メインメモリの第1アクセス要求を発行する要求発行手段と、
前記要求発行手段により発行された前記第1アクセス要求を前記メインメモリのアクセス頻度に応じて第1時間遅延する遅延手段と、
アクセス要求のアービトレーションを行う調停回路と、
前記調停回路により前記第1アクセス要求に権利が与えられると、前記遅延手段により前記第1時間遅延された前記第1アクセス要求に基づいて前記メインメモリの候補情報をアクセスするアクセス手段と、
を具備する半導体記憶装置。
Non-volatile memory;
A controller connected to the non-volatile memory;
A semiconductor memory device comprising:
The controller is
A main memory for storing candidate information for determining compaction candidates for the nonvolatile memory;
Request issuing means for issuing a first access request of the main memory for searching the candidate information;
Delay means for delaying the first access request issued by the request issuing means for a first time according to the access frequency of the main memory;
An arbitration circuit that arbitrates access requests;
An access means for accessing candidate information in the main memory based on the first access request delayed by the delay means for the first time when the arbitration circuit grants the right to the first access request;
A semiconductor memory device comprising:
前記コントローラは前記アクセス手段によるアクセスの終了確認を発行する確認発行手段をさらに具備し、
前記確認発行手段により発行された終了確認は前記遅延手段を介して前記メインメモリのアクセス頻度に応じて第2時間遅延され前記要求発行手段に返送される請求項1記載の半導体記憶装置。
The controller further comprises confirmation issuing means for issuing an end confirmation of access by the access means,
2. The semiconductor memory device according to claim 1, wherein the end confirmation issued by the confirmation issuing means is delayed by a second time according to the access frequency of the main memory via the delay means and returned to the request issuing means.
前記コントローラはメインメモリのアクセス頻度を検出する検出手段をさらに具備し、
前記検出手段により検出されたアクセス頻度が所定頻度より混んでいる場合、前記遅延手段の前記第1、第2時間は長くされ、前記検出手段により検出されたアクセス頻度が所定頻度より混んでいない場合、前記遅延手段の前記第1、第2時間は短くされる請求項1記載の半導体記憶装置。
The controller further comprises detection means for detecting the access frequency of the main memory,
When the access frequency detected by the detection means is crowded from a predetermined frequency, the first and second times of the delay means are lengthened, and the access frequency detected by the detection means is not crowded than the predetermined frequency 2. The semiconductor memory device according to claim 1, wherein said first and second times of said delay means are shortened.
前記第1時間と前記第2時間とは異なる時間である請求項2記載の半導体記憶装置。   The semiconductor memory device according to claim 2, wherein the first time and the second time are different times. 前記第1時間と前記第2時間とは同じ時間であるである請求項2記載の半導体記憶装置。   The semiconductor memory device according to claim 2, wherein the first time and the second time are the same time. 前記不揮発性メモリは複数のフラッシュメモリを具備し、
前記コントローラは前記複数のフラッシュメモリに並列にアクセス可能な複数のインターフェースを具備する請求項1記載の半導体記憶装置。
The nonvolatile memory includes a plurality of flash memories,
The semiconductor memory device according to claim 1, wherein the controller includes a plurality of interfaces capable of accessing the plurality of flash memories in parallel.
不揮発性メモリと、前記不揮発性メモリのコンパクション候補を決定するための候補情報を格納するメインメモリを具備する半導体記憶装置の制御方法であって、
前記候補情報を検索するための前記メインメモリの第1アクセス要求を発行することと、
発行された前記第1アクセス要求を前記メインメモリのアクセス頻度に応じて第1時間遅延することと、
アクセス要求のアービトレーションを行うことと、
前記アービトレーションにより前記第1アクセス要求に権利が与えられると、前記第1時間遅延された前記第1アクセス要求に基づいて前記メインメモリの候補情報をアクセスすることと、
を具備する制御方法。
A method for controlling a semiconductor memory device comprising: a nonvolatile memory; and a main memory for storing candidate information for determining a compaction candidate for the nonvolatile memory,
Issuing a first access request of the main memory for retrieving the candidate information;
Delaying the issued first access request for a first time according to the access frequency of the main memory;
Arbitrating access requests,
When the arbitration grants the right to the first access request, accessing the candidate information in the main memory based on the first access request delayed by the first time;
A control method comprising:
前記第1アクセスの終了確認を発行することと、
発行された前記終了確認を前記メインメモリのアクセス頻度に応じて第2時間遅延して前記第1アクセス要求の発行元に返送することをさらに具備する請求項7記載の制御方法。
Issuing an end confirmation of the first access;
8. The control method according to claim 7, further comprising returning the issued end confirmation to the issuer of the first access request with a second time delay in accordance with the access frequency of the main memory.
メインメモリのアクセス頻度を検出することをさらに具備し、
検出されたアクセス頻度が所定頻度より混んでいる場合、前記第1、第2時間は長くされ、検出されたアクセス頻度が所定頻度より混んでいない場合、前記第1、第2時間は短くされる請求項7記載の制御方法。
Detecting the access frequency of the main memory,
When the detected access frequency is crowded than a predetermined frequency, the first and second times are lengthened, and when the detected access frequency is not crowded than the predetermined frequency, the first and second times are shortened. Item 8. The control method according to Item 7.
前記第1時間と、前記第2時間とは異なる時間である請求項8記載の制御方法。   The control method according to claim 8, wherein the first time and the second time are different times. 前記第1時間と、前記第2時間とは同じである請求項8記載の制御方法。   The control method according to claim 8, wherein the first time and the second time are the same.
JP2011169992A 2011-08-03 2011-08-03 Semiconductor memory device and control method thereof Expired - Fee Related JP4837144B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011169992A JP4837144B2 (en) 2011-08-03 2011-08-03 Semiconductor memory device and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011169992A JP4837144B2 (en) 2011-08-03 2011-08-03 Semiconductor memory device and control method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2010019545A Division JP4802284B2 (en) 2010-01-29 2010-01-29 Semiconductor memory device and control method thereof

Publications (2)

Publication Number Publication Date
JP2011227930A JP2011227930A (en) 2011-11-10
JP4837144B2 true JP4837144B2 (en) 2011-12-14

Family

ID=45043131

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011169992A Expired - Fee Related JP4837144B2 (en) 2011-08-03 2011-08-03 Semiconductor memory device and control method thereof

Country Status (1)

Country Link
JP (1) JP4837144B2 (en)

Also Published As

Publication number Publication date
JP2011227930A (en) 2011-11-10

Similar Documents

Publication Publication Date Title
JP4802284B2 (en) Semiconductor memory device and control method thereof
CN113508368B (en) Memory subsystem and method of operation thereof
JP4738536B1 (en) Nonvolatile memory controller and nonvolatile memory control method
Hu et al. Write amplification analysis in flash-based solid state drives
TWI597605B (en) Method of wear leveling for data storage device
KR102618699B1 (en) Computing system including storage device controlled by host
US10599345B2 (en) Memory device that writes data into a block based on time passage since erasure of data from the block
US20150378888A1 (en) Controller, flash memory apparatus, and method for writing data into flash memory apparatus
TWI676103B (en) Memory system
US20140372675A1 (en) Information processing apparatus, control circuit, and control method
JP6167646B2 (en) Information processing apparatus, control circuit, control program, and control method
JP2012033047A (en) Information processor, memory management device, memory management method and program
US20210349826A1 (en) Methods and devices for bypassing the internal cache of an advanced dram memory controller
CN113377695B (en) Data distribution method of read-write separated solid-state storage device
TWI726314B (en) A data storage device and a data processing method
US20140372673A1 (en) Information processing apparatus, control circuit, and control method
US20200110555A1 (en) Write control method, associated data storage device and controller thereof
JP4189402B2 (en) Cache circuit
TWI612473B (en) Methods for garbage collection and apparatuses using the same
KR20210051873A (en) Controller and memory system
CN111400201A (en) Data sorting method of flash memory, storage device and control circuit unit
TWI584117B (en) Data storage device and data fetching method for flash memory
KR102653659B1 (en) Memory system, memory controller, and operating method
TW202242664A (en) Method of performing garbage collection with partial clean operation and related controller and storage system
JP4837144B2 (en) Semiconductor memory device and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110803

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20110811

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20110829

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110927

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

Free format text: PAYMENT UNTIL: 20141007

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20141007

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20141007

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees