JP2006053950A - Nonvolatile semiconductor memory device and its control method - Google Patents

Nonvolatile semiconductor memory device and its control method Download PDF

Info

Publication number
JP2006053950A
JP2006053950A JP2005315431A JP2005315431A JP2006053950A JP 2006053950 A JP2006053950 A JP 2006053950A JP 2005315431 A JP2005315431 A JP 2005315431A JP 2005315431 A JP2005315431 A JP 2005315431A JP 2006053950 A JP2006053950 A JP 2006053950A
Authority
JP
Japan
Prior art keywords
data
block
blocks
writing
semiconductor memory
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
JP2005315431A
Other languages
Japanese (ja)
Inventor
Yutaka Okamoto
豊 岡本
Yoshiyuki Tanaka
義幸 田中
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 JP2005315431A priority Critical patent/JP2006053950A/en
Publication of JP2006053950A publication Critical patent/JP2006053950A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a nonvolatile semiconductor memory device capable of performing writing, and elongating its service life. <P>SOLUTION: This nonvolatile semiconductor memory device has a memory cell array having a plurality of writable and erasable blocks, a management means having erasing flags indicating whether the plurality of blocks are respectively erased or not, a control means for determining an unused block among the plurality of blocks, and writing a new data into the unused block, a means for setting the erasing flag corresponding to the block in which old data to be rewritten is recorded as an erased one, a means for selectively erasing the blocks on which the erasing flags are set, and a means for making a logical address corresponded to a physical address of the block having the old data, correspond with a physical address of the block in which new data is written. Each of the plurality of blocks is an erasing unit as a unit smaller than a nonvolatile semiconductor memory chip of the memory cell array. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、電気的に書換可能な不揮発性半導体メモリ素子(EEPROM)の中のNAND型EEPROMを用いた不揮発性半導体メモリ装置及びその制御方法に関する。   The present invention relates to a nonvolatile semiconductor memory device using a NAND type EEPROM in an electrically rewritable nonvolatile semiconductor memory element (EEPROM) and a control method thereof.

一般にコンピュータシステムにおける書換可能な記憶装置(記憶素子)は、その容量に物理的な限界があるため、不要になった情報の上に新しい情報を重ね書きして使用される。書換可能な記憶装置(記憶素子)は、その重ね書きの方法で大別すると2通りに分けることが出来る。その一つは、ランダムアクセスメモリ(RAM)やハードディスク、フロッピディスク或いは磁気テープのように、古い情報の上に新しい情報をそのまま上書き出来るものである。他の一つは、ある種の光記憶装置やEEPROMのように重ね書きされる古い情報を一度消去してからでないと新しい情報が書き込めないものである。   In general, a rewritable storage device (storage element) in a computer system has a physical limit in capacity, and therefore, new information is overwritten on unnecessary information. The rewritable storage device (storage element) can be roughly divided into two types according to the method of overwriting. For example, new information can be overwritten as it is on old information, such as random access memory (RAM), hard disk, floppy disk, or magnetic tape. The other is that new information cannot be written unless old information to be overwritten is erased once, as in some types of optical storage devices and EEPROMs.

NAND型EEPROMの消去方法は2通りあり、その一つは、例えばインテル社製フラッシュEEPROMのようにチップ全体の情報を一度に消去する方法である。他の一つは、チップの一部分の情報のみを選択的に消去する方法である。   There are two methods for erasing a NAND type EEPROM, one of which is a method of erasing information on the entire chip at once, such as a flash EEPROM manufactured by Intel. The other is a method of selectively erasing only information on a part of the chip.

NAND型EEPROMでは、連続してデータを読み出したり、データを書き込んだりするための構造的に連続する複数の記憶セルをページという単位で呼んでいる。例えば、4MビットEEPROMでは、1ページは、4096ビットの記憶セルで構成されている。また、構造的に連続する複数ページはブロックという単位で呼ばれる。例えば、4MビットEEPROMでは、8ページ(4kバイト)分の記憶セルで1ブロックが構成されている。NAND型EEPROMで、チップの一部分の情報のみを選択的に消去する場合の単位は、このブロックと一致している。   In the NAND type EEPROM, a plurality of structurally continuous memory cells for reading data continuously or writing data are called in units of pages. For example, in a 4M-bit EEPROM, one page is composed of 4096-bit storage cells. Also, a plurality of structurally continuous pages are called in units called blocks. For example, in a 4M-bit EEPROM, one block is composed of storage cells for 8 pages (4 kbytes). In the NAND type EEPROM, the unit for selectively erasing only a part of the information on the chip is the same as this block.

NAND型EEPROMは、上記のようにデータの一部分のみを消去できるので、磁気ディスク装置におけるように、1セクタ分のデータのみを書き換えるといった操作が比較的容易におこなえる不揮発性記憶素子である。そこで、機械的強度に関する信頼性、低消費電力、読み出し時間の高速性といった半導体メモリの特徴を生かして、従来の磁気ディスク装置を置き換えるような用途に使われだした。   Since the NAND-type EEPROM can erase only a part of the data as described above, it is a nonvolatile memory element that can be relatively easily rewritten only for one sector of data as in a magnetic disk device. Therefore, it has been used for applications such as replacing conventional magnetic disk devices by taking advantage of the features of semiconductor memory such as reliability related to mechanical strength, low power consumption, and high speed reading time.

ところが、EEPROMは、データ読み出しのためのアクセス時間が高速である割に、データ書き込みには時間がかかる。例えば、4MビットNAND型EEPROMの場合、1ブロックのデータ読み出しに要する時間が約490μsocであるのに対し、1ブロックを消去して書き換えるには、消去に約10msec、データ書き込みに約4msecの時間を要する。   However, the EEPROM requires a long time to write data, although the access time for reading the data is high. For example, in the case of a 4Mbit NAND type EEPROM, the time required to read one block of data is about 490 μsoc. On the other hand, to erase and rewrite one block, it takes about 10 msec for erasing and about 4 msec for writing data. Cost.

