JPH096747A - Flash memory controller - Google Patents

Flash memory controller

Info

Publication number
JPH096747A
JPH096747A JP17565895A JP17565895A JPH096747A JP H096747 A JPH096747 A JP H096747A JP 17565895 A JP17565895 A JP 17565895A JP 17565895 A JP17565895 A JP 17565895A JP H096747 A JPH096747 A JP H096747A
Authority
JP
Japan
Prior art keywords
flash memory
program
cpu
register
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP17565895A
Other languages
Japanese (ja)
Inventor
Hirosuke Gotou
寛介 後藤
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP17565895A priority Critical patent/JPH096747A/en
Publication of JPH096747A publication Critical patent/JPH096747A/en
Pending legal-status Critical Current

Links

Landscapes

  • Read Only Memory (AREA)
  • Microcomputers (AREA)

Abstract

PURPOSE: To provide a flash memory controller with which the erasure sequence of a flash memory can be executed without increasing the load of a CPU. CONSTITUTION: Concerning a microprocessor system for which the flash memory having the specified erasure sequence is arranged in the memory space of the CPU, this system is provided with an erasure start register 51, to which an erasure start flag is set when erasing the flash memory, to be accessed by the CPU, flash memory erasure sequence executing means B for generating an address, data and control signal for executing the erasure sequence of the flash memory, and control means A for turning the CPU to a hold state by outputting a bus request signal to the CPU and for controlling the operating timing of the flash memory erasure sequence executing means B when the erasure start flag of the erasure start register 51 is set.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、メモリ空間内にフラッ
シュメモリを有するマイクロプロセッサシステムに関わ
り、特にフラッシュメモリの制御に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor system having a flash memory in a memory space, and more particularly to controlling the flash memory.

【0002】[0002]

【従来の技術】フラッシュメモリ(フラッシュEEPR
OM:一括消去型EEPROM)は、紫外線消去型EP
ROMの紫外線消去を電気的に一括消去可能としたもの
で、消去やプログラムデータ書き込みには通常の5V電
源よりも高い電圧を印加する必要があり、このようなプ
ログラム電圧を発生する回路が備えられている。そし
て、通常のRAM等に対するメモリアクセスとは異な
り、消去や書込みに時間を要する特別な消去,プログラ
ムシーケンスを必要とする。
2. Description of the Related Art Flash memory (flash EEPR
OM: Batch erase type EEPROM) is an ultraviolet erase type EP
It is possible to electrically erase all of the ultraviolet rays in the ROM at once, and it is necessary to apply a voltage higher than a normal 5V power source to erase and write program data, and a circuit for generating such a program voltage is provided. ing. Then, unlike a normal memory access to a RAM or the like, a special erasing or program sequence that requires time for erasing or writing is required.

【0003】[0003]

【発明が解決しようとする課題】このように、メモリ空
間内にフラッシュメモリを有するマイクロプロセッサシ
ステムにおいて、フラッシュメモリの消去動作は、通常
のメモリアクセスとは異なり、アドレス、データ及びリ
ード信号やライト信号等の制御信号による特定の消去シ
ーケンスを実行する必要がある。この消去シーケンス
は、CPUのシステムソフトウエアによって実行可能で
あるが、通常のRAM等のメモリアクセスに比べ、時間
がかかる。
As described above, in the microprocessor system having the flash memory in the memory space, the erasing operation of the flash memory is different from the normal memory access, and the address, data and read / write signals are different. It is necessary to execute a specific erase sequence by a control signal such as. This erasing sequence can be executed by the system software of the CPU, but it takes time as compared with normal memory access such as RAM.

【0004】同様に、メモリ空間内にフラッシュメモリ
を有するマイクロプロセッサシステムにおいて、フラッ
シュメモリのプログラム動作は、通常のメモリアクセス
とは異なり、アドレス、データ及びリード信号やライト
信号等の制御信号による特定のプログラムシーケンスを
実行する必要がある。このプログラムシーケンスは、C
PUのシステムソフトウエアによって実行可能である
が、通常のRAM等のメモリアクセスに比べ、時間がか
かる。
Similarly, in a microprocessor system having a flash memory in a memory space, the program operation of the flash memory is different from a normal memory access, and is specified by an address, data and a control signal such as a read signal and a write signal. The program sequence needs to be executed. This program sequence is C
It can be executed by the system software of the PU, but it takes longer time than the normal memory access such as RAM.

【0005】従って、CPUの負荷が重くなるととも
に、CPUが専有されてしまうので、システムのスルー
プットが低下するという問題点があった。
Therefore, there is a problem that the load of the CPU becomes heavy and the CPU is monopolized, so that the throughput of the system is lowered.

【0006】また、特開平4−267454号公報に
は、複雑なデータの自動転送が可能なダイレクトメモリ
アクセス装置(DMAコントローラ)を用いて、CPU
の負荷を軽くする技術が開示されているが、これをフラ
ッシュメモリに適用した場合、通常のDMA転送とフラ
ッシュメモリのDMA転送の両方に対応しなければなら
ないため、アドレスバス,データバス及び制御信号線等
の制御が複雑になって、回路規模が増大してしまう。
Further, in Japanese Patent Laid-Open No. 4-267454, a direct memory access device (DMA controller) capable of automatically transferring complicated data is used to
However, if this technique is applied to a flash memory, it must be compatible with both normal DMA transfer and flash memory DMA transfer. The control of lines and the like becomes complicated and the circuit scale increases.

【0007】そこで、本発明はこのような問題点を解決
するためになされたものであり、フラッシュメモリの消
去シーケンスをCPUの負荷を増大することなく行うこ
とができるフラッシュメモリ制御装置を提供することを
目的とするものである。
Therefore, the present invention has been made in order to solve such a problem, and provides a flash memory control device capable of performing an erase sequence of a flash memory without increasing the load on the CPU. The purpose is.

【0008】また、フラッシュメモリのプログラムシー
ケンスをCPUの負荷を増大することなく行うことがで
きるフラッシュメモリ制御装置を提供することを目的と
するものである。
It is another object of the present invention to provide a flash memory control device capable of executing a flash memory program sequence without increasing the load on the CPU.

【0009】さらに、DMAコントローラを有するもの
において、メモリ間の転送によるフラッシュメモリのプ
ログラムシーケンスをCPUの負荷及び回路規模を増大
することなく行うことができるフラッシュメモリ制御装
置を提供することを目的とするものである。
A further object of the present invention is to provide a flash memory control device having a DMA controller, which can perform a program sequence of a flash memory by transfer between memories without increasing the load and circuit scale of the CPU. It is a thing.

【0010】[0010]

【課題を解決するための手段】請求項1に記載の発明
は、特定の消去シーケンスを有するフラッシュメモリが
CPUのメモリ空間内に配置されたマイクロプロセッサ
システムにおいて、前記CPUによりアクセスされ、前
記フラッシュメモリの消去時に消去開始フラグがセット
される消去開始レジスタと、前記フラッシュメモリの消
去シーケンスを行うためのアドレス,データ及び制御信
号を発生するフラッシュメモリ消去シーケンス実行手段
と、前記消去開始レジスタの消去開始フラグがセットさ
れると、前記CPUにバスリクエスト信号を出力してC
PUをホールド状態にするとともに、前記フラッシュメ
モリ消去シーケンス実行手段の動作タイミングを制御す
る制御手段とを備えたものである。
According to a first aspect of the present invention, in a microprocessor system in which a flash memory having a specific erase sequence is arranged in the memory space of the CPU, the flash memory is accessed by the CPU and the flash memory is accessed. Erase start register in which an erase start flag is set at the time of erasing, flash memory erase sequence executing means for generating address, data and control signals for performing the erase sequence of the flash memory, and erase start flag of the erase start register Is set, a bus request signal is output to the CPU and C
A control means for controlling the operation timing of the flash memory erase sequence execution means is provided while the PU is in the hold state.

【0011】請求項2に記載の発明は、特定のプログラ
ムシーケンスを有するフラッシュメモリがCPUのメモ
リ空間内に配置されたマイクロプロセッサシステムにお
いて、前記CPUによりアクセスされ、前記フラッシュ
メモリのプログラム時にプログラム開始フラグがセット
されるプログラム開始レジスタと、前記CPUによりア
クセスされ、プログラムデータとそのプログラム先アド
レスがそれぞれセットされるレジスタを有して、前記フ
ラッシュメモリのプログラムシーケンスを行うためのア
ドレス,データ及び制御信号を発生するフラッシュメモ
リプログラムシーケンス実行手段と、前記プログラム開
始レジスタのプログラム開始フラグがセットされると、
前記CPUにバスリクエスト信号を出力してCPUをホ
ールド状態にするとともに、前記フラッシュメモリプロ
グラムシーケンス実行手段の動作タイミングを制御する
制御手段とを備えたものである。
According to a second aspect of the present invention, in a microprocessor system in which a flash memory having a specific program sequence is arranged in the memory space of the CPU, the program is accessed by the CPU and a program start flag is set when the flash memory is programmed. Has a program start register and a register which is accessed by the CPU to set the program data and its program destination address, respectively, and stores the address, data and control signal for performing the program sequence of the flash memory. When the flash memory program sequence executing means to be generated and the program start flag of the program start register are set,
And a control means for outputting a bus request signal to the CPU to put the CPU in a hold state and controlling the operation timing of the flash memory program sequence execution means.

【0012】請求項3に記載の発明は、特定の消去及び
プログラムシーケンスを有するフラッシュメモリがCP
Uのメモリ空間内に配置されとともに、DMAコントロ
ーラを備えたマイクロプロセッサシステムにおいて、前
記CPUによりアクセスされ、前記フラッシュメモリの
プログラム時にプログラム開始フラグがセットされるプ
ログラム開始レジスタと、前記CPUによりアクセスさ
れ、プログラムデータが格納されたソースアドレス及び
そのプログラムデータを格納するデスティネーションア
ドレスがセットされ、1バイトのプログラム動作毎にそ
れぞれインクリメントされるレジスタを有して、前記フ
ラッシュメモリのプログラムシーケンスを行うためのア
ドレス,データ及び制御信号を発生するフラッシュメモ
リプログラムシーケンス実行手段と、前記CPUにより
アクセスされ、プログラムバイト数が設定されて、1バ
イトのプログラム動作毎にデクリメントされるプログラ
ムバイト数レジスタと、前記プログラム開始レジスタの
プログラム開始フラグがセットされると、前記DMAコ
ントローラにDMAリクエスト信号を出力するととも
に、前記フラッシュメモリプログラムシーケンス実行手
段の動作タイミングを制御して、DMA転送によりソー
スアドレスにあるプログラムデータをデスティネーショ
ンアドレスの示すフラッシュメモリにプログラムする制
御手段とを備えたものである。
According to a third aspect of the present invention, a flash memory having a specific erase and program sequence is a CP.
In a microprocessor system provided in a memory space of U and provided with a DMA controller, a program start register which is accessed by the CPU and a program start flag is set when programming the flash memory, and accessed by the CPU, An address for performing a program sequence of the flash memory, which has a source address storing program data and a destination address storing the program data and has a register that is incremented for each 1-byte program operation , A flash memory program sequence executing means for generating data and control signals, and a 1-byte program accessed by the CPU to set the number of program bytes When the program byte number register decremented for each operation and the program start flag of the program start register are set, a DMA request signal is output to the DMA controller and the operation timing of the flash memory program sequence execution means is controlled. And a control means for programming the program data at the source address into the flash memory indicated by the destination address by DMA transfer.

【0013】[0013]

【作用】請求項1記載の構成によれば、CPUのソフト
ウエアによらずハードウエアによりフラッシュメモリの
消去シーケンスを行うことにより高速にフラッシュメモ
リを消去する。
According to the first aspect of the invention, the flash memory is erased at high speed by performing the erase sequence of the flash memory by hardware, not by software of the CPU.

【0014】請求項2記載の構成によれば、CPUのソ
フトウエアによらずハードウエアによりフラッシュメモ
リのプログラムシーケンスを行うことで高速にフラッシ
ュメモリにプログラムデータを書き込む。
According to the second aspect of the present invention, program data is written in the flash memory at high speed by executing the program sequence of the flash memory by hardware instead of software of the CPU.

【0015】請求項3記載の構成によれば、CPUのソ
フトウエアによらずハードウエアによりフラッシュメモ
リの消去及びプログラムシーケンスを行うことで高速に
フラッシュメモリにプログラムデータを書き込む。従っ
て、前記請求項1,2の作用に加えて、消去,プログラ
ムシーケンスを他のDMA転送と独立させることで、ア
ドレスバスやデータバス及び制御信号線の制御が容易に
なる。
According to the third aspect of the invention, the program data is written into the flash memory at high speed by erasing the flash memory and performing the program sequence by hardware instead of software of the CPU. Therefore, in addition to the effects of the first and second aspects, the control of the address bus, the data bus and the control signal line is facilitated by making the erase and program sequences independent of other DMA transfers.

【0016】[0016]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0017】図1は、本発明の一実施例に係るマイクロ
プロセッサシステムの要部を示すブロック図である。
FIG. 1 is a block diagram showing a main part of a microprocessor system according to an embodiment of the present invention.

【0018】図1において、1はCPU(中央処理装
置)、2はROM(読み出し専用メモリ)、3はフラッ
シュメモリ、4はRAM(読み書き可能メモリ)、5は
フラッシュメモリコントローラである。
In FIG. 1, 1 is a CPU (central processing unit), 2 is a ROM (read-only memory), 3 is a flash memory, 4 is a RAM (readable / writable memory), and 5 is a flash memory controller.

【0019】CPU1は、ROM2やフラッシュメモリ
3に記憶されているシステムプログラムに従い、装置全
体を制御する中央処理装置である。また、フラッシュメ
モリコントローラ5からバスリクエスト信号がアサート
されると、アドレスバス、データバス、リード信号RD
Bやライト信号WRB等の各制御信号線をハイインピー
ダンスする(ホールドという)。
The CPU 1 is a central processing unit that controls the entire apparatus according to a system program stored in the ROM 2 or the flash memory 3. When the flash memory controller 5 asserts the bus request signal, the address bus, the data bus, and the read signal RD
Each control signal line such as B and the write signal WRB is put into high impedance (called hold).

【0020】ROM2には、装置全体を制御するシステ
ムプログラムのうち変更されることのないプログラムが
予め記憶されている。
The ROM 2 stores in advance a program that does not change among the system programs that control the entire apparatus.

【0021】フラッシュメモリ3は、内部が複数のメモ
リブロックに分けられていて、各メモリブロックを個別
に消去できるブロックアレイアーキテクチャを持ち、消
去またはプログラム動作が正常に終了したが否かを判断
するため読み出されるステータスレジスタ3aを備えて
いる。また、消去時やプログラム時に必要となる高電圧
のプログラム電圧を発生する回路が備えられている。こ
のフラッシュメモリ3には、システムプログラムのうち
変更や書き換えの行われる可能性のあるプログラムが記
憶される。
The flash memory 3 is internally divided into a plurality of memory blocks, has a block array architecture capable of individually erasing each memory block, and determines whether or not the erase or program operation is normally completed. The status register 3a is read. A circuit for generating a high-voltage program voltage required for erasing and programming is also provided. The flash memory 3 stores a program that may be changed or rewritten among the system programs.

【0022】RAM4は、DRAMやSRAMからな
り、システムプログラムが使用する作業領域(ワークエ
リア)となる。
The RAM 4 is composed of DRAM and SRAM and serves as a work area used by the system program.

【0023】フラッシュメモリコントローラ5は、従来
CPU1が実行するソフトウエアにより行われていたフ
ラッシュメモリ3の消去,プログラムシーケンスをハー
ドウエアにより行うものである。
The flash memory controller 5 erases the flash memory 3 and executes a program sequence by hardware, which is conventionally performed by software executed by the CPU 1.

【0024】図2は、上記フラッシュメモリコントロー
ラ5の一実施例を示すブロック図である。図において、
51は消去/プログラム開始レジスタ、52はタイミン
グ発生部、53はステータスレジスタデコーダ、54は
プログラムデータレジスタ、55はデータ発生部、56
は消去/プログラムアドレスレジスタ、57はストロー
ブ発生部、55a〜57aはスリーステートバッファで
ある。
FIG. 2 is a block diagram showing an embodiment of the flash memory controller 5. In the figure,
51 is an erase / program start register, 52 is a timing generator, 53 is a status register decoder, 54 is a program data register, 55 is a data generator, 56
Is an erase / program address register, 57 is a strobe generator, and 55a to 57a are three-state buffers.

【0025】消去/プログラム開始レジスタ51は、こ
の第1の実施例では消去開始レジスタとなり、後述する
第2の実施例ではプログラム開始レジスタとなる。当該
レジスタ51はCPU1によりアクセスでき、本レジス
タ51の開始ビット(フラグ)がアサートされると各動
作を開始する。
The erase / program start register 51 serves as an erase start register in the first embodiment, and serves as a program start register in a second embodiment described later. The register 51 can be accessed by the CPU 1, and each operation is started when the start bit (flag) of the register 51 is asserted.

【0026】タイミング発生部52は、上記レジスタ5
1の開始ビットに基づきデータ、アドレス、ストローブ
信号(リード信号,ライト信号)等の発生タイミングを
生成している。また、CPU1のアドレスバス、データ
バス、制御信号線をハイインピーダンスにするバスリク
エスト信号を発生する。
The timing generator 52 is provided with the register 5 described above.
Generation timing of data, address, strobe signal (read signal, write signal), etc. is generated based on the start bit of 1. Also, it generates a bus request signal that sets the address bus, data bus, and control signal line of the CPU 1 to high impedance.

【0027】ステータスレジスタデコーダ53は、消
去,プログラムシーケンスで、ステータスレジスタ3a
の内容をデコードし、次の処理をタイミング発生部52
に渡す。
The status register decoder 53 executes the erase and program sequence to execute the status register 3a.
Content is decoded and the next processing is performed in the timing generation unit 52.
Pass to.

【0028】プログラムデータレジスタ54は、CPU
1によりアクセスされ、後述する第2の実施例のプログ
ラムデータを一時的に記憶する。
The program data register 54 is a CPU
1 to temporarily store the program data of the second embodiment described later.

【0029】データ発生部55は、フラッシュメモリ3
とインターフェイスをとるためのコマンドデータと、第
2の実施例のプログラムデータを発生する。
The data generator 55 is used for the flash memory 3
And command data for interfacing with the program data of the second embodiment.

【0030】消去/プログラムアドレスレジスタ56
は、CPU1によりアクセスされ、第1の実施例では消
去ブロックのアドレスを記憶し、第2の実施例ではプロ
グラム先アドレスを記憶し、またフラッシュメモリ3へ
のコマンドセット、ステータスレジスタ3aのリード、
プログラムデータのライト動作を行う際のアドレスを発
生する。
Erase / Program Address Register 56
Is accessed by the CPU 1, stores the address of the erase block in the first embodiment, stores the program destination address in the second embodiment, sets the command to the flash memory 3, reads the status register 3a,
An address is generated when a program data write operation is performed.

【0031】ストローブ発生部57は、フラッシュメモ
リ3に対するリード信号RDB,ライト信号WRBを発
生する。
The strobe generator 57 generates a read signal RDB and a write signal WRB for the flash memory 3.

【0032】スリーステートバッファ55a,56a,
57aは、それぞれデータ発生部55,アドレスレジス
タ56,ストローブ発生部57の出力とデータバス,ア
ドレスバス,制御信号線との電気的な接続を制御するも
ので、タイミング発生部52からの制御信号により制御
される。
Three-state buffers 55a, 56a,
Reference numeral 57a controls the outputs of the data generator 55, the address register 56, and the strobe generator 57, and the electrical connection between the data bus, the address bus, and the control signal line. Controlled.

【0033】ここで、上記タイミング発生部52とステ
ータスレジスタデコーダ53により、本願の請求項1,
請求項2の制御手段Aが実現されている。また、データ
発生部55,消去アドレスレジスタ56,ストローブ発
生部57及び各スリーステートバッファ55a,56
a,57aにより請求項1のフラッシュメモリ消去シー
ケンス実行手段Bが実現されている。さらに、プログラ
ムデータレジスタ54,データ発生部55,プログラム
アドレスレジスタ56,ストローブ発生部57及び各ス
リーステートバッファ55a,56a,57aにより請
求項2のフラッシュメモリプログラムシーケンス実行手
段Cが実現されている。
Here, the timing generating section 52 and the status register decoder 53 are used to set claim 1 of the present application.
The control means A of claim 2 is realized. In addition, the data generator 55, the erase address register 56, the strobe generator 57, and the three-state buffers 55a and 56a.
The flash memory erase sequence executing means B of claim 1 is realized by a and 57a. Further, the program data register 54, the data generator 55, the program address register 56, the strobe generator 57 and the three-state buffers 55a, 56a and 57a implement the flash memory program sequence executing means C of claim 2.

【0034】次に、このように構成されたフラッシュメ
モリコントローラ5の動作について図3のフローチャー
トに従い説明する。
Next, the operation of the flash memory controller 5 thus configured will be described with reference to the flowchart of FIG.

【0035】フラッシュメモリ3のあるメモリブロック
を一括消去する場合、まず、CPU1のソフトウエアに
よりフラッシュメモリ3の消去ブロックアドレスを消去
アドレスレジスタ56にセットし、消去開始レジスタ5
1の消去開始ビットをイネーブル(オン)にすると、フ
ラッシュメモリコントローラ5は図3に従い処理を開始
する(判断101)。
In the case of collectively erasing a memory block in the flash memory 3, first the software of the CPU 1 sets the erase block address of the flash memory 3 in the erase address register 56, and the erase start register 5
When the erase start bit of 1 is enabled (turned on), the flash memory controller 5 starts processing according to FIG. 3 (decision 101).

【0036】消去開始ビットがイネーブルになると、タ
イミング発生部52がバスリクエスト信号を発生し、C
PU1のアドレスバス、データバス及び制御信号線をハ
イインピーダンス(ホールド状態)にする(処理10
2)。
When the erase start bit is enabled, the timing generator 52 generates a bus request signal and C
The address bus, data bus, and control signal line of PU1 are set to high impedance (hold state) (Processing 10)
2).

【0037】また、タイミング発生部52からはデータ
発生部55,消去アドレスレジスタ56,ストローブ発
生部57にタイミング制御信号が出力されるとともに、
この制御信号によりスリーステートバッファ55a〜5
7aが導通状態になる。これにより、上記にてセットさ
れた消去アドレスレジスタ56の内容をアドレスバスに
出力し、データ発生部55が消去セットアップコマンド
をデータバスに出力し、ストローブ発生部57がライト
信号WRBを発生し、消去セットアップコマンドをフラ
ッシュメモリ3に書き込む(処理103)。
The timing generator 52 outputs a timing control signal to the data generator 55, the erase address register 56, and the strobe generator 57.
With this control signal, the three-state buffers 55a-5
7a becomes conductive. As a result, the contents of the erase address register 56 set above are output to the address bus, the data generator 55 outputs the erase setup command to the data bus, and the strobe generator 57 generates the write signal WRB to erase. The setup command is written in the flash memory 3 (process 103).

【0038】同様に、データ発生部55が消去コマンド
をデータバスに出力し、ストローブ発生部57がライト
信号WRBを発生し、消去コマンドをフラッシュメモリ
3に書き込む(処理104)。
Similarly, the data generator 55 outputs an erase command to the data bus, the strobe generator 57 generates a write signal WRB, and the erase command is written in the flash memory 3 (process 104).

【0039】そして、タイミング発生部52がバスリク
エスト信号を解除し、各バスと制御信号線をCPU1に
開放する(処理105)。これにより、CPU1は各バ
スと制御信号線を使った他の処理を行うことができる。
Then, the timing generator 52 releases the bus request signal and opens each bus and control signal line to the CPU 1 (process 105). As a result, the CPU 1 can perform other processing using each bus and the control signal line.

【0040】この後、タイミング発生部52により、所
定の消去動作時間がカウントされ、フラッシュメモリ3
に必要な消去動作時間が経過すると、上記処理102と
同様に、タイミング発生部52がバスリクエスト信号を
発生し、CPU1の各バスと制御信号線をハイインピー
ダンスにする(判断106→処理107)。
After that, the timing generator 52 counts a predetermined erase operation time, and the flash memory 3
When the erasing operation time necessary for the lapse of time elapses, the timing generation unit 52 generates a bus request signal, and sets each bus of the CPU 1 and the control signal line to high impedance (decision 106 → process 107) as in the case of the above process 102.

【0041】そして、アドレスレジスタ56に設定され
たアドレスをアドレスバスに出力し、ストローブ発生部
57がリード信号RDBを発生し、フラッシュメモリ3
からステータスレジスタ3aの内容を読み出す(処理1
08)。
Then, the address set in the address register 56 is output to the address bus, the strobe generator 57 generates the read signal RDB, and the flash memory 3
The contents of the status register 3a are read from (processing 1
08).

【0042】この後、上記処理105と同様にタイミン
グ発生部52はバスリクエスト信号を解除し、各バスと
制御信号線をCPU1に開放する(処理109)。
Thereafter, the timing generator 52 releases the bus request signal and opens each bus and the control signal line to the CPU 1 as in the process 105 (process 109).

【0043】ここで、ステータスレジスタデコーダ53
によりステータスレジスタ3aの内容のチェックが行わ
れ、消去が完了ならば、上記処理102と同様に、タイ
ミング発生部52はバスリクエスト信号を発生し、CP
U1の各バスと制御信号線をハイインピーダンスにする
(判断110→処理111)。
Here, the status register decoder 53
The contents of the status register 3a are checked by means of, and if the erasing is completed, the timing generation unit 52 generates a bus request signal and CP
Each bus of U1 and the control signal line are set to high impedance (decision 110 → process 111).

【0044】次にデータ発生部55はリードアレイコマ
ンドをデータバスに出力し、ストローブ発生部57がラ
イト信号WRBを発生し、リードアレイコマンドをフラ
ッシュメモリ3に書き込み、リードモードにする(処理
112)。
Next, the data generator 55 outputs the read array command to the data bus, the strobe generator 57 generates the write signal WRB, writes the read array command in the flash memory 3, and sets the read mode (process 112). .

【0045】最後に、上記処理105と同様にタイミン
グ発生部52はバスリクエスト信号を解除し、各バスと
制御信号線をCPU1に開放する(処理113)。
Finally, the timing generator 52 releases the bus request signal and opens each bus and the control signal line to the CPU 1 similarly to the process 105 (process 113).

【0046】なお、上記判断110で消去が完了してい
なければ、上記処理107〜判断110を繰り返す。
If it is judged in the above decision 110 that the erasing is not completed, the above processing 107 to decision 110 are repeated.

【0047】以上のように、CPU1のソフトウエアに
よらずフラッシュメモリコントローラ5によりフラッシ
ュメモリ3の消去シーケンスを行うことにより、フラッ
シュメモリ3を高速に消去することができる。また、フ
ラッシュメモリコントローラ5によって上記消去シーケ
ンスを行っている間、CPU1は他の処理を並行して行
うことができ、当該マイクロプロセッサシステムのスル
ープットが大幅に向上する。
As described above, the flash memory 3 can be erased at high speed by performing the erase sequence of the flash memory 3 by the flash memory controller 5 regardless of the software of the CPU 1. Further, while the flash memory controller 5 is performing the erase sequence, the CPU 1 can perform other processing in parallel, which significantly improves the throughput of the microprocessor system.

【0048】次に、フラッシュメモリコントローラ5の
第2の実施例の動作について図4のフローチャートに従
い説明する。
Next, the operation of the second embodiment of the flash memory controller 5 will be described with reference to the flowchart of FIG.

【0049】フラッシュメモリ3の任意のアドレスにプ
ログラムデータの書き込みを行う場合、まず、CPU1
のソフトウエアによりフラッシュメモリ3のプログラム
先アドレスをプログラムアドレスレジスタ56にセット
し、プログラムデータをプログラムデータレジスタ54
にセットし、プログラム開始レジスタ51のプログラム
開始ビットをイネーブルにすると、フラッシュメモリコ
ントローラ5は図4に従い処理を開始する(判断20
1)。
When writing program data to an arbitrary address of the flash memory 3, first, the CPU 1
The program destination address of the flash memory 3 is set in the program address register 56 by the software of
And the program start bit of the program start register 51 is enabled, the flash memory controller 5 starts processing according to FIG.
1).

【0050】プログラム開始ビットがイネーブルになる
と、タイミング発生部52がバスリクエスト信号を発生
し、CPU1の各バスと制御信号線をハイインピーダン
スにする(処理202)。
When the program start bit is enabled, the timing generator 52 generates a bus request signal, and sets each bus of the CPU 1 and the control signal line to high impedance (process 202).

【0051】また、タイミング発生部52からはデータ
発生部55,プログラムアドレスレジスタ56,ストロ
ーブ発生部57にタイミング制御信号が出力されるとと
もに、この制御信号によりスリーステートバッファ55
a〜57aが導通状態になる。これにより、上記にてセ
ットされたプログラムアドレスレジスタ56の内容をア
ドレスバスに出力し、データ発生部55がプログラムセ
ットアップコマンドをデータバスに出力し、ストローブ
発生部57がライト信号WRBを発生し、プログラムセ
ットアップコマンドをフラッシュメモリ3に書き込む
(処理203)。
The timing generator 52 outputs a timing control signal to the data generator 55, the program address register 56, and the strobe generator 57, and the three-state buffer 55 is generated by this control signal.
a to 57a become conductive. As a result, the contents of the program address register 56 set above are output to the address bus, the data generation unit 55 outputs the program setup command to the data bus, and the strobe generation unit 57 generates the write signal WRB and the program The setup command is written in the flash memory 3 (process 203).

【0052】次にデータ発生部55が上記にてセットさ
れたプログラムデータレジスタ54の内容をデータバス
に出力し、ストローブ発生部57がライト信号WRBを
発生し、プログラムデータをフラッシュメモリ3に書き
込む(処理204)。
Next, the data generator 55 outputs the contents of the program data register 54 set above to the data bus, the strobe generator 57 generates the write signal WRB, and the program data is written in the flash memory 3 ( Process 204).

【0053】そして、タイミング発生部52がバスリク
エスト信号を解除し、各バスと制御信号線をCPU1に
開放する(処理205)。これにより、前記実施例同
様、CPU1は各バスと制御信号線を使った他の処理を
行うことができる。
Then, the timing generator 52 releases the bus request signal and opens each bus and control signal line to the CPU 1 (process 205). As a result, similarly to the above-described embodiment, the CPU 1 can perform other processing using each bus and the control signal line.

【0054】この後、タイミング発生部52により、所
定のプログラム動作時間がカウントされ、フラッシュメ
モリ3に必要なプログラム動作時間が経過すると、上記
処理202と同様にタイミング発生部52がバスリクエ
スト信号を発生し、CPU1の各バスと制御信号線をハ
イインピーダンスにする(判断206→処理207)。
After that, the timing generator 52 counts a predetermined program operation time, and when the program operation time required for the flash memory 3 has elapsed, the timing generator 52 generates a bus request signal in the same manner as the processing 202. Then, each bus of the CPU 1 and the control signal line are set to high impedance (decision 206 → process 207).

【0055】そして、アドレスレジスタ56に設定され
たアドレスをアドレスバスに出力し、ストローブ発生部
57がリード信号RDBを発生し、フラッシュメモリ3
からステータスレジスタ3aの内容を読み出す(処理2
08)。
Then, the address set in the address register 56 is output to the address bus, the strobe generator 57 generates the read signal RDB, and the flash memory 3
The contents of the status register 3a are read from (processing 2
08).

【0056】この後、上記処理205と同様にタイミン
グ発生部52はバスリクエスト信号を解除し、各バスと
制御信号線をCPU1に開放する(処理209)。
After that, the timing generator 52 releases the bus request signal and opens each bus and control signal line to the CPU 1 as in the process 205 (process 209).

【0057】ここで、ステータスレジスタデコーダ53
によりステータスレジスタ3aの内容のチェックが行わ
れ、プログラムが完了ならば、上記処理202と同様に
タイミング発生部52はバスリクエスト信号を発生し、
CPU1の各バスと制御信号線をハイインピーダンスに
する(判断210→処理211)。
Here, the status register decoder 53
The contents of the status register 3a are checked by, and if the program is completed, the timing generation unit 52 generates a bus request signal as in the above process 202,
Each bus of the CPU 1 and the control signal line are set to high impedance (decision 210 → process 211).

【0058】次にデータ発生部55はリードアレイコマ
ンドをデータバスに出力し、ストローブ発生部57がラ
イト信号WRBを発生し、リードアレイコマンドをフラ
ッシュメモリ3に書き込み、リードモードにする(処理
212)。
Next, the data generator 55 outputs the read array command to the data bus, the strobe generator 57 generates the write signal WRB, writes the read array command in the flash memory 3, and sets the read mode (process 212). .

【0059】最後に、上記処理205と同様に、タイミ
ング発生部52はバスリクエスト信号を解除し、各バス
と制御信号線をCPU1に開放する(処理213)。
Finally, like the processing 205, the timing generator 52 releases the bus request signal and opens each bus and control signal line to the CPU 1 (processing 213).

【0060】なお、上記判断210でプログラムが完了
していなければ、上記処理207〜判断210を繰り返
す。
If the program is not completed in the judgment 210, the processes 207 to 210 are repeated.

【0061】以上のように、CPU1のソフトウエアに
よらずフラッシュメモリコントローラ5によりフラッシ
ュメモリ3のプログラムシーケンスを行うことで、フラ
ッシュメモリ3にプログラムデータを高速に書き込むこ
とができる。また、フラッシュメモリコントローラ5に
よって上記プログラムシーケンスを行っている間、CP
U1は他の処理を並行して行うことができ、アドレスバ
ス,データバスを含めたシステムのスループットが大幅
に向上する。
As described above, by executing the program sequence of the flash memory 3 by the flash memory controller 5 regardless of the software of the CPU 1, the program data can be written in the flash memory 3 at high speed. While the flash memory controller 5 is performing the above program sequence, the CP
U1 can perform other processing in parallel, and the throughput of the system including the address bus and the data bus is significantly improved.

【0062】図5は、本発明の第3の実施例に係るマイ
クロプロセッサシステムの要部を示すブロック図であ
り、前記図1と同一符号は同一または相当部分を示して
いる。図において、1はCPU、2はROM、3はフラ
ッシュメモリ、4はRAM、5はフラッシュメモリコン
トローラ、6はDMAC(ダイレクトメモリアクセスコ
ントローラ)である。
FIG. 5 is a block diagram showing a main part of a microprocessor system according to a third embodiment of the present invention. The same reference numerals as those in FIG. 1 indicate the same or corresponding parts. In the figure, 1 is a CPU, 2 is a ROM, 3 is a flash memory, 4 is a RAM, 5 is a flash memory controller, and 6 is a DMAC (direct memory access controller).

【0063】フラッシュメモリコントローラ5は、従来
CPU1により行われていたフラッシュメモリ5の消
去,プログラムシーケンスをハードウエアにより行うも
のであり、本実施例では、このフラッシュメモリコント
ローラ5はDMAC6にカスケード接続され、フラッシ
ュメモリ5に関わるDMA転送を行う。
The flash memory controller 5 erases the flash memory 5 conventionally performed by the CPU 1 and performs a program sequence by hardware. In the present embodiment, the flash memory controller 5 is cascade-connected to the DMAC 6. DMA transfer related to the flash memory 5 is performed.

【0064】DMAC6は、周知のようにCPU1を介
さずにデータ転送を行うものであり、上記フラッシュメ
モリコントローラ5が行う以外のDMA転送を行う。
As is well known, the DMAC 6 performs data transfer without passing through the CPU 1, and performs DMA transfer other than that performed by the flash memory controller 5.

【0065】図6は、上記フラッシュメモリコントロー
ラ5の一実施例を示すブロック図である。図において、
51はプログラム開始レジスタ、52はタイミング発生
部、53はステータスレジスタデコーダ、54はプログ
ラムデータレジスタ、55はデータ発生部、56aはソ
ースアドレスレジスタ、56bはデスティネーションア
ドレスレジスタ、57はストローブ発生部、58はアド
レス発生部、55a,57a,58aはスリーステート
バッファである。
FIG. 6 is a block diagram showing an embodiment of the flash memory controller 5. In the figure,
51 is a program start register, 52 is a timing generator, 53 is a status register decoder, 54 is a program data register, 55 is a data generator, 56a is a source address register, 56b is a destination address register, 57 is a strobe generator, 58 Is an address generator, and 55a, 57a and 58a are three-state buffers.

【0066】プログラム開始レジスタ51は、CPU1
によりアクセスでき、本レジスタ51の開始ビットがア
サートされると動作を開始する。
The program start register 51 is the CPU 1
The operation is started when the start bit of this register 51 is asserted.

【0067】タイミング発生部52は、上記レジスタ5
1の開始ビットに基づきデータ、アドレス、ストローブ
信号の発生タイミングを生成している。また、DMAC
6に対しDMAリクエスト信号DREQを発生する。
The timing generating section 52 uses the register 5
The generation timing of data, address, and strobe signal is generated based on the start bit of 1. Also, the DMAC
6, the DMA request signal DREQ is generated.

【0068】ステータスレジスタデコーダ53は、消
去,プログラムシーケンスで、ステータスレジスタ3a
の内容をデコードし、次の処理をタイミング発生部52
に渡す。
The status register decoder 53 operates in the erase and program sequence to execute the status register 3a.
Content is decoded and the next processing is performed in the timing generation unit 52.
Pass to.

【0069】プログラムデータレジスタ54は、DMA
転送時にアクセスされ、メモリ→メモリ間のDMA転送
を行うために転送データを一時保持するデータレジスタ
である。
The program data register 54 is a DMA
This is a data register that is accessed during transfer and temporarily holds transfer data in order to perform memory-to-memory DMA transfer.

【0070】データ発生部55は、フラッシュメモリ3
とインターフェイスをとるためのコマンドデータと、上
記プログラムデータを発生する。
The data generator 55 is used for the flash memory 3
Command data for interfacing with the above and the above program data are generated.

【0071】ソースアドレスレジスタ56aは、CPU
1によりアクセスされ、DMA転送の際のソースアドレ
ス(転送元アドレス)を記憶する。本レジスタ56aは
1回のメモリ→メモリ間のDMA転送が終わる毎にイン
クリメントされる。
The source address register 56a is a CPU
It is accessed by 1 and stores the source address (transfer source address) at the time of DMA transfer. This register 56a is incremented every time one memory → memory DMA transfer is completed.

【0072】デスティネーションアドレスレジスタ56
bは、CPU1によりアクセスされ、DMA転送の際の
デスティネーションアドレス(転送先アドレス)を記憶
する。本レジスタ56bも1回のメモリ→メモリ間のD
MA転送が終わる毎にインクリメントされる。
Destination address register 56
b is accessed by the CPU 1 and stores a destination address (transfer destination address) at the time of DMA transfer. This register 56b also has one memory → D between memory
It is incremented each time MA transfer is completed.

【0073】アドレス発生部58は、フラッシュメモリ
3へのコマンドセット、ステータスレジスタ3aのリー
ド、メモリ→メモリ間のDMA転送動作を行う際の上記
アドレスを発生する。
The address generator 58 generates the above addresses for command setting to the flash memory 3, reading of the status register 3a, and memory-to-memory DMA transfer operation.

【0074】ストローブ発生部57は、フラッシュメモ
リ3に対するリード信号RDB,ライト信号WRBを発
生する。
The strobe generator 57 generates a read signal RDB and a write signal WRB for the flash memory 3.

【0075】スリーステートバッファ55a,57a,
58aは、それぞれデータ発生部55,ストローブ発生
部57,アドレス発生部58の出力とデータバス,アド
レスバス,制御信号線との電気的な接続を制御するもの
で、タイミング発生部52からの制御信号により制御さ
れる。
Three-state buffers 55a, 57a,
Reference numeral 58a controls the output of the data generator 55, strobe generator 57, and address generator 58 and the electrical connection between the data bus, the address bus, and the control signal line, respectively. Controlled by.

【0076】プログラムバイト数レジスタ59は、CP
U1によりアクセスされ、DMA転送するプログラムデ
ータのバイト数を記憶する。本レジスタ59は1回のメ
モリ→メモリ間のDMA転送が終わる毎にデクリメント
される。
The program byte number register 59 is
It stores the number of bytes of program data accessed by U1 and DMA-transferred. This register 59 is decremented every time one memory → memory DMA transfer is completed.

【0077】ここで、上記タイミング発生部52とステ
ータスレジスタデコーダ53により、本願の請求項3の
制御手段Dが実現されている。また、プログラムデータ
レジスタ54,データ発生部55,ソースアドレスレジ
スタ56a,デスティネーションアドレスレジスタ56
b,ストローブ発生部57,アドレス発生部58及び各
スリーステートバッファ55a,57a,58aにより
請求項3のフラッシュメモリプログラムシーケンス実行
手段Eが実現されている。
Here, the timing generator 52 and the status register decoder 53 implement the control means D according to claim 3 of the present application. In addition, the program data register 54, the data generator 55, the source address register 56a, the destination address register 56.
b, the strobe generator 57, the address generator 58, and the three-state buffers 55a, 57a, and 58a implement the flash memory program sequence executing means E of claim 3.

【0078】次に、このように構成されたフラッシュメ
モリコントローラ5の動作について図7〜図9に分割図
示したフローチャートに従い説明する。
Next, the operation of the flash memory controller 5 thus configured will be described with reference to the flowcharts divided and shown in FIGS.

【0079】プログラムデータをその格納アドレスから
フラッシュメモリ3のプログラム先アドレスに転送する
場合、まず、CPU1のソフトウエアによりフラッシュ
メモリ3のプログラム先アドレスをデスティネーション
アドレスレジスタ56bにセットし、プログラムデータ
の格納アドレスをソースアドレスレジスタ56aにセッ
トし、プログラムバイト数をプログラムバイト数レジス
タ59にセットし、プログラムレジスタ51のプログラ
ム開始ビットをイネーブルにすると、フラッシュメモリ
コントローラ5は図7〜図9に従い処理を開始する(図
7の判断301)。
To transfer the program data from the storage address to the program destination address of the flash memory 3, first, the software of the CPU 1 sets the program destination address of the flash memory 3 in the destination address register 56b and stores the program data. When the address is set in the source address register 56a, the number of program bytes is set in the program byte number register 59, and the program start bit of the program register 51 is enabled, the flash memory controller 5 starts the processing according to FIGS. (Decision 301 in FIG. 7).

【0080】プログラム開始ビットがイネーブルになる
と、タイミング発生部52がDMAリクエスト信号DR
EQを発生し(処理302)、DMAC6からのDMA
アクノレッジDACKがイネーブルになると、フラッシ
ュメモリコントローラ5は各バスと制御信号線を使用可
能となる(判断303Y)。アドレス発生部58は上記
にてセットされたデスティネーションアドレスレジスタ
56bの内容をアドレスバスに出力し、データ発生部5
5は消去セットアップコマンドをデータバスに出力し、
ストローブ発生部57はライト信号WRBを発生し、消
去セットアップコマンドをフラッシュメモリ3に書き込
む(処理304)。
When the program start bit is enabled, the timing generator 52 causes the DMA request signal DR
Generates EQ (process 302), DMA from DMAC6
When the acknowledge DACK is enabled, the flash memory controller 5 can use each bus and control signal line (decision 303Y). The address generator 58 outputs the contents of the destination address register 56b set above to the address bus, and the data generator 5
5 outputs the erase setup command to the data bus,
The strobe generator 57 generates the write signal WRB and writes the erase setup command in the flash memory 3 (process 304).

【0081】同様に、データ発生部55が消去コマンド
をデータバスに出力し、ストローブ発生部57がライト
信号WRBを発生し、消去コマンドをフラッシュメモリ
3に書き込む(処理305)。
Similarly, the data generator 55 outputs an erase command to the data bus, the strobe generator 57 generates a write signal WRB, and the erase command is written in the flash memory 3 (process 305).

【0082】そして、タイミング発生部52がDMAリ
クエスト信号DREQを解除し、各バスと制御信号線を
CPU1に開放する(処理306)。これにより、CP
U1は各バスと制御信号線を使った他の処理を行うこと
ができる。
Then, the timing generator 52 releases the DMA request signal DREQ and opens each bus and control signal line to the CPU 1 (process 306). Thereby, the CP
U1 can perform other processing using each bus and control signal line.

【0083】この後、タイミング発生部52により所定
の消去動作時間がカウントされ、フラッシュメモリ3に
必要な消去動作時間が経過すると、上記処理302と同
様にDMAリクエスト信号DREQを発生し(判断30
7→処理308)、DMAC6からDMAアクノレッジ
DACKがイネーブルになると、デスティネーションア
ドレスレジスタ56bの内容をアドレスバスに出力し、
ストローブ発生部57がリード信号を発生し、フラッシ
ュメモリ3からステータスレジスタ3aの内容を読み出
す(判断309→処理310)。
Thereafter, the timing generating section 52 counts a predetermined erase operation time, and when the erase operation time required for the flash memory 3 has elapsed, the DMA request signal DREQ is generated in the same manner as the above-mentioned processing 302 (determination 30).
7 → process 308), when the DMA acknowledge DACK is enabled from the DMAC 6, the contents of the destination address register 56b are output to the address bus,
The strobe generator 57 generates a read signal and reads the contents of the status register 3a from the flash memory 3 (decision 309 → process 310).

【0084】そして、上記処理306と同様にDMAリ
クエスト信号DREQを解除し、各バスと制御信号線を
CPU1に開放する(処理311)。
Then, similarly to the process 306, the DMA request signal DREQ is released, and each bus and control signal line are opened to the CPU 1 (process 311).

【0085】ここで、ステータスレジスタデコーダ53
により、ステータスレジスタ3aのチェックが行われ
(判断312)、消去が完了ならば次の処理に進み、消
去が終了していなければ上記処理308〜判断312を
繰り返す。
Here, the status register decoder 53
Thereby, the status register 3a is checked (decision 312), and if the erasing is completed, the process proceeds to the next process, and if the erasing is not completed, the above processes 308 to 312 are repeated.

【0086】次に、上記処理302と同様にDMAリク
エスト信号DREQを発生し(図8の処理313)、D
MAC6からのDMAアクノレッジDACKがイネーブ
ルになると、上記処理304と同様にしてリードアレイ
コマンドをフラッシュメモリ3に書込み、リードモード
にする(判断314→処理315)。
Next, the DMA request signal DREQ is generated in the same manner as the above-mentioned processing 302 (processing 313 in FIG. 8), and D
When the DMA acknowledge DACK from the MAC 6 is enabled, the read array command is written in the flash memory 3 and the read mode is set (decision 314 → process 315) in the same manner as the above-mentioned process 304.

【0087】アドレス発生部58は、上記にてセットさ
れたソースアドレスレジスタ56aの内容をアドレスバ
スに出力し、ストローブ発生部57がリード信号RDB
を発生し、ソースデータをプログラムデータレジスタ5
4にDMA転送する(処理316)。
The address generator 58 outputs the contents of the source address register 56a set above to the address bus, and the strobe generator 57 outputs the read signal RDB.
And the source data is stored in the program data register 5
Then, DMA transfer is performed to No. 4 (process 316).

【0088】また、アドレス発生部58は、上記にてセ
ットされたデスティネーションアドレスレジスタ56b
の内容をアドレスバスに出力し、データ発生部55はプ
ログラムセットアップコマンドをデータバスに出力し、
ストローブ発生部57がライト信号WRBを発生し、プ
ログラムセットアップコマンドをフラッシュメモリ3に
書き込む(処理317)。
Further, the address generator 58 has the destination address register 56b set as described above.
Output to the address bus, the data generator 55 outputs the program setup command to the data bus,
The strobe generator 57 generates the write signal WRB and writes the program setup command in the flash memory 3 (process 317).

【0089】この後、データ発生部55は、プログラム
データレジスタ54の内容をデータバスに出力し、スト
ローブ発生部57がライト信号WRBを発生し、プログ
ラムデータをフラッシュメモリ3に書き込む(処理31
8)。
Thereafter, the data generator 55 outputs the contents of the program data register 54 to the data bus, the strobe generator 57 generates the write signal WRB, and the program data is written in the flash memory 3 (process 31).
8).

【0090】そして、上記処理306と同様にDMAリ
クエスト信号DREQを解除し、各バスと制御信号線を
CPU1に開放する(処理319)。
Then, similarly to the process 306, the DMA request signal DREQ is released and each bus and control signal line are opened to the CPU 1 (process 319).

【0091】また、タイミング発生部52により所定の
プログラム動作時間がカウントされ、フラッシュメモリ
3に必要なプログラム動作時間が経過すると、上記処理
302と同様にDMAリクエスト信号DREQを発生す
る(判断320→図9の処理321)。
Further, the timing generating section 52 counts a predetermined program operation time, and when the program operation time required for the flash memory 3 has elapsed, the DMA request signal DREQ is generated similarly to the process 302 (decision 320 → FIG. Process 321 of 9).

【0092】DMAC6からのDMAアクノレッジDA
CKがイネーブルになると、上記処理310と同様にフ
ラッシュメモリ3からステータスレジスタ3aを読み出
す(判断322→処理323)。
DMA Acknowledge DA from DMAC6
When the CK is enabled, the status register 3a is read from the flash memory 3 in the same manner as the above-mentioned process 310 (decision 322 → process 323).

【0093】その後、上記処理306と同様にDMAリ
クエスト信号DREQを解除し、各バスと制御信号線を
CPU1に開放する(処理324)。
Thereafter, the DMA request signal DREQ is released and the buses and control signal lines are opened to the CPU 1 in the same manner as in the process 306 (process 324).

【0094】そして、上記判断312と同様に、ステー
タスレジスタ3aの内容のチェックが行われ(判断32
5)、プログラムが完了ならば次の処理に進み、プログ
ラムが完了していなければ上記処理321〜判断325
を繰り返す。
Then, similarly to the judgment 312, the contents of the status register 3a are checked (decision 32).
5) If the program is completed, proceed to the next process. If the program is not completed, the above process 321 to judgment 325.
repeat.

【0095】プログラム完了であれば、上記処理302
と同様にDMAリクエスト信号DREQを発生する(処
理326)。DMAC6からのDMAアクノレッジDA
CKがイネーブルになると、上記処理315と同様にリ
ードアレイコマンドをフラッシュメモリ3に書込み、リ
ードモードにする(判断327→処理328)。
If the program is completed, the above processing 302
Similarly to, a DMA request signal DREQ is generated (process 326). DMA Acknowledge DA from DMAC6
When the CK is enabled, the read array command is written in the flash memory 3 and the read mode is set (decision 327 → process 328) as in the above process 315.

【0096】そして、上記処理306と同様にDMAリ
クエスト信号DREQを解除し、各バスと制御信号線を
CPU1に開放する(処理329)。
Then, similarly to the process 306, the DMA request signal DREQ is released, and each bus and control signal line are opened to the CPU 1 (process 329).

【0097】次に、プログラムバイト数レジスタ59を
デクリメントし、ソースアドレスレジスタ56a,デス
ティネーションアドレスレジスタ56bをインクリメン
トする(処理330)。
Next, the program byte number register 59 is decremented, and the source address register 56a and the destination address register 56b are incremented (step 330).

【0098】プログラムバイト数レジスタ59が0にな
ったら処理を終了し、それ以外は上記処理316〜判断
331を繰り返す。
When the program byte number register 59 becomes 0, the processing is terminated, and otherwise the above processing 316 to judgment 331 are repeated.

【0099】以上のように、CPU1のソフトウエアに
よらずフラッシュメモリコントローラ5によりフラッシ
ュメモリ3の消去及びプログラムシーケンスを行うこと
で、フラッシュメモリ3にプログラムデータを高速に書
き込むことができる。さらに、消去,プログラムシーケ
ンスを他の通常のDMA転送と独立させることで、アド
レスバスやデータバス及び制御信号線の制御が容易にな
り、回路規模を縮小することができる。
As described above, the program data can be written in the flash memory 3 at high speed by erasing the flash memory 3 and executing the program sequence by the flash memory controller 5 regardless of the software of the CPU 1. Furthermore, by making the erase and program sequences independent of other normal DMA transfers, the control of the address bus, data bus and control signal lines becomes easy, and the circuit scale can be reduced.

【0100】[0100]

【発明の効果】以上のように、請求項1記載の発明によ
れば、CPUによりアクセスされ、フラッシュメモリの
消去時に消去開始フラグがセットされる消去開始レジス
タと、フラッシュメモリの消去シーケンスを行うための
アドレス,データ及び制御信号を発生するフラッシュメ
モリ消去シーケンス実行手段と、前記消去開始レジスタ
の消去開始フラグがセットされると、前記CPUにバス
リクエスト信号を出力してCPUをホールド状態にする
とともに、前記フラッシュメモリ消去シーケンス実行手
段の動作タイミングを制御する制御手段とを備え、CP
Uのソフトウエアによらずハードウエアによりフラッシ
ュメモリの消去シーケンスを行うことによりフラッシュ
メモリを消去する。従って、ソフトウエアによるフラッ
シュメモリの消去シーケンスを行わないため、高速にフ
ラッシュメモリを消去することができる。また、ハード
ウエアによって上記消去シーケンスを行っている間、C
PUは他の処理を並行して行うことができ、システムの
スループットが向上する等の効果がある。
As described above, according to the first aspect of the present invention, the erase start register which is accessed by the CPU and in which the erase start flag is set when the flash memory is erased, and the erase sequence of the flash memory are performed. Flash memory erase sequence executing means for generating the address, data and control signals, and when the erase start flag of the erase start register is set, a bus request signal is output to the CPU to put the CPU in a hold state, and And a control means for controlling the operation timing of the flash memory erase sequence execution means,
The flash memory is erased by performing the erase sequence of the flash memory by hardware regardless of the software of U. Therefore, since the flash memory erasing sequence is not performed by software, the flash memory can be erased at high speed. Also, while the erase sequence is being performed by hardware, C
The PU can perform other processing in parallel, which has the effect of improving the system throughput.

【0101】また、請求項2記載の発明によれば、CP
Uによりアクセスされ、フラッシュメモリのプログラム
時にプログラム開始フラグがセットされるプログラム開
始レジスタと、前記CPUによりアクセスされ、プログ
ラムデータとそのプログラム先アドレスがそれぞれセッ
トされるレジスタを有して、前記フラッシュメモリのプ
ログラムシーケンスを行うためのアドレス,データ及び
制御信号を発生するフラッシュメモリプログラムシーケ
ンス実行手段と、前記プログラム開始レジスタのプログ
ラム開始フラグがセットされると、前記CPUにバスリ
クエスト信号を出力してCPUをホールド状態にすると
ともに、前記フラッシュメモリプログラムシーケンス実
行手段の動作タイミングを制御する制御手段とを備え、
CPUのソフトウエアによらずハードウエアによりフラ
ッシュメモリのプログラムシーケンスを行うことでフラ
ッシュメモリにプログラムデータを書き込む。従って、
ソフトウエアによるフラッシュメモリのプログラムシー
ケンスを行わないため、フラッシュメモリに対するプロ
グラムデータの書込みを高速に行うことができる。ま
た、ハードウエアによって上記プログラムシーケンスを
行っている間、CPUは他の処理を並行して行うことが
でき、アドレスバス,データバスを含めたシステムのス
ループットが向上する等の効果がある。
According to the invention described in claim 2, CP
The flash memory has a program start register which is accessed by U and in which a program start flag is set when programming the flash memory, and a register which is accessed by the CPU and in which program data and its program destination address are respectively set. When a flash memory program sequence executing means for generating an address, data and a control signal for performing a program sequence and a program start flag of the program start register are set, a bus request signal is output to the CPU and the CPU is held. And a control means for controlling the operation timing of the flash memory program sequence execution means,
The program data is written in the flash memory by performing the program sequence of the flash memory by hardware instead of the software of the CPU. Therefore,
Since the program sequence of the flash memory is not executed by software, the program data can be written into the flash memory at high speed. Further, while the above program sequence is being performed by hardware, the CPU can perform other processing in parallel, which has the effect of improving the throughput of the system including the address bus and the data bus.

【0102】さらに、請求項3記載の発明によれば、D
MAコントローラを有するシステムにおいて、CPUに
よりアクセスされ、フラッシュメモリのプログラム時に
プログラム開始フラグがセットされるプログラム開始レ
ジスタと、CPUによりアクセスされ、プログラムデー
タが格納されたソースアドレス及びそのプログラムデー
タを格納するデスティネーションアドレスがセットさ
れ、1バイトのプログラム動作毎にそれぞれインクリメ
ントされるレジスタを有して、前記フラッシュメモリの
プログラムシーケンスを行うためのアドレス,データ及
び制御信号を発生するフラッシュメモリプログラムシー
ケンス実行手段と、前記CPUによりアクセスされ、プ
ログラムバイト数が設定されて、1バイトのプログラム
動作毎にデクリメントされるプログラムバイト数レジス
タと、前記プログラム開始レジスタのプログラム開始フ
ラグがセットされると、前記DMAコントローラにDM
Aリクエスト信号を出力するとともに、前記フラッシュ
メモリプログラムシーケンス実行手段の動作タイミング
を制御して、DMA転送によりソースアドレスにあるプ
ログラムデータをデスティネーションアドレスの示すフ
ラッシュメモリにプログラムする制御手段とを備え、C
PUのソフトウエアによらずハードウエアによりフラッ
シュメモリの消去及びプログラムシーケンスを行うこと
でフラッシュメモリにプログラムデータを書き込む。従
って、前記請求項1,2と同様の効果に加えて、消去,
プログラムシーケンスを他のDMA転送と独立させるこ
とで、アドレスバスやデータバス及び制御信号線の制御
が容易になり、回路規模を縮小することができる効果が
ある。
Further, according to the invention of claim 3, D
In a system having an MA controller, a program start register which is accessed by a CPU and sets a program start flag when programming a flash memory, a source address which is accessed by the CPU and stores program data, and a destination which stores the program data A flash memory program sequence executing means for generating an address, a data and a control signal for performing a program sequence of the flash memory, which has a register to which a nonation address is set and which is incremented for each 1-byte program operation. A program byte number register which is accessed by the CPU, sets a program byte number, and is decremented for each 1-byte program operation; When the program start flag of the start register is set, DM to the DMA controller
A request signal is output, the operation timing of the flash memory program sequence execution means is controlled, and the program data at the source address is programmed into the flash memory indicated by the destination address by DMA transfer.
The program data is written to the flash memory by erasing the flash memory and executing the program sequence by hardware instead of the software of the PU. Therefore, in addition to the same effects as those of claims 1 and 2, elimination,
By making the program sequence independent of other DMA transfers, it is easy to control the address bus, the data bus, and the control signal line, and the circuit scale can be reduced.

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

【図1】本発明の一実施例に係るマイクロプロセッサシ
ステムの要部を示すブロック図。
FIG. 1 is a block diagram showing a main part of a microprocessor system according to an embodiment of the present invention.

【図2】上記図1のフラッシュメモリコントローラの第
1,第2の実施例を示すブロック図。
FIG. 2 is a block diagram showing first and second embodiments of the flash memory controller of FIG.

【図3】上記フラッシュメモリコントローラの第1の実
施例の動作を示すフローチャート。
FIG. 3 is a flowchart showing the operation of the first embodiment of the flash memory controller.

【図4】上記フラッシュメモリコントローラの第2の実
施例の動作を示すフローチャート。
FIG. 4 is a flowchart showing an operation of the second embodiment of the flash memory controller.

【図5】本発明の第3の実施例に係るマイクロプロセッ
サシステムの要部を示すブロック図。
FIG. 5 is a block diagram showing a main part of a microprocessor system according to a third embodiment of the present invention.

【図6】上記図5のフラッシュメモリコントローラの一
実施例を示すブロック図。
FIG. 6 is a block diagram showing an embodiment of the flash memory controller of FIG.

【図7】上記図6のフラッシュメモリコントローラの動
作の一部を示すフローチャート。
FIG. 7 is a flowchart showing a part of the operation of the flash memory controller of FIG.

【図8】上記図6のフラッシュメモリコントローラの動
作の一部を示すフローチャート。
8 is a flowchart showing a part of the operation of the flash memory controller of FIG.

【図9】上記図6のフラッシュメモリコントローラの動
作の一部を示すフローチャート。
9 is a flowchart showing a part of the operation of the flash memory controller shown in FIG.

【符号の説明】 1 CPU 2 ROM 3 フラッシュメモリ 4 RAM 5 フラッシュメモリコントローラ 6 DMAC 51 消去/プログラム開始レジスタ 52 タイミング発生部 53 ステータスレジスタデコーダ 54 プログラムデータレジスタ 55 データ発生部 56 消去/プログラムアドレスレジスタ 56a ソースアドレスレジスタ 56b デスティネーションアドレスレジスタ 57 ストローブ発生部 58 アドレス発生部 59 プログラムバイト数レジスタ 55a〜58a スリーステートバッファ A,D 制御手段 B フラッシュメモリ消去シーケンス実行手段 C,E フラッシュメモリプログラムシーケンス実行手
[Explanation of symbols] 1 CPU 2 ROM 3 Flash memory 4 RAM 5 Flash memory controller 6 DMAC 51 Erase / program start register 52 Timing generator 53 Status register decoder 54 Program data register 55 Data generator 56 Erase / program address register 56a Source Address register 56b Destination address register 57 Strobe generator 58 Address generator 59 Program byte count register 55a to 58a Three-state buffer A, D Control means B Flash memory erase sequence execution means C, E Flash memory program sequence execution means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 特定の消去シーケンスを有するフラッシ
ュメモリがCPUのメモリ空間内に配置されたマイクロ
プロセッサシステムにおいて、 前記CPUによりアクセスされ、前記フラッシュメモリ
の消去時に消去開始フラグがセットされる消去開始レジ
スタと、 前記フラッシュメモリの消去シーケンスを行うためのア
ドレス,データ及び制御信号を発生するフラッシュメモ
リ消去シーケンス実行手段と、 前記消去開始レジスタの消去開始フラグがセットされる
と、前記CPUにバスリクエスト信号を出力してCPU
をホールド状態にするとともに、前記フラッシュメモリ
消去シーケンス実行手段の動作タイミングを制御する制
御手段とを備えたことを特徴とするフラッシュメモリ制
御装置。
1. In a microprocessor system in which a flash memory having a specific erase sequence is arranged in a memory space of a CPU, an erase start register which is accessed by the CPU and an erase start flag is set when the flash memory is erased. A flash memory erase sequence executing means for generating an address, data and control signal for performing an erase sequence of the flash memory; and a bus request signal to the CPU when an erase start flag of the erase start register is set. Output and CPU
And a control means for controlling the operation timing of the flash memory erasing sequence executing means.
【請求項2】 特定のプログラムシーケンスを有するフ
ラッシュメモリがCPUのメモリ空間内に配置されたマ
イクロプロセッサシステムにおいて、 前記CPUによりアクセスされ、前記フラッシュメモリ
のプログラム時にプログラム開始フラグがセットされる
プログラム開始レジスタと、 前記CPUによりアクセスされ、プログラムデータとそ
のプログラム先アドレスがそれぞれセットされるレジス
タを有して、前記フラッシュメモリのプログラムシーケ
ンスを行うためのアドレス,データ及び制御信号を発生
するフラッシュメモリプログラムシーケンス実行手段
と、 前記プログラム開始レジスタのプログラム開始フラグが
セットされると、前記CPUにバスリクエスト信号を出
力してCPUをホールド状態にするとともに、前記フラ
ッシュメモリプログラムシーケンス実行手段の動作タイ
ミングを制御する制御手段とを備えたことを特徴とする
フラッシュメモリ制御装置。
2. In a microprocessor system in which a flash memory having a specific program sequence is arranged in a memory space of a CPU, a program start register which is accessed by the CPU and a program start flag is set when programming the flash memory. And a flash memory program sequence execution for generating an address, data, and control signal for performing a program sequence of the flash memory, which has a register which is accessed by the CPU and in which program data and a program destination address thereof are set, respectively. And a program start flag of the program start register is set, a bus request signal is output to the CPU to put the CPU in a hold state and the flash And a control means for controlling the operation timing of the memory program sequence execution means.
【請求項3】 特定の消去及びプログラムシーケンスを
有するフラッシュメモリがCPUのメモリ空間内に配置
されとともに、DMAコントローラを備えたマイクロプ
ロセッサシステムにおいて、 前記CPUによりアクセスされ、前記フラッシュメモリ
のプログラム時にプログラム開始フラグがセットされる
プログラム開始レジスタと、 前記CPUによりアクセスされ、プログラムデータが格
納されたソースアドレス及びそのプログラムデータを格
納するデスティネーションアドレスがセットされ、1バ
イトのプログラム動作毎にそれぞれインクリメントされ
るレジスタを有して、前記フラッシュメモリのプログラ
ムシーケンスを行うためのアドレス,データ及び制御信
号を発生するフラッシュメモリプログラムシーケンス実
行手段と、前記CPUによりアクセスされ、プログラム
バイト数が設定されて、1バイトのプログラム動作毎に
デクリメントされるプログラムバイト数レジスタと、 前記プログラム開始レジスタのプログラム開始フラグが
セットされると、前記DMAコントローラにDMAリク
エスト信号を出力するとともに、前記フラッシュメモリ
プログラムシーケンス実行手段の動作タイミングを制御
して、DMA転送によりソースアドレスにあるプログラ
ムデータをデスティネーションアドレスの示すフラッシ
ュメモリにプログラムする制御手段とを備えたことを特
徴とするフラッシュメモリ制御装置。
3. In a microprocessor system having a flash memory having a specific erase and program sequence arranged in the memory space of the CPU and having a DMA controller, the flash memory is accessed by the CPU and a program is started when the flash memory is programmed. A program start register in which a flag is set, a source address in which the program data is stored and a destination address in which the program data is stored are set by the CPU, and are incremented for each 1-byte program operation A flash memory program sequence executing means for generating an address, data and control signal for performing a program sequence of the flash memory, When the program byte number register that is accessed by the PU, sets the program byte number, and is decremented for each 1-byte program operation, and the program start flag of the program start register are set, the DMA request signal is sent to the DMA controller. And controlling the operation timing of the flash memory program sequence executing means to program the program data at the source address into the flash memory indicated by the destination address by DMA transfer. Flash memory controller.
JP17565895A 1995-06-20 1995-06-20 Flash memory controller Pending JPH096747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17565895A JPH096747A (en) 1995-06-20 1995-06-20 Flash memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17565895A JPH096747A (en) 1995-06-20 1995-06-20 Flash memory controller

Publications (1)

Publication Number Publication Date
JPH096747A true JPH096747A (en) 1997-01-10

Family

ID=15999957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17565895A Pending JPH096747A (en) 1995-06-20 1995-06-20 Flash memory controller

Country Status (1)

Country Link
JP (1) JPH096747A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008084288A (en) * 2006-09-26 2008-04-10 Integrated Technology Express Inc Memory controller
KR100991718B1 (en) * 2001-11-23 2010-11-03 샌디스크 아이엘 엘티디 Detecting partially erased units in flash devices

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100991718B1 (en) * 2001-11-23 2010-11-03 샌디스크 아이엘 엘티디 Detecting partially erased units in flash devices
JP2008084288A (en) * 2006-09-26 2008-04-10 Integrated Technology Express Inc Memory controller
JP4594944B2 (en) * 2006-09-26 2010-12-08 聯陽半導體股▲ふん▼有限公司 Memory control device

Similar Documents

Publication Publication Date Title
JP3737528B2 (en) Flash memory device, method and circuit for allocating page buffer resources thereof
US5835927A (en) Special test modes for a page buffer shared resource in a memory device
JP6274589B1 (en) Semiconductor memory device and continuous reading method
US5692138A (en) Flexible user interface circuit in a memory device
US5369754A (en) Block specific status information in a memory device
EP1242868B1 (en) Organization of blocks within a nonvolatile memory unit to effectively decrease sector write operation time
US5519847A (en) Method of pipelining sequential writes in a flash memory
KR20180034190A (en) Semiconductor memory device, Flash memory and Method of reading the same
JP2002328836A (en) Memory device
JP4034971B2 (en) Memory controller and memory system device
US5715423A (en) Memory device with an internal data transfer circuit
JP2000067574A (en) Semiconductor memory
KR20090033887A (en) Nonvolatile memory system, and data read/write method for nonvolatile memory system
JPH04256088A (en) Ic memory card system
WO2002075745A1 (en) Storage device, storage device controlling method, and program
JP3875139B2 (en) Nonvolatile semiconductor memory device, data write control method thereof, and program
JPH11203886A (en) Nonvolatile memory and semiconductor device having the same
JP4254932B2 (en) Memory controller and flash memory system
US5748939A (en) Memory device with a central control bus and a control access register for translating an access request into an access cycle on the central control bus
JPH096747A (en) Flash memory controller
KR100365690B1 (en) Nonvolatile memory, system comprising a plurality of nonvolatile memorys, and data read method thereof
JPH11175399A (en) Method and device for discriminating register read from memory read of flash memory
JP4491267B2 (en) Nonvolatile semiconductor memory device
JPH04360095A (en) Semiconductor memory
JP2005339438A (en) Memory controller, flash memory system and control method of flash memory