JP3412839B2 - Nonvolatile semiconductor memory device - Google Patents

Nonvolatile semiconductor memory device

Info

Publication number
JP3412839B2
JP3412839B2 JP17423292A JP17423292A JP3412839B2 JP 3412839 B2 JP3412839 B2 JP 3412839B2 JP 17423292 A JP17423292 A JP 17423292A JP 17423292 A JP17423292 A JP 17423292A JP 3412839 B2 JP3412839 B2 JP 3412839B2
Authority
JP
Japan
Prior art keywords
data
recorded
block
writing
error
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
JP17423292A
Other languages
Japanese (ja)
Other versions
JPH0619778A (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 JP17423292A priority Critical patent/JP3412839B2/en
Priority to KR1019930012262A priority patent/KR960005895B1/en
Priority to US08/084,477 priority patent/US5379262A/en
Publication of JPH0619778A publication Critical patent/JPH0619778A/en
Application granted granted Critical
Publication of JP3412839B2 publication Critical patent/JP3412839B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/20Initialising; Data preset; Chip identification
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/34Determination of programming status, e.g. threshold voltage, overprogramming or underprogramming, retention
    • G11C16/3436Arrangements for verifying correct programming or erasure
    • G11C16/344Arrangements for verifying correct erasure or for detecting overerased cells
    • G11C16/3445Circuits or methods to verify correct erasure of nonvolatile memory cells
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/38Response verification devices
    • G11C29/42Response verification devices using error correcting codes [ECC] or parity check
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/04Erasable programmable read-only memories electrically programmable using variable threshold transistors, e.g. FAMOS
    • G11C16/0483Erasable programmable read-only memories electrically programmable using variable threshold transistors, e.g. FAMOS comprising cells having several storage transistors connected in series

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Read Only Memory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、電気的に書き換え可能
な不揮発性半導体メモリ素子(EEPROM)のうちの
NAND型EEPROMを用いた不揮発性半導体メモリ
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a nonvolatile semiconductor memory device using a NAND type EEPROM among electrically rewritable nonvolatile semiconductor memory elements (EEPROM).

【0002】[0002]

【従来の技術】コンピュータの2次記憶装置には、現在
磁気ディスク装置が広く用いられているが、近年、電気
的に書き換え可能な不揮発性半導体メモリ(EEPRO
M)が、その機械的強度に対する信頼性、低消費電力、
可搬性の良さ、高速アクセスといった特徴を生かして、
磁気ディスクを置き換えるような用途に使われだした。
しかし、磁気ディスク装置とEEPROMには機能的な
相違点があるため、従来の磁気ディスク装置をそのまま
置き換えるためには、これを埋めるための制御が必要と
なる。
2. Description of the Related Art A magnetic disk device is widely used at present as a secondary storage device of a computer. In recent years, an electrically rewritable nonvolatile semiconductor memory (EEPRO) has been used.
M) is reliability for its mechanical strength, low power consumption,
Taking advantage of features such as good portability and high-speed access,
It was used for applications such as replacing magnetic disks.
However, since there is a functional difference between the magnetic disk device and the EEPROM, in order to replace the conventional magnetic disk device as it is, control for filling this is required.

【0003】EEPROMの一つとして、高集積化が可
能なNAND型EEPROMが知られている。これは、
複数のメモリセルをそれらのソース、ドレインを隣接す
るもの同士で共有する形で直列接続して一単位とし、ビ
ット線に接続するものである。メモリセルは通常、電荷
蓄積層と制御ゲートが積層されたFETMOS構造を有
する。メモリセルアレイは、p型基板、又はn型基板に
形成されたp型ウェル内に集積形成される。NANDセ
ルのドレイン側は選択ゲートを介してビット線に接続さ
れ、ソース側はやはり選択ゲートを介して、ソース線
(基準電位配線に接続される(図21))。メモリセル
の制御ゲートは、行方向に連続的に接続されてワード線
となる。通常同一ワード線につながるメモリセルの集合
を1ページと呼び、一組のドレイン側及びソース側の選
択ゲートに挟まれたページの集合を1NANDブロック
又は単に1ブロックと呼ぶ(図22)。通常1ブロック
は独立に消去可能な最小単位となる。
As one of the EEPROMs, a NAND type EEPROM capable of high integration is known. this is,
A plurality of memory cells are connected in series so that their sources and drains are shared by adjacent ones to form one unit, which is connected to a bit line. The memory cell usually has a FETMOS structure in which a charge storage layer and a control gate are stacked. The memory cell array is integrated and formed in a p-type well formed on a p-type substrate or an n-type substrate. The drain side of the NAND cell is connected to the bit line via the select gate, and the source side is also connected to the source line (reference potential wiring (FIG. 21)) via the select gate. The control gates of the memory cells are continuously connected in the row direction to form word lines. Usually, a set of memory cells connected to the same word line is called one page, and a set of pages sandwiched by a set of drain-side and source-side select gates is called one NAND block or simply one block (FIG. 22). Normally, one block is the minimum unit that can be independently erased.

【0004】NAND型EEPROMの動作は次の通り
である。データの消去は1NANDブロック内のメモリ
セルに対して同時に行われる。即ち選択されたNAND
ブロックの全ての制御ゲートを基準電位VSSとし、p
型ウェル及びn型基板に高電圧VPP(例えば20V)
を印加する。これにより、全てのメモリセルにおいて浮
遊ゲートから基板に電子が放出され、しきい値は負の方
向にシフトする。通常この状態を”1”状態と定義す
る。またチップ消去は全NANDブロックを選択状態に
することによりなされる。
The operation of the NAND type EEPROM is as follows. Data is erased simultaneously for the memory cells in one NAND block. That is, the selected NAND
All control gates of the block are set to the reference potential VSS and p
High voltage VPP (eg, 20V) on the well and n-type substrate
Is applied. As a result, in all memory cells, electrons are emitted from the floating gate to the substrate, and the threshold value shifts in the negative direction. Usually, this state is defined as the "1" state. Chip erasing is performed by putting all NAND blocks in the selected state.

【0005】データの書き込み動作は、ビット線から最
も離れた位置のメモリセルから順に行われる。NAND
ブロック内の選択された制御ゲートには高電圧VPP
(例えば20V)を印加し、他の非選択ゲートには中間
電位VM(例えば10V)を与える。またビット線には
データに応じて、VSS又はVMを与える。ビット線に
VSSが与えられたとき(”0”書き込み)、その電位
は選択メモリセルに伝達され、浮遊ゲートに電子注入が
生ずる。これによりその選択メモリセルのしきい値は正
方向にシフトする。通常この状態を”0”状態と定義す
る。ビット線にVMが与えられた(”1”書き込み)メ
モリセルには電子注入は起らず、従ってしきい値は変化
せず負に留まる。データの読み出し動作はNANDブロ
ック内の選択されたメモリセルの制御ゲートをVSSと
して、それ以外の制御ゲート及び選択ゲートをVCCと
し選択メモリセルで電流が流れるか否かを検出すること
により行われる。
The data write operation is performed in order from the memory cell located farthest from the bit line. NAND
A high voltage VPP is applied to the selected control gate in the block.
(For example, 20 V) is applied, and the intermediate potential VM (for example, 10 V) is applied to the other non-selected gates. Further, VSS or VM is given to the bit line according to the data. When VSS is applied to the bit line ("0" write), the potential is transmitted to the selected memory cell, and electron injection occurs in the floating gate. This shifts the threshold value of the selected memory cell in the positive direction. Usually, this state is defined as the "0" state. No electron injection occurs in the memory cell in which VM is applied to the bit line ("1" write), and therefore the threshold value remains unchanged and remains negative. The data read operation is performed by setting the control gate of the selected memory cell in the NAND block to VSS and the other control gates and select gates to VCC to detect whether or not a current flows in the selected memory cell.

【0006】NAND型EEPROMではデータの書き
込みはソース線に近いページからドレイン側のページに
順に行なわれる必要がある。その必要性を図23を参照
して以下に説明する。”1”書き込みは中間電位VM
(10V程度)を選択メモリセルのドレインに転送し、
電子の注入を起こさせず消去状態(即ち負のしきい値)
を保つ。図23は制御ゲート1が選択状態(VPP)の
ときを示している。よって制御ゲート2は非選択でVM
が与えられている。またドレインにもVM(”1”書き
込み)が与えられている。図23(a)はソース側から
書き込みを行なったときの図、図23(b)はドレイン
側から書き込みを行なった場合のものである。図23
(a)の場合ドレイン側のセルMa2のしきい値は負で
あるので、ドレインの電位VMは確実にソース側セルM
a1に転送される。しかしながら、図23(b)の場合
ドレイン側セルMb2にすでに”0”書き込み動作がな
され、正のしきい値(たとえば3.5V)を持っていた
とすると、ソース側セルMb1に”1”を書き込む際、
セルMb1にはVMからセルMb2のしきい値電圧分差
し引いた電圧しか転送されてこない。よってセルMb1
では制御ゲートと基板間の電位差が大きくなって誤書き
込みが起こる可能性がある。以上のようにソース側から
順に書き込む手段は誤書き込みを防ぐ意味で重要であ
る。
In the NAND type EEPROM, it is necessary to write data in order from the page near the source line to the page on the drain side. The necessity will be described below with reference to FIG. "1" writing is at intermediate potential VM
(About 10V) is transferred to the drain of the selected memory cell,
Erased state without electron injection (ie negative threshold)
Keep FIG. 23 shows when the control gate 1 is in the selected state (VPP). Therefore, control gate 2 is not selected and VM
Is given. Further, VM (“1” writing) is also applied to the drain. FIG. 23A is a diagram when writing is performed from the source side, and FIG. 23B is a diagram when writing is performed from the drain side. FIG. 23
In the case of (a), since the threshold value of the cell Ma2 on the drain side is negative, the potential VM of the drain is surely set to the cell M on the source side.
is transferred to a1. However, in the case of FIG. 23B, if the "0" write operation has already been performed in the drain side cell Mb2 and it has a positive threshold value (for example, 3.5 V), "1" is written in the source side cell Mb1. When
Only the voltage obtained by subtracting the threshold voltage of the cell Mb2 from VM is transferred to the cell Mb1. Therefore, cell Mb1
Then, the potential difference between the control gate and the substrate becomes large, and erroneous writing may occur. As described above, the means for sequentially writing from the source side is important in the sense of preventing erroneous writing.

【0007】従来の磁気ディスク装置では、データの読
み出しや書き込みといったアクセスは、セクタを単位と
して行われている。磁気記録媒体上に同心円状に形成さ
れる記憶領域の1本1本はトラックと呼ばれているが、
このトラックがさらに数十個の領域に分割されてセクタ
と呼ばれる記憶単位が形成されている。パーソナルユー
スの携帯型コンピュータに使用されている典型的磁気デ
ィスク装置の1セクタの容量は512バイトである。
In the conventional magnetic disk device, accesses such as reading and writing of data are performed in units of sectors. Each of the storage areas formed concentrically on the magnetic recording medium is called a track.
This track is further divided into several tens of areas to form a storage unit called a sector. The capacity of one sector of a typical magnetic disk device used in a portable computer for personal use is 512 bytes.

【0008】また、コンピュータが磁気ディスク装置に
データを記憶させる場合の一塊のデータをファイルと呼
んでいるが、このファイルが記憶装置上のどの場所に記
憶されているのかを管理するのが、オペレーティングシ
ステム(以下OS)の重要な機能の一つである。
When a computer stores data in a magnetic disk device, a block of data is called a file. It is the operating system that manages where in the storage device this file is stored. This is one of the important functions of the system (hereinafter OS).

【0009】図24は、パーソナルユースの携帯型コン
ピュータに使用されている典型的なOSの一つであるM
S−DOSがファイル管理をするために磁気ディスク装
置の記憶領域をどの様に使用しているかを示す図であ
る。61のブート領域はコンピュータが起動するときに
必要な情報が納められている領域で、ユーザファイルの
管理には関わらない領域である。64のルートディレク
トリ領域には、ファイルの名前とそれに付随する情報を
記録したファイル管理用テーブルが納められている。ル
ートディレクトリにより他のデータファイルと同様な扱
いで管理されるが、その内容はルートディレクトリと同
一の、サブディレクトリと呼ばれるものがデータ領域に
階層的に存在し得る。これらは、存在する領域と階層中
での順位を除いて機能的には同じものであるので総称し
て単にディレクトリと呼ばれる。ディレクトリ中の1つ
のファイルに関する情報は32バイトの領域を占めてい
てその内容は図25に示すようになっている。磁気ディ
スク装置のデータ記録がセクタを単位としていることは
先に述べたが、ファイルに対してディスク上の領域を割
り当てるにはクラスタという論理的単位を用いる。1ク
ラスタは、2のべき乗倍個のセクタで構成されるように
ディスクの種類によって決められている。図25の66
のスタートクラスタ番号とはファイルの先頭に割り当て
られたクラスタの番号である。図24の62のFAT領
域には、65のデータ領域中のクラスタがどの様な順に
つながって、1つのファイルを構成しているのかを表す
データ領域へのファイル割当情報が納められている。6
3はFAT領域62のバックアップである。以上のよう
に、MS−DOSのファイル管理は、FAT領域とルー
トディレクトリ領域の情報をもとに行われるが、これら
の領域の位置と大きさは、ディスクの種類ごとに決めら
れていて固定である。
FIG. 24 is a typical OS M used in a personal computer for portable use.
It is a figure which shows how S-DOS is using the storage area of a magnetic disk unit for file management. The boot area 61 is an area in which information necessary for starting the computer is stored, and is not related to the management of user files. In the 64 root directory area, a file management table in which the name of the file and the information accompanying it are recorded is stored. The root directory manages the data file in the same manner as other data files, but its contents may be the same as the root directory, but a subdirectory may exist hierarchically in the data area. These are functionally the same except for the existing area and the rank in the hierarchy, and are therefore generically called simply directories. The information about one file in the directory occupies a 32-byte area, and its contents are as shown in FIG. As described above, the data recording of the magnetic disk device uses the sector as a unit, but a logical unit called a cluster is used to allocate the area on the disk to the file. One cluster is determined by the type of disk so that it is composed of a power of 2 sectors. FIG. 25, 66
The start cluster number of is the cluster number assigned to the beginning of the file. In the FAT area 62 of FIG. 24, file allocation information for the data area is stored, which indicates in what order the clusters in the data area 65 are connected to form one file. 6
Reference numeral 3 is a backup of the FAT area 62. As described above, the file management of MS-DOS is performed based on the information of the FAT area and the root directory area, but the position and size of these areas are fixed and fixed for each type of disc. is there.

【0010】NAND型EEPROMのアクセスの単位
は前述の通りページである。4MビットのNAND型E
EPROMを例に取ると、1ページは512バイトで、
1ブロックは8ページで構成されている。よって、磁気
ディスク装置をNAND型EEPROMで置き換えるよ
うな応用においては、ディスクの1セクタをNAND型
EEPROMの1ページに対応させると変換が容易であ
る。しかしながら磁気ディスク装置をEEPROMで置
き換えようとする場合に問題となる大きな相違点の一つ
に、データの書き換え可能回数がある。磁気ディスク装
置の場合、媒体上に記録されるデータの書き換え回数に
は制限がなく、その寿命はヘッドと磁気記録媒体が接触
することによる損傷といった機械的な要因に支配されて
いる。一方EEPROMの場合は、データの書き換え可
能回数が現状の技術では104 ないし105 回程度しか
ない。
The access unit of the NAND type EEPROM is a page as described above. 4M bit NAND type E
Taking EPROM as an example, one page is 512 bytes,
One block consists of eight pages. Therefore, in an application in which the magnetic disk device is replaced with the NAND type EEPROM, conversion can be easily performed by associating one sector of the disk with one page of the NAND type EEPROM. However, one of the major differences that poses a problem when replacing the magnetic disk device with an EEPROM is the number of times data can be rewritten. In the case of a magnetic disk device, there is no limit on the number of times data can be rewritten on a medium, and its life is governed by mechanical factors such as damage caused by contact between the head and the magnetic recording medium. On the other hand, in the case of the EEPROM, the number of times data can be rewritten is only about 10 4 to 10 5 in the current technology.

【0011】また、前述のように、磁気ディスク装置の
1セクタに記録される”データ”量は512バイトであ
るが、このデータ量とはユーザが記録再生する情報の量
で、セクタ内にはこの他にも、記録再生制御に必要な情
報が追加して書き込まれてある。そういった情報の一つ
に誤り訂正コード(以下ECCコード)がある。これ
は、媒体の欠陥やノイズの影響等で、ユーザのデータが
正しく読み取れなかった場合に、読み取りデータに誤り
があることを検出したり、さらにその誤りを訂正したり
するための情報で、セクタにデータを書き込むときに、
ECC発生回路が記録されるデータをもとに計算し、デ
ータとともに媒体上に書き込まれる。
Further, as described above, the amount of "data" recorded in one sector of the magnetic disk device is 512 bytes, and this amount of data is the amount of information recorded and reproduced by the user. In addition to this, information necessary for recording / reproduction control is additionally written. One of such information is an error correction code (ECC code). This is information for detecting that there is an error in the read data and correcting the error when the user's data could not be read correctly due to the influence of media defects or noise. When writing data to
The ECC generating circuit calculates based on the recorded data and writes it together with the data on the medium.

【0012】NAND型EEPROMのアクセス単位は
ページであり、多少の相違はあるものの、これを磁気デ
ィスク装置のセクタに相当するものと見なすことができ
る。信頼性を向上させるため、磁気ディスク装置のよう
に、1ページの物理的な容量をユーザデータが記録再生
される情報量より多くして、その冗長分をECCに割り
当てることは有効な施策の一つである。
The access unit of the NAND type EEPROM is a page, and although there are some differences, it can be regarded as equivalent to a sector of the magnetic disk device. In order to improve reliability, it is an effective measure to increase the physical capacity of one page larger than the amount of information recorded / reproduced by user data and allocate the redundant portion to ECC, as in a magnetic disk device. Is one.

【0013】従来の磁気ディスク装置では、これを記憶
装置として使用するために、フォーマットと呼ばれる初
期化が必要とされる。フォーマットにより、磁気記録媒
体上には一連の複数セクタが円周上に並んだトラックが
形成され、さらにこのトラックが同心円状に複数(通常
数百〜千数百)本形成される。このとき、各セクタは、
ユーザデータ領域に特定の初期化パターンが書き込まれ
るとともに、記録再生制御に必要な情報が書き込まれ
る。ECCも初期化パターンから計算されたものが書き
込まれる。一方、NAND型EEPROMは、先の説明
からわかるように、一度書き込みを行ったページに対し
ては、磁気ディスク装置で行われるような重ね書きをす
ることは出来ない。例え1ページでもデータを書き換え
るためには、複数のページからなるブロックを単位とし
て消去を行う必要があるから、消去されるブロックの他
のページは、必要によって待避させて消去後に書き戻す
こともしなければならない。よって、消去後のページ
は、有効なユーザデータを書き込むときまで消去状態に
保っていた方が好都合の場合が多い。
In the conventional magnetic disk device, in order to use it as a storage device, initialization called format is required. Depending on the format, a track in which a series of a plurality of sectors are lined up on the circumference is formed on the magnetic recording medium, and a plurality of tracks (usually several hundreds to several hundreds) are concentrically formed. At this time, each sector
A specific initialization pattern is written in the user data area, and information necessary for recording / reproduction control is written. The ECC calculated is also written from the initialization pattern. On the other hand, in the NAND type EEPROM, as can be seen from the above description, it is not possible to overwrite the page which has been written once as it is done in the magnetic disk device. For example, in order to rewrite even one page of data, it is necessary to erase in units of blocks composed of multiple pages. Therefore, other pages in the block to be erased must be saved and written back after the erase if necessary. I have to. Therefore, it is often convenient to keep the erased page in the erased state until writing valid user data.

【0014】[0014]

【発明が解決しようとする課題】磁気ディスク装置の場
合、装置に保証された寿命時間を20000動作時間、
この内の数分の1がデータの書き換えに費やされる時間
であるとすると、ファイル管理領域等の特定の記憶領域
に対して最悪で109 回程度の書き換えが行われると見
積もることができる。これに対してNAND型EEPR
OMは、前述の通り、書き換え可能回数は105 回程度
であるから、磁気ディスク装置と同様の使い方をする
と、1ブロックのみに書き込みが集中するという最悪の
場合に、1万分の1の回数しか書き込みを行うことが出
来ない。実際のデータの書き込み位置は記憶領域内に分
散するので、その分、見かけの書換回数はこれよりは増
加する。ところが、1度書き込まれた後に長期間消去さ
れないデータが存在すると、書き込み可能領域が狭くな
ったのと等価であるから、それだけ書き換えできる回数
が減少する。
In the case of a magnetic disk device, the life time guaranteed for the device is 20,000 operating hours,
If a fraction of this time is spent in rewriting data, it can be estimated that rewriting is performed about 10 9 times at worst in a specific storage area such as a file management area. On the other hand, NAND EEPR
As described above, the OM can be rewritten about 10 5 times, so if it is used in the same way as the magnetic disk device, in the worst case that the writing concentrates on only one block, the number of times is 10,000 times. I can't write. Since the actual data writing positions are dispersed in the storage area, the apparent number of times of rewriting increases more than that. However, if there is data that is not erased for a long period of time after being written once, this is equivalent to the narrowing of the writable area, and thus the number of times of rewriting decreases.

【0015】また、OSによるファイル管理のように、
一般に、ファイルはデータ領域の空いた領域であればど
こに記録されてもよく、その場所はディレクトリとFA
Tのようなテーブルで管理されている。よって、書き換
え可能回数に制限があるEEPROMにこのようなファ
イル管理を適用しても、ファイルに関しては、同一場所
への書き換えが集中しないように書き込み位置を分散さ
せるのは容易である。ところが、ファイルを書き込んだ
り書き換えたりした場合には必ずファイル管理テーブル
の内容の書き換えが発生するので、これらのテーブルデ
ータが書き換えられる頻度は、個々のデータファイルが
書き込まれる頻度に比べてかなり多い。しかも、このテ
ーブルはファイルの記録場所を検索するおおもとの情報
であるから、いつも決まった位置に記録されている必要
がある。よって、EEPROMをファイル記憶装置に応
用した場合、この管理テーブル領域に集中した書き換え
によって、短時間で寿命に至ってしまうおそれがあると
いう問題があった。
Further, like file management by the OS,
Generally, a file may be recorded in any free area of the data area, and its location is a directory and an FA.
It is managed in a table like T. Therefore, even if such file management is applied to the EEPROM in which the number of rewritable times is limited, it is easy to disperse the writing positions of files so that rewriting to the same location is not concentrated. However, the contents of the file management table are always rewritten when a file is written or rewritten, so the frequency of rewriting these table data is considerably higher than the frequency of writing individual data files. Moreover, since this table is the basic information for searching the file recording location, it must always be recorded in a fixed position. Therefore, when the EEPROM is applied to a file storage device, there is a problem in that rewriting concentrated on the management table area may lead to a short life.

【0016】さらに、前述の説明から分るように、磁気
ディスク装置では、有効なユーザデータが書き込まれる
前のセクタも、ユーザデータの書き込まれたセクタと同
様にECCによるチェックを行って何等差し支えない。
これに対して、消去後のページが有効なユーザデータを
書き込むときまで消去状態に保たれるように制御された
NAND型EEPROMでは、有効なユーザデータが書
き込まれる前のページを読み出すと、ECCを含めたペ
ージ内の情報は全て”1”になっているから、ECC検
査回路は誤りがあるという判定を下してしまう。
Further, as can be seen from the above description, in the magnetic disk device, the sector before the effective user data is written can be checked by the ECC as in the sector in which the user data is written, and there is no problem. .
On the other hand, in the NAND type EEPROM that is controlled so that the erased page is kept in the erased state until the valid user data is written, the ECC is read when the page before the valid user data is written is read. Since the information in the included page is all "1", the ECC checking circuit determines that there is an error.

【0017】通常、ホストコンピュータのオペレーティ
ングシステムは、有効なデータの書かれていないページ
のみを読み出そうとすることはないが、複数のページを
ファイル管理の単位としている場合に、既に有効なデー
タの書かれたページと一緒に読み込もうとすることは有
り得る。また、ページの書き換えにともなってブロック
消去をするときに、消去されるブロック内の他のページ
に、既に書き込みがされているのか否かを、データの待
避を制御する手段が知り得ないような制御装置の場合に
は、消去状態のページもバッファに読み込まなくてはな
らない。こうした場合に、消去状態のページのデータに
対してECC検査回路が働いてしまうと、上述のよう
に、本来は正常なページであるにもかかわらず、誤りが
発生したと誤認され、エラー処理に制御が移ってしま
い、処理を正常に進めることが出来なくなってしまう。
Normally, the operating system of the host computer does not try to read only the page in which valid data is not written, but when a plurality of pages are used as a unit of file management, already valid data is not read. It's possible to try to load it with the page where is written. In addition, when the block is erased as the page is rewritten, the means for controlling the saving of data cannot know whether or not another page in the block to be erased has already been written. In the case of the controller, erased pages must also be read into the buffer. In such a case, if the ECC check circuit operates on the data of the page in the erased state, as described above, it is erroneously recognized that an error has occurred even though the page is originally a normal page, and error processing is performed. The control is transferred, and the processing cannot proceed normally.

【0018】本発明は、上述のような問題に鑑みなされ
たもので、磁気ディスク装置と同等の寿命を実現するこ
とができ、また高信頼性を確保することができる不揮発
性半導体メモリ装置を提供することを目的とする。
The present invention has been made in view of the above problems, and provides a non-volatile semiconductor memory device capable of achieving a life equivalent to that of a magnetic disk device and ensuring high reliability. The purpose is to do.

【0019】[0019]

【課題を解決するための手段】上記課題を解決するため
に、本発明は、第1に、管理の単位となる容量で区切ら
れた複数の記憶領域を備えたメモリ手段と、複数の前記
記憶領域に対するデータの書き込みに際し当該複数の記
憶領域が物理的或いは論理的な配置にしたがって一方向
に循環して使用されるように管理する第1の管理手段
と、複数の前記記憶領域に記録されたデータが所定の時
点から後に変更されたか否かを管理する第2の管理手段
と、データの書き込みにより予め定められた条件が成立
した時点で前記第2の管理手段が初期化された時点より
後にはデータが変更されていない前記記憶領域を選択し
この選択した記憶領域のデータを他の記憶領域に移動さ
せるとともに全ての記憶領域のデータが変更されたと見
なされる場合には当該第2の管理手段を初期化する制御
手段とを有することを要旨とする。
In order to solve the above-mentioned problems, the present invention firstly provides a memory means having a plurality of storage areas divided by a capacity which is a unit of management, and a plurality of the storage means. When writing data to the area, a first management unit that manages the plurality of storage areas so that the plurality of storage areas are cyclically used in one direction according to a physical or logical arrangement, and the plurality of storage areas are recorded. Second management means for managing whether or not the data has been changed after a predetermined time point, and after the second management means is initialized when the predetermined condition is satisfied by writing the data. Is selected when the storage area in which the data has not been changed is selected, the data in the selected storage area is moved to another storage area, and when it is considered that the data in all the storage areas have been changed. That a control means for initializing the second management unit to subject matter.

【0020】第2に、上記第1の構成において、前記予
め定められた条件が成立した時点とは、前記第1の管理
手段で管理される循環の1周期をもってその時点とする
ことを要旨とする。
Secondly, in the above-mentioned first construction, the time when the predetermined condition is satisfied is defined as the time when one cycle of the circulation controlled by the first control means is reached. To do.

【0021】第3に、ファイル、該ファイルの記録され
た位置を管理する管理テーブル及び該管理テーブルの記
録された位置を複数階に階層的に示すように構成された
ポインタが記録されるメモリ手段と、該メモリ手段内に
おいて前記管理テーブルの記録される位置は固定されず
前記複数階のポインタのうち根源となるルートポインタ
の記録される位置のみが固定されるように制御する制御
手段とを有することを要旨とする。
Thirdly, a memory means for recording a file, a management table for managing the recorded position of the file, and a pointer configured to hierarchically indicate the recorded position of the management table on a plurality of floors. And a control means for controlling such that the recorded position of the management table is not fixed in the memory means but only the recorded position of the root pointer which is the root of the pointers of the plurality of floors is fixed. That is the summary.

【0022】第4に、データ及び該データに対応した誤
り検出コードが記録される記憶領域を備えたメモリ手段
と、該メモリ手段から読み出された前記データ及び誤り
検出コードから当該データに誤りがあるか否かを検出す
る誤り検出手段と、前記メモリ手段から読み出されたデ
ータから該データの記録された前記記憶領域が消去状態
であるか否かを検出する消去検出手段と、前記誤り検出
手段で読み出したデータに誤りが検出された場合でも前
記消去検出手段が同時に消去状態を検出した場合には当
該読み出しデータには誤りが無いものとして処理する制
御手段とを有することを要旨とする。
Fourth, there is an error in the data from the memory means having a storage area in which the data and the error detection code corresponding to the data are recorded, and the data and the error detection code read from the memory means. Error detection means for detecting whether or not there exists, erasure detection means for detecting whether or not the storage area in which the data is recorded is in an erased state from the data read from the memory means, and the error detection Even if an error is detected in the data read by the means, when the erasure detection means simultaneously detects an erased state, the read data is treated as having no error.

【0023】[0023]

【作用】上記構成において、第1に、データの書き込み
が複数の記憶領域に対し一方向に循環して行われるので
書き込みが特定の記憶領域に集中することなく、複数の
記憶領域全体に均一に行われる。また、書き込まれた
後、長期間変更を受けることなく同じ場所に留まってい
るデータは複数の記憶領域全体と比較した書き込み回数
に不均衡が生じないように移動させられるので、見かけ
の書き込み領域が狭まって寿命を縮めてしまうことが防
止される。
In the above structure, firstly, since the data writing is circulated in a plurality of storage areas in one direction, the writing is not concentrated in a specific storage area, and the data is evenly distributed over the plurality of storage areas. Done. Also, after writing, data that remains in the same place for a long time without being changed can be moved so that the number of times of writing compared to the entire multiple storage areas does not become imbalanced, so the apparent writing area It is prevented from narrowing and shortening the life.

【0024】第2に、書き込まれたデータが変更されて
いない記憶領域の選択が、書き込みの1循環周期を以っ
て行われることにより、見かけの書き込み領域を狭める
ことが一層適切に防止される。
Secondly, the selection of the storage area in which the written data has not been changed is performed with one cycle of writing, so that the apparent writing area is more appropriately prevented from being narrowed. .

【0025】第3に、書き換え頻度の高い管理テーブル
のメモリ手段上での記録位置が固定されず、またこの管
理テーブルの位置を示すポインタを複数階に階層化して
記録することにより、検索のため固定した位置に記録さ
れなければならないポインタの書き換え回数が他の領域
と同等に抑えられて特定の記憶領域に書き込みが集中し
て短時間で寿命に至ってしまうことが防止される。
Thirdly, the recording position on the memory means of the management table which is frequently rewritten is not fixed, and the pointer indicating the position of this management table is hierarchically recorded on a plurality of floors for the purpose of retrieval. The number of times of rewriting the pointer that must be recorded at a fixed position is suppressed to the same as that of other areas, and it is possible to prevent writing from concentrating on a specific storage area and reaching the end of its life in a short time.

【0026】第4に、読み出されたデータからその記憶
領域であるページ等が消去状態であるかどうかが検出さ
れて誤り検出手段の検出結果に誤りがでることが防止さ
れる。これにより、消去状態のページ等がデータの書き
込まれたページ等と区別無く読み出されるような制御が
行われる場合にも、読み出しデータの正確な誤り検出が
行われて高い信頼性が確保される。
Fourth, it is detected from the read data whether or not the page or the like, which is the storage area, is in the erased state, and it is possible to prevent an error in the detection result of the error detecting means. As a result, even when the control is performed such that the erased page or the like is read out without being distinguished from the data-written page or the like, accurate error detection of the read data is performed and high reliability is ensured.

【0027】[0027]

【実施例】以下、本発明の実施例を図面を参照して説明
する。本実施例は、NAND型EEPROMを用いた不
揮発性半導体メモリ装置に適用されている。
Embodiments of the present invention will be described below with reference to the drawings. This embodiment is applied to a nonvolatile semiconductor memory device using a NAND type EEPROM.

