JP2009110150A - Semiconductor device and method for operating semiconductor device - Google Patents

Semiconductor device and method for operating semiconductor device Download PDF

Info

Publication number
JP2009110150A
JP2009110150A JP2007280130A JP2007280130A JP2009110150A JP 2009110150 A JP2009110150 A JP 2009110150A JP 2007280130 A JP2007280130 A JP 2007280130A JP 2007280130 A JP2007280130 A JP 2007280130A JP 2009110150 A JP2009110150 A JP 2009110150A
Authority
JP
Japan
Prior art keywords
command
write
control unit
erase
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007280130A
Other languages
Japanese (ja)
Inventor
Yoshio Kubono
義雄 久保埜
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 JP2007280130A priority Critical patent/JP2009110150A/en
Publication of JP2009110150A publication Critical patent/JP2009110150A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Read Only Memory (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To prevent performance of a system accessing a memory part from being deteriorated by preventing delay of a delete operation. <P>SOLUTION: A second control part issues a write command to a corresponding memory part on the basis of a write request issued from a first control part. When any of a plurality of memory parts can be deleted, the second control part issues a delete command after the write operation of any of memory parts which respond to the write command. Furthermore, the second control part issues write completion notification based on the write command to the first control part a first period after issuing the delete command. Thus, it is possible to surely advance the delete operation even when a write request frequently occurs. As a result, it is possible to prevent delay of the delete operation, and to prevent the performance of the system accessing the memory part from being deteriorated. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、データの書き込みおよび消去が可能な半導体装置に関する。   The present invention relates to a semiconductor device capable of writing and erasing data.

フラッシュメモリ等の不揮発性半導体メモリでは、メモリセルに保持される値は、例えば、消去動作により論理1になり、書き込み動作により論理0になる。一般に、消去動作は、セクタ等のブロック単位で実行され、時間が掛かる。消去動作を実行しているブロックは、書き込み動作および読み出し動作を実行できない。   In a nonvolatile semiconductor memory such as a flash memory, a value held in a memory cell becomes a logic 1 by an erase operation, and becomes a logic 0 by a write operation, for example. In general, the erasing operation is performed in units of blocks such as sectors and takes time. A block that is executing an erase operation cannot execute a write operation and a read operation.

近時、消去動作を中断および再開する機能を有し、消去動作を中断している間に、書き込み動作または読み出し動作を実行できるフラッシュメモリと、このフラッシュメモリの消去動作の中断、再開の制御手法が提案されている(例えば、特許文献1、特許文献2参照)。さらに、メモリセルアレイを複数のバンクに分割し、一方のバンクの消去動作中に、他方のバンクの読み出し動作を実行できるフラッシュメモリが提案されている(例えば、特許文献3参照)。
特開平11−250674号公報 特開2004−30438号公報 特開2000−322894号公報
Recently, a flash memory having a function of interrupting and resuming an erase operation and executing a write operation or a read operation while the erase operation is interrupted, and a control method for interrupting and resuming the erase operation of the flash memory Has been proposed (see, for example, Patent Document 1 and Patent Document 2). Further, there has been proposed a flash memory in which the memory cell array is divided into a plurality of banks and the read operation of the other bank can be executed during the erase operation of one bank (see, for example, Patent Document 3).
JP-A-11-250674 JP 2004-30438 A JP 2000-322894 A

消去動作を中断および再開する機能を有するフラッシュメモリでは、書き込み要求または読み出し要求の頻度が高くなり消去動作が頻繁に中断すると、消去動作が完了するまでの時間は長くなる。消去動作が完了する前にその領域に対する書き込み要求が発生すると、書き込み動作は、消去動作が完了するまで実施できない。これにより、フラッシュメモリをアクセスするシステムの動作が長期間停止すると、システムの性能が低下するという問題がある。   In a flash memory having a function of interrupting and resuming an erase operation, the frequency of a write request or a read request increases, and if the erase operation is frequently interrupted, the time until the erase operation is completed becomes long. If a write request for the area occurs before the erase operation is completed, the write operation cannot be performed until the erase operation is completed. As a result, there is a problem in that the system performance deteriorates when the operation of the system accessing the flash memory is stopped for a long period of time.

本発明の目的は、消去動作の進行が遅れることを防止し、メモリ部をアクセスするシステムの性能が低下することを防止することである。   An object of the present invention is to prevent the progress of the erasing operation from being delayed and to prevent the performance of the system accessing the memory unit from being deteriorated.

第2制御部は、第1制御部から発行される書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行する。第2制御部は、複数のメモリ部のいずれかに消去可能なメモリ部があるときに、書き込みコマンドに応答するメモリ部のいずれかの書き込み動作後に消去コマンドを発行する。さらに、第2制御部は、消去コマンドの発行から第1期間後に、書き込みコマンドに基づく書き込み完了通知を第1制御部に発行する。   The second control unit issues a write command to the corresponding memory unit based on the write request issued from the first control unit. The second control unit issues an erase command after any write operation of the memory unit responding to the write command when any of the plurality of memory units includes an erasable memory unit. Further, the second control unit issues a write completion notification based on the write command to the first control unit after a first period from the issue of the erase command.

書き込み動作の完了から書き込み完了通知を発行するまでの間に消去動作の一部を実行できるため、書き込み要求が頻繁に発生するときにも消去動作を確実に進めることができる。消去動作の進行が遅れることを防止できるため、消去動作中のメモリ部に対して書き込み要求が発生することを未然に防止できる。この結果、消去動作の完了待ちが長時間に亘り発生することを防止でき、メモリ部をアクセスするシステムの性能が低下することを防止できる。   Since a part of the erasing operation can be executed from the completion of the writing operation until the writing completion notification is issued, the erasing operation can surely proceed even when a write request frequently occurs. Since it is possible to prevent the progress of the erase operation from being delayed, it is possible to prevent a write request from being generated for the memory unit during the erase operation. As a result, it is possible to prevent waiting for completion of the erase operation from occurring for a long time, and it is possible to prevent the performance of the system accessing the memory unit from being deteriorated.

以下、実施形態を図面を用いて説明する。図中、太線で示した信号線は、複数本で構成されている。また、太線が接続されているブロックの一部は、複数の回路で構成されている。信号が伝達される信号線には、信号名と同じ符号を使用する。   Hereinafter, embodiments will be described with reference to the drawings. In the figure, the signal lines indicated by bold lines are composed of a plurality of lines. A part of the block to which the thick line is connected is composed of a plurality of circuits. The same reference numerals as the signal names are used for signal lines through which signals are transmitted.

図1は、一実施形態を示している。半導体装置SEMは、例えば、CPU、フラッシュメモリFLASH(以下、FLASHとも称する)およびRAMを内蔵したシングルチップマイクロコンピュータである。CPU、FLASHおよびRAMは、バスBUSを介して互いに接続されている。FLASHおよびRAMのアドレス空間は、CPUによりアクセス可能なアドレス空間に割り当てられる。なお、半導体装置SEMは、タイマ、DMAC、シリアルインタフェース回路などの周辺回路を有していてもよい。特に図示していないが、半導体装置SEMは、入力装置、表示装置等に接続された基板に、他の半導体装置とともに搭載され、システム装置を構成する。   FIG. 1 illustrates one embodiment. The semiconductor device SEM is, for example, a single chip microcomputer incorporating a CPU, a flash memory FLASH (hereinafter also referred to as FLASH), and a RAM. The CPU, FLASH, and RAM are connected to each other via a bus BUS. The address space of FLASH and RAM is assigned to an address space accessible by the CPU. Note that the semiconductor device SEM may include peripheral circuits such as a timer, a DMAC, and a serial interface circuit. Although not particularly illustrated, the semiconductor device SEM is mounted together with other semiconductor devices on a substrate connected to an input device, a display device, and the like to constitute a system device.

FLASHは、コマンド制御回路CCNT、電圧生成回路VGEN、アドレス制御回路ACNT、データ制御回路DCNTおよびメモリセルアレイARYを有している。コマンド制御回路CCNTは、CPUからのコマンド信号CMD、アドレス信号ADおよびデータ信号DQをコマンドとして受け、受けたコマンドを解読し、メモリセルアレイARYのアクセスを制御する制御信号CNTと、電圧生成回路VGEN、アドレス制御回路ACNT、データ制御回路DCNTの動作を制御する制御信号を生成する。コマンド制御回路CCNTが受けるコマンド信号(動作コマンド)として、消去コマンド、書き込みコマンド(プログラムコマンド)、読み出しコマンド、サスペンドコマンド、レジュームコマンド等がある。サスペンドコマンドは、消去動作を一時停止するコマンドである。レジュームコマンドは、停止している消去動作を再開するコマンドである。動作コマンドの詳細は、図2以降で説明する。   The FLASH includes a command control circuit CCNT, a voltage generation circuit VGEN, an address control circuit ACNT, a data control circuit DCNT, and a memory cell array ARY. The command control circuit CCNT receives a command signal CMD, an address signal AD, and a data signal DQ from the CPU as commands, decodes the received command, and controls the access to the memory cell array ARY, a voltage generation circuit VGEN, Control signals for controlling operations of the address control circuit ACNT and the data control circuit DCNT are generated. Examples of command signals (operation commands) received by the command control circuit CCNT include an erase command, a write command (program command), a read command, a suspend command, and a resume command. The suspend command is a command that temporarily stops the erase operation. The resume command is a command for resuming the erase operation that has been stopped. Details of the operation command will be described with reference to FIG.

電圧生成回路VGENは、消去動作や書き込み動作で使用する高電圧V1を、電源電圧を用いて生成する。電源電圧は、半導体装置SEMの外部から供給される。アドレス制御回路ACNTは、コマンド信号CMDとともにCPUから供給されるアドレス信号ADを受け、受けた信号をアドレス信号AD1としてメモリセルアレイARYに出力する。データ制御回路DCNTは、コマンド信号CMD(書き込みコマンド)とともにCPUから供給されるデータ信号DQを受け、受けた信号をデータ信号DTとしてメモリセルアレイARYに出力する。また、データ制御回路DCNTは、コマンド信号CMD(読み出しマンド)に応じてメモリセルアレイARYから出力されるデータ信号DTを受け、受けた信号をバスBUSに出力する。   The voltage generation circuit VGEN generates the high voltage V1 used in the erase operation and the write operation using the power supply voltage. The power supply voltage is supplied from the outside of the semiconductor device SEM. The address control circuit ACNT receives the address signal AD supplied from the CPU together with the command signal CMD, and outputs the received signal to the memory cell array ARY as the address signal AD1. The data control circuit DCNT receives the data signal DQ supplied from the CPU together with the command signal CMD (write command), and outputs the received signal to the memory cell array ARY as the data signal DT. The data control circuit DCNT receives the data signal DT output from the memory cell array ARY in response to the command signal CMD (read command) and outputs the received signal to the bus BUS.

メモリセルアレイARYは、例えば、複数のセクタSEC(SEC0−5;メモリ部)を有している。各セクタSEC0−5は、いわゆるNOR構造に配置された不揮発性メモリセルを有している。不揮発性メモリセルは、フローティングゲートタイプや電荷をトラップするトラップゲートタイプ(ミラービットタイプ)である。例えば、セクタSEC0−1は、データを格納するために使用される。セクタSEC2−5は、CPUが実行するプログラムを格納するために使用される。この実施形態では、セクタSEC0−5は、コマンド制御回路CCNTが生成する1つの制御信号群CNTによりアクセスされる。このため、セクタSECのいずれかがアクセス動作(消去動作、書き込み動作または読み出し動作)を実行しているとき、残りのセクタSECはアクセス動作を実行できない。なお、ここでは、説明を簡単にするために、メモリセルアレイARYが6個のセクタSECを有する例を示しているが、セクタSECの数は、これに限定されない。   The memory cell array ARY has, for example, a plurality of sectors SEC (SEC0-5; memory unit). Each sector SEC0-5 has nonvolatile memory cells arranged in a so-called NOR structure. The nonvolatile memory cell is a floating gate type or a trap gate type (mirror bit type) for trapping charges. For example, sectors SEC0-1 are used for storing data. The sector SEC2-5 is used for storing a program executed by the CPU. In this embodiment, the sectors SEC0-5 are accessed by one control signal group CNT generated by the command control circuit CCNT. For this reason, when any of the sectors SEC is performing an access operation (erase operation, write operation, or read operation), the remaining sectors SEC cannot perform the access operation. Here, for simplicity of explanation, an example in which the memory cell array ARY has six sectors SEC is shown, but the number of sectors SEC is not limited to this.

CPUは、第1制御部CNT1および第2制御部CNT2を有している。第1および第2制御部CNT1−2は、論理回路(ハードウエア)で実現されてもよく、CPUが実行するプログラム(ソフトウエア)により実現されてもよい。あるいは、第1および第2制御部CNT1−2は、制御回路と、この論理回路を制御するプログラムとにより実現されてもよい。   The CPU has a first control unit CNT1 and a second control unit CNT2. The first and second control units CNT1-2 may be realized by a logic circuit (hardware) or may be realized by a program (software) executed by the CPU. Alternatively, the first and second control units CNT1-2 may be realized by a control circuit and a program that controls the logic circuit.

第1制御部CNT1は、セクタSEC0−1のアクセス要求を第2制御部CNT2に発行する。例えば、アクセス要求は、図3から図5に示す書き込み要求WREQ、読み出し要求RREQおよびパワーオフ要求POFFである。第1制御部CNT1がソフトウエアにより実現されるとき、第1制御部CNT1は、CPUが実行するプログラム(アプリケーションプログラムなど)に含まれるアクセス要求(ロード命令またはストア命令など)に応じて、第2制御部CNT2にアクセス要求(アクセス要求パケットなど)を発行する。第1制御部CNT1がハードウエアにより実現されるとき、第1制御部CNT1は、CPUの外部から供給されるFLASHのアクセス要求(割り込みなど)に応じて、第2制御部CNT2にアクセス要求を発行する。   The first control unit CNT1 issues an access request for the sector SEC0-1 to the second control unit CNT2. For example, the access requests are the write request WREQ, the read request RREQ, and the power-off request POFF shown in FIGS. When the first control unit CNT1 is realized by software, the first control unit CNT1 receives the second request according to an access request (such as a load instruction or a store instruction) included in a program (such as an application program) executed by the CPU. An access request (such as an access request packet) is issued to the control unit CNT2. When the first control unit CNT1 is realized by hardware, the first control unit CNT1 issues an access request to the second control unit CNT2 in response to a FLASH access request (such as an interrupt) supplied from the outside of the CPU. To do.

第2制御部CNT2は、第1制御部CNT1からのアクセス要求に基づいてアクセスコマンドをFLASHに発行する。アクセスコマンドは、図3から図5に示す書き込みコマンドWCおよび読み出しコマンドRCである。また、第2制御部CNT2は、FLASHの動作状態に応じて、図3から図5に示すポーリングコマンドPL、消去コマンドEC、サスペンドコマンドSUおよびレジュームコマンドREをFLASHに発行する。ポーリングコマンドPLは、読み出しコマンドの一種であり、FLASHの動作状態をモニタするためのコマンドである。サスペンドコマンドSUは、消去動作を一時的に中断するためのコマンドである。レジュームコマンドREは、中断している消去動作を再開するためのコマンドである。   The second control unit CNT2 issues an access command to FLASH based on the access request from the first control unit CNT1. The access commands are the write command WC and the read command RC shown in FIGS. Further, the second control unit CNT2 issues a polling command PL, an erase command EC, a suspend command SU, and a resume command RE shown in FIGS. 3 to 5 to the FLASH according to the operation state of the FLASH. The polling command PL is a kind of read command, and is a command for monitoring the operating state of FLASH. The suspend command SU is a command for temporarily interrupting the erase operation. The resume command RE is a command for restarting the interrupted erase operation.

第2制御部CNT2がソフトウエアにより実現されるとき、第2制御部CNT2は、FLASHのアクセスを制御するドライバソフトウエア(FLASHのアクセス管理プログラム)として機能する。第2制御部CNT2は、第1制御部CNT1からのアクセス要求(アクセス要求パケットなど)に応じて、FLASHにアクセスコマンドを発行する。第2制御部CNT2がハードウエアにより実現されるとき、第2制御部CNT2は、FLASHのアクセスを制御するメモリコントローラとして機能する。第2制御部CNT2は、第1制御部CNT1からのアクセス要求(トリガ信号など)に応じて、FLASHにアクセスコマンドを発行する。   When the second control unit CNT2 is realized by software, the second control unit CNT2 functions as driver software (FLASH access management program) that controls access to FLASH. The second control unit CNT2 issues an access command to FLASH in response to an access request (such as an access request packet) from the first control unit CNT1. When the second control unit CNT2 is realized by hardware, the second control unit CNT2 functions as a memory controller that controls access to FLASH. The second control unit CNT2 issues an access command to FLASH in response to an access request (such as a trigger signal) from the first control unit CNT1.

RAMは、データまたはCPUが実行するプログラムを格納するために使用される。特に、第1および第2制御部CNT1−2の少なくとも一部がソフトウエアにより実現されるとき、CPUは、FLASHの消去動作中にセクタSEC2−5に格納されたプログラムをフェッチできない。このとき、CPUは、RAMに格納されたプログラムをフェッチしてのFLASHの動作状態を確認する。   The RAM is used for storing data or a program executed by the CPU. In particular, when at least a part of the first and second control units CNT1-2 is realized by software, the CPU cannot fetch the program stored in the sector SEC2-5 during the FLASH erase operation. At this time, the CPU fetches the program stored in the RAM and confirms the operation state of FLASH.

図2は、図1に示したメモリセルアレイARYのアクセスの例を示している。ここでは、説明を簡単にするために、セクタSEC0(第1領域)が4つの記憶領域MR(MR01−04)で構成され、セクタSEC1(第2領域)が4つの記憶領域MR(MR11−14)で構成される例を示しているが、記憶領域の数はこれに限定されない。各記憶領域MRは、書き込みまたは読み出しの最小単位であり、例えば、16ビットで構成される。網掛けの記憶領域MRは、データが書き込まれた状態を示し、白い記憶領域MRは、消去されていることを示し、斜線の記憶領域MRは、消去中を示している。   FIG. 2 shows an example of access to the memory cell array ARY shown in FIG. Here, in order to simplify the explanation, the sector SEC0 (first area) is composed of four storage areas MR (MR01-04), and the sector SEC1 (second area) is composed of four storage areas MR (MR11-14). However, the number of storage areas is not limited to this. Each storage area MR is a minimum unit for writing or reading, and is composed of, for example, 16 bits. A shaded storage area MR indicates a state in which data is written, a white storage area MR indicates that data is erased, and a hatched storage area MR indicates that data is being erased.

フラッシュメモリ等の不揮発性半導体メモリでは、消去状態(例えば論理1)のメモリセルをプログラムすることで、メモリセルは書き込み状態(例えば論理0)に変更される。書き込み状態から消去状態に変更するための消去動作は、セクタSEC単位で実行される。このため、各セクタSEC0−1において、書き込み状態の記憶領域MRに新たなデータを書き込むときに、そのセクタSECのデータを消去する必要がある。   In a nonvolatile semiconductor memory such as a flash memory, by programming a memory cell in an erased state (for example, logic 1), the memory cell is changed to a written state (for example, logic 0). The erase operation for changing from the write state to the erase state is executed in units of sectors SEC. For this reason, in each sector SEC0-1, when writing new data to the storage area MR in the written state, it is necessary to erase the data in that sector SEC.

図の例では、データは、セクタSEC0−1に順次に保持される。第2制御部CNT2は、書き込みアドレスおよび書き込みデータ等とともに書き込み要求WREQを受ける毎に、書き込みコマンドWC、書き込みアドレスおよび書き込みデータをFLASHに出力し、書き込みデータを書き込みアドレスが示す記憶領域MRに書き込む。さらに、第2制御部CNT2は、一方のセクタSECにおいて、最初の記憶領域MR(MR01またはMR11)にデータを書き込んだ後、他方のセクタSECのデータが不要になったと判断し、他方のセクタSECのデータを消去するためにFLASHに消去コマンドECを出力する(例えば、図2(a、b))。すなわち、第2制御部CNT2は、セクタSECのいずれかが消去可能になったとき、そのセクタに対して消去コマンドECを発行する。   In the example shown in the figure, data is sequentially held in the sectors SEC0-1. Each time the second control unit CNT2 receives a write request WREQ together with a write address, write data, and the like, the second control unit CNT2 outputs the write command WC, the write address, and the write data to FLASH, and writes the write data in the storage area MR indicated by the write address. Further, after writing data in the first storage area MR (MR01 or MR11) in one sector SEC, the second control unit CNT2 determines that the data in the other sector SEC is no longer needed, and the other sector SEC. An erase command EC is output to FLASH in order to erase the data (for example, FIGS. 2A and 2B). That is, when any of the sectors SEC becomes erasable, the second control unit CNT2 issues an erase command EC to the sector.

例えば、図に示したアクセスは、自動車のエンジンを制御するためのシステム装置の動作の一部を示している。具体的には、エンジンを制御するために設計された第1制御部CNT1(例えば、アプリケーションプログラム)は、エンジンの回転数、自動車の速度、燃料の消費量などの情報を周期的にモニタし、モニタにより得られたデータをFLASHに順次書き込むために、書き込み要求WREQを発行する。例えば、モニタは、5ms毎に行われ、書き込み要求WREQは、FLASHの書き込み状態に応じて、10−50ms毎に発行される。また、第1制御部CNT1は、FLASHに書き込まれたデータを読み出し、読み出したデータを、最適なエンジン出力が得られるように点火系にフィードバックする。   For example, the access shown in the figure shows a part of the operation of the system device for controlling the engine of the automobile. Specifically, the first control unit CNT1 (for example, an application program) designed to control the engine periodically monitors information such as the engine speed, the speed of the automobile, and the fuel consumption. In order to sequentially write the data obtained by the monitor to FLASH, a write request WREQ is issued. For example, the monitoring is performed every 5 ms, and the write request WREQ is issued every 10-50 ms depending on the write state of FLASH. In addition, the first control unit CNT1 reads the data written in the FLASH, and feeds back the read data to the ignition system so that an optimum engine output can be obtained.

第1制御部CNT1からの要求に応じてFLASHを実際にアクセスする第2制御部CNT2(例えば、アクセス管理プログラム)は、データをセクタSEC0−1に巡回的に書き込むために、セクタSEC0−1の書き込み、消去を管理する。そして、一方のセクタSECに全ての記憶領域MRにデータを書き込み、他方のセクタSECの記憶領域の1つにデータを書き込んだときに、一方のセクタSECのデータを消去するために消去コマンドECを発行する。一般に、フラッシュメモリのセクタの消去時間は、数百msである。この消去時間は、書き込み要求WREQの最大間隔(50ms)より長い。このため、第2制御部CNT2は、図示しないサスペンドコマンドおよびレジュームコマンドを用いて消去動作を一時的停止している間に書き込みコマンドWCを発行する。書き込み要求WREQの頻度が高いとき、一方のセクタSECの消去動作が完了する前に、他方のセクタSECの全ての記憶領域MRにデータが書き込まれてしまう。一方で、消去動作が完了する前のセクタSECに新たなデータは書き込むことはできない。このため、第2制御部CNT2は、着目するセクタSECに対応する書き込み要求WREQを受ける前に、このセクタSECの消去動作を完了する必要がある。   The second control unit CNT2 (for example, the access management program) that actually accesses FLASH in response to a request from the first control unit CNT1 writes the data in the sectors SEC0-1 in order to cyclically write the data to the sectors SEC0-1. Manage writing and erasing. Then, when data is written in all the storage areas MR in one sector SEC and data is written in one of the storage areas in the other sector SEC, an erase command EC is issued to erase the data in one sector SEC. Issue. Generally, the erase time of a sector of flash memory is several hundred ms. This erase time is longer than the maximum interval (50 ms) of the write request WREQ. For this reason, the second control unit CNT2 issues a write command WC while the erase operation is temporarily stopped using a suspend command and a resume command (not shown). When the frequency of the write request WREQ is high, data is written to all the storage areas MR of the other sector SEC before the erase operation of the one sector SEC is completed. On the other hand, new data cannot be written in the sector SEC before the erase operation is completed. Therefore, the second control unit CNT2 needs to complete the erase operation of the sector SEC before receiving the write request WREQ corresponding to the sector SEC of interest.

なお、一方のセクタSECに対する消去コマンドECの発行タイミングは、他方のセクタSECに複数回のデータの書き込みが実行されたときでもよい。あるいは、他方のセクタSECに最初のデータが書き込まれる前に、一方のセクタSECに消去コマンドを発行してもよい。また、一方のセクタSECに書き込まれたデータのいくつかを、他方のセクタSECに予備的に書き込んでもよい。   Note that the issuing timing of the erase command EC for one sector SEC may be when data is written a plurality of times in the other sector SEC. Alternatively, an erase command may be issued to one sector SEC before the first data is written to the other sector SEC. Further, some of the data written in one sector SEC may be preliminarily written in the other sector SEC.

図3および図4は、図1に示した半導体装置SEMの動作の例を示している。なお、図では、アドレス信号およびデータ信号の受け渡しは、記載を省略している。記憶領域MRの網掛け等は、図2と同じ意味である。太い実線は、第1制御部CNT1、第2制御部CNT2およびFLASHの動作期間を示している。例えば、第1制御部CNT1の動作は、CPUがアプリケーションプログラムを実行する期間である。第2制御部CNT2の動作は、CPUがFLASHのセクタSEC2−5に格納されたアクセス管理プログラムを実行する期間である。第2制御部CNT2内の太い破線は、CPUがRAMに格納されたアクセス管理プログラムを実行する期間である。FLASHが書き込み動作WRまたは消去動作ERを実行している間、CPUは、FLASHのセクタSEC2−5に格納されたプログラムを読み出すことができない。このため、CPUは、書き込み動作WRの完了をモニタするためのポーリング処理(ポーリングコマンドPL)および消去動作ERを中断するためのサスペンド処理(サスペンドコマンドSU)を、RAMに格納されたプログラムをフェッチすることで実施する。   3 and 4 show an example of the operation of the semiconductor device SEM shown in FIG. In the figure, the address signal and the data signal are not shown. The shading of the storage area MR has the same meaning as in FIG. A thick solid line indicates an operation period of the first control unit CNT1, the second control unit CNT2, and the FLASH. For example, the operation of the first control unit CNT1 is a period during which the CPU executes an application program. The operation of the second control unit CNT2 is a period during which the CPU executes the access management program stored in the sector SEC2-5 of FLASH. A thick broken line in the second control unit CNT2 is a period during which the CPU executes the access management program stored in the RAM. While the FLASH is executing the write operation WR or the erase operation ER, the CPU cannot read the program stored in the sectors SEC2-5 of the FLASH. Therefore, the CPU fetches a program stored in the RAM, a polling process (polling command PL) for monitoring the completion of the write operation WR and a suspend process (suspend command SU) for interrupting the erase operation ER. It will be implemented.

図の始まりにおいて、セクタSEC0の記憶領域MR01−03にデータが書き込まれている。セクタSEC1(MR11−14)は消去済みである。第1制御部CNT1は、新たに得たデータをFLASHの記憶領域MR04に書き込むために書き込み要求WREQを発行する(図3(a))。例えば、第1制御部CNT1の機能がアプリケーションプログラムにより実現されるとき、プログラムは、書き込み要求WREQ、書き込みアドレスおよび書き込みデータ等のパラメータをレジスタまたはワークエリアに設定した後、アクセス管理プログラム中の書き込み関数プログラムにサブルーチンコールする。後述する読み出し要求RREQの処理も同様である。   At the beginning of the figure, data is written in the storage area MR01-03 of the sector SEC0. Sector SEC1 (MR11-14) has been erased. The first control unit CNT1 issues a write request WREQ to write newly obtained data into the FLASH storage area MR04 (FIG. 3A). For example, when the function of the first control unit CNT1 is realized by an application program, the program sets parameters such as a write request WREQ, a write address, and write data in a register or work area, and then writes a write function in the access management program Make a subroutine call to the program. The same applies to processing of a read request RREQ, which will be described later.

第2制御部CNT2(アクセス管理プログラム)は、第1制御部CNT1からの書き込み要求WREQに基づいて、FLASHに書き込みコマンドWC(プログラムコマンド)を発行する(図3(b))。図の4本の矢印は、書き込み動作を開始するために4バスサイクルが必要なことを示している。書き込みコマンドWCは、書き込みアドレスおよび書き込みデータを含んでいる。書き込みコマンドWCおよび消去コマンドEC等のNOR型フラッシュメモリのコマンドシーケンスは、公知のため、詳細な説明は省略する。FLASHは、書き込みコマンドWCに応答して書き込み動作WRを開始する(図3(c))。   The second control unit CNT2 (access management program) issues a write command WC (program command) to FLASH based on the write request WREQ from the first control unit CNT1 (FIG. 3B). The four arrows in the figure indicate that four bus cycles are required to start the write operation. The write command WC includes a write address and write data. Since the command sequence of the NOR flash memory such as the write command WC and the erase command EC is publicly known, detailed description thereof is omitted. FLASH starts the write operation WR in response to the write command WC (FIG. 3C).

第2制御部CNT2は、書き込み動作WRの完了を検出するために、ポーリングコマンドPL(読み出しコマンドの一種)を周期的にFLASHに発行する(図3(d))。この時点で中断中の消去動作および消去動作が必要なセクタSECは存在しないため、第2制御部CNT2は、書き込み動作WRの完了に応答して、書き込み動作WRの完了通知WENDを第1制御部CNT1に発行する(図3(e))。具体的には、元のアプリケーションプログラムにリターンする。これにより、制御は、第1制御部CNT1に移される。   The second controller CNT2 periodically issues a polling command PL (a kind of read command) to FLASH in order to detect the completion of the write operation WR (FIG. 3 (d)). Since there is no interrupted erase operation and no sector SEC requiring the erase operation at this time, the second control unit CNT2 sends a completion notification WEND of the write operation WR in response to the completion of the write operation WR. Issued to CNT1 (FIG. 3E). Specifically, the process returns to the original application program. Thereby, the control is transferred to the first control unit CNT1.

次に、第1制御部CNT1は、新たに得たデータをFLASHの記憶領域MR11に書き込むために書き込み要求WREQを発行する(図3(f))。この後、書き込み動作WRの完了までの処理は、上述と同じである。セクタSEC0の全ての記憶領域MR01−03にデータが書き込まれており、セクタSEC1の最初の記憶領域MR11にデータが書き込まれたため、第2制御部CNT2は、まずセクタSEC1に対して消去コマンドECを発行する(図3(g))。この後、第2制御部CNT2は、完了通知WENDをすぐに発行せずに第1期間P1だけ待つ(図3(h))。第1期間P1は、例えば、第2制御部CNT2がNOP命令を所定の回数繰り返すことで生成される。   Next, the first control unit CNT1 issues a write request WREQ to write newly obtained data into the FLASH storage area MR11 (FIG. 3 (f)). Thereafter, the processing up to the completion of the write operation WR is the same as described above. Since data is written in all the storage areas MR01-03 of the sector SEC0 and data is written in the first storage area MR11 of the sector SEC1, the second control unit CNT2 first issues an erase command EC to the sector SEC1. Issue (Fig. 3 (g)). Thereafter, the second control unit CNT2 waits for the first period P1 without immediately issuing the completion notification WEND (FIG. 3 (h)). The first period P1 is generated, for example, when the second control unit CNT2 repeats the NOP instruction a predetermined number of times.

期間P1の後、第2制御部CNT2は、FLASHにサスペンドコマンドSUを発行し、消去動作ERを中断する(図3(i))。消去動作ERは、期間P1だけ実行される。さらに、第2制御部CNT2は、完了通知WENDを第1制御部CNT1に発行する(図3(j))。   After the period P1, the second control unit CNT2 issues a suspend command SU to FLASH and interrupts the erase operation ER (FIG. 3 (i)). The erase operation ER is executed only for the period P1. Furthermore, the second control unit CNT2 issues a completion notification WEND to the first control unit CNT1 (FIG. 3 (j)).

次に、第1制御部CNT1は、新たに得たデータをFLASHの記憶領域MR12に書き込むために書き込み要求WREQを発行する(図3(k))。この後、書き込み動作WRの完了までは、上述と同じである。第2制御部CNT2は、書き込み動作WRの完了後、消去動作ERを再開するためにレジュームコマンドREをFLASHに発行する(図3(l))。この後、上述と同様に、第2制御部CNT2は、期間P1だけウエイトし、サスペンドコマンドSUをFLASHに発行する(図3(m、n))。そして、第2制御部CNT2は、完了通知WENDを第1制御部CNT1に発行する(図3(o))。これにより、消去動作ERは、期間P1だけ実行される。   Next, the first control unit CNT1 issues a write request WREQ to write newly obtained data into the FLASH storage area MR12 (FIG. 3 (k)). Thereafter, the process until the completion of the write operation WR is the same as described above. After the completion of the write operation WR, the second control unit CNT2 issues a resume command RE to FLASH in order to resume the erase operation ER (FIG. 3 (l)). Thereafter, as described above, the second control unit CNT2 waits for the period P1 and issues a suspend command SU to FLASH (FIG. 3 (m, n)). Then, the second control unit CNT2 issues a completion notification WEND to the first control unit CNT1 (FIG. 3 (o)). As a result, the erase operation ER is executed only for the period P1.

次に、図4において、第1制御部CNT1は、例えば、記憶領域MR02に保持されたデータを読み出すために読み出し要求RREQを発行する(図4(a))。第2制御部CNT2は、読み出し要求RREQに基づいて、FLASHに読み出しコマンドRCを発行する(図4(b))。読み出しコマンドRCは、読み出しアドレスを含んでいる。FLASHは、読み出しコマンドRCに応答して読み出し動作RDを実行する(図4(c))。   Next, in FIG. 4, the first control unit CNT1 issues a read request RREQ in order to read data held in the storage area MR02, for example (FIG. 4A). The second control unit CNT2 issues a read command RC to FLASH based on the read request RREQ (FIG. 4B). The read command RC includes a read address. FLASH executes the read operation RD in response to the read command RC (FIG. 4C).

第2制御部CNT2は、読み出し動作RDの完了後、消去動作ERを再開するためにレジュームコマンドREをFLASHに発行する(図4(d))。この後、上述と同様に、第2制御部CNT2は、期間P1だけウエイトし、サスペンドコマンドSUをFLASHに発行し、読み出し動作RDの完了通知RENDを第1制御部CNT1に発行する(図4(e、f、g))。これにより、消去動作ERは、期間P1だけ実行される。   After the completion of the read operation RD, the second control unit CNT2 issues a resume command RE to FLASH in order to resume the erase operation ER (FIG. 4 (d)). Thereafter, as described above, the second control unit CNT2 waits for the period P1, issues a suspend command SU to FLASH, and issues a read operation RD completion notification REND to the first control unit CNT1 (FIG. 4 ( e, f, g)). As a result, the erase operation ER is executed only for the period P1.

次に、第1制御部CNT1は、新たに得たデータをFLASHの記憶領域MR13に書き込むために書き込み要求WREQを発行する(図4(h))。この後、完了通知WENDが発行されるまでは、セクタSEC0の消去動作ERが完了することを除き、上述と同じである。なお、第2制御部CNT2は、消去動作ERの完了タイミングを検出するために、期間P1中にポーリングコマンドPLをFLASHに発行してもよい。この場合、消去動作ERの完了後、直ちに完了通知WENDを発行できる。   Next, the first control unit CNT1 issues a write request WREQ in order to write the newly obtained data to the FLASH storage area MR13 (FIG. 4 (h)). Thereafter, the operation is the same as described above except that the erase operation ER of the sector SEC0 is completed until the completion notification WEND is issued. Note that the second control unit CNT2 may issue a polling command PL to the FLASH during the period P1 in order to detect the completion timing of the erase operation ER. In this case, the completion notification WEND can be issued immediately after the erase operation ER is completed.

次に、第1制御部CNT1は、新たに得たデータをFLASHの記憶領域MR14に書き込むために書き込み要求WREQを発行する(図4(i))。第2制御部CNT2は、上述と同様に、FLASHに書き込みコマンドWCおよびポーリングコマンドPLを発行する(図4(j、k))。この時点で中断中の消去動作および消去が必要なセクタSECが存在しない。このため、第2制御部CNT2は、レジュームコマンドREおよび消去コマンドECを発行することなく、さらに期間P1を待つことなく、完了通知WENDを第1制御部CNT1に発行する(図4(l))。   Next, the first control unit CNT1 issues a write request WREQ to write newly obtained data into the FLASH storage area MR14 (FIG. 4 (i)). The second control unit CNT2 issues a write command WC and a polling command PL to FLASH in the same manner as described above (FIG. 4 (j, k)). At this time, there is no erase operation that is suspended and no sector SEC that needs to be erased. Therefore, the second control unit CNT2 issues a completion notification WEND to the first control unit CNT1 without issuing the resume command RE and the erase command EC and without waiting for the period P1 (FIG. 4 (l)). .

図5は、図1に示した半導体装置SEMのパワーオフ時の動作の例を示している。第1制御部CNT1は、半導体装置SEMが搭載されるシステム装置の電源が遮断されるとき、第2制御部CNT2にパワーオフ要求POFFを発行する(図5(a))。パワーオフ要求POFFが発行されるまでの動作は、図3および図4と同じである。   FIG. 5 shows an example of the operation when the semiconductor device SEM shown in FIG. 1 is powered off. The first control unit CNT1 issues a power-off request POFF to the second control unit CNT2 when the power supply of the system device on which the semiconductor device SEM is mounted is shut off (FIG. 5A). The operation until the power-off request POFF is issued is the same as that shown in FIGS.

第1制御部CNT1は、パワーオフ要求POFFに基づいて、消去動作ERを再開するために、FLASHにレジュームコマンドREを発行する(図5(b))。第1制御部CNT1は、消去動作ERの完了を検出するまで、FLASHにポーリングコマンドPLを周期的に発行する(図5(c))。第2制御部CNT2は、消去動作ERの完了の検出に同期して、消去動作ERの完了通知EENDを第1制御部CNT1に発行する(図5(d))。これにより、消去動作ERの途中に電源の供給が停止することを防止でき、FLASHが誤動作することを防止できる。   Based on the power-off request POFF, the first control unit CNT1 issues a resume command RE to FLASH in order to resume the erase operation ER (FIG. 5B). The first control unit CNT1 periodically issues a polling command PL to FLASH until the completion of the erase operation ER is detected (FIG. 5C). The second control unit CNT2 issues a completion notification EEND of the erase operation ER to the first control unit CNT1 in synchronization with the detection of the completion of the erase operation ER (FIG. 5 (d)). Thereby, it is possible to prevent the supply of power from being stopped during the erasing operation ER, and to prevent the FLASH from malfunctioning.

図6は、図1に示した第2制御部CNT2の動作を示している。第2制御部CNT2がソフトウエアで実現されるとき、図6のフローにしたがってプログラムが設計される。第2制御部CNT2がハードウエアで実現されるとき、図6のフローが回路記述に置き換えられ、論理回路が設計される。図6のフローは、図4から図6の動作をまとめたものである。   FIG. 6 shows the operation of the second control unit CNT2 shown in FIG. When the second control unit CNT2 is realized by software, a program is designed according to the flow of FIG. When the second control unit CNT2 is realized by hardware, the flow of FIG. 6 is replaced with a circuit description, and a logic circuit is designed. The flow in FIG. 6 summarizes the operations in FIGS. 4 to 6.

第2制御部CNT2は、書き込み要求WREQに基づいて、動作10において、FLASHの記憶領域にデータを書き込む。第2制御部CNT2は、動作12において、消去動作ERを開始する必要があるか否かを判定する。消去動作ERを開始する必要があるとき、第2制御部CNT2は、動作14において、FLASHに消去コマンドECを発行し、消去動作ERを開始する。消去動作ERが不要なとき、第2制御部CNT2は、動作16において、FLASHがサスペンド中か否かを判定する。サスペンド中のとき、動作18において、第2制御部CNT2は、FLASHにレジュームコマンドREを発行し、消去動作ERを再開する。サスペンド中でないとき、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する(RETURN)。図中の”RETURN”は、図3から図5に示した完了通知WEND、RENDまたはEENDのいずれかを示す。   Based on the write request WREQ, the second control unit CNT2 writes data to the FLASH storage area in operation 10. In operation 12, the second control unit CNT2 determines whether or not it is necessary to start the erase operation ER. When it is necessary to start the erase operation ER, the second control unit CNT2 issues an erase command EC to FLASH in operation 14 and starts the erase operation ER. When the erasing operation ER is unnecessary, the second control unit CNT2 determines in operation 16 whether or not FLASH is being suspended. When the operation is suspended, in operation 18, the second control unit CNT2 issues a resume command RE to FLASH and restarts the erase operation ER. When not being suspended, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1 (RETURN). “RETURN” in the figure indicates one of the completion notifications WEND, REND, and EEND shown in FIGS.

消去動作ERが開始され、または再開されたとき、第2制御部CNT2は、動作20において、期間P1だけ待つ。次に、動作22において、第2制御部CNT2は、消去動作ERを中断するために、FLASHにサスペンドコマンドSUを発行する。   When the erase operation ER is started or restarted, the second control unit CNT2 waits for the period P1 in the operation 20. Next, in operation 22, the second controller CNT2 issues a suspend command SU to FLASH in order to interrupt the erase operation ER.

一方、第2制御部CNT2は、読み出し要求RREQに基づいて、動作24において、FLASHに読み出しコマンドRCを発行し、記憶領域MRのいずれかからデータを読み出す。この後、動作26から動作32において、上述した動作16から動作22と同様に、第2制御部CNT2は、FALSHがサスペンド中のときにレジュームコマンドREを発行し、消去動作ERを再開し、期間P1待った後サスペンドコマンドSUを発行する。サスペンド中でないとき、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する。なお、動作26から動作32の制御は、実施しなくてもよい。すなわち、期間P1は、書き込み要求WREQのみに応答して確保されてもよい。   On the other hand, based on the read request RREQ, the second control unit CNT2 issues a read command RC to FLASH in operation 24, and reads data from any of the storage areas MR. Thereafter, in the operation 26 to the operation 32, as in the operation 16 to the operation 22 described above, the second control unit CNT2 issues the resume command RE when the FALSE is suspended, and resumes the erase operation ER. After waiting for P1, a suspend command SU is issued. When not being suspended, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1. The control from the operation 26 to the operation 32 may not be performed. That is, the period P1 may be secured only in response to the write request WREQ.

さらに、第2制御部CNT2は、パワーオフ要求POFFに基づいて、動作34において、FLASHがサスペンド中か否かを判定する。サスペンド中のとき、動作36において、第2制御部CNT2は、FLASHにレジュームコマンドREを発行し、消去動作ERを再開する。サスペンド中でないとき、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する。第2制御部CNT2は、動作38において、消去動作ERの完了を検出するまで、FLASHにポーリングコマンドPLを繰り返し発行する。そして、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する。   Further, based on the power-off request POFF, the second control unit CNT2 determines whether FLASH is being suspended in the operation 34. When the operation is suspended, in operation 36, the second control unit CNT2 issues a resume command RE to FLASH and restarts the erase operation ER. When not being suspended, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1. In operation 38, the second control unit CNT2 repeatedly issues the polling command PL to FLASH until the completion of the erase operation ER is detected. Then, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1.

図7は、図1に示した第2制御部CNT2が提案される前の半導体装置SEMの動作の例を示している。図3および図4と同じ動作については、詳細な説明は省略する。この例においても、第1制御部CNT1は、図3および図4と同様に、記憶領域MR11−14にデータを書き込むために、書き込み要求WREQを順次に発行する。第2制御部CNT2は、書き込み動作WR後にFLASHに消去コマンドECまたはレジュームコマンドREを発行する(図7(a、b、c、d))。この後、第2制御部CNT2は、完了通知WENDを第1制御部CNT1に発行する(図7(e、f、g、h))。但し、第2制御部CNT2は、期間P1を待たずに完了通知WENDを発行する。   FIG. 7 shows an example of the operation of the semiconductor device SEM before the second control unit CNT2 shown in FIG. 1 is proposed. Detailed descriptions of the same operations as those in FIGS. 3 and 4 are omitted. Also in this example, the first control unit CNT1 issues a write request WREQ sequentially in order to write data in the storage area MR11-14, as in FIGS. The second controller CNT2 issues an erase command EC or a resume command RE to FLASH after the write operation WR (FIG. 7 (a, b, c, d)). Thereafter, the second control unit CNT2 issues a completion notification WEND to the first control unit CNT1 (FIG. 7 (e, f, g, h)). However, the second control unit CNT2 issues a completion notification WEND without waiting for the period P1.

第1制御部CNT1は、図3および図4と同様に、完了通知WENDを受けた後、書き込み要求WREQを発行する(図7(i、j、k、l))。第2制御部CNT2は、新たな書き込み要求WREQに基づいて、FLASHの消去動作ERを中断するためにFLASHにサスペンドコマンドSUを発行し、書き込み動作WRを実行するために、FLASHに書き込みコマンドWCを発行する(図7(m、n、o))。   Similar to FIGS. 3 and 4, the first control unit CNT1 issues a write request WREQ after receiving the completion notification WEND (FIG. 7 (i, j, k, l)). Based on the new write request WREQ, the second control unit CNT2 issues a suspend command SU to FLASH to interrupt the erase operation ER of FLASH, and issues a write command WC to FLASH to execute the write operation WR. Issue (FIG. 7 (m, n, o)).

しかし、この例では、期間P1がないため、消去動作ERが開始または再開されてから中断するまでの期間は短い。このため、一方のセクタSEC(この例では、SEC0)の消去動作ERが完了する前に、他方のセクタSEC(この例では、SEC1)の全ての記憶領域MR11−14にデータが書き込まれてしまう(図7(p))。第2制御部CNT2は、セクタSEC0の記憶領域MR01にデータを書き込むための書き込み要求WREQを受けても、セクタSEC0の消去動作ERが完了するまで、書き込みコマンドWCを発行できない(図7(q))。この結果、FLASHにデータを書き込みできない期間が発生してしまう。換言すれば、消去完了を待つための長い期間が発生し、見かけ上の消去期間が長くなってしまう。最悪の場合、半導体装置SEMが搭載されるシステム装置の動作が長期間停止してしまう。   However, in this example, since there is no period P1, the period from the start or restart of the erase operation ER to the interruption is short. For this reason, before the erase operation ER of one sector SEC (SEC0 in this example) is completed, data is written in all the storage areas MR11-14 of the other sector SEC (SEC1 in this example). (FIG. 7 (p)). Even if the second control unit CNT2 receives a write request WREQ for writing data to the storage area MR01 of the sector SEC0, it cannot issue the write command WC until the erase operation ER of the sector SEC0 is completed (FIG. 7 (q) ). As a result, a period during which data cannot be written to FLASH occurs. In other words, a long period for waiting for the completion of erasure occurs, and the apparent erasure period becomes long. In the worst case, the operation of the system device on which the semiconductor device SEM is mounted stops for a long time.

以上、この実施形態では、消去コマンドWCまたはレジュームコマンドREの発行から完了通知WENDまたはRENDを発行するまでの間に、タイムラグP1を設定することにより、書き込み動作WRまたは読み出し動作RDの完了後に、消去動作ERを比較的長い期間実行できる。したがって、書き込み要求WREQが頻繁に発生するときにも消去動作ERを確実に進めることができる。消去動作ERの進行が遅れることを防止できるため、消去動作ER中のセクタSECに対して書き込み要求WREQが発生することを未然に防止できる。この結果、FLASHをアクセスするシステム装置の性能が低下することを防止できる。   As described above, in this embodiment, by setting the time lag P1 between the issuance of the erase command WC or the resume command RE and the issuance of the completion notification WEND or REND, the erase operation is performed after the write operation WR or the read operation RD is completed. The operation ER can be executed for a relatively long period. Therefore, the erase operation ER can be reliably advanced even when the write request WREQ is frequently generated. Since the progress of the erase operation ER can be prevented from being delayed, it is possible to prevent the write request WREQ from occurring for the sector SEC during the erase operation ER. As a result, it is possible to prevent the performance of the system device that accesses FLASH from being deteriorated.

図8は、別の実施形態を示している。上述した実施形態で説明した要素と同一の要素については、同一の符号を付し、これ等については、詳細な説明を省略する。この実施形態では、CPUは、期間P1の長さを設定するための値を保持するレジスタP1REGを有している。レジスタP1REGの値は、第1制御部CNT1がレジスタ設定コマンドREGSを発行することにより書き換えられる。第2制御部CNT2は、レジスタP1REGに保持されている値に基づいて期間P1を設定する。その他の構成は、図1と同じである。レジスタP1REGが半導体装置SEMのパワーオン時に1回だけ設定されるとき、期間P1は一定の長さであり、半導体装置SEMの動作は、図3から図5と同じである。   FIG. 8 shows another embodiment. The same elements as those described in the above-described embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted. In this embodiment, the CPU has a register P1REG that holds a value for setting the length of the period P1. The value of the register P1REG is rewritten when the first control unit CNT1 issues a register setting command REGS. The second control unit CNT2 sets the period P1 based on the value held in the register P1REG. Other configurations are the same as those in FIG. When the register P1REG is set only once when the semiconductor device SEM is powered on, the period P1 has a fixed length, and the operation of the semiconductor device SEM is the same as that shown in FIGS.

図9は、図8に示した半導体装置SEMの動作の例を示している。図3との違いは、第1制御部CNT1からレジスタ設定コマンドREGSが発行され、レジスタP1REGの値が書き換えられることにより、期間P1が変更されることである。その他の動作は、期間P1の長さが異なることを除き、図3と同じである。   FIG. 9 shows an example of the operation of the semiconductor device SEM shown in FIG. The difference from FIG. 3 is that the period P1 is changed by issuing a register setting command REGS from the first controller CNT1 and rewriting the value of the register P1REG. Other operations are the same as those in FIG. 3 except that the length of the period P1 is different.

以上、この実施形態においても、図1から図6に示した実施形態と同様の効果を得ることができる。さらに、この実施形態では、消去動作ERの継続期間である期間P1を変更することにより、書き込み要求WREQの発生頻度と、消去動作ERの継続時間とのバランスを常に最適に設定できる。この結果、図7のように消去動作ERが長期間続くことを防止でき、半導体装置SEMが搭載されるシステム装置の動作が停止することを防止できる。また、セクタSEC0−1に書き込まれるデータがオーバーフローすることを防止できる。特に、書き込み要求WREQの頻度が高くなることが予想されるときに、頻度が高くなる前に期間P1を長くすることで、書き込み要求WREQの頻度が高くなったときに見かけ上の消去期間が長くなることを防止できる。

図10は、別の実施形態を示している。上述した実施形態で説明した要素と同一の要素については、詳細な説明を省略する。この実施形態の半導体装置SEMは、第2制御部CNT2およびフラッシュメモリFLASHが図1と相違している。その他の構成は、図1と同じである。すなわち、半導体装置SEMは、入力装置、表示装置等に接続された基板に、他の半導体装置とともに搭載され、システム装置を構成する。第2制御部CNT2の動作は、図11から図14に示す。
As described above, also in this embodiment, the same effects as those of the embodiment shown in FIGS. 1 to 6 can be obtained. Furthermore, in this embodiment, the balance between the frequency of occurrence of the write request WREQ and the duration of the erase operation ER can always be set optimally by changing the period P1, which is the duration of the erase operation ER. As a result, it is possible to prevent the erasing operation ER from continuing for a long period of time as shown in FIG. 7 and to prevent the operation of the system device on which the semiconductor device SEM is mounted from being stopped. Further, it is possible to prevent the data written in the sectors SEC0-1 from overflowing. In particular, when the frequency of the write request WREQ is expected to increase, the period P1 is lengthened before the frequency increases, so that the apparent erase period becomes longer when the frequency of the write request WREQ increases. Can be prevented.

FIG. 10 shows another embodiment. Detailed description of the same elements as those described in the above embodiment will be omitted. In the semiconductor device SEM of this embodiment, the second control unit CNT2 and the flash memory FLASH are different from those in FIG. Other configurations are the same as those in FIG. That is, the semiconductor device SEM is mounted on a substrate connected to an input device, a display device, and the like together with other semiconductor devices to constitute a system device. The operation of the second control unit CNT2 is shown in FIGS.

FLASHのメモリセルアレイARYは、バンクBKA(第1メモリブロック)およびバンクBKB(第2メモリブロック)を有している。バンクBKAは、2つのセクタSECA(SECA0−1)を有している。セクタSECA0−1の構成は、図1および図2に示したセクタSEC0−1と同じである。バンクBKBは、4つのセクタSECB(SECB0−3)を有している。各セクタSECA0−1、SECB0−3は、いわゆるNOR構造に配置された不揮発性メモリセルを各々有している。不揮発性メモリセルは、フローティングゲートタイプや電荷をトラップするトラップゲートタイプ(ミラービットタイプ)である。例えば、バンクBKAは、データを格納するために使用される。バンクBKBは、CPUが実行するプログラムを格納するために使用される。なお、セクタSECA、SECBの数は、これに限定されない。   The FLASH memory cell array ARY includes a bank BKA (first memory block) and a bank BKB (second memory block). The bank BKA has two sectors SECA (SECA0-1). The configuration of the sector SECA0-1 is the same as that of the sector SEC0-1 shown in FIGS. The bank BKB has four sectors SECB (SECB0-3). Each sector SECA0-1 and SECB0-3 has nonvolatile memory cells arranged in a so-called NOR structure. The nonvolatile memory cell is a floating gate type or a trap gate type (mirror bit type) for trapping charges. For example, the bank BKA is used for storing data. The bank BKB is used for storing a program executed by the CPU. The number of sectors SECA and SECB is not limited to this.

コマンド制御回路CCNTは、CPUからのコマンド信号CMD、アドレス信号ADおよびデータ信号DQをコマンドとして受け、受けたコマンドを解読し、バンクBKA、BKBのアクセスをそれぞれ制御する制御信号CNTA、CNTBを独立に生成し、電圧生成回路VGEN、アドレス制御回路ACNT、データ制御回路DCNTの動作を制御する制御信号を生成する。バンクBKA、BKBは、アドレス信号AD(バンクアドレス)により識別される。   The command control circuit CCNT receives a command signal CMD, an address signal AD and a data signal DQ from the CPU as commands, decodes the received commands, and independently receives control signals CNTA and CNTB for controlling access to the banks BKA and BKB, respectively. Generate control signals for controlling operations of the voltage generation circuit VGEN, the address control circuit ACNT, and the data control circuit DCNT. The banks BKA and BKB are identified by an address signal AD (bank address).

電圧生成回路VGENは、消去動作や書き込み動作で使用する高電圧V1A、V1Bを、電源電圧を用いて生成し、バンクBKA、BKBにそれぞれ供給する。電源電圧は、半導体装置SEMの外部から供給される。アドレス制御回路ACNTは、コマンド信号CMDとともにCPUから供給されるアドレス信号AD(バンクアドレスを除く)を受け、受けた信号をアドレス信号AD1A、AD1BとしてバンクBKA、BKBにそれぞれ出力する。データ制御回路DCNTは、コマンド信号CMD(書き込みコマンド)とともにCPUから供給されるデータ信号DQを受け、受けた信号をデータ信号DTA、DTBとしてバンクBKA、BKBにそれぞれ出力する。また、データ制御回路DCNTは、コマンド信号CMD(読み出しマンド)に応じてバンクBKA、BKBからそれぞれ出力されるデータ信号DTA、DTBを受け、受けた信号をバスBUSに出力する。   The voltage generation circuit VGEN generates the high voltages V1A and V1B used in the erase operation and the write operation using the power supply voltage and supplies them to the banks BKA and BKB, respectively. The power supply voltage is supplied from the outside of the semiconductor device SEM. The address control circuit ACNT receives the address signal AD (excluding the bank address) supplied from the CPU together with the command signal CMD, and outputs the received signals to the banks BKA and BKB as address signals AD1A and AD1B, respectively. The data control circuit DCNT receives the data signal DQ supplied from the CPU together with the command signal CMD (write command), and outputs the received signals to the banks BKA and BKB as data signals DTA and DTB, respectively. The data control circuit DCNT receives data signals DTA and DTB output from the banks BKA and BKB, respectively, in response to the command signal CMD (read command), and outputs the received signals to the bus BUS.

第2制御部CNT2は、第1制御部CNT1からのアクセス要求に基づいてアクセスコマンドをFLASHに発行する。アクセスコマンドは、図11から図13に示す書き込みコマンドWCおよび読み出しコマンドRCである。また、第2制御部CNT2は、FLASHの動作状態に応じて、図11から図13に示すポーリングコマンドPL、消去コマンドEC、サスペンドコマンドSUおよびレジュームコマンドREをFLASHに発行する。   The second control unit CNT2 issues an access command to FLASH based on the access request from the first control unit CNT1. The access commands are the write command WC and the read command RC shown in FIGS. Further, the second control unit CNT2 issues a polling command PL, an erase command EC, a suspend command SU, and a resume command RE shown in FIGS. 11 to 13 to the FLASH according to the operation state of the FLASH.

例えば、第2制御部CNT2は、ソフトウエア(アクセス管理プログラム)またはハードウエア(メモリコントローラ)として構成され、あるいは、ソフトウエアとハードウエアを組み合わせて構成される。RAMは、データまたはCPUが実行するプログラムを格納するために使用される。しかし、この実施形態のFLASHは、いわゆるデュアルバンクタイプであるため、CPUは、バンクBKAの各セクタSECA0−1の消去中に、バンクBKBのプログラムをフェッチできる。このため、半導体装置SEMは、RAMを有していなくても動作できる。   For example, the second control unit CNT2 is configured as software (access management program) or hardware (memory controller), or is configured by combining software and hardware. The RAM is used for storing data or a program executed by the CPU. However, since the FLASH of this embodiment is a so-called dual bank type, the CPU can fetch the program of the bank BKB while erasing each sector SECA0-1 of the bank BKA. For this reason, the semiconductor device SEM can operate without having the RAM.

図11および図12は、図10に示した半導体装置SEMの動作の例を示している。記憶領域MRの網掛け等は、図2と同じ意味である。すなわち、データのセクタSECA0−1への書き込みシーケンスは、図2と同じである。図中の太線や矢印等は、図3と同じ意味である。ここでは、説明を簡単にするために、各セクタSECA0−1が4つの記憶領域MR(MR01−04、MR11−14)で構成される例を示しているが、記憶領域の数はこれに限定されない。各記憶領域MRは、書き込みまたは読み出しの最小単位であり、例えば、16ビットで構成される。   11 and 12 show an example of the operation of the semiconductor device SEM shown in FIG. The shading of the storage area MR has the same meaning as in FIG. That is, the data write sequence to the sectors SECA0-1 is the same as in FIG. Thick lines and arrows in the figure have the same meaning as in FIG. Here, for the sake of simplicity, an example is shown in which each sector SECA0-1 is composed of four storage areas MR (MR01-04, MR11-14), but the number of storage areas is limited to this. Not. Each storage area MR is a minimum unit for writing or reading, and is composed of, for example, 16 bits.

この実施形態では、例えば、第2制御部CNT2は、RAMをアクセスすることなく、バンクBKBに格納されたアクセス管理プログラムに基づいて動作する。第2制御部CNT2がFLASHに消去コマンドECを発行するまでの動作は、RAMがアクセスされないことを除き、図3と同じである。第2制御部CNT2は、消去動作ERが開始され、期間P1が経過した後、サスペンドコマンドSUを発行することなく、第1制御部CNT1に完了通知WENDを発行する(図11(a))。サスペンドコマンドSUは、第1制御部CNT1が記憶領域MR12に対する書き込み要求WREQを発行した後に発行される(図11(b))。これにより、デュアルバンクタイプのFLASHを用いる場合、図3に比べて、消去動作ERの継続期間を長くできる。   In this embodiment, for example, the second control unit CNT2 operates based on an access management program stored in the bank BKB without accessing the RAM. The operation until the second control unit CNT2 issues the erase command EC to FLASH is the same as that in FIG. 3 except that the RAM is not accessed. The second controller CNT2 issues a completion notification WEND to the first controller CNT1 without issuing the suspend command SU after the erasing operation ER is started and the period P1 has elapsed (FIG. 11A). The suspend command SU is issued after the first control unit CNT1 issues a write request WREQ for the storage area MR12 (FIG. 11B). Accordingly, when the dual bank type FLASH is used, the duration of the erase operation ER can be made longer than that in FIG.

第2制御部CNT2は、記憶領域MR12に対する書き込み動作WRの完了を検出するために、ポーリングコマンドPLを周期的にFLASHに発行する(図11(c))。第2制御部CNT2は、書き込み動作WRの完了に応答してFLASHにレジュームコマンドREを発行し、消去動作ERを再開する。そして、第2制御部CNT2は、サスペンドコマンドSUを発行することなく、第1制御部CNT1に完了通知WENDを発行する(図11(d))。   The second controller CNT2 periodically issues a polling command PL to FLASH in order to detect completion of the write operation WR for the storage area MR12 (FIG. 11 (c)). In response to the completion of the write operation WR, the second control unit CNT2 issues a resume command RE to FLASH and restarts the erase operation ER. Then, the second control unit CNT2 issues a completion notification WEND to the first control unit CNT1 without issuing a suspend command SU (FIG. 11 (d)).

次に、図12において、第1制御部CNT1は、例えば、記憶領域MR02に保持されたデータを読み出すために読み出し要求RREQを発行する(図12(a))。読み出し動作RDの完了後においても、第2制御部CNT2は、期間P1が経過した後、サスペンドコマンドSUを発行することなく、第1制御部CNT1に完了通知RENDを発行する(図12(b))。この後、図11と同様に、書き込み要求WREQに基づいて、書き込み動作WRおよび消去動作ERが実行される。   Next, in FIG. 12, the first control unit CNT1 issues a read request RREQ in order to read data held in the storage area MR02, for example (FIG. 12A). Even after completion of the read operation RD, the second control unit CNT2 issues a completion notification REND to the first control unit CNT1 without issuing a suspend command SU after the period P1 has elapsed (FIG. 12B). ). Thereafter, similarly to FIG. 11, the write operation WR and the erase operation ER are executed based on the write request WREQ.