さらに、現状の技術ではデータの書換回数に制限があり、104 回ないし105回程度の書換で寿命となる。よって、同一のブロックに対してデータの重ね書きが集中するとチップ自体の寿命を縮めてしまうという問題があった。   Furthermore, the current technology has a limit on the number of times data can be rewritten, and the lifetime is reached by rewriting 10 4 to 105 times. Therefore, there is a problem that if the overwriting of data concentrates on the same block, the life of the chip itself is shortened.

以上のようにNAND型EEPROMを用いた従来の不揮発性半導体メモリ装置は、データの読み出し時間に比べて書き込みに時間がかかり、しかも、書換回数に制限があるため同一ブロックに重ね書きが集中すると寿命を縮めるという問題があった。   As described above, the conventional nonvolatile semiconductor memory device using the NAND type EEPROM requires a longer time for writing than the data reading time, and the number of times of rewriting is limited. There was a problem of shrinking.

本発明は、このような問題を解決し、書き込みを高速に行うことができるとともに長寿命化を図ることのできる不揮発性半導体メモリ装置及びその制御方法を提供することを目的とする。   An object of the present invention is to solve such problems, and to provide a nonvolatile semiconductor memory device and a control method therefor that can perform writing at a high speed and can extend the lifetime.

本発明は上記課題を解決するために、本発明の第1の特徴は、(イ)それぞれが選択的に書き込み及び消去可能な複数のブロックを有するメモリセルアレイと、(ロ)複数のブロックがそれぞれ消去済みか否かを示す消去フラグを有する管理手段と、(ハ)複数のブロックのうち未使用ブロックを割り出し、新たなデータを未使用ブロックに書き込む制御手段と、(ニ)書きかえられるべき旧データが記録されたブロックに対応する消去フラグを消去済みにセットする手段と、(ホ)消去フラグがセットされたブロックを選択的に消去する手段と、(ヘ)旧データを有していたブロックの物理アドレスに対応付けられていた論理アドレスを新たなデータが書きこまれたブロックの物理アドレスに対応付ける手段とを有し、(ト)複数のブロックのそれぞれはメモリセルアレイが実現されている不揮発性半導体メモリチップよりも小さい単位としての消去単位であることを特徴とする不揮発性半導体メモリ装置であることを要旨とする。   In order to solve the above problems, the first feature of the present invention is that (a) a memory cell array having a plurality of blocks that can be selectively written and erased, and (b) a plurality of blocks, respectively. A management means having an erasure flag indicating whether or not it has been erased; (c) a control means for determining an unused block among a plurality of blocks and writing new data to the unused block; and (d) an old data to be rewritten. Means for setting the erase flag corresponding to the block in which the data is recorded to erased; (e) means for selectively erasing the block in which the erase flag is set; and (f) a block having old data. Means for associating the logical address associated with the physical address of the block with the physical address of the block in which new data has been written. Each is summarized in that a non-volatile semiconductor memory device which is a unit of erasing a unit smaller than the non-volatile semiconductor memory chip in which the memory cell array is realized.

また、本発明の第2の特徴は、それぞれが選択的に書き込み及び消去可能な複数のブロックを有する不揮発性半導体メモリ装置のデータ書き換え制御方法において、(イ)複数のブロックのそれぞれはメモリセルアレイが実現されている不揮発性半導体メモリチップよりも小さい単位としての消去単位であり、(ロ)複数のブロックのうち、未使用ブロックを割り出すステップと、(ハ)書きかえられる旧データを有するブロックを消去せずに未使用ブロックに新たなデータを書き込むステップと、(ニ)旧データを記録していたブロックを選択的に消去するステップと、(ホ)旧データを有していたブロックの物理アドレスに対応付けられていた論理アドレスを新たなデータが書きこまれたブロックの物理アドレスに対応付けるステップとを含むことを特徴とする不揮発性半導体メモリ装置の制御方法であることを要旨とする。
〔作用〕
According to a second aspect of the present invention, there is provided a data rewrite control method for a nonvolatile semiconductor memory device having a plurality of blocks that can be selectively written and erased. (A) Each of the plurality of blocks includes a memory cell array. An erasing unit as a unit smaller than the realized non-volatile semiconductor memory chip. (B) A step of determining an unused block among a plurality of blocks and (c) erasing a block having old data to be rewritten. Without writing the new data to the unused block, (d) selectively erasing the block in which the old data was recorded, and (e) the physical address of the block having the old data. Associating the associated logical address with the physical address of the block in which the new data is written; And summarized in that a control method for a nonvolatile semiconductor memory device which comprises.
[Action]

本発明の第1の特徴によれば、新たなデータの書き込みは、可能な限り予め消去された未使用のブロック領域に対して行われる。これにより不揮発性半導体メモリ装置において本来書き込みに先だって行う必要があり且つアクセス時間の増大を余儀なくさせる消去動作が省略されて高速書き込みが可能になる。また、同一データを更新/変更する場合でも、物理的な書き込み位置は書き込みの都度変るため、特定のブロックに対する書き込み回数の増加が回避されて長寿命化を図ることが可能となる。   According to the first feature of the present invention, new data is written to an unused block area that has been erased in advance as much as possible. As a result, the nonvolatile semiconductor memory device originally needs to be performed prior to writing, and the erasing operation that inevitably increases the access time is omitted, thereby enabling high-speed writing. Even when the same data is updated / changed, the physical writing position changes with each writing, so that an increase in the number of times of writing with respect to a specific block can be avoided and a longer life can be achieved.