【0028】図1ないし図9は、本発明の第1実施例を
示す図である。まず、図2は、メモリ手段であるEEP
ROMにおける記憶領域の構成を示している。同図の3
1〜36は、管理の単位となる容量で区切られた複数の
記憶領域であり、消去単位と同一或いはその整数倍とす
ると扱いが簡単になるが、それに限定されるものではな
い。また、本実施例では以下この単位記憶領域を単にブ
ロックと称するが、これはNAND型EEPROMの消
去単位であるブロックと解釈しても構わないがそれに限
定されるものでもない。各ブロックに付けられた番号
は、各ブロックを順位付けするためのもので、物理的な
アドレス順とするのが分りやすいが、特定の規則に従っ
た論理的な順位であっても構わない。以後簡単のため
に、ここで説明に使用するメモリ手段は6個のブロック
で構成されていることにする。
1 to 9 are views showing a first embodiment of the present invention. First, FIG. 2 shows an EEP as a memory means.
The structure of the storage area in ROM is shown. 3 in the figure
Reference numerals 1 to 36 denote a plurality of storage areas divided by a capacity serving as a unit of management. If the storage area is the same as the erasing unit or an integral multiple thereof, the handling becomes easy, but the present invention is not limited to this. Further, in the present embodiment, this unit storage area is simply referred to as a block hereinafter, but this may be interpreted as a block which is an erase unit of the NAND type EEPROM, but is not limited to this. The numbers given to the blocks are for ranking the blocks, and it is easy to understand that the numbers are in the physical address order, but the logical order may follow a specific rule. For the sake of simplicity, the memory means used in this description will be composed of 6 blocks.

【0029】図1は、上記ブロック31〜36への書き
込みを管理するためのテーブルである。11〜16の各
項目は、ブロック31〜36の状態を示すもので、21
〜23に図示されるように3つのフラグで構成されてい
る。即ち、ブロックに有意なデータが記録されているか
否かを管理する第3の管理手段としてのフラグ(以下、
有効フラグ又はVフラグ)23と、有効フラグとともに
参照することで、データの書き込みをブロックの順位に
したがって1方向に向かって、かつ循環して使用される
ように管理するための第1の管理手段としてのフラグ
(以下、消去フラグ又はEフラグ)21と、ブロックに
記録されたデータが或る時点から後に変更されたか否か
を管理する第2の管理手段としてのフラグ(以下、変更
フラグ又はCフラグ)22である。
FIG. 1 is a table for managing writing to the blocks 31 to 36. Each item of 11 to 16 indicates the state of blocks 31 to 36.
-23, it is composed of three flags. That is, a flag (hereinafter, referred to as a third management means for managing whether or not significant data is recorded in the block)
(Valid flag or V flag) 23 and the valid flag, and first management means for managing data writing so that the data writing is used in one direction in accordance with the order of blocks and in a circular manner. 21 (hereinafter, erase flag or E flag) and a flag (hereinafter, change flag or C) as second management means for managing whether or not the data recorded in the block has been changed after a certain time. Flag) 22.

【0030】次に、図面とフローチャートを使用して、
本実施例の書き込み方式を説明する。なお、書き込まれ
たデータを読み出すためには、書き込んだデータのタグ
(例えばファイル名)と書き込んだ位置の対応を管理す
る手段が必要であるが、これは通常のファイルシステム
(OS)で行われている方法を適用可能なので本実施例
では説明を省略する。
Next, using the drawings and the flow chart,
The writing method of this embodiment will be described. Note that in order to read the written data, a means for managing the correspondence between the tag (for example, file name) of the written data and the written position is necessary, but this is performed by a normal file system (OS). Since the method described above can be applied, description thereof will be omitted in this embodiment.

【0031】図3及び図4はデータ書き込みの手順を示
すフローチャート、図5はデータ消去の手順を示すフロ
ーチャート、図6はデータの書き換え手順を示すフロー
チャート、図7は書き込み手順中で使用されるサブルー
チンのフローチャートである。図8及び図9はデータの
書き込みによって、図2で示した記憶領域と図1で示し
たそれを管理するテーブルの状態の変化を同時に説明す
るための図である。図8及び図9の記憶領域を示す図中
の斜線のブロックは有効なデータが書き込まれている領
域を示すものとする。
FIGS. 3 and 4 are flowcharts showing a data writing procedure, FIG. 5 is a flowchart showing a data erasing procedure, FIG. 6 is a flowchart showing a data rewriting procedure, and FIG. 7 is a subroutine used in the writing procedure. It is a flowchart of. 8 and 9 are diagrams for simultaneously explaining changes in the states of the storage area shown in FIG. 2 and the table for managing it shown in FIG. 1 due to the writing of data. The shaded blocks in the drawings showing the storage areas in FIGS. 8 and 9 indicate areas in which valid data is written.

【0032】まずメモリ装置が使用される前には、図8
(a)に示されるように全てのフラグが”0”に初期化
されるものとする。この状態で第1ブロックの書き込み
を行うことを考える。図3のステップ201で必要な容
量が空いていることをチェックする。次に、この方式で
は有意なデータが記録されているか否かを管理するVフ
ラグと一方向に向っての循環使用を管理するEフラグの
両方が”0”のブロックにしか書き込みを行わないの
で、この条件に合うブロック検索を行う(図3ステップ
202,203、図7ステップ301〜304)。条件
に合うことが確認された後、第1ブロックにデータを書
き込んで(図3ステップ204〜206)、Cフラグと
Vフラグを”1”にする(図3ステップ207、図8
(b))。今書き込んだデータを即書き換えると、図5
の手順に従って、第1ブロックのVフラグ”0”に、E
フラグを”1”に変更し、初回の書き込みと同じ手順で
検索される第2ブロックにデータを書き込む(図8
(c))。これで第1ブロックは論理的な消去状態にな
るが、電気的な消去は別に行わなければならない。バッ
クグラウンドで行われるのが処理速度の面で好ましい
が、その方法は本実施例の本質から外れるので説明は省
略する。以下の説明ではデータが書き込まれる前にこれ
らのブロックに電気的な消去は何らかの方法で済んでい
ることと仮定する。
First, before the memory device is used, FIG.
It is assumed that all flags are initialized to "0" as shown in (a). Consider writing the first block in this state. In step 201 of FIG. 3, it is checked that the required capacity is free. Next, in this method, since both the V flag that manages whether significant data is recorded and the E flag that manages the cyclic use in one direction are written only to the block of "0". A block search that meets this condition is performed (steps 202 and 203 in FIG. 3, steps 301 to 304 in FIG. 7). After it is confirmed that the conditions are met, the data is written in the first block (steps 204 to 206 in FIG. 3), and the C flag and the V flag are set to “1” (steps 207 and 8 in FIG. 3).
(B)). If you rewrite the data you just wrote,
In accordance with the procedure of 1., V flag “0” of the first block is set to E
The flag is changed to "1", and the data is written in the second block searched by the same procedure as the first writing (see FIG. 8).
(C)). Although the first block is now in a logically erased state, it must be electrically erased separately. Although it is preferable to perform the process in the background from the viewpoint of processing speed, the method is out of the essence of this embodiment, and thus the description thereof is omitted. The following description assumes that these blocks have been electrically erased in some way before the data is written.

【0033】こうした書き込み処理が続くと、データ
は、ブロック番号順にメモリ全体に一様に書き込まれ、
例えば図8(d)に示すような状態になる。ここで例え
ば1ブロック分のデータの書き込みをしようとすると、
空き領域はあるが、図3のステップ203の検索で失敗
する。検索に失敗したという状態は、ブロックの空き領
域に対する一様な書き込みが一巡したことを示してい
る。よって、次の一巡の単一方向書き込みを制御するた
めに全てのブロックに対するEフラグを”0”にクリア
する(図3ステップ209、図8(e))。
When the writing process is continued, the data is uniformly written in the entire memory in the order of block numbers,
For example, the state shown in FIG. If you try to write data for one block,
Although there is a free area, the search in step 203 of FIG. 3 fails. The state where the search has failed indicates that the uniform writing to the free area of the block has completed. Therefore, the E flag for all blocks is cleared to "0" to control the next unidirectional writing (step 209 in FIG. 3, FIG. 8E).

【0034】単一方向循環による一様書き込みとともに
本実施例を特徴づけるのは長期間同じ場所に留まるデー
タを移動させる点である。これを実現するためには、移
動を行うのに適当な、書き込み回数に関連したタイミン
グが必要となるが、その一つとしてEフラグが全てクリ
アされる時点を利用する。図3では、この時点における
ステップ210〜213の処理でCフラグを検査するこ
とにより、移動対象のデータを選択している。図8
(e)では、全てのブロックのCフラグが”1”になっ
ているが、これは、Cフラグが初期化された時点から図
8(e)の状態になるまでに、全てのブロックが最低1
回は書き換えられていることを示している。この場合
は、どのデータがより長く同じブロックを占有している
のか判断できないのでステップ214で初期化し直す
(図8(f))。その後、この一連の処理を起動させた
第1ブロックのデータ書き込みを行う(図4ステップ2
24〜228,206、図9(a))。
What characterizes this embodiment together with uniform writing by unidirectional circulation is that data that stays in the same place for a long time is moved. In order to realize this, a timing related to the number of times of writing, which is appropriate for performing the movement, is required, and one of them is the time when the E flag is cleared. In FIG. 3, the data to be moved is selected by inspecting the C flag in the processing of steps 210 to 213 at this point. Figure 8
In (e), the C flags of all the blocks are "1". This means that all the blocks have the lowest value from the time when the C flags are initialized to the state of FIG. 8 (e). 1
The times indicate that they have been rewritten. In this case, since it cannot be determined which data occupies the same block for a longer time, it is reinitialized in step 214 (FIG. 8 (f)). After that, the data writing of the first block which started this series of processing is performed (step 2 in FIG. 4).
24-228, 206, FIG. 9 (a).

【0035】さらに、第5ブロックのデータが消去され
て図9(b)の状態になり、第2ブロックの書き込みと
第1ブロックの消去があって図9(c)の状態になった
とする。書き込みパターンの最後として、この時点で第
1ブロックの書き込みを行う場合を考える。書き換えは
もう一巡したので書き込み可能領域の検索には失敗し、
Eフラグが全てクリアされる(図9(d))。続いてC
フラグの検査が行われるが、今度は、第2ブロックのC
フラグが”0”であるので、このブロックのデータは比
較的長期間書き換えが行われていないと判断し移動の対
象にする。移動先の書き込み可能ブロックは、図3のス
テップ215〜220の手順に従って、移動対象データ
の入ったブロックを起点に書き込みが進行する方向へ循
環して検索される。この例では、第4ブロックが該当す
るので、第2ブロックはここにデータがコピーされた後
消去される(図4ステップ221〜223、図9
(e))。これにより、図8(c)の時点からずっと第
2ブロックを占有していたデータが移動され、このブロ
ックが書き換え可能になる。
Further, it is assumed that the data of the fifth block is erased to be in the state of FIG. 9B, and the writing of the second block and the erasing of the first block are performed to result in the state of FIG. 9C. Consider the case where the first block is written at this point as the end of the write pattern. Since the rewriting has completed another round, the search for the writable area has failed,
All E flags are cleared (FIG. 9 (d)). Then C
The flag is checked, but this time, C in the second block
Since the flag is "0", it is determined that the data in this block has not been rewritten for a relatively long period of time, and the data is moved. According to the procedure of steps 215 to 220 of FIG. 3, the write-destination block of the move destination is circulated in the writing direction starting from the block containing the data to be moved and searched. In this example, since the fourth block corresponds, the second block is erased after the data is copied there (steps 221 to 223 in FIG. 4, FIG. 9).
(E)). As a result, the data occupying the second block all the way from the time of FIG. 8C is moved, and this block becomes rewritable.