図13は、図10に示した半導体装置SEMのパワーオフ時の動作の例を示している。図5との違いは、サスペンドコマンドSUが、完了通知WENDの直前ではなく、書き込み要求WREQの直後に発行されることである(図13(a))。これにより、最後の完了通知WENDからパワーオフ要求POFFまでの期間に、消去動作ERを継続することができる(図13(b))。この結果、消去動作ERが開始されてから完了するまでの時間を短くできる。なお、図13の動作により、図5と同様に、消去動作ERの途中に電源の供給が停止することを防止でき、FLASHが誤動作することを防止できる。   FIG. 13 shows an example of the operation when the semiconductor device SEM shown in FIG. 10 is powered off. The difference from FIG. 5 is that the suspend command SU is issued immediately after the write request WREQ, not immediately before the completion notification WEND (FIG. 13A). As a result, the erase operation ER can be continued during the period from the last completion notification WEND to the power-off request POFF (FIG. 13B). As a result, the time from the start of the erase operation ER to the completion thereof can be shortened. Note that the operation in FIG. 13 can prevent the supply of power from being stopped during the erase operation ER, and can prevent the FLASH from malfunctioning, as in FIG.

図14は、図10に示した第2制御部CNT2の動作を示している。第2制御部CNT2がソフトウエアで実現されるとき、図14のフローにしたがってプログラムが設計される。第2制御部CNT2がハードウエアで実現されるとき、図14のフローが回路記述に置き換えられ、論理回路が設計される。図14のフローは、図11から図13の動作をまとめたものである。   FIG. 14 shows the operation of the second control unit CNT2 shown in FIG. When the second control unit CNT2 is realized by software, a program is designed according to the flow of FIG. When the second control unit CNT2 is realized by hardware, the flow in FIG. 14 is replaced with a circuit description, and a logic circuit is designed. The flow in FIG. 14 summarizes the operations in FIGS. 11 to 13.

