JP2005141418A - Memory controller and flash memory system having the same, and control method for flash memory - Google Patents

Memory controller and flash memory system having the same, and control method for flash memory Download PDF

Info

Publication number
JP2005141418A
JP2005141418A JP2003376131A JP2003376131A JP2005141418A JP 2005141418 A JP2005141418 A JP 2005141418A JP 2003376131 A JP2003376131 A JP 2003376131A JP 2003376131 A JP2003376131 A JP 2003376131A JP 2005141418 A JP2005141418 A JP 2005141418A
Authority
JP
Japan
Prior art keywords
block
flash memory
data
erased
erase
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.)
Granted
Application number
JP2003376131A
Other languages
Japanese (ja)
Other versions
JP4419525B2 (en
Inventor
Takeo Kikuchi
健雄 菊池
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.)
TDK Corp
Original Assignee
TDK 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 TDK Corp filed Critical TDK Corp
Priority to JP2003376131A priority Critical patent/JP4419525B2/en
Publication of JP2005141418A publication Critical patent/JP2005141418A/en
Application granted granted Critical
Publication of JP4419525B2 publication Critical patent/JP4419525B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory controller with which data can highly reliably be written while processing time involved in writing is restrained from becoming long by using an erasure state check function that a flash memory has and to provide a flash memory system having the memory controller and a control method for the flash memory. <P>SOLUTION: When data is written into the flash memory, an erasure processing is performed on a block being a writing destination of data. An erasure status that the flash memory creates is acquired after the erasure processing is terminated. When the acquired erasure status is information showing a normal erasure state, a writing processing of data is performed on the block on which the erasure processing is performed. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、メモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びに、フラッシュメモリの制御方法に関する。   The present invention relates to a memory controller, a flash memory system including the memory controller, and a flash memory control method.

近年、メモリカードやシリコンディスクなどのメモリシステムに用いられる半導体メモリとして、フラッシュメモリが用いられることが多い。このフラッシュメモリは不揮発性メモリの一種であり、電源が投入されているか否かに関わらず、データが保持されていることが要求される。   In recent years, a flash memory is often used as a semiconductor memory used in a memory system such as a memory card or a silicon disk. This flash memory is a kind of non-volatile memory, and is required to retain data regardless of whether power is turned on.

ところで、上記のような装置に特に用いられることが多いNAND型フラッシュメモリは、メモリセルを消去状態(論理値の「1」)から書込状態(論理値の「0」)に変化させる場合には、メモリセル単位で行うことができるが、メモリセルを書込状態(論理値の「0」)から消去状態(論理値の「1」)に変化させる場合には、メモリセル単位で行うことができず、複数のメモリセルからなる所定の消去単位(ブロック)でしかこれを行うことができない。かかる一括消去動作は、一般的にブロック消去と呼ばれている。   By the way, the NAND flash memory that is often used in the above-described devices is used when a memory cell is changed from an erased state (logical value “1”) to a written state (logical value “0”). Can be performed in units of memory cells. However, when a memory cell is changed from a written state (logical value “0”) to an erased state (logical value “1”), it must be performed in memory cells. This can only be done with a predetermined erase unit (block) consisting of a plurality of memory cells. Such a batch erase operation is generally called block erase.

上記のような特性により、NAND型フラッシュメモリを用いたメモリシステムでは、ブロック消去されているブロックにデータを書込んでいるが、偶発的なエラー又は不良ブロック化により、ブロック消去したブロックが正常な消去状態にならない場合がある。このような問題の対策として、特許文献1(特開2001−243122)では、実際にデータを書き込む前に消去済みブロックの状態を診断している。
特開2001−243122
Due to the above characteristics, in a memory system using a NAND flash memory, data is written in a block erased block, but the block erased block is normal due to an accidental error or defective block formation. It may not be erased. As a countermeasure against such a problem, Patent Document 1 (Japanese Patent Laid-Open No. 2001-243122) diagnoses the state of an erased block before actually writing data.
JP 2001-243122 A

ところが、特許文献1(特開2001−243122)に示されている対策では書込みデータの信頼性は向上するが、書込み前に消去済みブロックのメモリセルに書き込まれているデータを読み出す等の処理を行うため、書込みに伴う処理時間が長くなってしまうという問題があった。   However, the countermeasure disclosed in Patent Document 1 (Japanese Patent Application Laid-Open No. 2001-243122) improves the reliability of the write data, but performs processing such as reading the data written in the memory cells of the erased block before writing. Therefore, there is a problem that the processing time associated with writing becomes long.

又、近年提供されているフラッシュメモリの中には、ブロック消去の際に消去したブロックの消去状態をチェックし、全てのビットが消去状態になっているか否かを示すステータス情報を生成する機能を備えたものがある。従って、このような消去状態チェック機能を備えたフラッシュメモリを使用すれば、より簡単に消去状態をチェックすることができる。   Also, recently provided flash memory has a function to check the erased state of the erased block at the time of block erase and generate status information indicating whether all bits are in the erased state. There is something to prepare. Therefore, if a flash memory having such an erase state check function is used, the erase state can be checked more easily.

そこで、本発明はフラッシュメモリが備えた消去状態チェック機能を利用することにより、書込みに伴う処理時間が長くなるのを抑えつつ、信頼性の高いデータ書込みを行なうことができるメモリコントローラ及びメモリコントローラを備えるフラッシュメモリシステム、並びに、フラッシュメモリの制御方法を提供することを目的とする。   Accordingly, the present invention provides a memory controller and a memory controller that can perform highly reliable data writing while suppressing an increase in processing time associated with writing by using an erase state check function provided in a flash memory. An object of the present invention is to provide a flash memory system and a flash memory control method.

本発明に係る目的は、フラッシュメモリにデータを書込む書込み手段と、
フラッシュメモリからデータを読出す読出し手段と、
フラッシュメモリに書込まれているデータを消去する消去手段と、
フラッシュメモリに書込まれているデータを消去したときにフラッシュメモリが生成する消去ステータスを取得するステータス取得手段と、を備え、
取得した前記消去ステータスが正常な消去状態に該当するときだけ、該消去ステータスに係る消去済ブロックに対するデータの書込みが開始されるように構成されていることを特徴とするメモリコントローラによって達成される。
An object of the present invention is to provide a writing means for writing data to a flash memory,
Reading means for reading data from the flash memory;
Erasing means for erasing data written in the flash memory;
Status acquisition means for acquiring an erase status generated by the flash memory when data written to the flash memory is erased, and
This is achieved by a memory controller configured to start writing data to an erased block related to the erase status only when the acquired erase status corresponds to a normal erase state.

又、本発明に係る目的は、前記メモリコントローラと、前記ステータス生成手段を有するフラッシュメモリを備えることを特徴とするフラッシュメモリシステムによっても達成される。   The object according to the present invention is also achieved by a flash memory system comprising the flash memory having the memory controller and the status generating means.

ここで、フラッシュメモリが生成する消去ステータスは、消去状態が正常であるか否かを示す情報であり、全てのビットが消去状態になっていれば正常を、1ビットでも消去状態になっていないビットが存在すれば異常を示す。   Here, the erase status generated by the flash memory is information indicating whether or not the erased state is normal. If all the bits are in the erased state, the normal state is not erased even by one bit. If the bit is present, it indicates an abnormality.

又、本発明によれば、データの書込み先となるブロックの候補を設定する候補ブロック設定手段を備えることが好ましい。   In addition, according to the present invention, it is preferable to include candidate block setting means for setting candidates for blocks to which data is written.

又、本発明によれば、ブロックのユーザ領域に書込まれているデータが無効であることを示す無効フラグを、冗長領域に設定する無効フラグ設定手段を備え、前記候補ブロック設定手段が、冗長領域に前記無効フラグが設定されているブロックを、データの書込み先の候補に設定することが好ましい。   According to the present invention, there is provided invalid flag setting means for setting an invalid flag indicating that the data written in the user area of the block is invalid in the redundant area, and the candidate block setting means includes the redundant flag. It is preferable that a block in which the invalid flag is set in the area is set as a data write destination candidate.

又、本発明によれば、消去済ブロックに対する読出し処理に基づき、消去状態を診断する診断手段を備え、該診断手段と前記ステータス取得手段のいずれか一方の手段によって、正常な消去状態であると判断された消去済ブロックに対して、データの書込みが開始されるように構成されていてもよい。   Further, according to the present invention, it is provided with a diagnostic means for diagnosing the erased state based on the read processing for the erased block, and the normal erased state is determined by either one of the diagnostic means and the status acquisition means. Data writing may be started with respect to the determined erased block.

つまり、消去済ブロックに対する読出し処理に基づいて正常な消去状態であるか否かを判断する処理と、フラッシュメモリが生成する消去ステータスに基づいて正常な消去状態であるか否かを判断する処理を、選択的に使用することができ、その判断に基づいてデータの書込みが開始される。   That is, a process for determining whether or not the normal erase state is based on the read process for the erased block, and a process for determining whether or not the normal erase state is based on the erase status generated by the flash memory. Can be selectively used, and writing of data is started based on the determination.

又、本発明に係る目的は、フラッシュメモリにデータの書込みを行なうときに、データの書込み先となるブロックに対して消去処理を行ない、
前記消去処理の終了後にフラッシュメモリが生成する消去ステータスを取得し、
取得した前記消去ステータスが、正常な消去状態を示す情報であったときに、
前記消去処理が行なわれたブロックに対して、データの書込み処理を行なうことを特徴とするフラッシュメモリの制御方法によって達成される。
Another object of the present invention is to perform an erasure process on a block to which data is written when data is written to the flash memory.
Get the erase status generated by the flash memory after the erase process ends,
When the acquired erase status is information indicating a normal erase status,
This is achieved by a flash memory control method, in which data write processing is performed on the erased block.

ここで、フラッシュメモリが生成する消去ステータスは、消去状態が正常であるか否かを示す情報であり、全てのビットが消去状態になっていれば正常を、1ビットでも消去状態になっていないビットが存在すれば異常を示す。   Here, the erase status generated by the flash memory is information indicating whether or not the erased state is normal. If all the bits are in the erased state, the normal state is not erased even by one bit. If the bit is present, it indicates an abnormality.

又、本発明によれば、消去済ブロック、又はブロックのユーザ領域に書込まれているデータが無効であることを示す無効フラグが冗長領域に設定されているブロックを、データの書込み先とすることが好ましい。   Further, according to the present invention, a data write destination is a block in which an invalid flag indicating that the erased block or the data written in the user area of the block is invalid is set in the redundant area. It is preferable.

本発明によれば、フラッシュメモリが生成するステータス情報(消去状態が正常であるか否かを示す情報であり、全てのビットが消去状態になっていれば正常を、1ビットでも
消去状態になっていないビットが存在すれば異常を示す。)を取得し、このステータス情報に基づいて正常な消去状態であると判断されたブロックに対して、データの書込みを行なっている。又、この消去状態の判断とデータの書込みは、一連の処理として行なわれる。このような処理を行なうことにより、書込みに伴う処理時間が長くなるのを抑えつつ、信頼性の高いデータ書込みを行なうことができる。
According to the present invention, the status information generated by the flash memory (information indicating whether or not the erased state is normal. If all bits are in the erased state, the normal state is in the erased state even with one bit. If there is a non-existing bit, an error is indicated.) Is acquired, and data is written to a block that is determined to be in a normal erase state based on this status information. The determination of the erase state and the data writing are performed as a series of processes. By performing such processing, highly reliable data writing can be performed while suppressing an increase in processing time associated with writing.

又、ブロックのユーザ領域に書込まれているデータが無効又は不要となったときに、そのブロックの冗長領域に無効フラグを設定するようにすれば、データを書込む直前に消去処理を行うだけでよいので、データ書替の際の処理効率が更に向上する。   Also, if the data written in the user area of a block becomes invalid or unnecessary, if an invalid flag is set in the redundant area of that block, only the erasure process is performed immediately before the data is written. Therefore, the processing efficiency at the time of data rewriting is further improved.

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

[フラッシュメモリシステム1の説明]
図1は、本発明に係るフラッシュメモリシステム1を概略的に示すブロック図である。図1に示したようにフラッシュメモリシステム1は、フラッシュメモリ2と、それを制御するコントローラ3で構成されている。又、フラッシュメモリシステム1は、通常ホストシステム4に着脱可能に装着されて使用され、ホストシステム4に対して一種の外部記憶装置として用いられる。
[Description of flash memory system 1]
FIG. 1 is a block diagram schematically showing a flash memory system 1 according to the present invention. As shown in FIG. 1, the flash memory system 1 includes a flash memory 2 and a controller 3 that controls the flash memory 2. The flash memory system 1 is normally used by being detachably attached to the host system 4, and is used as a kind of external storage device for the host system 4.

尚、ホストシステム4としては、文字、音声、あるいは画像情報等の種々の情報を処理するパーソナルコンピュータやデジタルスチルカメラをはじめとする各種情報処理装置が挙げられる。   Examples of the host system 4 include various information processing apparatuses such as a personal computer and a digital still camera that process various information such as characters, sounds, and image information.

フラッシュメモリ2は、ページ単位で読出し又は書込みを、ブロック単位で消去を実行するデバイスであり、例えば、1ブロックは32ページで構成され、1ページは512バイトのユーザ領域と16バイトの冗長領域で構成されている。又、1ブロックが64ページで構成され、1ページが2kバイトのユーザ領域と64バイトの冗長領域で構成されているものもあり、今後もブロック又はページの記憶容量は増加する傾向にある。   The flash memory 2 is a device that executes reading or writing in units of pages and erasing in units of blocks. For example, one block is composed of 32 pages, and one page is a 512-byte user area and a 16-byte redundant area. It is configured. In addition, one block is composed of 64 pages, and one page is composed of a 2 kbyte user area and a 64-byte redundant area, and the storage capacity of the block or page tends to increase in the future.

コントローラ3は、ホストインターフェース制御ブロック5と、マイクロプロセッサ6と、ホストインターフェースブロック7と、ワークエリア8と、バッファ9と、フラッシュメモリインターフェースブロック10と、ECC(エラー・コレクション・コード)ブロック11と、フラッシュメモリシーケンサブロック12とから構成される。これら機能ブロックによって構成されるコントローラ3は、一つの半導体チップ上に集積されている。以下に各ブロックの機能を説明する。   The controller 3 includes a host interface control block 5, a microprocessor 6, a host interface block 7, a work area 8, a buffer 9, a flash memory interface block 10, an ECC (error collection code) block 11, And a flash memory sequencer block 12. The controller 3 constituted by these functional blocks is integrated on one semiconductor chip. The function of each block will be described below.

マイクロプロセッサ6は、コントローラ3を構成する各機能ブロック全体の動作を制御する機能ブロックである。   The microprocessor 6 is a functional block that controls the operation of the entire functional blocks constituting the controller 3.

ホストインターフェース制御ブロック5は、ホストインターフェースブロック7の動作を制御する機能ブロックである。ここで、ホストインターフェース制御ブロック5は、ホストインターフェースブロック7の動作を設定する動作設定レジスタ(図示せず)を備えており、この動作設定レジスタに基づきホストインターフェースブロック7は動作する。   The host interface control block 5 is a functional block that controls the operation of the host interface block 7. Here, the host interface control block 5 includes an operation setting register (not shown) for setting the operation of the host interface block 7, and the host interface block 7 operates based on the operation setting register.

ホストインターフェースブロック7は、ホストシステム4とデータ、アドレス情報、ステータス情報及び外部コマンド情報の授受を行なう機能ブロックである。すなわち、フラッシュメモリシステム1がホストシステム4に装着されると、フラッシュメモリシステム1とホストシステム4は、外部バス13を介して相互に接続され、かかる状態において、ホストシステム4よりフラッシュメモリシステム1に供給されるデータ等は、ホストインタ―フェースブロック7を入口としてコントローラ3の内部に取り込まれ、フラッシュメ
モリシステム1からホストシステム4に供給されるデータ等は、ホストインターフェースブロック7を出口としてホストシステム4に供給される。
The host interface block 7 is a functional block that exchanges data, address information, status information, and external command information with the host system 4. That is, when the flash memory system 1 is attached to the host system 4, the flash memory system 1 and the host system 4 are connected to each other via the external bus 13, and in this state, the host system 4 connects to the flash memory system 1. The supplied data or the like is taken into the controller 3 using the host interface block 7 as an entrance, and the data or the like supplied from the flash memory system 1 to the host system 4 is sent to the host system 4 using the host interface block 7 as an exit. To be supplied.