また、本発明の第2の特徴によれば、新たなデータの書き込みは、可能な限り予め消去された未使用のブロック領域に対して行われる。これにより不揮発性半導体メモリ装置において本来書き込みに先だって行う必要があり且つアクセス時間の増大を余儀なくさせる消去動作が省略されて高速書き込みが可能になる。また、同一データを更新/変更する場合でも、物理的な書き込み位置は書き込みの都度変るため、特定のブロックに対する書き込み回数の増加が回避されて長寿命化を図ることが可能となる。   According to the second feature of the present invention, new data is written to an unused block area that has been erased in advance as much as possible. As a result, the nonvolatile semiconductor memory device originally needs to be performed prior to writing, and the erasing operation that inevitably increases the access time is omitted, thereby enabling high-speed writing. Even when the same data is updated / changed, the physical writing position changes with each writing, so that an increase in the number of times of writing with respect to a specific block can be avoided and a longer life can be achieved.

以上説明したように、本発明によれば、新たなデータの書き込みは、可能な限り予め消去された未使用のブロックに対して行うようにしたため、本来書き込みに先だって行う必要があり且つアクセス時間の増大を余儀なくさせる消去動作が省略されて書き込みを高速に行うことができる。また、同一データを更新/変更する場合でも、物理的な書き込み位置は書き込みの度ごとに変るため、特定のブロックに対する書き込み回数の増加が回避されて長寿命化を図ることができる不揮発性半導体メモリ装置及びその制御方法を提供できる。   As described above, according to the present invention, new data is written to an unused block that has been erased in advance as much as possible. An erasing operation that necessitates an increase is omitted, and writing can be performed at high speed. Further, even when the same data is updated / changed, the physical writing position changes with each writing, so that the increase in the number of times of writing with respect to a specific block can be avoided and the non-volatile semiconductor memory capable of extending the life An apparatus and a control method thereof can be provided.

以下、本発明の実施例を図面を参照して説明する。図1は、不揮発性半導体メモリ装置の全体構成を示すブロック図である。同図において1はメモリ手段としてのNAND型EEPROMモジュールであり、複数個のページからなるブロックに分割されたメモリセルアレイで構成されている。EEPROMモジュール1はデータ線で結ばれたホストインターフェイス2を介して図示省略のホストシステムに接続されている。データ線上には、マルチプレクサ9及びデータバッファ10が設けられている。また、ホストインターフェイス2内には、データレジスタ3、アドレスレジスタ4、カウントレジスタ5、コマンドレジスタ6、ステータスレジスタ7及びエラーレジスタ8が設けられている。11はコントロールロジック、12はECC(誤差修正コード)ジェネレータ/チェッカ、13はアドレスジェネレータ、14は消去手段及び制御手段としての機能を有するCPU、15は作業用RAM、16は制御プログラムROMである。制御プログラムROM16には、データ書き込み等のための一連の制御プログラムが格納されるようになっている。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an overall configuration of a nonvolatile semiconductor memory device. In the figure, reference numeral 1 denotes a NAND type EEPROM module as a memory means, which is composed of a memory cell array divided into blocks each composed of a plurality of pages. The EEPROM module 1 is connected to a host system (not shown) via a host interface 2 connected by a data line. A multiplexer 9 and a data buffer 10 are provided on the data line. In the host interface 2, a data register 3, an address register 4, a count register 5, a command register 6, a status register 7 and an error register 8 are provided. Reference numeral 11 is a control logic, 12 is an ECC (error correction code) generator / checker, 13 is an address generator, 14 is a CPU having functions as an erasing means and a control means, 15 is a working RAM, and 16 is a control program ROM. The control program ROM 16 stores a series of control programs for writing data.

本実施例のメモリ装置は、不揮発性メモリ領域であるEEPROMモジュール1に記録されるデータに関し、その位置を割付け、管理するために管理テーブルを使用する。このテーブルは、他のユーザデータとともにEEPROMモジュール1に記録されるが、この装置が起動するときに自動的に作業用RAM15に読み込まれる。また、このテーブルは、EEPROMモジュール1への書き込みが行われる度にその内容が更新されるが、この更新されたテーブルは、その都度、或いは装置の使用が終了する時点でEEPROMモジュール1に書き戻されることとする。   The memory device of this embodiment uses a management table to assign and manage the position of data recorded in the EEPROM module 1 which is a nonvolatile memory area. This table is recorded in the EEPROM module 1 together with other user data, but is automatically read into the work RAM 15 when the apparatus is activated. The contents of this table are updated each time data is written to the EEPROM module 1, but this updated table is written back to the EEPROM module 1 each time or when the use of the apparatus is finished. Suppose that

このテーブルの一つは、図3にその構成を示す未使用ブロックを管理するためのテーブル(管理テーブル)である。他の一つは、図4に示すホストシステムが指定してくるアドレスとメモリモジュール上の物理的なアドレスとの対照テーブルである。   One of the tables is a table (management table) for managing unused blocks whose configuration is shown in FIG. The other is a comparison table of addresses designated by the host system shown in FIG. 4 and physical addresses on the memory module.

まず図3の未使用ブロックを管理するためのテーブルの一例を説明する。テーブルの1番目210は、未使用のデータブロックを連鎖状に管理するためのもので、チェインの先頭のブロックへのポインタである。テーブルの2番目211は、同じ目的のポインタであるがチェインの最後尾へのポインタである。テーブルの3番目からn+2番目は、NAND型EEPROMモジュール1の物理的なブロックの1番目からn番目に対応している。これらの内容は、212に例示するように、さらに、次の未使用ブロックへのポインタ213と消去フラグ214とから構成されている。テーブルのm番目218の中のポインタのようにその内容が”−1”であった場合にはチェインの最後尾であることを示すものとする。よってこの例では、最後尾ポインタ211はテーブルのm番目218をポイントするため内容はmにセットされる。消去フラグ214は、対応するブロックが消去済みであるか否かを示すもので、ここでは”0”の場合は消去済み、”1”の場合は未消去を表すものとする。   First, an example of a table for managing unused blocks in FIG. 3 will be described. The first 210 of the table is used to manage unused data blocks in a chain, and is a pointer to the first block in the chain. The second 211 of the table is a pointer to the same purpose but to the end of the chain. The third to n + 2th in the table correspond to the first to nth physical blocks of the NAND type EEPROM module 1. These contents are further composed of a pointer 213 to the next unused block and an erasure flag 214, as exemplified in 212. When the content is “−1” like the pointer in the m-th 218 of the table, it indicates that it is the end of the chain. Therefore, in this example, since the last pointer 211 points to the mth 218 of the table, the content is set to m. The erase flag 214 indicates whether or not the corresponding block has been erased. Here, “0” represents erased, and “1” represents unerased.

