JP2006120257A - Nonvolatile semiconductor memory system and its control method - Google Patents

Nonvolatile semiconductor memory system and its control method Download PDF

Info

Publication number
JP2006120257A
JP2006120257A JP2004307874A JP2004307874A JP2006120257A JP 2006120257 A JP2006120257 A JP 2006120257A JP 2004307874 A JP2004307874 A JP 2004307874A JP 2004307874 A JP2004307874 A JP 2004307874A JP 2006120257 A JP2006120257 A JP 2006120257A
Authority
JP
Japan
Prior art keywords
block
data
block number
nonvolatile semiconductor
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.)
Pending
Application number
JP2004307874A
Other languages
Japanese (ja)
Inventor
Hitoshi Nezu
仁 根津
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
Kioxia Systems Co Ltd
Original Assignee
Toshiba Corp
Toshiba Memory Systems Co Ltd
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, Toshiba Memory Systems Co Ltd filed Critical Toshiba Corp
Priority to JP2004307874A priority Critical patent/JP2006120257A/en
Publication of JP2006120257A publication Critical patent/JP2006120257A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Read Only Memory (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To improve reliability of an entire system by relaxing concentration of writing into the specific region of an EEPROM in a nonvolatile semiconductor memory system, and to provide its control method. <P>SOLUTION: The nonvolatile semiconductor memory system comprises a plurality of blocks which can collectively be erased, following block numbers for connecting file data divided into a plurality of data in a chain shape and managing them as one file data, writing flags for indicating presence or no presence of data in the block, and the EEPROM 11 having the following block numbers and the writing flags as block control information 16, a RAM12 into which the leading block number 17 of the file data that are connected in the chain shape is stored, and a CPU14 which selects blocks on the basis of random numbers and the writing flags and sets the leading block number and the following block number so that the blocks are connected in the chain shape. Also provided is a control method therefor. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、不揮発性半導体記憶システムおよびその制御方法に関する。   The present invention relates to a nonvolatile semiconductor memory system and a control method thereof.

近年、電気的に書き換え可能な不揮発性半導体メモリ(以下、「EEPROM」という。)の大容量化に伴い、従来は磁気ディスク等に記憶していたファイルデータをEEPROMに格納する不揮発性半導体記憶システムが製品化されている。従来のパーソナルコンピュータでは、磁気ディスクなどの2次記憶装置のファイル管理システムとして、その多くがFAT( File Allocation Table )ファイルシステムを採用していた。このため、参考文献1に記載されているように、不揮発性半導体記憶システムでも磁気ディスクと同じFATファイルシステム(以下、「FAT−FS」という。)が採用される傾向にある。FAT−FSでは、磁気ディスクは、マスターブートセクタ、パーティションブートセクタ、FAT領域、ルートディレクトリ領域、ファイルデータ領域等に分割されている。ファイルデータは、管理の論理的な最小単位であるクラスタの集合体として構成され、その連鎖情報は、FAT領域で集中管理されている。すなわち、ファイル名、作成日付、およびファイルデータの先頭クラスタ番号などのファイル情報がディレクトリエントリと呼ばれるデータ構造体に格納され、この先頭クラスタ番号を起点としてFAT領域に記録されたそのファイルの連鎖情報が得られ、この連鎖情報をもとにクラスタが連結されて1つのファイルとしてアクセスされる。   2. Description of the Related Art With the recent increase in capacity of electrically rewritable nonvolatile semiconductor memories (hereinafter referred to as “EEPROMs”), nonvolatile semiconductor memory systems that store file data previously stored in magnetic disks or the like in EEPROMs. Has been commercialized. Many conventional personal computers employ a FAT (File Allocation Table) file system as a file management system for a secondary storage device such as a magnetic disk. For this reason, as described in Reference Document 1, a non-volatile semiconductor storage system tends to employ the same FAT file system (hereinafter referred to as “FAT-FS”) as a magnetic disk. In FAT-FS, a magnetic disk is divided into a master boot sector, a partition boot sector, a FAT area, a root directory area, a file data area, and the like. File data is configured as an aggregate of clusters, which is a logical minimum unit of management, and the chain information is centrally managed in the FAT area. That is, file information such as a file name, a creation date, and the first cluster number of file data is stored in a data structure called a directory entry, and the chain information of the file recorded in the FAT area starting from this first cluster number is stored in the data structure. Based on this chain information, the clusters are connected and accessed as one file.

ところで、従来のFAT−FSでは、新しくファイルデータを書き込む際のデータ格納位置は、未使用領域の先頭から順に選択されていた。このため、ファイルデータ領域に比べ比較的小さなサイズのファイルデータを頻繁に書き換える用途では、ファイルデータ領域の先頭付近に書き換えが集中していた。パーソナルコンピュータの場合は、磁気ディスクの書き換え回数には実用上制限がないため、この書き込み集中が特に不都合を引き起こすことはなかった。しかしながら、EEPROMの書き換え回数には制限があり、これを使用した不揮発性半導体記憶システムでFAT−FSを採用すると、ファイルデータ領域の先頭付近の書き換え回数が短期間でEEPROMの仕様を超えてしまうという重大な問題があった。また、従来のFAT−FSでは、FAT領域、ルートディレクトリ領域などの管理情報をEEPROMに記憶しておく必要があり、この領域への書き換え回数も無視できないものであった。特に、携帯電話などの携帯機器において、着信記録や留守電機能などの記憶にEEPROMを使用する場合、比較的小さなサイズのデータを頻繁に更新する必要があり、特定領域への書き換え回数の集中が深刻な問題であった。   By the way, in the conventional FAT-FS, the data storage position when writing new file data is selected in order from the top of the unused area. For this reason, in applications where file data having a relatively small size compared to the file data area is frequently rewritten, rewriting is concentrated near the beginning of the file data area. In the case of a personal computer, there is no practical limit on the number of times the magnetic disk can be rewritten, so this concentration of writing did not cause any particular inconvenience. However, there is a limit on the number of times the EEPROM can be rewritten, and if FAT-FS is adopted in a nonvolatile semiconductor storage system using this, the number of times of rewriting near the beginning of the file data area will exceed the EEPROM specification in a short period of time. There was a serious problem. Further, in the conventional FAT-FS, management information such as the FAT area and the root directory area needs to be stored in the EEPROM, and the number of rewrites to this area cannot be ignored. In particular, when using an EEPROM for storing incoming calls, answering machine functions, etc. in a portable device such as a mobile phone, it is necessary to frequently update data of a relatively small size, and concentration of rewrites in a specific area is concentrated. It was a serious problem.

このような問題を解決するため、クラスタごとに書き換え回数を記録しておき、書き換え回数の少ない領域から順に使用するという方法も考えられる。しかしながら、この場合、クラスタの書き込みごとに全ファイルデータ領域の書き換え回数を検索しなければならず、ファイルデータの書き込み時間が大幅に増加するという本質的な問題があった。
特開平11−53248号公報
In order to solve such a problem, a method of recording the number of rewrites for each cluster and using them in order from the area with the smallest number of rewrites is also conceivable. However, in this case, the number of times of rewriting of the entire file data area has to be searched every time the cluster is written, and there is an essential problem that the writing time of the file data is greatly increased.
JP-A-11-53248

本発明は、EEPROMの特定領域への書き換え集中を緩和し、システム全体の信頼性を向上させることができる不揮発性半導体記憶システムおよびその制御方法を提供する。   The present invention provides a nonvolatile semiconductor memory system and a control method therefor, which can alleviate concentration of rewriting to a specific area of an EEPROM and improve the reliability of the entire system.

本発明の一態様によれば、電気的に書き換え可能な複数の不揮発性半導体メモリセルからなる一括消去可能な複数のブロックと、複数に分割されたファイルデータを鎖状に連結して1つのファイルデータとして管理するための後続ブロック番号と、前記ブロックにおけるデータの有無を示す書き込みフラグと、前記後続ブロック番号および前記書き込みフラグを前記ブロックに有する第1の記憶手段と、前記鎖状に連結されたファイルデータの先頭ブロック番号が格納される第2の記憶手段と、前記第1および第2の記憶手段にアクセスし、前記分割されたファイルデータを格納する前記ブロックを乱数および前記書き込みフラグに基づいて選択し、それら選択された前記ブロックが鎖状に連結されるよう前記先頭ブロック番号および前記後続ブロック番号を設定する書き込み制御手段を有することを特徴とする不揮発性半導体記憶システムが提供される。   According to one aspect of the present invention, a single file is formed by linking a plurality of batch erasable blocks including a plurality of electrically rewritable nonvolatile semiconductor memory cells and a plurality of divided file data in a chain. A subsequent block number for managing as data, a write flag indicating the presence / absence of data in the block, a first storage means having the subsequent block number and the write flag in the block, and the chain connected The second storage means for storing the first block number of the file data and the first and second storage means are accessed, and the block for storing the divided file data is determined based on the random number and the write flag. Select the first block number and the subsequent block so that the selected blocks are linked in a chain. The nonvolatile semiconductor memory system characterized by having a write control means for setting the block number is provided.

本発明の別の一態様によれば、電気的に書き換え可能な複数の不揮発性半導体メモリセルからなる一括消去可能な複数のブロックを有する第1の記憶手段を備えた不揮発性半導体記憶システムの制御方法であって、前記ブロックのサイズに基づいて、ファイルデータを複数の分割データに分割するファイル分割ステップと、前記分割データごとに乱数を生成する乱数生成ステップと、前記乱数生成ステップで生成された乱数に基づいて、前記分割データを格納する前記ブロックを選択するアドレス生成ステップと、前記アドレス生成ステップで選択された前記ブロックから当該ブロックにおけるデータの有無を示す書き込みフラグを読み出す情報取得ステップと、前記書き込みフラグに基づいて、当該ブロックでのデータの有無を判定する使用ブロック判定ステップと、前記使用ブロック判定ステップにおいて、前記アドレス生成ステップで選択された前記ブロックの前記書き込みフラグが“未使用”の場合に、前記分割データを当該ブロックへ書き込むデータ書き込みステップと、前記データ書き込みステップで前記分割データを書き込んだ前記ブロックの前記書き込みフラグを“使用中”に設定するフラグ設定ステップと、前記複数の分割データを鎖状に連結して1つのファイルデータとして管理するために、前記アドレス生成ステップで選択された前記ブロックのブロック番号を後続ブロック番号として前記鎖状に連結された1つ前の前記分割データが格納されている前記ブロックへ格納する後続ブロック番号設定ステップと、前記鎖状に連結された先頭の前記分割データが格納されている前記ブロックのブロック番号を先頭ブロック番号として第2の記憶手段に格納する先頭ブロック番号設定ステップと、前記フラグ設定ステップ、前記後続ブロック番号設定ステップ、および前記先頭ブロック番号設定ステップを備えた情報保存ステップと、前記鎖状に連結された最後の前記分割データが格納されている前記ブロックの前記後続ブロック番号としてファイルデータの終わりを示す“EOF”を当該ブロックへ格納する後処理ステップを有することを特徴とする不揮発性半導体記憶システムの制御方法が提供される。   According to another aspect of the present invention, control of a nonvolatile semiconductor memory system including a first storage unit having a plurality of batch erasable blocks composed of a plurality of electrically rewritable nonvolatile semiconductor memory cells. A file dividing step for dividing file data into a plurality of divided data based on the size of the block, a random number generating step for generating a random number for each divided data, and a random number generating step An address generation step of selecting the block storing the divided data based on a random number; an information acquisition step of reading a write flag indicating the presence or absence of data in the block from the block selected in the address generation step; Based on the write flag, it is used to determine the presence or absence of data in the block. In the block determination step and the used block determination step, when the write flag of the block selected in the address generation step is “unused”, the data write step of writing the divided data into the block, and the data In order to manage a flag setting step of setting the write flag of the block in which the divided data is written in the writing step to “in use”, and connecting the plurality of divided data in a chain as one file data. A subsequent block number setting step for storing the block number of the block selected in the address generation step as a subsequent block number in the block in which the previous divided data concatenated in a chain is stored; and The above-mentioned divided data connected in a chain is A first block number setting step for storing the block number of the stored block in the second storage means as a first block number; the flag setting step; the subsequent block number setting step; and the first block number setting step. An information storage step, and a post-processing step of storing “EOF” indicating the end of file data in the block as the subsequent block number of the block in which the last divided data connected in a chain is stored A method for controlling a nonvolatile semiconductor memory system is provided.

本発明によれば、不揮発性半導体記憶システムにおけるEEPROMの特定領域への書き換え集中を緩和できるので、ファイルデータの書き換えに対してシステムとして高い信頼性を実現することができる。   According to the present invention, since the concentration of rewriting to a specific area of the EEPROM in the nonvolatile semiconductor memory system can be alleviated, high reliability can be realized as a system for rewriting file data.

以下、図面を参照しながら、本発明の実施例を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施例に係わる不揮発性半導体記憶システムを示すブロック図である。ここでは、主に、携帯電話などの小型携帯端末における不揮発性半導体記憶システムを、特に、電気的に書き換え可能な不揮発性半導体メモリ(以下、「EEPROM」という。)へのファイルデータのアクセスにかかわる部分を示した。   FIG. 1 is a block diagram showing a nonvolatile semiconductor memory system according to an embodiment of the present invention. Here, the nonvolatile semiconductor memory system in a small portable terminal such as a cellular phone mainly relates to file data access to an electrically rewritable nonvolatile semiconductor memory (hereinafter referred to as “EEPROM”). Showed the part.

本発明の実施例に係わる不揮発性半導体記憶システムは、ファイルデータを記憶するEEPROM11、作業用のRAM12、ファームウェアを格納しておくROM13、およびファイルデータの書き込み、消去、読み出しなどを制御するCPU14を備えている。   A nonvolatile semiconductor memory system according to an embodiment of the present invention includes an EEPROM 11 that stores file data, a working RAM 12, a ROM 13 that stores firmware, and a CPU 14 that controls writing, erasing, reading, and the like of file data. ing.

EEPROM11、RAM12、ROM13、およびCPU14は、それぞれシステムバス15に接続されており、ROM13に格納されているファームウェアに従って、CPU14がシステムバス15を介してEEPROM11およびRAM12にアクセスする。   The EEPROM 11, the RAM 12, the ROM 13, and the CPU 14 are respectively connected to the system bus 15, and the CPU 14 accesses the EEPROM 11 and the RAM 12 via the system bus 15 according to the firmware stored in the ROM 13.

また、CPU14は、システムバス15に接続されたインターフェース(図示していない。)を介して外部との間でデータの入出力を行う。   The CPU 14 inputs and outputs data to and from the outside via an interface (not shown) connected to the system bus 15.

EEPROM11は、消去ブロック単位で一括消去するNAND型のEEPROM11であり、ここにはCPU14が外部から受信したファイルデータが格納される。EEPROM11は1024個の消去ブロックで構成され、消去ブロックごとにブロック管理情報16が格納されている。   The EEPROM 11 is a NAND-type EEPROM 11 that is erased collectively in units of erase blocks, and stores file data received by the CPU 14 from the outside. The EEPROM 11 is composed of 1024 erase blocks, and block management information 16 is stored for each erase block.

RAM12は、電池によりバックアップされたSRAM12またはDRAM12であり、CPU14の作業用メモリとして使用される。また、ここにはEEPROM11に格納されたファイルデータの先頭ブロック番号17が格納されている。   The RAM 12 is an SRAM 12 or DRAM 12 backed up by a battery, and is used as a working memory for the CPU 14. In addition, the first block number 17 of the file data stored in the EEPROM 11 is stored here.

図2は、本発明の実施例に係わる不揮発性半導体記憶システムにおけるEEPROM11の消去ブロック21を示すイメージ図である。   FIG. 2 is an image diagram showing the erase block 21 of the EEPROM 11 in the nonvolatile semiconductor memory system according to the embodiment of the present invention.

本発明の実施例に係わる不揮発性半導体記憶システムにおけるEEPROM11の消去ブロック21は、図2(a)に示したように、32個のページ22からなり、各ページ22は、ファイルデータ等を記憶する512バイトのデータ領域23、およびブロック管理情報16を記憶する16バイトの冗長領域24で構成されている。   As shown in FIG. 2A, the erase block 21 of the EEPROM 11 in the nonvolatile semiconductor memory system according to the embodiment of the present invention is composed of 32 pages 22, and each page 22 stores file data and the like. It consists of a 512-byte data area 23 and a 16-byte redundant area 24 for storing the block management information 16.

冗長領域24に格納されるブロック管理情報16は、図2(b)に示したように、後続ブロック番号25、書き込みフラグ26、不良フラグ27、およびその他情報28を備えている。   The block management information 16 stored in the redundant area 24 includes a subsequent block number 25, a write flag 26, a failure flag 27, and other information 28 as shown in FIG.

書き込みフラグ26は、消去ブロック21のデータ領域23におけるデータの有無を示しており、データが存在する場合は“使用中”に設定され、データが存在しない場合は“未使用”に設定されている。   The write flag 26 indicates the presence / absence of data in the data area 23 of the erase block 21, and is set to “in use” when data exists, and set to “unused” when data does not exist. .

不良フラグ27は、消去ブロック21の致命的な不良の有無を示しており、ECC( Error Correction Code )によっても救済できないメモリセルの致命的な不良などが存在する場合には“NG”に設定され、そのような不良が存在しない場合には“OK”に設定される。   The defect flag 27 indicates the presence or absence of a fatal defect in the erase block 21, and is set to “NG” when there is a fatal defect of a memory cell that cannot be remedied by ECC (Error Correction Code). If no such defect exists, “OK” is set.

その他情報28には、消去ブロック21およびページ22に固有の論理アドレス(ブロック番号、ページ番号)や不良メモリセル救済のために使用されるECCなどが格納されている。   The other information 28 stores a logical address (block number, page number) unique to the erase block 21 and the page 22, an ECC used for repairing a defective memory cell, and the like.

後続ブロック番号25は、大きなファイルをブロックサイズ(512バイト×32ページ=16Kバイト)と同じ複数のデータに分割(以下、これを「分割データ」という。)してデータ領域23に格納し、これらを論理的に鎖状に連結して1つのファイルデータとして管理するために使用される。   The subsequent block number 25 is divided into a plurality of data having the same block size (512 bytes × 32 pages = 16 Kbytes) as a block size (hereinafter referred to as “divided data”) and stored in the data area 23. Are logically linked in a chain and used as one file data.

図3は、本発明の実施例に係わる不揮発性半導体記憶システムにおけるファイルデータの構成を示すイメージ図である。ここでは、一例として、5つの分割データ(a)〜(e)からなる構成例を示した。   FIG. 3 is an image diagram showing the configuration of file data in the nonvolatile semiconductor memory system according to the embodiment of the present invention. Here, as an example, a configuration example including five divided data (a) to (e) is shown.

本発明の実施例に係わる不揮発性半導体記憶システムにおけるファイルデータは、分割データ(a)〜(e)が消去ブロック21a〜21eのデータ領域23にそれぞれ格納され、後続ブロック番号25がそれぞれの冗長領域24に格納されている。   As for file data in the nonvolatile semiconductor memory system according to the embodiment of the present invention, the divided data (a) to (e) are respectively stored in the data areas 23 of the erase blocks 21a to 21e, and the subsequent block number 25 is assigned to each redundant area. 24.

後続ブロック番号25は、論理的に接続する次の分割データが格納された消去ブロック21を指し示している。   The subsequent block number 25 indicates the erase block 21 in which the next divided data to be logically connected is stored.

すなわち、ブロック番号−6の消去ブロック21(以下、「Block−6」という。他の消去ブロック21についても以下同様である。)のデータ領域23には分割データ(a)が格納され、その冗長領域24にはBlock−1022のブロック番号(“1022”)が後続ブロック番号25として格納されている。   That is, the divided data (a) is stored in the data area 23 of the erase block 21 of block number-6 (hereinafter referred to as “Block-6”. The same applies to the other erase blocks 21). In the area 24, the block number (“1022”) of Block-1022 is stored as the subsequent block number 25.

Block−1022のデータ領域23には分割データ(b)が格納され、その後続ブロック番号25にはBlock−1のブロック番号(“1”)が設定されている。Block−1のデータ領域23には分割データ(c)が格納され、その後続ブロック番号25にはBlock−4のブロック番号(“4”)が設定されている。   The divided data (b) is stored in the data area 23 of Block-1022, and the block number (“1”) of Block-1 is set in the subsequent block number 25. The divided data (c) is stored in the data area 23 of Block-1, and the block number (“4”) of Block-4 is set in the subsequent block number 25.

Block−4のデータ領域23には分割データ(d)が格納され、その後続ブロック番号25にはBlock−2のブロック番号(“2”)が設定されている。Block−2のデータ領域23には分割データ(e)が格納され、その後続ブロック番号25にはこのファイルデータの最後の消去ブロック21であることを示す“EOF”が設定されている。   The divided data (d) is stored in the data area 23 of Block-4, and the block number (“2”) of Block-2 is set in the subsequent block number 25. The divided data (e) is stored in the data area 23 of Block-2, and “EOF” indicating the last erase block 21 of this file data is set in the subsequent block number 25.

具体的には、EEPROM11が有する消去ブロック21の論理アドレス(消去ブロック番号)として使用されない数字“1024”が、“EOF”として用いられる。   Specifically, a number “1024” that is not used as a logical address (erase block number) of the erase block 21 included in the EEPROM 11 is used as “EOF”.

そして、Block−6のブロック番号(“6”)が先頭ブロック番号17としてRAM12に格納されている。   The block number (“6”) of Block-6 is stored in the RAM 12 as the first block number 17.

このファイルデータへのCPU14のアクセス、つまり、消去動作または読み出し動作におけるアクセスは、先頭ブロック番号17を起点として上述した後続ブロック番号25のチェーンをたどることにより行われる。   The CPU 14 accesses to the file data, that is, the access in the erasing operation or the reading operation is performed by following the chain of the subsequent block number 25 described above starting from the head block number 17.

次に、上述した構成を持つ不揮発性半導体記憶システムの制御方法について説明する。   Next, a method for controlling the nonvolatile semiconductor memory system having the above-described configuration will be described.

最初に、図3に示した鎖状の構造を持つファイルデータの構成方法、つまり、ファイルデータのEEPROM11への書き込み方法について説明する。   First, a method for configuring file data having the chain structure shown in FIG. 3, that is, a method for writing file data to the EEPROM 11 will be described.

図4は、本発明の実施例に係わる不揮発性半導体記憶システムにおけるEEPROM11への書き込み方法を示すイメージ図である。ここでは、CPU14が外部から受信したファイルデータを書き込みデータ41としてEEPROM11へ書き込む場合の一例を示した。   FIG. 4 is an image diagram showing a writing method to the EEPROM 11 in the nonvolatile semiconductor memory system according to the embodiment of the present invention. Here, an example in which the file data received from the outside by the CPU 14 is written in the EEPROM 11 as the write data 41 is shown.

まず、CPU14は、書き込みデータ41を5つに分割し、生成した分割データ(a)〜(e)ごとに一様乱数を発生させて、これに基づいてそれぞれの分割データを格納する消去ブロック21を選択する。   First, the CPU 14 divides the write data 41 into five, generates a uniform random number for each of the generated divided data (a) to (e), and stores the divided data based on the generated random data 21. Select.

そして、選択された消去ブロック21が未使用であれば、CPU14は、その分割データをデータ領域23へ書き込む。この時、図4に示したように、不良フラグ27が“NG”である不良ブロック(Block−5)は選択の対象から除外される。   If the selected erase block 21 is unused, the CPU 14 writes the divided data into the data area 23. At this time, as shown in FIG. 4, the defective block (Block-5) whose defective flag 27 is “NG” is excluded from the selection target.

図4では、分割データ(a)はBlock−6に格納され、分割データ(b)はBlock−1022に格納され、分割データ(c)はBlock−1に格納され、分割データ(d)はBlock−4に格納され、分割データ(e)はBlock−2に格納されている。   In FIG. 4, the divided data (a) is stored in Block-6, the divided data (b) is stored in Block-1022, the divided data (c) is stored in Block-1, and the divided data (d) is Block. -4 and the divided data (e) are stored in Block-2.

次に、書き込み動作の詳細をフロー図を用いて具体的に説明する。   Next, details of the write operation will be specifically described with reference to a flowchart.

図5は、本発明の実施例に係わる不揮発性半導体記憶システムの制御方法における書き込み動作を示すフロー図である。ここでは、説明を容易にするため、一例として、図4に示した書き込みデータ41を用いて、図3に示した鎖状のデータ構造を形成する書き込み動作を説明する。   FIG. 5 is a flowchart showing a write operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention. Here, for ease of explanation, the write operation for forming the chain data structure shown in FIG. 3 using the write data 41 shown in FIG. 4 will be described as an example.

本発明の実施例に係わる不揮発性半導体記憶システムの制御方法における書き込み動作は、図5(a)に示したように、ファイル分割ステップ42、ブロック書き込みステップ43、終了判定ステップ44、および後処理ステップ45を備えている。   As shown in FIG. 5A, the write operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention includes a file division step 42, a block write step 43, an end determination step 44, and a post-processing step. 45.

ファイル分割ステップ42では、CPU14は、書き込みデータ41を分割し、消去ブロック21のデータ領域23と同じサイズ(16Kバイト)の5つの分割データ(a)〜(e)を生成する。最後の分割データ(e)は16Kバイトより小さくても良い。   In the file dividing step 42, the CPU 14 divides the write data 41 and generates five divided data (a) to (e) having the same size (16 Kbytes) as the data area 23 of the erase block 21. The last divided data (e) may be smaller than 16K bytes.

ブロック書き込みステップ43では、CPU14は、ファイル分割ステップ42で生成された分割データ(a)〜(e)を順次EEPROM11へ書き込む。ブロック書き込みステップ43の詳細は、図5(b)を用いて後述する。   In the block writing step 43, the CPU 14 sequentially writes the divided data (a) to (e) generated in the file dividing step 42 to the EEPROM 11. Details of the block writing step 43 will be described later with reference to FIG.

終了判定ステップ44では、CPU14は、書き込みブロック数をカウントアップし、この値がファイル分割ステップ42で生成された分割データの数、つまり、“5”よりも小さい場合(“No”)には、次の分割データを書き込むためにブロック書き込みステップ43へ移行する。   In the end determination step 44, the CPU 14 counts up the number of write blocks, and when this value is smaller than the number of divided data generated in the file division step 42, that is, “5” (“No”), The process proceeds to block writing step 43 to write the next divided data.

カウントアップした書き込みブロック数が分割データ数(“5”)に等しくなった場合(“Yes”)には、CPU14は、後処理ステップ45へ移行する。   When the counted number of write blocks is equal to the number of divided data (“5”) (“Yes”), the CPU 14 proceeds to post-processing step 45.

後処理ステップ45では、CPU14は、最初の分割データ(a)が書き込まれた消去ブロック番号(図3では、“6”。)を先頭ブロック番号17としてRAM12に格納する。そして、最後の分割データ(e)が書き込まれた消去ブロック21(図3では、“Block−2”。)のブロック管理情報16にこの消去ブロック21がファイルデータの最後であることを示す“EOF”を設定する。   In the post-processing step 45, the CPU 14 stores the erase block number ("6" in FIG. 3) in which the first divided data (a) is written in the RAM 12 as the first block number 17. Then, the block management information 16 of the erase block 21 (“Block-2” in FIG. 3) in which the last divided data (e) is written indicates “EOF” indicating that this erase block 21 is the last of the file data. ”Is set.

後処理ステップ45が終了すると、CPU14は、一連の書き込み動作を終了する。   When the post-processing step 45 ends, the CPU 14 ends the series of writing operations.

本発明の実施例に係わる不揮発性半導体記憶システムの制御方法における書き込み動作のブロック書き込みステップ43は、図5(b)に示したように、乱数生成ステップ51、アドレス生成ステップ52、情報取得ステップ53、不良ブロック判定ステップ54、使用ブロック判定ステップ55、データ書き込みステップ56、書き込み判定ステップ57、情報更新ステップ58、および情報保存ステップ59を備えている。   The block write step 43 of the write operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention includes a random number generation step 51, an address generation step 52, and an information acquisition step 53 as shown in FIG. , A defective block determination step 54, a used block determination step 55, a data writing step 56, a writing determination step 57, an information update step 58, and an information storage step 59.

乱数生成ステップ51では、CPU14は、ROM13内のファームウェアに用意された乱数発生ルーチンにより一様乱数を生成する。乱数発生ルーチンとしては、例えば、C言語でファームウェアを開発する場合には、rand関数が使用される。   In the random number generation step 51, the CPU 14 generates a uniform random number by a random number generation routine prepared in the firmware in the ROM 13. As the random number generation routine, for example, when developing firmware in C language, a rand function is used.

アドレス生成ステップ52では、CPU14は、乱数生成ステップ51で生成された乱数を消去ブロック21のブロック番号に変換する。すなわち、図5に示したEEPROM11のように、消去ブロック21が1024個ある場合には、rand関数で発生させた乱数を1024倍してその小数点以下を切り捨てることでBlock−0〜Block−1023のいずれかの消去ブロック番号を生成することができる。   In the address generation step 52, the CPU 14 converts the random number generated in the random number generation step 51 into the block number of the erase block 21. That is, if there are 1024 erase blocks 21 as in the EEPROM 11 shown in FIG. Either erase block number can be generated.

情報取得ステップ53では、CPU14は、アドレス生成ステップ52で生成された消去ブロック番号の冗長領域24を読み出し、その不良フラグ27および書き込みフラグ26を取得する。   In the information acquisition step 53, the CPU 14 reads the redundant area 24 of the erase block number generated in the address generation step 52 and acquires the defect flag 27 and the write flag 26.

不良ブロック判定ステップ54では、CPU14は、情報取得ステップ53において取得した不良フラグ27によってその消去ブロック21の良否を判定する。   In the defective block determination step 54, the CPU 14 determines the quality of the erase block 21 based on the defect flag 27 acquired in the information acquisition step 53.

すなわち、不良フラグ27が“NG”であれば、この消去ブロック21はECCによっても救済できない致命的なメモリセル不良などを有しているので、CPU14は、再度別の消去ブロック21を選択するために乱数生成ステップ51へ移行する。   That is, if the defect flag 27 is “NG”, the erase block 21 has a fatal memory cell defect that cannot be remedied by the ECC, so the CPU 14 selects another erase block 21 again. Then, the process proceeds to random number generation step 51.

不良フラグ27が“OK”であれば、CPU14は、その消去ブロック21が使用可能であるかを調べるために、次の使用ブロック判定ステップ55へ移行する。   If the defect flag 27 is “OK”, the CPU 14 proceeds to the next used block determination step 55 in order to check whether or not the erase block 21 is usable.

使用ブロック判定ステップ55では、CPU14は、情報取得ステップ53において取得した書き込みフラグ26によってその消去ブロック21の使用可否を判定する。   In the use block determination step 55, the CPU 14 determines whether or not the erase block 21 can be used based on the write flag 26 acquired in the information acquisition step 53.

すなわち、書き込みフラグ26が“使用中”であれば、この消去ブロック21にはすでに他のデータが書き込まれているので、CPU14は、再度別の消去ブロック21を選択するために乱数生成ステップ51へ移行する。   That is, if the write flag 26 is “in use”, since other data has already been written in the erase block 21, the CPU 14 proceeds to the random number generation step 51 in order to select another erase block 21 again. Transition.

不良フラグ27が“未使用”であれば、CPU14は、分割データをその消去ブロック21へ書き込むために次のデータ書き込みステップ56へ移行する。   If the defect flag 27 is “unused”, the CPU 14 proceeds to the next data writing step 56 in order to write the divided data to the erase block 21.

データ書き込みステップ56では、CPU14は、アドレス生成ステップ52で生成された消去ブロック番号に基づいて、分割データをその消去ブロック21へ書き込む。   In the data write step 56, the CPU 14 writes the divided data to the erase block 21 based on the erase block number generated in the address generation step 52.

分割データの書き込みが終了すると、CPU14は、書き込み判定ステップ57で、書き込みエラーの有無を判定する。データ書き込みステップ56で書き込みエラーが発生していれば(“NG”)、CPU14は、その消去ブロック21を以後書き込み不可とするために情報更新ステップ58へ移行する。   When the writing of the divided data is completed, the CPU 14 determines whether or not there is a writing error in a writing determination step 57. If a write error has occurred in the data write step 56 (“NG”), the CPU 14 proceeds to the information update step 58 in order to make the erase block 21 unwritable thereafter.

データ書き込みステップ56で正常に分割データが書き込まれていれば(“OK”)、CPU14は、この消去ブロック21のブロック管理情報16を保存するために情報保存ステップ59へ移行する。   If the divided data is normally written in the data writing step 56 (“OK”), the CPU 14 proceeds to the information storing step 59 in order to store the block management information 16 of the erase block 21.

情報更新ステップ58では、CPU14は、この消去ブロック21に致命的な不良があること示すため、冗長領域24にある不良フラグ27を“NG”に設定する。これ以降この消去ブロック21は不良ブロックとして扱われ、データが書き込まれることはない。   In the information update step 58, the CPU 14 sets the failure flag 27 in the redundant area 24 to “NG” to indicate that the erase block 21 has a fatal failure. Thereafter, the erase block 21 is treated as a defective block, and no data is written.

分割データの書き込みが正常に終了すると、情報保存ステップ59で、CPU14は、その消去ブロック21の冗長領域24にある書き込みフラグ26を“使用中”に設定し、その消去ブロック番号を所定の領域に格納する。   When the writing of the divided data is normally completed, in the information saving step 59, the CPU 14 sets the write flag 26 in the redundant area 24 of the erase block 21 to “in use” and sets the erase block number to a predetermined area. Store.

すなわち、書き込みデータ41の最初の分割データ(a)の場合を除いて、CPU14は、その消去ブロック番号を後続ブロック番号25として1つ前の分割データが書き込まれている消去ブロック21のブロック管理情報16に格納する。   That is, except for the case of the first divided data (a) of the write data 41, the CPU 14 uses the block management information of the erase block 21 in which the previous divided data is written with the erase block number as the subsequent block number 25. 16.

書き込みフラグ26および消去ブロック番号の格納が終了すると、CPU14は、ブロック書き込みステップ43を終了して、終了判定ステップ44へ移行する。   When the storage of the write flag 26 and the erase block number ends, the CPU 14 ends the block write step 43 and proceeds to the end determination step 44.

上述した書き込み動作の各ステップを実行することで、CPU14は、図3に示したように、後続ブロック番号25によって鎖状に連結された一連の消去ブロック21からなるファイルデータを生成することができる。   By executing each step of the write operation described above, the CPU 14 can generate file data including a series of erase blocks 21 connected in a chain by the subsequent block number 25 as shown in FIG. .

次に、図3に示した鎖状の構造を持つファイルデータのEEPROM11からの消去方法について説明する。   Next, a method for erasing the file data having the chain structure shown in FIG. 3 from the EEPROM 11 will be described.

図6は、本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの消去動作を示すフロー図である。ここでは、説明を容易にするため、一例として、図3に示したファイルデータの消去動作を説明する。   FIG. 6 is a flowchart showing the file data erasing operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention. Here, for ease of explanation, the file data erasing operation shown in FIG. 3 will be described as an example.

本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの消去動作は、先頭ブロック番号17取得ステップ61、後続ブロック番号25取得ステップ62、ブロック消去ステップ63、および終了判定ステップ64を備えている。   The file data erasing operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention includes a first block number 17 acquisition step 61, a subsequent block number 25 acquisition step 62, a block erase step 63, and an end determination step 64. I have.

先頭ブロック番号17取得ステップ61で、CPU14は、鎖状に連結されたファイルデータの先頭の消去ブロック21にアクセスするために、RAM12に格納されているそのファイルデータの先頭ブロック番号17(図3では、“6”。)を取得する。   In the first block number 17 acquisition step 61, the CPU 14 accesses the first erasure block 21 of the file data concatenated in a chain to obtain the first block number 17 of the file data stored in the RAM 12 (in FIG. 3). , “6”).

そして、その先頭ブロックにアクセスして、CPU14は、後続ブロック番号25取得ステップ62で、後続ブロック番号25(図3では、“1022”。)を取得する。ここで取得された後続ブロック番号25は、次のブロック消去ステップ63で消去されないように、RAM12の所定の領域に一時記憶される。   Then, the CPU 14 accesses the first block, and the CPU 14 acquires the subsequent block number 25 (“1022” in FIG. 3) in the subsequent block number 25 acquisition step 62. The subsequent block number 25 obtained here is temporarily stored in a predetermined area of the RAM 12 so that it is not erased in the next block erase step 63.

ブロック消去ステップ63では、CPU14は、その消去ブロック21を一括して消去する。   In the block erase step 63, the CPU 14 erases the erase block 21 at once.

ブロック消去ステップ63が終了すると、CPU14は、終了判定ステップ64で、後続ブロック番号25取得ステップ62でRAM12に一時記憶しておいた後続ブロック番号25を調べてファイルデータの終了を判定する。   When the block erase step 63 ends, the CPU 14 determines the end of the file data by checking the subsequent block number 25 temporarily stored in the RAM 12 in the subsequent block number 25 acquisition step 62 in the end determination step 64.

すなわち、その後続ブロック番号25が“EOF”でなければ(“next”)、CPU14は、次の消去ブロック21(例えば、図3では、“Block−1022”、“Block−1”、“Block−4”、または“Block−2”。)を消去するために、後続ブロック番号25取得ステップ62へ移行する。   That is, if the subsequent block number 25 is not “EOF” (“next”), the CPU 14 determines the next erase block 21 (for example, “Block-1022”, “Block-1”, “Block−” in FIG. 3). 4 ”or“ Block-2 ”), the process proceeds to the subsequent block number 25 acquisition step 62.

RAM12に一時記憶されている後続ブロック番号25が“EOF”であれば、ファイルデータを構成していた分割データ(a)〜(e)の消去ブロック21がすべて消去されたので、CPU14は、終了判定ステップ64を終了して消去動作を完了する。   If the subsequent block number 25 temporarily stored in the RAM 12 is “EOF”, the CPU 14 terminates because all the erase blocks 21 of the divided data (a) to (e) constituting the file data are erased. Determination step 64 is terminated and the erase operation is completed.

このように、RAM12に格納されている先頭ブロック番号17から後続ブロック番号25を順次たどることにより、図3に示した鎖状の構造を持つファイルデータを容易に消去することができる。   In this way, the file data having the chain structure shown in FIG. 3 can be easily deleted by sequentially tracing the first block number 17 to the subsequent block number 25 stored in the RAM 12.

次に、図3に示した鎖状の構造を持つファイルデータのEEPROM11からの読み出し方法について説明する。   Next, a method for reading the file data having the chain structure shown in FIG. 3 from the EEPROM 11 will be described.

図7は、本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの読み出し動作を示すフロー図である。ここでは、図6の消去動作と同様に、図3に示したファイルデータの読み出し動作について説明する。   FIG. 7 is a flowchart showing a file data read operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention. Here, the file data read operation shown in FIG. 3 will be described in the same manner as the erase operation of FIG.

本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの読み出し動作は、先頭ブロック番号17取得ステップ71、後続ブロック番号25取得ステップ72、ブロック読み出しステップ73、および終了判定ステップ74を備えている。   The file data read operation in the control method of the nonvolatile semiconductor memory system according to the embodiment of the present invention includes a first block number 17 acquisition step 71, a subsequent block number 25 acquisition step 72, a block read step 73, and an end determination step 74. I have.

先頭ブロック番号17取得ステップ71で、CPU14は、消去動作と同様に、そのファイルデータの先頭ブロック番号17を取得する。   In the first block number 17 acquisition step 71, the CPU 14 acquires the first block number 17 of the file data as in the erasing operation.

そして、消去動作と同様に、CPU14は、後続ブロック番号25取得ステップ72で、後続ブロック番号25を取得する。   Similar to the erasing operation, the CPU 14 acquires the subsequent block number 25 in the subsequent block number 25 acquisition step 72.

ブロック読み出しステップ73では、CPU14は、その消去ブロック21のデータ領域23から分割データを読み出す。   In the block reading step 73, the CPU 14 reads the divided data from the data area 23 of the erase block 21.

ブロック読み出しステップ73が終了すると、CPU14は、終了判定ステップ74で、ファイルデータの終了を判定する。   When the block reading step 73 ends, the CPU 14 determines the end of the file data in an end determination step 74.

すなわち、その後続ブロック番号25が“EOF”でなければ(“next”)、CPU14は、次の消去ブロック21(例えば、図3では、“Block−1022”、“Block−1”、“Block−4”、または“Block−2”。)を読み出すために、後続ブロック番号25取得ステップ72へ移行する。   That is, if the subsequent block number 25 is not “EOF” (“next”), the CPU 14 determines the next erase block 21 (for example, “Block-1022”, “Block-1”, “Block−” in FIG. 3). 4 ”or“ Block-2 ”.) To read the subsequent block number 25 acquisition step 72.

後続ブロック番号25が“EOF”であれば、CPU14は、終了判定ステップ74を終了して読み出し動作を完了する。   If the subsequent block number 25 is “EOF”, the CPU 14 ends the end determination step 74 and completes the read operation.

このように、RAM12に格納されている先頭ブロック番号17から後続ブロック番号25を順次たどることにより、図3に示した鎖状の構造を持つファイルデータを容易に読み出すことができる。   In this way, the file data having the chain structure shown in FIG. 3 can be easily read by sequentially following the head block number 17 to the subsequent block number 25 stored in the RAM 12.

上記実施例によれば、EEPROM11の特定領域への書き換え集中を緩和できるので、ファイルデータの書き換えに対して高い信頼性を持った不揮発性半導体記憶システムおよびその制御方法を実現することができる。   According to the above embodiment, since the concentration of rewriting to a specific area of the EEPROM 11 can be eased, a nonvolatile semiconductor memory system having high reliability for rewriting file data and a control method thereof can be realized.

また、上記実施例によれば、鎖状に連結されているファイルデータの先頭ブロック番号17をRAM12に記憶するので、EEPROM11上にディレクトリエントリ領域を作成する必要がなく、EEPROM11の特定領域への書き換え集中をさらに削減することができる。   Further, according to the above embodiment, since the head block number 17 of the file data connected in a chain is stored in the RAM 12, there is no need to create a directory entry area on the EEPROM 11, and the EEPROM 11 is rewritten into a specific area. Concentration can be further reduced.

さらに、上記実施例によれば、鎖状に連結される各消去ブロック21の選択を一様乱数を用いて行うので、ファイルデータの頻繁な書き換えに対しても、特定の消去ブロック21への過度な書き換え集中を避けることができ、すべての消去ブロック21に対して書き換え回数の平均化を確率的に効率よく実現することができる。   Furthermore, according to the above-described embodiment, the deletion blocks 21 connected in a chain form are selected using uniform random numbers, so that excessive rewriting to a specific deletion block 21 is possible even when the file data is frequently rewritten. Rewriting concentration can be avoided, and averaging of the number of times of rewriting can be realized stochastically and efficiently for all erase blocks 21.

さらに、上記実施例によれば、書き込みフラグ26に基づいて選択された消去ブロック21の使用の可否を判定するので、書き換え回数の平均化を高速に実現することができる。   Furthermore, according to the above embodiment, since it is determined whether or not the erase block 21 selected based on the write flag 26 can be used, the number of rewrites can be averaged at high speed.

上述の実施例では、EEPROM11は、一例として、NAND型であるとしたが、本発明はこれに限られるものではなく、書き換え回数に制約のある電気的に書き換え可能な不揮発性半導体メモリを用いる記憶システムに対して適用可能である。   In the above-described embodiment, the EEPROM 11 is, for example, a NAND type. However, the present invention is not limited to this, and storage using an electrically rewritable nonvolatile semiconductor memory with a limited number of rewrites. Applicable to the system.

また、上述の実施例では、後続ブロック番号25および書き込みフラグ26などのブロック管理情報16は、冗長領域24に格納するとしたが、本発明はこれに限られるものではなく、例えば、データ領域23の所定の場所をブロック管理情報16の格納用に設定することもできる。   In the above-described embodiment, the block management information 16 such as the subsequent block number 25 and the write flag 26 is stored in the redundant area 24. However, the present invention is not limited to this. A predetermined location can be set for storing the block management information 16.

さらに、上述の実施例では、EEPROM11は、一例として、16Kバイトのデータ領域23を持つ1024個の消去ブロック21で構成されるとしたが、本発明はこれに限られるものではない。   Furthermore, in the above-described embodiment, the EEPROM 11 is composed of 1024 erase blocks 21 having a data area 23 of 16 Kbytes as an example, but the present invention is not limited to this.

さらに、上述の実施例では、説明を容易にするために、ファイルデータは消去ブロック21のデータ領域23と同じサイズ(16Kバイト)の分割データ(a)〜(e)に分割され、それぞれが消去ブロック21に格納されるとしたが、本発明はこれに限られるものではない。   Further, in the above-described embodiment, for ease of explanation, the file data is divided into divided data (a) to (e) having the same size (16 Kbytes) as the data area 23 of the erase block 21, and each is erased. Although stored in the block 21, the present invention is not limited to this.

例えば、図8(a)に示したように、EEPROM11において複数の消去ブロック21(図8(a)では、4つ。)をグループにして書き込みブロックを構成し、ファイルデータを書き込みブロックのサイズ(図8(a)の場合は、32Kバイト。)に合わせて分割するようにしても良い。   For example, as shown in FIG. 8A, in the EEPROM 11, a plurality of erase blocks 21 (four in FIG. 8A) are grouped to form a write block, and file data is stored in the size of the write block ( In the case of FIG. 8A, it may be divided in accordance with 32K bytes.

この場合、図8(b)に示したように、アドレス生成ステップ52で乱数に基づいて生成される書き込みブロック番号は、実際にCPU14が書き込む際の消去ブロック番号より2bit分少なくて良い。この書き込みブロック番号を消去ブロック番号の上位アドレスとして設定することで、図8(a)に示したように、連続した4つの消去ブロック21で書き込みブロックを構成することができる。   In this case, as shown in FIG. 8B, the write block number generated based on the random number in the address generation step 52 may be 2 bits less than the erase block number when the CPU 14 actually writes. By setting this write block number as an upper address of the erase block number, as shown in FIG. 8A, a write block can be composed of four consecutive erase blocks 21.

さらに、上述の実施例では、先頭ブロック番号17はRAM12に格納されるとしてが、本発明はこれに限られるものではなく、例えば、書き換え回数に実質的な制限のないハードディスクなどに格納しても良い。   Furthermore, in the above-described embodiment, the head block number 17 is stored in the RAM 12, but the present invention is not limited to this. For example, the head block number 17 may be stored in a hard disk or the like with no substantial limit on the number of rewrites. good.

さらに、上述の実施例では、“EOF”は後続ブロック番号25に格納された“1024”であるとしてが、本発明はこれに限られるものではなく、例えば、後続ブロック番号25とは別に“EOF”を設定する専用の領域をブロック管理情報16として設けても良い。   Further, in the above-described embodiment, “EOF” is “1024” stored in the subsequent block number 25. However, the present invention is not limited to this, and for example, “EOF” separately from the subsequent block number 25. A dedicated area for setting “may be provided as the block management information 16.

さらに、上述の実施例では、乱数はrand関数によって発生するとしたが、本発明はこれに限られるものではなく、ほぼ一様な乱数を発生させることのできる手段であれば、原理的に適用可能である。   Furthermore, in the above-described embodiment, the random number is generated by the random function. However, the present invention is not limited to this, and can be applied in principle as long as it is a means capable of generating a substantially uniform random number. It is.

本発明の実施例に係わる不揮発性半導体記憶システムを示すブロック図。1 is a block diagram showing a nonvolatile semiconductor memory system according to an embodiment of the present invention. 本発明の実施例に係わる不揮発性半導体記憶システムにおけるEEPROMの消去ブロックを示すイメージ図。The image figure which shows the erase block of EEPROM in the non-volatile semiconductor memory system concerning the Example of this invention. 本発明の実施例に係わる不揮発性半導体記憶システムにおけるファイルデータの構成を示すイメージ図。The image figure which shows the structure of the file data in the non-volatile semiconductor memory system concerning the Example of this invention. 本発明の実施例に係わる不揮発性半導体記憶システムにおけるEEPROMへの書き込み方法を示すイメージ図。The image figure which shows the writing method to EEPROM in the non-volatile semiconductor memory system concerning the Example of this invention. 本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの書き込み動作を示すフロー図。The flowchart which shows the write-in operation | movement of the file data in the control method of the non-volatile semiconductor memory system concerning the Example of this invention. 本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの消去動作を示すフロー図。The flowchart which shows the erase operation of the file data in the control method of the non-volatile semiconductor memory system concerning the Example of this invention. 本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの読み出し動作を示すフロー図。The flowchart which shows the read-out operation | movement of the file data in the control method of the non-volatile semiconductor memory system concerning the Example of this invention. 本発明の実施例に係わる不揮発性半導体記憶システムの制御方法におけるファイルデータの別の書き込み動作を説明するイメージ図。The image figure explaining another write-in operation | movement of the file data in the control method of the non-volatile semiconductor memory system concerning the Example of this invention.

符号の説明Explanation of symbols

11 EEPROM
12 RAM
13 ROM
14 CPU
15 システムバス
16 ブロック管理情報
17 先頭ブロック番号
21、21a〜21e 消去ブロック
22 ページ
23 データ領域
24 冗長領域
25 後続ブロック番号
26 書き込みフラグ
27 不良フラグ
28 その他情報
11 EEPROM
12 RAM
13 ROM
14 CPU
15 System bus 16 Block management information 17 First block number 21, 21a to 21e Erase block 22 Page 23 Data area 24 Redundant area 25 Subsequent block number 26 Write flag 27 Defective flag 28 Other information

Claims (5)

電気的に書き換え可能な複数の不揮発性半導体メモリセルからなる一括消去可能な複数のブロックと、
複数に分割されたファイルデータを鎖状に連結して1つのファイルデータとして管理するための後続ブロック番号と、
前記ブロックにおけるデータの有無を示す書き込みフラグと、
前記後続ブロック番号および前記書き込みフラグを前記ブロックに有する第1の記憶手段と、
前記鎖状に連結されたファイルデータの先頭ブロック番号が格納される第2の記憶手段と、
前記第1および第2の記憶手段にアクセスし、前記分割されたファイルデータを格納する前記ブロックを乱数および前記書き込みフラグに基づいて選択し、それら選択された前記ブロックが鎖状に連結されるよう前記先頭ブロック番号および前記後続ブロック番号を設定する書き込み制御手段を有することを特徴とする不揮発性半導体記憶システム。
A plurality of batch erasable blocks comprising a plurality of electrically rewritable nonvolatile semiconductor memory cells;
Subsequent block number for concatenating the file data divided into a plurality of chains and managing it as one file data,
A write flag indicating the presence or absence of data in the block;
First storage means having the subsequent block number and the write flag in the block;
Second storage means for storing the first block number of the file data linked in a chain;
Accessing the first and second storage means, selecting the block for storing the divided file data based on a random number and the write flag, so that the selected blocks are connected in a chain. A non-volatile semiconductor storage system comprising a write control means for setting the leading block number and the succeeding block number.
前記第1の記憶手段は、消去ブロックを最低単位としてデータ消去が可能であり、前記ブロックは、少なくとも複数の前記消去ブロックで構成されていることを特徴とする請求項1に記載の不揮発性半導体記憶システム。   2. The nonvolatile semiconductor device according to claim 1, wherein the first storage unit is capable of erasing data with an erase block as a minimum unit, and the block is configured by at least a plurality of the erase blocks. Storage system. 前記第1の記憶手段は、
前記分割されたファイルデータが格納されるデータ領域と前記後続ブロック番号および前記書き込みフラグが格納される冗長領域とを前記ブロックごとに有することを特徴とする請求項1に記載の不揮発性半導体記憶システム。
The first storage means is
2. The nonvolatile semiconductor memory system according to claim 1, further comprising a data area for storing the divided file data and a redundant area for storing the subsequent block number and the write flag for each block. .
電気的に書き換え可能な複数の不揮発性半導体メモリセルからなる一括消去可能な複数のブロックを有する第1の記憶手段を備えた不揮発性半導体記憶システムの制御方法であって、
前記ブロックのサイズに基づいて、ファイルデータを複数の分割データに分割するファイル分割ステップと、
前記分割データごとに乱数を生成する乱数生成ステップと、
前記乱数生成ステップで生成された乱数に基づいて、前記分割データを格納する前記ブロックを選択するアドレス生成ステップと、
前記アドレス生成ステップで選択された前記ブロックから当該ブロックにおけるデータの有無を示す書き込みフラグを読み出す情報取得ステップと、
前記書き込みフラグに基づいて、当該ブロックでのデータの有無を判定する使用ブロック判定ステップと、
前記使用ブロック判定ステップにおいて、前記アドレス生成ステップで選択された前記ブロックの前記書き込みフラグが“未使用”の場合に、前記分割データを当該ブロックへ書き込むデータ書き込みステップと、
前記データ書き込みステップで前記分割データを書き込んだ前記ブロックの前記書き込みフラグを“使用中”に設定するフラグ設定ステップと、
前記複数の分割データを鎖状に連結して1つのファイルデータとして管理するために、前記アドレス生成ステップで選択された前記ブロックのブロック番号を後続ブロック番号として前記鎖状に連結された1つ前の前記分割データが格納されている前記ブロックへ格納する後続ブロック番号設定ステップと、
前記鎖状に連結された先頭の前記分割データが格納されている前記ブロックのブロック番号を先頭ブロック番号として第2の記憶手段に格納する先頭ブロック番号設定ステップと、
前記フラグ設定ステップ、前記後続ブロック番号設定ステップ、および前記先頭ブロック番号設定ステップを備えた情報保存ステップと、
前記鎖状に連結された最後の前記分割データが格納されている前記ブロックの前記後続ブロック番号としてファイルデータの終わりを示す“EOF”を当該ブロックへ格納する後処理ステップを有することを特徴とする不揮発性半導体記憶システムの制御方法。
A control method for a nonvolatile semiconductor memory system comprising a first storage means having a plurality of blocks that are collectively erasable consisting of a plurality of electrically rewritable nonvolatile semiconductor memory cells,
A file dividing step of dividing the file data into a plurality of divided data based on the size of the block;
A random number generation step for generating a random number for each of the divided data;
Based on the random number generated in the random number generation step, an address generation step for selecting the block storing the divided data;
An information acquisition step of reading a write flag indicating the presence or absence of data in the block from the block selected in the address generation step;
A used block determining step for determining the presence or absence of data in the block based on the write flag;
In the use block determination step, when the write flag of the block selected in the address generation step is “unused”, a data write step of writing the divided data into the block;
A flag setting step for setting the write flag of the block in which the divided data is written in the data writing step to “in use”;
In order to connect the plurality of divided data in a chain and manage it as one file data, the block number of the block selected in the address generation step is used as a subsequent block number, and the previous one connected in the chain A subsequent block number setting step for storing in the block in which the divided data is stored;
A first block number setting step of storing in the second storage means the block number of the block in which the divided data at the head connected in a chain is stored as a first block number;
An information storage step comprising the flag setting step, the subsequent block number setting step, and the head block number setting step;
A post-processing step of storing “EOF” indicating the end of file data in the block as the succeeding block number of the block in which the last divided data connected in a chain is stored. A method for controlling a nonvolatile semiconductor memory system.
前記第1の記憶手段は、消去ブロックを最低単位としてデータ消去が可能であり、前記ブロックは、少なくとも複数の前記消去ブロックで構成されていることを特徴とする請求項4に記載の不揮発性半導体記憶システムの制御方法。   5. The nonvolatile semiconductor device according to claim 4, wherein the first storage unit is capable of erasing data with an erase block as a minimum unit, and the block includes at least a plurality of the erase blocks. 6. A storage system control method.
JP2004307874A 2004-10-22 2004-10-22 Nonvolatile semiconductor memory system and its control method Pending JP2006120257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004307874A JP2006120257A (en) 2004-10-22 2004-10-22 Nonvolatile semiconductor memory system and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004307874A JP2006120257A (en) 2004-10-22 2004-10-22 Nonvolatile semiconductor memory system and its control method

Publications (1)

Publication Number Publication Date
JP2006120257A true JP2006120257A (en) 2006-05-11

Family

ID=36537989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004307874A Pending JP2006120257A (en) 2004-10-22 2004-10-22 Nonvolatile semiconductor memory system and its control method

Country Status (1)

Country Link
JP (1) JP2006120257A (en)

Similar Documents

Publication Publication Date Title
US11880602B2 (en) Data writing method and storage device
US10783071B2 (en) Data storage device and operating method thereof, wherein mapping table for valid data of source block that has not been copied to destination block has a higher priority than mapping information collected by reverse scanning from end of the destination block
US8086787B2 (en) Wear leveling method, and storage system and controller using the same
US8250286B2 (en) Block management method, and storage system and controller using the same
JP4524309B2 (en) Memory controller for flash memory
US20100082878A1 (en) Memory controller, nonvolatile storage device, nonvolatile storage system, and data writing method
KR20080063466A (en) Flash memory management
CN110879793B (en) Memory management method, memory storage device and memory control circuit unit
US20190347006A1 (en) Method of system information programming for a data storage apparatus and a corresponding method of system information re-building
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
US20110153918A1 (en) Data writing method and data storage device
JP5494086B2 (en) Nonvolatile storage device and nonvolatile memory controller
CN109388520B (en) Data backup method, data recovery method and storage controller
CN112394883A (en) Data merging method, memory storage device and memory control circuit unit
JP4334331B2 (en) Flash memory access control method
JP4818453B1 (en) Electronic device and data reading method
JP2006120257A (en) Nonvolatile semiconductor memory system and its control method
US6898680B2 (en) Minimization of overhead of non-volatile memory operation
JP2005292925A (en) Memory controller, flash memory system, and control method for flash memory
TWI667571B (en) Data storage apparatus, method for programming system information and method for rebuilding system information
TWI813362B (en) Partial erasing management method, memory storage device and memory control circuit unit
JP2012037971A (en) Memory controller, nonvolatile memory system provided with memory controller, and method for controlling nonvolatile memory
CN111143230B (en) Data merging method, memory storage device and memory control circuit unit
TWI664569B (en) Data storage apparatus and system information programming mehtod
KR20090036900A (en) Method of managing data of flash memory