さらに、ホストインターフェースブロック7は、ホストシステム4より供給されるホストアドレス及び外部コマンドを一時的に格納するタスクファイルレジスタ(図示せず)及びエラーが発生した場合にセットされるエラーレジスタ(図示せず)等を有している。   Further, the host interface block 7 includes a task file register (not shown) for temporarily storing a host address and an external command supplied from the host system 4 and an error register (not shown) set when an error occurs. ) Etc.

ワークエリア8は、フラッシュメモリ2の制御に必要なデータが一時的に格納される作業領域であり、複数のSRAM(Static Random Access Memory)セルによって構成される機能ブロックである。   The work area 8 is a work area in which data necessary for controlling the flash memory 2 is temporarily stored, and is a functional block configured by a plurality of SRAM (Static Random Access Memory) cells.

バッファ9は、フラッシュメモリ2から読出したデータ及びフラッシュメモリ2に書込むデータを一時的に保持する機能ブロックである。すなわち、フラッシュメモリ2から読出したデータは、ホストシステム4が受け取り可能な状態になるまでバッファ9に保持され、フラッシュメモリ2に書込むデータは、フラッシュメモリ2が書込み可能な状態となるまでバッファ9に保持される。   The buffer 9 is a functional block that temporarily holds data read from the flash memory 2 and data to be written to the flash memory 2. That is, data read from the flash memory 2 is held in the buffer 9 until the host system 4 can receive the data, and data to be written to the flash memory 2 is stored in the buffer 9 until the flash memory 2 becomes writable. Retained.

フラッシュメモリシーケンサブロック12は、内部コマンドに基づきフラッシュメモリ2の動作を制御する機能ブロックである。フラッシュメモリシーケンサブロック12は、複数のレジスタ(図示せず)を備え、この複数のレジスタに内部コマンドを実行する際に必要な情報が設定される。この複数のレジスタに内部コマンドを実行する際に必要な情報が設定されると、フラッシュメモリシーケンサブロック12は、その情報に基づいて処理を実行する。ここで、「内部コマンド」とは、コントローラ3からフラッシュメモリ2に与えられるコマンドであり、ホストシステム4からフラッシュメモリシステム1に与えられるコマンドである「外部コマンド」と区別される。   The flash memory sequencer block 12 is a functional block that controls the operation of the flash memory 2 based on internal commands. The flash memory sequencer block 12 includes a plurality of registers (not shown), and information necessary for executing an internal command is set in the plurality of registers. When information necessary for executing an internal command is set in the plurality of registers, the flash memory sequencer block 12 executes processing based on the information. Here, the “internal command” is a command given from the controller 3 to the flash memory 2 and is distinguished from an “external command” which is a command given from the host system 4 to the flash memory system 1.

フラッシュメモリインターフェースブロック10は、内部バス14を介して、フラッシュメモリ2とデータ、アドレス情報、ステータス情報及び内部コマンド情報の授受を行う機能ブロックである。   The flash memory interface block 10 is a functional block that exchanges data, address information, status information, and internal command information with the flash memory 2 via the internal bus 14.

ECCブロック11は、フラッシュメモリ2に書込むデ―タに付加されるエラーコレクションコードを生成するとともに、読出しデータに付加されたエラーコレクションコードに基づいて、読出したデータに含まれる誤りを検出・訂正する機能ブロックである。   The ECC block 11 generates an error correction code to be added to data to be written to the flash memory 2, and detects and corrects errors included in the read data based on the error correction code added to the read data. Function block.

[メモリセルの説明]
次に、図2及び3参照して図1に示したフラッシュメモリ2を構成するメモリセル16の具体的な構造について説明する。
[Description of memory cell]
Next, a specific structure of the memory cell 16 constituting the flash memory 2 shown in FIG. 1 will be described with reference to FIGS.

図2は、フラッシュメモリを構成するメモリセル16の構造を概略的に示す断面図である。同図に示したように、メモリセル16は、P型半導体基板17に形成されたN型のソース拡散領域18及びドレイン拡散領域19と、ソース拡散領域18とドレイン拡散領域19との間のP型半導体基板17を覆って形成されたトンネル酸化膜20と、トンネル酸化膜20上に形成されたフローティングゲ―ト電極21と、フローティングゲート電極21上に形成された絶縁膜22と、絶縁膜22上に形成されたコントロールゲ―ト電極23とから構成される。このような構成を有するメモリセル16が、フラッシュメモリ内で複数個直列に接続されている。   FIG. 2 is a cross-sectional view schematically showing the structure of the memory cell 16 constituting the flash memory. As shown in the figure, the memory cell 16 includes an N-type source diffusion region 18 and a drain diffusion region 19 formed in the P-type semiconductor substrate 17, and a P between the source diffusion region 18 and the drain diffusion region 19. Tunnel oxide film 20 formed to cover type semiconductor substrate 17, floating gate electrode 21 formed on tunnel oxide film 20, insulating film 22 formed on floating gate electrode 21, and insulating film 22 The control gate electrode 23 is formed on the top. A plurality of memory cells 16 having such a configuration are connected in series in the flash memory.

メモリセル16は、フローティングゲート電極21に電子が注入されているか否かによって、「消去状態(電子が蓄積されていない状態)」と「書込状態(電子が蓄積されている状態)」のいずれかの状態が示される。ここで、1つのメモリセル16は1ビットのデータに対応し、メモリセル16の「消去状態」が論理値の「1」のデータに対応し、メモ
リセル16の「書込状態」が論理値の「0」のデータに対応する。
The memory cell 16 has either an “erased state (a state where no electrons are accumulated)” or a “written state (a state where electrons are accumulated)” depending on whether electrons are injected into the floating gate electrode 21 or not. Is shown. Here, one memory cell 16 corresponds to 1-bit data, the “erased state” of the memory cell 16 corresponds to data of “1” of the logical value, and the “written state” of the memory cell 16 corresponds to the logical value. Corresponds to “0” data.

「消去状態」においては、フローティングゲート電極21に電子が蓄積されていないため、コントロールゲート電極23に読出し電圧(高レベル電圧)が印加されていないときには、ソース拡散領域18とドレイン拡散領域19との間の、P型半導体基板17の表面にチャネルが形成されず、ソース拡散領域18とドレイン拡散領域19は電気的に絶縁される。一方、コントロールゲート電極23に読出し電圧(高レベル電圧)が印加されると、ソース拡散領域18とドレイン拡散領域19との間の、P型半導体基板17の表面にチャネル(図示せず)が形成され、ソース拡散領域18とドレイン拡散領域19は、このチャネルによって電気的に接続される。   In the “erased state”, since electrons are not accumulated in the floating gate electrode 21, when the read voltage (high level voltage) is not applied to the control gate electrode 23, the source diffusion region 18 and the drain diffusion region 19 In the meantime, no channel is formed on the surface of the P-type semiconductor substrate 17, and the source diffusion region 18 and the drain diffusion region 19 are electrically insulated. On the other hand, when a read voltage (high level voltage) is applied to the control gate electrode 23, a channel (not shown) is formed on the surface of the P-type semiconductor substrate 17 between the source diffusion region 18 and the drain diffusion region 19. The source diffusion region 18 and the drain diffusion region 19 are electrically connected by this channel.

すなわち、「消去状態」においてはコントロールゲート電極23に読出し電圧(高レベル電圧)が印加されていない状態では、ソース拡散領域18とドレイン拡散領域19とは電気的に絶縁され、コントロールゲート電極23に読出し電圧(高レベル電圧)が印加された状態では、ソース拡散領域18とドレイン拡散領域19とは電気的に接続される。   That is, in the “erased state”, when the read voltage (high level voltage) is not applied to the control gate electrode 23, the source diffusion region 18 and the drain diffusion region 19 are electrically insulated, and the control gate electrode 23 In the state where the read voltage (high level voltage) is applied, the source diffusion region 18 and the drain diffusion region 19 are electrically connected.

図3は、「書込状態」であるメモリセル16を概略的に示す断面図である。同図に示したように、「書込状態」とは、フローティングゲート電極21に電子が蓄積されている状態を指す。フローティングゲート電極21はトンネル酸化膜20及び絶縁膜22に挟まれているため、一旦、フローティングゲート電極21に注入された電子は、きわめて長時間フローティングゲート電極21内にとどまる。この「書込状態」においては、フローティングゲート電極21に電子が蓄積されているので、コントロールゲート電極23に読出し電圧(高レベル電圧)が印加されているか否かに関わらず、ソース拡散領域18とドレイン拡散領域19との間の、P型半導体基板17の表面にはチャネル24が形成される。したがって、「書込状態」においてはソース拡散領域18とドレイン拡散領域19とは、コントロールゲート電極23に読出し電圧(高レベル電圧)が印加されているか否かに関わらず、チャネル24によって常に電気的に接続状態となる。   FIG. 3 is a cross-sectional view schematically showing the memory cell 16 in the “written state”. As shown in the figure, the “written state” refers to a state in which electrons are accumulated in the floating gate electrode 21. Since the floating gate electrode 21 is sandwiched between the tunnel oxide film 20 and the insulating film 22, the electrons once injected into the floating gate electrode 21 stay in the floating gate electrode 21 for a very long time. In this “write state”, since electrons are accumulated in the floating gate electrode 21, regardless of whether or not a read voltage (high level voltage) is applied to the control gate electrode 23, A channel 24 is formed on the surface of the P-type semiconductor substrate 17 between the drain diffusion region 19. Therefore, in the “written state”, the source diffusion region 18 and the drain diffusion region 19 are always electrically connected by the channel 24 regardless of whether or not a read voltage (high level voltage) is applied to the control gate electrode 23. Will be connected.

又、上記メモリセル16が消去状態であるか書込状態であるかは、次のようにして読み出すことができる。メモリセル16はフラッシュメモリ内で複数個直列に接続されている。この直列体の中で選択するメモリセル16に低レベル電圧を印加し、それ以外のメモリセル16のコントロールゲート電極23に高レベル電圧を印加する。この状態でメモリセル16の直列体が導通状態であるか否かの検出が行われる。その結果、この直列体が導通状態であれば、選択されたメモリセル16は書込状態であると判断され、絶縁状態であれば、選択されたフラッシュメモリセル16は消去状態であると判断される。このようにして、直列体に含まれる任意のメモリセル16に保持されたデータが「0」であるのか「1」であるのかを読み出すことができる。   Whether the memory cell 16 is in an erased state or a written state can be read as follows. A plurality of memory cells 16 are connected in series in the flash memory. A low level voltage is applied to the memory cell 16 selected in the series body, and a high level voltage is applied to the control gate electrode 23 of the other memory cells 16. In this state, it is detected whether or not the serial body of the memory cells 16 is in a conductive state. As a result, if the serial body is in a conductive state, it is determined that the selected memory cell 16 is in a written state, and if it is in an isolated state, it is determined that the selected flash memory cell 16 is in an erased state. The In this way, it is possible to read out whether the data held in any memory cell 16 included in the serial body is “0” or “1”.

又、消去状態であるメモリセル16を書込状態に変化させる場合は、コントロールゲート電極23が高電位側となる高電圧を印加し、トンネル酸化膜20を介してフローティングゲート電極21へ電子を注入する。この際、FN(ファウラ―ノルトハイム)トンネル電流が流れフローティングゲート電極21に電子が注入される。一方、書込状態であるフラッシュメモリセル16を消去状態に変化させる場合は、コントロールゲート電極23が低電位側となる高電圧を印加し、トンネル酸化膜20を介してフローティングゲート電極21に蓄積された電子を排出する。   When the memory cell 16 in the erased state is changed to the written state, a high voltage is applied so that the control gate electrode 23 is on the high potential side, and electrons are injected into the floating gate electrode 21 through the tunnel oxide film 20. To do. At this time, an FN (Fowler-Nordheim) tunnel current flows and electrons are injected into the floating gate electrode 21. On the other hand, when changing the flash memory cell 16 in the written state to the erased state, a high voltage is applied to the control gate electrode 23 on the low potential side, and the voltage is stored in the floating gate electrode 21 via the tunnel oxide film 20. Discharge electrons.

[フラッシュメモリのメモリ構造の説明]
次に、フラッシュメモリのメモリ構造を説明する。図4は、フラッシュメモリのメモリ構造を概略的に示す図である。図4に示したように、フラッシュメモリはデータの読出し及び書込みにおける処理単位であるページと、データの消去単位であるブロックで構成されている。
[Description of flash memory structure]
Next, the memory structure of the flash memory will be described. FIG. 4 schematically shows a memory structure of the flash memory. As shown in FIG. 4, the flash memory is composed of pages, which are processing units for reading and writing data, and blocks, which are data erasing units.

上記ページは、例えば512バイトのユーザ領域25と、16バイトの冗長領域26によって構成される。ユーザ領域25は、主に、ホストシステム4から供給されるデ―タが格納される領域であり、冗長領域26は、エラーコレクションコード、対応論理ブロックアドレス及びブロックステータス等の付加情報が格納される領域である。   The page is composed of, for example, a user area 25 of 512 bytes and a redundant area 26 of 16 bytes. The user area 25 is an area mainly storing data supplied from the host system 4, and the redundant area 26 stores additional information such as an error collection code, a corresponding logical block address and a block status. It is an area.

エラーコレクションコードは、ユーザ領域25に格納されたデータに含まれる誤りを訂正するための付加情報であり、ECCブロックによって生成される。このエラーコレクションコードに基づき、ユーザ領域25に格納されたデータに含まれる誤りが所定数以下であれば、その誤りが訂正される。   The error collection code is additional information for correcting an error included in the data stored in the user area 25, and is generated by an ECC block. Based on the error collection code, if the number of errors included in the data stored in the user area 25 is equal to or less than a predetermined number, the error is corrected.

対応論理ブロックアドレスは、そのブロックにデータが格納されている場合に、そのブロックがどの論理ブロックアドレスに対応するかを示している。尚、そのブロックにデータが格納されていない場合は、対応論理ブロックアドレスも格納されていないので、対応論理ブロックアドレスが格納されているか否かで、そのブロックが消去済ブロックであるか否かを判断することができる。つまり、対応論理ブロックアドレスが格納されていない場合は消去済ブロックであると判断する。   The corresponding logical block address indicates to which logical block address the block corresponds when data is stored in the block. If no data is stored in the block, the corresponding logical block address is not stored. Therefore, whether or not the block is an erased block depends on whether or not the corresponding logical block address is stored. Judgment can be made. That is, if the corresponding logical block address is not stored, it is determined that the block is an erased block.

ブロックステータスは、そのブロックが不良ブロック(正常にデータの書込み等を行なうことができないブロック)であるか否かを示すフラグであり、そのブロックが不良ブロックであると判断された場合には、不良ブロックであることを示すフラグが設定される。   The block status is a flag indicating whether or not the block is a bad block (a block in which data cannot be normally written). If it is determined that the block is a bad block, the block status is bad. A flag indicating a block is set.

[論理ブロックアドレスと物理ブロックアドレスの説明]
フラッシュメモリはデータの上書きができないため、データの書替えを行なう場合には、ブロック消去されている消去済ブロックに新データ(書替後のデータ)を書込み、旧データ(書替前のデータ)が書込まれていたブロックを消去するという処理を行なわなければならない。この際、消去はブロック単位で処理されるため、旧データ(書替前のデータ)が書込まれていたページが含まれるブロックの、全ページのデータが消去されてしまう。従って、データの書替えを行なう場合、書替えるページが含まれるブロックの、他のページのデータについても、消去済ブロックに移動させる処理が必要となる。
[Description of logical block address and physical block address]
Since the flash memory cannot overwrite data, when rewriting data, write new data (data after rewriting) to the erased block that has been erased, and old data (data before rewriting). The process of erasing the written block must be performed. At this time, since erasure is processed in units of blocks, the data of all pages in the block including the page in which the old data (data before rewriting) is written is erased. Therefore, when data is rewritten, it is necessary to perform processing for moving the data of other pages of the block including the page to be rewritten to the erased block.

上記のようにデータを書替える場合、書替後のデータは書替前と異なるブロックに書込まれるため、ホストシステム側から与えられる論理ブロックアドレスと、フラッシュメモリ内でのブロックアドレスである物理ブロックアドレスとの対応関係は、データを書替える毎に動的に変化する。このため、論理ブロックアドレスと物理ブロックアドレスの対応関係を示したアドレス変換テーブルが必要となる。尚、このアドレス変換テーブルは、フラッシュメモリの冗長領域に書込まれている対応論理ブロックアドレスに基づいて作成され、データが書替えられる毎に、その書替えに関わった部分の対応関係が更新される。   When rewriting data as described above, since the data after rewriting is written in a different block from before rewriting, the logical block address given from the host system side and the physical block which is the block address in the flash memory The correspondence with the address changes dynamically every time data is rewritten. Therefore, an address conversion table showing the correspondence between logical block addresses and physical block addresses is required. This address conversion table is created based on the corresponding logical block address written in the redundant area of the flash memory, and each time the data is rewritten, the correspondence relationship of the part involved in the rewriting is updated.

[ゾーンの構成の説明]
上述のようにフラッシュメモリシステムでは、論理ブロックアドレスと物理ブロックアドレスの対応関係を示したアドレス変換テーブルを用いて、データの書込み処理や読出し処理を行なっている。又、このアドレス変換テーブルの作成時間を短縮するために、フラッシュメモリ内の複数のブロックで構成したゾーン毎にアドレス変換テーブルを作成しているフラッシュメモリシステムも多い。尚、ゾーンを構成するブロックの数は、特に限定されずフラッシュメモリシステムの用途やフラッシュメモリの仕様に応じて適宜設定することができる。
[Description of zone configuration]
As described above, in the flash memory system, data write processing and data read processing are performed using an address conversion table showing the correspondence between logical block addresses and physical block addresses. Many flash memory systems create an address translation table for each zone composed of a plurality of blocks in the flash memory in order to shorten the creation time of the address translation table. The number of blocks constituting the zone is not particularly limited, and can be set as appropriate according to the use of the flash memory system and the specification of the flash memory.

次に、上記ゾーンについて図面を参照して説明する。図5は、1024のブロックでゾーンを構成した例を示している。この例では、ゾーンは、1024のブロックB0000〜B1023で構成され、各ブロックは、読出し及び書込み処理の単位である32のページP00〜P31で構成されている。そして、このゾーンが1000ブロック分の論理ブ
ロックアドレスの空間に割当てられている。ここで、ブロックは消去処理の単位であり、ページは読出し及び書込み処理の単位である。又、ゾーンを構成するブロックが、24ブロック分余計に割当てられているのは、不良ブロックの発生を考慮したためである。但し、データ書替の際に一旦別のブロックに新データを書込み、その後、旧データが書込まれていたブロックをブロック消去する場合には、新データを書込むための予備ブロックが必要なので、実質的には23ブロック分が余計に割当てられていることになる。
Next, the zone will be described with reference to the drawings. FIG. 5 shows an example in which a zone is composed of 1024 blocks. In this example, the zone is composed of 1024 blocks B0000 to B1023, and each block is composed of 32 pages P00 to P31 which are units of read and write processing. This zone is assigned to a logical block address space for 1000 blocks. Here, the block is a unit of erasing processing, and the page is a unit of reading and writing processing. Further, the reason why the blocks constituting the zone are allocated to the extra 24 blocks is that the occurrence of defective blocks is taken into consideration. However, when data is rewritten and new data is once written to another block, and then the block where the old data has been written is erased, a spare block for writing the new data is necessary. In effect, an extra 23 blocks are allocated.

[アドレス変換テーブルの説明]
次に、図5に示したゾーンに対するアドレス変換テーブルの例を、図面を参照して説明する。図6は、図5に示したようにブロックB0000〜B1023(物理ブロックアドレスの0000〜1023)でゾーンを構成し、このゾーンを1000ブロック分の論理ブロックアドレスの空間に割当てた場合のアドレス変換テーブルを示している。このアドレス変換テーブルには、各論理ブロックアドレスに対応するデータが格納されているブロックの物理ブロックアドレスが、論理ブロックアドレス順に記述されている。ここで、対応するデータが格納されていない論理ブロックアドレスについては、アドレス変換テーブルのその論理ブロックアドレスに対応した部分に、物理ブロックアドレスではなく、対応するデータが格納されていないことを示すフラグ(以下、対応するデータが格納されていないことを示すフラグを未格納フラグと言う。)が設定される。
[Description of address translation table]
Next, an example of an address conversion table for the zone shown in FIG. 5 will be described with reference to the drawings. FIG. 6 shows an address conversion table in the case where a zone is configured with blocks B0000 to B1023 (physical block addresses 0000 to 1023) as shown in FIG. 5 and this zone is assigned to a space of 1000 blocks of logical block addresses. Is shown. In this address conversion table, physical block addresses of blocks storing data corresponding to each logical block address are described in the order of logical block addresses. Here, for a logical block address in which the corresponding data is not stored, a flag (not a physical block address but a corresponding data is stored in a portion corresponding to the logical block address in the address conversion table ( Hereinafter, a flag indicating that the corresponding data is not stored is referred to as an unstored flag).

次に、このアドレス変換テーブルを作成する方法について説明する。図6に示したアドレス変換テーブルを作成する場合、例えば、1000ブロック分の物理ブロックアドレスを記述できる領域をSRAM上に確保し、物理ブロックアドレスを記述する領域に初期設定として未格納フラグを設定する。その後、アドレス変換テーブルを作成するゾーンに割当てられているブロック(冗長領域)を順次読出していき、冗長領域に論理ブロックアドレス(対応論理ブロックアドレスとして記述されている論理ブロックアドレス)が記述されていた場合には、アドレス変換テーブルのその論理ブロックアドレスに対応した部分に、その論理ブロックアドレスが記述されていたブロックの物理ブロックアドレスを記述する。この処理を、ゾーンを構成する1024ブロックについて順次行ない、この処理が完了するとアドレス変換テーブルが完成する。尚、このアドレス変換テーブルの作成処理で、物理ブロックアドレスが記述されなかった部分については、初期設定で記述された未格納フラグがそのまま残る。   Next, a method for creating this address conversion table will be described. When creating the address conversion table shown in FIG. 6, for example, an area in which physical block addresses for 1000 blocks can be described is secured on the SRAM, and an unstored flag is set as an initial setting in the area in which physical block addresses are described. . After that, the blocks (redundant area) assigned to the zone for creating the address conversion table were read sequentially, and the logical block address (logical block address described as the corresponding logical block address) was described in the redundant area. In this case, the physical block address of the block in which the logical block address is described is described in the portion corresponding to the logical block address of the address conversion table. This process is sequentially performed for the 1024 blocks constituting the zone, and when this process is completed, the address conversion table is completed. In the address conversion table creation process, the unstored flag described in the initial setting remains as it is for the part where the physical block address is not described.

[消去済ブロック検索用テーブルと候補テーブルの説明]
次に、消去済ブロック検索用テーブルと候補テーブルについて説明する。候補テーブルは、データの書込み先として準備しておく消去済ブロック(以下、データの書込み先として準備しておく消去済ブロックを書込み候補ブロックと言う。)を設定しておくテーブルであり、各ゾーン毎に作成される。又、消去済ブロック検索用テーブルは、候補テーブルに書込み候補ブロックとして設定される消去済ブロックを検索するためのテーブルである。この消去済ブロック検索用テーブルの例としては、ゾーンを構成する各ブロックを、SRAM上の各ビットに対応させ、各ビットの値(「0」又は「1」)により、データが書込まれている状態、又はデータが書込まれていない状態を示したものが挙げられる。
[Description of erased block search table and candidate table]
Next, the erased block search table and candidate table will be described. The candidate table is a table in which erased blocks prepared as data write destinations (hereinafter, erased blocks prepared as data write destinations are referred to as write candidate blocks) are set in each zone. Created every time. The erased block search table is a table for searching for erased blocks set as candidate write blocks in the candidate table. As an example of the erased block search table, each block constituting the zone is associated with each bit on the SRAM, and data is written according to the value of each bit (“0” or “1”). Or a state in which data is not written.

図7(a)は、図5に示したゾーンの消去済ブロック検索用テーブルを概念的に示した概念図である。ここで、消去済ブロック検索用テーブル上のビットは、ゾーンを構成するブロックB0000〜B1023(物理ブロックアドレスの0000〜1023)に対応している。この対応関係については、消去済ブロック検索用テーブル上のビットを、上の行から下の行へ、各行を左から右へ物理ブロックアドレス順に対応させている。従って、消去済ブロック検索用テーブルの左上のビットが、B0000(物理ブロックアドレスの0000)のブロックに対応し、右下のビットが、B1023(物理ブロックアドレスの1023)のブロックに対応する。   FIG. 7A is a conceptual diagram conceptually showing the erased block search table of the zone shown in FIG. Here, the bits on the erased block search table correspond to blocks B0000 to B1023 (physical block addresses 0000 to 1023) constituting the zone. With respect to this correspondence, the bits on the erased block search table are associated with each other in the order of physical block addresses from the upper row to the lower row and from the left to the right. Therefore, the upper left bit of the erased block search table corresponds to the block B0000 (physical block address 0000), and the lower right bit corresponds to the block B1023 (physical block address 1023).

又、消去済ブロック検索用テーブル上のビットは、「0」と「1」で消去済ブロックで
あるか否かを示しており、例えば、データが書込まれている場合(又は不良ブロックであることを示すブロックステータスが記述されている場合)は、そのビットに「0」を、データが書込まれていない場合(消去済ブロックの場合)は、そのビットに「1」を設定する。尚、この消去済ブロック検索用テーブルは、アドレス変換テーブルを作成する際に一緒に作成することができる。例えば、消去済ブロック検索用テーブルを作成するSRAM上の領域に「0」を設定しておき、各ブロックの冗長領域に対応論理ブロックアドレスも不良ブロックであることを示すブロックステータスも記述されていないときに、そのブロックに対応するビットに「1」を設定するようにすれば、アドレス変換テーブルを作成する際に一緒に作成することができる。つまり、ゾーンを構成するブロックの冗長領域に記述されているデータを読出したときにこの処理を行なえば、消去済ブロックに対応するビットだけに「1」が設定され、消去済ブロックでないブロックに対応するビットは予め設定した「0」のままになる。
The bits on the erased block search table indicate whether the block is an erased block by “0” and “1”. For example, when data is written (or a defective block) Is set to “0” in the bit, and “1” is set in the bit when data is not written (in the case of an erased block). The erased block search table can be created together with the address conversion table. For example, “0” is set in the SRAM area for creating the erased block search table, and the corresponding logical block address is not described in the redundant area of each block and the block status indicating that it is a bad block is not described. Sometimes, if the bit corresponding to the block is set to “1”, the address conversion table can be created together. In other words, if this process is performed when the data described in the redundant area of the blocks constituting the zone is read out, only “1” is set to the bit corresponding to the erased block, and this corresponds to the block that is not the erased block. The bit to be maintained remains “0” set in advance.

又、この消去済ブロック検索用テーブルの更新については、消去済ブロックにデータを書込んだときに、そのブロックに対応するビットを「1」から「0」に変更し、データが書込まれているブロックをブロック消去したときに、そのブロックに対応するビットを「0」から「1」に変更する。   For updating the erased block search table, when data is written to the erased block, the bit corresponding to the block is changed from “1” to “0” and the data is written. When a block is erased, the bit corresponding to that block is changed from “0” to “1”.

又、本発明に係るフラッシュメモリシステムにおける処理では、フラッシュメモリにデータを書込む際に、書込み先のブロックをブロック消去し、その後、書込み処理を行なっている。従って、データの書替等により、以前に書込まれていたデータが無効になったブロックについては、無効になったときにブロック消去を行なわずに、そのデータが無効になったことを示すフラグ(以下、ユーザ領域に書込まれているデータが無効になったことを示すフラグを無効フラグという。)を、そのブロックの冗長領域に設定してもよい。尚、冗長領域に無効フラグが設定されているブロックは、上述のアドレス変換テーブルや消去済ブロック検索用テーブルを作成、更新する際に、データが書込まれていないブロックと同等に、つまり消去済ブロックと同等に扱う。   Further, in the processing in the flash memory system according to the present invention, when writing data to the flash memory, the write destination block is erased as a block, and then the write processing is performed. Therefore, for a block in which previously written data became invalid due to data rewriting, etc., a flag indicating that the data became invalid without performing block erase when invalidated (Hereinafter, a flag indicating that data written in the user area has become invalid may be referred to as an invalid flag) may be set in the redundant area of the block. A block with an invalid flag set in the redundant area is equivalent to a block in which no data has been written, that is, erased when creating or updating the above address conversion table or erased block search table. Treat as a block.

上記無効フラグを設定する方法としては、例えば、冗長領域の特定のビットを、ユーザ領域に書込まれているデータの有効、無効を示すビットとし、ユーザ領域に書込まれているデータが無効になったときに、そのビットを「1(消去状態)」から「0(書込状態)」に上書き処理する方法が挙げられる。   As a method of setting the invalid flag, for example, a specific bit in the redundant area is used as a bit indicating validity / invalidity of data written in the user area, and data written in the user area is invalidated. There is a method of overwriting the bit from “1 (erased state)” to “0 (written state)”.

次に、この消去済ブロック検索用テーブルを用いて消去済ブロック(又は冗長領域に無効フラグが設定されているブロック)を検索する場合について図7(b)を参照して説明する。この消去済ブロック(又は冗長領域に無効フラグが設定されているブロック)の検索では、ブロックB0000(物理ブロックアドレスの0000)に対応するビット(一番上の行の、一番左のビット)から、ブロックB1023(物理ブロックアドレスの1023)に対応するビット(一番下の行の、一番右のビット)までを走査していき、消去済ブロック(又は冗長領域に無効フラグが設定されているブロック)に対応する「1」のビットを検索する。尚、前記走査は、上の行から下の行へ、各行を左から右へ向かって行なわれる。   Next, a case where an erased block (or a block in which an invalid flag is set in the redundant area) is searched using this erased block search table will be described with reference to FIG. In the search for the erased block (or the block in which the invalid flag is set in the redundant area), the bit (the leftmost bit in the top row) corresponding to the block B0000 (physical block address 0000) is used. Scan up to the bit (the rightmost bit in the bottom row) corresponding to block B1023 (physical block address 1023), and an invalid flag is set in the erased block (or redundant area) The bit of “1” corresponding to the block) is searched. The scanning is performed from the upper row to the lower row and from the left to the right in each row.

図7(b)に示した消去済ブロック検索用テーブルで、一番上の行の、一番左のビットから走査を開始した場合、上から2番目の行の、左から3番目のビットが「1」なので、ここで検索を終了し、このビットに対応するブロックB0010(物理ブロックアドレスの0010)を、書込み候補ブロックとして候補テーブルに設定する。又、次回の検索は、上から2番目の行の、左から4番目のビットから走査を開始し、上から4番目の行の、左から5番目のビットが「1」なので、ここで検索を終了し、このビットに対応するブロックB0028(物理ブロックアドレスの0028)を、書込み候補ブロックとして候補テーブルに設定する。その後も、このような検索を続けていき、一番下の行の、一番右のビットまで走査が進んだときは、一番上の行の、一番左のビットに戻る。   In the erased block search table shown in FIG. 7B, when scanning is started from the leftmost bit in the top row, the third bit from the left in the second row from the top is Since it is “1”, the search is terminated here, and the block B0010 (physical block address 0010) corresponding to this bit is set as a write candidate block in the candidate table. In the next search, scanning starts from the fourth bit from the left in the second row from the top, and the fifth bit from the left in the fourth row from the top is “1”. And block B0028 (physical block address 0028) corresponding to this bit is set in the candidate table as a write candidate block. Thereafter, such a search is continued, and when the scanning proceeds to the rightmost bit in the bottom row, the processing returns to the leftmost bit in the top row.

[本発明に係る処理の説明]
本発明に係る処理を図8に示したフローチャートを参照して説明する。本発明に係るフラッシュメモリシステムでは、ブロック消去の際に消去したブロックの消去状態をチェックし、全てのビットが消去状態になっているか否かを示すステータス情報(以下、ブロック消去されブロックの全てのビットが、消去状態になっているか否かを示すステータス情報を消去ステータスという。)を生成する機能を備えたフラッシュメモリを用いて、フラッシュメモリシステムを構成している。
ステップ1:
候補テーブルに設定されているブロックに対して、消去処理を行なう。候補テーブルには、消去済ブロック又は冗長領域に無効フラグが設定されているブロックが設定されている。尚、消去済ブロックに対して消去処理を行なうのは、消去ステータスにより、そのブロックの全てのビットが、消去状態になっているかを確認するためである。又、候補テーブルに設定されているブロックに対して、消去処理を行なう場合、フラッシュメモリシーケンサブロックが有するレジスタに、以下のような消去処理の設定がなされる。
1)内部コマンドとして内部消去コマンドが、フラッシュメモリシーケンサブロック内の所定のレジスタに設定される。
2)候補テーブルに設定されているブロックの物理ブロックアドレスが、フラッシュメモリシ―ケンサブロック内の所定のレジスタに設定される。
[Description of processing according to the present invention]
The processing according to the present invention will be described with reference to the flowchart shown in FIG. In the flash memory system according to the present invention, the erased state of the erased block is checked at the time of block erase, and status information indicating whether all bits are in the erased state (hereinafter, all the blocks in the erased block are erased). Status information indicating whether or not a bit is in an erased state is called an erase status. A flash memory system is configured using a flash memory having a function of generating a bit.
Step 1:
An erasure process is performed on the block set in the candidate table. In the candidate table, an erased block or a block for which an invalid flag is set in the redundant area is set. The reason why the erase process is performed on the erased block is to confirm whether all bits of the block are in the erased state based on the erase status. Further, when the erase process is performed on the block set in the candidate table, the following erase process is set in the register of the flash memory sequencer block.
1) An internal erase command is set as an internal command in a predetermined register in the flash memory sequencer block.
2) The physical block address of the block set in the candidate table is set in a predetermined register in the flash memory sequencer block.

その後、上記消去処理の設定に基づいて、フラッシュメモリシーケンサブロックが処理を実行する。この処理が実行されると、フラッシュメモリインターフェースブロックから、内部バスを介してフラッシュメモリに内部消去コマンドを実行するためのコマンド情報やアドレス情報等が供給され、消去処理が完了するまでフラッシュメモリはビジー状態(処理を受付けない状態)になる。
ステップ2:
ブロック消去の完了後に、フラッシュメモリ内のレジスタに消去ステータスがセットされる。この消去ステータスを読出し、消去処理が行なわれたブロックの全てのビットが消去状態になっているか否かを判定する。この判定で正常な消去状態になっている(全てのビットが消去状態になっている)と判断された場合はステップ3に、正常な消去状態になっていないと判断された場合はステップ4に進む。
ステップ3:
ステップ1で消去処理が行なわれたブロックに対して書込み処理が行なわれる。この書込み処理では、フラッシュメモリシーケンサブロックが有するレジスタに、以下のような書込み処理の設定がなされる。
1)内部コマンドとして内部書込みコマンドが、フラッシュメモリシーケンサブロック内の所定のレジスタに設定される。
2)ステップ1で消去処理が行なわれたブロック内のページのアドレスが、フラッシュメモリシ―ケンサブロック内の所定のレジスタに設定される。ここで、上記ページのアドレスは、物理ブロックアドレスにページ番号に相当する5ビット(32のページを識別するためのビット)を付加することによって与えられる。
その後、上記書込み処理の設定に基づいて、フラッシュメモリシーケンサブロックが処理を実行する。この処理が実行されると、フラッシュメモリインターフェースブロックから、内部バスを介してフラッシュメモリに内部書込みコマンドを実行するためのコマンド情報やアドレス情報等が供給される。又、バッファに保持されている書込みデータも、内部バスを介してフラッシュメモリに供給され、ステップ1で消去処理が行なわれたブロック内のページに書込まれる。又、書込み処理の終了後に、データを書込んだブロックに対応する消去済ブロック検索用テーブル上のビットを「1」から「0」に変更する。
Thereafter, the flash memory sequencer block executes the process based on the setting of the erase process. When this process is executed, command information and address information for executing an internal erase command are supplied from the flash memory interface block to the flash memory via the internal bus, and the flash memory is busy until the erase process is completed. It becomes a state (a state where processing is not accepted).
Step 2:
After the block erase is completed, an erase status is set in a register in the flash memory. This erase status is read, and it is determined whether or not all the bits of the block subjected to the erase process are in the erased state. If it is determined by this determination that the normal erasure state is set (all bits are in the erasure state), the process goes to step 3. If it is determined that the normal erasure state is not set, the process goes to step 4. move on.
Step 3:
Write processing is performed on the block that has been erased in step 1. In this write process, the following write process is set in the register of the flash memory sequencer block.
1) An internal write command is set in a predetermined register in the flash memory sequencer block as an internal command.
2) The address of the page in the block that has been erased in step 1 is set in a predetermined register in the flash memory sequencer block. Here, the address of the page is given by adding 5 bits (bits for identifying 32 pages) corresponding to the page number to the physical block address.
Thereafter, the flash memory sequencer block executes processing based on the setting of the write processing. When this process is executed, command information and address information for executing an internal write command are supplied from the flash memory interface block to the flash memory via the internal bus. The write data held in the buffer is also supplied to the flash memory via the internal bus, and is written to the page in the block that has been erased in step 1. Further, after completion of the writing process, the bit on the erased block search table corresponding to the block in which the data is written is changed from “1” to “0”.

又、上記書込み処理で、ホストシステム側から供給された論理ブロックアドレスに対応する旧データが存在する場合は、上記新データの書込み処理の後に旧データが書込まれているブロック対して消去処理、又はそのブロックの冗長領域に無効フラグを設定する処理を行ない、続いて消去処理又は無効フラグを設定する処理を行なったブロックに対応する消去済ブロック検索用テーブル上のビットを「0」から「1」に変更する。
ステップ4:
消去済ブロック検索用テーブルを用いて、消去済ブロック又は冗長領域に無効フラグが設定されているブロックを検索し、候補テーブルに消去済ブロック又は冗長領域に無効フラグが設定されているブロックの物理ブロックアドレスを設定する。
In addition, if there is old data corresponding to the logical block address supplied from the host system side in the write process, an erase process is performed on the block in which the old data is written after the write process of the new data. Alternatively, the process of setting the invalid flag in the redundant area of the block is performed, and the bit on the erased block search table corresponding to the block for which the erase process or the process of setting the invalid flag is subsequently performed is changed from “0” to “1”. Change to
Step 4:
Use the erased block search table to search for an erased block or a block with an invalid flag set in a redundant area, and to search for a physical block of an erased block or an invalid flag set in a redundant area in the candidate table Set the address.

又、ステップ2で正常な消去状態になっていないと判断されたブロックについては、消去、書込み等を正常に行なうことができるかを診断し、その結果、不良ブロックであると判断された場合は、そのブロックの冗長領域に不良ブロックであることを示すフラグ(ブロックステータス)を設定し、更に、そのブロックに対応する消去済ブロック検索用テーブル上のビットを「1」から「0」に変更する。   In addition, for the block that is determined not to be in a normal erase state in step 2, it is diagnosed whether erasure, writing, etc. can be performed normally. Then, a flag (block status) indicating a defective block is set in the redundant area of the block, and the bit on the erased block search table corresponding to the block is changed from “1” to “0”. .

以上に述べたように、本発明では、消去済ブロックに対する読出し処理を行なわずに、ブロック消去の完了後に、フラッシュメモリ内のレジスタにセットされる消去ステータスに基づいて、全てのビットが消去状態になっているか否かを判定している。従って、消去済ブロックに対する読出し処理に基づいて、全てのビットが消去状態になっているか否かを判定する場合よりも、短い処理時間で信頼性の高いデータ書込みを行なうことができる。   As described above, according to the present invention, all the bits are set to the erased state based on the erase status set in the register in the flash memory after the block erase is completed without performing the read process on the erased block. It is determined whether or not. Therefore, it is possible to perform highly reliable data writing in a shorter processing time than in the case where it is determined whether or not all the bits are in the erased state based on the read processing for the erased block.

尚、今後、ブロックの記憶容量が増加した場合には、上記消去ステータスに基づいて判定を行なう処理は、より有効になる。但し、処理時間が問題にならない場合もあるので、ユーザーの要求(設定)により、上記消去ステータスに基づく判定と、上記消去済ブロックに対する読出し処理に基づく判定を選択できるようにしてもよい。   If the storage capacity of the block is increased in the future, the process of making a determination based on the erase status becomes more effective. However, since the processing time may not be a problem, a determination based on the erase status and a determination based on a read process for the erased block may be selected according to a user request (setting).

図1は、本発明に係るフラッシュメモリシステムを概略的に示すブロック図である。FIG. 1 is a block diagram schematically showing a flash memory system according to the present invention. 図2は、フラッシュメモリを構成するメモリセルの構造を概略的に示す断面図である。FIG. 2 is a cross-sectional view schematically showing the structure of the memory cell constituting the flash memory. 図3は、書込状態であるメモリセルを概略的に示す断面図である。FIG. 3 is a cross-sectional view schematically showing a memory cell in a written state. 図4は、フラッシュメモリのアドレス空間の構造を概略的に示す図である。FIG. 4 is a diagram schematically showing the structure of the address space of the flash memory. 図5は、1024のブロックでゾーンを構成した例を示す図である。FIG. 5 is a diagram showing an example in which a zone is composed of 1024 blocks. 図6は、アドレス変換テーブルの例を示した図である。FIG. 6 is a diagram illustrating an example of an address conversion table. 図7は、消去済ブロック検索用テーブルの例を示す概念図である。FIG. 7 is a conceptual diagram showing an example of an erased block search table. 図8は、本発明に係る処理を説明するためのフローチャートである。FIG. 8 is a flowchart for explaining the processing according to the present invention.

符号の説明Explanation of symbols

1 フラッシュメモリシステム
2、35、36 フラッシュメモリ
3 コントローラ
4 ホストコンピュータ
5 ホストインターフェース制御ブロック
6 マイクロプロセッサ
7 ホストインターフェースブロック
8 ワークエリア
9 バッファ
10 フラッシュメモリインターフェースブロック
11 ECCブロック
12 フラッシュメモリシーケンサブロック
13 外部バス
14 内部バス
16 メモリセル
17 P型半導体基板
18 ソース拡散領域
19 ドレイン拡散領域
20 トンネル酸化膜
21 フローティングゲート電極
22 絶縁膜
23 コントロールゲート電極
24 チャネル
25 ユーザ領域
26 冗長領域
1 Flash memory system 2, 35, 36 Flash memory 3 Controller 4 Host computer 5 Host interface control block 6 Microprocessor 7 Host interface block 8 Work area 9 Buffer 10 Flash memory interface block 11 ECC block 12 Flash memory sequencer block 13 External bus 14 Internal bus 16 Memory cell 17 P-type semiconductor substrate 18 Source diffusion region 19 Drain diffusion region 20 Tunnel oxide film 21 Floating gate electrode 22 Insulating film 23 Control gate electrode 24 Channel 25 User region 26 Redundant region

Claims (7)

フラッシュメモリにデータを書込む書込み手段と、
フラッシュメモリからデータを読出す読出し手段と、
フラッシュメモリに書込まれているデータを消去する消去手段と、
フラッシュメモリに書込まれているデータを消去したときにフラッシュメモリが生成する消去ステータスを取得するステータス取得手段と、を備え、
取得した前記消去ステータスが正常な消去状態に該当するときだけ、該消去ステータスに係る消去済ブロックに対するデータの書込みが開始されるように構成されていることを特徴とするメモリコントローラ。
A writing means for writing data to the flash memory;
Reading means for reading data from the flash memory;
Erasing means for erasing data written in the flash memory;
Status acquisition means for acquiring an erase status generated by the flash memory when data written to the flash memory is erased, and
A memory controller configured to start writing data to an erased block related to an erase status only when the acquired erase status corresponds to a normal erase state.
データの書込み先となるブロックの候補を設定する候補ブロック設定手段を備えることを特徴とする請求項1に記載のメモリコントローラ。 The memory controller according to claim 1, further comprising candidate block setting means for setting a block candidate as a data write destination. ブロックのユーザ領域に書込まれているデータが無効であることを示す無効フラグを、冗長領域に設定する無効フラグ設定手段を備え、前記候補ブロック設定手段が、冗長領域に前記無効フラグが設定されているブロックを、データの書込み先の候補に設定することを特徴とする請求項2に記載のメモリコントローラ。 An invalid flag setting means for setting an invalid flag indicating that the data written in the user area of the block is invalid is set in the redundant area, and the candidate block setting means sets the invalid flag in the redundant area. The memory controller according to claim 2, wherein the block is set as a data write destination candidate. 消去済ブロックに対する読出し処理に基づき、消去状態を診断する診断手段を備え、該診断手段と前記ステータス取得手段のいずれか一方の手段によって、正常な消去状態であると判断された消去済ブロックに対して、データの書込みが開始されるように構成されていることを特徴とする請求項1乃至3のいずれか1項に記載のメモリコントローラ。 Based on the read processing for the erased block, a diagnostic means for diagnosing the erased state is provided, and the erased block determined to be in the normal erased state by either one of the diagnostic means and the status acquisition means 4. The memory controller according to claim 1, wherein data writing is started. 5. 請求項1乃至4記載のいずれか1項記載のメモリコントローラと、前記消去ステータスを生成するステータス生成手段を有するフラッシュメモリと、を備えることを特徴とするフラッシュメモリシステム。 5. A flash memory system comprising: the memory controller according to claim 1; and a flash memory having status generation means for generating the erase status. フラッシュメモリにデータの書込みを行なうときに、データの書込み先となるブロックに対して消去処理を行ない、
前記消去処理の終了後にフラッシュメモリが生成する消去ステータスを取得し、
取得した前記消去ステータスが、正常な消去状態を示す情報であったときに、
前記消去処理が行なわれたブロックに対して、データの書込み処理を行なうことを特徴とするフラッシュメモリの制御方法。
When writing data to the flash memory, erase the block to which data is written,
Get the erase status generated by the flash memory after the erase process ends,
When the acquired erase status is information indicating a normal erase status,
A flash memory control method, comprising: performing a data write process on a block that has been erased.
消去済ブロック、又はブロックのユーザ領域に書込まれているデータが無効であることを示す無効フラグが冗長領域に設定されているブロックを、データの書込み先とすることを特徴とする請求項6に記載のフラッシュメモリの制御方法。 7. The data write destination is an erased block or a block in which an invalid flag indicating that data written in a user area of the block is invalid is set in a redundant area. The control method of the flash memory as described in 2.
JP2003376131A 2003-11-05 2003-11-05 MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD Expired - Lifetime JP4419525B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003376131A JP4419525B2 (en) 2003-11-05 2003-11-05 MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003376131A JP4419525B2 (en) 2003-11-05 2003-11-05 MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Publications (2)

Publication Number Publication Date
JP2005141418A true JP2005141418A (en) 2005-06-02
JP4419525B2 JP4419525B2 (en) 2010-02-24

Family

ID=34687298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003376131A Expired - Lifetime JP4419525B2 (en) 2003-11-05 2003-11-05 MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD

Country Status (1)

Country Link
JP (1) JP4419525B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007079269A (en) * 2005-09-15 2007-03-29 Ricoh Co Ltd Image forming apparatus, program, recording medium
JP2011227659A (en) * 2010-04-19 2011-11-10 Fujitsu Semiconductor Ltd Data writing method and system
CN112540882A (en) * 2019-09-23 2021-03-23 深圳宏芯宇电子股份有限公司 Flash memory device detection system and flash memory device detection method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007079269A (en) * 2005-09-15 2007-03-29 Ricoh Co Ltd Image forming apparatus, program, recording medium
JP2011227659A (en) * 2010-04-19 2011-11-10 Fujitsu Semiconductor Ltd Data writing method and system
US9142301B2 (en) 2010-04-19 2015-09-22 Cypress Semiconductor Corporation Data writing method and system
CN112540882A (en) * 2019-09-23 2021-03-23 深圳宏芯宇电子股份有限公司 Flash memory device detection system and flash memory device detection method

Also Published As

Publication number Publication date
JP4419525B2 (en) 2010-02-24

Similar Documents

Publication Publication Date Title
JP2647312B2 (en) Batch erase nonvolatile semiconductor memory device
US20050201177A1 (en) Nonvolatile memory apparatus
US7315870B2 (en) Memory controller, flash memory system, and method for recording data on flash memory
JP4236485B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4173410B2 (en) Memory controller and flash memory system including the memory controller
JP4433792B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4419525B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4661191B2 (en) Memory controller, flash memory system, and flash memory control method
JP2010128697A (en) Memory system
JP4461754B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4213053B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP2005316793A (en) Flash memory system and control method of flash memory
JP4194473B2 (en) Memory controller and flash memory system including the memory controller
JP4332108B2 (en) Memory controller, flash memory system, and flash memory control method
JP4251950B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4068594B2 (en) Flash memory controller, flash memory system, and flash memory control method
JP4203994B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4222879B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4177301B2 (en) Memory controller, flash memory system, and flash memory control method
JP2005339438A (en) Memory controller, flash memory system and control method of flash memory
JP4304167B2 (en) Memory controller, flash memory system, and flash memory control method
JP4561110B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM PROVIDED WITH MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
JP4282410B2 (en) Flash memory control circuit, and memory controller and flash memory system provided with the control circuit
JP2011243116A (en) Memory system and data transfer method therefor
JP2005276071A (en) Memory controller, flash memory system comprising the same, and control method of flash memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060818

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091020

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091110

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091123

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

Free format text: PAYMENT UNTIL: 20121211

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4419525

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121211

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131211

Year of fee payment: 4

EXPY Cancellation because of completion of term