具体的な例を用いてデータが記録される際の動作の概要を述べる。いま、未使用ブロックの連鎖が図2(a)のようであると仮定する。データを記録するには、まず、先頭ポインタ101の内容を調べる。図2(a)では53番目のテーブルをポイントしているから、書き込み可能なNAND型EEPROMモジュール1上の物理的なブロックアドレスはオフセット2を減じた51となる。ブロック51に書き込みを行なったら、先頭ポインタ101の値を、102のポイント先33にセットしなおしてブロック51に対応するテーブル102をこのチェインから外す。結果を図2(b)に示す。   An outline of the operation when data is recorded will be described using a specific example. Assume that the chain of unused blocks is as shown in FIG. To record data, first, the contents of the head pointer 101 are examined. In FIG. 2A, since the 53rd table is pointed, the physical block address on the writable NAND type EEPROM module 1 is 51 obtained by subtracting the offset 2. After writing to the block 51, the value of the head pointer 101 is reset to the point destination 33 of 102, and the table 102 corresponding to the block 51 is removed from this chain. The results are shown in FIG.

この書き込みに伴なって、既存のブロックのデータが不要になった場合には、さらに、図2(c)に示すようにテーブルが更新されるような操作を行う。不要になったデータを記録していたのがブロック45であったとすると、最後尾ポインタ105がポイントしているテーブルの151番目104の中のポインタと最後尾ポインタ105の値をブロック45に対応するテーブル番号47にセットしなおす。テーブルの47番目107の中のポインタは”−1”に、消去フラグは”−1”に設定される。   When the data of the existing block becomes unnecessary along with this writing, an operation for updating the table is further performed as shown in FIG. If it is the block 45 that has recorded unnecessary data, the pointer in the 151st 104 of the table pointed to by the end pointer 105 and the value of the end pointer 105 correspond to the block 45. Reset to table number 47. The pointer in the 47th 107 of the table is set to “−1”, and the erase flag is set to “−1”.

未使用ブロックのチェインに加えられた直後のブロックは消去されていないので、読み出し/書き込みアクセスが途絶えたときにチェインを順次手繰りながら、消去を行い、そのブロックに対応するテーブルの消去フラグを”0”にセットする。   Since the block immediately after being added to the chain of the unused block is not erased, when the read / write access is interrupted, the chain is sequentially erased and the erase flag of the table corresponding to the block is set to “0”. Set to "".

次いで、図4の対照テーブルを説明する。テーブルの長さnは、NAND型EEPROMモジュール1のブロック以下とする。例えば、以後簡単のためにここではEEPROMモジュール1が4MビットEEPROM1個で構成されていると仮定すると、1ブロックの容量は4kバイトであるから、ブロックの総数は128個となり、対照テーブルの項目数nも128以下である。   Next, the comparison table of FIG. 4 will be described. The length n of the table is equal to or less than the block of the NAND type EEPROM module 1. For example, for the sake of simplicity, assuming that the EEPROM module 1 is composed of one 4-Mbit EEPROM, the capacity of one block is 4 kbytes, so the total number of blocks is 128, and the number of items in the comparison table n is also 128 or less.

この装置では、EEPROMモジュール1のブロックの容量に相当するデータ量を単位として、EEPROMモジュール1上の物理的位置の割り付けを行う。即ち、テーブルの1項目めは、ホストシステムから指定される最初の4kバイト分のデータが実際に記録される物理的位置を示している。図4の例では、203は、テーブルの3番目の項目であるから、ホストシステムから指定してくるアドレス(以後論理アドレスと記載)の8kバイト目からの4kバイトが、実際にはEEPROMモジュール1の101番目のブロックに割り当てられていることを示している。また、201,202のように”−1”の書かれたテーブルは、その位置に対応する論理アドレスへの書き込みがまだ行われていないため、物理的な領域の割り付けが行われていないことを示す。   In this apparatus, the physical position on the EEPROM module 1 is allocated in units of data amount corresponding to the block capacity of the EEPROM module 1. That is, the first item in the table indicates the physical position where the first 4 kbytes of data designated by the host system are actually recorded. In the example of FIG. 4, since 203 is the third item in the table, 4 kbytes from the 8 kbyte of the address designated by the host system (hereinafter referred to as a logical address) is actually the EEPROM module 1. Assigned to the 101st block. In addition, since the table in which “−1” is written as in 201 and 202 has not yet been written to the logical address corresponding to the position, the physical area is not allocated. Show.

次に、この装置の動作を説明する。ホストシステムは、図1のホストインターフェイス2内のアドレスレジスタ4にアクセス開始アドレスを、カウントレジスタ5にアクセスしたいデータのセクタ長をセットし、最後にコマンドレジスタ6に読み出し/書き込み等の命令をセットする。ホストインターフェイス2のコマンドレジスタ6にアクセス命令が書き込まれると、コントローラ内のCPU14は、コマンドレジスタ6内の命令を読み込み、制御プログラムROM16に納められたコマンド実行のための一連の制御プログラムを実行する。以下の説明では、簡単のためホストシステムの指定してくるセクタ長とEEPROMモジュール1におけるページ長は一致しているものと仮定する。   Next, the operation of this apparatus will be described. The host system sets an access start address in the address register 4 in the host interface 2 of FIG. 1, sets the sector length of data to be accessed in the count register 5, and finally sets an instruction such as read / write in the command register 6. . When an access command is written in the command register 6 of the host interface 2, the CPU 14 in the controller reads the command in the command register 6 and executes a series of control programs for command execution stored in the control program ROM 16. In the following description, for the sake of simplicity, it is assumed that the sector length designated by the host system and the page length in the EEPROM module 1 match.

図5は、EEPROMモジュール1からデータを読み出す手順を示すフローチャートである。まず、図1のCPU14は、ホストインターフェイス2にセットされた開始アドレスと管理テーブル内のアドレス変換テーブルを参照して読み出しを行うべきEEPROMモジュール1上の物理的なアドレスを決定する(ステップ301)。次に、EEPROMモジュール1からデータバッファ10にデータを読み出す(ステップ302)。次いで、後に詳述するようなエラー処理及びデータバッファ10からホストシステムへのデータ転送等を実行する(ステップ303〜305)。   FIG. 5 is a flowchart showing a procedure for reading data from the EEPROM module 1. First, the CPU 14 in FIG. 1 determines a physical address on the EEPROM module 1 to be read with reference to the start address set in the host interface 2 and the address conversion table in the management table (step 301). Next, data is read from the EEPROM module 1 to the data buffer 10 (step 302). Next, error processing and data transfer from the data buffer 10 to the host system, which will be described in detail later, are executed (steps 303 to 305).

図6は、EEPROMモジュール1からデータバッファ10にデータを読み出す手順を示すフローチャートである。CPU14は、EEPROMモジュール1をマルチプレクサ9を通してアクセスし読み出しモードに設定し、データバッファ10を読み出しモードに設定する(ステップ401,402)。アドレスジェネレータ13には、読み出しを行うべきEEPROMモジュール1の物理的なアドレスを設定する(ステップ403)。そして、データバッファ10に、読み出したデータを蓄えるべき領域を決定してその先頭番地をデータバッファ10への書き込みアドレスとして設定する(ステップ404)。その後、コントロールロジック11に対してデータ読み出しのための定められたシーケンスを実行するように指令を送る。   FIG. 6 is a flowchart showing a procedure for reading data from the EEPROM module 1 to the data buffer 10. The CPU 14 accesses the EEPROM module 1 through the multiplexer 9 to set the read mode, and sets the data buffer 10 to the read mode (steps 401 and 402). A physical address of the EEPROM module 1 to be read is set in the address generator 13 (step 403). Then, an area in which the read data is to be stored is determined in the data buffer 10, and the head address is set as a write address to the data buffer 10 (step 404). Thereafter, the control logic 11 is instructed to execute a predetermined sequence for reading data.

コントロールロジック11は、マルチプレクサ9をEEPROMモジュール1からの読み出しデータがデータバッファ10に流れるように設定し、アドレスジェネレータ13の内容をインクリメントしながら、1セクタ分のデータを読み出す(ステップ405)。また、EECジェネレータ/チェッカ12をこれらのデータ及びこれに付随して読み出されるECCコードを使って誤りを検出するように制御する。1セクタ分のデータが読み出されると、CPU14は、ECCジェネレータ/チェッカ12をチェックしデータの誤りを検査する(ステップ406)。誤りが検出されなかった場合、又は検出されても訂正が行えた場合は、データバッファ10からホストシステムにデータを転送する。もし、訂正不可能な誤りが検出された場合には、ホストシステムに対するデータ転送は行わずに、CPU14は、ホストインターフェイス2内のステータスレジスタ7にエラーが起きたことを示すコードを、エラーレジスタ8にエラーの内容を示すコードを設定し、ホストシステムに命令の実行が異常終了したことを通知して処理を終了する(ステップ407〜410)。   The control logic 11 sets the multiplexer 9 so that the read data from the EEPROM module 1 flows to the data buffer 10, and reads the data for one sector while incrementing the contents of the address generator 13 (step 405). Further, the EEC generator / checker 12 is controlled so as to detect an error by using these data and the ECC code read accompanying therewith. When the data for one sector is read, the CPU 14 checks the ECC generator / checker 12 for data errors (step 406). If no error is detected, or if correction is possible even if it is detected, data is transferred from the data buffer 10 to the host system. If an uncorrectable error is detected, the CPU 14 does not transfer data to the host system, and the CPU 14 stores a code indicating that an error has occurred in the status register 7 in the host interface 2 in the error register 8. Is set to a code indicating the content of the error, the host system is notified that the execution of the instruction has been terminated abnormally, and the process is terminated (steps 407 to 410).

図7は、データバッファからホストシステムにデータを転送する手順を示すフローチャートである。CPU14は、データバッファ10に読み出したデータが蓄えられた領域の先頭番地を同バッファからの読み出しアドレスとして設定し(ステップ501,502)、コントロールロジック11に対して、ホストシステムに1セクタ分のデータの転送を行うように指令する。コントロールロジック11は、データバッファ10とホストインターフェイス2を制御してホストシステムに対して1セクタ分のデータを転送し(ステップ503)、これが終了するとアドレスレジスタ4を1セクタ分進め、カウントレジスタ5から1を減じ、CPU14に転送が終了したことを通知する。ホストシステムに転送すべきデータが残っている限り、CPU14はこの制御を繰り返す。読み出しデータが全て転送されたら、CPU14は、ホストインターフェイス2内のステータスレジスタ7にエラーの無かったことを示すコードを設定し、ホストシステムに命令の実行が終了したことを通知して処理を終了する。   FIG. 7 is a flowchart showing a procedure for transferring data from the data buffer to the host system. The CPU 14 sets the start address of the area where the data read in the data buffer 10 is stored as a read address from the buffer (steps 501 and 502), and the control logic 11 stores data for one sector in the host system. Command to transfer. The control logic 11 controls the data buffer 10 and the host interface 2 to transfer data for one sector to the host system (step 503). When this is completed, the address register 4 is advanced by one sector, and the count register 5 1 is subtracted and the CPU 14 is notified that the transfer has been completed. As long as there is data to be transferred to the host system, the CPU 14 repeats this control. When all the read data has been transferred, the CPU 14 sets a code indicating that there is no error in the status register 7 in the host interface 2, notifies the host system that the execution of the instruction has ended, and ends the processing. .

図8及び図9は、EEPROMモジュール1へデータを書き込む手順を示すフローチャートである。CPU14はホストインターフェイス2にセットされた開始アドレスと管理テーブル内のアドレス変換テーブルを参照して、ホストシステムが書き込みを行おうとしているアドレスに割り振られているEEPROMモジュール1上のブロックを割り出す(ステップ601)。ホストシステムの指示するアドレスに対応するEEPROMモジュール1上のブロックが既に割り振られていて、かつ、ホストシステムからの要求がそのブロックのデータの全てを書き換えるものでない場合は、ブロック内の書き換えられないデータをデータバッファ10に読み込む(ステップ602〜604)。EEPROMモジュール1からデータバッファ10にデータを読み出す手順は、先に図6のフローチャートを用いて説明した。ブロック内の重ね書きされない部分のデータが全てデータバッファ10に読み込まれるまで図6の処理が繰り返される。次いで、後に詳述するようなホストシステムからデータバッファ10への書き込みデータの転送、データバッファ10からEEPROMモジュール1へのデータの書き込み処理及びエラー処理等を実行する(ステップ605〜611)。   8 and 9 are flowcharts showing a procedure for writing data into the EEPROM module 1. The CPU 14 refers to the start address set in the host interface 2 and the address conversion table in the management table, and determines the block on the EEPROM module 1 allocated to the address to which the host system intends to write (step 601). ). If the block on the EEPROM module 1 corresponding to the address designated by the host system has already been allocated and the request from the host system does not rewrite all of the data in the block, the data that cannot be rewritten in the block Are read into the data buffer 10 (steps 602 to 604). The procedure for reading data from the EEPROM module 1 to the data buffer 10 has been described with reference to the flowchart of FIG. The process of FIG. 6 is repeated until all the data in the block that is not overwritten is read into the data buffer 10. Next, the transfer of write data from the host system to the data buffer 10, the data write process from the data buffer 10 to the EEPROM module 1, the error process, and the like as described in detail later are executed (steps 605 to 611).

図10は、ホストシステムからデータバッファ10に書き込みデータを転送する手順を示している。CPU14は、データバッファ10を書き込みモードに設定し(ステップ701)、ホストシステムから転送されてくるデータが蓄えられるデータバッファ10上のアドレスを同バッファへの書き込みアドレスとして設定する(ステップ702)。その後、コントロールロジック11に対して、ホストシステムから1セクタ分のデータの転送を行うように指令する。コントロールロジック11は、データバッファ10とホストインターフェイス2を制御してホストシステムから1セクタ分のデータを受け取り、これが終了するとCPU14に転送が終了したことを通知する(ステップ703)。図10の処理は、ホストシステムから転送すべきデータが残っていて、かつ、データバッファ10にEEPROMモジュール1の書き込みを行おうとしているブロックのためのデータが不足している限り続けられる。ホストシステムからの転送が終了したら、CPU14はホストインターフェイス2にセットされた開始アドレスと未使用ブロックを管理するテーブルを参照して、先に説明したように未使用ブロックのチェインを手繰って、データバッファ10に蓄えられた1ブロック分のデータが書き込まれるべきEEPROMモジュール1上の未使用ブロックを決定し、EEPROMモジュール1上に書き込みを行う。   FIG. 10 shows a procedure for transferring write data from the host system to the data buffer 10. The CPU 14 sets the data buffer 10 to the write mode (step 701), and sets an address on the data buffer 10 in which data transferred from the host system is stored as a write address to the buffer (step 702). Thereafter, the control logic 11 is instructed to transfer data for one sector from the host system. The control logic 11 controls the data buffer 10 and the host interface 2 to receive one sector of data from the host system, and when this is completed, notifies the CPU 14 that the transfer has been completed (step 703). The process of FIG. 10 is continued as long as data to be transferred from the host system remains and data for the block to be written to the EEPROM module 1 in the data buffer 10 is insufficient. When the transfer from the host system is completed, the CPU 14 refers to the start address set in the host interface 2 and the table for managing the unused block, and as described above, handles the unused block chain to process the data. An unused block on the EEPROM module 1 to which one block of data stored in the buffer 10 is to be written is determined, and writing is performed on the EEPROM module 1.

図11は、データバッファ10内のデータ1ページ分をEEPROMモジュールに書き込む手順を示したフローチャートである。CPU14は、EEPROMモジュール1とデータバッファ10に必要ならば初期設定を施した後(ステップ801,802)、書き込みを行うページの先頭アドレスをアドレスジェネレータ13に設定し(ステップ803)、データバッファ10には、書き込まれるデータの先頭アドレスを同バッファの読み出しアドレスとして設定する(ステップ804)。そして、コントロールロジック11に対してデータ書き込みのための定められたシーケンスを実行するように指令を送る。コントロールロジック11は、マルチプレクサ9をデータバッファ10からの書き込みデータがEEPROMモジュール1に流れるように設定し、アドレスジェネレータ13の内容をインクリメントしながらデータを書き込む(ステップ805)。また、ECCジェネレータ/チェッカ12をこれらのデータからECCコードを生成するように制御し、データとともにこのコードも記録する(ステップ806)。図11の処理は、書き込みエラーが発生するか、1ブロック分のデータを書き終えるかするまで続けられる(ステップ807)。データの書き込みが正常に行えなかった場合はエラー処理を行い、1ブロック分のデータが書き込まれるべきEEPROMモジュール1上のブロックを割付けなおして、再度、書き込みを行なう。書き込みが正常に終了したら管理テーブルの内容を更新する。   FIG. 11 is a flowchart showing a procedure for writing one page of data in the data buffer 10 to the EEPROM module. The CPU 14 initializes the EEPROM module 1 and the data buffer 10 if necessary (steps 801 and 802), and then sets the top address of the page to be written in the address generator 13 (step 803). Sets the start address of the data to be written as the read address of the buffer (step 804). Then, the control logic 11 is instructed to execute a predetermined sequence for writing data. The control logic 11 sets the multiplexer 9 so that the write data from the data buffer 10 flows to the EEPROM module 1, and writes the data while incrementing the contents of the address generator 13 (step 805). Further, the ECC generator / checker 12 is controlled to generate an ECC code from these data, and this code is recorded together with the data (step 806). The processing in FIG. 11 is continued until a writing error occurs or data for one block is completely written (step 807). If data writing cannot be performed normally, error processing is performed, blocks on the EEPROM module 1 to which data for one block is to be written are reassigned, and writing is performed again. When writing is completed normally, the contents of the management table are updated.

ホストシステムの要求するデータを全て記録し終えるか、エラーからの回復が不可能で処理を中断した場合は、CPU14は、ホストインターフェイス2内のステータスレジスタ7に所定のコードを設定し、ホストシステムに命令の実行が終了したことを通知する。ホストインターフェイス2のコマンドレジスタ6にアクセス命令が書き込まれない適当なタイミングに、コントローラ内のCPU14は、先に説明したように、未使用ブロック管理テーブルのチェインを手繰りながら未消去のブロックを順次消去してゆく。   When all the data requested by the host system has been recorded, or when the process is interrupted because recovery from an error is impossible, the CPU 14 sets a predetermined code in the status register 7 in the host interface 2 and stores it in the host system. Notify that the execution of the instruction is complete. At an appropriate timing when an access command is not written to the command register 6 of the host interface 2, the CPU 14 in the controller sequentially erases the unerased blocks while chaining the unused block management table as described above. Go.

なお、上記の実施例では、EEPROMモジュール1は、ホストインターフェイス2を介して、ホストシステムと並行して動作可能なコントローラにより制御される形態を取っているが、ホストシステムのCPUにより直接制御される形態を取ってもよい。その他、本発明はその主旨を逸脱しない範囲で種々変形して用いることができる。   In the above embodiment, the EEPROM module 1 is controlled by the controller operable in parallel with the host system via the host interface 2, but is directly controlled by the CPU of the host system. It may take a form. In addition, the present invention can be variously modified and used without departing from the gist thereof.

本発明に係る不揮発性半導体メモリ装置の実施例を示すブロック図である。1 is a block diagram showing an embodiment of a nonvolatile semiconductor memory device according to the present invention. 本実施例において未使用ブロックを管理するテーブルの操作を説明するための図(その1)である。FIG. 6 is a diagram (part 1) for explaining the operation of a table for managing unused blocks in the embodiment. 本実施例における未使用ブロックを管理するテーブルの操作を説明するための図(その2)である。It is FIG. (2) for demonstrating operation of the table which manages an unused block in a present Example. 本実施例におけるアドレス変換用の対照テーブルの構成を示す図である。It is a figure which shows the structure of the comparison table for address conversion in a present Example. 本実施例においてEEPROMモジュール1からデータの読み出し処理を説明するためのフローチャートである。4 is a flowchart for explaining a process of reading data from the EEPROM module 1 in the present embodiment. 本実施例においてEEPROMモジュール1からデータバッファ10へのデータの読み出し処理を説明するためのフローチャートである。4 is a flowchart for explaining a process of reading data from the EEPROM module 1 to the data buffer 10 in the present embodiment. 本実施例においてデータバッファ10からホストシステムへの読み出しデータの転送処理を説明するためのフローチャートである。6 is a flowchart for explaining read data transfer processing from the data buffer 10 to the host system in the present embodiment. 本実施例においてEEPROMモジュール1へのデータの書き込み処理を説明するためのフローチャート(その1)である。5 is a flowchart (part 1) for explaining a data writing process to the EEPROM module 1 in the present embodiment. 本実施例においてEEPROMモジュール1へのデータの書き込み処理を説明するためのフローチャート(その2)である。4 is a flowchart (part 2) for describing a data writing process to the EEPROM module 1 in the present embodiment. 本実施例においてホストシステムからデータバッファ10への書き込みデータの転送処理を説明するためのフローチャートである。4 is a flowchart for explaining write data transfer processing from the host system to the data buffer in the present embodiment. 本実施例においてデータバッファ10内のデータをEEPROMモジュール1に書き込む処理を説明するためのフローチャートである。4 is a flowchart for explaining a process of writing data in a data buffer 10 to the EEPROM module 1 in the present embodiment.

符号の説明Explanation of symbols

1…EEPROMモジュール(メモリ手段)
2…ホストインターフェイス
3…データレジスタ
4…アドレスレジスタ
5…カウントレジスタ
6…コマンドレジスタ
7…ステータスレジスタ
8…エラーレジスタ
9…マルチプレクサ
10…データバッファ
11…コントロールロジック
12…EECジェネレータ/チェッカ
13…アドレスジェネレータ
14…未消去ブロックの消去処理、書き込み処理及びコピー処理等を実行するCPU
15…作業用RAM
16…制御プログラムROM
1 EEPROM module (memory means)
2 ... Host interface 3 ... Data register 4 ... Address register 5 ... Count register 6 ... Command register 7 ... Status register 8 ... Error register 9 ... Multiplexer 10 ... Data buffer 11 ... Control logic 12 ... EEC generator / checker 13 ... Address generator 14 ... CPU that executes erasure processing, write processing, copy processing, etc. of unerased blocks
15 ... Working RAM
16 ... Control program ROM

Claims (2)

それぞれが選択的に書き込み及び消去可能な複数のブロックを有するメモリセルアレイと、
前記複数のブロックのそれぞれが消去済みか否かを示す消去フラグを有する管理手段と、
前記複数のブロックのうち未使用ブロックを割り出し、新たなデータを前記未使用ブロックに書き込む制御手段と、
書きかえられるべき旧データが記録されたブロックに対応する前記消去フラグを消去済みにセットする手段と、
前記消去フラグがセットされた前記ブロックを選択的に消去する手段と、
前記旧データを有していたブロックの物理アドレスに対応付けられていた論理アドレスを前記新たなデータが書きこまれたブロックの物理アドレスに対応付ける手段とを有し、
前記複数のブロックのそれぞれは前記メモリセルアレイが実現されている不揮発性半導体メモリチップよりも小さい単位としての消去単位であることを特徴とする不揮発性半導体メモリ装置。
A memory cell array having a plurality of blocks each of which can be selectively written and erased;
Management means having an erasure flag indicating whether each of the plurality of blocks has been erased;
Control means for determining an unused block among the plurality of blocks and writing new data to the unused block;
Means for setting the erase flag corresponding to a block in which old data to be rewritten is recorded;
Means for selectively erasing the block in which the erasure flag is set;
Means for associating a logical address associated with a physical address of a block having the old data with a physical address of a block in which the new data is written;
Each of the plurality of blocks is an erase unit as a unit smaller than a nonvolatile semiconductor memory chip in which the memory cell array is realized.
それぞれが選択的に書き込み及び消去可能な複数のブロックを有するメモリセルアレイを含む不揮発性半導体メモリ装置のデータ書き換え制御方法において、
前記複数のブロックのそれぞれは前記メモリセルアレイが実現されている不揮発性半導体メモリチップよりも小さい単位としての消去単位であり、
前記複数のブロックのうち、未使用ブロックを割り出すステップと、
書きかえられる旧データを有するブロックを消去せずに前記未使用ブロックに新たなデータを書き込むステップと、
前記旧データを有していたブロックの物理アドレスに対応付けられていた論理アドレスを前記新たなデータが書きこまれたブロックの物理アドレスに対応付けるステップと、
前記未使用ブロックに対する書き込みが終了したことをホストシステムに通知するステップと、
前記通知するステップの後に、前記旧データを記録していた前記ブロックを選択的に消去するステップ
とを含むことを特徴とする不揮発性半導体メモリ装置の制御方法。
In a data rewrite control method of a nonvolatile semiconductor memory device including a memory cell array each having a plurality of blocks that can be selectively written and erased,
Each of the plurality of blocks is an erase unit as a unit smaller than the nonvolatile semiconductor memory chip in which the memory cell array is realized,
Of the plurality of blocks, determining an unused block;
Writing new data to the unused block without erasing the block having the old data to be rewritten;
Associating a logical address associated with a physical address of a block having the old data with a physical address of a block in which the new data is written;
Notifying the host system that writing to the unused block has ended;
And a step of selectively erasing the block in which the old data has been recorded after the notifying step.
JP2005315431A 2005-10-28 2005-10-28 Nonvolatile semiconductor memory device and its control method Withdrawn JP2006053950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005315431A JP2006053950A (en) 2005-10-28 2005-10-28 Nonvolatile semiconductor memory device and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005315431A JP2006053950A (en) 2005-10-28 2005-10-28 Nonvolatile semiconductor memory device and its control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003032999A Division JP2003242788A (en) 2003-02-10 2003-02-10 Nonvolatile semiconductor memory device and control method therefor

Publications (1)

Publication Number Publication Date
JP2006053950A true JP2006053950A (en) 2006-02-23

Family

ID=36031337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005315431A Withdrawn JP2006053950A (en) 2005-10-28 2005-10-28 Nonvolatile semiconductor memory device and its control method

Country Status (1)

Country Link
JP (1) JP2006053950A (en)

Similar Documents

Publication Publication Date Title
JP3485938B2 (en) Nonvolatile semiconductor memory device
JP3692313B2 (en) Nonvolatile memory control method
US8041884B2 (en) Controller for non-volatile memories and methods of operating the memory controller
EP1739683B1 (en) Space management for managing high capacity nonvolatile memory
US9448919B1 (en) Data storage device accessing garbage collected memory segments
JP5336060B2 (en) Nonvolatile memory device and method of operating the same
JP4245585B2 (en) Memory controller, flash memory system, and flash memory control method
JP4182993B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US7529879B2 (en) Incremental merge methods and memory systems using the same
US20070028035A1 (en) Storage device, computer system, and storage system
JP2007520801A5 (en)
US20070150645A1 (en) Method, system and apparatus for power loss recovery to enable fast erase time
US8074128B2 (en) Block management and replacement method, flash memory storage system and controller using the same
JP4177360B2 (en) Memory controller, flash memory system, and flash memory control method
JP2003058417A (en) Storage device
JP4661369B2 (en) Memory controller
JP4661497B2 (en) Memory controller, flash memory system, and flash memory control method
KR100932801B1 (en) Memory management methods, memory devices, and computer readable storage media
JP4594944B2 (en) Memory control device
US20050204115A1 (en) Semiconductor memory device, memory controller and data recording method
JP4513786B2 (en) Memory controller, memory system, and memory control method
JP4177292B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM, AND FLASH MEMORY CONTROL METHOD
JP3977859B2 (en) Nonvolatile semiconductor memory device and control method thereof
JP2003263894A (en) Method for controlling nonvolatile semiconductor memory device
JP2003242788A (en) Nonvolatile semiconductor memory device and control method therefor

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