【0036】あとは図9(c)の時点で要求された1ブ
ロック分のデータを空きブロックに書き込めばよいので
あるが、通常の書き込みと同様に書き込み可能ブロック
を検索しても失敗してしまう場合が有り得る。即ち図9
(c)の時点で空きブロックが丁度1個しかなかった場
合で、このときは、この空きブロックに移動対象データ
が入り、移動対象データが元々入っていたブロックのE
フラグが”1”となっているので検索に引っかからな
い。よって図4のステップ227で示したようにEフラ
グをクリアする処理が必要である。移動対象のデータが
元々入っていたブロックのEフラグを”0”のままにし
ておくような制御を行えばこの様なことはなくなるが、
そのかわりに、他に空きブロックが有るにもかかわら
ず、移動直後のブロックが書き換え可能ブロックとして
検索され、バックグラウンドの電気的消去が間に合わな
いという様なことが起り得る。
After that, it is sufficient to write the data for one block requested at the time of FIG. 9 (c) to the empty block, but even if the writable block is searched for like the normal writing, it fails. There are cases. That is, FIG.
When there is exactly one empty block at the time of (c), the moving target data enters this empty block, and the E of the block originally containing the moving target data.
Since the flag is "1", it will not be caught in the search. Therefore, the processing for clearing the E flag as shown in step 227 of FIG. 4 is necessary. If you do the control to keep the E flag of the block originally containing the data to be moved as "0", such a thing will disappear.
Instead, even though there are other free blocks, the block immediately after the movement may be searched as a rewritable block, and electrical erasing of the background may not be in time.

【0037】次いで、図10ないし図14には、本発明
の第2実施例を示す。本実施例では、不揮発性半導体メ
モリとして4MビットNAND型EEPROMを用いる
ことを仮定する。また、実施例の要点を簡略に説明する
ため、MS−DOSのクラスタに相当する記憶領域の論
理的な管理の単位をNAND型EEPROMの消去単位
であるブロックと一致させるものとする。また、本実施
例ではユーザファイル、ファイルの記録位置を管理する
テーブル及びそのテーブルへの階層化されたポインタの
うちその位置が固定されないものは、記憶領域中の特定
の領域に記録される必要がないので、出来得る限り書き
込みが記憶領域全体に分散されるように制御されるべき
である。しかしながら、本実施例は、ファイルの位置を
管理するテーブルが記憶領域中の特定の領域に固定され
ずに済む手法を説明するためのものなので、分散書き込
み制御がされることを前提とするが、その詳細について
は触れない。
Next, FIGS. 10 to 14 show a second embodiment of the present invention. In this embodiment, it is assumed that a 4M bit NAND type EEPROM is used as the nonvolatile semiconductor memory. Further, in order to briefly explain the main points of the embodiment, it is assumed that the unit of logical management of the storage area corresponding to the cluster of MS-DOS matches the block which is the erase unit of the NAND type EEPROM. Further, in this embodiment, a user file, a table for managing the recording position of the file, and a hierarchical pointer to the table whose position is not fixed need to be recorded in a specific area in the storage area. Since it is not possible, it should be controlled so that writing is distributed over the entire storage area as much as possible. However, since the present embodiment is for explaining the method in which the table for managing the position of the file is not fixed to a specific area in the storage area, it is premised that distributed write control is performed. I won't go into the details.

【0038】図11は、ファイルの記録された位置を管
理するためのテーブルの一つを構成するブロックの1例
であり、ここでは仮にルート管理テーブルと呼ぶことに
する。図11の38はMS−DOSのFATと同様な構
成で記憶領域全体のブロック割当状況を管理するための
テーブルであるが、本実施例では、ユーザーファイルの
みならず、ファイル管理テーブル自身やそのポインタと
いった管理情報の記録されたブロックの位置も動くの
で、それらの割当も併せて管理されるものとする。図1
1の39はブロックの割当情報がこのブロック内に納ま
らなかった場合に使用される追加ブロックの位置や、M
S−DOSのディレクトリに相当するファイル名とそれ
に付随する情報に関する管理テーブル等の位置を示すポ
インタであるとする。即ち、図11に示す管理テーブル
をアクセスできれば、ファイル管理に関する情報は全て
アクセス可能になるものとする。
FIG. 11 is an example of a block that constitutes one of the tables for managing the recorded position of the file, and here it is tentatively called a route management table. Reference numeral 38 in FIG. 11 is a table for managing the block allocation status of the entire storage area with the same configuration as the FAT of MS-DOS. In the present embodiment, not only the user file but also the file management table itself and its pointer Since the position of the block in which the management information is recorded also moves, their allocation is also managed. Figure 1
39 of 1 is the position of the additional block used when the allocation information of the block is not stored in this block, or M
It is assumed that the file name corresponds to the directory of the S-DOS and a pointer indicating the position of the management table or the like regarding the information associated with the file name. That is, if the management table shown in FIG. 11 can be accessed, all information related to file management can be accessed.

【0039】図12は、ルート管理テーブルの記録され
た位置を示すために、記録された位置を階層的に示すよ
うに構成されたポインタが記録されるブロックの1例で
ある。図12(a)の41〜48はNAND型EEPR
OMのページを表していて、48がソース側、41がド
レイン側である。ポインタは1ページに納まる情報量と
し、NAND型EEPROMの書き込みルールに従って
ソース側から順に書き込まれてゆくものとする。図12
(a)の46〜48の斜線のページは、更新されたポイ
ンタが書き込まれていたことを示し、41〜44の”N
ULL”は消去されたままのページであることを示す。
同図(a)の第1のポインタを納めたブロックは、45
のページの情報がルート管理テーブルの位置を示してい
る。同図(b)の第mのポインタを納めたブロックは、
同様の構成で、第(m−1)のポインタの位置を示すも
のとする。ポインタの数(階層数)をnとした場合、第
1〜第(n−1)のポインタは、記憶可能な領域のどこ
に記録されてもよく、複数階のポインタを順に手繰るこ
とでアクセスされる。第nのポインタ(以下、ルートポ
インタ)だけは、記憶領域の固定の位置に記録される。
図10は、この複数階に設定されたポインタのつながり
を示している。
FIG. 12 is an example of a block in which a pointer configured to hierarchically indicate the recorded position is recorded in order to indicate the recorded position in the route management table. In FIG. 12A, 41 to 48 are NAND type EEPRs.
In the OM page, 48 is the source side and 41 is the drain side. It is assumed that the pointer has an amount of information that can be stored in one page, and is written in order from the source side according to the writing rules of the NAND type EEPROM. 12
The hatched pages 46 to 48 in (a) indicate that the updated pointer has been written.
"ULL" indicates that the page remains erased.
The block containing the first pointer in FIG.
The information on the page indicates the position of the route management table. The block storing the m-th pointer in FIG.
It is assumed that the position of the (m-1) th pointer is indicated with the same configuration. When the number of pointers (the number of layers) is n, the first to (n-1) th pointers may be recorded anywhere in the storable area, and are accessed by sequentially manipulating pointers on multiple floors. It Only the nth pointer (hereinafter, the root pointer) is recorded at a fixed position in the storage area.
FIG. 10 shows the connection of pointers set on the plurality of floors.

【0040】図13は、本実施例に係るファイル管理方
式に必要なルート管理テーブルの更新に伴なって発生す
る処理の手順を示したフローチャートである。ルート管
理テーブルの内容は、予めRAMに読み込まれて展開さ
れており、更新はRAM上で行われた後に書き戻される
ものとする。まず、ファイルの書き込み等でブロック割
当に変更が生じると、変更されたルート管理テーブルを
書き戻すブロックの位置を自身のブロック割当テーブル
を参照して決定する(ステップ401)。次に、この位
置をポインタに設定し、割当テーブルを更新してから書
き込みを行う(ステップ402〜405)。図14のフ
ローチャートのステップ501〜510は、階層化され
たポインタにブロック位置を設定する手順を示してい
る。この手順は、階層化されたポインタの設定を変更す
るために再帰的に呼び出される。
FIG. 13 is a flow chart showing the procedure of the processing that occurs with the update of the route management table necessary for the file management method according to this embodiment. It is assumed that the contents of the route management table have been read and expanded in advance in the RAM, and that the update is written back in the RAM. First, when the block allocation is changed by writing a file or the like, the position of the block to which the changed route management table is written back is determined by referring to its own block allocation table (step 401). Next, this position is set as a pointer, the allocation table is updated, and then writing is performed (steps 402 to 405). Steps 501 to 510 of the flowchart of FIG. 14 show a procedure for setting a block position in a hierarchical pointer. This procedure is called recursively to change the settings of layered pointers.

【0041】次に、ポインタの階層数nの大きさの決め
方を具体的に説明する。ファイルの書き込みによりブロ
ックの割当に変更が起きると、その都度、ルート管理テ
ーブルの内容が更新される。書き込みが特定ブロックに
集中しないように、更新されたテーブル自体も別のブロ
ックに書き込まれる。ルート管理テーブルの位置が変わ
ったので第1のポインタの記録位置も更新される。ポイ
ンタの更新は同一ブロック内で8回(8ページ分)可能
であるから、第1ポインタを納めたブロックは、ファイ
ルの書き込みによるブロックの変更8回で一通りの書き
込みが行われ、9回目の更新で位置が変わる。第2のポ
インタを納めたブロックは同様に、ファイルの書き込み
64回に1回の割で書き換えが起きると見積もることが
出来る。ここで仮に、不揮発性半導体メモリ装置の総容
量を20Mバイトとすると、総ブロック数は1ブロック
の容量が4kバイトであるから5120ブロックにな
る。EEPROMの書き換え可能回数をC回とし、これ
らのブロックに均一に書き込みが行われたとすると、延
べ 5120×Cブロック の書き換えが発生し得る。ファイル1ブロック分の書き
換えに対して管理テーブル1ブロックの書き換えが発生
するとすると、1回に付き2ブロックの書き換えが起き
るからブロック割当の変更の発生回数は最高で 5120×C÷2=2560×C回 である。
Next, how to determine the size of the number of hierarchical layers n of the pointer will be specifically described. Whenever the block allocation is changed by writing a file, the contents of the route management table are updated. The updated table itself is also written to another block so that writes are not concentrated on a particular block. Since the position of the route management table has changed, the recording position of the first pointer is also updated. Since the pointer can be updated 8 times (for 8 pages) in the same block, the block storing the first pointer is written once in 8 changes of the block by writing the file, and the 9th time is executed. The position changes with the update. Similarly, it can be estimated that the block storing the second pointer will be rewritten once every 64th writing of the file. Here, if the total capacity of the non-volatile semiconductor memory device is 20 Mbytes, the total number of blocks is 5,120 because one block has a capacity of 4 kbytes. If the number of rewritable times of the EEPROM is set to C times and writing is uniformly performed in these blocks, rewriting of a total of 5120 × C blocks may occur. When one block of the management table is rewritten for one block of the file, two blocks are rewritten at one time, so the maximum number of block allocation changes is 5120 × C / 2 = 2560 × C. Times.

