JP5919834B2 - Semiconductor memory device - Google Patents

Semiconductor memory device Download PDF

Info

Publication number
JP5919834B2
JP5919834B2 JP2012008331A JP2012008331A JP5919834B2 JP 5919834 B2 JP5919834 B2 JP 5919834B2 JP 2012008331 A JP2012008331 A JP 2012008331A JP 2012008331 A JP2012008331 A JP 2012008331A JP 5919834 B2 JP5919834 B2 JP 5919834B2
Authority
JP
Japan
Prior art keywords
sector
level
complementary
cell mode
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2012008331A
Other languages
Japanese (ja)
Other versions
JP2013149313A (en
Inventor
邦範 川畑
邦範 川畑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor 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 Fujitsu Semiconductor Ltd filed Critical Fujitsu Semiconductor Ltd
Priority to JP2012008331A priority Critical patent/JP5919834B2/en
Publication of JP2013149313A publication Critical patent/JP2013149313A/en
Application granted granted Critical
Publication of JP5919834B2 publication Critical patent/JP5919834B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Read Only Memory (AREA)

Description

本発明は,半導体記憶装置に関する。   The present invention relates to a semiconductor memory device.

一般にフラッシュメモリにおいては,フローティングゲートに電子を注入する又はしない,すなわちプログラムする又はしないことにより,データをメモリセルに記憶する。反対に,フローティングゲートから電子を引き抜く,すなわち消去することによりメモリセルのデータを消去する。通常,メモリセルに1ビットのデータを記憶するフラッシュメモリでは,プログラムされたメモリセルの状態を“0”,消去されたメモリセルの状態を“1”にそれぞれ対応させており,“0”の状態ではメモリセルの閾値電圧は高電圧レベル,“1”の状態ではメモリセルの閾値電圧は低電圧レベルとなる。   Generally, in a flash memory, data is stored in a memory cell by injecting or not injecting electrons into the floating gate, that is, by programming or not. On the contrary, the data in the memory cell is erased by extracting electrons from the floating gate, that is, erasing. Normally, in a flash memory that stores 1-bit data in a memory cell, the state of the programmed memory cell is associated with “0” and the state of the erased memory cell is associated with “1”. In the state, the threshold voltage of the memory cell is at a high voltage level, and in the state “1”, the threshold voltage of the memory cell is at a low voltage level.

メモリセルからデータを読み出す時,プログラム状態の閾値電圧と消去状態の閾値電圧との中間電圧を閾値電圧に設定されたリファレンスセルの電流をリファレンス電流として,読み出しメモリセルのドレイン電流とリファレンス電流とを比較する。そして,読み出したメモリセルのドレイン電流がリファレンス電流よりも大きいか小さいかに応じて,データ“0”又は“1”の判定を行う。しかし,メモリセルの閾値電圧はある程度の広がりをもつ分布をもっているため,リファレンスセルとの閾値マージンを十分に確保できていないメモリセルが存在しており,正しくデータを読み出せないことがある。   When reading data from the memory cell, the drain current and reference current of the read memory cell are calculated using the current of the reference cell set to the threshold voltage as an intermediate voltage between the threshold voltage in the programmed state and the threshold voltage in the erased state. Compare. Then, data “0” or “1” is determined depending on whether the drain current of the read memory cell is larger or smaller than the reference current. However, since the threshold voltage of the memory cell has a distribution having a certain extent, there is a memory cell in which a sufficient threshold margin with the reference cell cannot be secured, and data may not be read correctly.

これに対処するため,特許文献2〜5では,一対のメモリセルに常に相補的に対となった正と負の論理状態を記憶する方式(以下,相補セルモードと呼ぶ。)が採用されている。相補セルモードで一対のメモリセルにデータを記憶することで,フラッシュメモリからデータを読み出す時,一方のメモリセルをリファレンスセルとして使用して十分な閾値マージンを確保することができる。   In order to cope with this, Patent Documents 2 to 5 adopt a method (hereinafter referred to as a complementary cell mode) in which positive and negative logic states that are always complementarily paired are stored in a pair of memory cells. Yes. By storing data in a pair of memory cells in the complementary cell mode, when reading data from the flash memory, a sufficient threshold margin can be ensured by using one of the memory cells as a reference cell.

特開2007−257109号公報JP 2007-257109 A 特開2005−92915号公報JP 2005-92915 A 特開2008−84426号公報JP 2008-84426 A 特開平6−236687号公報JP-A-6-236687 特開2005−141908号公報JP 2005-141908 A

特に,信頼性が要求されるデータに対しては,全てのメモリ領域を相補セルモードによりメモリセルへ記憶を行うことが有効である。しかし,一対のメモリセルで1ビットのデータを記憶するため,1つのメモリセルで1ビットのデータを記憶する従来の方式(以下,単相セルモードと呼ぶ。)と比較すると,使用可能な記憶容量が半分となってしまい大容量データの記憶には適さない。また,フラッシュメモリに記憶するデータは,データによって信頼性のレベルが異なり,必ずしも全てのデータを相補セルモードで記憶する必要が無く,信頼性のレベルが低いデータについては単相セルモードで記憶する方が良い場合もある。   In particular, for data that requires reliability, it is effective to store all memory areas in memory cells in the complementary cell mode. However, since 1-bit data is stored in a pair of memory cells, it can be used as compared with a conventional method (hereinafter referred to as single-phase cell mode) in which 1-bit data is stored in one memory cell. The capacity is halved and it is not suitable for storing large volumes of data. The data stored in the flash memory has different reliability levels depending on the data, and it is not always necessary to store all the data in the complementary cell mode, and data with a low reliability level is stored in the single-phase cell mode. Sometimes it is better.

そこで,本発明の目的は,信頼性が要求されるデータだけでなく大容量データにも対応した半導体記憶装置を提供することとする。   Accordingly, an object of the present invention is to provide a semiconductor memory device that supports not only data that requires reliability but also large-capacity data.

半導体記憶装置の第1の側面は,
複数のメモリセルをそれぞれ有する複数のセクタであって,各一対のセクタで複数のセクタグループを構成する複数のセクタと,
前記複数のセクタグループのそれぞれの動作として,1ビットのデータを1つの前記セクタの1つの前記メモリセルで記憶する単相セルモード又は前記1ビットのデータを前記セクタグループの一対のセクタにそれぞれ含まれる一対の前記メモリセルで相補データとして記憶する相補セルモードのいずれかの選択結果を出力するモード判定部と,
前記選択結果に基づいて,前記セクタグループを前記単相セルモード又は相補セルモードで動作させる動作制御部とを有する半導体記憶装置。
The first aspect of the semiconductor memory device is
A plurality of sectors each having a plurality of memory cells, each pair of sectors forming a plurality of sector groups,
As each operation of the plurality of sector groups, a single-phase cell mode in which 1-bit data is stored in one memory cell of one sector or the 1-bit data is included in a pair of sectors of the sector group, respectively. A mode determination unit that outputs a selection result of a complementary cell mode stored as complementary data in a pair of the memory cells;
A semiconductor memory device comprising: an operation control unit that operates the sector group in the single-phase cell mode or the complementary cell mode based on the selection result.

半導体記憶装置の第1の側面によれば,信頼性が要求されるデータだけでなく大容量データにも対応することができる。   According to the first aspect of the semiconductor memory device, not only data requiring reliability but also large-capacity data can be handled.

図1は,本実施の形態におけるフラッシュメモリのメモリセルアレイを示す図である。FIG. 1 is a diagram showing a memory cell array of a flash memory according to the present embodiment. 図2は,本実施の形態におけるフラッシュメモリの構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of the flash memory in the present embodiment. 図3は,第1の実施の形態における半導体記憶装置の書込み動作を示すフローチャート図である。FIG. 3 is a flowchart showing a write operation of the semiconductor memory device according to the first embodiment. 図4は,第1の実施の形態における下位セクタと上位セクタのセクタ状態を示す図である。FIG. 4 is a diagram showing sector states of the lower sector and the upper sector in the first embodiment. 図5は,第1の実施の形態における書込み方式の判定動作を示す図である。FIG. 5 is a diagram illustrating a write mode determination operation according to the first embodiment. 図6は,第1の実施の形態におけるフラッシュメモリの下位および上位セクタがともに一括消去状態であるときに,下位セクタ,上位セクタの順に書込み要求があった場合のフラグ信号の波形図である。FIG. 6 is a waveform diagram of a flag signal when a write request is made in the order of the lower sector and the upper sector when both the lower and upper sectors of the flash memory in the first embodiment are in the batch erase state. 図7は,第1の実施の形態におけるフラッシュメモリの下位および上位セクタがともに一括消去状態であるときに,下位セクタに書込み要求,一括消去要求が順にあった場合のフラグ信号の波形図である。FIG. 7 is a waveform diagram of a flag signal when a write request and a batch erase request are sequentially issued to the lower sector when both the lower and upper sectors of the flash memory in the first embodiment are in a batch erase state. . 図8は,第1の実施の形態における外部電源がオンされたときの各信号の立ち上がりを示す波形図である。FIG. 8 is a waveform diagram showing the rise of each signal when the external power supply in the first embodiment is turned on. 図9は,第1の実施の形態における内部ERSコマンドの生成を示すブロック図である。FIG. 9 is a block diagram showing generation of an internal ERS command in the first embodiment. 図10は,第1の実施の形態におけるフラッシュメモリの電源をオンしたときのフラグ信号及び内部フラグ信号の波形を示す波形図である。FIG. 10 is a waveform diagram showing waveforms of the flag signal and the internal flag signal when the flash memory is turned on in the first embodiment. 図11は,第1の実施の形態における反転データの一括消去動作実施判断のフローチャート図である。FIG. 11 is a flow chart for determining whether to execute the batch erase operation for inverted data in the first embodiment. 図12は,第1の実施の形態におけるセクタ制御回路(デコーダ)を示す図である。FIG. 12 is a diagram showing a sector control circuit (decoder) in the first embodiment. 図13は,第1の実施の形態におけるメモリセルアレイを示す図である。FIG. 13 is a diagram showing the memory cell array according to the first embodiment. 図14は,第1の実施の形態におけるリードパスを示す図である。FIG. 14 is a diagram showing a lead path in the first embodiment. 図15は,第1の実施の形態におけるプログラムパスを示す図である。FIG. 15 is a diagram showing a program path in the first embodiment. 図16は,第1の実施の形態におけるアンプ制御回路を示す図である。FIG. 16 is a diagram illustrating an amplifier control circuit according to the first embodiment. 図17は,第1の実施の形態におけるアンプ制御信号の真理値表を示す図である。FIG. 17 is a diagram illustrating a truth table of the amplifier control signal in the first embodiment. 図18は,第2の実施の形態における半導体記憶装置の動作を示すフローチャート図である。FIG. 18 is a flowchart showing the operation of the semiconductor memory device according to the second embodiment. 図19は,第2の実施の形態における下位セクタと上位セクタのセクタ状態を示す図である。FIG. 19 is a diagram illustrating sector states of the lower sector and the upper sector in the second embodiment. 図20は,第2の実施の形態における書込み方式の判定動作を示す図である。FIG. 20 is a diagram illustrating a write mode determination operation according to the second embodiment. 図21は,第2の実施の形態におけるフラッシュメモリの下位および上位セクタがともに一括消去状態であるときに,下位セクタ,上位セクタの順に書込み要求があった場合のフラグ信号の波形図である。FIG. 21 is a waveform diagram of a flag signal when a write request is made in the order of the lower sector and the upper sector when both the lower and upper sectors of the flash memory in the second embodiment are in the batch erase state. 図22は,第2の実施の形態における外部電源がオンされたときの各信号の立ち上がりを示す波形図である。FIG. 22 is a waveform diagram showing the rise of each signal when the external power supply in the second embodiment is turned on. 図23は,第2の実施の形態における内部ERSコマンドの生成を示すブロック図である。FIG. 23 is a block diagram illustrating generation of an internal ERS command according to the second embodiment. 図24は,第2の実施の形態におけるセクタ制御回路(デコーダ)を示す図である。FIG. 24 is a diagram showing a sector control circuit (decoder) in the second embodiment. 図25は,第2の実施の形態におけるリードパスを示す図である。FIG. 25 is a diagram showing a read path in the second embodiment. 図26は,第2の実施の形態におけるプログラムパスを示す図である。FIG. 26 is a diagram illustrating a program path in the second embodiment. 図27は,第2の実施の形態における上位セクタ向けのアンプ制御回路を示す図である。FIG. 27 is a diagram illustrating an amplifier control circuit for an upper sector in the second embodiment. 図28は,第2の実施の形態における下位セクタ向けのアンプ制御回路を示す図である。FIG. 28 is a diagram illustrating an amplifier control circuit for a lower sector in the second embodiment. 図29は,第2の実施の形態におけるアンプ制御信号の真理値表を示す図である。FIG. 29 is a diagram illustrating a truth table of amplifier control signals in the second embodiment.

以下,図面を用いて本発明の実施の形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は,本実施の形態におけるフラッシュメモリのメモリセルアレイを示す図である。   FIG. 1 is a diagram showing a memory cell array of a flash memory according to the present embodiment.

メモリセルアレイ10は,複数のメモリセルを有する8つのセクタSector0〜7と,2つのセクタを組分けした4つのセクタグループSG0〜3とを有する。また,セクタSector0〜7はそれぞれセクタ番号0〜7を有し,以下,セクタ番号0〜3を有するセクタSector0〜3を下位セクタ,セクタ番号4〜7を有するセクタSector4〜7を上位セクタと呼ぶこととする。そして,セクタグループSG0〜3は,セクタSector0,1,2,3とSector7,6,5,4をそれぞれ組み分けたものである。つまり,セクタグループSG0〜3は,下位セクタと上位セクタを組み分けたものである。   The memory cell array 10 has eight sectors Sector 0 to 7 having a plurality of memory cells and four sector groups SG0 to SG3 obtained by grouping two sectors. Sectors Sector 0 to 7 have sector numbers 0 to 7, respectively. Hereinafter, sectors Sector 0 to 3 having sector numbers 0 to 3 are referred to as lower sectors, and sectors Sector 4 to 7 having sector numbers 4 to 7 are referred to as upper sectors. I will do it. Sector groups SG0 to SG3 are formed by combining sectors Sector 0, 1, 2, and 3 and Sector 7, 6, 5, and 4, respectively. That is, the sector groups SG0 to SG3 are obtained by combining the lower sector and the upper sector.

データの書込み方式が単相セルモードの場合には,8つのセクタSector0〜7のうち,1つのセクタの1つのメモリセルを選択し,1ビットのデータを書込む。一方,相補セルモードの場合には,8つのセクタSector0〜7のうち1つのセクタの1つのメモリセルを選択すると,選択したメモリセルに1ビットのデータが書込まれるだけでなく,同じセクタグループ内にある他方のセクタの1つのメモリセルに対してその反転データが書込まれる。すなわち,相補セルモードでは,一対のセクタに相補データが書込まれる。   When the data writing method is the single-phase cell mode, one memory cell of one sector is selected from the eight sectors Sector 0 to 7, and 1-bit data is written. On the other hand, in the complementary cell mode, when one memory cell of one sector among the eight sectors Sector 0 to 7 is selected, not only 1-bit data is written to the selected memory cell but also the same sector group. The inverted data is written to one memory cell of the other sector in the memory. That is, in the complementary cell mode, complementary data is written in a pair of sectors.

また,メモリセルに書込んだデータを消去する場合には,セクタ単位でデータを一括消去する。具体的には,消去するデータを有するセクタを選択し,そのセクタ内にあるメモリセルの状態をすべてプログラム状態“0”にした後に,そのセクタ内にある全メモリセルのデータを消去してメモリセルの状態をすべて消去状態“1”にする。   In addition, when erasing data written in a memory cell, the data is erased collectively in sector units. Specifically, after selecting a sector having data to be erased and setting all the memory cells in the sector to the program state “0”, the data in all the memory cells in the sector is erased and the memory is erased. All the cell states are set to the erased state “1”.

なお,データの書込み,一括消去は,フラッシュメモリ10に対して外部からの書込みの要求,一括消去の要求があったときに行われる。さらに,データの書込みとは,データ“0”の書込みは消去状態“1”からプログラム状態“0”へプログラムすることであり,データ“1”の書込みは消去状態“1”のままにすることである。また,各要求で選択されたセクタの状態をそれぞれ書込み状態,一括消去状態と呼ぶこととする。   Note that data writing and batch erasure are performed when an external write request or batch erase request is made to the flash memory 10. Further, the data writing means that the data “0” is written from the erased state “1” to the programmed state “0”, and the data “1” is written in the erased state “1”. It is. In addition, the state of the sector selected by each request is called a write state and a batch erase state, respectively.

本実施の形態における半導体記憶装置は,このセクタの状態に基づいて単相セルモード又は相補セルモードのいずれかに判定して,データの書込みを行う。   The semiconductor memory device according to the present embodiment performs data writing by determining either the single-phase cell mode or the complementary cell mode based on the state of the sector.

図2は,本実施の形態におけるフラッシュメモリの構成を示すブロック図である。   FIG. 2 is a block diagram showing the configuration of the flash memory in the present embodiment.

コマンド生成回路201は,チップイネーブル信号CEXやライトイネーブル信号WEX等のコマンドを外部から供給され,メモリセルからのデータの読み出し,メモリセルへのデータの書込み若しくはセクタ内のメモリセルのデータの一括消去等の要求に応じて,読み出しコマンドRD,書込みコマンドPGM若しくは一括消去コマンドERS等のコマンド信号を出力する。   The command generation circuit 201 is supplied with commands such as a chip enable signal CEX and a write enable signal WEX from the outside, reads data from the memory cell, writes data to the memory cell, or batch erases the data in the memory cell in the sector. In response to such a request, a command signal such as a read command RD, a write command PGM, or a batch erase command ERS is output.

アドレス入力回路202は,外部アドレス信号FA00〜20を入力しアドレス選択回路210へアドレス信号ADを出力する。   Address input circuit 202 receives external address signals FA00-20 and outputs address signal AD to address selection circuit 210.

データ入出力回路203は,データ端子DIN00〜15を介して書込みデータDIを入力し,データ端子DO00〜15を介して読み出しデータDOを出力する。   The data input / output circuit 203 inputs the write data DI via the data terminals DIN00-15 and outputs the read data DO via the data terminals DO00-15.

動作制御回路208は,読み出しコマンドRD,書込みコマンドPGM,一括消去コマンドERS等のコマンド信号に応答して,読み出し動作や書込み動作,一括消去動作等を制御するメモリコア制御信号等のタイミング信号や,メモリセルに書込まれた反転データ等を消去する内部ERSコマンドを出力する。また,ベリファイ動作のためにデータ入出力回路203から入力データ,リードアンプ220から出力データDOを入力する。   The operation control circuit 208 is responsive to command signals such as a read command RD, a write command PGM, and a batch erase command ERS, and a timing signal such as a memory core control signal for controlling a read operation, a write operation, a batch erase operation, etc. An internal ERS command for erasing inverted data written in the memory cell is output. Further, input data is input from the data input / output circuit 203 and output data DO is input from the read amplifier 220 for the verify operation.

内部アドレス生成回路209は,動作制御回路208からのタイミング信号に応答してベリファイ動作用内部アドレス信号IAを生成する。   The internal address generation circuit 209 generates a verify operation internal address signal IA in response to the timing signal from the operation control circuit 208.

アドレス選択回路210は,アドレス信号ADおよび内部アドレス信号IAを入力し,ロウアドレス信号RAおよびコラムアドレス信号CAを出力する。   Address selection circuit 210 receives address signal AD and internal address signal IA, and outputs row address signal RA and column address signal CA.

セクタ状態メモリ206、セクタ状態メモリアクセス制御回路207およびフラグ信号生成回路211は、各セクタグループの動作方式(単相セルモード又は相補セルモード)を判定するモード判定部を構成している。   The sector state memory 206, the sector state memory access control circuit 207, and the flag signal generation circuit 211 constitute a mode determination unit that determines the operation mode (single-phase cell mode or complementary cell mode) of each sector group.

セクタ状態メモリ206は,各セクタのセクタ状態を記憶する不揮発性メモリである。つまり,メモリセルアレイのセクタに対して書込み要求が入力された書込み状態であるか,一括消去要求が入力された状態である一括消去状態であるかを識別するセクタ状態データを保持する。セクタ毎にセクタ状態メモリが設けられており,各セクタ状態メモリは対応するセクタのセクタ状態データに基づいて,それぞれセクタ状態信号を出力する。さらに,セクタ状態メモリ206は,各セクタグループの動作方式(単相セルモード又は相補セルモード)を記憶する。   The sector status memory 206 is a non-volatile memory that stores the sector status of each sector. That is, sector state data for identifying whether a write request is input to a sector of the memory cell array or a batch erase state in which a batch erase request is input is held. A sector status memory is provided for each sector, and each sector status memory outputs a sector status signal based on the sector status data of the corresponding sector. Further, the sector state memory 206 stores the operation mode (single-phase cell mode or complementary cell mode) of each sector group.

セクタ状態メモリアクセス制御回路207は,コマンド信号,ロウアドレス信号RA,コラムアドレス信号CA,タイミング信号,フラグ信号生成回路211が出力するフラグ信号twinsを入力し,セクタ状態メモリ206へのセクタ状態データの記憶動作を制御する。さらに,セクタ状態メモリアクセス制御回路207は,セクタ状態メモリ206が出力するセクタ状態信号に基づいて,各セクタグループの動作を単相セルモード又は相補セルモードに判定する。そして,セクタ状態メモリアクセス制御回路207は,その判定結果をセクタ状態メモリ206に記憶する。   The sector state memory access control circuit 207 receives the command signal, the row address signal RA, the column address signal CA, the timing signal, and the flag signal twins output from the flag signal generation circuit 211, and inputs the sector state data to the sector state memory 206. Controls memory operation. Further, the sector state memory access control circuit 207 determines the operation of each sector group to the single-phase cell mode or the complementary cell mode based on the sector state signal output from the sector state memory 206. Then, the sector state memory access control circuit 207 stores the determination result in the sector state memory 206.

内部電圧生成回路204は外部電源電圧に応じて,X制御回路213等のフラッシュメモリ内部の各回路で使用する複数種類の内部電源電圧を生成する。   The internal voltage generation circuit 204 generates a plurality of types of internal power supply voltages used in each circuit in the flash memory such as the X control circuit 213 according to the external power supply voltage.

パワーオンリセット回路205は,外部より電源VDDを供給されたことを検出し,パワーオンリセット信号PORを動作制御回路208,フラグ信号生成回路211に出力する。   The power-on reset circuit 205 detects that the power supply VDD is supplied from the outside, and outputs a power-on reset signal POR to the operation control circuit 208 and the flag signal generation circuit 211.

フラグ信号生成回路211は,セクタ状態メモリ206に記憶されている判定結果(単相セルモード又は相補セルモード)をセクタごとにラッチしてフラグ信号twinsを出力する。   The flag signal generation circuit 211 latches the determination result (single-phase cell mode or complementary cell mode) stored in the sector state memory 206 for each sector and outputs a flag signal twins.

メモリセルアレイ217は,行方向(水平方向)に延びる複数のワード線とソース線と,列方向(垂直方向)に延びる複数のグローバルビット線および複数のローカルビット線とを有する。なお,詳細な構成に関しては,図13にて後述する。   The memory cell array 217 includes a plurality of word lines and source lines extending in the row direction (horizontal direction), and a plurality of global bit lines and a plurality of local bit lines extending in the column direction (vertical direction). The detailed configuration will be described later with reference to FIG.

セクタ制御回路212、ライトアンプ219およびリードアンプ220はフラグ信号twinsに基づきメモリセルアレイ217の動作を制御する動作制御部である。   The sector control circuit 212, the write amplifier 219, and the read amplifier 220 are operation control units that control the operation of the memory cell array 217 based on the flag signal twins.

セクタ制御回路212は,フラグ信号twins,メモリコア制御信号,ロウアドレス信号RAおよびコラムアドレス信号CAに基づいて,データの読み出し,書込み又は一括消去等の対象となるセクタを選択する信号SSを出力する。   The sector control circuit 212 outputs a signal SS for selecting a sector to be read, written or batch erased based on the flag signal twins, the memory core control signal, the row address signal RA, and the column address signal CA. .

X制御回路213は,ロウアドレス信号RAをデコードし,メモリセルアレイのワード線の駆動信号WLSELと,ソース線の駆動信号SLSを出力する。   The X control circuit 213 decodes the row address signal RA and outputs a drive signal WLSEL for a word line and a drive signal SLS for a source line of the memory cell array.

Y制御回路214は,コラムアドレス信号CAをデコードし,ローカルビット線選択信号LBSELを出力する。   The Y control circuit 214 decodes the column address signal CA and outputs a local bit line selection signal LBSEL.

Y制御回路215は,コラムアドレス信号CAをデコードし,グローバルビット線選択信号YSELを出力する。   The Y control circuit 215 decodes the column address signal CA and outputs a global bit line selection signal YSEL.

アンプ制御回路216は,メモリコア制御信号,フラグ信号twinsおよびロウアドレス信号RA,書込みコマンドPGMに基づいて,上位セクタ選択信号USEL,下位セクタ選択信号LSEL,相補パス選択信号twin,参照セル選択信号/twin,相補出力制御信号/RAoutH,リードアンプイネーブル信号RAen,書込みコマンドPGM,書込みクロック信号/PGMCKを出力する。   Based on the memory core control signal, the flag signal twins, the row address signal RA, and the write command PGM, the amplifier control circuit 216 receives the upper sector selection signal USEL, the lower sector selection signal LSEL, the complementary path selection signal twin, the reference cell selection signal / Twin, complementary output control signal / RAoutH, read amplifier enable signal RAen, write command PGM, and write clock signal / PGMCK are output.

ライトアンプ219は,書込みデータDIを受け,書込みコマンドPGM,書込みクロック信号/PGMCK,上位セクタ選択信号USEL,下位セクタ選択信号LSEL,相補パス選択信号twin,参照セル選択信号/twinに基づき,メモリセルアレイに書込みデータを出力する。   The write amplifier 219 receives the write data DI, and based on the write command PGM, the write clock signal / PGMCK, the upper sector selection signal USEL, the lower sector selection signal LSEL, the complementary path selection signal twin, and the reference cell selection signal / twin, Write data to.

リードアンプ220は,上位セクタ選択信号USEL,下位セクタ選択信号LSEL,相補パス選択信号twin,参照セル選択信号/twin,相補出力制御信号/RAoutH,リードアンプイネーブル信号RAenに基づいて,読み出しデータDOを出力する。   The read amplifier 220 receives read data DO based on the upper sector selection signal USEL, the lower sector selection signal LSEL, the complementary path selection signal twin, the reference cell selection signal / twin, the complementary output control signal / RAoutH, and the read amplifier enable signal RAen. Output.

コラムスイッチ218は,グローバルビット線選択信号YSELに応答して,メモリセルアレイ217の所定のグローバルビット線を選択し,ライトアンプ219またはリードアンプ220に接続する。   The column switch 218 selects a predetermined global bit line in the memory cell array 217 in response to the global bit line selection signal YSEL and connects it to the write amplifier 219 or the read amplifier 220.

[第1の実施の形態]
第1の実施の形態では,使用するセクタの順番がセクタ番号の昇順となるようにアドレス入力回路202に外部アドレス信号FA00〜20が入力され,データ入出力回路203に書込みデータDIが入力され,各セクタに書込みデータDIが書込まれる。具体的には,まず,セクタSector0からセクタSector3まで相補セルモードで入力データの書込みが順に開始され,セクタSector0〜3に対応するすべての上位セクタSector7〜4に入力データの反転データが書込まれる。そして,引き続きデータの書込みが行われる場合には,セクタSector4から順にセクタSector7まで単相セルモードでデータが書込まれる。ただし,セクタSector4からデータの書込みが開始されるとき,上位セクタSector4〜7には下位セクタSector3〜0の反転データが書込まれているため,単相セルモードで書込みを開始する前に反転データの一括消去を行う。
[First Embodiment]
In the first embodiment, external address signals FA00 to 20 are input to the address input circuit 202 so that the sector order to be used is ascending order of sector numbers, and write data DI is input to the data input / output circuit 203. Write data DI is written in each sector. Specifically, first, the writing of input data is started sequentially from the sector Sector 0 to the sector Sector 3 in the complementary cell mode, and the inverted data of the input data is written to all the upper sectors Sector 7 to 4 corresponding to the sectors Sector 0 to 3 . When data is continuously written, data is written in the single-phase cell mode from the sector Sector 4 to the sector Sector 7 in order. However, when data writing is started from the sector Sector 4, since the inverted data of the lower sectors Sector 3 to 0 is written in the upper sectors Sector 4 to 7, the inverted data before starting writing in the single-phase cell mode. Perform batch erase.

図3は,第1の実施の形態における半導体記憶装置の書込み動作を示すフローチャート図である。   FIG. 3 is a flowchart showing a write operation of the semiconductor memory device according to the first embodiment.

出荷時のフラッシュメモリでは,全てのメモリセルの状態が消去状態(データ“1”)になっており,セクタ状態メモリ206の各セクタのセクタ状態データは一括消去状態となっている。以降,セクタグループの2つのセクタのセクタ状態データが一括消去状態となっていることを,初期状態と呼ぶこととする。   In the flash memory at the time of shipment, all the memory cells are in the erased state (data “1”), and the sector status data of each sector in the sector status memory 206 is in the batch erased state. Hereinafter, the fact that the sector state data of the two sectors of the sector group is in the batch erase state is referred to as an initial state.

全てのセクタグループが初期状態の場合にデータ入出力回路203に書込みデータDIが入力され,外部からの書込み要求に応答してコマンド生成回路201が書込みコマンドPGMを出力すると,外部アドレス信号FA00〜20に基づいてアドレス選択回路210で生成されたロウアドレス信号RAにより,セクタ制御回路212がセクタSector0を選択する(S301)。そして,セクタ状態メモリアクセス制御回路207はセクタSector0,7のセクタ状態データに基いて相補セルモードと判定し,セクタSector0には書込みデータDIが書込まれ,セクタSector7にはその反転データが書込まれる(S302)。この判定後,外部アドレス信号FA00〜20や書込みコマンドPGMに基づき,セクタ状態メモリ206に書込まれているセクタSector0のセクタ状態データは書込み状態となる。   When all the sector groups are in the initial state, the write data DI is input to the data input / output circuit 203, and when the command generation circuit 201 outputs the write command PGM in response to an external write request, the external address signals FA00 to 20 Based on the above, the sector control circuit 212 selects the sector Sector0 by the row address signal RA generated by the address selection circuit 210 (S301). Then, the sector state memory access control circuit 207 determines the complementary cell mode based on the sector state data of the sectors Sector 0 and 7, and the write data DI is written to the sector Sector 0 and the inverted data is written to the sector Sector 7. (S302). After this determination, based on the external address signals FA00 to FA20 and the write command PGM, the sector state data of the sector Sector0 written in the sector state memory 206 is in a write state.

次に,セクタSector0に空き容量が無くなり,さらに書込み要求に応答してコマンド生成回路201から書込みコマンドPGMが出力されると,アドレス入力回路202に入力された外部アドレス信号FA00−20に基づきセクタSector1のメモリセルが選択される(S303)。そして,セクタ状態メモリアクセス制御回路207はセクタSector1,6のセクタ状態データに基いて相補セルモードと判定し,セクタSector1には書込みデータDIが書込まれ,セクタSector6にはその反転データが書込まれる(S304)。この判定後,セクタSector1のセクタ状態データは書込み状態となる。以降,セクタSector3まで,同様にして書込みデータDIが順に書込まれる(S305〜S308)。   Next, when there is no free space in the sector Sector0 and the write command PGM is output from the command generation circuit 201 in response to the write request, the sector Sector1 is based on the external address signal FA00-20 input to the address input circuit 202. Are selected (S303). Then, the sector state memory access control circuit 207 determines the complementary cell mode based on the sector state data of the sectors Sector 1 and 6, and the write data DI is written to the sector Sector 1 and its inverted data is written to the sector Sector 6. (S304). After this determination, the sector state data of sector Sector1 is in a write state. Thereafter, the write data DI is sequentially written in the same manner up to the sector Sector 3 (S305 to S308).

このようにステップS308が終了したときには,セクタSector0−7にはすべて相補セルモードで書き込まれ,セクタSector0〜3にはデータDI,セクタSector4〜7にはその反転データが書込まれている。   Thus, when step S308 is completed, all sectors Sector0-7 are written in the complementary cell mode, sectors Sector0-3 are written with data DI, and sectors Sector4-7 are written with inverted data.

さらに書込みデータDIを書込む場合には,書込み要求に応答してコマンド生成回路201が書込みコマンドPGMを出力すると,アドレス入力回路202に入力された外部アドレス信号FA00−20に基づき,セクタSector4のメモリセルが選択される(S309)。そして,セクタSector3,4のセクタ状態データに基いてセクタ状態メモリアクセス制御回路207は単相セルモードと判定する。セクタ状態メモリアクセス制御回路207の判定結果に基づき,セクタSector4に対してコマンド生成回路201より書込みコマンドPGMが出力され, セクタSector4において消去状態“1”のメモリセルすべてをプログラム状態“0”にする書込みが行われる。そして,セクタSector4に対する内部ERSコマンドが動作制御回路207からメモリコア207に出力され,セクタSector4のすべてメモリセルがプログラム状態“0”から消去状態“1”にする一括消去が行われる。この後に,コマンド生成回路201が出力する書込みコマンドPGMに基づき,セクタSector4に対して単相セルモードで書込みデータDIが書込まれる(S310)。また,セクタ状態メモリアクセス制御回路207の判定後,セクタSector4のセクタ状態データは書込み状態となる。以降,セクタSector5〜7についても同様にして書込みデータDIが順に書込まれる(S311〜S316)。   Further, when writing the write data DI, when the command generation circuit 201 outputs the write command PGM in response to the write request, the memory of the sector Sector 4 is based on the external address signal FA00-20 input to the address input circuit 202. A cell is selected (S309). Then, the sector state memory access control circuit 207 determines the single-phase cell mode based on the sector state data of the sectors Sectors 3 and 4. Based on the determination result of the sector state memory access control circuit 207, the write command PGM is output from the command generation circuit 201 to the sector Sector4, and all the memory cells in the erased state “1” are set to the program state “0” in the sector Sector4. Writing is performed. Then, an internal ERS command for the sector Sector 4 is output from the operation control circuit 207 to the memory core 207, and all the memory cells in the sector Sector 4 are collectively erased from the program state “0” to the erase state “1”. Thereafter, write data DI is written in the sector Sector 4 in the single-phase cell mode based on the write command PGM output from the command generation circuit 201 (S310). In addition, after the determination by the sector state memory access control circuit 207, the sector state data of the sector Sector4 is in a write state. Thereafter, the write data DI is sequentially written in the same manner for the sectors Sectors 5 to 7 (S311 to S316).

このように第1の実施の形態では,セクタグループSG0のセクタSector0,7が最後に相補セルモードから単相セルモードに切り替わるため,信頼性の高いデータについてはセクタSector0に優先して書込んでおくことが有効である。   As described above, in the first embodiment, the sectors Sector0 and Sector7 of the sector group SG0 are finally switched from the complementary cell mode to the single-phase cell mode. Therefore, high-reliability data is written with priority over the sector Sector0. It is effective to leave

前述のとおり,相補セルモードもしくは単相セルモードの判定を行うのはセクタ状態メモリアクセス制御回路207である。セクタ状態メモリアクセス制御回路207は,2つのセクタのセクタ状態信号の論理レベルに基づき相補セルモードもしくは単相セルモードを判定している。なお,セクタ状態信号は,セクタ状態データが書込み状態のときHレベルであり,一括消去状態のときLレベルである。一方,第1の実施の形態では,入力されたアドレスに該当するセクタ番号が昇順,つまりセクタ番号が0,1,・・・,6,7となるように外部アドレス信号FA00〜20が入力され書込みデータDIが入力されると,まず相補セルモードで書込みデータDIが書込まれる。そして,セクタSector3への書込みが終わると,セクタSector4からは単相セルモードに切り替わり,書込みデータDIが書込まれる。そのため,第1の実施の形態では,このようにして書込みデータDIの書込みが行われることを前提として,セクタ状態メモリアクセス制御回路207は,下位セクタおよび上位セクタのセクタ状態信号がLレベルであるときに下位セクタに対して書込みコマンドPGMがあった場合にのみ,相補セルモードと判定する。   As described above, the sector state memory access control circuit 207 determines the complementary cell mode or the single-phase cell mode. The sector state memory access control circuit 207 determines the complementary cell mode or the single-phase cell mode based on the logic levels of the sector state signals of the two sectors. The sector status signal is at the H level when the sector status data is in the write state and at the L level when in the batch erase state. On the other hand, in the first embodiment, external address signals FA00-20 are input so that the sector numbers corresponding to the input addresses are in ascending order, that is, the sector numbers are 0, 1,. When the write data DI is input, the write data DI is first written in the complementary cell mode. When the writing to the sector Sector 3 is completed, the sector Sector 4 is switched to the single-phase cell mode, and the write data DI is written. Therefore, in the first embodiment, on the assumption that the write data DI is written in this way, the sector status memory access control circuit 207 has the sector status signals of the lower sector and the upper sector at the L level. Only when there is a write command PGM for the lower sector, the complementary cell mode is determined.

そこで次に図4を用いて,1つのセクタグループの下位セクタと上位セクタ(例えばセクタグループSG0の下位セクタSector0,上位セクタSector7)における,セクタ状態メモリアクセス制御回路207の判定結果の遷移について説明する。   Therefore, the transition of the determination result of the sector state memory access control circuit 207 in the lower sector and the upper sector of one sector group (for example, the lower sector Sector0 and the upper sector Sector7 of the sector group SG0) will be described with reference to FIG. .

図4は,第1の実施の形態における下位セクタと上位セクタのセクタ状態を示す図である。具体的には,図4は,1つのセクタグループ内にある下位セクタと上位セクタそれぞれに対して書込み要求または一括消去要求があった場合における,セクタ状態信号の論理レベルと,セクタ状態メモリアクセス制御回路207の判定結果に基づきフラグ信号生成回路211から出力されるフラグ信号twinsの論理レベルとをあらわしている。なお,フラグ信号twinsがHレベルのときは判定結果が相補セルモードであることを意味し,Lレベルのときは判定結果が単相セルモードであることを意味する。   FIG. 4 is a diagram showing sector states of the lower sector and the upper sector in the first embodiment. Specifically, FIG. 4 shows the logical level of the sector status signal and the sector status memory access control when there is a write request or batch erase request for each of the lower sector and the upper sector in one sector group. The logic level of the flag signal twins output from the flag signal generation circuit 211 based on the determination result of the circuit 207 is shown. When the flag signal twins is at the H level, it means that the determination result is the complementary cell mode, and when it is at the L level, it means that the determination result is in the single-phase cell mode.

図4では,初期状態を起点とする(S401)。初期状態では,各セクタの全メモリセルの状態が消去状態“1”つまり一括消去状態であるため,下位セクタおよび上位セクタのセクタ状態メモリはともにLレベルのセクタ状態信号を出力する。この状態では,セクタ状態メモリアクセス制御回路207は単相セルモードと判定してセクタ状態メモリ206に判定結果を記憶し,フラグ信号生成回路211はLレベルのフラグ信号twinsを出力する。   In FIG. 4, the initial state is the starting point (S401). In the initial state, since the state of all the memory cells in each sector is the erased state “1”, that is, the batch erased state, both the sector status memories of the lower sector and the upper sector output an L level sector status signal. In this state, the sector state memory access control circuit 207 determines the single-phase cell mode, stores the determination result in the sector state memory 206, and the flag signal generation circuit 211 outputs the L level flag signal twins.

ステップS401の状態から,下位セクタに対して書込みコマンドPGMを生成した場合(S402),下位セクタのセクタ状態データは一括消去状態から書込み状態になり,下位セクタのセクタ状態メモリからはHレベルのセクタ状態信号が出力される。このように,下位セクタのセクタ状態信号がLレベルからHレベルに切り替わり,上位セクタのセクタ状態信号はLレベルのままである場合は,セクタ状態メモリアクセス制御回路207は相補セルモードと判定してセクタ状態メモリ206に判定結果を記憶し,フラグ信号生成回路211はHレベルのフラグ信号twinsを出力する。   When the write command PGM is generated for the lower sector from the state of step S401 (S402), the sector status data of the lower sector is changed from the batch erase state to the write state, and the sector status memory of the lower sector is set to the H level sector. A status signal is output. As described above, when the sector status signal of the lower sector is switched from the L level to the H level and the sector status signal of the upper sector remains at the L level, the sector status memory access control circuit 207 determines the complementary cell mode. The determination result is stored in the sector state memory 206, and the flag signal generation circuit 211 outputs an H level flag signal twins.

ステップS402の状態から上位セクタに対して書込みコマンドPGMが生成された場合(S403),上位セクタのセクタ状態データは一括消去状態から書込み状態になり,上位セクタのセクタ状態メモリからはHレベルのセクタ状態信号が出力される。このように,下位セクタがHレベル,上位セクタがHレベルの状態から,下位セクタ,上位セクタともにセクタ状態信号がHレベルになる場合は,セクタ状態メモリアクセス制御回路207は単相セルモードと判定してセクタ状態メモリ206に判定結果を記憶し,フラグ信号生成回路211はLレベルのフラグ信号twinsを出力する。   When the write command PGM is generated for the upper sector from the state of step S402 (S403), the sector state data of the upper sector changes from the batch erase state to the write state, and the sector status memory of the upper sector A status signal is output. As described above, when the lower sector and the upper sector are in the H level from the state in which the lower sector is at the H level and the sector status signal is at the H level, the sector state memory access control circuit 207 determines that the single-phase cell mode is set. Then, the determination result is stored in the sector state memory 206, and the flag signal generation circuit 211 outputs an L level flag signal twins.

ステップS403の状態から下位セクタに対して一括消去コマンドERSが生成された場合(S404),下位セクタのセクタ状態データは書込み状態から一括消去状態になり,下位セクタのセクタ状態メモリのセクタ状態信号はLレベルとなる。この場合には,セクタ状態メモリアクセス制御回路207は単相セルモードと判定し,出力されるフラグ信号twinsはLレベルのままである。   When the batch erase command ERS is generated for the lower sector from the state of step S403 (S404), the sector status data of the lower sector changes from the write state to the batch erase state, and the sector status signal of the sector status memory of the lower sector becomes L level. In this case, the sector state memory access control circuit 207 determines the single-phase cell mode, and the output flag signal twins remains at the L level.

ステップS404の状態から下位セクタに対して書込みコマンドPGMが生成された場合(S405),下位セクタのセクタ状態データは一括消去状態から書込み状態になり,下位セクタのセクタ状態メモリのセクタ状態信号はHレベルとなる。この場合は,セクタ状態メモリアクセス制御回路207は単相セルモードと判定し,出力されるフラグ信号twinsはLレベルのままである。   When the write command PGM is generated for the lower sector from the state of step S404 (S405), the sector status data of the lower sector is changed from the batch erase state to the write state, and the sector status signal of the sector status memory of the lower sector is H. Become a level. In this case, the sector state memory access control circuit 207 determines that the mode is the single-phase cell mode, and the output flag signal twins remains at the L level.

ステップS405の状態から上位セクタに対して一括消去コマンドが生成された場合(S406),上位セクタのセクタ状態データは書込み状態から一括消去状態になり,上位セクタのセクタ状態メモリのセクタ状態信号はLレベルとなる。この場合には,セクタ状態メモリアクセス制御回路207は単相セルモードと判定し,出力されるフラグ信号twinsはLレベルのままである。   When the batch erase command is generated for the upper sector from the state of step S405 (S406), the sector status data of the upper sector changes from the write state to the batch erase state, and the sector status signal of the sector status memory of the upper sector is L Become a level. In this case, the sector state memory access control circuit 207 determines the single-phase cell mode, and the output flag signal twins remains at the L level.

ステップS406の状態から下位セクタに一括消去コマンドが生成された場合(S407),下位セクタのセクタ状態は書込み状態から一括消去状態になり,下位セクタのセクタ状態メモリのセクタ状態信号はLレベルとなる。この場合には,下位セクタと上位セクタのセクタ状態データは初期状態と同じになりセクタ状態メモリアクセス制御回路207は単相セルモードと判定し,出力されるフラグ信号twinsはLレベルのままである。   When the batch erase command is generated in the lower sector from the state of step S406 (S407), the sector state of the lower sector changes from the write state to the batch erase state, and the sector status signal of the sector status memory of the lower sector becomes L level. . In this case, the sector state data of the lower sector and the upper sector are the same as the initial state, the sector state memory access control circuit 207 determines that the single-phase cell mode, and the output flag signal twins remains at the L level. .

ステップS407の状態から今度は上位セクタ,下位セクタに対して順に書込みコマンドが生成された場合(S408,S409),上位セクタ,下位セクタのセクタ状態データは順に一括消去状態から書込み状態になる。そして,上位セクタ,下位セクタのセクタ状態メモリのセクタ状態信号は順にHレベルとなる。S408,S409いずれにおいても,セクタ状態メモリアクセス制御回路207は単相セルモードと判定し,出力されるフラグ信号twinsはLレベルのままである。   If a write command is generated for the upper sector and the lower sector in this order from the state of step S407 (S408, S409), the sector status data of the upper sector and the lower sector changes from the batch erase state to the write state in order. Then, the sector status signals in the sector status memories of the upper sector and the lower sector sequentially become H level. In both S408 and S409, the sector state memory access control circuit 207 determines the single-phase cell mode, and the output flag signal twins remains at the L level.

ステップS409の状態から上位セクタ,下位セクタに対して順に一括消去コマンドが生成された場合(S410,S411),上位セクタ,下位セクタのセクタ状態は順に一括消去状態から書込み状態になり,上位セクタ,下位セクタのセクタ状態メモリのセクタ状態信号は順にHレベルとなる。S410,S411いずれにおいても,セクタ状態メモリアクセス制御回路207は単相セルモードと判定し,出力されるフラグ信号twinsはLレベルのままである。なお,S411により下位セクタ,上位セクタのセクタ状態メモリは初期状態となる。   When the batch erase command is generated in order for the upper sector and the lower sector from the state of step S409 (S410, S411), the sector status of the upper sector and the lower sector changes from the batch erase state to the write state in order, The sector status signal in the sector status memory of the lower sector sequentially becomes H level. In both S410 and S411, the sector state memory access control circuit 207 determines the single-phase cell mode, and the output flag signal twins remains at the L level. Note that the sector status memories of the lower sector and the upper sector are initialized by S411.

ステップS411の状態から,下位セクタに書込みコマンドが生成された場合(S412),S402と同様,セクタ状態メモリアクセス制御回路207は相補セルモードと判定してセクタ状態メモリ206に判定結果を記憶し,フラグ信号生成回路211はHレベルのフラグ信号twinsを出力する。   When a write command is generated in the lower sector from the state of step S411 (S412), similarly to S402, the sector state memory access control circuit 207 determines the complementary cell mode and stores the determination result in the sector state memory 206. The flag signal generation circuit 211 outputs an H level flag signal twins.

ステップS412の状態から上位セクタに一括消去コマンドが生成された場合(S413)は,実際には反転データが書込まれているが,見かけ上何も書込みデータDIが書込まれていない上位セクタに対して一括消去が行われようとする場合である。ステップS412の状態では,信頼性の高いデータが書込まれる相補セルモードで下位および上位セクタに書込みが行われたため,書込みデータDIが書込まれていない上位セクタに対して一括消去コマンドが生成されても相補セルモードが維持される必要がある。そこで,ステップS413では,コマンド生成回路201で一括消去コマンドERSが生成されても,ステップS412でフラグ信号twinsがHレベルであることを検出した動作制御回路208がメモリコア221に対して一括消去動作を行わず,上位セクタに書込まれている反転データを維持する。そして,上位セクタのセクタ状態データは一括消去状態を維持する。したがって,フラグ信号生成回路211が出力するフラグ信号twinsはHレベルのままである。   When a batch erase command is generated in the upper sector from the state of step S412 (S413), inversion data is actually written, but apparently no write data DI is written to the upper sector. This is a case where batch erasure is about to be performed. In the state of step S412, since data is written to the lower and upper sectors in the complementary cell mode in which highly reliable data is written, a batch erase command is generated for the upper sector where the write data DI is not written. However, the complementary cell mode needs to be maintained. Therefore, in step S413, the operation control circuit 208, which detects that the flag signal twins is at the H level in step S412 even when the command generation circuit 201 generates the batch erase command ERS, performs the batch erase operation on the memory core 221. The inverted data written in the upper sector is maintained. The sector status data of the upper sector is maintained in the batch erase state. Therefore, the flag signal twins output from the flag signal generation circuit 211 remains at the H level.

ステップS413の状態から下位セクタに一括消去コマンドが生成された場合(S414),下位セクタのセクタ状態データは書込み状態から一括消去状態になり,下位セクタのセクタ状態メモリのセクタ状態信号はLレベルとなる。この場合,セクタ状態メモリアクセス制御回路207は単相セルモードと判定してセクタ状態メモリ206に判定結果を記憶し,フラグ信号生成回路211はLレベルのフラグ信号twinsを出力する。   When the batch erase command is generated in the lower sector from the state of step S413 (S414), the sector status data of the lower sector changes from the write state to the batch erase state, and the sector status signal of the sector status memory of the lower sector becomes L level. Become. In this case, the sector state memory access control circuit 207 determines the single-phase cell mode, stores the determination result in the sector state memory 206, and the flag signal generation circuit 211 outputs the L level flag signal twins.

このように,下位および上位セクタのセクタ状態データが両方ともLレベルのときに,下位セクタに対して書込みコマンドPGMがあった場合のみ,セクタ状態メモリアクセス制御回路207は相補セルモードと判定する。さらに,相補セルモードのときに上位セクタに対して一括消去コマンドERSがあった場合,上位セクタのセクタ状態データは一括消去状態を維持するので,セクタ状態メモリアクセス制御回路207の判定結果は相補セルモードのままである。そして,セクタ番号の昇順に書込みが行われ,最下位のセクタは最上位のセクタに書込みが行われるまでは,相補セルモードでデータを記憶するので,最下位のセクタは記憶データの信頼性を高くすることができる。   Thus, when both the lower and upper sector sector status data are at the L level, the sector status memory access control circuit 207 determines that the complementary cell mode is used only when the write command PGM is issued for the lower sector. Further, if the batch erase command ERS is issued for the upper sector in the complementary cell mode, the sector status data of the upper sector maintains the batch erase state, so the judgment result of the sector state memory access control circuit 207 is the complementary cell. Remain in mode. Then, data is written in ascending order of sector numbers, and the lowest sector stores data in the complementary cell mode until the highest sector is written. Therefore, the lowest sector ensures the reliability of stored data. Can be high.

図5は第1の実施の形態における書込み方式の判定動作を示す図である。図5は,セクタ状態メモリアクセス制御回路207と,下位セクタ状態メモリ501と上位セクタ状態メモリ502と下位セクタ単相相補メモリ504を有するセクタ状態メモリ206と,フラグ信号生成回路211とを示している。セクタ状態メモリ206とフラグ信号生成回路211とは,セクタグループごとに設けられる。   FIG. 5 is a diagram showing the determination operation of the write method in the first embodiment. FIG. 5 shows a sector state memory access control circuit 207, a lower sector state memory 501, an upper sector state memory 502, a sector state memory 206 having a lower sector single-phase complementary memory 504, and a flag signal generation circuit 211. . The sector state memory 206 and the flag signal generation circuit 211 are provided for each sector group.

下位セクタ状態メモリ501は,下位セクタSector0〜3のいずれかのセクタのセクタ状態メモリであり,上位セクタ状態メモリ502は下位セクタ状態メモリ501の下位セクタと同じセクタグループ内の上位セクタのセクタ状態メモリである。両セクタ状態メモリ501,502のセクタ状態データは,書込みコマンドPGMと一括消去コマンドERSに応答して,それぞれの状態に書き換えられる。また,下位セクタ状態メモリ501から出力されるセクタ状態信号c1outLと,上位セクタ状態メモリ502から出力されるセクタ状態信号c1outUとは,セクタ状態メモリアクセス制御回路207に供給される。さらに,NORゲート503を介して,セクタ状態信号c1outLとc1outUとの否定論理和である単相相補メモリ用のプログラムイネーブル信号c2PGMenがセクタ状態メモリアクセス制御回路207に供給される。   The lower sector state memory 501 is a sector state memory of any one of the lower sectors Sector 0 to 3, and the upper sector state memory 502 is a sector state memory of an upper sector in the same sector group as the lower sector of the lower sector state memory 501. It is. The sector state data in both sector state memories 501 and 502 are rewritten to the respective states in response to the write command PGM and the batch erase command ERS. The sector state signal c1outL output from the lower sector state memory 501 and the sector state signal c1outU output from the upper sector state memory 502 are supplied to the sector state memory access control circuit 207. Further, a program enable signal c2PGmen for single-phase complementary memory, which is a negative OR of the sector status signals c1outL and c1outU, is supplied to the sector status memory access control circuit 207 via the NOR gate 503.

下位セクタ単相相補メモリ504は,動作制御回路208からアドレス信号ADと書込みコマンドPGM一括消去コマンドERSが供給されたときに,下位セクタ状態メモリ501と上位セクタ状態メモリ502のセクタ状態データに基づいて,単相セルモード又は相補セルモードの判定結果を示す単相相補判定データを格納するメモリであり,Hレベル(相補セルモード)又はLレベル(単相セルモード)の単相相補判定信号c2outLを出力する。   The lower sector single-phase complementary memory 504 is based on the sector state data of the lower sector state memory 501 and the upper sector state memory 502 when the address signal AD and the write command PGM batch erase command ERS are supplied from the operation control circuit 208. , A memory for storing single-phase complementary determination data indicating a determination result of the single-phase cell mode or the complementary cell mode, and a single-phase complementary determination signal c2outL of H level (complementary cell mode) or L level (single-phase cell mode) Output.

例えば,初期状態(セクタ状態信号c1outL,c1outUがともにLレベル(一括消去状態)),すなわちプログラムイネーブル信号c2PGMenがHレベルのときに,下位セクタに対して書込みコマンドPGMが生成されると,セクタ状態メモリアクセス制御回路207は下位セクタ単相相補メモリ504の単相相補判定データをLレベル(単相セルモード)からHレベル(相補セルモード)にする。また,セクタ状態信号c1outLは,書込みコマンドPGMに応答して,Hレベル(書込み状態)になる。この状態からさらに,下位セクタに対して一括消去コマンドERSが生成された場合,又は上位セクタに対して書込みコマンドPGMが生成された場合のいずれかの場合に,セクタ状態メモリアクセス制御回路207は,下位セクタ単相相補メモリ504の単相相補判定データをHレベル(相補セルモード)からLレベル(単相セルモード)になる。   For example, when the write command PGM is generated for the lower sector in the initial state (sector state signals c1outL and c1outU are both at L level (batch erase state)), that is, the program enable signal c2PGMan is at H level, The memory access control circuit 207 changes the single-phase complementary determination data of the lower sector single-phase complementary memory 504 from the L level (single-phase cell mode) to the H level (complementary cell mode). The sector state signal c1outL becomes H level (write state) in response to the write command PGM. From this state, when either the batch erase command ERS is generated for the lower sector or the write command PGM is generated for the upper sector, the sector state memory access control circuit 207 The single-phase complementary determination data in the lower sector single-phase complementary memory 504 is changed from H level (complementary cell mode) to L level (single-phase cell mode).

フラグ信号生成回路211は,下位セクタ単相相補メモリ504の単相相補判定信号c2outLをコントロールクロック信号ControlCLKの立ち上がりに応答して,ラッチ回路504でラッチして,フラグ信号twinsを出力する。下位セクタ単相相補メモリ504の単相相補判定データはHレベル(相補セルモード)であれば,フラグ信号はtwinsはHレベル(相補セルモード)となり,単相相補判定データはLレベル(単相セルモード)であればフラグ信号はtwinsはLレベル(単相セルモード)となる。   The flag signal generation circuit 211 latches the single-phase complementary determination signal c2outL of the lower sector single-phase complementary memory 504 by the latch circuit 504 in response to the rising edge of the control clock signal ControlCLK, and outputs the flag signal twins. If the single-phase complementary determination data in the lower sector single-phase complementary memory 504 is H level (complementary cell mode), the flag signal twins is H level (complementary cell mode), and the single-phase complementary determination data is L level (single-phase (Cell mode), the flag signal twins is at L level (single-phase cell mode).

フラグ信号twinsはセクタグループごとに出力される。そこで,セクタグループSG0のセクタSector0に対するセクタSector7の書込み方式を決めるフラグ信号について説明する場合,フラグ信号はtwins<7>と表記されることとする。同様にして,セクタグループSG1では,セクタSector1に対するセクタSector6の書込み方式を決めるフラグ信号はtwins<6>,セクタグループSG2では,セクタSector2に対するセクタSector5の書込み方式を決めるフラグ信号はtwins<5>,セクタグループSG3では,セクタSector3に対するセクタSector4の書込み方式を決めるフラグ信号はtwins<4>と表記されることとする。   The flag signal twins is output for each sector group. Therefore, when the flag signal that determines the writing method of the sector Sector 7 to the sector Sector 0 of the sector group SG0 is described, the flag signal is expressed as twins <7>. Similarly, in the sector group SG1, the flag signal that determines the writing method of the sector Sector6 for the sector Sector1 is twins <6>, and in the sector group SG2, the flag signal that determines the writing method of the sector Sector5 for the sector Sector2 is twins <5>, In the sector group SG3, the flag signal for determining the writing method of the sector Sector 4 with respect to the sector Sector 3 is expressed as twins <4>.

なお,コントロールクロック信号ControlCLKは,コマンド生成回路201で生成される書込みコマンドPGMと一括消去コマンドERSとの論理和をとったOR信号に応答して,動作制御回路208で生成される。また,ラッチ回路504は,パワーオンリセット回路205から出力され外部電源VDDの起動中にHレベルとなるパワーオンリセット信号PORに応答して,リセットされる。   The control clock signal ControlCLK is generated by the operation control circuit 208 in response to an OR signal obtained by ORing the write command PGM and the batch erase command ERS generated by the command generation circuit 201. The latch circuit 504 is reset in response to a power-on reset signal POR that is output from the power-on reset circuit 205 and becomes H level during activation of the external power supply VDD.

図6は第1の実施の形態におけるフラッシュメモリの下位および上位セクタがともに一括消去状態であるときに,下位セクタ,上位セクタの順に書込み要求があった場合のフラグ信号の波形図である。図6では,同じセクタグループ内の下位セクタ,上位セクタの順に時間T0,T1で書込みコマンドPGMを生成した後に,下位セクタ,上位セクタの順に時間T2,T3で一括消去コマンドERSを生成し,時間T4,T5で再び下位セクタ,上位セクタの順に書込みコマンドPGMを生成している。   FIG. 6 is a waveform diagram of a flag signal when a write request is made in the order of the lower sector and the upper sector when both the lower and upper sectors of the flash memory in the first embodiment are in the batch erase state. In FIG. 6, after the write command PGM is generated at the times T0 and T1 in the order of the lower sector and the upper sector in the same sector group, the batch erase command ERS is generated at the times T2 and T3 in the order of the lower sector and the upper sector. At T4 and T5, the write command PGM is generated again in the order of the lower sector and the upper sector.

時間T0の下位セクタに対する書込みコマンドPGMの立ち上がりと,その直前の単相相補メモリ用のプログラムイネーブル信号c2PGMen(Hレベル)に基づき,下位セクタ単相相補メモリ504の単相相補判定データは,Lレベル(単相セルモード)からHレベル(相補セルモード)になる。これにより,下位セクタ単相相補メモリ504が出力する単相相補判定信号c2outLもLレベル(単相セルモード)からHレベル(相補セルモード)になる。また,時間T0の下位セクタに対する書込みコマンドPGMの立ち上がりに応答して,下位セクタのセクタ状態メモリ501のセクタ状態信号c1outLはHレベルとなり,セクタ状態データは書込み状態となる。そして,コントロールクロック信号ControlCLKは,時間T0でOR信号の立ち上がりに応答して立ち下がり,時間T0から時間tcc後の時間C0でHレベルとなる。そして,ラッチ回路504は,時間C0のコントロールクロック信号ControlCLKの立ち上がりに応答して単相相補判定信号c2outLをラッチし,Hレベル(相補セルモード)のフラグ信号twinsを出力する。   Based on the rising edge of the write command PGM for the lower sector at time T0 and the program enable signal c2PGMen (H level) for the single phase complementary memory immediately before that, the single phase complementary determination data in the lower sector single phase complementary memory 504 is at the L level. From (single phase cell mode) to H level (complementary cell mode). As a result, the single-phase complementary determination signal c2outL output from the lower sector single-phase complementary memory 504 is also changed from the L level (single-phase cell mode) to the H level (complementary cell mode). In response to the rise of the write command PGM for the lower sector at time T0, the sector status signal c1outL of the sector status memory 501 of the lower sector becomes H level, and the sector status data is in the write status. The control clock signal ControlCLK falls in response to the rise of the OR signal at time T0, and becomes H level at time C0 after time tcc from time T0. The latch circuit 504 latches the single-phase complementary determination signal c2outL in response to the rise of the control clock signal ControlCLK at time C0, and outputs an H level (complementary cell mode) flag signal twins.

時間T1の上位セクタに対する書込みコマンドPGMの立ち上がりに応答して,下位セクタ単相相補メモリ504の単相相補判定データはHレベル(相補セルモード)からLレベル(単相セルモード)になる。これにより単相相補判定信号c2outLもHレベル(相補セルモード)からLレベル(単相セルモード)になる。このとき,上位セクタのセクタ状態信号c1outUがHレベルとなり,セクタ状態メモリ502のセクタ状態データは書込み状態となる。そして,コントロールクロック信号ControlCLKは時間T1後の時間C1でHレベルとなる。ラッチ回路504は,これに応答して単相相補判定信号c2outLをラッチし,Lレベル(単相セルモード)のフラグ信号twinsを出力する。   In response to the rise of the write command PGM for the upper sector at time T1, the single-phase complementary determination data in the lower-sector single-phase complementary memory 504 changes from H level (complementary cell mode) to L level (single-phase cell mode). As a result, the single-phase complementary determination signal c2outL also changes from the H level (complementary cell mode) to the L level (single-phase cell mode). At this time, the sector status signal c1outU of the upper sector becomes H level, and the sector status data in the sector status memory 502 is in the write status. The control clock signal ControlCLK becomes H level at time C1 after time T1. In response to this, the latch circuit 504 latches the single-phase complementary determination signal c2outL and outputs an L-level (single-phase cell mode) flag signal twins.

時間T2の下位セクタに対する一括消去コマンドERSの立ち上がりに応答して,下位セクタのセクタ状態信号c1outLがLレベルとなり,セクタ状態メモリ501のセクタ状態データは一括消去状態となる。このとき,下位セクタ単相相補メモリ504の単相相補判定データは,Lレベル(単相セルモード)を維持する。そして,コントロールクロック信号ControlCLKは時間C2でHレベルとなる。これに応答してラッチ回路504がラッチした単相相補判定信号c2outLはLレベルであり,出力されるフラグ信号twinsはLレベル(単相セルモード)のままである。   In response to the rise of the batch erase command ERS for the lower sector at time T2, the sector status signal c1outL of the lower sector becomes L level, and the sector status data in the sector status memory 501 enters the batch erase state. At this time, the single-phase complementary determination data in the lower sector single-phase complementary memory 504 maintains the L level (single-phase cell mode). The control clock signal ControlCLK becomes H level at time C2. In response to this, the single-phase complementary determination signal c2outL latched by the latch circuit 504 is at the L level, and the output flag signal twins remains at the L level (single-phase cell mode).

時間T3の上位セクタに対する一括消去コマンドERSの立ち上がりに応答して,上位セクタのセクタ状態信号c1outUがLレベルとなり,セクタ状態メモリ502のセクタ状態データは一括消去状態となる。このとき,下位セクタ単相相補メモリ504の単相相補判定データは,Lレベル(単相セルモード)を維持する。そして,コントロールクロック信号ControlCLKは,時間C3でHレベルとなる。これに応答してラッチ回路504がラッチした単相相補判定信号c2outLはLレベルであり,出力されるフラグ信号twinsはLレベルのまま(単相セルモード)である。   In response to the rise of the batch erase command ERS for the upper sector at time T3, the sector status signal c1outU of the upper sector becomes L level, and the sector status data in the sector status memory 502 enters the batch erase state. At this time, the single-phase complementary determination data in the lower sector single-phase complementary memory 504 maintains the L level (single-phase cell mode). The control clock signal ControlCLK becomes H level at time C3. In response to this, the single-phase complementary determination signal c2outL latched by the latch circuit 504 is at the L level, and the output flag signal twins remains at the L level (single-phase cell mode).

時間T4の以降は,時間T0〜T2までの動作の繰り返しとなる。   After time T4, the operation from time T0 to time T2 is repeated.

このように,下位セクタ,上位セクタがともに一括消去状態であるときに,下位セクタに書込みコマンドPGMが生成されることで,下位セクタ単相相補メモリ504の判定結果は単相セルモードから相補セルモードに切り替わる。さらに上位セクタに書込みコマンドPGMを生成すると下位セクタ単相相補メモリ504の判定結果は単相セルモードに切り替わる。   Thus, when both the lower sector and the upper sector are in the batch erase state, the write command PGM is generated in the lower sector, so that the determination result of the lower sector single-phase complementary memory 504 is from the single-phase cell mode to the complementary cell. Switch to mode. When the write command PGM is further generated in the upper sector, the determination result of the lower sector single-phase complementary memory 504 is switched to the single-phase cell mode.

図7は第1の実施の形態におけるフラッシュメモリの下位および上位セクタがともに一括消去状態であるときに,下位セクタに書込み要求,一括消去要求が順にあった場合のフラグ信号の波形図である。図7では,下位セクタに時間T0,T1で書込みコマンドPGM,一括消去コマンドERSを生成した後に,上位セクタに時間T2,T3で書込みコマンドPGM,一括消去コマンドERSを生成している。   FIG. 7 is a waveform diagram of a flag signal when a write request and a batch erase request are sequentially issued to the lower sector when both the lower and upper sectors of the flash memory according to the first embodiment are in a batch erase state. In FIG. 7, the write command PGM and the batch erase command ERS are generated in the lower sector at times T0 and T1, and then the write command PGM and the batch erase command ERS are generated in the upper sector at times T2 and T3.

時間T0から開始される下位セクタへの書込みコマンドPGMに応答した動作は,図6と同様に行われ,フラグ信号twinsはHレベル(相補セルモード)となる。   The operation in response to the write command PGM to the lower sector starting from the time T0 is performed in the same manner as in FIG. 6, and the flag signal twins becomes H level (complementary cell mode).

時間T1の下位セクタへの一括消去コマンドERSの立ち上がりに応答して,下位セクタ単相相補メモリ504の単相相補判定データはHレベル(相補セルモード)からLレベル(単相セルモード)になる。これにより単相相補判定信号c2outLもHレベル(相補セルモード)からLレベル(単相セルモード)になる。また,下位セクタのセクタ状態信号がLレベルとなり,セクタ状態メモリ501のセクタ状態データは一括消去状態となる。そして,ラッチ回路504は,単相相補判定信号c2outLをラッチし,Lレベル(単相セルモード)のフラグ信号twinsを出力する。   In response to the rise of the batch erase command ERS to the lower sector at time T1, the single-phase complementary determination data in the lower-sector single-phase complementary memory 504 changes from the H level (complementary cell mode) to the L level (single-phase cell mode). . As a result, the single-phase complementary determination signal c2outL also changes from the H level (complementary cell mode) to the L level (single-phase cell mode). Further, the sector status signal of the lower sector becomes L level, and the sector status data in the sector status memory 501 is in a batch erase state. The latch circuit 504 latches the single-phase complementary determination signal c2outL and outputs an L-level (single-phase cell mode) flag signal twins.

時間T2の上位セクタに対する書込みコマンドPGMの立ち上がりに応答して,上位セクタのセクタ状態メモリのセクタ状態信号がHレベルとなり,セクタ状態データは書込み状態となる。また,単相相補判定データは,Lレベル(単相セルモード)を維持する。そして,時間C2でラッチ回路504がラッチした単相相補判定信号c2outLはLレベルであり,出力されるフラグ信号twinsはLレベル(単相セルモード)のままである。   In response to the rise of the write command PGM for the upper sector at time T2, the sector status signal in the sector status memory of the upper sector becomes H level, and the sector status data is in the write status. The single-phase complementary determination data is maintained at the L level (single-phase cell mode). The single-phase complementary determination signal c2outL latched by the latch circuit 504 at time C2 is at L level, and the output flag signal twins remains at L level (single-phase cell mode).

時間T3以降の動作は,図6の時間T3以降の動作と同様にして行われ,時間T3,T4,T5の上位セクタへの一括消去コマンド,下位セクタへの書込みコマンド,上位セクタへの書込みコマンドに対し,時間C3,C4,C5におけるフラグ信号twinsはそれぞれLレベル(単相セルモード),Hレベル(相補セルモード),Lレベル(単相セルモード)となる。   The operation after the time T3 is performed in the same manner as the operation after the time T3 in FIG. 6, and the batch erase command to the upper sector, the write command to the lower sector, the write command to the upper sector at the times T3, T4 and T5. On the other hand, the flag signals twins at times C3, C4, and C5 are at L level (single phase cell mode), H level (complementary cell mode), and L level (single phase cell mode), respectively.

このように,下位セクタ,上位セクタがともに一括消去状態であるときに,下位セクタに書込みコマンドPGMが生成されたとき,下位セクタ単相相補メモリ504の判定結果は相補セルモードに切り替わる。さらに下位セクタに一括消去コマンドERSを生成するとフラグ信号生成回路210の判定結果は単相セルモードに切り替わる。   As described above, when the write command PGM is generated in the lower sector when both the lower sector and the upper sector are in the batch erase state, the determination result of the lower sector single-phase complementary memory 504 is switched to the complementary cell mode. Further, when the batch erase command ERS is generated in the lower sector, the determination result of the flag signal generation circuit 210 is switched to the single-phase cell mode.

図8は第1の実施の形態における外部電源がオンされたときの各信号の立ち上がりを示す波形図である。図8(1)は,下位セクタ,上位セクタともにセクタ状態信号c1outL,c1outUがHレベル(書込み状態),単相相補判定信号c2outLがLレベル(単相セルモード)の場合の波形である。そして,図8(2)は,下位セクタのセクタ状態信号c1outLとがHレベル(書込み状態),上位セクタのセクタ状態信号c1outUがLレベル(一括消去状態),単相相補判定信号c2outLがHレベル(相補セルモード)の場合の波形である。   FIG. 8 is a waveform diagram showing the rise of each signal when the external power supply in the first embodiment is turned on. FIG. 8 (1) shows waveforms when the sector status signals c1outL and c1outU are at the H level (write state) and the single-phase complementary determination signal c2outL is at the L level (single-phase cell mode) in both the lower sector and the upper sector. 8 (2) shows that the sector status signal c1outL of the lower sector is H level (write state), the sector status signal c1outU of the upper sector is L level (batch erase state), and the single-phase complementary determination signal c2outL is H level. It is a waveform in the case of (complementary cell mode).

図8(1)では,オフされていた外部電源VDDが時間T1にオンされて立ち上がり,時間T2にHレベルとなる。そして,外部電源VDDの立ち上がりとともに,下位セクタ,上位セクタのセクタ状態信号c1outL,c1outUも立ち上がる。また,外部電源VDDの立ち上がりに応答してパワーオンリセット信号PORが,時間T1〜T2間でHレベルになり,動作制御回路208やラッチ回路504がリセットされる。そのため,動作制御回路208で生成されるコントロールクロック信号ControlCLKとラッチ回路504から出力されるフラグ信号twinsとは,時間T2までLレベルである。   In FIG. 8A, the external power supply VDD that has been turned off is turned on at time T1 and rises to H level at time T2. As the external power supply VDD rises, the sector status signals c1outL and c1outU of the lower and upper sectors also rise. Further, in response to the rise of the external power supply VDD, the power-on reset signal POR becomes H level between times T1 and T2, and the operation control circuit 208 and the latch circuit 504 are reset. Therefore, the control clock signal ControlCLK generated by the operation control circuit 208 and the flag signal twins output from the latch circuit 504 are at the L level until time T2.

そして,時間T2でコントロールクロック信号ControlCLKがHレベルになると,ラッチ回路504は単相相補判定信号c2outLをラッチする。このとき,単相相補判定信号c2outLはLレベル(単相セルモード)なので,出力されるフラグ信号twinsはLレベル(単相セルモード)のままである。   When the control clock signal ControlCLK becomes H level at time T2, the latch circuit 504 latches the single-phase complementary determination signal c2outL. At this time, since the single-phase complementary determination signal c2outL is at the L level (single-phase cell mode), the output flag signal twins remains at the L level (single-phase cell mode).

一方,図8(2)では,時間T1からの外部電源VDDの立ち上がりとともに,下位セクタのセクタ状態信号c1outLと,単相相補判定信号c2outLとが立ち上がる。また,パワーオンリセット信号PORにより,時間T1〜T2の間,コントロールクロック信号ControlCLKとラッチ回路504から出力されるフラグ信号twinsはLレベルとなる。   On the other hand, in FIG. 8B, the sector status signal c1outL of the lower sector and the single-phase complementary determination signal c2outL rise with the rise of the external power supply VDD from time T1. Further, the control clock signal ControlCLK and the flag signal twins output from the latch circuit 504 are set to the L level during the time T1 to T2 by the power-on reset signal POR.

そして,時間T2でコントロールクロック信号ControlCLKがHレベルになると,ラッチ回路504は,Hレベル(相補セルモード)の単相相補判定信号c2outLをラッチし,Hレベル(相補セルモード)のフラグ信号twinsを出力する。   When the control clock signal ControlCLK becomes H level at time T2, the latch circuit 504 latches the H-level (complementary cell mode) single-phase complementary determination signal c2outL and outputs the H-level (complementary cell mode) flag signal twins. Output.

このように第1の実施の形態では,外部電源がオンされると,パワーオンリセット信号によりフラグ信号twinsがリセットされる。そして,外部電源が立ち上がったときに,ラッチ回路504は単相相補判定信号c2outLをラッチして,外部電源がオフされる直前と同じ電圧レベルのフラグ信号twinsを出力する。   Thus, in the first embodiment, when the external power supply is turned on, the flag signal twins is reset by the power-on reset signal. When the external power supply rises, the latch circuit 504 latches the single-phase complementary determination signal c2outL and outputs the flag signal twins having the same voltage level as that immediately before the external power supply is turned off.

図9は第1の実施の形態における内部ERSコマンドの生成を示すブロック図である。   FIG. 9 is a block diagram showing generation of an internal ERS command in the first embodiment.

第1の実施の形態では,図5の回路構成において相補セルモードの場合に,上位セクタに対して書込みコマンドPGM,もしくは下位セクタに対して一括消去コマンドERSが生成されたとき,上位セクタへの一括消去が行われる。それに伴って,フラグ信号twinsはLレベル(単相セルモード)になり,セクタ状態メモリ206のセクタ状態データが書き換えられ,それと共に上位セクタに書込まれている反転データの一括消去が開始される。そして,反転データの一括消去が完了後,生成されたコマンド信号の動作が開始される。ここで,上位セクタの相補セルデータの一括消去動作している間に,もしフラッシュメモリの電源がオフとなると一括消去が途中で中断してしまう。ところが,フラッシュメモリの電源をオンとしたときは,フラグ信号twinsがLレベル(単相セルモード)であるにもかかわらず,上位セクタにはまだ反転データが一部保持されている状態となってしまう。   In the first embodiment, in the complementary cell mode in the circuit configuration of FIG. 5, when the write command PGM for the upper sector or the batch erase command ERS for the lower sector is generated, Batch erase is performed. Along with this, the flag signal twins becomes L level (single-phase cell mode), the sector state data in the sector state memory 206 is rewritten, and at the same time, batch erase of the inverted data written in the upper sector is started. . Then, after the batch erase of the inverted data is completed, the operation of the generated command signal is started. Here, if the flash memory power is turned off during the batch erase operation of complementary cell data in the upper sector, the batch erase is interrupted halfway. However, when the power supply of the flash memory is turned on, even though the flag signal twins is at the L level (single-phase cell mode), a part of the inverted data is still held in the upper sector. End up.

そこで,第1の実施の形態では,反転データの一括消去動作を発生させたコマンド信号が生成される前のフラグ信号twinsを,内部フラグ信号int-twinsとして,その一括消去動作が完了するまでERS用セクタ状態メモリ901が保持することとしている。そして,フラッシュメモリの電源をオンとしたとき,フラグ信号twinsがLレベル(単相セルモード)であっても,内部フラグ信号int-twinsがHレベル(相補セルモード)であれば,未だ一括消去が完了していないので,電源オン後に反転データの一括消去動作を行う。これにより,上位セクタの相補セルデータの一括消去動作している間にフラッシュメモリの電源がオフとなっても,その後電源がオンとなったときに上位セクタの反転データの一括消去動作を完了させることができる。   Therefore, in the first embodiment, the flag signal twins before the generation of the command signal for generating the batch erase operation of the inverted data is set as the internal flag signal int-twins, and the ERS is executed until the batch erase operation is completed. The sector state memory 901 holds it. When the power of the flash memory is turned on, even if the flag signal twins is at L level (single phase cell mode), if the internal flag signal int-wins is at H level (complementary cell mode), the batch erase is still performed. Is not completed, the batch erase operation of inverted data is performed after the power is turned on. As a result, even if the power of the flash memory is turned off during the batch erase operation of the complementary cell data of the upper sector, the batch erase operation of the inverted data of the upper sector is completed when the power is turned on thereafter. be able to.

以下に,上位セクタに書込まれている反転データが一括消去される動作についてまず示す。例として,初期状態のセクタグループの下位セクタ,上位セクタに対して書込みコマンドPGMを順に生成した場合の動作を説明する。   The operation of erasing the inverted data written in the upper sector at once will be described first. As an example, the operation when the write command PGM is sequentially generated for the lower sector and the upper sector of the sector group in the initial state will be described.

まず下位セクタに対する書込みコマンドPGMが生成されると,下位・上位セクタのセクタ状態データに基づきセクタ状態メモリアクセス制御回路207により相補セルモードの判定がなされ,フラグ信号生成回路211から出力されるフラグ信号twinsはLレベル(単相セルモード)からHレベル(相補セルモード)になる。そして,下位セクタのセクタ状態データは,一括消去状態から書込み状態となる。セクタ状態メモリアクセス制御回路207は,このフラグ信号twinsの立ち上がりに応答して,ERS用セクタ状態メモリ901に内部フラグ制御信号int‐tcを出力する。ERS用セクタ状態メモリ901は,内部フラグ制御信号int‐tcに応答して,内部フラグ信号int-twinsをLレベル(単相セルモード)からHレベル(相補セルモード)にする。   First, when the write command PGM for the lower sector is generated, the complementary cell mode is determined by the sector state memory access control circuit 207 based on the sector state data of the lower and upper sectors, and the flag signal output from the flag signal generation circuit 211 Twins changes from L level (single phase cell mode) to H level (complementary cell mode). Then, the sector status data of the lower sector changes from the batch erase state to the write state. The sector state memory access control circuit 207 outputs an internal flag control signal int-tc to the ERS sector state memory 901 in response to the rise of the flag signal twins. The ERS sector state memory 901 changes the internal flag signal int-twins from the L level (single phase cell mode) to the H level (complementary cell mode) in response to the internal flag control signal int-tc.

次に,上位セクタに対して書込みコマンドPGMが生成されると,フラグ信号twinsはHレベル(相補セルモード)からLレベル(単相セルモード)になる。また,上位セクタのセクタ状態データは,上位セクタに対する書込みコマンドPGMに応答して,一括消去状態から書込み状態となる。そして,セクタ状態メモリアクセス制御回路207は,フラグ信号twinsの立ち下がりに応答して,上位セクタに対する一括消去の開始命令であるERS開始信号を動作制御回路208に出力する。動作制御回路208は,ERS開始信号に応答して内部ERSコマンドを生成し,メモリコア221へ出力する。これにより上位セクタの一括消去およびそのベリファイ動作が行われ,完了後,動作制御回路208は,ERS完了信号をセクタ状態メモリアクセス制御回路207へ出力する。セクタ状態メモリアクセス制御回路207は,ERS完了信号に応答して,ERS用セクタ状態メモリ901へ内部フラグ制御信号int‐tcを出力する。ERS用セクタ状態メモリ901は,内部フラグ制御信号int‐tcに応答して,内部フラグ信号int-twinsをHレベル(相補セルモード)からLレベル(単相セルモード)にする。   Next, when the write command PGM is generated for the upper sector, the flag signal twins changes from H level (complementary cell mode) to L level (single phase cell mode). The sector status data of the upper sector changes from the batch erase state to the write state in response to the write command PGM for the upper sector. Then, the sector state memory access control circuit 207 outputs an ERS start signal, which is a batch erase start command for the upper sector, to the operation control circuit 208 in response to the fall of the flag signal twins. The operation control circuit 208 generates an internal ERS command in response to the ERS start signal and outputs it to the memory core 221. As a result, collective erasure of the upper sector and its verify operation are performed. After completion, the operation control circuit 208 outputs an ERS completion signal to the sector state memory access control circuit 207. The sector state memory access control circuit 207 outputs an internal flag control signal int-tc to the ERS sector state memory 901 in response to the ERS completion signal. The ERS sector state memory 901 changes the internal flag signal int-twins from the H level (complementary cell mode) to the L level (single phase cell mode) in response to the internal flag control signal int-tc.

このようにして,相補セルモードの場合に,上位セクタに対して書込みコマンドPGM,もしくは下位セクタに対して一括消去コマンドERSが生成されたことに応答して,上位セクタに書込まれている反転データが一括消去される間に誤って電源がオフになっても正常に一括消去される。次に,上位セクタの反転データの一括消去動作している間にフラッシュメモリの電源がオフとなった後,電源をオンしたときの動作について具体的に示す。   In this way, in the complementary cell mode, inversion written in the upper sector in response to the generation of the write command PGM for the upper sector or the batch erase command ERS for the lower sector. Even if the power is accidentally turned off while the data is being erased at once, it will be erased normally. Next, the operation when the power of the flash memory is turned on after the power of the flash memory is turned off during the batch erase operation of the inverted data of the upper sector will be specifically described.

図10は第1の実施の形態におけるフラッシュメモリの電源をオンしたときのフラグ信号及び内部フラグ信号の波形を示す波形図である。図10は,上記と同様に,上位セクタの反転データの一括消去動作を実施中にフラッシュメモリの電源がオフとなった状態から,電源をオンしたときの波形を示している。   FIG. 10 is a waveform diagram showing the waveforms of the flag signal and the internal flag signal when the flash memory is turned on in the first embodiment. FIG. 10 shows a waveform when the power supply is turned on from the state where the power supply of the flash memory is turned off during the batch erase operation of the inverted data of the upper sector, as described above.

時間T10に電源VDDが立ち上がり始め,電源VDDは時間T11にHレベルとなる。また,これに応答して,コントロールクロック信号ControlCLK,パワーオン制御クロック信号,内部フラグ信号int‐twinsも時間T11にHレベルとなる。図10ではフラッシュメモリの電源がオフとなる前上位セクタの一括消去開始時にフラグ信号twinsはLレベル(単相セルモード)となっている。そのため,時間T11ではフラグ信号twinsはLレベルのままとなる。   The power supply VDD starts to rise at time T10, and the power supply VDD becomes H level at time T11. In response to this, the control clock signal ControlCLK, the power-on control clock signal, and the internal flag signal int-twins also become H level at time T11. In FIG. 10, the flag signal twins is at the L level (single phase cell mode) at the start of batch erasure of the upper sector before the power of the flash memory is turned off. Therefore, the flag signal twins remains at the L level at time T11.

時間T11で,動作制御回路208からセクタ状態メモリアクセス制御回路207に出力されるパワーオン制御クロック信号の立ち上がりに応答し,セクタ状態メモリアクセス制御回路207はフラグ信号twinsがLレベル(単相セルモード),内部フラグ信号int-twinsがHレベル(相補セルモード)であることを検知する。   In response to the rising edge of the power-on control clock signal output from the operation control circuit 208 to the sector state memory access control circuit 207 at time T11, the sector state memory access control circuit 207 sets the flag signal twins to the L level (single-phase cell mode). ), It is detected that the internal flag signal int-twins is at the H level (complementary cell mode).

そして,セクタ状態メモリアクセス制御回路207は時間T12でERS開始信号をHレベルにする。これにより,中断されていた上位セクタの反転データの一括消去動作が時間T12で再開される。   Then, the sector state memory access control circuit 207 sets the ERS start signal to the H level at time T12. Thereby, the batch erase operation of the inverted data of the upper sector which has been interrupted is resumed at time T12.

メモリコア221で反転データの一括消去が完了し,動作制御回路208から出力されるERS完了信号が時間T13に立ち上がると,これに応答して時間T14で内部フラグ信号int-twinsが立ち下がる。つまり,再開された相補セルデータの一括消去動作が完了し,上位セクタのセクタ状態データは,すべてのセルが消去状態“1”(一括消去状態)となり,フラグ信号twinsと内部フラグ信号int-twinsはともにLレベル(単相セルモード)となる。   When batch erase of inverted data is completed in the memory core 221 and the ERS completion signal output from the operation control circuit 208 rises at time T13, the internal flag signal int-twins falls in response to this at time T14. In other words, the resume operation of the complementary cell data that has been resumed is completed, and the sector status data of the upper sector is such that all the cells are in the erased state “1” (collective erase state), and the flag signal twins and the internal flag signal int-twins. Both become L level (single phase cell mode).

時間T15で,下位セクタに対して書込みコマンドPGMがコマンド生成回路201から出力されると,コントロールクロックControlCLKは時間T16で立ち上がる。そして,時間T16で,セクタ状態メモリから出力される下位,上位セクタのセクタ状態信号に基づいてフラグ信号生成回路211から出力されるフラグ信号twinsがLレベル(単相セルモード)からHレベル(相補セルモード)になる。このとき,セクタ状態メモリアクセス制御回路207は,フラグ信号twinsがHレベル(相補セルモード),内部フラグ信号int−twinsがLレベル(単相セルモード)であることを検知して,時間T17に内部フラグ信号int‐twinsをHレベル(相補セルモード)にする。   When the write command PGM is output from the command generation circuit 201 to the lower sector at time T15, the control clock ControlCLK rises at time T16. At time T16, the flag signal twins output from the flag signal generation circuit 211 based on the sector status signals of the lower and upper sectors output from the sector status memory changes from L level (single phase cell mode) to H level (complementary). Cell mode). At this time, the sector state memory access control circuit 207 detects that the flag signal twins is H level (complementary cell mode) and the internal flag signal int-twins is L level (single phase cell mode), and at time T17. Internal flag signal int-twins is set to H level (complementary cell mode).

時間T18で,上位セクタに対して書込みコマンドPGMがコマンド生成回路201から出力されると,コントロールクロックControlCLKは時間T19で立ち上がる。そして,時間T19で,フラグ信号生成回路211から出力されるフラグ信号twinsがHレベル(相補セルモード)からLレベル(単相セルモード)になる。このフラグ信号twinsの立ち下がりに応答して,時間T20でERS開始信号がHレベルとなる。これにより,上位セクタの反転データの一括消去動作が開始される。そして,上位セクタの反転データの一括消去が完了し,動作制御回路208から出力されるERS完了信号が時間T21に立ち上がると,これに応答して時間T22で内部フラグ信号int-twinsが立ち下がる。このとき,上位セクタの反転データの一括消去が完了し,上位セクタのセクタ状態データは,すべてのセルが消去状態“1”(一括消去状態)となる。   When the write command PGM is output from the command generation circuit 201 to the upper sector at time T18, the control clock ControlCLK rises at time T19. At time T19, the flag signal twins output from the flag signal generation circuit 211 changes from the H level (complementary cell mode) to the L level (single phase cell mode). In response to the fall of the flag signal twins, the ERS start signal becomes H level at time T20. Thereby, the batch erase operation of the inverted data of the upper sector is started. When batch erase of the inverted data of the upper sector is completed and the ERS completion signal output from the operation control circuit 208 rises at time T21, the internal flag signal int-twins falls at time T22 in response to this. At this time, the batch erasure of the inverted data of the upper sector is completed, and the sector status data of the upper sector is in the erased state “1” (batch erased state) for all the cells.

このようにして,上位セクタの反転データの一括消去中にフラッシュメモリの電源がオフとなり,上位セクタの反転データの一括消去動作が中断されても,電源がオンしたときにフラグ信号twinsと内部フラグ信号int-twinsに基づいて反転データの一括消去動作が再開され,各セクタに書込まれているデータの整合性が確保される。   In this way, even if the flash memory power is turned off during batch erase of the inverted data of the upper sector and the batch erase operation of the inverted data of the upper sector is interrupted, the flag signal twins and the internal flag are turned on when the power is turned on. Based on the signal int-twins, the batch erase operation of the inverted data is resumed, and the consistency of the data written in each sector is ensured.

図11は第1の実施の形態における反転データの一括消去動作実施判断のフローチャート図である。つまり,図11は,図10で行った補正データの一括消去動作の実施をするか否かを判断するためのフローチャートである。   FIG. 11 is a flow chart for determining whether to perform the batch erase operation for inverted data in the first embodiment. That is, FIG. 11 is a flowchart for determining whether or not to execute the correction data batch erasing operation performed in FIG.

まず,フラッシュメモリの電源起動時又はコマンド生成回路201から書込みコマンドPGM若しくは一括消去コマンドERSが出力したとき,フラグ信号twinsがLレベル(単相セルモード)であるか,又はHレベル(相補セルモード)であるか判断する(S1101)。   First, when the flash memory is powered on or when the write command PGM or the batch erase command ERS is output from the command generation circuit 201, the flag signal twins is at the L level (single-phase cell mode) or the H level (complementary cell mode). ) Is determined (S1101).

ステップS1101でフラグ信号twinsがLレベル(単相セルモード)である場合,内部フラグ信号int-twinsがHレベルであるかLレベルであるか判断する(S1102)。内部フラグ信号int-twinsがLレベルである場合は,フラグ信号twinsと内部フラグ信号int-twinsはともにLレベル(単相セルモード)である。これは,上位セクタの反転データの一括消去動作が中断していないことを意味しており,フラッシュメモリは通常動作を行う。一方,内部フラグ信号int-twinsがHレベル(相補セルモード)である場合は,フラグ信号twin(Lレベル,単相セルモード)と内部フラグ信号int-twins(Hレベル,相補セルモード)とで論理レベルが相違している。これは,上位セクタの反転データの一括消去動作が中断された,もしくは上位セクタに対して一括消去コマンドERSが生成されたことを意味している。そのため,上位セクタに対して内部ERS信号が生成され,上位セクタの反転データの一括消去動作が行われる(S1103)。そして,ベリファイ動作(S1104)完了後,内部ERS完了信号に応答して,内部フラグ信号int-twinsはLレベルになり,フラグ信号twinsと内部フラグ信号int-twinsはともにLレベル(単相セルモード)となる(S1105,S1106)。ERS用セクタ状態メモリ901をLレベルにするプログラムが完了後,フラグ信号twinsと内部フラグ信号int-twinsは共にLレベル(単相セルモード)となり,フラッシュメモリは通常動作を行う(S1107)。   If the flag signal twins is at L level (single phase cell mode) in step S1101, it is determined whether the internal flag signal int-wins is at H level or L level (S1102). When the internal flag signal int-twins is at L level, both the flag signal twins and the internal flag signal int-twins are at L level (single phase cell mode). This means that the batch erase operation of the inverted data in the upper sector is not interrupted, and the flash memory performs a normal operation. On the other hand, when the internal flag signal int-twins is at the H level (complementary cell mode), the flag signal twin (L level, single-phase cell mode) and the internal flag signal int-twins (H level, complementary cell mode) The logic level is different. This means that the batch erase operation of the inverted data of the upper sector is interrupted or the batch erase command ERS is generated for the upper sector. Therefore, an internal ERS signal is generated for the upper sector, and a batch erase operation of the inverted data of the upper sector is performed (S1103). Then, after the verify operation (S1104) is completed, in response to the internal ERS completion signal, the internal flag signal int-twins becomes L level, and both the flag signal twins and the internal flag signal int-twins are at L level (single-phase cell mode). ) (S1105, S1106). After the program for setting the ERS sector state memory 901 to the L level is completed, both the flag signal twins and the internal flag signal int-twins are set to the L level (single-phase cell mode), and the flash memory performs a normal operation (S1107).

一方,ステップS1101でフラグ信号twinsがHレベル(相補セルモード)である場合,内部フラグ信号int-twinsがHレベル(相補セルモード)であるか判定する(S1108)。   On the other hand, if the flag signal twins is at the H level (complementary cell mode) in step S1101, it is determined whether the internal flag signal int-twins is at the H level (complementary cell mode) (S1108).

内部フラグ信号int-twinsがLレベル(単相セルモード)である場合,フラグ信号twinsはHレベル(相補セルモード),内部フラグ信号int-twinsがLレベル(単相セルモード)となる。これは,書込み方式が単相セルモードの状態から相補セルモードに切り替わったことを意味している。つまり,下位および上位セクタが一括消去状態である状態から,下位セクタに対して書込みコマンドPGMが生成され下位セクタが書込み状態に切り替わったのである。この場合,内部フラグ信号int-twinsをフラグ信号twinsの論理レベルに合わせるために,セクタ状態メモリアクセス制御回路207は,ERS用セクタ状態メモリ901をHレベルにする消去動作を行う(S1109)。そして,ERS用セクタ状態メモリ901のベリファイ動作(S1110)完了後,フラグ信号twinsと内部フラグ信号int-twinsはともにHレベル(相補セルモード)であるため,通常動作を行う。   When the internal flag signal int-twins is at L level (single phase cell mode), the flag signal twins is at H level (complementary cell mode), and the internal flag signal int-twins is at L level (single phase cell mode). This means that the write mode is switched from the single-phase cell mode state to the complementary cell mode. That is, the write command PGM is generated for the lower sector from the state where the lower and upper sectors are in the batch erase state, and the lower sector is switched to the write state. In this case, in order to match the internal flag signal int-twins to the logic level of the flag signal twins, the sector state memory access control circuit 207 performs an erasing operation to set the ERS sector state memory 901 to the H level (S1109). Then, after the verify operation (S1110) of the ERS sector state memory 901 is completed, the flag signal twins and the internal flag signal int-twins are both at the H level (complementary cell mode), so the normal operation is performed.

ステップS1108で内部フラグ信号int-twinsがHレベル(相補セルモード)である場合,フラグ信号twinsと内部フラグ信号int-twinsはともにHレベル(相補セルモード)であるため,通常動作を行う。   If the internal flag signal int-twins is at the H level (complementary cell mode) in step S1108, the flag signal twins and the internal flag signal int-twins are both at the H level (complementary cell mode), so that normal operation is performed.

以上のとおり,フラッシュメモリの電源を起動したとき,又はコマンド信号が生成されたとき,フラグ信号twinsと内部フラグ信号int-twinsの論理レベルに基づいて,上位セクタに書込まれた反転データの一括消去動作状況の判断が行われる。そして,フラグ信号twinsがLレベル(単相セルモード)で,内部フラグ信号int-twinsがHレベル(相補セルモード)である場合,上位セクタの反転データの一括消去動作が行われる。なぜならば,この場合は,(A)フラッシュメモリの電源がオフし反転データの一括消去動作が中断された,(B)相補セルモード時に上位セクタに書込みコマンドPGMが生成された等,に該当し一括消去動作を行う必要があるからである。   As described above, when the power source of the flash memory is activated or when a command signal is generated, the batch of inverted data written in the upper sector is based on the logic levels of the flag signal twins and the internal flag signal int-twins. Determination of the erase operation status is performed. When the flag signal twins is at the L level (single-phase cell mode) and the internal flag signal int-wins is at the H level (complementary cell mode), the batch data erase operation of the upper sector is performed. This is because, in this case, (A) the flash memory is turned off and the batch erase operation of the inverted data is interrupted, and (B) the write command PGM is generated in the upper sector in the complementary cell mode. This is because it is necessary to perform a batch erase operation.

第1の実施の形態では,相補セルモードのとき,下位セクタを選択すると,下位セクタと同じセクタグループの上位セクタも選択される。そこで,セクタ制御回路212について説明する。   In the first embodiment, when the lower sector is selected in the complementary cell mode, the upper sector of the same sector group as the lower sector is also selected. Therefore, the sector control circuit 212 will be described.

図12は第1の実施の形態におけるセクタ制御回路(デコーダ)を示す図である。図12(1)は,セクタSector0向けのセクタ制御回路212の回路図であり,図12(2)はセクタSector0と同じセクタグループSG0に属するセクタSector7向けのセクタ制御回路212の回路図である。   FIG. 12 is a diagram showing a sector control circuit (decoder) in the first embodiment. 12 (1) is a circuit diagram of the sector control circuit 212 for the sector Sector0, and FIG. 12 (2) is a circuit diagram of the sector control circuit 212 for the sector Sector7 belonging to the same sector group SG0 as the sector Sector0.

図12(1)の回路は,アドレス選択回路210から3ビットのセクタアドレス信号Sector Address<0>,<1>,<2>が供給される。3ビットのセクタアドレス信号はそれぞれインバータ1201〜1203を介してNANDゲート1204へ入力され,インバータ1205を介しセクタSector0向けの1ビットのセクタ選択信号Sector Select<0>として出力される。したがって,セクタSector0のアドレス信号 “000”が供給されると,セクタSector0のセクタ選択信号Sector Select<0>はHレベルとなって出力される。   The circuit of FIG. 12A is supplied with 3-bit sector address signals Sector Address <0>, <1>, <2> from the address selection circuit 210. The 3-bit sector address signal is input to the NAND gate 1204 via the inverters 1201 to 1203, respectively, and is output via the inverter 1205 as a 1-bit sector selection signal Sector Select <0> for the sector Sector0. Therefore, when the address signal “000” of the sector Sector0 is supplied, the sector selection signal Sector Select <0> of the sector Sector0 is output at the H level.

図12(2)の回路は,相補セルモードの場合にセクタSector0のアドレス “000”が供給されると,セクタSector7のセクタ選択信号Sector Select<7>がHレベルとなりセクタSector7も選択されるようにしたものである。図12(2)の回路は,インバータ1206〜1208,1216,1218とトランスファーゲート1210〜1215とNANDゲート1217とを有し,アドレス選択回路210から出力された3ビットのセクタアドレス信号Sector Address<0>,<1>,<2>と,フラグ信号生成回路211から出力されたフラグ信号twins<7>とを入力とする。フラグ信号twins<7>によってトランスファ1210〜1215のゲートを駆動し,セクタ選択信号のパスを制御している。   In the circuit of FIG. 12B, when the address “000” of the sector Sector0 is supplied in the complementary cell mode, the sector selection signal Sector Select <7> of the sector Sector7 becomes H level and the sector Sector7 is also selected. It is a thing. The circuit of FIG. 12B includes inverters 1206 to 1208, 1216 and 1218, transfer gates 1210 to 1215, and NAND gate 1217, and the 3-bit sector address signal Sector Address <0 output from the address selection circuit 210. >, <1>, <2> and the flag signal twins <7> output from the flag signal generation circuit 211 are input. The gates of the transfer 1210 to 1215 are driven by the flag signal twins <7> to control the path of the sector selection signal.

相補セルモードの場合,すなわちフラグ信号がHレベルの場合,セクタアドレス信号“000”は,インバータ1206〜1208とトランスファーゲート1211,1213,1215とを介してNANDゲート1217に入力し,その結果,インバータ1218から出力されるセクタSector7のセクタ選択信号Sector Select<7>はHレベルとなる。つまり,図12(1)と(2)の回路にセクタアドレス信号“000”が入力されると,相補セルモードの場合は,セクタSector0を選択するとともにセクタSector7も選択される。   In the complementary cell mode, that is, when the flag signal is at the H level, the sector address signal “000” is input to the NAND gate 1217 via the inverters 1206 to 1208 and the transfer gates 1211, 1213 and 1215, and as a result, the inverter The sector selection signal Sector Select <7> of the sector Sector 7 output from 1218 becomes H level. That is, when the sector address signal “000” is input to the circuits of FIGS. 12A and 12B, in the complementary cell mode, the sector Sector 0 is selected and the sector Sector 7 is also selected.

一方,単相セルモードの場合,すなわちフラグ信号がLレベルの場合,セクタアドレス信号“000”は,トランスファーゲート1210,1212,1214とを介してNANDゲート1217に入力し,その結果,インバータ1218から出力されるセクタSector7のセクタ選択信号Sector Select<7>はLレベルとなる。つまり単相セルモードの場合はセクタSector7は非選択となる。   On the other hand, in the single-phase cell mode, that is, when the flag signal is at the L level, the sector address signal “000” is input to the NAND gate 1217 via the transfer gates 1210, 1212, and 1214, and as a result, from the inverter 1218. The sector selection signal Sector Select <7> of the sector Sector 7 to be output becomes L level. That is, in the single-phase cell mode, the sector Sector 7 is not selected.

なお,第1の実施の形態では,セクタSector1〜3向けのセクタ制御回路212は,図12(1)において,各セクタに対応するセクタアドレス信号の組合せがセクタ制御回路212に入力されたときにNANDゲート1204の入力信号が全てHレベルとなるように,インバータ1201〜1203の有無を変更した回路となる。また,セクタSector4〜6向けのセクタ制御回路212は,図12(2)において,各セクタが属するセクタグループの下位セクタのセクタアドレス信号がセクタ制御回路212に入力された場合,フラグ信号twinsがHレベル(相補セルモード)のときはNANDゲート1217の入力信号が全てHレベルとなり,フラグ信号twinsがLレベル(単相セルモード)のときはNANDゲート1217の入力信号が全てLレベルとなるよう,領域1224〜1226のインバータの配置(上側か又は下側か)を変更した回路となる。   In the first embodiment, the sector control circuit 212 for the sectors Sectors 1 to 3 is set when the combination of sector address signals corresponding to each sector is input to the sector control circuit 212 in FIG. In this circuit, the presence or absence of the inverters 1201 to 1203 is changed so that all the input signals of the NAND gate 1204 are at the H level. The sector control circuit 212 for the sectors Sectors 4 to 6 has the flag signal twins set to H when the sector address signal of the lower sector of the sector group to which each sector belongs is input to the sector control circuit 212 in FIG. When the level (complementary cell mode), all the input signals of the NAND gate 1217 are H level, and when the flag signal twins is L level (single phase cell mode), the input signals of the NAND gate 1217 are all L level. This is a circuit in which the arrangement (inverter or lower side) of the inverters in the regions 1224 to 1226 is changed.

このようにして,相補セルモードでは下位セクタを選択すると,対応する上位セクタも同時に選択される。   In this way, when the lower sector is selected in the complementary cell mode, the corresponding upper sector is simultaneously selected.

次に第1の実施の形態におけるメモリセルアレイについて説明する。図13は第1の実施の形態におけるメモリセルアレイを示す図である。   Next, the memory cell array in the first embodiment will be described. FIG. 13 is a diagram showing the memory cell array in the first embodiment.

図13(1)では,メモリセルアレイ217の各セクタSector0〜7を縦断する複数のグローバルビット線GBLが,コラムスイッチ218を介してライトアンプ219,リードアンプ220へ接続していることを示している。グローバルビット線GBLは,下位セクタのローカルビット線に接続するものと上位セクタのローカルビット線に接続するものの2種類に大別でき,メモリセルアレイ上に交互に配置されている。なお,図2で述べたように,コラムスイッチ218は,Y制御回路215から出力されるグローバルビット線選択信号YSELに基づき,対応するグローバルビット線GBLを選択し,ライトアンプ219又はリードアンプ220に接続する。   FIG. 13 (1) shows that a plurality of global bit lines GBL that vertically traverse each sector Sector 0 to 7 of the memory cell array 217 are connected to the write amplifier 219 and the read amplifier 220 via the column switch 218. . The global bit lines GBL can be roughly divided into two types, those connected to the local bit lines of the lower sector and those connected to the local bit lines of the upper sector, and are arranged alternately on the memory cell array. As described with reference to FIG. 2, the column switch 218 selects the corresponding global bit line GBL based on the global bit line selection signal YSEL output from the Y control circuit 215, and sends it to the write amplifier 219 or the read amplifier 220. Connecting.

図13(2)は,図13(1)の領域1301に含まれるセクタSector3,4の構成の一部を拡大したものである。メモリセルアレイ217は,スタック・ゲート型メモリセル1302を1単位として行方向と列方向にマトリクス状に配置したものである。また,メモリセルアレイ217は,複数のグローバルビット線GBLと,複数のローカルビット線LBLと,複数のワード線WLと,ソース線SLと,コラム選択線SSELとを有する。グローバルビット線GBLは,ローカルビット線選択信号LBSELにより駆動されるコラム選択線SSELをゲートとするトランジスタ群1303,1304を介して,ローカルビット線LBLと接続する。メモリセル1302は,コントロールゲートと,フローティングゲートと,ドレインと,ソースとを有し,ワード線WLをコントロールゲートと接続し,ドレインをローカルビット線LBLと接続し,ソースをソース線SLと接続する。例えば,メモリセル1302をプログラムする場合,ソース線SLを接地し,ワード線BLに高電圧(9V程度),ローカルビット線に書込み電圧(5V程度)をそれぞれ印加して,フローティングゲートに電子を注入し,プログラム状態“0”にする。またメモリセル902を消去する場合は,ワード線WLに低電圧(ー9V程度),メモリセルのウェルに高電圧(9V程度)の電圧を印加し,ローカルビット線及びソース線をフローティング状態にして,フローティングゲートから電子を引き抜き,消去状態“1”にする。   FIG. 13B is an enlarged view of a part of the configuration of the sectors Sector 3 and 4 included in the area 1301 of FIG. The memory cell array 217 has a stack / gate type memory cell 1302 as one unit and is arranged in a matrix in the row direction and the column direction. The memory cell array 217 includes a plurality of global bit lines GBL, a plurality of local bit lines LBL, a plurality of word lines WL, a source line SL, and a column selection line SSEL. The global bit line GBL is connected to the local bit line LBL via transistor groups 1303 and 1304 whose gates are the column selection line SSEL driven by the local bit line selection signal LBSEL. The memory cell 1302 has a control gate, a floating gate, a drain, and a source. The word line WL is connected to the control gate, the drain is connected to the local bit line LBL, and the source is connected to the source line SL. . For example, when programming the memory cell 1302, the source line SL is grounded, a high voltage (about 9V) is applied to the word line BL, a write voltage (about 5V) is applied to the local bit line, and electrons are injected into the floating gate. The program state is set to “0”. When erasing the memory cell 902, a low voltage (about -9V) is applied to the word line WL, a high voltage (about 9V) is applied to the well of the memory cell, and the local bit line and the source line are brought into a floating state. , Electrons are extracted from the floating gate, and the erased state is set to “1”.

以上のとおり,メモリセルアレイ217は複数のグローバルビット線GBLとローカルビット線LBLとソース線SLとワード線WLとを有し,スタック・ゲート型メモリセルにデータが書込まれ,又は消去される。   As described above, the memory cell array 217 has a plurality of global bit lines GBL, local bit lines LBL, source lines SL, and word lines WL, and data is written to or erased from the stacked gate type memory cells.

図2で示したとおり,ライトアンプ219はメモリセルアレイ217へのデータ書込みおよび一括消去におけるプログラム動作を行っており,リードアンプ220はメモリセルアレイ217のデータの読み出しを行っている。ライトアンプ219やリードアンプ220は,アンプ制御回路216から出力される上位セクタ選択信号USEL,下位セクタ選択信号LSEL,相補パス選択信号twin,参照セル選択信号/twin,相補出力制御信号/RAoutHによってデータパスを制御されている。そこで,図14〜図16を用いてリードアンプ220,ライトアンプ219,アンプ制御回路216について以下に説明する。   As shown in FIG. 2, the write amplifier 219 performs a program operation for writing data to the memory cell array 217 and batch erasing, and the read amplifier 220 reads data from the memory cell array 217. The write amplifier 219 and the read amplifier 220 receive data by the upper sector selection signal USEL, the lower sector selection signal LSEL, the complementary path selection signal twin, the reference cell selection signal / twin, and the complementary output control signal / RAoutH output from the amplifier control circuit 216. The path is controlled. Therefore, the read amplifier 220, the write amplifier 219, and the amplifier control circuit 216 will be described below with reference to FIGS.

図14は,第1の実施の形態におけるリードパスを示す図である。図14には,セクタSector3のメモリセル1401,又はセクタSector4のメモリセル1402から読み出しを行う場合のリードパスが示されている。   FIG. 14 is a diagram showing a lead path in the first embodiment. FIG. 14 shows a read path when reading from the memory cell 1401 of the sector Sector3 or the memory cell 1402 of the sector Sector4.

リードアンプ220は,データバスDBを介してコラムスイッチ218と接続しており,リードパス切替回路1411とコンパレータ回路1416とを有する。   The read amplifier 220 is connected to the column switch 218 via the data bus DB, and includes a read path switching circuit 1411 and a comparator circuit 1416.

リードパス切替回路1411は,下位セクタ選択信号LSELによりゲートが駆動されるトランジスタ1407と,上位セクタ選択信号USELによりゲートが駆動されるトランジスタ1408と,相補パス選択信号twinによりゲートが駆動されるトランジスタ1409と,参照セル選択信号/twinによりゲートが駆動されるトランジスタ1410とを有する。なお,上位セクタ選択信号USEL,下位セクタ選択信号LSEL,相補パス選択信号twin,参照セル選択信号/twinについては図16にて後述する。また,トランジスタ1410は,ゲートに所定の電圧がかけられONしているトランジスタ1406を介して,メモリセルのプログラム状態の閾値電圧と消去状態の閾値電圧との中間電圧を閾値電圧に設定されたリファレンスメモリセル1403を有するリファレンスセルRC1と接続している。   The read path switching circuit 1411 includes a transistor 1407 whose gate is driven by a lower sector selection signal LSEL, a transistor 1408 whose gate is driven by an upper sector selection signal USEL, and a transistor 1409 whose gate is driven by a complementary path selection signal twin. , A transistor 1410 whose gate is driven by a reference cell selection signal / twin. The upper sector selection signal USEL, the lower sector selection signal LSEL, the complementary path selection signal twin, and the reference cell selection signal / twin will be described later with reference to FIG. The transistor 1410 is a reference in which an intermediate voltage between the threshold voltage in the programmed state and the threshold voltage in the erased state of the memory cell is set to the threshold voltage via the transistor 1406 that is turned on with a predetermined voltage applied to the gate. A reference cell RC1 having a memory cell 1403 is connected.

コンパレータ回路1416は,コンパレータ1412と,リードアンプイネーブル信号RAenによりゲートが駆動されるトランジスタ1413と,相補出力制御信号/RAoutHによりゲートが駆動されるトランジスタ1414,1415とを有する。相補出力制御信号/RAoutHについては図16にて後述する。   The comparator circuit 1416 includes a comparator 1412, a transistor 1413 whose gate is driven by a read amplifier enable signal RAen, and transistors 1414 and 1415 whose gates are driven by a complementary output control signal / RAoutH. The complementary output control signal / RAoutH will be described later with reference to FIG.

コラムスイッチ218は,グローバルビット線GBLを介してセクタセクタSector3,4に接続する。   The column switch 218 is connected to the sector sectors Sector 3 and 4 through the global bit line GBL.

セクタSector3,4のメモリセル1401,1402のドレインであるローカルビット線LBLは,ローカルビット線選択信号LBSELにより駆動されるコラム選択線SSELをゲートとするトランジスタ1404,1405を介してグローバルビット線GBLと接続する。   The local bit line LBL which is the drain of the memory cells 1401 and 1402 of the sectors Sector 3 and 4 is connected to the global bit line GBL via the transistors 1404 and 1405 whose gate is the column selection line SSEL driven by the local bit line selection signal LBSEL. Connecting.

セクタSector3のメモリセル1401を読み出す場合,単相セルモードでは,セクタSector3のトランジスタ1404のゲートのコラム選択線SSELがHレベルとなり,トランジスタ1404はONとなる。また,後述する図16のアンプ制御回路により下位セクタ選択信号LSELはHレベル,上位セクタ選択信号USELはLレベル,相補パス選択信号twinはLレベル,参照セル選択信号/twinはHレベルとなる。その結果,リードパス切替回路1411のトランジスタ1407がONとなり,メモリセル1401のドレインがコンパレータ1412のマイナス端子に接続し,リファレンスセルRC1のトランジスタ1406とリードパス切替回路1411のトランジスタ1410とがONとなり,メモリセル1403のドレインがコンパレータ1412のプラス端子に接続する。このように単相セルモードでは,セクタSector3のメモリセルの電流とリファレンスセルRC1の電流とをコンパレータ1412で比較する。   When reading the memory cell 1401 in the sector Sector3, in the single-phase cell mode, the column selection line SSEL of the gate of the transistor 1404 in the sector Sector3 is set to H level, and the transistor 1404 is turned on. In addition, the lower sector selection signal LSEL is set to the H level, the upper sector selection signal USEL is set to the L level, the complementary path selection signal twin is set to the L level, and the reference cell selection signal / twin is set to the H level by the amplifier control circuit of FIG. As a result, the transistor 1407 of the lead path switching circuit 1411 is turned on, the drain of the memory cell 1401 is connected to the negative terminal of the comparator 1412, the transistor 1406 of the reference cell RC1 and the transistor 1410 of the lead path switching circuit 1411 are turned on, and the memory cell The drain of 1403 is connected to the plus terminal of the comparator 1412. As described above, in the single-phase cell mode, the comparator 1412 compares the current of the memory cell in the sector Sector3 with the current of the reference cell RC1.

一方で,相補セルモードでは,セクタSector3のトランジスタ1404のゲートのコラム選択線SSELがHレベルとなりトランジスタ1404はONとなり,セクタSector3とペアのセクタSector4のトランジスタ1405のゲートのコラム選択線SSELもHレベルとなりトランジスタ1405はONとなる。また,後述する図16のアンプ制御回路により下位セクタ選択信号LSELはHレベル,上位セクタ選択信号USELはLレベル,相補パス選択信号twinはHレベル,参照セル選択信号/twinはLレベルとなる。その結果,リードパス切替回路1411のトランジスタ1407がONとなり,メモリセル1401のドレインがコンパレータ1412のマイナス端子に接続する。さらに,セクタSector4のトランジスタ1405とリードパス切替回路1411のトランジスタ1409とがONとなり,メモリセル1402のドレインがコンパレータ1412のプラス端子に接続する。このように相補セルモードではセクタSector3のメモリセルの電流とセクタSector4のメモリセルの電流とをコンパレータ1412で比較する。   On the other hand, in the complementary cell mode, the column selection line SSEL of the gate of the transistor 1404 in the sector Sector 3 is H level and the transistor 1404 is turned on, and the column selection line SSEL of the gate of the transistor 1405 in the sector Sector 4 paired with the sector Sector 3 is also H level. The transistor 1405 is turned on. In addition, the lower sector selection signal LSEL is set to the H level, the upper sector selection signal USEL is set to the L level, the complementary path selection signal twin is set to the H level, and the reference cell selection signal / twin is set to the L level by the amplifier control circuit of FIG. As a result, the transistor 1407 of the lead path switching circuit 1411 is turned on, and the drain of the memory cell 1401 is connected to the negative terminal of the comparator 1412. Further, the transistor 1405 of the sector Sector 4 and the transistor 1409 of the read path switching circuit 1411 are turned on, and the drain of the memory cell 1402 is connected to the plus terminal of the comparator 1412. As described above, in the complementary cell mode, the current of the memory cell in the sector Sector 3 is compared with the current of the memory cell in the sector Sector 4 by the comparator 1412.

なお,セクタSector3のメモリセル1401を読み出す場合,単相セルモード,相補セルモードいずれでも相補出力制御信号/RAoutHは後述する図16のアンプ制御回路によりHレベルとなる。したがってリードイネーブル信号がHレベルとなるとき,コンパレータ1412から比較結果が出力される。   When the memory cell 1401 in the sector Sector 3 is read, the complementary output control signal / RAoutH is set to the H level by the amplifier control circuit shown in FIG. 16 described later in both the single-phase cell mode and the complementary cell mode. Therefore, when the read enable signal becomes H level, the comparison result is output from the comparator 1412.

セクタSector4のメモリセル1402を読み出す場合は,単相セルモードではトランジスタ1405はONとなる。また,後述する図16のアンプ制御回路により下位セクタ選択信号LSELはLレベル,上位セクタ選択信号USELはHレベル,相補パス選択信号twinはLレベル,参照セル選択信号/twinはHレベル,相補出力制御信号/RAoutHはHレベルとなる。つまり,コンパレータ1412は,セクタSector4のメモリセルの電流と参照セルRC1の電流との比較結果を出力することとなる。   When reading the memory cell 1402 of the sector Sector4, the transistor 1405 is turned on in the single-phase cell mode. In addition, the lower sector selection signal LSEL is at the L level, the upper sector selection signal USEL is at the H level, the complementary path selection signal twin is at the L level, the reference cell selection signal / twin is at the H level, and the complementary output by the amplifier control circuit of FIG. Control signal / RAoutH is at H level. That is, the comparator 1412 outputs a comparison result between the current of the memory cell in the sector Sector4 and the current of the reference cell RC1.

一方,相補セルモードでは,後述する図16のアンプ制御回路により相補出力制御信号/RAoutHはLレベルとなりトランジスタ1415がONとなる。そのため,コンパレータ1412によるセクタSector3と4との比較結果によらず, 出力はHレベルとなる。このようにしているのは,相補セルモードで上位セクタを読み出すのは誤った読み出しであることから,常に出力がHレベルとするようにしているためである。   On the other hand, in the complementary cell mode, the complementary output control signal / RAoutH becomes L level by the amplifier control circuit of FIG. Therefore, regardless of the comparison result between the sectors Sector 3 and 4 by the comparator 1412, the output becomes the H level. This is because the output is always set to the H level because reading the upper sector in the complementary cell mode is an erroneous reading.

以上のように,図14では,単相セルモードの場合,下位セクタ選択信号LSEL又は上位セクタ選択信号USELがHレベル,相補パス選択信号twinはLレベル,参照セル選択信号/twinはHレベルとなり,下位セクタ又は上位セクタとリファレンスセルとが比較される。   As described above, in FIG. 14, in the single-phase cell mode, the lower sector selection signal LSEL or the upper sector selection signal USEL is H level, the complementary path selection signal twin is L level, and the reference cell selection signal / twin is H level. , The lower sector or the upper sector is compared with the reference cell.

一方,相補セルモードの場合,下位セクタ選択信号LSELがHレベル,上位セクタ選択信号USELがLレベル,相補パス選択信号twinはHレベル,参照セル選択信号/twinはLレベルとなり,下位セクタと上位セクタとが比較される。ただし,相補セルモードでは,上位セクタを読み出すときは誤った読み出しであるため,相補出力制御信号/RAoutHをLレベルにして,比較結果は常にHレベルとする。   On the other hand, in the complementary cell mode, the lower sector selection signal LSEL is at the H level, the upper sector selection signal USEL is at the L level, the complementary path selection signal twin is at the H level, and the reference cell selection signal / twin is at the L level. The sector is compared. However, in the complementary cell mode, when the upper sector is read, it is an erroneous reading, so the complementary output control signal / RAoutH is set to L level and the comparison result is always set to H level.

図15は,第1の実施の形態におけるプログラムパスを示す図である。図15には,セクタSector3のメモリセル1501,又はセクタSector4のメモリセル1502にプログラムする場合のプログラムパスが示されている。   FIG. 15 is a diagram showing a program path in the first embodiment. FIG. 15 shows a program path for programming the memory cell 1501 in the sector Sector3 or the memory cell 1502 in the sector Sector4.

ライトアンプ219は,プログラムパス切替回路1511と,書込みデータDIを増幅するプログラムアンプ1512とを有し,コラムスイッチ218とデータバスDBを介して接続する。   The write amplifier 219 includes a program path switching circuit 1511 and a program amplifier 1512 that amplifies the write data DI, and is connected to the column switch 218 via the data bus DB.

プログラムアンプ1512は,書込みデータDIとプログラムクロック信号/PGMCKとを入力とするNORゲート1513の出力を入力する。   Program amplifier 1512 receives the output of NOR gate 1513 that receives write data DI and program clock signal / PGMCK.

プログラムパス切替回路1511は,インバータ1510と,書込みコマンドPGMによりゲートを駆動するトランジスタ1508,1509と,下位セクタ選択信号LSELによりゲートが駆動されるトランジスタ1505と,上位セクタ選択信号USELによりゲートが駆動されるトランジスタ1506と,相補パス選択信号twinによりゲートが駆動されるトランジスタ1507とを有する。   The program path switching circuit 1511 is driven by an inverter 1510, transistors 1508 and 1509 for driving gates by a write command PGM, a transistor 1505 for driving gates by a lower sector selection signal LSEL, and a gate by an upper sector selection signal USEL. And a transistor 1507 whose gate is driven by a complementary path selection signal twin.

コラムスイッチ218は,図14と同様,グローバルビット線GBLを介してセクタセクタSector3,4に接続する。   The column switch 218 is connected to the sector sectors Sector 3 and 4 via the global bit line GBL, as in FIG.

セクタSector3,4のメモリセル1501,1502のドレインであるローカルビット線LBLは,ローカルビット線選択信号LBSELに駆動されるコラム選択線SSELをゲートとするトランジスタ1503,1504を介してグローバルビット線GBLと接続する。   The local bit line LBL which is the drain of the memory cells 1501 and 1502 of the sectors Sector 3 and 4 is connected to the global bit line GBL via the transistors 1503 and 1504 whose gates are the column selection lines SSEL driven by the local bit line selection signal LBSEL. Connecting.

単相セルモードの場合,セクタSector3のメモリセル1501をプログラムするときは,下位セクタ選択信号LSELがHレベル,上位セクタ選択信号USELがLレベル,相補パス選択信号がLレベルとなる。そして,セクタSector3のトランジスタ1503とプログラムパス切替回路1505のトランジスタ1505とがONし,トランジスタ1506,1507はOFFして,プログラムアンプ1512がセクタSector3のメモリセル1501のドレインに書込みデータDI(0又は1)に応じて高電位又は低電位を印加されプログラム又は消去状態のままにされる。一方で,セクタSector4のメモリセル1502をプログラムするときは,下位セクタ選択信号LSELがLレベル,上位セクタ選択信号USELがHレベル,相補パス選択信号がLレベルとなる。そして,セクタSector4のトランジスタ1504とプログラムパス切替回路1505のトランジスタ1506とがONし,トランジスタ1505,1507はOFFして,プログラムアンプ1512がセクタSector4のメモリセル1502のドレインに書込みデータDI(0又は1)に応じて高電位又は低電位を印加されプログラム又は消去状態のままにされる。   In the single-phase cell mode, when programming the memory cell 1501 of the sector Sector3, the lower sector selection signal LSEL is H level, the upper sector selection signal USEL is L level, and the complementary path selection signal is L level. Then, the transistor 1503 in the sector Sector 3 and the transistor 1505 in the program path switching circuit 1505 are turned on, the transistors 1506 and 1507 are turned off, and the program amplifier 1512 writes the write data DI (0 or 1) to the drain of the memory cell 1501 in the sector Sector 3. ), A high potential or a low potential is applied and the program or erase state is left. On the other hand, when programming the memory cell 1502 of the sector Sector4, the lower sector selection signal LSEL is L level, the upper sector selection signal USEL is H level, and the complementary path selection signal is L level. Then, the transistor 1504 in the sector Sector 4 and the transistor 1506 in the program path switching circuit 1505 are turned on, the transistors 1505 and 1507 are turned off, and the program amplifier 1512 writes the write data DI (0 or 1) to the drain of the memory cell 1502 in the sector Sector 4. ), A high potential or a low potential is applied and the program or erase state is left.

相補セルモードの場合,下位セクタ選択信号LSELがHレベル,上位セクタ選択信号USELがLレベル,相補パス選択信号twinがHレベルとなる。そして,セクタSector3のトランジスタ1503とプログラムパス切替回路1505のトランジスタ1505,1507とがONし,トランジスタ1506はOFFして,メモリセル1501だけでなくメモリセル1502もプログラムアンプ1512と接続する。これにより,メモリセル1501,1502は書込みデータDI(0又は1)に応じてプログラム又は消去状態のままにされる。   In the complementary cell mode, the lower sector selection signal LSEL is H level, the upper sector selection signal USEL is L level, and the complementary path selection signal twin is H level. Then, the transistor 1503 of the sector Sector 3 and the transistors 1505 and 1507 of the program path switching circuit 1505 are turned on, the transistor 1506 is turned off, and not only the memory cell 1501 but also the memory cell 1502 is connected to the program amplifier 1512. As a result, the memory cells 1501 and 1502 are left in the programmed or erased state according to the write data DI (0 or 1).

以上のように,図15では,相補セルモードの場合,下位セクタ選択信号LSELと相補パス選択信号twinがHレベルとなり,下位セクタに書込みデータDI,上位セクタにその反転データがプログラムされる。単相セルモードの場合は,下位セクタ選択信号LSEL又は上位セクタ選択信号USELがHレベルとなり,下位又は上位セクタに書込みデータDIがプログラムされる。   As described above, in FIG. 15, in the complementary cell mode, the lower sector selection signal LSEL and the complementary path selection signal twin become H level, and the write data DI is programmed in the lower sector and the inverted data is programmed in the upper sector. In the single-phase cell mode, the lower sector selection signal LSEL or the upper sector selection signal USEL becomes H level, and the write data DI is programmed in the lower or upper sector.

図16は,第1の実施の形態におけるアンプ制御回路を示す図である。アンプ制御回路216は,セクタSector4〜7それぞれに対して設けられている。図16では,セクタSector4に対するアンプ制御回路が示されている。   FIG. 16 is a diagram illustrating an amplifier control circuit according to the first embodiment. An amplifier control circuit 216 is provided for each of the sectors Sectors 4-7. In FIG. 16, an amplifier control circuit for the sector Sector4 is shown.

セクタSector4〜7のアンプ制御回路はそれぞれセクタアドレス信号Sector Address<0>〜<2>とフラグ信号twins<4>〜<7>とを入力する。そして図16に示す回路を介して,アンプ制御回路216は上位セクタ選択信号USELと,上位セクタ選択信号USELを反転した信号である下位セクタ選択信号LSELと,相補パス選択信号twinと,相補パス選択信号twinと書込みコマンドPGMとの否定論理和である参照セル選択信号/twinと,相補出力制御信号/RAoutHとを出力する。なお,これらの信号は,図14,図15で説明したようにライトアンプ219やリードアンプ220でプログラムパス・リードパスの制御に用いられる。   The amplifier control circuits of the sectors Sector 4 to 7 receive the sector address signals Sector Address <0> to <2> and the flag signals twins <4> to <7>, respectively. Then, through the circuit shown in FIG. 16, the amplifier control circuit 216 receives the upper sector selection signal USEL, the lower sector selection signal LSEL that is an inverted version of the upper sector selection signal USEL, the complementary path selection signal twin, and the complementary path selection. A reference cell selection signal / twin, which is a negative OR of the signal twin and the write command PGM, and a complementary output control signal / RAoutH are output. These signals are used for program path / read path control by the write amplifier 219 and the read amplifier 220 as described with reference to FIGS.

図16のセクタSector4のアンプ制御回路は,インバータ1601〜1602,1604〜1606,1608,1609,1617,1619と,NANDゲート1603,1607,1610〜1616と,NORゲート1618とを有する。これらのうち,NANDゲート1614〜1616,インバータ1617,1619,NORゲート1618をSector4〜7のアンプ制御回路の間で共有している。   The amplifier control circuit of the sector Sector 4 in FIG. 16 includes inverters 1601 to 1602, 1604 to 1606, 1608, 1609, 1617, and 1619, NAND gates 1603, 1607, 1610 to 1616, and a NOR gate 1618. Among these, NAND gates 1614 to 1616, inverters 1617 and 1619, and NOR gate 1618 are shared among the amplifier control circuits of Sectors 4 to 7.

また,セクタSector5〜7のアンプ制御回路は,インバータ1604〜1606,1608,1609とNANDゲート1603,1607,1610〜1613と同様な回路構成を有しており,さらにそれぞれのセクタを選択するセクタアドレス信号Sector Address<0>〜<2>がアンプ制御回路216に入力されたときにNANDゲート1603に相当するNANDゲートの3つ入力がすべてHレベルとなるように領域1620,1621にインバータを配置する又はしない回路である。例えば,セクタSector4であれば,セクタアドレス信号は“100”であるので,セクタアドレス信号Sector Address<0>,<1>に対しインバータ1601,1602が設けられている。   The amplifier control circuits of sectors Sectors 5 to 7 have the same circuit configuration as inverters 1604 to 1606, 1608, and 1609 and NAND gates 1603, 1607, and 1610 to 1613, and sector addresses for selecting the respective sectors. When signals Sector Address <0> to <2> are input to amplifier control circuit 216, inverters are arranged in regions 1620 and 1621 so that all three inputs of the NAND gate corresponding to NAND gate 1603 are at H level. Or a circuit that does not. For example, in the case of sector Sector 4, since the sector address signal is “100”, inverters 1601 and 1602 are provided for sector address signals Sector Address <0> and <1>.

NANDゲート1614は,NANDゲート1611の出力と,NANDゲート1611に相当するセクタSector5〜7それぞれのNANDゲートからの出力との否定論理積を上位セクタ選択信号USELとして出力する。   The NAND gate 1614 outputs a negative logical product of the output of the NAND gate 1611 and the outputs from the NAND gates of the sectors Sectors 5 to 7 corresponding to the NAND gate 1611 as the upper sector selection signal USEL.

同様にNANDゲート1615,1616は,NANDゲート1612,1613の出力と,NANDゲート1612,1613に相当するセクタSector5〜7それぞれのNANDゲートからの出力との否定論理積を相補パス選択信号twin,相補出力制御信号/RAoutHの反転信号としてそれぞれ出力する。   Similarly, the NAND gates 1615 and 1616 complement the NAND of the outputs of the NAND gates 1612 and 1613 and the outputs from the NAND gates of the sectors Sectors 5 to 7 corresponding to the NAND gates 1612 and 1613 with the complementary path selection signal twin. Output as an inverted signal of the output control signal / RAoutH.

例として,図16に示すアンプ制御回路216にセクタSector4のセクタアドレス信号“100”が入力された場合における各信号の出力について以下に説明する。   As an example, the output of each signal when the sector address signal “100” of the sector Sector4 is input to the amplifier control circuit 216 shown in FIG. 16 will be described below.

SectorAddress<0>=“0”,SectorAddress<1>=“0”,SectorAddress<2>=“1”が入力されると,セクタSector4向けアンプ制御回路に対応するセクタアドレス信号が入力されているため,インバータ1608の出力はHレベルとなる。そのため,NANDゲート1611の出力は,フラグ信号twins<4>によって制御されることとみなすことができる。具体的には,フラグ信号twins<4>がLレベル(単相セルモード)であればNANDゲート1611の出力はHレベル,フラグ信号twins<4>がHレベル(相補セルモード)であればLレベルとなる。一方,セクタSector5〜7のアンプ制御回路におけるNANDゲート1611に相当するNANDゲートの出力は全てHレベルとなる。したがって,セクタアドレス信号“100”がアンプ制御回路216に入力されたとき,フラグ信号twins<4>がLレベル(単相セルモード)の場合は上位セクタ選択信号USELはHレベル,下位セクタ選択信号LSELはLレベルとなる。反対に,フラグ信号twins<4>がHレベル(相補セルモード)の場合は,上位セクタ選択信号USELはLレベル,下位セクタ選択信号LSELはHレベルとなる。   When SectorAddress <0> = “0”, SectorAddress <1> = “0”, SectorAddress <2> = “1” is input, the sector address signal corresponding to the amplifier control circuit for sector Sector4 is input. , The output of the inverter 1608 becomes H level. Therefore, it can be considered that the output of the NAND gate 1611 is controlled by the flag signal twins <4>. Specifically, if flag signal twins <4> is at L level (single-phase cell mode), the output of NAND gate 1611 is H level, and if flag signal twins <4> is at H level (complementary cell mode), L Become a level. On the other hand, the outputs of the NAND gates corresponding to the NAND gate 1611 in the amplifier control circuits of the sectors Sectors 5 to 7 are all at the H level. Therefore, when the sector address signal “100” is input to the amplifier control circuit 216, if the flag signal twins <4> is L level (single-phase cell mode), the upper sector selection signal USEL is H level and the lower sector selection signal LSEL becomes L level. On the other hand, when the flag signal twins <4> is at the H level (complementary cell mode), the upper sector selection signal USEL is at the L level and the lower sector selection signal LSEL is at the H level.

NANDゲート1612には,NANDゲート1610の出力とフラグ信号twins<4>が入力されている。セクタアドレス信号“100”が入力された場合は,NANDゲート1610の出力がHレベルとなるため,NANDゲート1612の出力はフラグ信号twins<4>によって制御されることとみなすことができる。具体的には,フラグ信号twins<4>がLレベル(単相セルモード)であればNANDゲート1609の出力はHレベル,フラグ信号twins<4>がHレベル(相補セルモード)であればLレベルとなる。一方,セクタSector5〜7のアンプ制御回路におけるNANDゲート1612に相当するNANDゲートの出力は全てHレベルとなる。したがって,セクタアドレス信号“100”がアンプ制御回路216に入力されたとき,フラグ信号twins<4>がLレベル(単相セルモード)の場合は相補パス選択信号twinはLレベルとなる。反対に,フラグ信号twins<4>がHレベル(相補セルモード)の場合は,相補パス選択信号twinはHレベルとなる。   The NAND gate 1612 receives the output of the NAND gate 1610 and the flag signal twins <4>. When the sector address signal “100” is input, the output of the NAND gate 1610 becomes the H level, so that the output of the NAND gate 1612 can be regarded as being controlled by the flag signal twins <4>. Specifically, if the flag signal twins <4> is L level (single-phase cell mode), the output of the NAND gate 1609 is H level, and if the flag signal twins <4> is H level (complementary cell mode), L Become a level. On the other hand, the outputs of the NAND gates corresponding to the NAND gate 1612 in the amplifier control circuits of the sectors Sectors 5 to 7 are all at the H level. Therefore, when the sector address signal “100” is input to the amplifier control circuit 216, if the flag signal twins <4> is at L level (single phase cell mode), the complementary path selection signal twin is at L level. Conversely, when the flag signal twins <4> is at the H level (complementary cell mode), the complementary path selection signal twin is at the H level.

NANDゲート1613には,インバータ1608の出力とフラグ信号twins<4>が入力される。セクタアドレス信号“100”が入力された場合は,インバータ1608の出力がHレベルとなるため,NANDゲート1613の出力はフラグ信号twins<4>によって制御されるとみなすことができる。具体的には,フラグ信号twins<4>がLレベル(単相セルモード)であればNANDゲート1613の出力はHレベル,フラグ信号twins<4>がHレベル(相補セルモード)であればNANDゲート1610の出力はLレベルとなる。一方,セクタSector5〜7のアンプ制御回路におけるNANDゲート1613に相当するNANDゲートの出力は全てHレベルとなる。したがって,セクタアドレス信号“100”がアンプ制御回路216に入力されたとき,フラグ信号twins<4>がLレベル(単相セルモード)の場合はNANDゲート1616の出力はLレベル,つまり相補出力制御信号/RAoutHはHレベルとなる。反対に,フラグ信号twins<4>がHレベル(相補セルモード)の場合はNANDゲート1616の出力はHレベル,つまり相補出力制御信号/RAoutHはLレベルとなる。以上の出力結果を,セクタSector3のセクタアドレス信号“011”が入力された場合の各信号の出力と併せて図17にまとめる。   The output of the inverter 1608 and the flag signal twins <4> are input to the NAND gate 1613. When the sector address signal “100” is input, since the output of the inverter 1608 is at the H level, the output of the NAND gate 1613 can be regarded as being controlled by the flag signal twins <4>. Specifically, if flag signal twins <4> is at L level (single-phase cell mode), the output of NAND gate 1613 is H level, and if flag signal twins <4> is at H level (complementary cell mode), NAND is output. The output of gate 1610 is at L level. On the other hand, the outputs of the NAND gates corresponding to the NAND gate 1613 in the amplifier control circuits of the sectors Sectors 5 to 7 are all at the H level. Therefore, when the sector address signal “100” is input to the amplifier control circuit 216, if the flag signal twins <4> is L level (single-phase cell mode), the output of the NAND gate 1616 is L level, that is, complementary output control. Signal / RAoutH is at H level. On the other hand, when flag signal twins <4> is at the H level (complementary cell mode), the output of NAND gate 1616 is at the H level, that is, complementary output control signal / RAoutH is at the L level. The above output results are summarized in FIG. 17 together with the output of each signal when the sector address signal “011” of the sector Sector3 is input.

図17は,第1の実施の形態におけるアンプ制御信号の真理値表を示す図である。セクタSector3が選択される場合,単相セルモードのときは下位セクタ選択信号LSELがHレベル,参照セル選択信号/twinがHレベルとなり,相補セルモードのときは下位セクタ選択信号LSELがHレベル,相補パス選択信号twinがHレベルとなる。一方,セクタSector4が選択される場合,単相セルモードのときは上位セクタ選択信号HSELがHレベル,参照セル選択信号/twinがHレベルとなり,相補セルモードのときは好ましくないアクセスであるため,相補出力制御信号/RAoutHはLレベルにしている。すなわち,図14で説明したように,フラグ信号twins<4>がHレベル(相補セルモード)の場合に,セクタSector4(セクタアドレス信号“100”)に対して読み出し要求があったとき,その要求は誤った読み出し要求であるため,Lレベルの相補出力制御信号/RAoutHによりトランジスタ1414がオフ,トランジスタ1415がオンし,リードアンプ220の出力は常に消去状態“1”とするようにしている。   FIG. 17 is a diagram illustrating a truth table of the amplifier control signal in the first embodiment. When sector Sector 3 is selected, the lower sector selection signal LSEL is H level and the reference cell selection signal / twin is H level in the single-phase cell mode, and the lower sector selection signal LSEL is H level in the complementary cell mode. The complementary path selection signal twin becomes H level. On the other hand, when sector Sector 4 is selected, the upper sector selection signal HSEL is H level and the reference cell selection signal / twin is H level in the single-phase cell mode, which is an undesirable access in the complementary cell mode. Complementary output control signal / RAoutH is at L level. That is, as described with reference to FIG. 14, when the flag signal twins <4> is at the H level (complementary cell mode), when there is a read request for the sector Sector4 (sector address signal “100”), the request is made. Is an erroneous read request, the transistor 1414 is turned off and the transistor 1415 is turned on by the L level complementary output control signal / RAoutH, so that the output of the read amplifier 220 is always set to the erased state “1”.

以上のように,アンプ制御回路216は,入力されたセクタアドレス信号に基づいて,上位セクタ選択信号USELと,下位セクタ選択信号LSELと,相補パス選択信号twinと,セル選択信号/twinと,相補出力制御信号/RAoutHとを出力する。また,これらの信号によりライトアンプ219やリードアンプ220ではプログラムパス,リードパスが図14,図15に示すとおり制御される。   As described above, the amplifier control circuit 216 complements the upper sector selection signal USEL, the lower sector selection signal LSEL, the complementary path selection signal twin, the cell selection signal / twin based on the input sector address signal. Output control signal / RAoutH is output. Further, the program path and the read path are controlled as shown in FIGS. 14 and 15 in the write amplifier 219 and the read amplifier 220 by these signals.

このように,第1の実施の形態では,セクタ番号の昇順にアドレスが入力されることでまず下位セクタとそのペアの上位セクタに順に相補セルモードで入力データDIが書込まれ,上位セクタに書込みが発生してからは単相セルモードに切り替わって,上位セクタに入力データが書込まれる。最上位のセクタに入力データDIが書込まれるまでは,それらとペアの最下位セクタとは相補セルモードでデータを記憶するため,信頼性が要求されるデータは最下位のセクタに書込むことが有効である。   As described above, in the first embodiment, when the addresses are input in ascending order of sector numbers, the input data DI is first written in the complementary cell mode sequentially to the lower sector and the upper sector of the pair, and the upper sector is then written. After the writing occurs, the mode is switched to the single-phase cell mode, and the input data is written to the upper sector. Until the input data DI is written in the highest sector, data is stored in the complementary cell mode with the lowest sector of the pair, so data that requires reliability must be written in the lowest sector. Is effective.

[第2の実施の形態]
第2の実施の形態では,書込みの順番をセクタ番号の昇順とはせずに,どのような順番で書込みが要求されても入力された外部アドレス信号FA00〜20に対応するセクタグループに属する下位と上位セクタのセクタ状態データに応じて,相補セルモード又は単相セルモードのいずれかで書込みが行われる。そして,上位セクタへの書込み要求に対しても相補セルモード又は単相セルモードでの書込みを行う。したがって,データに高い信頼性が必要な場合には,下位と上位セクタがともに一括消去状態であるセクタグループのいずれかのセクタに対して,相補セルモードで書込みデータDIが書き込まれる。そして,それ以降は反転データが書込まれたセクタに対しては書込み要求を行わないことで,フラッシュメモリは信頼性の高いデータを保持することができる。
[Second Embodiment]
In the second embodiment, the order of writing is not the ascending order of the sector numbers, and the lower order belonging to the sector group corresponding to the input external address signals FA00 to 20 regardless of the order of writing. According to the sector status data of the upper sector, writing is performed in either the complementary cell mode or the single-phase cell mode. And in response to a write request to the upper sector, writing is performed in the complementary cell mode or single-phase cell mode. Therefore, when high reliability is required for the data, the write data DI is written in the complementary cell mode to any sector of the sector group in which both the lower and upper sectors are in the batch erase state. Thereafter, the flash memory can hold highly reliable data by not making a write request to the sector in which the inverted data is written.

図18は,第2の実施の形態における半導体記憶装置の動作を示すフローチャート図である。図18では,例として,出荷時のフラッシュメモリに対して書込み要求がセクタSector6,3,7,2,4,0,1,5の順で行われている。   FIG. 18 is a flowchart showing the operation of the semiconductor memory device according to the second embodiment. In FIG. 18, as an example, write requests are made to the flash memory at the time of shipment in the order of sectors Sector 6, 3, 7, 2, 4, 0, 1, 5.

セクタグループSG1の上位セクタであるセクタSector6に対して書込み要求が行われると(S1801),セクタ状態メモリアクセス制御回路207はセクタSector6,1のセクタ状態データに基いて相補セルモードと判定し,その結果,セクタSector6には書込みデータDI,セクタSector1にはその反転データが書込まれる(S1802)。そして,セクタ状態メモリ206で保持されているセクタSector6のセクタ状態データは書込み状態となる。   When a write request is made to the sector Sector 6 which is the upper sector of the sector group SG1 (S1801), the sector state memory access control circuit 207 determines the complementary cell mode based on the sector state data of the sectors Sector 6 and 1, and As a result, the write data DI is written in the sector Sector6 and the inverted data is written in the sector Sector1 (S1802). Then, the sector state data of the sector Sector 6 held in the sector state memory 206 is in a write state.

同様にして,セクタSector3,7,2に対して順に書込みデータDIの書込み動作を行うことにより(S1803〜S1808),セクタSector3,7,2には書込みデータDIが,Sector4,0,5にはその反転データが書込まれる。   Similarly, by performing the write operation of the write data DI on the sectors Sector 3, 7 and 2 in order (S1803 to S1808), the write data DI is stored in the sectors Sector 3, 7 and 2, and the Sectors 4, 0 and 5 are stored. The inverted data is written.

このようにステップS1808が終了したときには下位セクタSector2,3と上位セクタSector6,7には書込みデータが,下位セクタSector0,1と上位セクタ4,5には反転データが書込まれている。   Thus, when step S1808 is completed, write data is written in the lower sectors Sector 2 and 3 and upper sectors Sector 6 and 7, and inverted data is written in the lower sectors Sector 0 and 1 and upper sectors 4 and 5.

ステップS1808に続いて,セクタグループ3の上位セクタであるセクタSector4に対して書込み要求があると(S1809),セクタ状態メモリアクセス制御回路207はセクタSector4,3のセクタ状態データに基いて単相セルモードと判定する。その結果,セクタSector4に対して,消去状態“1”のメモリセルすべてをプログラム状態“0”にする書込み動作と,すべてのメモリセルを消去状態“1”にする一括消去動作が行われる。そして,コマンド生成回路201が出力する書込みコマンドPGMに基づき,セクタSector4に対して単相セルモードで書込みデータDIが書込まれる(S1810)。そして,セクタ状態メモリ205に記憶されているセクタSector4のセクタ状態データは書込み状態となる。   Following step S1808, when there is a write request to sector Sector4, which is the upper sector of sector group 3 (S1809), sector state memory access control circuit 207 determines the single-phase cell based on the sector state data of sectors Sector4,3. The mode is determined. As a result, a write operation for setting all memory cells in the erase state “1” to the program state “0” and a batch erase operation for setting all memory cells to the erase state “1” are performed on the sector Sector4. Then, based on the write command PGM output from the command generation circuit 201, the write data DI is written to the sector Sector4 in the single-phase cell mode (S1810). Then, the sector state data of the sector Sector 4 stored in the sector state memory 205 is in a write state.

この後,セクタSector0,1,5について同様にして書込み動作を行うことにより(S1811〜1816),セクタSector0〜7には単相セルモードで書込みデータDIが記憶されることになる。   Thereafter, the write operation is performed in the same manner for the sectors Sector 0, 1, 5 (S1811-1816), whereby the write data DI is stored in the sectors Sector 0-7 in the single-phase cell mode.

このように第2の実施の形態では,任意の順番でセクタを選ぶことが可能であり,下位と上位セクタのセクタ状態データに基づいて書込みデータDIの書込み方式が決定される。したがって,第1の実施の形態と異なり,下位セクタに書込みデータDIの反転データが書込まれる場合がある。   As described above, in the second embodiment, sectors can be selected in an arbitrary order, and the write method of the write data DI is determined based on the sector status data of the lower and upper sectors. Therefore, unlike the first embodiment, the inverted data of the write data DI may be written in the lower sector.

そこで次に図19を用いて,1つのセクタグループの下位セクタと上位セクタにおける,セクタ状態メモリアクセス制御回路207の判定結果の遷移について説明する。   Then, the transition of the determination result of the sector state memory access control circuit 207 in the lower sector and the upper sector of one sector group will be described with reference to FIG.

図19は,第2の実施の形態における下位セクタと上位セクタのセクタ状態を示す図である。   FIG. 19 is a diagram illustrating sector states of the lower sector and the upper sector in the second embodiment.

図19は,初期状態を起点とする(S1901)。そして,ステップ1907までは,図4のステップS402〜S407と同様に,下位,上位セクタに対して書込み要求,一括消去要求がされ,書込み方式が判定される(S1902〜S1907)。   FIG. 19 starts from the initial state (S1901). Up to step 1907, as in steps S402 to S407 in FIG. 4, a write request and batch erase request are made to the lower and upper sectors, and the write method is determined (S1902 to S1907).

下位及び上位セクタがともに初期状態であるステップS1907に続いて,上位セクタに対して書込みコマンドPGMが生成された場合(S1908),セクタ状態メモリアクセス制御回路207は下位セクタ,上位セクタのセクタ状態信号に基づき相補セルモードと判定し,フラグ信号生成回路211からHレベルのフラグ信号twinsが出力される。そして,上位セクタのセクタ状態データは一括消去状態から書込み状態になり,上位セクタのセクタ状態メモリからはHレベルのセクタ状態信号が出力され,下位セクタからはLレベルのセクタ状態信号が出力される。   Subsequent to step S1907 in which both the lower and upper sectors are in the initial state, when a write command PGM is generated for the upper sector (S1908), the sector state memory access control circuit 207 determines the sector status signals of the lower and upper sectors. And the flag signal generation circuit 211 outputs an H level flag signal twins. Then, the sector status data of the upper sector changes from the batch erase state to the write state, the sector status signal of the upper sector outputs an H level sector status signal, and the lower sector outputs an L level sector status signal. .

次に,下位セクタに対して書込みコマンドPGMを生成した場合(S1909),セクタ状態メモリアクセス制御回路207は単相セルモードと判定し,フラグ信号生成回路211からLレベルのフラグ信号twinsが出力される。そして,下位セクタのセクタ状態データは一括消去状態から書込み状態になり,下位セクタのセクタ状態メモリからはHレベル,上位セクタのセクタ状態メモリからはHレベルのセクタ状態信号がそれぞれ出力される。   Next, when the write command PGM is generated for the lower sector (S1909), the sector state memory access control circuit 207 determines that the mode is the single-phase cell mode, and the flag signal generation circuit 211 outputs the L level flag signal twins. The Then, the sector status data of the lower sector changes from the batch erase state to the write state, and a sector status signal of H level is output from the sector status memory of the lower sector, and an H level sector status signal is output from the sector status memory of the upper sector.

ステップS1909の状態から上位セクタ,下位セクタに対して一括消去コマンドERSが生成された場合(S1910,S1911),S1910,S1911いずれにおいてもセクタ状態メモリアクセス制御回路207は単相セルモードと判定し,フラグ信号生成回路211から出力されるフラグ信号twinsはLレベルのままである。そして,上位セクタ,下位セクタのセクタ状態データは順に書込み状態(Hレベル)から一括消去状態(Lレベル)になる。   When the batch erase command ERS is generated for the upper sector and the lower sector from the state of step S1909 (S1910, S1911), the sector state memory access control circuit 207 determines that the single-phase cell mode is used in both S1910 and S1911. The flag signal twins output from the flag signal generation circuit 211 remains at the L level. Then, the sector status data of the upper sector and the lower sector sequentially change from the write state (H level) to the batch erase state (L level).

さらに,下位及び上位セクタがともに初期状態であるステップS1911(セクタ状態メモリの出力がともにLレベル)の状態から下位セクタに対して書込みコマンドPGMが生成された場合(S1912),セクタ状態メモリアクセス制御回路207は相補セルモードと判定し,フラグ信号twinsはHレベルに切り替わる。そして,下位セクタのセクタ状態データは一括消去状態から書込み状態になり,下位セクタのセクタ状態メモリのセクタ状態信号はHレベルとなる。   Further, when the write command PGM is generated for the lower sector from the state of step S1911 (both the output of the sector state memory is at L level) in which both the lower and upper sectors are in the initial state (S1912), the sector state memory access control The circuit 207 determines the complementary cell mode, and the flag signal twins is switched to the H level. Then, the sector status data of the lower sector changes from the batch erase state to the write state, and the sector status signal of the sector status memory of the lower sector becomes H level.

このように第2の実施の形態では,下位セクタ,上位セクタのセクタ状態信号がともにLレベル(一括消去状態)である状態から,いずれか一方のセクタ状態信号がHレベル(書込み状態)になる場合に,セクタ状態メモリアクセス制御回路207は相補セルモードと判定し,これにより出力されるフラグ信号twinsはHレベルになる。つまり,セクタとそのペアのセクタのセクタ状態データに基づいて書込み方式が決まる。したがって,任意のセクタに信頼性の高いデータを相補セルモードで書込み,それ以降はそのセクタとそのペアのセクタに対して書込みを行わないことにより,任意のセクタに信頼性の高いデータを保持させることが可能である。   Thus, in the second embodiment, one of the sector status signals is changed to the H level (write state) from the state where the sector status signals of the lower sector and the upper sector are both at the L level (collective erase state). In this case, the sector state memory access control circuit 207 determines that the complementary cell mode is selected, and the flag signal twins output thereby becomes H level. That is, the write method is determined based on the sector status data of the sector and the paired sector. Therefore, reliable data is written in an arbitrary sector in complementary cell mode, and thereafter, writing to that sector and its paired sector is not performed, so that reliable data is retained in an arbitrary sector. It is possible.

次に第2の実施の形態における書込み方式の判定動作について説明する。図20は,第2の実施の形態における書込み方式の判定動作を示す図である。第2の実施の形態では,図19で述べたように,同じセクタグループに属する下位セクタと上位セクタとが一括消去状態である場合に,下位又は上位セクタのいずれかに書込み要求があると,相補セルモードで下位および上位セクタに書込みが行われる。そこで図20では,図5に対してさらに上位セクタ単相相補メモリ2005とラッチ回路2007とが設けられている。なお,第1の実施の形態と同様,第2の実施の形態においても,セクタ状態メモリ206とフラグ信号生成回路211とは,セクタグループごとに設けられる。   Next, the write method determination operation in the second embodiment will be described. FIG. 20 is a diagram illustrating a write mode determination operation according to the second embodiment. In the second embodiment, as described in FIG. 19, when a lower sector and an upper sector belonging to the same sector group are in a batch erase state, if there is a write request in either the lower or upper sector, Writing to the lower and upper sectors is performed in the complementary cell mode. Therefore, in FIG. 20, an upper sector single-phase complementary memory 2005 and a latch circuit 2007 are further provided as compared with FIG. As in the first embodiment, in the second embodiment, the sector state memory 206 and the flag signal generation circuit 211 are provided for each sector group.

両セクタ状態メモリ2001,2002のセクタ状態データは,書込みコマンドPGMと一括消去コマンドERSに応答して,それぞれの状態に書き換えられる。そして,セクタ状態メモリ2001,2002から出力されるセクタ状態信号c1outL,c1outUは,セクタ状態メモリアクセス制御回路207に供給される。また,図5と同様に,単相相補メモリ用のプログラムイネーブル信号c2PGMenがセクタ状態メモリアクセス制御回路207に供給される。   The sector state data in both sector state memories 2001 and 2002 are rewritten to the respective states in response to the write command PGM and the batch erase command ERS. The sector status signals c1outL and c1outU output from the sector status memories 2001 and 2002 are supplied to the sector status memory access control circuit 207. Similarly to FIG. 5, the program enable signal c2PGMan for the single-phase complementary memory is supplied to the sector state memory access control circuit 207.

下位セクタ単相相補メモリ2004と上位セクタ単相相補メモリ2005とは,動作制御回路208からアドレス信号ADと書込みコマンドPGM又は一括消去コマンドERSが供給されたときに,両セクタ状態メモリ2001,2002のセクタ状態データに基づいて,単相セルモード又は相補セルモードの判定結果を示す単相相補判定データを格納するメモリである。両単相相補メモリ2004,2005は,Hレベル(相補セルモード)又はLレベル(単相セルモード)の単相相補判定信号c2outL,c2outUを出力する。   The lower sector single-phase complementary memory 2004 and the upper sector single-phase complementary memory 2005 are stored in both the sector state memories 2001 and 2002 when the address signal AD and the write command PGM or the batch erase command ERS are supplied from the operation control circuit 208. A memory for storing single-phase complementary determination data indicating a determination result of the single-phase cell mode or the complementary cell mode based on the sector state data. Both single-phase complementary memories 2004 and 2005 output single-phase complementary determination signals c2outL and c2outU of H level (complementary cell mode) or L level (single-phase cell mode).

例えば,初期状態(セクタ状態信号c1outL,c1outUがともにLレベル(一括消去状態)),すなわちプログラムイネーブル信号c2PGMenがHレベルのときに,下位セクタに対して書込みコマンドPGMが生成されると,セクタ状態メモリアクセス制御回路207は下位セクタ単相相補メモリ2004の単相相補判定データをLレベル(単相セルモード)からHレベル(相補セルモード)にする。一方,上位セクタ単相相補メモリ2005はLレベル(単相セルモード)を維持する。そして,下位セクタ状態メモリ2001のセクタ状態信号c1outLは,書込みコマンドPGMに応答して,Hレベル(書込み状態)になる。この状態からさらに,下位セクタに対して一括消去コマンドERSが生成された場合,又は上位セクタに対して書込みコマンドPGMが生成された場合のいずれかの場合,セクタ状態メモリアクセス制御回路207は,下位セクタ単相相補メモリ2004の単相相補判定データをHレベル(相補セルモード)からLレベル(単相セルモード)にする。このとき上位セクタ単相相補メモリ2005の単相相補判定データはL(単相セルモード)のままである。   For example, when the write command PGM is generated for the lower sector in the initial state (sector state signals c1outL and c1outU are both at L level (batch erase state)), that is, the program enable signal c2PGMan is at H level, The memory access control circuit 207 changes the single-phase complementary determination data of the lower sector single-phase complementary memory 2004 from L level (single-phase cell mode) to H level (complementary cell mode). On the other hand, the upper sector single-phase complementary memory 2005 maintains the L level (single-phase cell mode). Then, the sector state signal c1outL of the lower sector state memory 2001 becomes H level (write state) in response to the write command PGM. From this state, when either the batch erase command ERS is generated for the lower sector or the write command PGM is generated for the upper sector, the sector state memory access control circuit 207 The single-phase complementary determination data in the sector single-phase complementary memory 2004 is changed from H level (complementary cell mode) to L level (single-phase cell mode). At this time, the single-phase complementary determination data in the upper sector single-phase complementary memory 2005 remains L (single-phase cell mode).

上記例とは反対に,初期状態のときに上位セクタに対して書込みコマンドPGMが生成されると,上位セクタ単相相補メモリ2005の単相相補判定データはLレベル(単相セルモード)からHレベル(相補セルモード)になるが,下位セクタ単相相補2004メモリの単相相補判定データはLレベル(単相セルモード)を維持する。そして,上位セクタ状態メモリ2002のセクタ状態信号c1outUは,書込みコマンドPGMに応答して,Hレベル(書込み状態)になる。この状態からさらに,上位セクタに対して一括消去コマンドERSが生成された場合,又は下位セクタに対して書込みコマンドPGMが生成された場合のいずれかの場合に,上位セクタ単相相補メモリ2005の単相相補判定データはHレベル(相補セルモード)からLレベル(単相セルモード)になる。このとき下位セクタ単相相補メモリ2004の単相相補判定データはL(単相セルモード)のままである。   Contrary to the above example, when the write command PGM is generated for the upper sector in the initial state, the single-phase complementary determination data in the upper-sector single-phase complementary memory 2005 changes from L level (single-phase cell mode) to H Although the level (complementary cell mode) is set, the single-phase complementary determination data in the lower sector single-phase complementary 2004 memory maintains the L level (single-phase cell mode). Then, the sector state signal c1outU of the upper sector state memory 2002 becomes H level (write state) in response to the write command PGM. From this state, when either the batch erase command ERS is generated for the upper sector or the write command PGM is generated for the lower sector, the single unit of the upper sector single-phase complementary memory 2005 is stored. The phase complement determination data changes from H level (complementary cell mode) to L level (single phase cell mode). At this time, the single-phase complementary determination data in the lower sector single-phase complementary memory 2004 remains L (single-phase cell mode).

フラグ信号生成回路211は,コントロールクロック信号ControlCLKの立ち上がりに応答して,単相相補メモリ2004,2005の単相相補判定信号c2outL,c2outUをラッチ回路2006,2007でラッチし,それぞれのフラグ信号twinsを出力する。なお,コントロールクロック信号ControlCLKは,図5と同様,OR信号に応答して動作制御回路208で生成される。また,ラッチ回路2006,2007は,図5と同様,パワーオンリセット信号PORに応答してリセットされる。   In response to the rise of the control clock signal ControlCLK, the flag signal generation circuit 211 latches the single-phase complementary determination signals c2outL and c2outU of the single-phase complementary memories 2004 and 2005 by the latch circuits 2006 and 2007, and each flag signal twins is latched. Output. The control clock signal ControlCLK is generated by the operation control circuit 208 in response to the OR signal, as in FIG. The latch circuits 2006 and 2007 are reset in response to the power-on reset signal POR, as in FIG.

フラグ信号twinsは,セクタグループごとに2種類の信号となって出力される。ラッチ回路2006から出力されるフラグ信号twins<4>〜<7>は,それぞれ,セクタSector3,2,1,0に対するセクタSector4,5,6,7の書込み方式を表す。また,ラッチ回路2007から出力されるフラグ信号twins<0>〜<3>は,それぞれ,セクタSector7,6,5,4に対するセクタSector0,1,2,3の書込み方式を表す。   The flag signal twins is output as two types of signals for each sector group. The flag signals twins <4> to <7> output from the latch circuit 2006 represent the writing schemes of the sectors Sector 4, 5, 6, and 7 for the sectors Sector 3, 2, 1, and 0, respectively. Further, flag signals twins <0> to <3> output from the latch circuit 2007 represent the writing methods of the sectors Sector 0, 1, 2, and 3 with respect to the sectors Sector 7, 6, 5, and 4, respectively.

例えば,セクタSector0,Sector7のセクタ状態信号がLレベル(一括消去状態)である場合に,セクタSector0に対して書込み要求があると,下位セクタ単相相補メモリ2004の単相相補判定信号c2outLはHレベル(相補セルモード)になる。これにより,セクタSector7のフラグ信号twins<7>はLレベル(単相セルモード)からHレベル(相補セルモード)となる。このとき,セクタSector0のフラグ信号twins<0>はLレベル(単相セルモード)のままである。   For example, when the sector status signals of the sectors Sector0 and Sector7 are at the L level (batch erase status), if there is a write request to the sector Sector0, the single-phase complementary determination signal c2outL of the lower sector single-phase complementary memory 2004 is H Level (complementary cell mode). As a result, the flag signal twins <7> of the sector Sector7 changes from the L level (single phase cell mode) to the H level (complementary cell mode). At this time, the flag signal twins <0> of the sector Sector0 remains at the L level (single phase cell mode).

一方,セクタSector0,Sector7のセクタ状態信号がLレベル(一括消去状態)である場合に,セクタSector7に対して書込み要求があると,上位セクタ単相相補メモリ2005の単相相補判定信号c2outUはHレベル(相補セルモード)になる。これにより,セクタSector0のフラグ信号twins<0>はLレベル(単相セルモード)からHレベル(相補セルモード)となる。このとき,セクタSector7のフラグ信号twins<7>はLレベル(単相セルモード)のままである。   On the other hand, when the sector status signals of the sectors Sector0 and Sector7 are at the L level (batch erase state), if there is a write request to the sector Sector7, the single-phase complementary determination signal c2outU of the upper sector single-phase complementary memory 2005 is H Level (complementary cell mode). As a result, the flag signal twins <0> of the sector Sector0 changes from the L level (single phase cell mode) to the H level (complementary cell mode). At this time, the flag signal twins <7> of the sector Sector 7 remains at the L level (single phase cell mode).

このようにして,下位セクタと上位セクタのセクタ状態データに基づき,セクタ状態メモリアクセス制御回路207は,単相又は相補セルモードの判定を行う。   In this manner, the sector state memory access control circuit 207 determines the single-phase or complementary cell mode based on the sector state data of the lower sector and the upper sector.

図21は,第2の実施の形態におけるフラッシュメモリの下位および上位セクタがともに一括消去状態であるときに,下位セクタ,上位セクタの順に書込み要求があった場合のフラグ信号の波形図である。図21では,同じセクタグループ内の下位セクタ,上位セクタの順に時間T0,T1で書込みコマンドPGMを生成した後に,下位セクタ,上位セクタの順に時間T2,T3で一括消去コマンドERSを生成し,時間T4,T5では上位セクタ,下位セクタの順に書込みコマンドPGMを生成している。   FIG. 21 is a waveform diagram of a flag signal when a write request is made in the order of the lower sector and the upper sector when both the lower and upper sectors of the flash memory in the second embodiment are in the batch erase state. In FIG. 21, after the write command PGM is generated at times T0 and T1 in the order of the lower sector and the upper sector in the same sector group, the batch erase command ERS is generated at times T2 and T3 in the order of the lower sector and the upper sector. At T4 and T5, the write command PGM is generated in the order of the upper sector and the lower sector.

時間T0〜T3については,下位,上位セクタ状態信号c1outL,c1outUと下位セクタ単相相補判定信号c2outLとフラグ信号twins<4>〜<7>の波形は,図6と同様である。また,上位セクタ単相相補判定信号c2outUとフラグ信号twins<0>〜<3>については,Lレベルを維持する。また,時間T3で両セクタ状態メモリ2001,2002が初期状態となる。   Regarding times T0 to T3, the waveforms of the lower and upper sector status signals c1outL and c1outU, the lower sector single-phase complementary determination signal c2outL, and the flag signals twins <4> to <7> are the same as those in FIG. Further, the upper sector single-phase complementary determination signal c2outU and the flag signals twins <0> to <3> are maintained at the L level. At time T3, both sector state memories 2001 and 2002 are in the initial state.

時間T4の上位セクタに対する書込みコマンドPGMの立ち上がりと,その直前の単相相補メモリ用のプログラムイネーブル信号c2PGMen(Hレベル)に基づき,上位セクタ単相相補メモリ2005の単相相補判定データは,Lレベル(単相セルモード)からHレベル(相補セルモード)になる。これにより,上位セクタ単相相補メモリ2005が出力する単相相補判定信号c2outUもLレベル(単相セルモード)からHレベル(相補セルモード)になる。また,時間T4で上位セクタに対する書込みコマンドPGMの立ち上がりに応答して,上位セクタのセクタ状態メモリ2002のセクタ状態信号c1outUはHレベルとなり,セクタ状態データは書込み状態となる。そして,ラッチ回路2007は,時間C4のコントロールクロック信号ControlCLKの立ち上がりに応答して単相相補判定信号c2outLをラッチし,Hレベル(相補セルモード)のフラグ信号twins<0>〜<3>を出力する。   Based on the rise of the write command PGM for the upper sector at time T4 and the program enable signal c2PGMen (H level) for the single-phase complementary memory immediately before that, the single-phase complementary determination data in the upper sector single-phase complementary memory 2005 is at the L level. From (single phase cell mode) to H level (complementary cell mode). As a result, the single-phase complementary determination signal c2outU output from the upper sector single-phase complementary memory 2005 also changes from the L level (single-phase cell mode) to the H level (complementary cell mode). Further, in response to the rise of the write command PGM for the upper sector at time T4, the sector state signal c1outU of the sector state memory 2002 of the upper sector becomes H level, and the sector state data is in the write state. The latch circuit 2007 latches the single-phase complementary determination signal c2outL in response to the rise of the control clock signal ControlCLK at time C4, and outputs H level (complementary cell mode) flag signals twins <0> to <3>. To do.

時間T5の下位セクタに対する書込みコマンドPGMの立ち上がりに応答して,上位セクタ単相相補メモリ2005の単相相補判定データはHレベル(相補セルモード)からLレベル(単相セルモード)になる。これにより単相相補判定信号c2outUもHレベル(相補セルモード)からLレベル(単相セルモード)になる。このとき,下位セクタのセクタ状態信号c1outLがHレベルとなり,下位セクタ状態メモリ2001のセクタ状態データは書込み状態となる。ラッチ回路2007は,時間C5のコントロールクロック信号ControlCLKの立ち下がりに応答して単相相補判定信号c2outLをラッチし,Lレベル(単相セルモード)のフラグ信号twins<0>〜<3>を出力する。   In response to the rise of the write command PGM for the lower sector at time T5, the single-phase complementary determination data in the upper sector single-phase complementary memory 2005 changes from H level (complementary cell mode) to L level (single-phase cell mode). As a result, the single-phase complementary determination signal c2outU also changes from the H level (complementary cell mode) to the L level (single-phase cell mode). At this time, the sector status signal c1outL of the lower sector becomes H level, and the sector status data in the lower sector status memory 2001 is in the write state. The latch circuit 2007 latches the single-phase complementary determination signal c2outL in response to the fall of the control clock signal ControlCLK at time C5, and outputs an L-level (single-phase cell mode) flag signal twins <0> to <3>. To do.

このように,下位セクタ,上位セクタがともに一括消去状態であるときに上位セクタに書込みコマンドPGMが生成されることで,上位セクタ単相相補メモリ2005の判定結果は単相セルモードから相補セルモードに切り替わる。さらに下位セクタに書込みコマンドPGMを生成すると上位セクタ単相相補メモリ2005の判定結果は単相セルモードに切り替わる。逆に両セクタがともに一括消去状態のとき下位セクタに書込みコマンドPGMが生成されると,上記と逆の動作になる。   As described above, when both the lower sector and the upper sector are in the batch erase state, the write command PGM is generated in the upper sector, so that the determination result of the upper sector single-phase complementary memory 2005 is changed from the single-phase cell mode to the complementary cell mode. Switch to Further, when the write command PGM is generated in the lower sector, the determination result of the upper sector single-phase complementary memory 2005 is switched to the single-phase cell mode. On the other hand, if the write command PGM is generated in the lower sector when both sectors are in the batch erase state, the operation is reversed.

図22は,第2の実施の形態における外部電源がオンされたときの各信号の立ち上がりを示す波形図である。図22(1)は,下位セクタ,上位セクタともにセクタ状態信号c1outL,c1outUがHレベル(書込み状態),単相相補判定信号c2outL,c2outUがLレベル(単相セルモード)の場合の波形である。そして,図22(2)は,下位セクタのセクタ状態信号c1outLがHレベル(書込み状態),上位セクタのセクタ状態信号c1outUがLレベル(一括消去状態),単相相補判定信号c2outLがHレベル(相補セルモード),c2outUがLレベル(単相セルモード)の場合の波形である。   FIG. 22 is a waveform diagram showing the rise of each signal when the external power supply in the second embodiment is turned on. FIG. 22 (1) shows waveforms when the sector status signals c1outL and c1outU are at the H level (write state) and the single-phase complementary determination signals c2outL and c2outU are at the L level (single-phase cell mode) in both the lower sector and the upper sector. . 22 (2) shows that the sector status signal c1outL of the lower sector is H level (write state), the sector status signal c1outU of the upper sector is L level (batch erase state), and the single-phase complementary determination signal c2outL is H level ( Complementary cell mode) and c2outU are in the L level (single phase cell mode).

図22(1),(2)のいずれも,図8(1),(2)と同様,外部電源がオンされると,フラグ信号twinsはパワーオンリセット信号によりリセットされる。そして,外部電源が立ち上がったときに,セクタ状態信号c1outL,c1outUと単相相補判定信号c2outL,c2outUは外部電源がオフされる直前の状態となる。また,このときラッチ回路2006,2007はそれぞれ単相相補判定信号c2outL,c2outUをラッチし,外部電源がオフされる直前と同じ電圧レベルのフラグ信号twinsを出力する。   22 (1) and 22 (2), as in FIGS. 8 (1) and 8 (2), when the external power supply is turned on, the flag signal twins is reset by the power-on reset signal. When the external power supply is turned on, the sector state signals c1outL and c1outU and the single-phase complementary determination signals c2outL and c2outU are in a state immediately before the external power supply is turned off. At this time, the latch circuits 2006 and 2007 latch the single-phase complementary determination signals c2outL and c2outU, respectively, and output the flag signal twins having the same voltage level as that immediately before the external power supply is turned off.

第2の実施の形態では,第1の実施の形態と同様,相補セルモードで反転データが書込まれているときに,一括消去状態のセクタに対して書込みコマンドPGMが,もしくは書込み状態のセクタに対して一括消去コマンドERSが生成されると,フラグ信号twinsはLレベル(単相セルモード)になる。例えば,図19のステップS1903,1904等である。そして,セクタ状態メモリ2001,2002のうち一括消去状態から書込み状態に変わる側のセクタに書込まれている反転データが一括消去された後,生成されたコマンド信号の動作が開始される。そのため,第1の実施の形態と同様に,反転データの一括消去中にフラッシュメモリの電源がオフとなった場合に,電源をオンにしても反転データの一括消去動作を完了させることが必要となる。そこで,次に反転データの一括消去動作について説明する。   In the second embodiment, as in the first embodiment, when inverted data is written in the complementary cell mode, the write command PGM is issued for the sector in the batch erase state or the sector in the write state. On the other hand, when the batch erase command ERS is generated, the flag signal twins becomes L level (single phase cell mode). For example, steps S1903 and 1904 in FIG. Then, after the inverted data written in the sector on the side of the sector state memory 2001, 2002 that changes from the batch erase state to the write state is erased collectively, the operation of the generated command signal is started. Therefore, as in the first embodiment, when the power of the flash memory is turned off during batch erase of inverted data, it is necessary to complete the batch erase operation of inverted data even when the power is turned on. Become. Therefore, the batch erase operation for inverted data will be described next.

図23は第2の実施の形態における内部ERSコマンドの生成を示すブロック図である。図9と同様に,フラッシュメモリの電源をオンとしたときにフラグ信号twins<0>〜<7>いずれかがLレベル(単相セルモード)で,対応する内部フラグ信号int-twins<0>〜<7>がHレベル(相補セルモード)であれば,中断した一括消去動作を再開するために,セクタ状態メモリアクセス制御回路207より該当のセクタに対するERS開始信号が出力される。そして,一括消去動作が完了すると,動作制御回路208よりERS完了信号が出力され,ERS用セクタ状態メモリ2301の内部フラグ信号int-twinsはLレベル(単相セルモード)になる。また,電源がオンしたときは,セクタ状態メモリアクセス制御回路207はパワーオン制御クロック信号に応答して,フラグ信号と内部フラグ信号に基づき,ERS開始信号の出力するか,しないかを判断する。   FIG. 23 is a block diagram showing generation of an internal ERS command in the second embodiment. Similarly to FIG. 9, when the flash memory is turned on, any one of the flag signals twins <0> to <7> is at the L level (single-phase cell mode), and the corresponding internal flag signal int-twins <0> If .about. <7> is at the H level (complementary cell mode), the sector state memory access control circuit 207 outputs an ERS start signal for the corresponding sector in order to resume the interrupted batch erase operation. When the batch erase operation is completed, an ERS completion signal is output from the operation control circuit 208, and the internal flag signal int-twins in the ERS sector state memory 2301 becomes L level (single phase cell mode). When the power is turned on, the sector state memory access control circuit 207 determines whether or not to output the ERS start signal based on the flag signal and the internal flag signal in response to the power-on control clock signal.

例えば,セクタSector0,Sector7がともに一括消去状態である場合に,セクタSector7に書込み要求があるとフラグ信号twins<0>はLレベル(単相セルモード)からHレベル(相補セルモード)になる。一方,フラグ信号twins<7>,内部フラグ信号int-twins<0>,<7>はLレベル(単相セルモード)のままである。また,セクタSector7のセクタ状態メモリ2002は一括消去状態から書込み状態に切り替わるが,セクタSector0のセクタ状態メモリ2001は一括消去状態のままである。そして,フラグ信号twins<0>,<7>と内部フラグ信号int-twins<0>,<7>に基づいて,セクタ状態メモリアクセス制御回路207は,内部フラグ制御信号int‐tc<0>を出力する。内部フラグ制御信号int‐tc<0>に応答して,ERS用セクタ状態メモリ2301は,内部フラグ信号int-twins<0>をHレベル(相補セルモード)にする。そして,フラッシュメモリは上記の書込み要求に対応して,セクタSector7には書込みデータDIを,セクタSector0にはその反転データを書込む。この動作は,図10の時間T16,T17の動作と同じである。   For example, when both of the sectors Sector0 and Sector7 are in the batch erase state, the flag signal twins <0> changes from the L level (single-phase cell mode) to the H level (complementary cell mode) when there is a write request to the sector Sector7. On the other hand, the flag signal twins <7> and the internal flag signals int-twins <0>, <7> remain at the L level (single-phase cell mode). In addition, the sector state memory 2002 of the sector Sector7 switches from the batch erase state to the write state, but the sector state memory 2001 of the sector Sector0 remains in the batch erase state. Then, based on the flag signals twins <0>, <7> and the internal flag signals int-twins <0>, <7>, the sector state memory access control circuit 207 generates the internal flag control signal int-tc <0>. Output. In response to the internal flag control signal int-tc <0>, the ERS sector state memory 2301 sets the internal flag signal int-twins <0> to the H level (complementary cell mode). In response to the write request, the flash memory writes the write data DI in the sector Sector7 and the inverted data in the sector Sector0. This operation is the same as the operation at time T16 and T17 in FIG.

次に,上記の相補セルモードの状態からセクタSector7に一括消去要求があると,フラグ信号twins<0>はHレベル(相補セルモード)からLレベル(単相セルモード)になる。一方,フラグ信号twins<7>はLレベル(単相セルモード),内部フラグ信号int-twins<0>はHレベル(相補セルモード),内部フラグ信号int-twins<7>はLレベル(単相セルモード)のままである。また,セクタSector7のセクタ状態メモリ2002は書込み状態から一括消去状態に切り替わる。このとき,未だセクタSector0内の反転データは一括消去されず,反転データがセクタSector0に保持されている。そこで,セクタ状態メモリアクセス制御回路207は,セクタSector0の反転データを一括消去するために,フラグ信号twins<0>,<7>と内部フラグ信号int-twins<0>,<7>に基づいて,セクタSector0向けERS開始信号を出力する。その後は,第1の実施の形態の図9と同様,反転データの一括消去が完了すると動作制御回路208は,セクタSector0向けERS完了信号をセクタ状態メモリアクセス制御回路207へ出力する。そして,このERS完了信号に応答して,ERS用セクタ状態メモリ2301は,内部フラグ信号int-twins<0>をHレベル(相補セルモード)からLレベル(単相セルモード)にする。これは図10の時間T11〜T14,T19〜T22と同じ動作である。さらに,フラッシュメモリは通常動作としてセクタSector7の一括消去を行い,セクタSector7,0のセルはすべて消去状態“1”となる。   Next, when there is a batch erase request in the sector Sector 7 from the complementary cell mode, the flag signal twins <0> is changed from H level (complementary cell mode) to L level (single phase cell mode). On the other hand, the flag signal twins <7> is at the L level (single phase cell mode), the internal flag signal int-wins <0> is at the H level (complementary cell mode), and the internal flag signal int-wins <7> is at the L level (single cell mode). Phase cell mode). Further, the sector state memory 2002 of the sector Sector7 is switched from the write state to the batch erase state. At this time, the inverted data in the sector Sector0 is not yet erased at once, and the inverted data is held in the sector Sector0. Therefore, the sector state memory access control circuit 207 is based on the flag signals twins <0>, <7> and the internal flag signals int-twins <0>, <7> in order to erase all the inverted data of the sector Sector0. , ERS start signal for sector Sector0 is output. Thereafter, as in FIG. 9 of the first embodiment, when the batch erase of the inverted data is completed, the operation control circuit 208 outputs an ERS completion signal for the sector Sector0 to the sector state memory access control circuit 207. In response to the ERS completion signal, the ERS sector state memory 2301 changes the internal flag signal int-twins <0> from the H level (complementary cell mode) to the L level (single phase cell mode). This is the same operation at times T11 to T14 and T19 to T22 in FIG. Further, the flash memory performs batch erase of the sector Sector 7 as a normal operation, and all cells in the sector Sector 7, 0 are in the erased state “1”.

上記例とは反対に,セクタSector0が書込み状態,セクタSector7が一括消去状態のときの相補セルモードの状態において,セクタSector0に対して一括消去要求があった場合の動作は,図9で説明した動作と同様である。この場合は,フラグ信号twins<7>,<0>及び内部フラグ信号int-twins<0>はLレベル(単相セルモード),内部フラグ信号int-twins<7>はHレベル(相補セルモード)となる。このとき,未だセクタSector7内の反転データは一括消去されず,反転データがセクタSector7に保持されている。そのため,セクタSector7の反転データが一括消去された後に,フラッシュメモリは通常動作としてセクタSector0の一括消去を行い,セクタSector0及びセクタSector7のセルはすべて消去状態“1”となる。   Contrary to the above example, in the complementary cell mode state when sector Sector0 is in the write state and sector Sector7 is in the batch erase state, the operation when there is a batch erase request to sector Sector0 has been described with reference to FIG. The operation is the same. In this case, the flag signals twins <7> and <0> and the internal flag signal int-twins <0> are at L level (single-phase cell mode), and the internal flag signal int-wins <7> is at H level (complementary cell mode). ) At this time, the inverted data in the sector Sector 7 is not yet erased at once, and the inverted data is held in the sector Sector 7. For this reason, after the inverted data of sector Sector7 is erased at once, the flash memory performs batch erase of sector Sector0 as a normal operation, and the cells in sector Sector0 and sector Sector7 are all in the erased state “1”.

以上のとおり,ペアリングされているセクタ対が相補セルモードの状態において,ペアセクタ対のうち書込み状態のセクタに対して一括消去が要求されると,フラッシュメモリはそのペアの他方のセクタの反転データがすべて削除されてから,一括消去が要求されたセクタに一括消去動作を行う。この反転データの削除動作は,フラグ信号twinsがLレベル,内部フラグ信号int-twinsがHレベルである場合に行われる。したがって,上記例だけでなく,第2の実施の形態においても第1の実施の形態と同様に,(1)相補セルモードの場合において,反転データが書込まれているセクタに対して書込み要求があった場合,(2)反転データ削除中に電源がオフしその後電源がオンした場合,それぞれにおいて反転データの一括消去が行われる。   As described above, when the paired sector pair is in the complementary cell mode and the batch erase is requested for the sector in the paired sector pair, the flash memory stores the inverted data of the other sector of the pair. After all are deleted, the batch erase operation is performed on the sector for which batch erase is requested. The operation of deleting the inverted data is performed when the flag signal twins is at the L level and the internal flag signal int-twins is at the H level. Accordingly, not only in the above example, but also in the second embodiment, as in the first embodiment, (1) in the complementary cell mode, a write request is made to the sector in which inverted data is written. (2) When the power is turned off while the inverted data is being deleted and then the power is turned on, the inverted data is collectively erased in each case.

第2の実施の形態では,第1の実施の形態と同様,入力されたセクタアドレス信号と単相相補判定結果に基づいて,書込み対象のセクタが決定される。単相セルモードの場合には,入力されたセクタアドレス信号に対応するセクタが選択され,相補セルモードの場合にはさらにそのペアとなるセクタも選択される。そこで図24を用いてセクタを選択するデコーダについて説明する。   In the second embodiment, as in the first embodiment, the sector to be written is determined based on the input sector address signal and the single-phase complementary determination result. In the single-phase cell mode, the sector corresponding to the input sector address signal is selected, and in the complementary cell mode, the paired sector is further selected. A decoder for selecting a sector will be described with reference to FIG.

図24は第2の実施の形態におけるセクタ制御回路(デコーダ)を示す図である。図24(1)の回路は,セクタSector0向けのセクタ制御回路212の回路図である。また,図24(2)はセクタSector0と同じセクタグループSG0に属するセクタSector7向けのセクタ制御回路212の回路図であり,図12(2)と同様な回路となっている。図24(1)の回路は,図24(2)の回路のインバータ2421〜2423の配置を変更してインバータ2401〜2403にした回路である。   FIG. 24 is a diagram showing a sector control circuit (decoder) in the second embodiment. The circuit of FIG. 24 (1) is a circuit diagram of the sector control circuit 212 for the sector Sector0. FIG. 24 (2) is a circuit diagram of the sector control circuit 212 for the sector Sector 7 belonging to the same sector group SG0 as the sector Sector0, and is the same circuit as FIG. 12 (2). The circuit shown in FIG. 24A is a circuit obtained by changing the arrangement of the inverters 2421 to 2423 in the circuit shown in FIG.

例えば,入力されたセクタアドレス信号が“111”である場合,フラグ信号twins<0>,<7>がともにLレベル(単相セルモード)であるときは,セクタSector0,7のセクタ選択信号Sector Select<0>,<7>はそれぞれLレベル,Hレベルとなり,セクタSector7だけが選択される。一方,すなわちフラグ信号twins<0>,<7>がそれぞれHレベル(相補セルモード),Lレベル(単相セルモード)であるときは,セクタSector0,7のセクタ選択信号Sector Select<0>,<7>はともにHレベルとなり,セクタSector0,7の両方が選択される。   For example, when the input sector address signal is “111” and the flag signals twins <0>, <7> are both at the L level (single-phase cell mode), the sector selection signals Sector of the sectors Sector0, 7 Select <0> and <7> are L level and H level, respectively, and only sector Sector 7 is selected. On the other hand, that is, when the flag signals twins <0> and <7> are at the H level (complementary cell mode) and the L level (single phase cell mode), respectively, the sector selection signals Sector Select <0>, Both <7> are at the H level, and both sectors Sector 0 and 7 are selected.

以上のように,相補セルモードでは,一方のセクタを選択すると,そのペアのセクタも同時に選択される。   As described above, in the complementary cell mode, when one sector is selected, the paired sector is also selected simultaneously.

なお,第1の実施の形態と同様, セクタSector1〜3向けのセクタ制御回路212は,図24(1)の回路において,NANDゲート2411の入力が相補セルモード(対応するフラグ信号twins<1>〜<3>がHレベル)では全てHレベル,単相セルモード(対応するフラグ信号twins<1>〜<3>がLレベル)では全てLレベルとなるように,領域2413〜2415内でインバータを上側又は下側に配置した回路となる。また,セクタSector4〜6向けのセクタ制御回路212も同様に,図24(2)の回路において,NANDゲート2431の入力が相補セルモード(対応するフラグ信号twins<4>〜<6>がHレベル)では全てHレベル,単相セルモード(対応するフラグ信号twins<4>〜<6>がLレベル)では全てLレベルとなるように,領域2433〜2435内でインバータを上側又は下側に配置した回路となる。   As in the first embodiment, the sector control circuit 212 for the sectors Sectors 1 to 3 has a NAND cell 2411 input in the complementary cell mode (corresponding flag signal twins <1>) in the circuit of FIG. ~ <3> is at H level) and inverters in regions 2413 to 2415 are all at L level in single-phase cell mode (corresponding flag signals twins <1> to <3> are at L level). The circuit is arranged on the upper side or the lower side. Similarly, in the sector control circuit 212 for the sectors Sector 4 to 6, in the circuit of FIG. 24 (2), the input of the NAND gate 2431 is in the complementary cell mode (the corresponding flag signals twins <4> to <6> are at the H level. ) In all regions 2433 to 2435 so that they are all at the H level and in the single-phase cell mode (the corresponding flag signals twins <4> to <6> are at the L level) are all at the L level. Circuit.

図2で示したように,ライトアンプ219やリードアンプ220は,第1の実施の形態と同様,アンプ制御回路から出力される上位セクタ選択信号USEL,下位セクタ選択信号LSEL,相補パス選択信号twin,参照セル選択信号/twin,相補出力制御信号/RAoutHによって,プログラムパスやリードパスを制御されている。ただし,第2の実施の形態では,相補パス選択信号twinは上位相補パス選択信号twinUと下位相補パス選択信号twinLとに分類される。上位相補パス選択信号twinUは,下位セクタに反転データが保持されるときに下位セクタへのリードパスやプログラムパスを制御する信号である。下位相補パス選択信号twinLは,上位セクタに反転データが保持されるときに上位セクタへのリードパスやプログラムパスを制御する信号である。なお,各信号の説明については,図27,図28にて後述する。以下,図25〜図28を用いてリードアンプ220,ライトアンプ219,アンプ制御回路216について順に説明する。   As shown in FIG. 2, the write amplifier 219 and the read amplifier 220 are similar to the first embodiment in that the upper sector selection signal USEL, the lower sector selection signal LSEL, and the complementary path selection signal twin output from the amplifier control circuit. The program path and the read path are controlled by the reference cell selection signal / twin and the complementary output control signal / RAoutH. However, in the second embodiment, the complementary path selection signal twin is classified into an upper complementary path selection signal twinU and a lower complementary path selection signal twinL. The upper complementary path selection signal twinU is a signal for controlling a read path and a program path to the lower sector when inverted data is held in the lower sector. The lower complementary path selection signal twinL is a signal for controlling a read path and a program path to the upper sector when inverted data is held in the upper sector. The description of each signal will be described later with reference to FIGS. Hereinafter, the read amplifier 220, the write amplifier 219, and the amplifier control circuit 216 will be described in order with reference to FIGS.

図25は第2の実施の形態におけるリードパスを示す図である。図25には,セクタSector3のメモリセル2501,又はセクタSector4のメモリセル2502から読み出しを行う場合のリードパスが示されている。   FIG. 25 is a diagram showing a lead path in the second embodiment. FIG. 25 shows a read path when reading from the memory cell 2501 of the sector Sector3 or the memory cell 2502 of the sector Sector4.

リードアンプ219は,第1の実施の形態の図14と同様に,データバスDBを介してコラムスイッチ218と接続しており,リードパス切替回路2512とコンパレータ回路2517とを有する。ただし,リードパス切替回路2512は,図14と異なり,上位相補パス選択信号twinUによってゲートが駆動されるトランジスタ2509と,下位相補パス選択信号twinLによってゲートが駆動されるトランジスタ2510とを有している。この2つのトランジスタ2509及び2510があることで,メモリセル2501に書込みデータDIを書込んだ場合にメモリセル2501を相補セルモードで読み出すだけでなく,メモリセル2502に書込みデータDIを書込んだ場合にもメモリセル2502を相補セルモードで読み出すことが可能となっている。以下に2つの例を挙げて相補セルモードの動作を具体的に説明する。   Similar to FIG. 14 of the first embodiment, the read amplifier 219 is connected to the column switch 218 via the data bus DB, and includes a read path switching circuit 2512 and a comparator circuit 2517. However, unlike FIG. 14, the read path switching circuit 2512 includes a transistor 2509 whose gate is driven by the upper complementary path selection signal twinU and a transistor 2510 whose gate is driven by the lower complementary path selection signal twinL. Because of the presence of these two transistors 2509 and 2510, when the write data DI is written to the memory cell 2501, not only the memory cell 2501 is read in the complementary cell mode, but also the write data DI is written to the memory cell 2502. In addition, the memory cell 2502 can be read in the complementary cell mode. The operation in the complementary cell mode will be specifically described below with two examples.

まず,相補セルモードでセクタSector3のメモリセル2501に書込みデータDI,セクタSector4のメモリセル2502にその反転データを書込んだ場合である。メモリセル2501を読み出すときは,下位セクタ選択信号LSELがHレベル,上位セクタ選択信号USELがLレベル,上位相補パス選択信号twinUはLレベル,下位相補パス選択信号twinLはHレベル,参照セル選択信号/twinはLレベル,相補出力制御信号/RAoutHはHレベルとなる。つまり,リード切替回路2512ではトランジスタ2507,2510がオンし,トランジスタ2508,2509,2511はオフとなる。そして,セクタSector3,4はそれぞれコンパレータ2513のマイナス入力端子,プラス入力端子と接続し,メモリセル2501と2502の電流がコンパレータ2513で比較される。   First, the write data DI is written in the memory cell 2501 of the sector Sector 3 and the inverted data is written in the memory cell 2502 of the sector Sector 4 in the complementary cell mode. When reading the memory cell 2501, the lower sector selection signal LSEL is H level, the upper sector selection signal USEL is L level, the upper complementary path selection signal twinU is L level, the lower complementary path selection signal twinL is H level, and the reference cell selection signal / Twin is at L level and the complementary output control signal / RAoutH is at H level. That is, in the lead switching circuit 2512, the transistors 2507 and 2510 are turned on, and the transistors 2508, 2509, and 2511 are turned off. Sectors Sector 3 and 4 are connected to the negative input terminal and the positive input terminal of comparator 2513, respectively, and the currents of memory cells 2501 and 2502 are compared by comparator 2513.

次に,相補セルモードでセクタSector4のメモリセル2502に書込みデータDI,セクタSector3のメモリセル2501にその反転データを書込んだ場合である。メモリセル2502を読み出すときは,下位セクタ選択信号LSELがLレベル,上位セクタ選択信号USELがHレベル,上位相補パス選択信号twinUはHレベル,下位相補パス選択信号twinLはLレベル,参照セル選択信号/twinはLレベル,相補出力制御信号/RAoutHはHレベルとなる。つまり,リード切替回路2512ではトランジスタ2508,2509がオンし,トランジスタ2507,2510,2511はオフとなる。そして,セクタSector3,4はそれぞれコンパレータ2513のプラス端子,マイナス端子と接続し,メモリセル2501と2502の電流がコンパレータ2513で比較される。   Next, in the complementary cell mode, the write data DI is written in the memory cell 2502 in the sector Sector4 and the inverted data is written in the memory cell 2501 in the sector Sector3. When reading the memory cell 2502, the lower sector selection signal LSEL is L level, the upper sector selection signal USEL is H level, the upper complementary path selection signal twinU is H level, the lower complementary path selection signal twinL is L level, and the reference cell selection signal / Twin is at L level and the complementary output control signal / RAoutH is at H level. That is, in the lead switching circuit 2512, the transistors 2508 and 2509 are turned on, and the transistors 2507, 2510, and 2511 are turned off. The sectors Sector 3 and 4 are connected to the plus terminal and the minus terminal of the comparator 2513, respectively, and the currents of the memory cells 2501 and 2502 are compared by the comparator 2513.

なお,いずれの場合でも,コンパレータ回路2517ではトランジスタ2515はオンし,トランジスタ2516はオフし,トランジスタ2514はリードイネーブル信号がHレベルとなるときにオンし,コンパレータ2513から比較結果が出力される。   In any case, in the comparator circuit 2517, the transistor 2515 is turned on, the transistor 2516 is turned off, and the transistor 2514 is turned on when the read enable signal becomes H level, and the comparison result is output from the comparator 2513.

また,上記2つの場合において,相補セルモードにおいて書込みデータDIの反転データが書込まれているメモリセルを読み出す場合は,相補出力制御信号/RAoutHはLレベルとなりトランジスタ2516がオンし,トランジスタ2514がオフするため,コンパレータ回路2517の出力がHレベルとなる。相補セルモードにおいて反転データを読み出すことは誤った読み出しであることから,常に出力がHレベル,つまり消去状態“1”とするようにしているためである。   In the above two cases, when reading the memory cell in which the inverted data of the write data DI is written in the complementary cell mode, the complementary output control signal / RAoutH becomes L level, the transistor 2516 is turned on, and the transistor 2514 is turned on. Since it is turned off, the output of the comparator circuit 2517 becomes H level. This is because reading the inverted data in the complementary cell mode is an erroneous reading, so that the output is always at the H level, that is, the erased state “1”.

一方,単相セルモードの場合では,図14と同様に,選択したセクタのメモリセルの電流とリファレンスセルRC1の電流とをコンパレータ2513で比較する。具体的には,セクタSector3のメモリセル2501を読み出すときは,トランジスタ2507,2511がオンして,メモリセル2501がコンパレータ2513のマイナス端子に接続し,リファレンスセルRC1のトランジスタ2503がコンパレータ2513にプラス端子に接続する。そして,セクタSector3のメモリセル2501の電流とリファレンスセルRC1の電流とが比較される。また,セクタSector4のメモリセル2502を読み出すときは,トランジスタ2508,2511がオンして,メモリセル2502がコンパレータ2513のマイナス端子に接続し,リファレンスセルRC1のトランジスタ2503がコンパレータ2513にプラス端子に接続する。そして,セクタSector4のメモリセル2502の電流とリファレンスセルRC1の電流とが比較される。   On the other hand, in the case of the single-phase cell mode, the comparator 2513 compares the current of the memory cell in the selected sector with the current of the reference cell RC1, as in FIG. Specifically, when reading the memory cell 2501 of the sector Sector3, the transistors 2507 and 2511 are turned on, the memory cell 2501 is connected to the negative terminal of the comparator 2513, and the transistor 2503 of the reference cell RC1 is connected to the comparator 2513 as a positive terminal. Connect to. Then, the current of the memory cell 2501 in the sector Sector3 is compared with the current of the reference cell RC1. When reading the memory cell 2502 of the sector Sector4, the transistors 2508 and 2511 are turned on, the memory cell 2502 is connected to the negative terminal of the comparator 2513, and the transistor 2503 of the reference cell RC1 is connected to the positive terminal of the comparator 2513. . Then, the current of the memory cell 2502 in the sector Sector4 is compared with the current of the reference cell RC1.

以上のように,図25では,相補セルモードではペアリングされている下位セクタと上位セクタとが比較され,単相セルモードでは,下位セクタ又は上位セクタと参照セルとが比較される。ただし,相補セルモードでは,反転データを保持するセクタを読み出すときは誤った読み出しであるため,比較結果は常にHレベルとする。   As described above, in FIG. 25, the paired lower sector and the upper sector are compared in the complementary cell mode, and the lower sector or the upper sector and the reference cell are compared in the single-phase cell mode. However, in the complementary cell mode, when the sector holding the inverted data is read out, it is an erroneous reading, so the comparison result is always at the H level.

図26は,第2の実施の形態におけるプログラムパスを示す図である。図26には,セクタSector3のメモリセル2601,又はセクタSector4のメモリセル2602にプログラムする場合のプログラムパスが示されている。   FIG. 26 is a diagram illustrating a program path in the second embodiment. FIG. 26 shows a program path for programming the memory cell 2601 of the sector Sector3 or the memory cell 2602 of the sector Sector4.

ライトアンプ219は,第1の実施の形態の図15と同様,プログラムパス切替回路2612と,書込みデータDIを増幅するプログラムアンプ2613とを有し,コラムスイッチ218とデータバスDBを介して接続する。ただし,プログラムパス切替回路2612には,図15と異なり,上位相補パス選択信号twinUによってゲートが駆動されるトランジスタ2607と,下位相補パス選択信号twinLによってゲートが駆動されるトランジスタ2608とを有している。   The write amplifier 219 includes a program path switching circuit 2612 and a program amplifier 2613 that amplifies the write data DI, and is connected to the column switch 218 via the data bus DB, as in FIG. 15 of the first embodiment. . However, unlike FIG. 15, the program path switching circuit 2612 has a transistor 2607 whose gate is driven by the upper complementary path selection signal twinU and a transistor 2608 whose gate is driven by the lower complementary path selection signal twinL. Yes.

相補セルモードの場合,セクタSector3のメモリセル2601にプログラムする場合は,下位セクタ選択信号LSELと下位相補パス選択信号twinLがHレベルとなる。つまり,トランジスタ2605,2608がオンし,メモリセル2601,2602がプログラムアンプ2613に接続する。そして,メモリセル2601には書込みデータ,メモリセル2602には書込みデータの反転データがプログラムされる。また,セクタSector4のメモリセル2602にプログラムする場合は,上位セクタ選択信号USELと上位相補パス選択信号twinUがHレベルとなる。つまり,トランジスタ2606,2607がオンし,メモリセル2601,2603がプログラムアンプに接続する。そして,メモリセル2601には書込みデータの反転データ,メモリセル2602には書込みデータがプログラムされる。   In the complementary cell mode, when programming into the memory cell 2601 of the sector Sector3, the lower sector selection signal LSEL and the lower complementary path selection signal twinL become H level. That is, the transistors 2605 and 2608 are turned on, and the memory cells 2601 and 2602 are connected to the program amplifier 2613. Then, write data is programmed in the memory cell 2601 and inverted data of the write data is programmed in the memory cell 2602. When programming the memory cell 2602 of the sector Sector4, the upper sector selection signal USEL and the upper complementary path selection signal twinU become H level. That is, the transistors 2606 and 2607 are turned on, and the memory cells 2601 and 2603 are connected to the program amplifier. The memory cell 2601 is programmed with the inverted data of the write data, and the memory cell 2602 is programmed with the write data.

一方,単相セルモードの場合は,図15と同様である。すなわち,セクタSector3のメモリセル2601にプログラムする場合はトランジスタ2605がオンし,セクタSector4のメモリセル2602にプログラムする場合はトランジスタ2606がオンし,それぞれプログラムされる。   On the other hand, the case of the single-phase cell mode is the same as FIG. That is, the transistor 2605 is turned on when programming into the memory cell 2601 in the sector Sector3, and the transistor 2606 is turned on when programming into the memory cell 2602 in the sector Sector4.

以上のように,図26では,相補セルモードの場合,ペアリングされた下位セクタのメモリセルと上位セクタのメモリセルとがプログラムアンプに接続し,一方のメモリセルに書込みデータ,他方のメモリセルにその反転データがプログラムされる。一方,単相セルモードの場合は,選択されたセクタのメモリセルがプログラムアンプに接続し,書込みデータがプログラムされる。   As described above, in FIG. 26, in the complementary cell mode, the paired lower sector memory cell and upper sector memory cell are connected to the program amplifier, and the write data is stored in one memory cell, and the other memory cell. The inverted data is programmed in On the other hand, in the single-phase cell mode, the memory cell of the selected sector is connected to the program amplifier, and the write data is programmed.

図27は第2の実施の形態における上位セクタ向けのアンプ制御回路を示す図である。また, 図28は第2の実施の形態における下位セクタ向けのアンプ制御回路を示す図である。図27には上位セクタのうちセクタSector4に対するアンプ制御回路が示されており,図28にはセクタSector4のペアであるセクタSector3に対するアンプ制御回路が示されている。   FIG. 27 is a diagram showing an amplifier control circuit for the upper sector in the second embodiment. FIG. 28 is a diagram illustrating an amplifier control circuit for a lower sector in the second embodiment. FIG. 27 shows an amplifier control circuit for the sector Sector4 in the upper sector, and FIG. 28 shows an amplifier control circuit for the sector Sector3 which is a pair of the sector Sector4.

図27のアンプ制御回路は,図16のアンプ制御回路と同様な構成となっている。ただし,図16のNANDゲート1615に対応するNANDゲート2715の出力は下位相補パス選択信号twinLとなる。また,図16のNORゲート1618に対応するNORゲート2718は,下位相補パス選択信号twinLと書込みコマンドPGMと後述するセクタSector3のアンプ制御回路のNANDゲート2811の出力とが入力され,相補セル選択信号/twinを出力する。さらに,図16のNORゲート1619に対応するNORゲート2719は,図16のNANDゲート1616に対応するNAND2716の出力である上位セクタ相補出力制御信号noUと後述するセクタSector3のアンプ制御回路のNANDゲート2812の出力である下位セクタ相補出力制御信号noLとが入力され,相補出力制御信号/RAoutHを出力する。   The amplifier control circuit of FIG. 27 has the same configuration as the amplifier control circuit of FIG. However, the output of the NAND gate 2715 corresponding to the NAND gate 1615 of FIG. 16 becomes the lower complementary path selection signal twinL. Further, the NOR gate 2718 corresponding to the NOR gate 1618 in FIG. 16 receives the lower complementary path selection signal twinL, the write command PGM, and the output of the NAND gate 2811 of the amplifier control circuit of the sector Sector 3 described later, and receives the complementary cell selection signal. / Twin is output. Further, a NOR gate 2719 corresponding to the NOR gate 1619 in FIG. 16 includes an upper sector complementary output control signal noU that is an output of the NAND 2716 corresponding to the NAND gate 1616 in FIG. 16 and a NAND gate 2812 of the amplifier control circuit of the sector Sector 3 described later. The lower sector complementary output control signal noL, which is the output of No. 1, is input, and the complementary output control signal / RAoutH is output.

セクタSector5〜7のアンプ制御回路は,図16と同様に,対応するセクタアドレス信号Sector Address<0>〜<2>がアンプ制御回路216に入力されたときにNANDゲート2703に相当するNANDゲートの3つ入力がすべてHレベルとなるように領域2720,2721にインバータを配置する又はしない回路である。例えば,セクタSector4であれば,セクタアドレス信号は“100”であるので,セクタアドレス信号Sector Address<0>,<1>に対しインバータ2701,2702が設けられている。   Similarly to FIG. 16, the amplifier control circuits of the sectors Sector 5 to 7 have NAND gates corresponding to the NAND gate 2703 when the corresponding sector address signals Sector Address <0> to <2> are input to the amplifier control circuit 216. In this circuit, inverters are arranged or not arranged in the areas 2720 and 2721 so that all three inputs are at the H level. For example, in the case of sector Sector 4, since the sector address signal is “100”, inverters 2701 and 2702 are provided for sector address signals Sector Address <0> and <1>.

図28のセクタSector3〜0のアンプ制御回路は,セクタアドレス信号Sector Address<0>〜<2>とフラグ信号twins<3>〜<0>とを入力し,上位セクタ相補パス選択信号twinUと下位セクタ相補出力制御信号noLとを出力する。   The amplifier control circuits of sectors Sector 3 to 0 in FIG. 28 receive sector address signals Sector Address <0> to <2> and flag signals twins <3> to <0>, and upper sector complementary path selection signal twinU and lower A sector complementary output control signal noL is output.

図28のセクタSector3のアンプ制御回路は,インバータ2801,2803〜2805,2807と,NANDゲート2802,2806,2808〜2812とを有し,NANDゲート2811,2812をSector0〜3のアンプ制御回路の間で共有されている。   The amplifier control circuit of sector Sector 3 in FIG. 28 has inverters 2801, 2803 to 2805, 2807 and NAND gates 2802, 2806, 2808 to 2812, and NAND gates 2811 and 2812 are connected between the amplifier control circuits of Sectors 0 to 3. Shared on.

また,セクタSector0〜2のアンプ制御回路は,対応するセクタアドレス信号Sector Address<0>〜<2>がアンプ制御回路216に入力されたときにNANDゲート2802に相当するNANDゲートの3つ入力がすべてHレベルとなるように領域2820,2821にインバータを配置する又はしない回路である。例えば,セクタSector3であれば,セクタアドレス信号は“011”であるので,セクタアドレス信号Sector Address<0>,<1>に対し領域2820,2821にインバータが設けられていない。   Also, the amplifier control circuits of sectors Sector 0 to 2 have three inputs of the NAND gate corresponding to NAND gate 2802 when the corresponding sector address signals Sector Address <0> to <2> are input to amplifier control circuit 216. In this circuit, inverters are arranged or not arranged in the regions 2820 and 2821 so that all become H level. For example, in the case of sector Sector 3, since the sector address signal is “011”, no inverter is provided in the areas 2820 and 2821 for the sector address signals Sector Address <0> and <1>.

ここで,例として図27,図28のアンプ制御信号216にセクタSector4のセクタアドレス信号“100”が入力された場合における各信号の出力について以下に説明する。なお,第2の実施に形態では,セクタSector4が選択された場合,単相セルモードは,フラグ信号twins<4>はLレベルかつtwins<3>はLレベルとなる。また,相補セルモードは,フラグ信号twins<4>がLレベルかつtwins<3>がHレベルである場合(以下相補セルモード1と呼ぶ。),もしくはtwins<4>がHレベルかつtwins<3>がLレベルである場合(以下相補セルモード2と呼ぶ。)の2通りある。   Here, as an example, the output of each signal when the sector address signal “100” of the sector Sector4 is input to the amplifier control signal 216 of FIGS. 27 and 28 will be described below. In the second embodiment, when the sector Sector4 is selected, in the single-phase cell mode, the flag signal twins <4> is at L level and twins <3> is at L level. In the complementary cell mode, when the flag signal twins <4> is L level and twins <3> is H level (hereinafter referred to as complementary cell mode 1), or twins <4> is H level and twins <3. > Is L level (hereinafter referred to as complementary cell mode 2).

SectorAddress<0>=“0”,SectorAddress<1>=“0”,SectorAddress<2>=“1”が入力されると,図27では,セクタSector4向けアンプ制御回路に対応するセクタアドレス信号“100”が入力されているため,インバータ2708の出力はHレベルとなる。そのため,単相セルモード,相補セルモード1のときは,上位セクタ選択信号USELはHレベルとなり,相補セルモード2ではLレベルとなる。   When SectorAddress <0> = “0”, SectorAddress <1> = “0”, and SectorAddress <2> = “1” are input, the sector address signal “100” corresponding to the amplifier control circuit for sector Sector4 in FIG. "Is input, the output of the inverter 2708 is at the H level. Therefore, in the single-phase cell mode and the complementary cell mode 1, the upper sector selection signal USEL is at the H level, and in the complementary cell mode 2 is at the L level.

NANDゲート2712には,NANDゲート2710の出力とフラグ信号twins<4>が入力されており,セクタアドレス信号“100”が入力された場合は,NANDゲート2710の出力がHレベルとなる。そのため,単相セルモード,相補セルモード1ときは,下位セクタ相補パス選択信号twinLはLレベルとなり,相補セルモード2ではHレベルとなる。   The output of the NAND gate 2710 and the flag signal twins <4> are input to the NAND gate 2712. When the sector address signal “100” is input, the output of the NAND gate 2710 becomes H level. Therefore, in the single-phase cell mode and the complementary cell mode 1, the lower sector complementary path selection signal twinL is at L level, and in the complementary cell mode 2 is at H level.

NANDゲート2713には,インバータ2708の出力とフラグ信号twins<4>が入力されており,セクタアドレス信号“100”が入力された場合は,インバータ2708の出力がHレベルとなる。そのため,NANDゲート2716から出力される上位セクタ相補出力制御信号noUは,単相セルモード,相補セルモード1のときはLレベルとなり,相補セルモード2ではHレベルとなる。   The output of the inverter 2708 and the flag signal twins <4> are input to the NAND gate 2713. When the sector address signal “100” is input, the output of the inverter 2708 becomes H level. Therefore, the upper sector complementary output control signal noU output from the NAND gate 2716 is L level in the single-phase cell mode and the complementary cell mode 1, and is H level in the complementary cell mode 2.

そして,図28のアンプ制御信号にセクタアドレス信号“100”が入力された場合,インバータ2807の出力はLレベル,NANDゲート2808の出力はHレベルとなる。したがって,NAND2811から出力される上位セクタ相補パス選択信号twinUは,単相セルモード,相補セルモード2のときはLレベル,相補セルモード1のときはHレベルとなる。また,NANDゲート2812から出力される下位セクタ相補出力制御信号noLは,単相セルモード,相補セルモード1,2いずれのときもLレベルとなる。   When the sector address signal “100” is input to the amplifier control signal of FIG. 28, the output of the inverter 2807 is L level and the output of the NAND gate 2808 is H level. Accordingly, the upper sector complementary path selection signal twinU output from the NAND 2811 is at the L level in the single-phase cell mode and the complementary cell mode 2 and at the H level in the complementary cell mode 1. The lower sector complementary output control signal noL output from the NAND gate 2812 is at the L level in both the single-phase cell mode and the complementary cell modes 1 and 2.

さらに図27,図28より,NORゲート2718から出力される参照セル選択信号/twinは,単相セルモードのときはHレベル,相補セルモード1,2のときはLレベルとなる。また,NORゲート2719から出力される相補出力制御信号/RAoutHは,単相セルモード,相補セルモード1のときHレベル,相補セルモード2のときLレベルとなる。以上の出力結果を,セクタSector3のセクタアドレス信号“011”が入力された場合の各信号の出力と併せて図29にまとめる。   27 and 28, the reference cell selection signal / twin output from the NOR gate 2718 is at the H level in the single-phase cell mode and at the L level in the complementary cell modes 1 and 2. Complementary output control signal / RAoutH output from NOR gate 2719 is at H level in single-phase cell mode and complementary cell mode 1, and is at L level in complementary cell mode 2. The above output results are summarized in FIG. 29 together with the output of each signal when the sector address signal “011” of the sector Sector 3 is input.

図29は,第2の実施の形態におけるアンプ制御信号の真理値表を示す図である。セクタSector3が選択される場合,単相セルモードのときは下位セクタ選択信号LSELがHレベル,参照セル選択信号/twinがHレベルとなり,相補セルモード2のときは,下位セクタ選択信号LSELがHレベル,下位セクタ相補パス選択信号twinLがHレベルとなり,相補セルモード1のときは好ましくないアクセスであるため,相補出力制御信号/RAoutHはLレベルにしている。セクタSector4が選択される場合,単相セルモードのときは上位セクタ選択信号USELがHレベル,参照セル選択信号/twinがHレベルとなり,相補セルモード1のときは上位セクタ選択信号USELがHレベル,上位セクタ相補パス選択信号twinUがHレベルとなり,相補セルモード2のときは好ましくないアクセスであるため,相補出力制御信号/RAoutHはLレベルにしている。このように,セクタSector3では相補セルモード1で,セクタSector4では相補セルモード2で,相補出力制御信号/RAoutHがLレベルとなる。これは,相補セルモード1の場合にセクタSector3(セクタアドレス信号“011”)に対して読み出し要求があったとき,その要求は誤った読み出し要求であるため,Lレベルの相補出力制御信号/RAoutHによりトランジスタ2515がオフ,トランジスタ2516がオンし,リードアンプ220の出力は常に消去状態“1”とするようにしている。また,相補セルモード2の場合にセクタSector4(セクタアドレス信号“100”)に対して読み出し要求があったときも同様である。   FIG. 29 is a diagram illustrating a truth table of amplifier control signals in the second embodiment. When sector Sector 3 is selected, in the single-phase cell mode, the lower sector selection signal LSEL is H level and the reference cell selection signal / twin is H level. In the complementary cell mode 2, the lower sector selection signal LSEL is H level. Since the level and lower sector complementary path selection signal twinL is at H level and the complementary cell mode 1 is not preferable access, the complementary output control signal / RAoutH is at L level. When sector Sector 4 is selected, the upper sector selection signal USEL is H level and the reference cell selection signal / twin is H level in the single-phase cell mode, and the upper sector selection signal USEL is H level in the complementary cell mode 1. Since the upper sector complementary path selection signal twinU is at the H level and the complementary cell mode 2 is an undesirable access, the complementary output control signal / RAoutH is at the L level. As described above, the complementary output control signal / RAoutH becomes L level in the sector Cell3 in the complementary cell mode 1 and in the sector Sector4 in the complementary cell mode 2. In the complementary cell mode 1, when there is a read request for the sector Sector 3 (sector address signal “011”), the request is an erroneous read request, so the L level complementary output control signal / RAoutH Thus, the transistor 2515 is turned off and the transistor 2516 is turned on so that the output of the read amplifier 220 is always in the erased state “1”. The same applies to a read request for sector Sector 4 (sector address signal “100”) in the complementary cell mode 2.

以上のように,アンプ制御回路216は,入力されたセクタアドレス信号に基づいて,上位セクタ選択信号USELと,下位セクタ選択信号LSELと,上位セクタ相補パス選択信号twinUと,下位セクタ相補パス選択信号twinLと,セル選択信号/twinと,相補出力制御信号/RAoutHとを出力する。また,これらの信号によりライトアンプ219やリードアンプ220ではプログラムパス,リードパスが図25,図26に示すとおり制御される。   As described above, the amplifier control circuit 216 performs the upper sector selection signal USEL, the lower sector selection signal LSEL, the upper sector complementary path selection signal twinU, and the lower sector complementary path selection signal based on the input sector address signal. TwinL, a cell selection signal / twin, and a complementary output control signal / RAoutH are output. Further, the program path and the read path are controlled as shown in FIGS. 25 and 26 in the write amplifier 219 and the read amplifier 220 by these signals.

このように,第2の実施の形態では,各セクタに対してどのような順番で書込みが要求されても,選択されたセクタのセクタ及びそのペアのセクタのセクタ状態データに応じて相補セルモード又は単相セルモードのいずれかで書込みが行われる。これにより,フラッシュメモリは信頼性の高いデータだけでなく大容量のデータを任意のセクタに保持することができる。   As described above, in the second embodiment, the complementary cell mode is selected according to the sector status data of the sector of the selected sector and the sector of the pair, regardless of the order in which writing is requested to each sector. Alternatively, writing is performed in either single-phase cell mode. Thereby, the flash memory can hold not only highly reliable data but also a large amount of data in an arbitrary sector.

以上の実施の形態をまとめると,次の付記のとおりである。   The above embodiment is summarized as follows.

(付記1)
複数のメモリセルをそれぞれ有する複数のセクタであって,各一対のセクタで複数のセクタグループを構成する複数のセクタと,
前記複数のセクタグループのそれぞれの動作として,1ビットのデータを1つの前記セクタの1つの前記メモリセルで記憶する単相セルモード又は前記1ビットのデータを前記セクタグループの一対のセクタにそれぞれ含まれる一対の前記メモリセルで相補データとして記憶する相補セルモードのいずれかを選択し、選択結果を出力するモード判定部と,
前記選択結果に基づいて,前記セクタグループを前記単相セルモード又は相補セルモードで動作させる動作制御部とを有する半導体記憶装置。
(Appendix 1)
A plurality of sectors each having a plurality of memory cells, each pair of sectors forming a plurality of sector groups,
As each operation of the plurality of sector groups, a single-phase cell mode in which 1-bit data is stored in one memory cell of one sector or the 1-bit data is included in a pair of sectors of the sector group, respectively. A mode determination unit that selects one of the complementary cell modes to be stored as complementary data in the pair of memory cells and outputs a selection result;
A semiconductor memory device comprising: an operation control unit that operates the sector group in the single-phase cell mode or the complementary cell mode based on the selection result.

(付記2)
付記1において,
前記モード判定部は,前記セクタグループの一対のセクタが消去状態のときに一方のセクタに書込み要求があるとき当該セクタグループを相補セルモードと判定する半導体記憶装置。
(Appendix 2)
In Appendix 1,
The semiconductor memory device, wherein the mode determination unit determines that a sector group is in a complementary cell mode when a write request is made in one sector when a pair of sectors in the sector group is in an erased state.

(付記3)
付記2において,
前記モード判定部は,前記相補セルモードのセクタグループの他方のセクタに書込み要求があったとき,当該セクタグループを前記単相セルモードと判定する半導体記憶装置。
(Appendix 3)
In Appendix 2,
The semiconductor memory device, wherein the mode determination unit determines that the sector group is in the single-phase cell mode when there is a write request to the other sector of the sector group in the complementary cell mode.

(付記4)
付記1において,
前記モード判定部は,前記複数のセクタのそれぞれに対応して,前記セクタが書込み要求に対応した書込み状態であるか,又は消去要求に対応した消去状態であるかを識別するセクタ状態データを保持するセクタ状態メモリと,
前記セクタグループを構成する一方のセクタに対応する前記セクタ状態データと他方のセクタに対応する前記セクタ状態データとに基づき,前記選択結果を出力するセクタ状態メモリアクセス制御回路とを有する半導体記憶装置。
(Appendix 4)
In Appendix 1,
The mode determination unit holds sector state data for identifying whether the sector is in a write state corresponding to a write request or an erase state corresponding to an erase request, corresponding to each of the plurality of sectors. Sector state memory to be
A semiconductor memory device comprising: a sector state memory access control circuit for outputting the selection result based on the sector state data corresponding to one sector constituting the sector group and the sector state data corresponding to the other sector.

(付記5)
付記4において,
前記セクタ状態メモリアクセス制御回路は,前記一方のセクタ及び前記他方のセクタの前記セクタ状態データがともに前記消去状態である前記セクタグループの前記一方のセクタに書込み要求があった場合,前記セクタグループについて前記相補セルモードの選択結果を出力し,前記一方のセクタの前記セクタ状態データを書込み状態に変更する半導体記憶装置。
(Appendix 5)
In Appendix 4,
The sector state memory access control circuit, when there is a write request to the one sector of the sector group in which both the sector state data of the one sector and the other sector are in the erased state, A semiconductor memory device that outputs a selection result of the complementary cell mode and changes the sector state data of the one sector to a write state.

(付記6)
付記5において,
前記セクタ状態メモリアクセス制御回路は,前記相補セルモードである前記セクタグループの前記他方のセクタに書込み要求があった場合,前記セクタグループについて前記単相セルモードの選択結果を出力し,前記他方のセクタの前記セクタ状態データを書込み状態に変更する半導体記憶装置。
(Appendix 6)
In Appendix 5,
The sector state memory access control circuit outputs a selection result of the single-phase cell mode for the sector group when there is a write request to the other sector of the sector group that is in the complementary cell mode, A semiconductor memory device for changing the sector state data of a sector to a write state.

(付記7)
付記5において,
前記セクタ状態メモリアクセス制御回路は,前記相補セルモードである前記セクタグループの前記一方のセクタに消去要求があった場合,前記セクタグループについて前記単相セルモードの選択結果を出力し,前記一方のセクタの前記セクタ状態データを消去状態に変更する半導体記憶装置。
(Appendix 7)
In Appendix 5,
The sector state memory access control circuit outputs the selection result of the single-phase cell mode for the sector group when there is an erasure request in the one sector of the sector group in the complementary cell mode, A semiconductor memory device for changing the sector state data of a sector to an erased state.

(付記8)
付記6又は7において,
前記動作制御部は,前記選択結果が前記相補セルモードから前記単相セルモードに切り替わったことを検出したら,前記他方のセクタに対して消去を要求する半導体記憶装置。
(Appendix 8)
In Appendix 6 or 7,
When the operation control unit detects that the selection result is switched from the complementary cell mode to the single-phase cell mode, the operation control unit requests the other sector to be erased.

(付記9)
付記5において,
前記相補セルモードである前記セクタグループの前記他方のセクタに消去要求があった場合,前記他方のセクタのデータの消去を行わない半導体記憶装置。
(Appendix 9)
In Appendix 5,
A semiconductor memory device that does not erase data in the other sector when there is an erase request in the other sector of the sector group in the complementary cell mode.

(付記10)
付記4において,
前記セクタ状態メモリアクセス制御回路は,前記セクタに対する書込み要求に応答して前記セクタ状態データを書込み状態にし,前記セクタに対する消去要求に応答して前記セクタ状態データを消去状態にする半導体記憶装置。
(Appendix 10)
In Appendix 4,
The semiconductor memory device, wherein the sector state memory access control circuit sets the sector state data in a write state in response to a write request to the sector and sets the sector state data in an erase state in response to an erase request for the sector.

(付記11)
付記4において,
前記セクタ状態メモリは,相補セルモードから単相セルモードに切り替わる前記選択結果に応答して行われる前記他方のセクタの消去動作が完了か否かを示す内部フラグ信号を記憶し,
前記セクタ状態メモリアクセス制御回路は,前記他方のセクタへの書込み要求又は前記一方のセクタへの消去要求があったとき,前記選択結果が単相セルモードであり前記内部フラグ信号が未完了である場合前記他方のセクタに対する消去命令信号を出力し,前記消去命令信号による前記他方のセクタのデータの消去が完了したら,前記内部フラグ信号を完了にする半導体記憶装置。
(Appendix 11)
In Appendix 4,
The sector state memory stores an internal flag signal indicating whether or not the erase operation of the other sector performed in response to the selection result of switching from the complementary cell mode to the single-phase cell mode is completed,
When the sector state memory access control circuit has a write request to the other sector or an erase request to the one sector, the selection result is the single-phase cell mode and the internal flag signal is incomplete In this case, the semiconductor memory device outputs an erase command signal for the other sector, and completes the internal flag signal when the erase of the data in the other sector by the erase command signal is completed.

(付記12)
付記1又は4において,
前記動作制御部は,前記選択結果に基づいてデータの書込み又は読み出しを行うセクタを選択するセクタ制御回路と,前記選択結果に基づいて書込みデータの相補データを前記セクタグループの一対のセクタに書込むか又は書込みデータを一方のセクタに書込むライトアンプと,前記選択結果に基づいて前記セクタグループの一対のセクタからの相補データに基づいて読み出しデータを出力するか又は前記一方のセクタからのデータに基づいて前記読み出しデータを出力するリードアンプとを有する半導体記憶装置。
(Appendix 12)
In Appendix 1 or 4,
The operation control unit writes a sector control circuit for selecting a sector to write or read data based on the selection result, and writes complementary data of the write data to a pair of sectors of the sector group based on the selection result Or a write amplifier that writes write data to one sector, and outputs read data based on complementary data from a pair of sectors of the sector group based on the selection result, or outputs data from the one sector And a read amplifier that outputs the read data based on the read data.

(付記13)
付記12において,
前記セクタ制御回路は,前記単相セルモードの場合,入力されたアドレス信号に対応する前記一方のセクタを選択し,前記相補セルモードの場合,前記一方のセクタ及び前記一方のセクタと同じ前記セクタグループを構成する他方のセクタを選択する半導体記憶装置。
(Appendix 13)
In Appendix 12,
The sector control circuit selects the one sector corresponding to the input address signal in the single-phase cell mode, and the same sector as the one sector and the one sector in the complementary cell mode. A semiconductor memory device for selecting the other sector constituting the group.

(付記14)
付記12において,
前記ライトアンプは,前記単相セルモードの場合,入力されたアドレス信号に対応する前記一方のセクタに前記書込みデータを出力し,前記相補セルモードの場合,前記一方のセクタに前記書込みデータを出力し,前記一方のセクタと同じ前記セクタグループを構成する他方のセクタに前記書込みデータの反転データを出力する半導体記憶装置。
(Appendix 14)
In Appendix 12,
The write amplifier outputs the write data to the one sector corresponding to the input address signal in the single-phase cell mode, and outputs the write data to the one sector in the complementary cell mode. And a semiconductor memory device for outputting inverted data of the write data to the other sector constituting the same sector group as the one sector.

(付記15)
付記12において,
前記リードアンプは,前記単相セルモードの場合,入力されたアドレス信号に対応する前記一方のセクタ内のメモリセルとリファレンスセルとの比較により前記読み出しデータを出力し,前記相補セルモードの場合,前記一方のセクタ内のメモリセルと前記一方のセクタと同じ前記セクタグループを構成する他方のセクタ内のメモリセルとの比較により前記読み出しデータを出力する半導体記憶装置。
(Appendix 15)
In Appendix 12,
The read amplifier outputs the read data by comparing the memory cell and the reference cell in the one sector corresponding to the input address signal in the single-phase cell mode, and in the complementary cell mode, A semiconductor memory device that outputs the read data by comparing a memory cell in the one sector with a memory cell in the other sector constituting the same sector group as the one sector.

(付記16)
付記1において,
前記複数のセクタはそれぞれセクタ番号を有し,
前記複数のセクタは,セクタ番号の中間値よりセクタ番号の小さい第1のセクタ群と大きい第2のセクタ群に分けられ,
前記セクタグループは,前記第1のセクタ群のセクタのうちセクタ番号のより小さいセクタと第2のセクタ群のセクタのうちセクタ番号のより大きいセクタから順に一対のセクタを構成し,
前記セクタ番号の小さいセクタから順に書込み要求が入力され,前記第1のセクタ群のセクタに対する書込み要求に対しては前記相補セルモードでデータを記憶し,前記第2のセクタ群のセクタに対する書込み要求に対しては前記単相セルモードでデータを記憶する半導体記憶装置。
(Appendix 16)
In Appendix 1,
Each of the plurality of sectors has a sector number;
The plurality of sectors are divided into a first sector group having a sector number smaller than an intermediate value of sector numbers and a second sector group having a larger sector number,
The sector group comprises a pair of sectors in order from a sector with a lower sector number among sectors of the first sector group and a sector with a higher sector number among sectors of the second sector group,
Write requests are input in order from the sector with the smallest sector number. For write requests to the sectors of the first sector group, data is stored in the complementary cell mode, and write requests to the sectors of the second sector group are stored. A semiconductor memory device for storing data in the single-phase cell mode.

(付記17)
付記1において,
前記セクタグループの一対のセクタのいずれか一方のセクタへの書込み要求に応答して前記相補セルモードでデータを記憶した後,前記前記相補セルモードであるセクタグループの他方のセクタへの書込み要求に応答して単相セルモードでデータを記憶する半導体記憶装置。
(Appendix 17)
In Appendix 1,
After storing data in the complementary cell mode in response to a write request to one of the pair of sectors of the sector group, the write request to the other sector of the sector group in the complementary cell mode A semiconductor memory device that stores data in a single-phase cell mode in response.

RD:読み出しコマンド
PGM:書込みコマンド
ERS:一括消去コマンド
twins:フラグ信号
USEL:上位セクタ選択信号
LSEL:下位セクタ選択信号
twin:相補パス選択信号
/twin:参照セル選択信号
twinU:上位相補パス選択信号
twinL:下位相補パス選択信号
RAoutH:相補出力制御信号
int-twins:内部フラグ信号
int‐tc:内部フラグ制御信号
WL:ワード線
SL:ソース線
LBL:ローカルビット線
GBL:グローバルビット線
SSEL:コラム選択線
LBSEL:ローカルビット線選択信号
YSEL:グローバルビット線選択信号
RD: Read command PGM: Write command ERS: Batch erase command twins: Flag signal USEL: Upper sector selection signal LSEL: Lower sector selection signal twin: Complementary path selection signal / twin: Reference cell selection signal twinU: Upper complementary path selection signal twinL : Lower complementary path selection signal RAoutH: Complementary output control signal int-twins: Internal flag signal int-tc: Internal flag control signal WL: Word line SL: Source line LBL: Local bit line GBL: Global bit line SSEL: Column selection line LBSEL: Local bit line selection signal YSEL: Global bit line selection signal

Claims (9)

複数のメモリセルをそれぞれ有する複数のセクタであって,各一対のセクタで複数のセクタグループを構成する複数のセクタと,
前記複数のセクタグループのそれぞれの動作として,1ビットのデータを1つの前記セクタの1つの前記メモリセルで記憶する単相セルモード又は前記1ビットのデータを前記セクタグループの一対のセクタにそれぞれ含まれる一対の前記メモリセルで相補データとして記憶する相補セルモードのいずれかを選択し,選択結果を出力するモード判定部と,
前記選択結果に基づいて,前記セクタグループを前記単相セルモード又は相補セルモードで動作させる動作制御部とを有し,
前記モード判定部は,前記セクタグループの一対のセクタが消去状態のときに一方のセクタに書込み要求があるとき当該セクタグループを相補セルモードと判定する半導体記憶装置。
A plurality of sectors each having a plurality of memory cells, each pair of sectors forming a plurality of sector groups,
As each operation of the plurality of sector groups, a single-phase cell mode in which 1-bit data is stored in one memory cell of one sector or the 1-bit data is included in a pair of sectors of the sector group, respectively. A mode determination unit that selects one of the complementary cell modes to store as complementary data in the pair of memory cells and outputs a selection result;
Based on the selection result, it possesses an operation control unit for operating the sector group in the single-phase cell mode or complementary cell mode,
The mode determination unit, a semiconductor memory device for determining the sector group and the complementary cell mode when the pair of sectors of said sector group is a write request to one of the sector during an erase state.
請求項において,
前記モード判定部は,前記相補セルモードのセクタグループの他方のセクタに書込み要求があったとき,当該セクタグループを前記単相セルモードと判定する半導体記憶装置。
In claim 1 ,
The semiconductor memory device, wherein the mode determination unit determines that the sector group is in the single-phase cell mode when there is a write request to the other sector of the sector group in the complementary cell mode.
請求項1において,
前記モード判定部は,前記複数のセクタのそれぞれに対応して,前記セクタが書込み要求に対応した書込み状態であるか,又は消去要求に対応した消去状態であるかを識別するセクタ状態データを保持するセクタ状態メモリと,
前記セクタグループを構成する一方のセクタに対応する前記セクタ状態データと他方のセクタに対応する前記セクタ状態データとに基づき,前記選択結果を出力するセクタ状態メモリアクセス制御回路とを有する半導体記憶装置。
In claim 1,
The mode determination unit holds sector state data for identifying whether the sector is in a write state corresponding to a write request or an erase state corresponding to an erase request, corresponding to each of the plurality of sectors. Sector state memory to be
A semiconductor memory device comprising: a sector state memory access control circuit for outputting the selection result based on the sector state data corresponding to one sector constituting the sector group and the sector state data corresponding to the other sector.
請求項において,
前記セクタ状態メモリアクセス制御回路は,前記一方のセクタ及び前記他方のセクタの前記セクタ状態データがともに前記消去状態である前記セクタグループの前記一方のセクタに書込み要求があった場合,前記セクタグループについて前記相補セルモードの選択結果を出力し,前記一方のセクタの前記セクタ状態データを書込み状態に変更する半導体記憶装置。
In claim 3 ,
The sector state memory access control circuit, when there is a write request to the one sector of the sector group in which both the sector state data of the one sector and the other sector are in the erased state, A semiconductor memory device that outputs a selection result of the complementary cell mode and changes the sector state data of the one sector to a write state.
請求項において,
前記セクタ状態メモリアクセス制御回路は,前記相補セルモードである前記セクタグループの前記他方のセクタに書込み要求があった場合,前記セクタグループについて前記単相セルモードの選択結果を出力し,前記他方のセクタの前記セクタ状態データを書込み状態に変更する半導体記憶装置。
In claim 4 ,
The sector state memory access control circuit outputs a selection result of the single-phase cell mode for the sector group when there is a write request to the other sector of the sector group that is in the complementary cell mode, A semiconductor memory device for changing the sector state data of a sector to a write state.
請求項1又はにおいて,
前記動作制御部は,前記選択結果に基づいてデータの書込み又は読み出しを行うセクタを選択するセクタ制御回路と,前記選択結果に基づいて書込みデータの相補データを前記セクタグループの一対のセクタに書込むか又は書込みデータを一方のセクタに書込むライトアンプと,前記選択結果に基づいて前記セクタグループの一対のセクタからの相補データに基づいて読み出しデータを出力するか又は前記一方のセクタからのデータに基づいて前記読み出しデータを出力するリードアンプとを有する半導体記憶装置。
In claim 1 or 3 ,
The operation control unit writes a sector control circuit for selecting a sector to write or read data based on the selection result, and writes complementary data of the write data to a pair of sectors of the sector group based on the selection result Or a write amplifier that writes write data to one sector, and outputs read data based on complementary data from a pair of sectors of the sector group based on the selection result, or outputs data from the one sector And a read amplifier that outputs the read data based on the read data.
請求項において,
前記セクタ制御回路は,前記単相セルモードの場合,入力されたアドレス信号に対応する前記一方のセクタを選択し,前記相補セルモードの場合,前記一方のセクタ及び前記一方のセクタと同じ前記セクタグループを構成する他方のセクタを選択する半導体記憶装置。
In claim 6 ,
The sector control circuit selects the one sector corresponding to the input address signal in the single-phase cell mode, and the same sector as the one sector and the one sector in the complementary cell mode. A semiconductor memory device for selecting the other sector constituting the group.
請求項1において,
前記複数のセクタはそれぞれセクタ番号を有し,
前記複数のセクタは,セクタ番号の中間値よりセクタ番号の小さい第1のセクタ群と大きい第2のセクタ群に分けられ,
前記セクタグループは,前記第1のセクタ群のセクタのうちセクタ番号のより小さいセクタと第2のセクタ群のセクタのうちセクタ番号のより大きいセクタから順に一対のセクタを構成し,
前記セクタ番号の小さいセクタから順に書込み要求が入力され,前記第1のセクタ群のセクタに対する書込み要求に対しては前記相補セルモードでデータを記憶し,前記第2のセクタ群のセクタに対する書込み要求に対しては前記単相セルモードでデータを記憶する半導体記憶装置。
In claim 1,
Each of the plurality of sectors has a sector number;
The plurality of sectors are divided into a first sector group having a sector number smaller than an intermediate value of sector numbers and a second sector group having a larger sector number,
The sector group comprises a pair of sectors in order from a sector with a lower sector number among sectors of the first sector group and a sector with a higher sector number among sectors of the second sector group,
Write requests are input in order from the sector with the smallest sector number. For write requests to the sectors of the first sector group, data is stored in the complementary cell mode, and write requests to the sectors of the second sector group are stored. A semiconductor memory device for storing data in the single-phase cell mode.
請求項1において,
前記セクタグループの一対のセクタのいずれか一方のセクタへの書込み要求に応答して前記相補セルモードでデータを記憶した後,前記前記相補セルモードであるセクタグループの他方のセクタへの書込み要求に応答して単相セルモードでデータを記憶する半導体記憶装置。
In claim 1,
After storing data in the complementary cell mode in response to a write request to one of the pair of sectors of the sector group, the write request to the other sector of the sector group in the complementary cell mode A semiconductor memory device that stores data in a single-phase cell mode in response.
JP2012008331A 2012-01-18 2012-01-18 Semiconductor memory device Active JP5919834B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012008331A JP5919834B2 (en) 2012-01-18 2012-01-18 Semiconductor memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012008331A JP5919834B2 (en) 2012-01-18 2012-01-18 Semiconductor memory device

Publications (2)

Publication Number Publication Date
JP2013149313A JP2013149313A (en) 2013-08-01
JP5919834B2 true JP5919834B2 (en) 2016-05-18

Family

ID=49046681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012008331A Active JP5919834B2 (en) 2012-01-18 2012-01-18 Semiconductor memory device

Country Status (1)

Country Link
JP (1) JP5919834B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6422273B2 (en) * 2014-09-03 2018-11-14 ルネサスエレクトロニクス株式会社 Semiconductor device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005092915A (en) * 2003-09-12 2005-04-07 Toshiba Corp Semiconductor integrated circuit device and information storage method for same
US7177183B2 (en) * 2003-09-30 2007-02-13 Sandisk 3D Llc Multiple twin cell non-volatile memory array and logic block structure and method therefor
JP2008084426A (en) * 2006-09-27 2008-04-10 Fujitsu Ltd Semiconductor memory and system
JP5311784B2 (en) * 2006-10-11 2013-10-09 ルネサスエレクトロニクス株式会社 Semiconductor device
JP5333302B2 (en) * 2010-03-12 2013-11-06 セイコーエプソン株式会社 Nonvolatile memory device, integrated circuit device, and electronic apparatus

Also Published As

Publication number Publication date
JP2013149313A (en) 2013-08-01

Similar Documents

Publication Publication Date Title
US8189393B2 (en) Nonvolatile memory device with incremental step pulse programming
JP3730423B2 (en) Semiconductor memory device
US7952958B2 (en) Non-volatile semiconductor storage system
JP5137002B2 (en) Memory controller
JP5086972B2 (en) Page buffer circuit and control method thereof for nonvolatile semiconductor memory device
JP2003217288A (en) Flash memory in which read-disturbance is relaxed
US8605512B2 (en) Nonvolatile semiconductor memory device and method of operating a nonvolatile memory device
US9489143B2 (en) Method for accessing flash memory and associated controller and memory device
JP2007004861A (en) Nonvolatile semiconductor memory and its data writing method
US9524781B2 (en) Nonvolatile memory device and operating method thereof
KR20080069389A (en) Flash memory device and method of operating the same
KR20100034239A (en) Non-volatile memory device and page buffer circuit
JP2011018397A (en) Nand flash memory
KR20100011198A (en) Program method for non-volatile memory device
US10249376B2 (en) Flash memory storage device and operating method thereof
JP2011044200A (en) Nonvolatile semiconductor memory
TW202027085A (en) Method for improving read retry of flash memory and related controller and storage device
CN112542186A (en) Memory device and method of operating memory device
US8275934B2 (en) Nonvolatile memory device and cache read method using the same
JP2007179669A (en) Memory system
JP2012198953A (en) Nonvolatile semiconductor memory
JP5919834B2 (en) Semiconductor memory device
US20170068604A1 (en) Memory system having idle-memory devices and method of operating thereof
JP6035422B2 (en) Semiconductor device
JP2007257748A (en) Nonvolatile storage device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140929

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150828

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150901

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151030

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160328

R150 Certificate of patent or registration of utility model

Ref document number: 5919834

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250