第2制御部CNT2は、書き込み要求WREQを受けたとき、動作40において、FLASHの消去動作ERが実行されているか否かを判定する。消去動作ERが実行されていないとき、第2制御部CNT2は、動作44を実施する。消去動作ERが実行されているとき、第2制御部CNT2は、動作42において、消去動作ERを一時的に中断するために、FLASHにサスペンドコマンドSUを発行する。   When receiving the write request WREQ, the second control unit CNT2 determines whether or not the FLASH erase operation ER is executed in the operation 40. When the erase operation ER is not executed, the second controller CNT2 performs the operation 44. When the erase operation ER is being executed, the second controller CNT2 issues a suspend command SU to FLASH in operation 42 in order to temporarily interrupt the erase operation ER.

第2制御部CNT2は、動作44において、書き込み要求WREQに基づく書き込み動作WRを実行するために、FLASHに書き込みコマンドWCを発行する。次に、第2制御部CNT2は、動作46において、消去動作ERを開始する必要があるか否かを判定する。消去動作ERを開始する必要があるとき、第2制御部CNT2は、動作48において、FLASHに消去コマンドECを発行し、消去動作ERを開始する。消去動作ERの開始が不要なとき、第2制御部CNT2は、動作50において、FLASHの消去動作ERの再開が必要か否かを判定する。消去動作ERの再開が必要なとき、第2制御部CNT2は、動作52において、消去動作ERを再開するために、FLASHにレジュームコマンドREを発行し、動作54を実施する。消去動作ERの再開が不要とき、すなわち、FLASHがサスペンド中でないとき、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する(RETURN)。第2制御部CNT2は、動作54において、期間P1だけ待った後、動作を終了し、第1制御部CNT1の動作に復帰する。図中の”RETURN”は、図11から図13に示した完了通知WEND、RENDまたはEENDのいずれかを示す。   In operation 44, the second control unit CNT2 issues a write command WC to FLASH in order to execute the write operation WR based on the write request WREQ. Next, the second control unit CNT2 determines whether or not the erase operation ER needs to be started in the operation 46. When it is necessary to start the erase operation ER, the second control unit CNT2 issues an erase command EC to FLASH in operation 48, and starts the erase operation ER. When it is not necessary to start the erase operation ER, the second control unit CNT2 determines whether or not the FLASH erase operation ER needs to be restarted in operation 50. When the erasing operation ER needs to be resumed, the second control unit CNT2 issues a resume command RE to FLASH and performs an operation 54 in order to resume the erasing operation ER in the operation 52. When it is not necessary to restart the erase operation ER, that is, when FLASH is not suspended, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1 (RETURN). In the operation 54, the second control unit CNT2 waits for the period P1, ends the operation, and returns to the operation of the first control unit CNT1. “RETURN” in the drawing indicates one of the completion notifications WEND, REND, and EEND shown in FIGS.

一方、第2制御部CNT2は、読み出し要求RREQを受けたとき、動作56において、FLASHの消去動作ERが実行されているか否かを判定する。消去動作ERが実行されていないとき、第2制御部CNT2は、動作60を実施する。消去動作ERが実行されているとき、第2制御部CNT2は、動作58において、消去動作ERを一時的に中断するために、FLASHにサスペンドコマンドSUを発行する。   On the other hand, when receiving the read request RREQ, the second control unit CNT2 determines whether or not the FLASH erase operation ER is being performed in the operation 56. When the erasing operation ER is not executed, the second control unit CNT2 performs the operation 60. When the erase operation ER is being executed, the second controller CNT2 issues a suspend command SU to FLASH in operation 58 in order to temporarily interrupt the erase operation ER.

次に、第2制御部CNT2は、動作60において、読み出し要求RREQに基づいて、FLASHに読み出しコマンドRCを発行し、記憶領域MRのいずれかからデータを読み出す。この後、第2制御部CNT2は、動作62において、FLASHの消去動作ERの再開が必要か否かを判定する。消去動作ERの再開が必要なとき、第2制御部CNT2は、動作64において、消去動作ERを再開するために、FLASHにレジュームコマンドREを発行する。第2制御部CNT2は、動作66において、第1期間P1だけ待った後に
動作を終了し、第1制御部CNT1の動作に復帰する。動作62において消去動作ERの再開が不要とき、すなわち、FLASHがサスペンド中でないとき、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する。なお、動作66の制御は、実施しなくてもよい。すなわち、期間P1は、書き込み要求WREQのみに応答して確保されてもよい。
Next, in operation 60, the second control unit CNT2 issues a read command RC to FLASH based on the read request RREQ, and reads data from one of the storage areas MR. Thereafter, in operation 62, the second control unit CNT2 determines whether or not the FLASH erase operation ER needs to be restarted. When it is necessary to restart the erase operation ER, the second control unit CNT2 issues a resume command RE to FLASH in operation 64 in order to restart the erase operation ER. In operation 66, the second control unit CNT2 ends the operation after waiting for the first period P1, and returns to the operation of the first control unit CNT1. When it is unnecessary to restart the erase operation ER in the operation 62, that is, when the FLASH is not suspended, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1. Note that the control of the operation 66 may not be performed. That is, the period P1 may be secured only in response to the write request WREQ.

さらに、第2制御部CNT2は、パワーオフ要求POFFを受けたとき、動作68において、FLASHの消去動作ERが実行されているか否かを判定する。消去動作ERが実行されていないとき、第2制御部CNT2は、動作を終了し、第1制御部CNT1の動作に復帰する。消去動作ERが実行されているとき、第2制御部CNT2は、動作70において、消去動作ERの完了を検出するまで、FLASHにポーリングコマンドPLを繰り返し発行する。そして、第2制御部CNT2の動作を終了し、第1制御部CNT1の動作に復帰する。   Furthermore, when receiving the power-off request POFF, the second control unit CNT2 determines in operation 68 whether or not the FLASH erase operation ER is being performed. When the erasing operation ER is not executed, the second control unit CNT2 ends the operation and returns to the operation of the first control unit CNT1. When the erase operation ER is being executed, the second controller CNT2 repeatedly issues a polling command PL to FLASH until the completion of the erase operation ER is detected in operation 70. Then, the operation of the second control unit CNT2 is terminated and the operation returns to the operation of the first control unit CNT1.

図15は、図10に示した第2制御部CNT2が提案される前の半導体装置SEMの動作の例を示している。図11および図12と同じ動作については、詳細な説明は省略する。この例においても、第1制御部CNT1は、図11および図12と同様に、記憶領域MR11−14にデータを書き込むために、書き込み要求WREQを順次に発行する。第2制御部CNT2は、書き込み動作WR後にFLASHに消去コマンドECまたはレジュームコマンドREを発行する(図15(a、b、c、d))。この後、第2制御部CNT2は、完了通知WENDを第1制御部CNT1に発行する(図15(e、f、g、h))。但し、第2制御部CNT2は、期間P1を待たずに完了通知WENDを発行する。   FIG. 15 shows an example of the operation of the semiconductor device SEM before the second control unit CNT2 shown in FIG. 10 is proposed. Detailed descriptions of the same operations as those in FIGS. 11 and 12 are omitted. Also in this example, the first control unit CNT1 issues a write request WREQ sequentially in order to write data to the storage area MR11-14, as in FIGS. The second control unit CNT2 issues an erase command EC or a resume command RE to FLASH after the write operation WR (FIG. 15 (a, b, c, d)). Thereafter, the second control unit CNT2 issues a completion notification WEND to the first control unit CNT1 (FIG. 15 (e, f, g, h)). However, the second control unit CNT2 issues a completion notification WEND without waiting for the period P1.

第1制御部CNT1は、図11および図12と同様に、完了通知WENDを受けた後、書き込み要求WREQを発行する(図15(i、j、k、l))。第2制御部CNT2は、新たな書き込み要求WREQに基づいて、FLASHの消去動作ERを中断するためにFLASHにサスペンドコマンドSUを発行し、書き込み動作WRを実行するために、FLASHに書き込みコマンドWCを発行する(図15(m、n、o))。   Similar to FIGS. 11 and 12, the first control unit CNT1 issues a write request WREQ after receiving the completion notification WEND (FIG. 15 (i, j, k, l)). Based on the new write request WREQ, the second control unit CNT2 issues a suspend command SU to FLASH to interrupt the erase operation ER of FLASH, and issues a write command WC to FLASH to execute the write operation WR. Issue (FIG. 15 (m, n, o)).

しかし、この例では、期間P1がないため、消去動作ERが開始または再開されてから中断するまでの期間は短い。このため、一方のセクタSEC(この例では、SEC0)の消去動作ERが完了する前に、他方のセクタSEC(この例では、SEC1)の全ての記憶領域MR11−14にデータが書き込まれてしまう(図15(p))。第2制御部CNT2は、セクタSEC0の記憶領域MR01にデータを書き込むための書き込み要求WREQを受けても、セクタSEC0の消去動作ERが完了するまで、書き込みコマンドWCを発行できない(図15(q))。この結果、図7と同様に、FLASHにデータを書き込みできない期間が発生してしまう。換言すれば、消去完了を待つための長い期間が発生し、見かけ上の消去期間が長くなってしまう。最悪の場合、半導体装置SEMが搭載されるシステム装置の動作が長期間停止してしまう。   However, in this example, since there is no period P1, the period from the start or restart of the erase operation ER to the interruption is short. For this reason, before the erase operation ER of one sector SEC (SEC0 in this example) is completed, data is written in all the storage areas MR11-14 of the other sector SEC (SEC1 in this example). (FIG. 15 (p)). Even if the second control unit CNT2 receives a write request WREQ for writing data to the storage area MR01 of the sector SEC0, it cannot issue the write command WC until the erase operation ER of the sector SEC0 is completed (FIG. 15 (q) ). As a result, as in FIG. 7, a period during which data cannot be written to FLASH occurs. In other words, a long period for waiting for the completion of erasure occurs, and the apparent erasure period becomes long. In the worst case, the operation of the system device on which the semiconductor device SEM is mounted stops for a long time.

以上、この実施形態においても、図1から図6に示した実施形態と同様の効果を得ることができる。さらに、この実施形態は、独立に動作する複数のバンクBKA、BKBを有するフラッシュメモリFLASHに適用できる。特に、複数のバンクBKA、BKBを有するフラッシュメモリFLASHでは、バンクBKAが消去動作ERを実行中にも、第1制御部CNT1は、バンクBKBをアクセスして書き込み要求WREQ等を発行できる。したがって、消去動作ERの実行効率を向上でき、消去動作ERの進行が遅れることを防止できる。   As described above, also in this embodiment, the same effects as those of the embodiment shown in FIGS. 1 to 6 can be obtained. Furthermore, this embodiment can be applied to a flash memory FLASH having a plurality of banks BKA and BKB that operate independently. In particular, in the flash memory FLASH having a plurality of banks BKA and BKB, the first controller CNT1 can access the bank BKB and issue a write request WREQ and the like even while the bank BKA is executing the erase operation ER. Therefore, the execution efficiency of the erase operation ER can be improved and the progress of the erase operation ER can be prevented from being delayed.

図16は、別の実施形態を示している。上述した実施形態で説明した要素と同一の要素については、同一の符号を付し、これ等については、詳細な説明を省略する。この実施形態では、CPUは、図8と同様に、期間P1の長さを設定するためのレジスタP1REGを有している。その他の構成は、図10と同じである。   FIG. 16 shows another embodiment. The same elements as those described in the above-described embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted. In this embodiment, the CPU has a register P1REG for setting the length of the period P1, as in FIG. Other configurations are the same as those in FIG.

この実施形態では、図9で説明したように、第2制御部CNT2は、第1制御部CNT1からのレジスタ設定コマンドREGSに基づいてレジスタP1REGを書き換える。そして、第2制御部CNT2は、レジスタP1REGに保持されている値に基づいて期間P1を設定する。以上、この実施形態においても、図1から図6、図8および図9に示した実施形態と同様の効果を得ることができる。   In this embodiment, as described in FIG. 9, the second control unit CNT2 rewrites the register P1REG based on the register setting command REGS from the first control unit CNT1. Then, the second control unit CNT2 sets the period P1 based on the value held in the register P1REG. As described above, also in this embodiment, the same effects as those of the embodiments shown in FIGS. 1 to 6, 8, and 9 can be obtained.

なお、上述した実施形態は、NOR型のフラッシュメモリに適用する例について述べた。しかし、上述した実施形態は、NAND型のフラッシュメモリに適用してもよい。あるいは、EEPROMに適用してもよい。   In the above-described embodiment, the example applied to the NOR type flash memory has been described. However, the above-described embodiments may be applied to a NAND flash memory. Or you may apply to EEPROM.

上述した実施形態では、2つのセクタSEC0−1にデータを巡回的に書き込む例について述べた。しかし、3つ以上のセクタSECにデータを巡回的に書き込んでもよい。   In the above-described embodiment, the example in which data is cyclically written in the two sectors SEC0-1 has been described. However, data may be cyclically written in three or more sectors SEC.

図1から図16に示した実施形態に関して、さらに以下の付記を開示する。
(付記1)
複数のメモリ部と、
前記複数のメモリ部の各々にデータの書き込み要求を発行する第1制御部と、
前記書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行し、前記複数のメモリ部のいずれかに消去可能なメモリ部があるときに、前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に消去動作を実行するために消去コマンドを発行する第2制御部と
を有し、
前記第2制御部は、前記消去コマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記2)
付記1記載の半導体装置において、
前記複数のメモリ部のうち2つは、第1領域と第2領域であり、
前記第2制御部は、前記書き込み要求に基づいて前記第1領域と前記第2領域とに前記書き込みコマンドを順次発行し、
前記第2領域への書き込みコマンドのうち所定の書き込みコマンドに基づいて前記第1領域に前記消去コマンドを発行し、
前記第1領域への前記消去コマンドの発行から前記第1期間後に、前記所定の書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記3)
付記1記載の半導体装置において、
前記各メモリ部は、複数の記憶領域を含み、
前記第2制御部は、
順次発行される前記書き込み要求に基づいて前記記憶領域にデータを順次書き込むために複数の前記書き込みコマンドを発行し、
前記メモリ部のいずれかにおいて前記記憶領域に書き込まれたデータが不要になったとき、他のメモリ部のいずれかに前記書き込みコマンドを発行した後に、データが不要になったメモリ部の消去動作を実行するために前記消去コマンドを発行し、
前記記憶領域への前記消去コマンドの発行から前記第1期間後に、他のメモリ部のいずれかへの書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記4)
付記1ないし付記3のいずれか記載の半導体装置において、
前記第2制御部は、前記第1期間中に、前記消去コマンドに応答して消去動作を開始したメモリ部に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置。
(付記5)
付記4記載の半導体装置において、
前記第2制御部は、複数のメモリ部のいずれかへのデータの書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行し、前記複数のメモリ部のいずれかに消去動作を中断しているメモリ部があるときに、前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記6)
付記4記載の半導体装置において、
前記第2制御部は、複数のメモリ部のいずれかへのデータの読み出し要求に基づいて、対応するメモリ部に読み出しコマンドを発行し、前記複数のメモリ部のいずれかに消去動作を中断しているメモリ部があるときに、前記読み出しコマンドに応答する前記メモリ部のいずれかの読み出し動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記読み出しコマンドに基づく読み出し完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記7)
付記5または付記6記載の半導体装置において、
前記第2制御部は、前記レジュームコマンドの発行後の前記第1期間中に、前記前記レジュームコマンドに応答して消去動作を再開したメモリ部に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置。
(付記8)
付記1ないし付記7のいずれか1項記載の半導体装置において、
前記第2制御部は、前記第1制御部からパワーオフ要求を受けたときに消去動作を中断しているメモリ部が存在するときに、消去動作を再開するために前記レジュームコマンドを発行し、消去動作の完了に基づいて前記第1制御部に消去完了通知を発行することを特徴とする半導体装置。
(付記9)
付記1ないし付記8のいずれか1項記載の半導体装置において、
前記メモリ部と、前記第2制御部の動作を実現するためのプログラムが格納されるメモリ部とを有する第1半導体メモリと、
前記書き込み動作中に、前記書き込み動作の完了をモニタするプログラムが格納される第2半導体メモリと
を有することを特徴とする半導体装置。
(付記10)
付記1ないし付記3のいずれか1項記載の半導体装置において、
前記メモリ部を含む第1メモリブロックと、
前記第2制御部の動作を実現するためのプログラムが格納され、前記第1メモリブロックと独立に動作する第2メモリブロックと
を有し、
前記第2制御部は、前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな書き込み要求に基づいて消去動作を実行していないメモリ部に前記書き込みコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置。
(付記11)
付記10記載の半導体装置において、
前記第2制御部は、
前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな書き込み要求に基づいて消去動作を実行していないメモリ部に前記書き込みコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行し、
前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記12)
付記10記載の半導体装置において、
前記第2制御部は、
前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな読み出し要求に基づいて消去動作を実行していないメモリ部に前記読み出しコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行し、
前記読み出しコマンドに応答する前記メモリ部のいずれかの読み出し動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記読み出しコマンドに基づく読み出し完了通知を前記第1制御部に発行することを特徴とする半導体装置。
(付記13)
付記10ないし付記12のいずれか1項記載の半導体装置において、
前記第2制御部は、前記第1制御部からパワーオフ要求を受けたときに消去動作を実行しているメモリ部が存在するときに、消去動作の完了に基づいて前記第1制御部に消去完了通知を発行することを特徴とする半導体装置。
(付記14)
付記1ないし付記13のいずれか1項記載の半導体装置において、
前記第1期間を示す値が設定されるレジスタを有し、
前記第2制御部は、前記レジスタに設定された値に基づいて前記第1期間を設定することを特徴とする半導体装置。
(付記15)
前記複数のメモリ領域の各々にデータの書き込み要求を発行し、
前記書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行し、
前記複数のメモリ領域のいずれかに消去可能なメモリ領域があるときに、前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に消去動作を実行するために消去コマンドを発行し、
前記消去コマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置の動作方法。
(付記16)
付記15記載の半導体装置の動作方法において、
前記複数のメモリ部のうち2つは、第1領域と第2領域であり、
前記書き込み要求に基づいて前記第1領域と前記第2領域とに前記書き込みコマンドを順次発行し、
前記第2領域への書き込みコマンドのうち所定の書き込みコマンドに基づいて前記第1領域に前記消去コマンドを発行し、
前記第1領域への前記消去コマンドの発行から前記第1期間後に、前記所定の書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置の動作方法。
(付記17)
付記15記載の半導体装置の動作方法において、
前記各メモリ部は、複数の記憶領域を含み、
順次発行される前記書き込み要求に基づいて前記記憶領域にデータを順次書き込むために複数の前記書き込みコマンドを発行し、
前記メモリ部のいずれかにおいて前記記憶領域に書き込まれたデータが不要になったとき、他のメモリ部のいずれかに前記書き込みコマンドを発行した後に、データが不要になったメモリ部の消去動作を実行するために前記消去コマンドを発行し、
前記記憶領域への前記消去コマンドの発行から前記第1期間後に、他のメモリ部のいずれかへの書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置の動作方法。
(付記18)
付記15ないし付記17のいずれか記載の半導体装置の動作方法において、
前記第1期間中に、前記消去コマンドに応答して消去動作を開始したメモリ部に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置の動作方法。
(付記19)
付記18記載の半導体装置の動作方法において、
複数のメモリ部のいずれかへのデータの書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行し、前記複数のメモリ部のいずれかに消去動作を中断しているメモリ部があるときに、前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置の動作方法。
(付記20)
付記15ないし付記17のいずれか1項記載の半導体装置の動作方法において、
前記メモリ部を含む第1メモリブロックと、
前記第2制御部の動作を実現するためのプログラムが格納され、前記第1メモリブロックと独立に動作する第2メモリブロックと
を有し、
前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな書き込み要求に基づいて消去動作を実行していないメモリ部に前記書き込みコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置の動作方法。
The following additional notes are disclosed with respect to the embodiment shown in FIGS.
(Appendix 1)
A plurality of memory units;
A first control unit that issues a data write request to each of the plurality of memory units;
Any of the memory units responding to the write command when a write command is issued to the corresponding memory unit based on the write request and there is an erasable memory unit in any of the plurality of memory units A second control unit that issues an erase command to execute an erase operation after the write operation;
The second control unit issues a write completion notification based on the write command to the first control unit after a first period from the issue of the erase command.
(Appendix 2)
In the semiconductor device according to attachment 1,
Two of the plurality of memory units are a first area and a second area,
The second control unit sequentially issues the write command to the first area and the second area based on the write request,
Issuing the erase command to the first area based on a predetermined write command among the write commands to the second area,
A semiconductor device, wherein a write completion notification based on the predetermined write command is issued to the first control unit after the first period from the issue of the erase command to the first region.
(Appendix 3)
In the semiconductor device according to attachment 1,
Each of the memory units includes a plurality of storage areas,
The second controller is
Issuing a plurality of the write commands to sequentially write data to the storage area based on the sequentially issued write requests;
When data written to the storage area is no longer needed in any of the memory units, the memory unit that no longer needs data is erased after issuing the write command to any of the other memory units. Issue the erase command to execute,
A semiconductor device, wherein after the first period from the issuance of the erase command to the storage area, a write completion notification based on a write command to any of the other memory units is issued to the first control unit.
(Appendix 4)
In the semiconductor device according to any one of supplementary notes 1 to 3,
The second control unit issues a suspend command for interrupting the erase operation to the memory unit that has started the erase operation in response to the erase command during the first period.
(Appendix 5)
In the semiconductor device according to attachment 4,
The second control unit issues a write command to the corresponding memory unit based on a data write request to any of the plurality of memory units, and interrupts the erase operation to any of the plurality of memory units. When there is a memory unit that is present, issue a resume command to resume the erase operation after any write operation of the memory unit in response to the write command,
A semiconductor device, wherein a write completion notification based on the write command is issued to the first control unit after a first period from the issue of the resume command.
(Appendix 6)
In the semiconductor device according to attachment 4,
The second control unit issues a read command to a corresponding memory unit based on a data read request to any of the plurality of memory units, and interrupts an erasing operation to any of the plurality of memory units. Issuing a resume command to resume the erase operation after any read operation of the memory unit in response to the read command,
A semiconductor device, wherein a read completion notification based on the read command is issued to the first control unit after a first period from the issue of the resume command.
(Appendix 7)
In the semiconductor device according to appendix 5 or appendix 6,
The second control unit issues a suspend command to interrupt the erase operation to the memory unit that has resumed the erase operation in response to the resume command during the first period after the resume command is issued. A featured semiconductor device.
(Appendix 8)
The semiconductor device according to any one of appendices 1 to 7,
The second control unit issues the resume command to restart the erase operation when there is a memory unit that interrupts the erase operation when receiving a power-off request from the first control unit, A semiconductor device that issues an erasure completion notice to the first controller based on completion of an erasure operation.
(Appendix 9)
In the semiconductor device according to any one of appendices 1 to 8,
A first semiconductor memory having the memory unit and a memory unit in which a program for realizing the operation of the second control unit is stored;
And a second semiconductor memory in which a program for monitoring completion of the write operation is stored during the write operation.
(Appendix 10)
In the semiconductor device according to any one of appendices 1 to 3,
A first memory block including the memory unit;
A program for realizing the operation of the second control unit is stored, and the second memory block operates independently of the first memory block, and
The second control unit writes the data into a memory unit that is not performing an erase operation based on a new write request when any of the memory units is performing an erase operation in response to the erase command. A semiconductor device characterized by issuing a suspend command for interrupting an erase operation before issuing a command.
(Appendix 11)
In the semiconductor device according to attachment 10,
The second controller is
When any of the memory units is performing an erase operation in response to the erase command, before issuing the write command to a memory unit that is not performing an erase operation based on a new write request, Issue a suspend command to interrupt the erase operation,
Issuing a resume command to resume the erase operation after any write operation of the memory unit in response to the write command,
A semiconductor device, wherein a write completion notification based on the write command is issued to the first control unit after a first period from the issue of the resume command.
(Appendix 12)
In the semiconductor device according to attachment 10,
The second controller is
When any of the memory units is performing an erase operation in response to the erase command, before issuing the read command to a memory unit that is not performing an erase operation based on a new read request, Issue a suspend command to interrupt the erase operation,
Issuing a resume command to resume the erase operation after any read operation of the memory unit in response to the read command,
A semiconductor device, wherein a read completion notification based on the read command is issued to the first control unit after a first period from the issue of the resume command.
(Appendix 13)
The semiconductor device according to any one of appendices 10 to 12,
The second control unit erases the first control unit based on the completion of the erase operation when there is a memory unit performing the erase operation when receiving a power-off request from the first control unit. A semiconductor device characterized by issuing a completion notice.
(Appendix 14)
The semiconductor device according to any one of appendices 1 to 13,
A register in which a value indicating the first period is set;
The semiconductor device according to claim 2, wherein the second control unit sets the first period based on a value set in the register.
(Appendix 15)
Issuing a data write request to each of the plurality of memory areas;
Based on the write request, issue a write command to the corresponding memory unit,
When there is an erasable memory area in any of the plurality of memory areas, issue an erase command to execute an erase operation after any write operation of the memory unit in response to the write command;
A method of operating a semiconductor device, wherein a write completion notification based on the write command is issued to the first control unit after a first period from the issue of the erase command.
(Appendix 16)
In the operation method of the semiconductor device according to attachment 15,
Two of the plurality of memory units are a first area and a second area,
Sequentially issue the write command to the first area and the second area based on the write request;
Issuing the erase command to the first area based on a predetermined write command among the write commands to the second area,
A method of operating a semiconductor device, wherein a write completion notification based on the predetermined write command is issued to the first controller after the first period from the issue of the erase command to the first region.
(Appendix 17)
In the operation method of the semiconductor device according to attachment 15,
Each of the memory units includes a plurality of storage areas,
Issuing a plurality of the write commands to sequentially write data to the storage area based on the sequentially issued write requests;
When data written to the storage area is no longer needed in any of the memory units, the memory unit that no longer needs data is erased after issuing the write command to any of the other memory units. Issue the erase command to execute,
A write completion notification based on a write command to one of other memory units is issued to the first control unit after the first period from the issuance of the erase command to the storage area. How it works.
(Appendix 18)
In the operation method of the semiconductor device according to any one of appendix 15 to appendix 17,
A method of operating a semiconductor device, wherein a suspend command for interrupting an erasing operation is issued to a memory portion that has started an erasing operation in response to the erasing command during the first period.
(Appendix 19)
In the operation method of the semiconductor device according to attachment 18,
When a write command is issued to the corresponding memory unit based on a data write request to one of the plurality of memory units, and there is a memory unit that interrupts the erasing operation in any of the plurality of memory units , After any write operation of the memory unit responding to the write command, issue a resume command to resume the erase operation,
A method of operating a semiconductor device, wherein a write completion notification based on the write command is issued to the first control unit after a first period from the issue of the resume command.
(Appendix 20)
In the operation method of the semiconductor device according to any one of appendix 15 to appendix 17,
A first memory block including the memory unit;
A program for realizing the operation of the second control unit is stored, and the second memory block operates independently of the first memory block, and
When any of the memory units is performing an erase operation in response to the erase command, before issuing the write command to a memory unit that is not performing an erase operation based on a new write request, A method of operating a semiconductor device, wherein a suspend command for interrupting an erase operation is issued.

以上、本発明について詳細に説明してきたが、上記の実施形態およびその変形例は発明の一例に過ぎず、本発明はこれに限定されるものではない。本発明を逸脱しない範囲で変形可能であることは明らかである。   As mentioned above, although this invention was demonstrated in detail, said embodiment and its modification are only examples of this invention, and this invention is not limited to this. Obviously, modifications can be made without departing from the scope of the present invention.

一実施形態を示している。1 illustrates one embodiment. 図1に示したメモリセルアレイのアクセスの例を示している。An example of access to the memory cell array shown in FIG. 1 is shown. 図1に示した半導体装置の動作の例を示している。2 illustrates an example of the operation of the semiconductor device illustrated in FIG. 1. 図1に示した半導体装置の動作の例の続きを示している。The continuation of the example of operation | movement of the semiconductor device shown in FIG. 1 is shown. 図1に示した半導体装置のパワーオフ時の動作の例を示している。2 illustrates an example of an operation when the semiconductor device illustrated in FIG. 1 is powered off. 図1に示した第2制御部の動作を示している。The operation | movement of the 2nd control part shown in FIG. 1 is shown. 図1に示した第2制御部が提案される前の半導体装置の動作の例を示している。The example of operation | movement of the semiconductor device before the 2nd control part shown in FIG. 1 is proposed is shown. 別の実施形態を示している。Figure 3 shows another embodiment. 図8に示した半導体装置の動作の例を示している。9 shows an example of the operation of the semiconductor device shown in FIG. 別の実施形態を示している。Figure 3 shows another embodiment. 図10に示した半導体装置の動作の例を示している。11 shows an example of the operation of the semiconductor device shown in FIG. 図10に示した半導体装置の動作の例の続きを示している。11 shows a continuation of an example of the operation of the semiconductor device shown in FIG. 図10に示した半導体装置のパワーオフ時の動作の例を示している。11 illustrates an example of an operation when the semiconductor device illustrated in FIG. 10 is powered off. 図10に示した第2制御部の動作を示している。The operation | movement of the 2nd control part shown in FIG. 10 is shown. 図10に示した第2制御部が提案される前の半導体装置の動作の例を示している。11 shows an example of the operation of the semiconductor device before the second control unit shown in FIG. 10 is proposed. 別の実施形態を示している。Figure 3 shows another embodiment.

符号の説明Explanation of symbols

ACNT‥アドレス制御回路;ARY‥メモリセルアレイ;CCNT‥コマンド制御回路;CNT1‥第1制御部;CNT2‥第2制御部;DCNT‥データ制御回路;EC‥消去コマンド;EEND‥完了通知;ER‥消去動作;MR01−04、MR11−14‥記憶領域;PL‥ポーリングコマンド;POFF‥パワーオフ要求;RC‥読み出しコマンド;RD‥読み出し動作;RE‥レジュームコマンド;REND‥完了通知;RREQ‥読み出し要求;SEC0−5、SECA0−1、SECB0−3‥セクタ;SU‥サスペンドコマンド;VGEN‥電圧生成回路;WC‥書き込みコマンド;WEND‥完了通知;WR‥書き込み動作;WREQ‥書き込み要求   ACNT: Address control circuit; ARY: Memory cell array; CCNT: Command control circuit; CNT1: First control unit; CNT2: Second control unit: DCNT: Data control circuit; Operation: MR01-04, MR11-14 Storage area: PL Polling command; POFF Power-off request; RC Read command; RD Read operation; RE Resume command; REND Completion notification; -5, SECA0-1, SECB0-3, sector; SU, suspend command; VGEN, voltage generation circuit; WC, write command; WEND, completion notification; WR, write operation;

Claims (7)

複数のメモリ部と、
前記複数のメモリ部の各々にデータの書き込み要求を発行する第1制御部と、
前記書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行し、前記複数のメモリ部のいずれかに消去可能なメモリ部があるときに、前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に消去動作を実行するために消去コマンドを発行する第2制御部と
を有し、
前記第2制御部は、前記消去コマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
A plurality of memory units;
A first control unit that issues a data write request to each of the plurality of memory units;
Any of the memory units responding to the write command when a write command is issued to the corresponding memory unit based on the write request and there is an erasable memory unit in any of the plurality of memory units A second control unit that issues an erase command to execute an erase operation after the write operation;
The second control unit issues a write completion notification based on the write command to the first control unit after a first period from the issue of the erase command.
請求項1記載の半導体装置において、
前記各メモリ部は、複数の記憶領域を含み、
前記第2制御部は、
順次発行される前記書き込み要求に基づいて前記記憶領域にデータを順次書き込むために複数の前記書き込みコマンドを発行し、
前記メモリ部のいずれかにおいて前記記憶領域に書き込まれたデータが不要になったとき、他のメモリ部のいずれかに前記書き込みコマンドを発行した後に、データが不要になったメモリ部の消去動作を実行するために前記消去コマンドを発行し、
前記記憶領域への前記消去コマンドの発行から前記第1期間後に、他のメモリ部のいずれかへの書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
The semiconductor device according to claim 1,
Each of the memory units includes a plurality of storage areas,
The second controller is
Issuing a plurality of the write commands to sequentially write data to the storage area based on the sequentially issued write requests;
When data written to the storage area is no longer needed in any of the memory units, the memory unit that no longer needs data is erased after issuing the write command to any of the other memory units. Issue the erase command to execute,
A semiconductor device, wherein after the first period from the issuance of the erase command to the storage area, a write completion notification based on a write command to any of the other memory units is issued to the first control unit.
請求項1または請求項2記載の半導体装置において、
前記第2制御部は、前記第1期間中に、前記消去コマンドに応答して消去動作を開始したメモリ部に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置。
The semiconductor device according to claim 1 or 2,
The second control unit issues a suspend command for interrupting the erase operation to the memory unit that has started the erase operation in response to the erase command during the first period.
請求項1または請求項2記載の半導体装置において、
前記メモリ部を含む第1メモリブロックと、
前記第2制御部の動作を実現するためのプログラムが格納され、前記第1メモリブロックと独立に動作する第2メモリブロックと
を有し、
前記第2制御部は、前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな書き込み要求に基づいて消去動作を実行していないメモリ部に前記書き込みコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行することを特徴とする半導体装置。
The semiconductor device according to claim 1 or 2,
A first memory block including the memory unit;
A program for realizing the operation of the second control unit is stored, and the second memory block operates independently of the first memory block, and
The second control unit writes the data into a memory unit that is not performing an erase operation based on a new write request when any of the memory units is performing an erase operation in response to the erase command. A semiconductor device characterized by issuing a suspend command for interrupting an erase operation before issuing a command.
請求項4記載の半導体装置において、
前記第2制御部は、
前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな書き込み要求に基づいて消去動作を実行していないメモリ部に前記書き込みコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行し、
前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置。
The semiconductor device according to claim 4.
The second controller is
When any of the memory units is performing an erase operation in response to the erase command, before issuing the write command to a memory unit that is not performing an erase operation based on a new write request, Issue a suspend command to interrupt the erase operation,
Issuing a resume command to resume the erase operation after any write operation of the memory unit in response to the write command,
A semiconductor device, wherein a write completion notification based on the write command is issued to the first control unit after a first period from the issue of the resume command.
請求項4記載の半導体装置において、
前記第2制御部は、
前記メモリ部のいずれかが前記消去コマンドに応答して消去動作を実行しているときに、新たな読み出し要求に基づいて消去動作を実行していないメモリ部に前記読み出しコマンドを発行する前に、消去動作を中断するサスペンドコマンドを発行し、
前記読み出しコマンドに応答する前記メモリ部のいずれかの読み出し動作後に、消去動作を再開するレジュームコマンドを発行し、
前記レジュームコマンドの発行から第1期間後に、前記読み出しコマンドに基づく読み出し完了通知を前記第1制御部に発行することを特徴とする半導体装置。
The semiconductor device according to claim 4.
The second controller is
When any of the memory units is performing an erase operation in response to the erase command, before issuing the read command to a memory unit that is not performing an erase operation based on a new read request, Issue a suspend command to interrupt the erase operation,
Issuing a resume command to resume the erase operation after any read operation of the memory unit in response to the read command,
A semiconductor device, wherein a read completion notification based on the read command is issued to the first control unit after a first period from the issue of the resume command.
前記複数のメモリ領域の各々にデータの書き込み要求を発行し、
前記書き込み要求に基づいて、対応するメモリ部に書き込みコマンドを発行し、
前記複数のメモリ領域のいずれかに消去可能なメモリ領域があるときに、前記書き込みコマンドに応答する前記メモリ部のいずれかの書き込み動作後に消去動作を実行するために消去コマンドを発行し、
前記消去コマンドの発行から第1期間後に、前記書き込みコマンドに基づく書き込み完了通知を前記第1制御部に発行することを特徴とする半導体装置の動作方法。
Issuing a data write request to each of the plurality of memory areas;
Based on the write request, issue a write command to the corresponding memory unit,
When there is an erasable memory area in any of the plurality of memory areas, issue an erase command to execute an erase operation after any write operation of the memory unit in response to the write command;
A method of operating a semiconductor device, wherein a write completion notification based on the write command is issued to the first control unit after a first period from the issue of the erase command.
JP2007280130A 2007-10-29 2007-10-29 Semiconductor device and method for operating semiconductor device Withdrawn JP2009110150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007280130A JP2009110150A (en) 2007-10-29 2007-10-29 Semiconductor device and method for operating semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007280130A JP2009110150A (en) 2007-10-29 2007-10-29 Semiconductor device and method for operating semiconductor device

Publications (1)

Publication Number Publication Date
JP2009110150A true JP2009110150A (en) 2009-05-21

Family

ID=40778603

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007280130A Withdrawn JP2009110150A (en) 2007-10-29 2007-10-29 Semiconductor device and method for operating semiconductor device

Country Status (1)

Country Link
JP (1) JP2009110150A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023190210A1 (en) * 2022-03-30 2023-10-05 ローム株式会社 Power management circuit and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023190210A1 (en) * 2022-03-30 2023-10-05 ローム株式会社 Power management circuit and electronic equipment

Similar Documents

Publication Publication Date Title
JP4317604B2 (en) Data processing system, non-volatile memory, and method for extending write / erase functions in flash memory
KR101146059B1 (en) Nonvolatile memory system, and data read/write method for nonvolatile memory system
JP5115826B2 (en) Apparatus and method for reducing peak power consumption during common operation of multi-NAND flash memory devices
JP6085832B2 (en) Apparatus and method
JP4554900B2 (en) Device using NAND flash memory for system drive and data storage
US7711918B2 (en) Apparatus and method for operating flash memory according to priority order
KR100444537B1 (en) Data processor
US11289168B2 (en) Controller that acquires status of nonvolatile memory and control method thereof
JP4643729B2 (en) Interleave control device, interleave control method, and memory system
JP2012118784A (en) Data storage device, memory control device and memory control method
US7000846B2 (en) Semiconductor memory device
JP2008117505A (en) Semiconductor device and its control method
KR100874955B1 (en) Semiconductor memory device and its VeriFi control method
CN112652346A (en) Storage device and method of controlling storage device
JP2009110150A (en) Semiconductor device and method for operating semiconductor device
JP4447636B2 (en) Memory system
JP5032137B2 (en) Semiconductor memory device
JP2009223435A (en) Data storage method and device, and program
JP2019008642A (en) Semiconductor device, and flash memory control method
JP2005078489A (en) Microcontroller and its control method
US20230335198A1 (en) Semiconductor device
JP2010129106A (en) Nonvolatile semiconductor memory device
JP6691239B2 (en) How to drive the arithmetic unit
JP4598025B2 (en) Memory system
JP3669625B2 (en) Data processing system and method of operating data processing system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100722

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20101208