【0042】第nポインタを記録した固定ブロックの書
き換えは、ブロック割当の変更8n回に1回の割合で起
きる。また、このブロックも最高C回の書き換えが可能
であるから、 8n ×C=23n×C回 までのブロック割当の変更なら、この固定ブロックの書
き換え回数が他のブロックより先に限界に達することは
ない。よって、必要な階層数nは、 23n×C=2560×C n=log2 2560÷3 ≒4 となる。
Rewriting of the fixed block in which the n-th pointer is recorded occurs once every 8 n block allocation changes. Also, since this block can be rewritten up to C times, if the block allocation is changed up to 8 n × C = 2 3n × C times, the number of rewriting of this fixed block reaches the limit earlier than other blocks. There is no such thing. Therefore, the required number of layers n is 2 3n × C = 2560 × C n = log 2 2560 / 3≈4.

【0043】図15ないし図20には、本発明の第3実
施例を示す。図15は本実施例に係る不揮発性半導体メ
モリ装置の全体構成を示すブロック図である。同図にお
いて115はメモリ手段としてのNAND型EEPRO
Mモジュールであり、複数個のページからなるブロック
に分割されたメモリセルアレイで構成されている。EE
PROMモジュール115はデータ線で結ばれたホスト
インターフェイス101を介して図示省略のホストシス
テムに接続されている。データ線上には、マルチプレク
サ113及びデータバッファ107が設けられている。
また、ホストインターフェイス101内には、データレ
ジスタ102、アドレスレジスタ103、カウントレジ
スタ104、コマンドレジスタ105、ステータレジス
タ106及びエラーレジスタ116が設けられている。
108はコントロールロジック、109は誤り制御ロジ
ック、114はアドレスジェネレータ、110は制御手
段としての機能を有するCPU、111は作業用RA
M、112は制御プログラムROMである。制御プログ
ラムROM112には、データ書き込み等のための一連
の制御プログラムが格納されている。
15 to 20 show a third embodiment of the present invention. FIG. 15 is a block diagram showing the overall configuration of the nonvolatile semiconductor memory device according to this embodiment. In the figure, 115 is a NAND type EEPROM as a memory means.
The M module is composed of a memory cell array divided into blocks each including a plurality of pages. EE
The PROM module 115 is connected to a host system (not shown) via the host interface 101 connected by a data line. A multiplexer 113 and a data buffer 107 are provided on the data line.
Further, in the host interface 101, a data register 102, an address register 103, a count register 104, a command register 105, a status register 106 and an error register 116 are provided.
108 is a control logic, 109 is an error control logic, 114 is an address generator, 110 is a CPU having a function as a control unit, and 111 is a work RA.
M and 112 are control program ROMs. The control program ROM 112 stores a series of control programs for writing data and the like.

【0044】図16は、誤り制御ロジック109の内部
構成を示す図である。誤り検出手段としてのECC検査
回路150、誤り検出/訂正コード発生手段としてのE
CC発生回路151及び消去検出手段としての消去検出
回路152が備えられている。
FIG. 16 is a diagram showing the internal structure of the error control logic 109. ECC check circuit 150 as error detection means, E as error detection / correction code generation means
A CC generation circuit 151 and an erase detection circuit 152 as erase detection means are provided.

【0045】本実施例のメモリ装置は、不揮発性メモリ
領域であるEEPROMモジュール115に記録される
データに関し、必要に応じてメモリ領域の使用状況を管
理するテーブルを使用する。このテーブルは、他のユー
ザ・データとともにEEPROMモジュール115に記
録されるが、この装置が起動するときに自動的に作業用
RAM111に読み込まれる。また、このテーブルは、
更新される都度、或いは装置の使用が終了する時点でE
EPROMモジュール115に書き戻されることとす
る。
The memory device of the present embodiment uses a table for managing the usage status of the memory area as needed for the data recorded in the EEPROM module 115 which is a non-volatile memory area. Although this table is recorded in the EEPROM module 115 together with other user data, it is automatically read into the working RAM 111 when the apparatus is started up. Also, this table is
E each time it is updated or when use of the device ends
It will be written back to the EPROM module 115.

【0046】次に、この装置の動作をフローチャートを
用いて説明する。ホストシステムは、図15のホストイ
ンターフェイス101内のアドレスレジスタ103にア
クセス開始アドレスを、カウントレジスタ104にアク
セスしたいデータのセクタ長をセットし、最後にコマン
ドレジスタ105に読み出し/書き込み等の命令をセッ
トする。ホストインターフェイス101のコマンドレジ
スタ105にアクセス命令が書き込まれると、コントロ
ーラ内のCPU110は、コマンドレジスタ105内の
命令を読み込み、制御プログラムROM112に納めら
れたコマンド実行のための一連の制御プログラムを実行
する。
Next, the operation of this apparatus will be described with reference to the flow chart. The host system sets the access start address in the address register 103 in the host interface 101 of FIG. 15, sets the sector length of the data to be accessed in the count register 104, and finally sets the read / write command in the command register 105. . When an access command is written in the command register 105 of the host interface 101, the CPU 110 in the controller reads the command in the command register 105 and executes a series of control programs for command execution stored in the control program ROM 112.

【0047】図17は、EEPROMモジュール115
からデータを読み出す手順を示すフローチャートであ
る。まず、図15のCPU110は、ホストインターフ
ェイス101にセットされた開始アドレスから、読み出
しを行うべきEEPROMモジュール115の物理的な
アドレスを決定する(ステップ601)。次に、EEP
ROMモジュール115からデータバッファ107にデ
ータを読み出す(ステップ602)。次いで、エラー処
理及びデータバッファ107からホストシステムへのデ
ータ転送等を実行する(ステップ603〜605)。
FIG. 17 shows the EEPROM module 115.
4 is a flowchart showing a procedure for reading data from the. First, the CPU 110 of FIG. 15 determines the physical address of the EEPROM module 115 to be read from the start address set in the host interface 101 (step 601). Next, EEP
Data is read from the ROM module 115 to the data buffer 107 (step 602). Next, error processing and data transfer from the data buffer 107 to the host system are executed (steps 603 to 605).

【0048】図18及び図19は、EEPROMモジュ
ール115からデータバッファ107にデータを読み出
す手順を示すフローチャートである。CPU110は、
EEPROMモジュール115をマルチプレクサ113
を通してアクセスし読み出しモードに設定し、データバ
ッファ107を読み出しモードに設定する(ステップ7
01,702)。アドレスジェネレータ114には、読
み出しを行うべきEEPROMモジュール115の物理
的なアドレスを設定する(ステップ703)。そして、
データバッファ107に、読み出したデータを蓄えるべ
き領域を決定してその先頭番地をデータバッファ107
への書き込みアドレスとして設定する(ステップ70
4)。その後、コントロールロジック108に対してデ
ータ読み出しのための定められたシーケンスを実行する
ように指令を送る。
18 and 19 are flowcharts showing the procedure for reading data from the EEPROM module 115 to the data buffer 107. CPU 110
EEPROM module 115 to multiplexer 113
Through the data buffer 107 and the data buffer 107 is set to the read mode (step 7).
01, 702). A physical address of the EEPROM module 115 to be read is set in the address generator 114 (step 703). And
In the data buffer 107, the area in which the read data is to be stored is determined, and the head address is determined in the data buffer 107.
Set as a write address for writing (step 70)
4). Then, the control logic 108 is instructed to execute a predetermined sequence for reading data.

【0049】コントロールロジック108は、マルチプ
レクサ113をEEPROMモジュール115からの読
み出しデータがデータバッファ107に流れるように設
定し、アドレスジェネレータ114の内容をインクリメ
ントしながら、1セクタ分のデータを読み出す(ステッ
プ705)。また、図16のECC検査回路150をこ
れらのデータ及びこれに付随して読み出されるECCコ
ードを使って誤りを検出するように制御すると同時に、
読み出されたデータが消去状態であるかどうかを検出す
るように消去検出回路152を制御する。消去検出回路
152は、1セクタ分のデータ及びECCコードが全て
消去後の状態である”1”であった場合に、CPU11
0からアクセス可能なレジスタに、消去状態を検出した
ことを示すコードをセットする。1セクタ分のデータが
読み出されると、CPU110は、ECC検査回路15
0をチェックしデータの誤りを検査する(ステップ70
6)。誤りが検出されなかった場合は、データバッファ
からホストシステムにデータを転送する。誤りが検出さ
れると、CPU110は次に消去検出回路152をアク
セスし、消去状態が検出されていたならば、ECC検査
回路150の結果を誤検出とみなしバッファ内のデータ
をホストシステムに転送する。ECC検査回路150が
誤りを検出し、消去検出回路152も消去状態を検出し
なかった場合で、検出された誤りが訂正可能な場合は、
データバッファ107をアクセスして誤ったデータを訂
正してからホストシステムにデータを転送する。
The control logic 108 sets the multiplexer 113 so that the read data from the EEPROM module 115 flows to the data buffer 107, and reads the data for one sector while incrementing the content of the address generator 114 (step 705). . Further, the ECC checking circuit 150 of FIG. 16 is controlled so as to detect an error using these data and the ECC code read together with the data, and at the same time,
The erase detection circuit 152 is controlled to detect whether the read data is in the erased state. The erasure detection circuit 152, when the data for one sector and the ECC code are all "1" which is the state after erasure, the CPU 11
A code indicating that the erased state is detected is set in a register accessible from 0. When the data for one sector is read, the CPU 110 causes the ECC checking circuit 15
Check 0 for error in data (step 70)
6). If no error is detected, the data is transferred from the data buffer to the host system. When an error is detected, the CPU 110 next accesses the erase detection circuit 152, and if the erased state is detected, the result of the ECC check circuit 150 is regarded as a false detection and the data in the buffer is transferred to the host system. . If the ECC check circuit 150 detects an error and the erase detection circuit 152 does not detect an erased state, and if the detected error is correctable,
The data buffer 107 is accessed to correct erroneous data, and then the data is transferred to the host system.

【0050】もし、訂正不可能な誤りが検出された場合
には、ホストシステムに対するデータ転送は行わずに、
CPU110は、ホストインターフェイス101内のス
テータスレジスタ106にエラーが起きたことを示すコ
ードを、エラーレジスタ116にエラーの内容を示すコ
ードを設定し、ホストシステムに命令の実行が異常終了
したことを通知して処理を終了する(ステップ707〜
712)。
If an uncorrectable error is detected, data transfer to the host system is not performed,
The CPU 110 sets a code indicating that an error has occurred in the status register 106 in the host interface 101 and a code indicating the content of the error in the error register 116, and notifies the host system that the execution of the instruction has terminated abnormally. And ends the processing (step 707-).
712).

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

【0052】[0052]

【発明の効果】以上説明したように、本発明によれば、
第1に、データの書き込みを複数の記憶領域に対して単
一方向に循環して行うようにしたため、特定の記憶領域
に集中することなく、書き込みを複数の記憶領域全体に
均一に行うことができる。また、書き込まれた後、長期
間変更を受けることなく同じ場所に留まっているデータ
は複数の記憶領域全体と比較した書きかえ回数に不均衡
が生じないように移動させるようにしたため、見かけの
書き込み領域が狭まって寿命を縮めてしまうことを防止
することができる。したがって同一記憶場所の書き換え
回数に制限があるにもかかわらず、磁気ディスク装置と
同等の寿命を実現することができて用途を拡大すること
ができる。
As described above, according to the present invention,
Firstly, since the data writing is performed in a single direction in a circulating manner in a plurality of storage areas, it is possible to uniformly write in the plurality of storage areas without concentrating on a specific storage area. it can. In addition, since the data that remains in the same place for a long time without being changed after being written is moved so as not to cause an imbalance in the number of rewrites compared with the entire multiple storage areas, an apparent write is performed. It is possible to prevent the area from being narrowed and the life to be shortened. Therefore, even though there is a limit to the number of times of rewriting the same storage location, it is possible to realize a life equivalent to that of a magnetic disk device and expand the application.

【0053】第2に、書き込まれたデータが変更されて
いない記憶領域の選択を、書き込みの1循環周期を以っ
て行うようにしたため、見かけの書き込み領域を狭めて
しまうことを一層適切に防止することができる。
Secondly, the storage area in which the written data has not been changed is selected in one writing cycle, so that the apparent writing area is more appropriately prevented from being narrowed. can do.

【0054】第3に、書き換え頻度の高い管理テーブル
の記憶領域上での配置は固定されず、またこの管理テー
ブルの位置を示すポインタは複数階に階層化して記録す
るようにしたため、検索のため固定した位置に記録され
なければならないポインタの書き換え回数が他の領域と
同等に抑えられて特定の記憶領域に書き込みが集中して
短時間で寿命に至ってしまうことを防ぐことができる。
したがって、上記第1の発明と同様に、同一記憶場所の
書き換え回数に制限があるにもかかわらず、磁気ディス
ク装置と同等の寿命を実現することができる。
Thirdly, the arrangement of the management table, which is frequently rewritten, in the storage area is not fixed, and the pointer indicating the position of this management table is hierarchically recorded on a plurality of floors, so that it can be searched for. It is possible to prevent the number of times of rewriting the pointer, which has to be recorded at a fixed position, from being suppressed to the same as that of other areas, and to prevent writing from concentrating in a specific storage area and reaching the end of life in a short time.
Therefore, similar to the first aspect of the present invention, it is possible to realize a life equivalent to that of the magnetic disk device, although the number of times of rewriting the same storage location is limited.

【0055】第4に、読み出されたデータからその記憶
領域であるページ等が消去状態であるか否かを検出し、
読み出しデータに誤りが検出された場合でも同時に消去
状態が検出されたときには、その読み出しデータには誤
りが無いものとして処理するようにしたため、消去状態
のページ等がデータの書き込まれたページ等と区別無く
読み出されるような制御が行われる場合にも、読み出し
データの正確な誤り検出を行うことができて高い信頼性
を確保することができる。
Fourthly, it is detected from the read data whether or not the page or the like which is its storage area is in the erased state,
Even if an error is detected in the read data, if an erased state is detected at the same time, the read data is processed as if there is no error, so the erased page is distinguished from the page in which the data is written. Even when the control is performed such that the data is read out without any error, it is possible to accurately detect an error in the read data and ensure high reliability.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明に係る不揮発性半導体メモリ装置の第1
実施例においてブロックへの書き込みを管理するための
テーブルの構成を示す図である。
FIG. 1 is a first non-volatile semiconductor memory device according to the present invention.
It is a figure which shows the structure of the table for managing the writing to a block in an Example.

【図2】第1実施例においてEEPROMにおける記憶
領域の構成を示す図である。
FIG. 2 is a diagram showing a configuration of a storage area in an EEPROM in the first embodiment.

【図3】第1実施例において記憶領域へのデータの書き
込みの手順を示すフローチャートである。
FIG. 3 is a flowchart showing a procedure of writing data to a storage area in the first embodiment.

【図4】第1実施例において記憶領域へのデータの書き
込みの手順を示すフローチャートである。
FIG. 4 is a flowchart showing a procedure of writing data to a storage area in the first embodiment.

【図5】第1実施例においてデータ消去の手順を示すフ
ローチャートである。
FIG. 5 is a flowchart showing a procedure for erasing data in the first embodiment.

【図6】第1実施例においてデータの書き換えの手順を
示すフローチャートである。
FIG. 6 is a flowchart showing a procedure of rewriting data in the first embodiment.

【図7】図4のデータの書き込みの手順中で使用される
サブルーチンのフローチャートである。
FIG. 7 is a flowchart of a subroutine used in the data writing procedure of FIG.

【図8】第1実施例においてデータの書き込みによる記
憶領域及びこれを管理するテーブルの状態の変化を説明
するための図である。
FIG. 8 is a diagram for explaining a change in the state of a storage area and a table for managing the storage area by writing data in the first embodiment.

【図9】第1実施例においてデータの書き込みによる記
憶領域及びこれを管理するテーブルの状態の変化を説明
するための図である。
FIG. 9 is a diagram for explaining a change in the state of a storage area and a table for managing the storage area by writing data in the first embodiment.

【図10】本発明の第2実施例においてポインタとルー
ト管理テーブルのつながり関係を示す図である。
FIG. 10 is a diagram showing a connection relationship between a pointer and a route management table in the second embodiment of the present invention.

【図11】第2実施例におけるルート管理テーブルの構
成を示す図である。
FIG. 11 is a diagram showing a configuration of a route management table in the second embodiment.

【図12】第2実施例においてポインタが記録されたブ
ロックを示す図である。
FIG. 12 is a diagram showing blocks in which pointers are recorded in the second embodiment.

【図13】第2実施例においてルート管理テーブルの更
新に伴なって発生する処理の手順を示すフローチャート
である。
FIG. 13 is a flowchart showing a procedure of processing that occurs in association with the update of the route management table in the second embodiment.

【図14】第2実施例においてポインタにブロック位置
を設定する手順を示すフローチャートである。
FIG. 14 is a flowchart showing a procedure for setting a block position to a pointer in the second embodiment.

【図15】本発明の第3実施例に係る不揮発性半導体メ
モリ装置の構成を示すブロック図である。
FIG. 15 is a block diagram showing a configuration of a nonvolatile semiconductor memory device according to a third example of the present invention.

【図16】図15における誤り制御ロジックの内部構成
を示す図である。
16 is a diagram showing an internal configuration of an error control logic in FIG.

【図17】第3実施例においてEEPROMモジュール
からデータの読み出しの手順を示すフローチャートであ
る。
FIG. 17 is a flowchart showing a procedure of reading data from the EEPROM module in the third embodiment.

【図18】第3実施例においてEEPROMモジュール
からデータバッファにデータを読み出す手順を示すフロ
ーチャートである。
FIG. 18 is a flowchart showing a procedure of reading data from an EEPROM module to a data buffer in the third embodiment.

【図19】第3実施例においてEEPROMモジュール
からデータバッファにデータを読み出す手順を示すフロ
ーチャートである。
FIG. 19 is a flowchart showing a procedure of reading data from an EEPROM module to a data buffer in the third embodiment.

【図20】図17におけるデータバッファからホストシ
ステムに読み出したデータを転送する手順を示すフロー
チャートである。
20 is a flowchart showing a procedure for transferring the read data from the data buffer in FIG. 17 to the host system.

【図21】EEPROMの一つのNANDセルを示す等
価回路図である。
FIG. 21 is an equivalent circuit diagram showing one NAND cell of the EEPROM.

【図22】EEPROMのメモリセルアレイを示す等価
回路図である。
FIG. 22 is an equivalent circuit diagram showing a memory cell array of an EEPROM.

【図23】NAND型EEPROMの書き込み動作を説
明するための図である。
FIG. 23 is a diagram for explaining the write operation of the NAND type EEPROM.

【図24】オペレーティングシステムの一つであるMS
−DOSのファイル管理方法を説明するための図であ
る。
FIG. 24: MS which is one of operating systems
FIG. 6 is a diagram illustrating a file management method of DOS.

【図25】ディレクトリの構成例を説明するための図で
ある。
FIG. 25 is a diagram for explaining a configuration example of a directory.

【符号の説明】[Explanation of symbols]

21 第1の管理手段となるもので、有効フラグととも
に参照しデータの書き込みをブロックの順位にしたがっ
て1方向に向かって、かつ循環して使用されるように制
御するためのフラグ 22 第2の管理手段となるもので、ブロックに記録さ
れたデータが或る時点から後に変更されたか否かを管理
するフラグ 23 ブロックに有意なデータが記録されているか否か
を管理するフラグ 31〜36 管理単位となる容量で区切られた複数の記
憶領域 38 ブロックの割当を管理するテーブル 41〜48,51〜58 ポインタ情報が記録されるペ
ージ 109 誤り制御ロジック 110 CPU(制御手段) 115 EEPROMモジュール(メモリ手段) 150 ECC検査回路(誤り検出手段) 151 ECC発生回路 152 消去検出回路(消去検出手段)
21 A first management means, which is a flag for referring to the valid flag so as to control the data writing so that the data is written in one direction according to the order of blocks and is used in a circulating manner. A flag 23 for managing whether or not the data recorded in the block has been changed after a certain time, and a flag 31-36 for managing whether or not significant data is recorded in the block. Tables 41 to 48, 51 to 58 for managing allocation of a plurality of storage areas 38 blocks divided by different capacities Page 109 on which pointer information is recorded Error control logic 110 CPU (control means) 115 EEPROM module (memory means) 150 ECC check circuit (error detection means) 151 ECC generation circuit 152 Erase detection circuit (erase detection means)

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−283496(JP,A) 特開 平4−165547(JP,A) 特開 昭52−22834(JP,A) 特開 昭56−29899(JP,A) 特開 平4−163966(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 - 12/06 G06F 12/16 G11C 16/02 ─────────────────────────────────────────────────── --- Continuation of the front page (56) References JP 62-283496 (JP, A) JP 4-165547 (JP, A) JP 52-22834 (JP, A) JP 56- 29899 (JP, A) JP-A-4-163966 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) G06F 12/00-12/06 G06F 12/16 G11C 16/02

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 管理の単位となる容量で区切られた複数
の記憶領域を備えたメモリ手段と、 複数の記憶領域に対するデータの書き込みに際し当該複
数の記憶領域が物理的或いは論理的な配置にしたがって
一方向に循環して使用されるように管理する第1の管理
手段と、複数の前記記憶領域に記録された前記データが所定の時
点から後に 変更されたか否かを管理する第2の管理手段
と、データの書き込みにより予め定められた条件が成立した
時点で前記第2の管理手段が初期化された時点より後に
はデータが変更されていない前記記憶領域を選択し、こ
の選択した記憶領域のデータを他の記憶領域に移動させ
るとともに全ての記憶領域のデータが変更されたと見な
される場合には当該 第2の管理手段を初期化する制御手
段とを有することを特徴とする不揮発性半導体メモリ装
置。
1. A memory means having a plurality of storage areas divided by a capacity serving as a unit of management, and a memory means for writing data to the plurality of storage areas .
A first management unit that manages a plurality of storage areas so that they are circulated and used in one direction according to a physical or logical arrangement ; and when the data recorded in the plurality of storage areas is at a predetermined time.
The second management means for managing whether or not it has been changed after the point, and the predetermined condition has been established by writing the data.
At a time after the second management means is initialized
Select the storage area whose data has not been changed,
Move the data in the selected storage area to another storage area.
And the data in all storage areas are considered to have changed
And a control means for initializing the second management means.
【請求項2】 前記予め定められた条件が成立した時点
は、前記第1の管理手段で管理される循環の周期をも
ってその時点とすることを特徴とする請求項1に記載の
不揮発性半導体メモリ装置。
2. A time point when the predetermined condition is satisfied
2. The non-volatile semiconductor memory device according to claim 1, wherein is defined as a point of time of a cycle of circulation managed by the first management means.
【請求項3】 前記メモリ手段は、ファイル、該ファイ
ルの記録された位置を管理する管理テーブル及び該管理
テーブルの記録された位置を複数階に階層的に示すよう
に構成されたポインタが記録され前記管理テーブルの
記録される位置は固定されず前記複数のポインタのう
ち根源となるルートポインタの記録される位置のみが固
定されるように制御されることを特徴とする請求項1に
記載の不揮発性半導体メモリ装置。
3. The memory means is a file, the file
Management table for managing the recorded position of the management table and the recorded position of the management table in a hierarchical manner on a plurality of floors.
Configured pointer is recorded on, the management table
The nonvolatile semiconductor memory according to claim 1, the position to be recorded, characterized in that only recorded the position of the root pointer to be the source of the pointer of the multi-storey not fixed is controlled to be secured apparatus.
【請求項4】 前記メモリ手段は、データ及び該データ
に対応した誤り検出コードが記録される記憶領域を備
え、 前記メモリ手段から読み出された前記データ及び誤り検
出コードから当該 データに誤りがあるか否かを検出する
誤り検出手段と、前記メモリ手段から読み出されたデータから該データの
記録された前記記憶領域 が消去状態であるか否かを検出
する消去検出手段とを更に備え、 前記誤り検出手段で読み出したデータに誤りが検出され
た場合でも前記消去検出手段が同時に消去状態を検出し
た場合には当該読み出しデータには誤りが無いものとし
て処理することを特徴とする請求項1に記載の不揮発性
半導体メモリ装置。
4. The memory means stores data and the data.
Equipped with a storage area where the error detection code corresponding to
, The data read from the memory means and error detection
Error detection means for detecting whether or not there is an error in the data from the output code, and the data read from the data read from the memory means.
Further , an erase detecting means for detecting whether or not the recorded storage area is in an erased state is provided , and even when an error is detected in the data read by the error detecting means, the erase detecting means simultaneously detects the erased state. The nonvolatile semiconductor memory device according to claim 1, wherein when detected, the read data is processed as having no error.
JP17423292A 1992-07-01 1992-07-01 Nonvolatile semiconductor memory device Expired - Fee Related JP3412839B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP17423292A JP3412839B2 (en) 1992-07-01 1992-07-01 Nonvolatile semiconductor memory device
KR1019930012262A KR960005895B1 (en) 1992-07-01 1993-07-01 Non-volatile semiconductor memory device
US08/084,477 US5379262A (en) 1992-07-01 1993-07-01 Nonvolatile semiconductor memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17423292A JP3412839B2 (en) 1992-07-01 1992-07-01 Nonvolatile semiconductor memory device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2003026478A Division JP3822171B2 (en) 2003-02-03 2003-02-03 Nonvolatile semiconductor memory device and control method thereof, nonvolatile semiconductor memory device system and control method thereof

Publications (2)

Publication Number Publication Date
JPH0619778A JPH0619778A (en) 1994-01-28
JP3412839B2 true JP3412839B2 (en) 2003-06-03

Family

ID=15975035

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17423292A Expired - Fee Related JP3412839B2 (en) 1992-07-01 1992-07-01 Nonvolatile semiconductor memory device

Country Status (3)

Country Link
US (1) US5379262A (en)
JP (1) JP3412839B2 (en)
KR (1) KR960005895B1 (en)

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3471842B2 (en) * 1993-03-29 2003-12-02 株式会社東芝 Data management device, data storage device, and data management method
JP3662946B2 (en) * 1993-09-22 2005-06-22 株式会社東芝 File management system and portable electronic device
US5781756A (en) * 1994-04-01 1998-07-14 Xilinx, Inc. Programmable logic device with partially configurable memory cells and a method for configuration
JP2669365B2 (en) * 1994-11-24 1997-10-27 日本電気株式会社 Rewritable ROM file device
IT1278980B1 (en) * 1995-03-07 1997-12-02 Olivetti Canon Ind Spa INK JET COLOR PRINTER
KR100486132B1 (en) * 1996-12-03 2005-09-02 소니 가부시끼 가이샤 Nonvolatile semiconductor memory with fast data programming and erasing using ECC
US6551857B2 (en) * 1997-04-04 2003-04-22 Elm Technology Corporation Three dimensional structure integrated circuits
GB9801373D0 (en) * 1998-01-22 1998-03-18 Memory Corp Plc Memory system
MY122279A (en) 1999-03-03 2006-04-29 Sony Corp Nonvolatile memory and nonvolatile memory reproducing apparatus
KR100586031B1 (en) * 1999-12-23 2006-06-01 브이케이 주식회사 Method for the real-time database management using non-volatile memory
JP4016610B2 (en) * 2001-05-11 2007-12-05 ティアック株式会社 Recording medium having hierarchical directory structure, search device, search program, and search method
JP3816788B2 (en) * 2001-11-22 2006-08-30 株式会社東芝 Nonvolatile semiconductor memory device
ATE381061T1 (en) * 2005-03-08 2007-12-15 Bosch Gmbh Robert METHOD AND APPARATUS FOR REWRITING A SECTOR USING BOOTLOADER SOFTWARE IN A SECTOR-ERASABLE NON-VOLATILE SEMICONDUCTOR MEMORY
US8200887B2 (en) 2007-03-29 2012-06-12 Violin Memory, Inc. Memory management system and method
US8452929B2 (en) * 2005-04-21 2013-05-28 Violin Memory Inc. Method and system for storage of data in non-volatile media
US9384818B2 (en) 2005-04-21 2016-07-05 Violin Memory Memory power management
US9286198B2 (en) 2005-04-21 2016-03-15 Violin Memory Method and system for storage of data in non-volatile media
JP4991131B2 (en) * 2005-08-12 2012-08-01 株式会社東芝 Semiconductor memory device
US7523381B2 (en) * 2005-09-01 2009-04-21 Micron Technology, Inc. Non-volatile memory with error detection
US8028186B2 (en) * 2006-10-23 2011-09-27 Violin Memory, Inc. Skew management in an interconnection system
US9632870B2 (en) * 2007-03-29 2017-04-25 Violin Memory, Inc. Memory system with multiple striping of raid groups and method for performing the same
US11010076B2 (en) 2007-03-29 2021-05-18 Violin Systems Llc Memory system with multiple striping of raid groups and method for performing the same
JP4461170B2 (en) 2007-12-28 2010-05-12 株式会社東芝 Memory system
JP4439569B2 (en) 2008-04-24 2010-03-24 株式会社東芝 Memory system
WO2010144587A2 (en) 2009-06-12 2010-12-16 Violin Memory, Inc. Memory system having persistent garbage collection
JP6167646B2 (en) * 2013-04-30 2017-07-26 富士通株式会社 Information processing apparatus, control circuit, control program, and control method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69033262T2 (en) * 1989-04-13 2000-02-24 Sandisk Corp EEPROM card with replacement of faulty memory cells and buffer
US5200959A (en) * 1989-10-17 1993-04-06 Sundisk Corporation Device and method for defect handling in semi-conductor memory
JPH05109292A (en) * 1991-10-14 1993-04-30 Toshiba Corp Nonvolatile semiconductor memory

Also Published As

Publication number Publication date
US5379262A (en) 1995-01-03
JPH0619778A (en) 1994-01-28
KR940006143A (en) 1994-03-23
KR960005895B1 (en) 1996-05-03

Similar Documents

Publication Publication Date Title
JP3412839B2 (en) Nonvolatile semiconductor memory device
JP3485938B2 (en) Nonvolatile semiconductor memory device
US5509018A (en) Flash-erase-type nonvolatile semiconductor storage device
US6295619B1 (en) Method and apparatus for error management in a solid state disk drive
JP4933269B2 (en) Non-volatile memory and method with memory plane array
US8285954B2 (en) Memory system managing a plurality of logs
US11386005B2 (en) Memory system, memory controller, and method of operating memory system for caching journal information for zone in the journal cache
CN112306387A (en) Memory system, memory controller and method of operating memory system
US20040255076A1 (en) Flash memory controller, memory control circuit, flash memory system, and method for controlling data exchange between host computer and flash memory
US11467903B2 (en) Memory system and operating method thereof
JP3672576B2 (en) Nonvolatile semiconductor memory device
JP3974149B2 (en) Nonvolatile semiconductor memory device and control method of nonvolatile semiconductor memory
JP3822171B2 (en) Nonvolatile semiconductor memory device and control method thereof, nonvolatile semiconductor memory device system and control method thereof
CN114253465A (en) Memory system and operating method thereof
JP3267320B2 (en) Nonvolatile semiconductor memory device and method of controlling nonvolatile semiconductor memory device
US11704050B2 (en) Memory system for determining a memory area in which a journal is stored according to a number of free memory blocks
JP2003263894A (en) Method for controlling nonvolatile semiconductor memory device
JP3908238B2 (en) Data writing method for nonvolatile semiconductor memory device
JP4050250B2 (en) Nonvolatile semiconductor memory device
JP2003242788A (en) Nonvolatile semiconductor memory device and control method therefor
KR20230094565A (en) Controller executing active mode or low power mode based on state of multiple sub-circuits and operating method thereof
CN116301569A (en) Memory system and method of operating the same
KR20220046221A (en) Memory system and operating method of memory system
KR20220025401A (en) Memory system, memory controller, and operating method of memory system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080328

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090328

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees