JP6263068B2 - Semiconductor memory device - Google Patents
Semiconductor memory device Download PDFInfo
- Publication number
- JP6263068B2 JP6263068B2 JP2014069926A JP2014069926A JP6263068B2 JP 6263068 B2 JP6263068 B2 JP 6263068B2 JP 2014069926 A JP2014069926 A JP 2014069926A JP 2014069926 A JP2014069926 A JP 2014069926A JP 6263068 B2 JP6263068 B2 JP 6263068B2
- Authority
- JP
- Japan
- Prior art keywords
- page
- written
- data
- address
- pages
- 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.)
- Active
Links
Images
Description
本発明は、半導体記憶装置に関する。 The present invention relates to a semiconductor memory device.
下記特許文献1には、NAND型フラッシュメモリ等の不揮発性メモリと、当該不揮発性メモリを制御するコントローラとを備えるメモリシステムが開示されている。不揮発性メモリは、ユーザデータが格納されるユーザデータブロックと、管理情報が格納される管理ブロックとを有している。
コントローラは、管理ブロック内の複数の管理ページに対して、データをシーケンシャルに書き込む。データの書込途中に電源遮断が発生した場合、コントローラは、次の電源起動時に、管理ブロック内の複数の管理ページのうち、前回の通電時に最後にデータ書込を行った管理ページ(以下「最終管理ページ」と称す)を特定する。そして、最終管理ページに連続する次の管理ページ(以下「次ページ」と称す)が消去状態(つまりオール「1」)であるか否かを判定し、消去状態でない場合には、当該次ページより後の管理ページにデータを書き込むとともに、当該次ページを無効化する。また、次ページが消去状態である場合には、当該次ページにデータを書き込み、その後、当該次ページからデータを読み出して、読出データが期待値(つまり更新後の管理情報)に一致するか否かのベリファイを行う。そして、ベリファイの結果、読出データが期待値に一致しない場合には、当該次ページより後の管理ページにデータを書き込むとともに、当該次ページを無効化する。 The controller sequentially writes data to a plurality of management pages in the management block. If a power interruption occurs while data is being written, the controller, when the next power is turned on, among the management pages in the management block, the management page (hereinafter “ Identify the final management page. Then, it is determined whether or not the next management page (hereinafter referred to as “next page”) continuous to the final management page is in the erased state (that is, all “1”). Data is written to a later management page and the next page is invalidated. If the next page is in the erased state, data is written to the next page, and then data is read from the next page. Whether the read data matches the expected value (that is, the updated management information). Verify that. If the read data does not match the expected value as a result of the verification, the data is written to the management page after the next page and the next page is invalidated.
上述したように、上記特許文献1に開示されたメモリシステムによると、最終管理ページの次ページが消去状態である場合には、当該次ページにデータを書き込み、その後、当該次ページからデータを読み出して、読出データが期待値に一致するか否かのベリファイを行う。
As described above, according to the memory system disclosed in
従って、期待値を保持しておくための保持回路や、読出データと期待値とを比較するための比較回路が必要となって、システム全体として回路規模が増大する。また、次ページが消去状態であるか否かの判定と、読出データが期待値に一致するか否かのベリファイとの二段階の処理が行われ、処理内容が複雑であるため、起動処理の所要時間が増大する。さらに、一般的にベリファイを行うためには期待値を保持しておく必要があるが、管理情報に比べてユーザデータはデータ量が膨大であり、全てのユーザデータに関する期待値を保持しておくことは現実的でない。そのため、上記特許文献1に開示されたメモリシステムの適用対象は管理ブロックに限定されると考えられる。
Accordingly, a holding circuit for holding the expected value and a comparison circuit for comparing the read data with the expected value are required, and the circuit scale of the entire system increases. In addition, since the two-step process of determining whether or not the next page is in the erased state and verifying whether or not the read data matches the expected value is performed and the processing contents are complicated, The required time increases. In addition, it is generally necessary to hold an expected value in order to perform verification, but the amount of user data is enormous compared to management information, and the expected value for all user data is held. That is not realistic. Therefore, it is considered that the application target of the memory system disclosed in
本発明はかかる問題を解決するために成されたものであり、回路規模及び起動処理の所要時間を削減できるとともに、管理ブロックに限らず任意のブロックに適用することが可能な半導体記憶装置を得ることを目的とするものである。 The present invention has been made to solve such a problem, and obtains a semiconductor memory device that can reduce the circuit scale and the time required for start-up processing and can be applied not only to a management block but also to an arbitrary block. It is for the purpose.
本発明の第1の態様に係る半導体記憶装置は、データの書込単位である複数のページを含むブロックを有する記憶部と、前記記憶部を制御する制御部と、を備え、前記制御部は、データ書込時に、書込対象ページに対して、書込データと、当該書込対象ページの次の書込対象ページを指定するアドレス情報とを書き込み、電源起動時に、ブロック内の全ページのうちデータ書込が完了した最終ページである第1ページを特定し、第1ページに書き込まれているアドレス情報に基づいて、第1ページの次の書込対象ページである第2ページを特定し、第2ページを無効化して、第2ページより後の書込対象ページである第3ページに対してデータ書込を行うことを特徴とするものである。 A semiconductor storage device according to a first aspect of the present invention includes a storage unit having a block including a plurality of pages that are data write units, and a control unit that controls the storage unit, wherein the control unit includes: At the time of data writing, write data and address information for specifying the next write target page of the write target page are written to the write target page. The first page, which is the last page for which data writing has been completed, is specified, and the second page, which is the next page to be written, is specified based on the address information written to the first page. The second page is invalidated, and data is written to the third page, which is the page to be written after the second page.
第1の態様に係る半導体記憶装置によれば、制御部は、電源起動時に、ブロック内の全ページのうちデータ書込が完了した最終ページである第1ページを特定し、第1ページに書き込まれているアドレス情報に基づいて、第1ページの次の書込対象ページである第2ページを特定し、第2ページを無効化して、第2ページより後の書込対象ページである第3ページに対してデータ書込を行う。このように、データの書込途中の電源遮断に起因して書込未完了ページとなっている可能性がある第2ページを常に無効化し、第2ページより後の書込対象ページである第3ページからデータ書込を再開することにより、第2ページが書込未完了ページであるか完全消去ページであるかの検証が不要となる。その結果、検証のために読出データと期待値とを比較する処理を省略できるため、装置全体として回路規模及び起動処理の所要時間を削減することが可能となる。また、検証のために期待値を保持しておく必要もないため、管理ブロックに限らずユーザデータブロック等の任意のブロックに対して本発明を適用することが可能となる。さらに、制御部は、データ書込時に、書込対象ページに対して、書込データと、当該書込対象ページの次の書込対象ページを指定するアドレス情報とを書き込む。このように、データ書込時にアドレス情報を書込データに付加しておき、電源起動時にアドレス情報を参照することにより、制御部は、書込未完了ページとなっている可能性がある第2ページを簡易に特定することが可能となる。 According to the semiconductor memory device of the first aspect, the control unit identifies the first page that is the last page for which data writing has been completed among all the pages in the block at the time of power activation, and writes the first page to the first page Based on the stored address information, the second page that is the next writing target page of the first page is specified, the second page is invalidated, and the third writing page that is the writing target page after the second page Write data to the page. In this way, the second page that may be an incomplete page due to power interruption during data writing is always invalidated, and the second page to be written after the second page. By resuming data writing from page 3, verification of whether the second page is an incompletely written page or a completely erased page becomes unnecessary. As a result, since the process of comparing the read data and the expected value for verification can be omitted, it is possible to reduce the circuit scale and the time required for the startup process for the entire apparatus. Further, since it is not necessary to hold an expected value for verification, the present invention can be applied not only to the management block but also to an arbitrary block such as a user data block. Further, at the time of data writing, the control unit writes write data and address information designating the next write target page of the write target page to the write target page. In this way, by adding address information to the write data at the time of data writing and referring to the address information at the time of power-on, the control unit may be an incompletely written page. It becomes possible to specify a page easily.
本発明の第2の態様に係る半導体記憶装置は、第1の態様に係る半導体記憶装置において特に、前記制御部は、データ書込時に、書込対象ページに対して、ページ毎に更新される経時情報をさらに書き込み、電源起動時に、ブロック内の全ページのうち最新の経時情報が書き込まれているページを、第1ページとして特定することを特徴とするものである。 The semiconductor memory device according to the second aspect of the present invention is the semiconductor memory device according to the first aspect, in particular, the control unit is updated for each page with respect to the write target page during data writing. The time information is further written, and the page where the latest time information is written among all the pages in the block is specified as the first page when the power is turned on.
第2の態様に係る半導体記憶装置によれば、制御部は、データ書込時に、書込対象ページに対して、ページ毎に更新される経時情報を書き込み、電源起動時に、ブロック内の全ページのうち最新の経時情報が書き込まれているページを、第1ページとして特定する。このように、データ書込時に経時情報を書込データに付加しておき、電源起動時に経時情報を参照することにより、制御部は、データ書込が完了した最終ページである第1ページを簡易に特定することが可能となる。 According to the semiconductor memory device of the second aspect, the control unit writes the time-dependent information updated for each page to the page to be written at the time of data writing, and all pages in the block at the time of power activation. The page in which the latest time-lapse information is written is identified as the first page. In this way, by adding the time-lapse information to the write data at the time of data writing and referring to the time-lapse information at the time of power-on, the control unit can simplify the first page, which is the last page for which data writing has been completed. It becomes possible to specify.
本発明の第3の態様に係る半導体記憶装置は、第1の態様に係る半導体記憶装置において特に、前記制御部は、電源起動時に、所定の起点ページからアドレス情報を辿るページ探索を行うことにより、アドレス情報が書き込まれている最終ページを、第1ページとして特定することを特徴とするものである。 The semiconductor memory device according to a third aspect of the present invention is the semiconductor memory device according to the first aspect, in particular, the control unit performs a page search that traces address information from a predetermined starting page when power is turned on. The last page in which address information is written is specified as the first page.
第3の態様に係る半導体記憶装置によれば、制御部は、電源起動時に、所定の起点ページからアドレス情報を辿るページ探索を行うことにより、アドレス情報が書き込まれている最終ページを、第1ページとして特定する。このように、データ書込時にアドレス情報を書込データに付加しておき、電源起動時にアドレス情報を辿るページ探索を行うことにより、制御部は、データ書込が完了した最終ページである第1ページを簡易に特定することが可能となる。 According to the semiconductor memory device of the third aspect, the control unit performs a page search that traces the address information from a predetermined starting page when the power is turned on, so that the last page in which the address information is written is the first page. Identifies as a page. In this way, the address information is added to the write data at the time of data writing, and by performing a page search that follows the address information at the time of power activation, the control unit is the first page that is the last page for which data writing has been completed. It becomes possible to specify a page easily.
本発明の第4の態様に係る半導体記憶装置は、第1〜第3のいずれか一つの態様に係る半導体記憶装置において特に、アドレス情報は、ブロックアドレスとページアドレスとを含むことを特徴とするものである。 The semiconductor memory device according to the fourth aspect of the present invention is the semiconductor memory device according to any one of the first to third aspects, and the address information includes a block address and a page address. Is.
第4の態様に係る半導体記憶装置によれば、アドレス情報は、ブロックアドレスとページアドレスとを含む。従って、物理アドレスが連続する複数のページに対してシーケンシャルにデータ書込を行う場合のみならず、ブロックやページの物理アドレスが連続しない複数のページに対してランダムにデータ書込を行う場合であっても、本発明を適用することが可能となる。 According to the semiconductor memory device of the fourth aspect, the address information includes a block address and a page address. Therefore, not only when data is written sequentially to a plurality of pages having consecutive physical addresses, but also when data is randomly written to a plurality of pages where physical addresses of blocks or pages are not consecutive. However, the present invention can be applied.
本発明の第5の態様に係る半導体記憶装置は、第1〜第4のいずれか一つの態様に係る半導体記憶装置において特に、前記制御部は、所定のタイミングでガベージコレクションを実行することにより、第2ページとして無効化されているページに対して消去状態のデータを書き込むことを特徴とするものである。 The semiconductor memory device according to the fifth aspect of the present invention is particularly the semiconductor memory device according to any one of the first to fourth aspects, wherein the control unit executes garbage collection at a predetermined timing. The data in the erased state is written to the page invalidated as the second page.
第5の態様に係る半導体記憶装置によれば、制御部は、所定のタイミングでガベージコレクションを実行することにより、第2ページとして無効化されているページに対して消去状態のデータを書き込む。その結果、ガベージコレクションの実行後は第2ページを再利用できるため、第2ページの蓄積に起因して利用可能なページ数が削減されることを、回避することが可能となる。 According to the semiconductor memory device of the fifth aspect, the control unit writes the erased data to the page invalidated as the second page by executing garbage collection at a predetermined timing. As a result, since the second page can be reused after the garbage collection is performed, it is possible to avoid a reduction in the number of pages that can be used due to the accumulation of the second page.
本発明によれば、回路規模及び起動処理の所要時間を削減できるとともに、管理ブロックに限らず任意のブロックに適用することが可能な半導体記憶装置を得ることができる。 According to the present invention, it is possible to obtain a semiconductor memory device that can reduce the circuit scale and the time required for startup processing and can be applied not only to a management block but also to an arbitrary block.
以下、本発明の実施の形態について、図面を用いて詳細に説明する。なお、異なる図面において同一の符号を付した要素は、同一又は相応する要素を示すものとする。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the element which attached | subjected the same code | symbol in different drawing shall show the same or corresponding element.
<実施の形態1>
図1は、本発明の実施の形態1に係る半導体記憶装置の全体構成を簡略化して示す図である。図1の接続関係で示すように、半導体記憶装置は、NAND型フラッシュメモリ等の不揮発性メモリを用いたメモリアレイ2と、メモリアレイ2に対するアクセスを制御する制御部1とを備えて構成されている。
<
FIG. 1 is a diagram showing a simplified overall configuration of a semiconductor memory device according to
制御部1は、メモリコントローラ11、判定回路12、ECC回路13、及び乱数生成器14を備えて構成されている。メモリコントローラ11は、その内部に、NAレジスタ21、TSレジスタ22、及びカウンタ23を有している。
The
メモリアレイ2は、データの消去単位である複数のブロックを有している。ブロックには、管理情報が格納される管理ブロックと、ユーザデータが格納されるユーザデータブロックとが含まれる。各ブロックは、データの書込単位及び読出単位である複数のページによって構成されている。
The
メモリコントローラ11には、外部のホスト装置からメモリアレイ2へのアクセス要求が入力される。書込要求が入力された場合、メモリコントローラ11は、書込要求に含まれる書込データを、指定ブロックの指定ページに書き込む。
The
図2は、メモリコントローラ11からメモリアレイ2に書き込まれるデータを示す図である。メモリコントローラ11は、書込データの末尾に、ネクストアドレスNAとタイムスタンプTSとを付加したデータを、メモリアレイ2に書き込む。書込データは、所定バイト(例えば1024バイト)のユーザデータ(又は管理情報)と、当該ユーザデータ(又は管理情報)に関する所定バイト(例えば42バイト)のECCシンドロームとのセットが、複数セット繰り返されたデータ構造を有している。
FIG. 2 is a diagram illustrating data written from the
同一又は別ブロック内の複数のページに跨がるデータを書き込む場合、メモリコントローラ11は、書込対象である複数ページの物理アドレス、及び当該複数ページへの書込順序を管理している。ある書込対象ページにデータを書き込む場合、メモリコントローラ11は、その書込対象ページに書き込む書込データの末尾に、当該書込対象ページの次の書込対象ページを指定するアドレス情報を、ネクストアドレスNAとして付加する。ネクストアドレスNAは、所定バイト(例えば2バイト)の物理ブロックアドレスと、所定バイト(例えば1バイト)の物理ページアドレスとを含む。
When writing data across a plurality of pages in the same or different blocks, the
また、メモリコントローラ11は、書込対象ページへのデータ書込が完了する毎に、カウンタ23のカウンタ値をインクリメントする。カウンタ23は、経時情報として所定バイト(例えば3バイト)のカウンタ値を出力するサイクリックカウンタである。メモリコントローラ11は、ある書込対象ページにデータを書き込む場合、その書込対象ページに書き込む書込データの末尾に、その時点でのカウンタ23のカウンタ値を、タイムスタンプTSとして付加する。
The
以下、半導体記憶装置の電源起動時に制御部1が実行する起動処理について説明する。
Hereinafter, a startup process executed by the
NAND型フラッシュメモリを用いた不揮発性メモリにおいて、メモリアレイにデータを書き込んでいる途中で電源遮断が発生した場合には、再起動後に書込未完了ページのデータを読み出した際に、途中までのデータが書き込まれているにも拘わらず、書込未完了ページがあたかも消去ページ(ALL FFh)のように見えることがある。そして、消去状態と判断して再起動後に書込未完了ページにデータを書き込むと、当該ページにデータを正しく書き込めず、書込データが破損又は消失してデータの信頼性が低下する場合がある。 In a non-volatile memory using a NAND flash memory, if a power interruption occurs while data is being written to the memory array, when data is written to an incomplete page after restarting, In spite of data being written, an unwritten page may appear as an erased page (ALL FFh). If data is written to an incompletely written page after restarting after determining the erase state, the data may not be correctly written to the page, and the written data may be damaged or lost, thereby reducing the reliability of the data. .
そこで、書込未完了ページとなっている可能性があるページの使用を事前に回避してデータの信頼性を向上すべく、制御部1は、半導体記憶装置の電源起動時に以下のような起動処理を実行する。
Therefore, in order to improve the reliability of data by avoiding the use of pages that may be incompletely written pages, the
図3は、制御部1が実行する起動処理の概要を示す図である。ここでは、ページP0→P1→P2→P3→P4→P5の順にデータ書込が行われる状況を想定している。メモリコントローラ11は、書込対象であるページP0〜P5の物理アドレス、及びページP0〜P5への書込順序を管理している。ページP0〜P5は、同一ブロック内のページであっても良いし、別ブロック内のページであっても良い。また、必ずしも物理ページアドレスが連続している必要もない。
FIG. 3 is a diagram illustrating an outline of the startup process executed by the
この例では、ページP3へのデータ書込の途中で電源遮断が発生したことにより、ページP3が書込未完了ページとなっている。また、ページP0〜P2へのデータ書込は完了しているため、これらのページP0〜P2にはネクストアドレスNA及びタイムスタンプTSが書き込まれている。例えば、ページP0には、ページP1の物理アドレスを指定するネクストアドレスNAと、ページP0へのデータ書込時点でのタイムスタンプTSとが書き込まれており、ページP1には、ページP2の物理アドレスを指定するネクストアドレスNAと、ページP1へのデータ書込時点でのタイムスタンプTSとが書き込まれている。一方、データ書込が行われていないページP4,P5は、消去状態であるため、ネクストアドレスNAもタイムスタンプTSも書き込まれていない。また、書込未完了ページであるページP3は、消去状態と同じく、ネクストアドレスNAもタイムスタンプTSも書き込まれていないように見える。 In this example, the page P3 is a page that has not been written due to the occurrence of power interruption during the data writing to the page P3. In addition, since the data writing to the pages P0 to P2 is completed, the next address NA and the time stamp TS are written to these pages P0 to P2. For example, the page P0 is written with the next address NA for designating the physical address of the page P1 and the time stamp TS at the time of data writing to the page P0. The page P1 has the physical address of the page P2. Is written, and a time stamp TS at the time of data writing to the page P1 is written. On the other hand, since the pages P4 and P5 to which data has not been written are in an erased state, neither the next address NA nor the time stamp TS is written. In addition, the page P3 which is an unfinished page seems to have neither the next address NA nor the time stamp TS written in the same manner as in the erased state.
半導体記憶装置が再起動されると、まず制御部1は、ブロック内の全ページのうちデータ書込が完了した最終ページを特定する。具体的には、タイムスタンプTSが書き込まれている全てのページのうち、タイムスタンプTSの値が最大値であるページ(つまり最新の経時情報が書き込まれているページ)を、最終書込完了ページとして特定する。この例では、ページP2が最終書込完了ページとして特定される。
When the semiconductor memory device is restarted, the
次に制御部1は、最終書込完了ページに書き込まれているネクストアドレスNAに基づいて、最終書込完了ページの次の書込対象ページを特定する。この例では、ページP2にはページP3の物理アドレスがネクストアドレスNAとして書き込まれているため、最終書込完了ページの次の書込対象ページとしてページP3が特定される。
Next, the
次に制御部1は、乱数生成器14から出力される乱数を用いて無効データを生成し、最終書込完了ページの次の書込対象ページに当該無効データを書き込む。これにより、最終書込完了ページの次の書込対象ページを無効化する。この例では、ページP3が無効化される。そして制御部1は、無効化ページの次の書込対象ページからデータ書込を再開する。この例では、ページP4からデータ書込が再開される。つまり、本来はページP3に書き込まれるはずのデータが、ページP4に書き込まれることとなる。
Next, the
なお、乱数を用いて無効データを生成する代わりに、例えばALL 00hの無効データを用いても良い。 Instead of generating invalid data using random numbers, for example, invalid data of ALL 00h may be used.
また、無効化するページ数は1ページに限らず、最終書込完了ページの次以降の複数ページを無効化しても良い。例えば、SLCの場合には最終書込完了ページの次の1ページを無効化し、MLCの場合には最終書込完了ページの次のページと、当該ページに物理的に連続する1ページ(合計2ページ)とを無効化する。また、MLCの場合には、最終書込完了ページの次の書込対象ページ(つまり書込未完了ページとなっている可能性があるページ)をデコードし、当該ページが下位ページ(lower page)であれば、最終書込完了ページの次の1ページを無効化し、上位ページ(upper page)であれば、最終書込完了ページの次のページと、当該ページに物理的に連続する3又は5ページ(合計4又は6ページ)とを無効化する。 Further, the number of pages to be invalidated is not limited to one page, and a plurality of pages after the last write completion page may be invalidated. For example, in the case of SLC, the next page after the last write completion page is invalidated, and in the case of MLC, the next page after the last write completion page and one page physically continuous to the page (2 in total) Page) and disable. Further, in the case of MLC, a page to be written next to the last write completion page (that is, a page that may be a write incomplete page) is decoded, and the page is a lower page. If this is the case, the next page after the last write completion page is invalidated, and if it is an upper page, the next page after the last write completion page and 3 or 5 that is physically continuous with the page Invalidate pages (4 or 6 pages in total).
図4は、制御部1が実行する起動処理の流れを具体的に示すフローチャートである。ステップS101では、現在使用中のブロックのリストが管理ブロックから読み出され、ブロック数や各ブロックの物理ブロックアドレス等のブロック条件が設定される。ステップS102〜S113では、全てのブロックに関して処理が行われるまで、ブロック番号をインクリメントしながらブロックループが繰り返される。ステップS103では、1ブロック内のページ数等のページ条件が設定される。ステップS104では、NAレジスタ21及びTSレジスタ22の初期値が設定される。NAレジスタ21の初期値としては例えば「0xFFFFFF」が設定され、TSレジスタ22の初期値としては例えば「0」が設定される。ステップS105〜S110では、全てのページに関して処理が行われるまで、ページ番号をデクリメントしながらページループが繰り返される。ステップS106では、対象ページに書き込まれている全データがメモリアレイ2から読み出される。対象ページの読出データは、メモリコントローラ11、判定回路12、及びECC回路13に入力される。ステップS107では、読出データが完全消去状態(ALL FFh)であるか否かが、判定回路12によって判定される。なお、完全消去状態でなくても、読出データに含まれる「0」のビット数が所定値未満である場合には、消去状態であると判定しても良い。ステップS107の判定結果が「No」である場合には、ステップS108で、読出データにECCフェイルが生じているか否かが、ECC回路13によって判定される。ステップS108の判定結果が「No」である場合には、ステップS109で、読出データに含まれているタイムスタンプTS(以下「tmp TS」)及びネクストアドレスNA(以下「tmp NA」)が取得される。ステップS111では、TSレジスタ22の現在値がtmp TS未満であるか否かが判定される。ステップS111の判定結果が「Yes」である場合には、ステップS112で、TSレジスタ22の現在値がtmp TSの値に更新され、NAレジスタ21の現在値がtmp NAの値に更新される。
FIG. 4 is a flowchart specifically showing the flow of the startup process executed by the
なお、ステップS107の判定結果が「Yes」である場合には、ステップS115で、対象ページが先頭ページであるか否かが判定される。ステップS115の判定結果が「Yes」である場合には、ステップS116で、tmp TSの値が例えば「0」に設定され、tmp NAの値が例えば「0xFFFFFF」に設定される。また、ステップS108の判定結果が「Yes」である場合には、ステップS117でガベージコレクションが実行される。 If the determination result in step S107 is “Yes”, it is determined in step S115 whether the target page is the first page. When the determination result in step S115 is “Yes”, in step S116, the value of tmp TS is set to “0”, for example, and the value of tmp NA is set to “0xFFFFFF”, for example. If the determination result of step S108 is “Yes”, garbage collection is executed in step S117.
以上の処理によって、最終的にNAレジスタ21に設定されているネクストアドレスNAとして、最終書込完了ページの次の書込対象ページ(つまり書込未完了ページとなっている可能性があるページ)の物理ページアドレスが取得される。そして、ステップS114で、最終書込完了ページの次の書込対象ページが無効化される。
With the above processing, the next write target page after the last write completion page (that is, a page that may be an incomplete write page) is set as the next address NA finally set in the
このように本実施の形態に係る半導体記憶装置によれば、制御部1は、電源起動時に、ブロック内の全ページのうちデータ書込が完了した最終ページ(以下「第1ページ」)を特定する。また、第1ページに書き込まれているアドレス情報に基づいて、第1ページの次の書込対象ページ(以下「第2ページ」)を特定する。また、第2ページを無効化して、第2ページより後の書込対象ページ(以下「第3ページ」)に対してデータ書込を行う。このように、データの書込途中の電源遮断に起因して書込未完了ページとなっている可能性がある第2ページを常に無効化し、第2ページより後の書込対象ページである第3ページからデータ書込を再開することにより、第2ページが書込未完了ページであるか完全消去ページであるかの検証が不要となる。その結果、検証のために読出データと期待値とを比較する処理を省略できるため、装置全体として回路規模及び起動処理の所要時間を削減することが可能となる。また、検証のために期待値を保持しておく必要もないため、管理ブロックに限らずユーザデータブロック等の任意のブロックに対して本発明を適用することが可能となる。さらに、制御部1は、データ書込時に、書込対象ページに対して、書込データと、当該書込対象ページの次の書込対象ページを指定するアドレス情報とを書き込む。このように、データ書込時にアドレス情報を書込データに付加しておき、電源起動時にアドレス情報を参照することにより、制御部1は、書込未完了ページとなっている可能性がある第2ページを簡易に特定することが可能となる。
As described above, according to the semiconductor memory device of the present embodiment, the
また、本実施の形態に係る半導体記憶装置によれば、制御部1は、データ書込時に、書込対象ページに対して、ページ毎に更新される経時情報を書き込み、電源起動時に、ブロック内の全ページのうち最新の経時情報が書き込まれているページを、第1ページとして特定する。このように、データ書込時に経時情報を書込データに付加しておき、電源起動時に経時情報を参照することにより、制御部1は、データ書込が完了した最終ページである第1ページを簡易に特定することが可能となる。
Further, according to the semiconductor memory device of the present embodiment, the
また、本実施の形態に係る半導体記憶装置によれば、アドレス情報は、ブロックアドレスとページアドレスとを含む。従って、物理アドレスが連続する複数のページに対してシーケンシャルにデータ書込を行う場合のみならず、ブロックやページの物理アドレスが連続しない複数のページに対してランダムにデータ書込を行う場合であっても、本発明を適用することが可能となる。 Further, according to the semiconductor memory device according to the present embodiment, the address information includes a block address and a page address. Therefore, not only when data is written sequentially to a plurality of pages having consecutive physical addresses, but also when data is randomly written to a plurality of pages where physical addresses of blocks or pages are not consecutive. However, the present invention can be applied.
<実施の形態2>
以下、上記実施の形態1との相違点を中心に、本発明の実施の形態2に係る半導体記憶装置について説明する。
<
Hereinafter, the semiconductor memory device according to the second embodiment of the present invention will be described focusing on the differences from the first embodiment.
図5は、本発明の実施の形態2に係る半導体記憶装置の全体構成を簡略化して示す図である。上記実施の形態1と比較して、メモリコントローラ11からTSレジスタ22及びカウンタ23が省略されている。
FIG. 5 is a diagram schematically showing the overall configuration of the semiconductor memory device according to the second embodiment of the present invention. Compared with the first embodiment, the
図6は、メモリコントローラ11からメモリアレイ2に書き込まれるデータを示す図である。上記実施の形態1と比較して、タイムスタンプTSの付加が省略されている。
FIG. 6 is a diagram showing data written from the
本実施の形態2は、最終書込完了ページを特定する手法が、上記実施の形態1と相違する。 The second embodiment is different from the first embodiment in the method of specifying the final write completion page.
制御部1が実行する起動処理の概要は、図3と同様である。図3の例では、ページP3へのデータ書込の途中で電源遮断が発生したことにより、ページP3が書込未完了ページとなっている。また、ページP0〜P2へのデータ書込は完了しているため、これらのページP0〜P2にはネクストアドレスNAが書き込まれている。例えば、ページP0には、ページP1の物理アドレスを指定するネクストアドレスNAが書き込まれており、ページP1には、ページP2の物理アドレスを指定するネクストアドレスNAが書き込まれている。一方、データ書込が行われていないページP4,P5は、消去状態であるため、ネクストアドレスNAは書き込まれていない。また、書込未完了ページであるページP3は、消去状態と同じく、ネクストアドレスNAが書き込まれていないように見える。
The outline of the activation process executed by the
半導体記憶装置が再起動されると、まず制御部1は、ブロック内の全ページのうちデータ書込が完了した最終ページを特定する。具体的には、所定の起点ページからネクストアドレスNAを辿るページ探索を行うことにより、ネクストアドレスNAが書き込まれている最終ページを、最終書込完了ページとして特定する。起点ページとしては、前回のガベージコレクションの後にデータ書込が最初に行われたページが起点ページとして設定され、起点ページの物理アドレスはメモリアレイ2の管理ブロック内に保存されている。図3の例では、起点ページであるページP0に書き込まれているネクストアドレスNAによって次のページP1が特定され、ページP1に書き込まれているネクストアドレスNAによって次のページP2が特定され、ページP2に書き込まれているネクストアドレスNAによって次のページP3が特定される。そして、ページP3にはネクストアドレスNAが書き込まれていないため、ネクストアドレスNAが書き込まれている最終ページはページP2となり、その結果、ページP2が最終書込完了ページとして特定される。
When the semiconductor memory device is restarted, the
以降の処理は上記実施の形態1と同様である。次に制御部1は、最終書込完了ページに書き込まれているネクストアドレスNAに基づいて、最終書込完了ページの次の書込対象ページを特定する。
The subsequent processing is the same as in the first embodiment. Next, the
次に制御部1は、乱数生成器14から出力される乱数を用いて無効データを生成し、最終書込完了ページの次の書込対象ページに当該無効データを書き込む。これにより、最終書込完了ページの次の書込対象ページを無効化する。そして制御部1は、無効化ページの次の書込対象ページからデータ書込を再開する。
Next, the
図7は、制御部1が実行する起動処理の流れを具体的に示すフローチャートである。ステップS201では、メモリアレイ2の管理ブロックから管理情報が読み出される。ステップS202では、管理情報から起点ページの物理アドレス(以下「起点アドレス」)が取得される。ステップS203では、NAレジスタ21の初期値が設定される。NAレジスタ21の初期値としては起点アドレスが設定される。ステップS204〜S210では、読出データが完全消去状態(ALL FFh)であるページが出現するまで、ページ番号を更新しながらページループが繰り返される。ステップS205では、対象ページに書き込まれている全データがメモリアレイ2から読み出される。ステップS206では、読出データが完全消去状態(ALL FFh)であるか否かが判定される。ステップS206の判定結果が「No」である場合には、ステップS207で、読出データにECCフェイルが生じているか否かが判定される。ステップS207の判定結果が「No」である場合には、ステップS208で、読出データに含まれているネクストアドレスNA(tmp NA)が取得される。ステップS209では、NAレジスタ21の現在値がtmp NAの値に更新される。なお、ステップS207の判定結果が「Yes」である場合には、ステップS212でガベージコレクションが実行される。
FIG. 7 is a flowchart specifically illustrating the flow of the startup process executed by the
以上の処理によって、最終的にNAレジスタ21に設定されているネクストアドレスNAとして、最終書込完了ページの次の書込対象ページ(つまり書込未完了ページとなっている可能性があるページ)の物理ページアドレスが取得される。そして、ステップS211で、最終書込完了ページの次の書込対象ページが無効化される。
With the above processing, the next write target page after the last write completion page (that is, a page that may be an incomplete write page) is set as the next address NA finally set in the
このように本実施の形態に係る半導体記憶装置によれば、制御部1は、電源起動時に、所定の起点ページからアドレス情報を辿るページ探索を行うことにより、アドレス情報が書き込まれている最終ページを、第1ページとして特定する。このように、データ書込時にアドレス情報を書込データに付加しておき、電源起動時にアドレス情報を辿るページ探索を行うことにより、制御部1は、データ書込が完了した最終ページである第1ページを簡易に特定することが可能となる。
As described above, according to the semiconductor memory device according to the present embodiment, the
<変形例>
制御部1は、起動処理内で読出データにECCフェイルが発生している場合のみならず、起動処理以外の所定のタイミング(例えば、データ書込時にカウンタ23のカウンタ値が最大値になった時点)でガベージコレクションを実行しても良い。ガベージコレクションを実行することにより、それまでに蓄積された無効化ページに対して消去状態のデータが書き込まれる。その結果、ガベージコレクションの実行後は無効化ページを再利用できるため、無効化ページの蓄積に起因して利用可能なページ数が削減されることを、回避することが可能となる。
<Modification>
The
1 制御部
2 メモリアレイ
11 メモリコントローラ
12 判定回路
13 ECC回路
DESCRIPTION OF
Claims (5)
前記記憶部を制御する制御部と、
を備え、
前記制御部は、
データ書込時に、書込対象ページに対して、書込データと、当該書込対象ページの次の書込対象ページを指定するアドレス情報とを書き込み、
電源起動時に、
ブロック内の全ページのうちデータ書込が完了した最終ページである第1ページを特定し、
第1ページに書き込まれているアドレス情報に基づいて、第1ページの次の書込対象ページである第2ページを特定し、
第2ページを無効化して、第2ページより後の書込対象ページである第3ページに対してデータ書込を行う、半導体記憶装置。 A storage unit having a block including a plurality of pages as a unit of writing data;
A control unit for controlling the storage unit;
With
The controller is
At the time of data writing, write data and address information specifying the next write target page of the write target page are written to the write target page.
At power on,
Identify the first page of all pages in the block, the last page for which data writing has been completed,
Based on the address information written in the first page, the second page that is the next writing target page of the first page is specified,
A semiconductor memory device that invalidates a second page and writes data to a third page, which is a page to be written after the second page.
データ書込時に、書込対象ページに対して、ページ毎に更新される経時情報をさらに書き込み、
電源起動時に、ブロック内の全ページのうち最新の経時情報が書き込まれているページを、第1ページとして特定する、請求項1に記載の半導体記憶装置。 The controller is
When data is written, the time-dependent information updated for each page is further written to the page to be written,
The semiconductor memory device according to claim 1, wherein a page in which the latest time-dependent information is written among all the pages in the block is specified as a first page when the power is turned on.
The said control part writes the data of an erasure | elimination with respect to the page invalidated as a 2nd page by performing a garbage collection at predetermined | prescribed timing. Semiconductor memory device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014069926A JP6263068B2 (en) | 2014-03-28 | 2014-03-28 | Semiconductor memory device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014069926A JP6263068B2 (en) | 2014-03-28 | 2014-03-28 | Semiconductor memory device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015191567A JP2015191567A (en) | 2015-11-02 |
JP6263068B2 true JP6263068B2 (en) | 2018-01-17 |
Family
ID=54425978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014069926A Active JP6263068B2 (en) | 2014-03-28 | 2014-03-28 | Semiconductor memory device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6263068B2 (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS60230250A (en) * | 1984-04-27 | 1985-11-15 | Meidensha Electric Mfg Co Ltd | Data processing system of nonvolatile memory |
JP2006059204A (en) * | 2004-08-20 | 2006-03-02 | Nippon Telegr & Teleph Corp <Ntt> | Ic card, and memory access control method and controller for ic card |
JP2006133923A (en) * | 2004-11-04 | 2006-05-25 | Sony Corp | Data recording/reproducing device, recording/reproducing method, program and data recording medium |
US9612954B2 (en) * | 2008-12-31 | 2017-04-04 | Micron Technology, Inc. | Recovery for non-volatile memory after power loss |
JP5982148B2 (en) * | 2012-03-26 | 2016-08-31 | 株式会社メガチップス | Semiconductor memory device |
-
2014
- 2014-03-28 JP JP2014069926A patent/JP6263068B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015191567A (en) | 2015-11-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10061512B2 (en) | Data storage device and data writing method thereof | |
JP4524309B2 (en) | Memory controller for flash memory | |
CN104572489B (en) | Wear leveling method and device | |
JP5831271B2 (en) | Method and system for starting refresh operation of semiconductor nonvolatile memory device | |
US10475516B2 (en) | Data storage device and data erasing method wherein after erasing process, predetermined value is written to indicate completion of said erasing method | |
US9996462B1 (en) | Data storage device and data maintenance method thereof | |
TWI517181B (en) | Data storage device and data maintenance method thereof | |
TWI633428B (en) | Data storage device and methods for processing data in the data storage device | |
TWI557744B (en) | Data storing method and embedded system | |
JP7020989B2 (en) | Non-volatile storage device, memory control device, and memory control method | |
JP5695112B2 (en) | Data storage device, data storage method, and in-vehicle control device | |
JP2018097516A (en) | Memory device, controller, host device, data processing system, control program, method of operating memory device and method of operating host device | |
US8046529B2 (en) | Updating control information in non-volatile memory to control selection of content | |
US9443604B2 (en) | Electronic device and data-management method thereof | |
JP5066894B2 (en) | Storage medium control device | |
JP6263068B2 (en) | Semiconductor memory device | |
JP4513786B2 (en) | Memory controller, memory system, and memory control method | |
JP2008047155A (en) | Batch erasable nonvolatile memory and mobile phone | |
JP2009276883A (en) | Semiconductor auxiliary storage device | |
JP2007323159A (en) | Memory controller, flash memory system therewith, and method for controlling flash memory | |
JP4332134B2 (en) | Memory controller, flash memory system, and flash memory control method | |
JP6348400B2 (en) | Semiconductor memory device | |
JP2009295089A (en) | Memory access control method, memory controller, and computer program | |
JP2016062173A (en) | Electronic control apparatus | |
JP2007199846A (en) | Memory control device and memory control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170228 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171115 |
|
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: 20171128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20171215 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6263068 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |