JPH08241247A - Computer apparatus and method and circuit for its memory access - Google Patents

Computer apparatus and method and circuit for its memory access

Info

Publication number
JPH08241247A
JPH08241247A JP4706895A JP4706895A JPH08241247A JP H08241247 A JPH08241247 A JP H08241247A JP 4706895 A JP4706895 A JP 4706895A JP 4706895 A JP4706895 A JP 4706895A JP H08241247 A JPH08241247 A JP H08241247A
Authority
JP
Japan
Prior art keywords
memory
block
data
address
spare area
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
JP4706895A
Other languages
Japanese (ja)
Inventor
Atsuyuki Shoji
篤之 庄司
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP4706895A priority Critical patent/JPH08241247A/en
Publication of JPH08241247A publication Critical patent/JPH08241247A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To provide the computer apparatus ana the method ana circuit for memory access which reduce the burden to a CPU and increase the speed of access to a memory. CONSTITUTION: The address space of a memory 12 is divided into plural blocks, and plural blocks are divided into a data area and a standby area and are managed by an MMU(memory management unit) 11; and when a request of data write to a prescribed address of the memory 12 is issued from a CPU 10, a write control circuit 13 saves contents of the block including this prescribed address into a RAM 14 and writes write data in the address corresponding to the prescribed address of saved block data. The block including the prescribed address and a block of the standby area are exchanged, and block data in the RAM 14 is copied to the block including the prescribed address of the memory 12, ana block data transferred to the standby area is erased.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、書き込み回数に制限が
あるメモリにアクセスするメモリアクセス方法及び回路
と、そのようなメモリを備えたコンピュータ機器に関す
るものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory access method and circuit for accessing a memory having a limited number of write operations, and a computer device equipped with such a memory.

【0002】[0002]

【従来の技術】一般にコンピュータ機器等の記憶装置に
は、主記憶と2次記憶とがある。この内、主記憶は、演
算素子(CPU)などからのアドレス信号線により選択
され、その演算素子が直接、そのアドレスにアクセスす
ることによりデータを参照できるデバイスである。この
ような主記憶には、命令、データ等を恒常的に記憶する
ROMと、データを一時的に、或いは2次記憶より読み
出した命令やデータなどを保持するRAMの2種類があ
る。この内、RAMはその記憶内容を自由に変更、書き
換え可能であるが、電源遮断時にはその内容が失われる
揮発性のメモリである。また、ROMは、電源遮断時で
あってもその記憶内容が保持される不揮発特性メモリで
あるが、一般にその記憶内容を書き換えることは不可能
である。このようなROMの内容は、製造時に設定され
るか、或はコンピュータを組み込んだ機器の出荷時等に
設定され、その機器の使用時には変更されることはな
い。
2. Description of the Related Art Generally, a storage device such as a computer device has a main storage and a secondary storage. Of these, the main memory is a device that is selected by an address signal line from an arithmetic element (CPU) or the like, and the arithmetic element can directly refer to the data by accessing the address. There are two types of main memory such as a ROM that constantly stores instructions and data, and a RAM that holds instructions and data that are read out temporarily or from secondary storage. Of these, the RAM is a volatile memory whose stored contents can be freely changed and rewritten, but the contents are lost when the power is cut off. Further, the ROM is a non-volatile memory that retains its stored contents even when the power is cut off, but it is generally impossible to rewrite the stored contents. The contents of such a ROM are set at the time of manufacture or at the time of shipment of a device incorporating a computer, and are not changed when the device is used.

【0003】これに対し2次記憶は、演算素子からのア
ドレス信号だけでは、直接そのアドレスにアクセスして
内容を参照できないデバイスであり、さらに機械的な動
作を必要とするなどの理由で、そのランダムアクセスに
多くの時間がかかる。一般には、この2次記憶の内容
は、一旦RAMに転送され、その後、演算素子により参
照される。このような2次記憶は、前述の主記憶と比較
して、そのアクセス時間が長い代わりに、一般に大容量
である。このため、大量のデータを格納するのに使用さ
れる。このような2次記憶の一例として、例えば固定さ
れた情報を格納するCDROMや、しばしば、その記憶
内容が変更され、なおかつ電源遮断時においても、その
記憶情報の保存が必要な場合には、磁気ディスク等のデ
バイスが利用される。さらに、演算素子の動作速度に対
する主記憶のアクセススピードの遅さを補償するため
に、アクセススピードの速いキャッシュメモリを設ける
場合がある。
On the other hand, the secondary storage is a device in which the address cannot be directly accessed and the contents can be referred to only by the address signal from the arithmetic element, and the secondary storage requires a mechanical operation. Random access takes a lot of time. Generally, the contents of this secondary storage are once transferred to the RAM and then referred to by the arithmetic element. Such a secondary storage is generally large in capacity in comparison with the above-mentioned main storage in spite of its long access time. For this reason it is used to store large amounts of data. As an example of such a secondary storage, for example, a CDROM that stores fixed information, a storage content that is often changed, and when the stored information needs to be stored even when the power is cut off, magnetic storage is required. Devices such as disks are used. Furthermore, in order to compensate the slowness of the access speed of the main memory with respect to the operation speed of the arithmetic element, a cache memory with a high access speed may be provided.

【0004】このように、通常のコンピュータ機器は、
上記のような記憶素子と、入出力機器及び演算素子(C
PU)により構成されている。尚、上記以外の記憶素子
として、例えば電気的に書き換え可能な不揮発性の半導
体メモリ素子(例えばEEPROM等)が存在する。
As described above, the normal computer equipment is
The memory device as described above, the input / output device and the arithmetic device (C
PU). As a storage element other than the above, for example, there is an electrically rewritable nonvolatile semiconductor memory element (for example, EEPROM).

【0005】このようなメモリ素子とRAMとの違い
は、電源遮断時にもその内容が失われない点にある。こ
のため、記憶データの保持には最適であるが、このよう
な電気的に書き換え可能な半導体メモリ素子は、そのメ
モリ容量の小ささ、アクセススピードの遅さや、書き換
え手順の複雑さ、更には信頼性等に問題があったため、
あまり書き換え頻度の多くない小容量の情報の保持にし
か利用されなかった。
The difference between such a memory device and a RAM is that the contents are not lost even when the power is cut off. Therefore, although it is most suitable for holding the stored data, such an electrically rewritable semiconductor memory element has a small memory capacity, a slow access speed, a complicated rewriting procedure, and a reliability. Because there was a problem with sex,
It was used only for holding a small amount of information that is not frequently rewritten.

【0006】しかし、近年の半導体技術の発展によっ
て、このような電気的に書き換え可能な半導体メモリ素
子の記憶容量、アクセススピード、その記憶内容の書き
換え手順、価格等が大幅に改善された。また書き換えで
きる回数(寿命)も延びつつある。このため、このよう
な電気的に書き換え可能な半導体メモリ素子が、比較的
小容量の2次記憶装置として使用されるようになってき
ている。
However, with the recent development of semiconductor technology, the storage capacity, access speed, rewriting procedure of the stored contents, price, etc. of such an electrically rewritable semiconductor memory element have been greatly improved. Also, the number of rewrites (lifetime) is increasing. Therefore, such an electrically rewritable semiconductor memory device has come to be used as a secondary storage device having a relatively small capacity.

【0007】[0007]

【発明が解決しようとする課題】このような電気的に書
き換え可能な半導体メモリ素子は、主記憶と同様にアド
レス信号線によって直接、アドレスを選択して参照する
ことができるが、例えばRAMのように、ほぼ無限回
数、書き換え可能ではないため、その利用法としては、
例えば、2次記憶のディスク・オペレーティングシステ
ムを記憶するため等に利用されている。また、このよう
なメモリ素子にデータを書き込む場合には、書込みを行
うアドレスを消去状態にした後、そのアドレスにデータ
を書込まなければならない。このため、機械的な動作を
必要とする2次記憶と比較して、そのアクセス速度が圧
倒的に速いものの、主記憶として使用するメモリと比較
すると書き込みに要する速度が極めて遅くなってしま
う。
In such an electrically rewritable semiconductor memory device, an address can be directly selected and referred to by an address signal line similarly to the main memory. Since it is not rewritable almost infinitely,
For example, it is used to store a secondary storage disk operating system. Further, when writing data to such a memory element, it is necessary to put the address to be written into the erased state and then write the data to the address. Therefore, although the access speed is overwhelmingly higher than that of the secondary memory which requires mechanical operation, the writing speed becomes extremely slower than that of the memory used as the main memory.

【0008】本発明は上記従来例に鑑みてなされたもの
で、CPUの負担を減らして、メモリへのアクセス速度
を高めることができるメモリアクセス方法及び回路を提
供することを目的とする。
The present invention has been made in view of the above conventional example, and an object of the present invention is to provide a memory access method and circuit capable of reducing the load on the CPU and increasing the access speed to the memory.

【0009】また本発明の目的は、指定されたアドレス
を含むブロック単位でアクセスするメモリにおいて、そ
の書込みに要するCPUの負担を軽減したコンピュータ
機器及びそのメモリアクセス方法及び回路を提供するこ
とにある。
It is another object of the present invention to provide a computer device, a memory access method and a circuit thereof, in which the load of a CPU required for writing is reduced in a memory which is accessed in a block unit including a designated address.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に本発明のコンピュータ機器は以下のような構成を備え
る。即ち、書き込み回数に制限があるメモリを備えたコ
ンピュータ機器であって、前記メモリのアドレス空間を
複数のブロックに分割し、前記複数のブロックをデータ
領域と予備領域とに分けて管理する管理手段と、前記メ
モリの所定アドレスへのデータ書き込み要求を発生する
書込み要求発生手段と、前記書込み要求発生手段による
書込み要求に応じて、前記メモリの前記所定アドレスを
含むブロックの内容を退避する退避手段と、前記退避手
段により退避されたブロックデータの前記所定アドレス
に該当するアドレスに書込みデータを書込む書込み手段
と、前記メモリの前記所定アドレスを含むブロックと前
記予備領域のブロックとを入れ替える入れ替え手段と、
前記入れ替え手段により入れ替えられた前記メモリの前
記所定アドレスを含むブロックに前記書込み手段により
書込んだブロックデータを複写する複写手段と、前記予
備領域に転送されたブロックデータを消去する消去手段
とを有する。
To achieve the above object, a computer device of the present invention has the following configuration. That is, it is a computer device having a memory with a limited number of times of writing, and managing means for dividing the address space of the memory into a plurality of blocks and dividing the plurality of blocks into a data area and a spare area. Write request generating means for generating a data write request to a predetermined address of the memory, and save means for saving the contents of a block including the predetermined address of the memory in response to a write request by the write request generating means, Write means for writing write data to an address corresponding to the predetermined address of the block data saved by the save means, and replacement means for replacing a block including the predetermined address of the memory and a block of the spare area,
And a copy unit for copying the block data written by the writing unit to a block containing the predetermined address of the memory replaced by the replacement unit, and an erasing unit for erasing the block data transferred to the spare area. .

【0011】上記目的を達成するために本発明のメモリ
アクセス方法は以下のような工程を備える。即ち、書き
込み回数に制限があるメモリにアクセスするメモリアク
セス方法であって、前記メモリのアドレス空間を複数の
ブロックに分割し、前記複数のブロックのをデータ領域
と予備領域とに分けて管理し、前記メモリの所定アドレ
スへのデータ書き込み要求が発生すると、前記所定アド
レスを含むブロックの内容を退避する工程と、その退避
されたブロックデータの前記所定アドレスに該当するア
ドレスに、書込みが要求されたデータを書込む工程と、
前記メモリの前記所定アドレスを含むブロックと前記予
備領域のブロックとを入れ替える工程と、その入れ替え
られた前記メモリの前記所定アドレスを含むブロックに
書き込み要求されたデータを含むブロックデータを複写
する工程と、前記予備領域に転送されたブロックデータ
を消去する工程とを有する。
In order to achieve the above object, the memory access method of the present invention comprises the following steps. That is, it is a memory access method for accessing a memory with a limited number of writes, in which the address space of the memory is divided into a plurality of blocks, and the plurality of blocks are divided into a data area and a spare area and managed. When a data write request to a predetermined address of the memory is generated, a step of saving the contents of a block including the predetermined address, and data requested to be written to an address corresponding to the predetermined address of the saved block data And the process of writing
Exchanging a block containing the predetermined address of the memory with a block of the spare area, and copying block data containing data requested to be written to the exchanged block containing the predetermined address of the memory, Erasing the block data transferred to the spare area.

【0012】上記目的を達成するために本発明のメモリ
アクセス回路は以下のような構成を備える。即ち、書き
込み回数に制限があるメモリにアクセスするメモリアク
セス回路であって、前記メモリのアドレス空間を複数の
ブロックに分割し、前記複数のブロックをデータ領域と
予備領域とに分けて管理する管理手段と、前記メモリの
所定アドレスへのデータ書き込み要求が発生すると、前
記所定アドレスを含むブロックの内容を退避する退避手
段と、前記退避手段により退避されたブロックデータの
前記所定アドレスに該当するアドレスに書込みが要求さ
れたデータを書込む書き込み手段と、前記メモリの前記
所定アドレスを含むブロックと前記予備領域のブロック
とを入れ替える入れ替え手段と、前記入れ替え手段によ
り入れ替えられた前記メモリの前記所定アドレスを含む
ブロックに前記書き込み手段により書込まれたブロック
データを複写する複写手段と、前記予備領域に転送され
たブロックデータを消去する消去手段とを有する。
To achieve the above object, the memory access circuit of the present invention has the following configuration. That is, a memory access circuit for accessing a memory with a limited number of writes, and managing means for dividing the address space of the memory into a plurality of blocks and dividing the plurality of blocks into a data area and a spare area. When a data write request to a predetermined address of the memory is generated, a saving means for saving the contents of the block including the predetermined address, and writing to the address corresponding to the predetermined address of the block data saved by the saving means Writing means for writing the requested data, a replacement means for replacing a block including the predetermined address of the memory with a block of the spare area, and a block including the predetermined address of the memory replaced by the replacement means. Block data written by the writing means in It has a copying means for copying, and erasing means for erasing the block data transferred to the spare area.

【0013】[0013]

【作用】以上の構成において、メモリのアドレス空間を
複数のブロックに分割し、それら複数のブロックのをデ
ータ領域と予備領域とに分けて管理する。そして、メモ
リの所定アドレスへのデータ書き込み要求が発生する
と、その所定アドレスを含むブロックの内容を退避し、
その退避されたブロックデータの前記所定アドレスに該
当するアドレスに、書込みが要求されたデータを書込
み、そのメモリの前記所定アドレスを含むブロックと予
備領域のブロックとを入れ替える。こうして入れ替えら
れたメモリの前記所定アドレスを含むブロックに、書込
み要求データが書込まれたブロックデータを複写すると
ともに、その予備領域に転送されたブロックデータを消
去するように動作する。
In the above structure, the address space of the memory is divided into a plurality of blocks, and the plurality of blocks are divided into a data area and a spare area for management. Then, when a data write request to a predetermined address of the memory occurs, the contents of the block including the predetermined address are saved,
The data requested to be written is written to an address corresponding to the predetermined address of the saved block data, and the block including the predetermined address of the memory is replaced with the block of the spare area. In this way, the block data in which the write request data is written is copied to the block including the predetermined address of the memory thus replaced, and the block data transferred to the spare area is erased.

【0014】[0014]

【実施例】以下、添付図面を参照して本発明の好適な実
施例を詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.

【0015】[第1実施例]図1は本発明の第1実施例
のメモリアクセス回路の構成を示すブロック図である。
[First Embodiment] FIG. 1 is a block diagram showing the structure of a memory access circuit according to the first embodiment of the present invention.

【0016】図1において、10は、例えばマイクロプ
ロセッサなどの演算素子(CPU)、11はメモリマネ
ージメントユニット(MMU)、12は、例えばフラッ
シュメモリ等の電気的に書き換え可能なメモリである。
13は書き込み制御回路である。14は、メモリ12の
書き込みブロックのデータ待避用の小容量のRAMであ
る。このRAM14は、メモリ12によっては、そのメ
モリ12に内蔵されている場合もあり、その場合は省略
されるため点線で示している。また、CPU10とMM
U11とが同一のメモリ素子に組み込まれている場合も
ある。15はラッチ回路で、CPU10からメモリ12
に書込むデータ、或はメモリ12より読み出したデータ
を一時的に保持する。16もラッチ回路で、CPU10
からメモリ12にアクセスするアドレス情報を一時的に
保存する。メモリ12に対するCPU10よりのデータ
書き込みが、通常のメモリ(RAM)に対するデータ書
き込みと同様の場合には、ラッチ回路16は必ずしも必
要でない。17は双方向トライステート・バッファで、
CPU10とメモリ12のデータバス同士を接続した
り、または分離したりする。
In FIG. 1, 10 is a computing element (CPU) such as a microprocessor, 11 is a memory management unit (MMU), and 12 is an electrically rewritable memory such as a flash memory.
Reference numeral 13 is a write control circuit. Reference numeral 14 is a small capacity RAM for saving data in the write block of the memory 12. The RAM 14 may be built in the memory 12 depending on the memory 12, and in that case, the RAM 14 is omitted and is shown by a dotted line. Also, the CPU 10 and the MM
The U11 and the U11 may be incorporated in the same memory device. Reference numeral 15 is a latch circuit, which connects the CPU 10 to the memory 12
The data to be written in or the data read from the memory 12 is temporarily held. 16 is also a latch circuit,
Address information for accessing the memory 12 from is temporarily stored. When the data writing from the CPU 10 to the memory 12 is the same as the data writing to the normal memory (RAM), the latch circuit 16 is not always necessary. 17 is a bidirectional tristate buffer,
The data buses of the CPU 10 and the memory 12 are connected or separated from each other.

【0017】100は、CPU10から出力されるアド
レスバス、101は、データの読み出し、書き込みを制
御するためのR/W信号で、CPU10或は書き込み制
御回路13のいずれかから出力される。102はBUS
Y(ビジー)信号で、書き込み制御回路13よりCPU
10に書き込み処理中であることを通知する。103は
データバスである。104は書込み制御回路13がメモ
リ12に出力する制御信号バスで、この制御信号バス1
04を用いて、プログラム端子、インテリジェントなメ
モリに対するブロック消去、消去サスペンド等のコマン
ド入力モード等を設定することができる。105はHO
LD(ホールド)要求信号で、書込み制御回路13がデ
ータバス、アドレスバス及び制御信号を使用する際に、
CPU10の動作を一時停止させ、データバスやアドレ
スバス等を解放させるために使用される。このホールド
信号105は、CPU10によってその動作は異なる
が、本実施例では単純に、この信号105をアクティブ
することによってCPU10の動作が停止して、データ
バスやアドレスバス等を解放するものとする。106は
割込み信号で、CPU10に割り込みを発生させるため
の信号である。107,108のそれぞれは、書き込み
制御回路13がRAM14にアクセスするためのローカ
ルなデータバス、アドレスバスのそれぞれを示してい
る。109は、書込み制御回路13から各回路を制御す
るための信号を出力するコントロールバスである。
Reference numeral 100 is an address bus output from the CPU 10, and 101 is an R / W signal for controlling the reading and writing of data, which is output from either the CPU 10 or the write control circuit 13. 102 is BUS
The Y (busy) signal causes the write control circuit 13 to send the CPU
Notify that write processing is in progress. 103 is a data bus. Reference numeral 104 denotes a control signal bus that the write control circuit 13 outputs to the memory 12.
04, it is possible to set a command input mode such as a program terminal, block erase for intelligent memory, erase suspend, and the like. 105 is HO
When the write control circuit 13 uses the data bus, the address bus and the control signal by the LD (hold) request signal,
It is used for temporarily stopping the operation of the CPU 10 and releasing the data bus, address bus, and the like. The operation of the hold signal 105 differs depending on the CPU 10. However, in this embodiment, simply activating the signal 105 stops the operation of the CPU 10 and releases the data bus, the address bus and the like. An interrupt signal 106 is a signal for causing the CPU 10 to generate an interrupt. Reference numerals 107 and 108 respectively denote a local data bus and an address bus for the write control circuit 13 to access the RAM 14. Reference numeral 109 is a control bus for outputting a signal for controlling each circuit from the write control circuit 13.

【0018】以上の構成において、CPU10よりメモ
リ12のデータの読み出し要求が発生した場合は、通常
のROM、RAM等のメモリに対するアクセスの場合と
同様に、CPU10から出力されるアドレス情報をMM
U11で変換してメモリ12のアドレスとして入力す
る。これにより、メモリ12の指定されたアドレスより
ラッチ回路15、双方向トライステートバッファ17を
介してデータバス103にデータが読み出され、CPU
10により読み取られる。
In the above configuration, when the CPU 10 issues a request to read data from the memory 12, the address information output from the CPU 10 is transferred to the MM as in the case of accessing a memory such as a normal ROM or RAM.
It is converted by U11 and input as the address of the memory 12. As a result, data is read from the specified address of the memory 12 to the data bus 103 via the latch circuit 15 and the bidirectional tristate buffer 17, and the CPU
Read by 10.

【0019】このメモリ12のメモリマップを図2に示
す。
A memory map of the memory 12 is shown in FIG.

【0020】図2に示すように、メモリ12のメモリ空
間は、メモリマネージメント・ユニット(MMU)11
が取り扱えるブロックサイズに分割されて、管理されて
いる。例えば図2の例では、128個のブロック(block
0〜block127)に分割され、その内、100個のブロック
をシステム上の記憶領域として使用し、残りの28個の
ブロックを予備領域として確保している。
As shown in FIG. 2, the memory space of the memory 12 is a memory management unit (MMU) 11
Is managed by being divided into block sizes that can be handled. For example, in the example of FIG. 2, 128 blocks (block
0 to block 127), of which 100 blocks are used as a storage area on the system, and the remaining 28 blocks are reserved as spare areas.

【0021】図2の12に示すように、メモリ12の物
理的なメモリ空間上で連続したアドレスに配置されたb
lock0〜block127のそれぞれは、図2の1
1に示すように、MMU11のレジスタR0〜R127のそ
れぞれによって管理されている。そして、これら各レジ
スタの値によって、論理空間上で、これらデータブロッ
クが図2の120で示すように配置されている。ここで
は、システム上の記憶領域として使用される各ブロック
に対応するMMU11の各レジスタには、各ブロックの
先頭アドレスが記憶され、28個のブロックからなる予
備領域(例えば、block122,124〜block127等)に対応した
レジスタ(R122,R124〜R127等)のそれぞれには特定値
“N1”が設定されている。
As shown at 12 in FIG. 2, b is arranged at consecutive addresses in the physical memory space of the memory 12.
Each of lock0 to block127 is 1 in FIG.
As shown in FIG. 1, it is managed by each of the registers R0 to R127 of the MMU 11. Then, according to the values of these registers, these data blocks are arranged as indicated by 120 in FIG. 2 in the logical space. Here, the head address of each block is stored in each register of the MMU 11 corresponding to each block used as a storage area on the system, and a spare area including 28 blocks (for example, block122, 124 to block127, etc.). ), A specific value "N1" is set in each of the registers (R122, R124 to R127, etc.).

【0022】いま、CPU10よりメモリ12への書き
込み要求が、そのアドレスとともに発生した場合には、
書込み制御回路13は、まずメモリ12の該当するアド
レスよりデータの読み出しを行う。このとき、CPU1
0より出力されるデータとメモリ12より読み出したデ
ータとがデータバス103上で衝突するのを防止するた
めに、書込み制御回路13は、双方向トライステートバ
ッファ17の出力をハイインピーダンス状態に設定す
る。
Now, when the CPU 10 issues a write request to the memory 12 together with the address,
The write control circuit 13 first reads data from the corresponding address of the memory 12. At this time, CPU1
In order to prevent the data output from 0 and the data read from the memory 12 from colliding with each other on the data bus 103, the write control circuit 13 sets the output of the bidirectional tri-state buffer 17 to a high impedance state. .

【0023】ここで、メモリ12から読み出したワード
を構成するメモリ12の全セルが消去状態の場合には、
メモリ12に対する制御信号バス104を書き込み状態
に設定し、CPU10からのアドレスをラッチ回路16
に、書込みデータをラッチ回路15にラッチする。そし
てメモリ12への書き込みシーケンスを駆動するか、単
純なライトサイクルを起動させるかのいずれかを行っ
て、メモリ12の指定されたアドレスにデータを書込
む。
Here, when all the cells of the memory 12 forming the word read from the memory 12 are in the erased state,
The control signal bus 104 for the memory 12 is set to the write state, and the address from the CPU 10 is latched by the latch circuit 16.
Then, the write data is latched in the latch circuit 15. Then, either the write sequence to the memory 12 is driven or a simple write cycle is activated to write the data to the designated address of the memory 12.

【0024】また、必要に応じて、ビジー信号102を
アクティブにしてCPU10を待たせる。また、図1の
ようにラッチ回路16を含む構成の場合には、ビジー信
号102をそのままにして、CPU10を解放するよう
な操作を行っても問題はないが、その代わりメモリ12
に対して次のデータアクセスが発生したときに、まだ前
の処理が終わっていないときにはビジー信号102をア
クティブにして、CPU10をウエイトさせるような回
路構成が必要となる。
If necessary, the busy signal 102 is activated and the CPU 10 is made to wait. Further, in the case of the configuration including the latch circuit 16 as shown in FIG. 1, there is no problem even if the busy signal 102 is left as it is and the operation for releasing the CPU 10 is performed, but instead, the memory 12 is used.
On the other hand, when the next data access occurs, when the previous processing is not yet finished, the busy signal 102 is activated and the CPU 10 is waited.

【0025】尚、メモリ12の書込むべきアドレスから
読み出したワードの内容が非消去状態の場合には、以下
の処理が必要となる。
When the content of the word read from the address to be written in the memory 12 is in the non-erased state, the following processing is required.

【0026】(a)その書込みアドレスに該当ブロック
(block n)と、予備用領域の1つのブロック(block m)を
入れ替える。
(A) Block corresponding to the write address
(block n) and one block (block m) in the spare area are exchanged.

【0027】(b)その該当ブロック(block n)のデー
タを予備領域(block m)に複写する。但し、その予備領
域の書き込みアドレスに対応する領域には、該当ブロッ
ク(block n)のデータの代わりに書き込みが要求されて
いるデータを格納する。即ち、該当ブロックの書き込み
アドレスに対応するアドレスに書き込むべきデータが記
憶され、そのブロックのそれ以外のアドレスは、元のブ
ロック(block n)のデータのままである。
(B) The data of the corresponding block (block n) is copied to the spare area (block m). However, in the area corresponding to the write address of the spare area, the data requested to be written is stored instead of the data of the corresponding block (block n). That is, the data to be written is stored at the address corresponding to the write address of the block, and the other addresses of the block remain the data of the original block (block n).

【0028】上述の(a)と(b)はどちらを先に実行
してもかまわない。このような処理は、ソフトウェア、
ハードウェアのいずれにおいても実現可能であるが、本
実施例ではハードウェアにおける構成例を示す。この動
作条件としては、メモリ12内に一括書き込み用のバッ
ファが存在しないので、RAM14を必要とする構成で
示している。
Either of the above (a) and (b) may be executed first. Such processing is performed by software,
Although it can be realized by any hardware, this embodiment shows a configuration example in hardware. As the operation condition, since the buffer for batch writing does not exist in the memory 12, the RAM 14 is shown as being necessary.

【0029】メモリ12の該当アドレスより読み出した
データが非消去状態の時に、書込み制御回路13のシー
ケンサーが起動し、 (1)CPU10に対してHOLD(ホールド)信号1
05をアクティブにして、CPU10の各種出力信号を
ハイインピーダンス状態にし、書込み制御回路13が、
これらバスの占有権を確保する。 (2)DMA転送を起動して、メモリ12の該当ブロッ
ク(block n)のデータをRAM14に転写する。 (3)ラッチ回路15にラッチされている、CPU10
により書込みが指示された書込みデータをRAM14の
該当アドレスに転写する。 (4)メモリマネージメントユニット(MMU)11の
アドレステーブルが格納されているI/Oレジスタを順
次検索し、該当ブロック(block n)を指示しているレジ
スタ(Rn)をサーチする。 (5)MMU11の上記レジスタ(Rn)と予備領域を
指しているレジスタ(Rm)の内容を入れ替える。この
操作で該当ブロック(block n)と予備領域(block m:こ
のブロックは消去済み)とが入れ替わる(block n→bloc
k m, block m→block n)。 (6)該当ブロック(block n)のアドレス、つまり元の
予備領域に相当するブロックにRAM14の内容(書き
込みデータが書込まれたブロックデータ)を複写する。 (7)予備領域に入れ替わった元の該当ブロック(block
m)を消去する。これと同時に、データバス103、ア
ドレスバス100、制御信号バス104を解放する。
When the data read from the corresponding address of the memory 12 is in the non-erased state, the sequencer of the write control circuit 13 is activated, and (1) the HOLD (hold) signal 1 is sent to the CPU 10.
05 is activated to put various output signals of the CPU 10 into a high impedance state, and the write control circuit 13
Secure ownership of these buses. (2) The DMA transfer is activated to transfer the data of the corresponding block (block n) of the memory 12 to the RAM 14. (3) The CPU 10 latched by the latch circuit 15
The write data instructed to be written by is transferred to the corresponding address of the RAM 14. (4) The I / O registers in which the address table of the memory management unit (MMU) 11 is stored are sequentially searched, and the register (Rn) indicating the corresponding block (block n) is searched. (5) The contents of the register (Rn) of the MMU 11 and the register (Rm) pointing to the spare area are exchanged. This operation swaps the block (block n) with the spare area (block m: this block has been erased) (block n → bloc
km, block m → block n). (6) The contents of the RAM 14 (block data in which the write data is written) are copied to the address of the corresponding block (block n), that is, the block corresponding to the original spare area. (7) Original applicable block (block
Erase m). At the same time, the data bus 103, the address bus 100, and the control signal bus 104 are released.

【0030】図3は本実施例のメモリアクセス回路の書
き込み制御回路13の動作を説明するフローチャート
で、この処理はCPU10がメモリ12へのデータ書込
み要求を出力することにより開始される。
FIG. 3 is a flow chart for explaining the operation of the write control circuit 13 of the memory access circuit of this embodiment. This processing is started by the CPU 10 outputting a data write request to the memory 12.

【0031】CPU10よりのデータ書き込み要求を検
知すると、まずステップS1で、その書き込みが要求さ
れたメモリアドレスのデータを読み出して記憶する。次
にステップS2で、双方向トライステートバッファ17
の出力をハイインピーダンスにして、データバス103
上におけるCPU10よりの書き込みデータとメモリ1
2より読み出されるデータとの衝突を防止する。次にス
テップS3に進み、ステップS1で読み出したデータに
基づいて、そのアドレスが消去済みであるか否かを判断
する。消去済みであればステップS11に進み、メモリ
12のその指示されたアドレスにCPU10より出力さ
れる書込みデータを書込む。
When a data write request from the CPU 10 is detected, first, in step S1, the data at the memory address requested to be written is read and stored. Next, in step S2, the bidirectional tri-state buffer 17
Of the data bus 103
Write data from the CPU 10 and the memory 1 above
2 to prevent the collision with the data read. Next, in step S3, it is determined whether the address has been erased based on the data read in step S1. If it has been erased, the process proceeds to step S11, and the write data output from the CPU 10 is written to the designated address of the memory 12.

【0032】一方、ステップS3で、そのアドレスが消
去済みでない時はステップS4に進み、ホールド信号1
05を出力してCPU10の動作を停止させ、ステップ
S5で、指定された書き込みアドレスに対応するメモリ
12のブロックデータをRAM14に複写する。次にス
テップS6に進み、RAM14のブロックデータの該当
アドレスに、CPU10より指示された書き込みデータ
を書込む。次にステップS7に進み、MMU11のレジ
スタの値を入れ替えるとともに、メモリ12内で、RA
M14に転送されたブロックと予備領域のブロックとを
入れ替える。そしてステップS8で、RAM14のブロ
ックデータをメモリ12の元のブロックに複写する。次
にステップS9に進み、ステップS7で入れ替えられた
メモリ12の予備領域のブロックを消去する。そして最
後にホールド信号105をオフにして、CPU10を動
作可能な状態にするとともに、双方向トライステートバ
ッファ17をイネーブルにする。
On the other hand, if the address is not erased in step S3, the process proceeds to step S4 and the hold signal 1
05 is output to stop the operation of the CPU 10, and the block data of the memory 12 corresponding to the designated write address is copied to the RAM 14 in step S5. Next, in step S6, the write data instructed by the CPU 10 is written in the corresponding address of the block data in the RAM 14. Next, in step S7, the register values of the MMU 11 are exchanged, and RA
The block transferred to M14 and the block in the spare area are exchanged. Then, in step S8, the block data in the RAM 14 is copied to the original block in the memory 12. Next, in step S9, the blocks in the spare area of the memory 12 replaced in step S7 are erased. Finally, the hold signal 105 is turned off to make the CPU 10 operable and the bidirectional tristate buffer 17 is enabled.

【0033】以上説明したように第1実施例によれば、
CPUによる負担を少なくしてメモリ12へのデータア
クセスを高速にできる。
As described above, according to the first embodiment,
It is possible to reduce the load on the CPU and speed up data access to the memory 12.

【0034】また第1実施例によれば、メモリマネージ
メントユニット(MMU)11を使用し、ブロック消去
をバックグラウンドで行うことによって、ソフトウェア
上、通常のメモリに対するアクセスと同様に、電気的に
消去可能な不揮発性メモリ12への書込み/読み出しを
を行なうことが可能になった。また、これにより、シス
テムパフォーマンスを維持できるシステムを構築するこ
とが可能となった。
According to the first embodiment, by using the memory management unit (MMU) 11 and performing block erasure in the background, it is possible to electrically erase in the same way as a normal memory access in software. Writing / reading to / from the non-volatile memory 12 can be performed. Moreover, this has made it possible to construct a system that can maintain system performance.

【0035】[第2実施例]前述の第1実施例に示した
ように、本実施例における、書き込み該当アドレスが非
消去状態であり、メモリにおけるブロックの入れ替えと
複写はハードウェアのみでも実行できるが、書込み制御
回路13の回路構成がかなり複雑なものとなる。
[Second Embodiment] As shown in the first embodiment described above, in the present embodiment, the corresponding write address is in the non-erased state, and block replacement and copying in the memory can be executed only by hardware. However, the circuit configuration of the write control circuit 13 becomes quite complicated.

【0036】そこで、第2実施例において、この回路の
一部をソフトウェアによって実現することによって、書
込み制御回路13の構成を簡単にし、かつ各回路よりの
制御信号の調停と、書き込みシーケンスを制御する回路
を備えた構成の例で説明する。尚、この第2実施例で
は、書き込み寿命が発生したメモリブロックの排除機能
についても説明する。
Therefore, in the second embodiment, by implementing a part of this circuit by software, the configuration of the write control circuit 13 is simplified, and the arbitration of the control signal from each circuit and the write sequence are controlled. An example of a configuration including a circuit will be described. In the second embodiment, the function of eliminating the memory block in which the write life has occurred will be described.

【0037】メモリマネージメントユニット(MMU)
11においては、通常、システム使用領域におかれてい
るブロックのアドレス情報は、単にそのシステム使用領
域アドレスのいずれか、それぞれ異なった値が格納され
ている。予備領域用のブロックのアドレス情報は、シス
テムでは使用されない値が格納される。その値はそれぞ
れ異なった値でも実現可能であるが、全て同じ値である
場合、ハードウェア及びソフトウェアの検出が楽にな
る。また、寿命がきて使用不可能となった領域との区別
を付加的なハードウェア無しに行うためにも、図4に示
すように、一定値を指す構成の方が単純となる。以下に
その実施例を示す。
Memory management unit (MMU)
In 11, the address information of the block normally placed in the system use area simply stores one of the system use area addresses, which is a different value. A value not used in the system is stored as the address information of the block for the spare area. The values can be realized by different values, but if they are all the same value, detection of hardware and software becomes easy. Further, in order to distinguish from an area which has become unusable due to the end of its life without additional hardware, the configuration indicating a constant value is simpler as shown in FIG. The example is shown below.

【0038】図4は、本発明の第2実施例のメモリアク
セス回路の構成を示すブロック図で前述の図1と共通す
る部分は同じ番号で示し、それらの説明を省略する。但
し、メモリ書込み制御回路13aの構成は前述の第1実
施例より単純となる。また、前述のRAM14に該当す
る領域は、CPU10のRAM120として設けられる
ので必要ない。また、ラッチ回路15は単純なラッチで
はなく、保持している内容を双方向に出力することがで
きるレジスタであり、書込み制御回路13aの制御に基
づいてデータを単純に通過させるか、その代わりに、ラ
ッチ回路15にラッチした情報を出力するかを選択でき
る。またCPU10は、アドレスバス100に出力され
ているアドレス情報の値をI/Oポート18を介して読
み込むことができる。
FIG. 4 is a block diagram showing the structure of a memory access circuit according to the second embodiment of the present invention. The parts common to those in FIG. 1 are designated by the same reference numerals, and their description will be omitted. However, the configuration of the memory write control circuit 13a is simpler than that of the first embodiment described above. The area corresponding to the RAM 14 described above is not necessary because it is provided as the RAM 120 of the CPU 10. Further, the latch circuit 15 is not a simple latch but a register capable of bidirectionally outputting the contents held therein. The latch circuit 15 simply allows data to pass under the control of the write control circuit 13a, or instead of that. , It is possible to select whether to output the latched information to the latch circuit 15. Further, the CPU 10 can read the value of the address information output to the address bus 100 via the I / O port 18.

【0039】予備領域とされているメモリブロックを管
理するメモリマネージメントユニットMMU11のアド
レスレジスタには、特定値“N1”が格納されている。
この値は、本実施例のメモリアクセス回路を含むシステ
ムにおいて、使用されていないアドレス値である。
A specific value "N1" is stored in the address register of the memory management unit MMU11 which manages the memory block which is the spare area.
This value is an address value that is not used in the system including the memory access circuit of this embodiment.

【0040】メモリ12から読み出した書き込みアドレ
スに該当する番地のワードが非消去状態の場合には、書
込み制御回路13aは、CPU10に対して割り込み信
号106を発生させる。これによりCPU10に割込み
が発生され、その割り込み処理ルーチンにおいて、CP
U10は (1)I/Oポート18の情報を読み込む。 (2)I/Oポート18より入力した情報により、書き
込み対象となったメモリ12の該当ブロック(block n)
の論理アドレスを算出する。また、MMU11における
該当ブロック(block n)のアドレスレジスタ(Rn)を検索
する。 (3)該当ブロック(block n)の記憶内容を、CPU1
0のRAM120に複写する。この際、書込み制御回路
13aは、読み出しサイクルのアドレス情報を監視し、
アドレス情報がラッチ回路16にラッチされているアド
レスと一致した時には、メモリ12の読み出し値の代わ
りに、ラッチ回路15に保存されている書き込み値を出
力する。 (4)書込み制御回路13aは該当ブロック(block n)
に対して、一括消去処理を行う。 (5)メモリマネージメントユニットMMU11内のア
ドレスレジスタを検索し、そのレジスタの値が“N1”
のものを探し出す。探し出せないときには、システムエ
ラーとなる。 (6)(5)で検索したアドレスレジスタと、(2)で
検索したアドレスレジスタ(Rn)の内容を入れ替える
(予備領域との入れ替え)。 (7)RAM120に複写した該当ブロック(block n)
の記憶内容を、メモリ12の該当ブロックの論理アドレ
ス(ここには予備領域のブロック値が複写されている)
に書き戻す。 (8)割り込みルーチンを終え、通常処理未戻る。
When the word at the address corresponding to the write address read from the memory 12 is in the non-erased state, the write control circuit 13a causes the CPU 10 to generate the interrupt signal 106. This causes an interrupt to the CPU 10, and in the interrupt processing routine, the CP
The U10 (1) reads the information of the I / O port 18. (2) According to the information input from the I / O port 18, the corresponding block (block n) of the memory 12 to be written
Calculate the logical address of. Also, the address register (Rn) of the corresponding block (block n) in the MMU 11 is searched. (3) The stored contents of the corresponding block (block n) are stored in the CPU 1
0 is copied to the RAM 120. At this time, the write control circuit 13a monitors the address information of the read cycle,
When the address information matches the address latched in the latch circuit 16, the write value stored in the latch circuit 15 is output instead of the read value in the memory 12. (4) The write control circuit 13a is the block (block n)
Then, the batch erasing process is performed. (5) The address register in the memory management unit MMU11 is searched and the value of that register is "N1".
Find one. If you can't find it, you'll get a system error. (6) The contents of the address register retrieved in (5) and the contents of the address register (Rn) retrieved in (2) are exchanged (replacement with the spare area). (7) Corresponding block (block n) copied to RAM 120
Is stored as the logical address of the corresponding block in the memory 12 (the block value of the spare area is copied here).
Write back to. (8) The interrupt routine is completed and normal processing is not returned.

【0041】以上の処理を行う。The above processing is performed.

【0042】この第2実施例は、前述の第1実施例と比
較して、書込み制御回路13aは、書き込みシーケンス
作成機構と、ブロック消去の実施機構と、書き込みアド
レスの一致検出機構程度で済むため、データ転送のため
のバス信号生成等が不要になり、より単純な構成とな
る。
In the second embodiment, compared with the first embodiment described above, the write control circuit 13a requires only a write sequence creating mechanism, a block erasing executing mechanism, and a write address coincidence detecting mechanism. , A bus signal generation for data transfer becomes unnecessary, and the configuration becomes simpler.

【0043】また前述の(7)における書き込み処理
は、常に消去セルへの書き込みになるので、このシーケ
ンスの多重コールは発生しない。また、ラッチ回路15
にラッチされていた書き込み値は、既に(3)において
RAM上に保存されているので、通常の書き込みシーケ
ンスで、ラッチ回路15の内容が変更されても問題な
い。
Further, since the write processing in the above (7) is always a write to the erased cell, multiple calls in this sequence do not occur. In addition, the latch circuit 15
Since the write value latched in 1 is already stored in the RAM in (3), there is no problem even if the content of the latch circuit 15 is changed in the normal write sequence.

【0044】一般的に、電気的消去可能な不揮発性素子
には書き込み寿命が存在するため、やがて書き込みが不
可能になる。このため、全ての各書き込みシーケンスに
おいて書込み終了後に、その書き込みデータを読み出
し、書き込み値と一致しているかを、ラッチ回路15の
内容と比較して判断する必要がある。そして、比較結果
が異なっている場合には、書込み制御回路13aは、C
PU10に対して不良領域の代替要求を割り込みで知ら
せる。
Generally, an electrically erasable non-volatile element has a writing life, and eventually writing becomes impossible. For this reason, it is necessary to read the write data after completion of writing in all the write sequences and determine whether the write data matches the write value by comparing with the content of the latch circuit 15. If the comparison result is different, the write control circuit 13a outputs C
The PU 10 is notified of a defective area replacement request by an interrupt.

【0045】この場合においても、CPU10は(1)
〜(8)とほぼ同等の処理を行う。前述の第1実施例と
大きく異なっている点は、(6)において、処理は以下
のように変わる。
Even in this case, the CPU 10 (1)
Processes substantially equivalent to (8) are performed. The point that is largely different from the first embodiment described above is that the processing in (6) is changed as follows.

【0046】(6’)レジスタの値が“N1”であった
アドレスレジスタには、不良領域ブロックを示している
アドレスレジスタの内容を書き込み、不良領域ブロック
を示しているアドレスレジスタには、既定値“N2”を
代入することによって使用不可能であることを示す。
(6 ') The value of the register is "N1", the contents of the address register indicating the defective area block are written to the address register, and the address register indicating the defective area block is set to the predetermined value. By substituting "N2", it indicates that it cannot be used.

【0047】また、不良領域ブロックに対してブロック
消去は行わない。
Further, block erase is not performed on the defective area block.

【0048】図5はこの第2実施例のメモリアクセス回
路のCPU10による割込み処理を示すフローチャート
で、この処理を実行する制御プログラムはROM121
に記憶されている。
FIG. 5 is a flow chart showing the interrupt processing by the CPU 10 of the memory access circuit of the second embodiment, and the control program for executing this processing is the ROM 121.
Is stored in

【0049】まずステップS21で、I/Oポート18
を介して、ラッチ回路16にラッチされているアドレス
を入力する。次にステップS22に進み、そのアドレス
に対応するメモリ12の論理アドレスを算出する。そし
てステップS23に進み、その論値アドレスに対応する
ブロック(block n)のアドレスに該当するMMU11の
レジスタ(Rn)を検索する。ステップS24では、そ
のブロック(block n)のデータをRAM120に複写
し、その該当アドレスに書込みデータを書込む。そして
ステップS25に進み、そのRAM120に転送した、
メモリ12の該当するブロックを消去する。
First, in step S21, the I / O port 18
The address latched in the latch circuit 16 is input via. Next, in step S22, the logical address of the memory 12 corresponding to the address is calculated. Then, in step S23, the register (Rn) of the MMU 11 corresponding to the address of the block (block n) corresponding to the logical address is searched. In step S24, the data of the block (block n) is copied to the RAM 120, and the write data is written in the corresponding address. Then, in step S25, the data is transferred to the RAM 120,
The corresponding block of the memory 12 is erased.

【0050】次にステップS26に進み、メモリ12に
予備領域が存在するか否かを調べ、存在しない時はステ
ップS29に進み、エラーとして処理する。一方、ステ
ップS26で、予備領域が損愛する時はステップS27
に進み、MMU11のアドレスレジスタ(Rn)を予備
領域のアドレスレジスタと入れ替えるとともに、その予
備領域の内容を該当ブロックにコピーする。そしてステ
ップS28に進み、RAM120のブロックデータをメ
モリ12のブロックに転写して処理を終了する。
Next, in step S26, it is checked whether or not a spare area exists in the memory 12, and if there is no spare area, the process advances to step S29 to process as an error. On the other hand, when the spare area is damaged in step S26, step S27
Then, the address register (Rn) of the MMU 11 is replaced with the address register of the spare area, and the contents of the spare area are copied to the corresponding block. Then, the process proceeds to step S28, the block data of the RAM 120 is transferred to the block of the memory 12, and the process ends.

【0051】以上説明したように、このような電気的に
書き換え可能な不揮発性メモリ素子においては、読み出
し速度はROM等と同等のスピードでアクセス可能であ
るが、データを書き込む場合には、書込みを行うアドレ
スにに該当する書き込みブロックを消去状態にした後、
書き込みを行なわねばならない。また、このようなメモ
リ素子では、任意の記憶セル単位で消去することができ
ず、小ブロック単位あるいは素子全域を消去してから書
き込みを行う必要があるので、同ブロック内の他セルの
情報を退避保存する機構が必要となる。従って、本実施
例の書き込み制御回路により、演算素子(CPU)への
書き込み情報と、電気的に書き換え可能な半導体メモリ
素子への制御信号の調停を行う。
As described above, in such an electrically rewritable non-volatile memory element, the reading speed can be accessed at the same speed as that of the ROM or the like, but when writing the data, the writing should be performed. After setting the write block corresponding to the address to be erased,
I have to write. Further, in such a memory device, it is not possible to erase in arbitrary memory cell units and it is necessary to erase after writing in small block units or the entire region of the device, so information of other cells in the same block can be written. A mechanism for saving and saving is required. Therefore, the write control circuit of this embodiment arbitrates the write information to the arithmetic element (CPU) and the control signal to the electrically rewritable semiconductor memory element.

【0052】また、メモリマネージメントユニット(M
MU)の扱う最小メモリブロックサイズは、必ずしも不
揮発性メモリの最小一括消去ブロックサイズと一致しな
いが、メモリマネージメントユニット(MMU)の扱う
最小サイズを一括消去ブロックサイズの2のK乗(K=
0,1,2,3,…)倍とすることによって、メモリの
管理を可能とする。この場合、無駄なブロックの消去が
発生するのを防止するために、更に制御回路を設けるこ
とによって、不揮発メモリの本当に必要なブロックのみ
消去するような構成にしても良い。
Further, the memory management unit (M
The minimum memory block size handled by the MU) does not necessarily match the minimum batch erase block size of the non-volatile memory, but the minimum size handled by the memory management unit (MMU) is 2K to the batch erase block size (K =
It is possible to manage the memory by multiplying by 0, 1, 2, 3 ,. In this case, in order to prevent wasteful erasure of blocks, a control circuit may be further provided to erase only blocks that are really necessary in the nonvolatile memory.

【0053】尚、本発明は、複数の機器から構成される
システムに適用しても、1つの機器から成る装置に適用
しても良い。また、本発明はシステム或は装置に本発明
を実施するプログラムを供給することによって達成され
る場合にも適用できる。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. The present invention can also be applied to the case where it is achieved by supplying a program for implementing the present invention to a system or an apparatus.

【0054】本発明によってフラッシュROMのような
電気的書き換えの可能な半導体素子に対するアクセスス
ピードが向上することによって、システムのパフォーマ
ンスを向上させることが可能となる。
According to the present invention, the system speed can be improved by improving the access speed to an electrically rewritable semiconductor device such as a flash ROM.

【0055】[0055]

【発明の効果】以上説明したように本発明によれば、C
PUの負担を減らして、メモリへのアクセス速度を高め
ることができるコンピュータ機器、メモリアクセス方法
及び回路を提供できる。
As described above, according to the present invention, C
It is possible to provide a computer device, a memory access method, and a circuit that can reduce the load on the PU and increase the access speed to the memory.

【0056】また本発明によれば、指定されたアドレス
を含むブロック単位でアクセスするメモリにおいて、そ
の書込みに要するCPUの負担を軽減できる効果があ
る。
Further, according to the present invention, in a memory accessed in block units including a specified address, there is an effect that the load of the CPU required for writing can be reduced.

【0057】[0057]

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

【図1】本発明の第1実施例のメモリアクセス回路の構
成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a memory access circuit according to a first embodiment of the present invention.

【図2】本実施例のメモリの物理的なアドレス空間と、
メモリマネージメントユニット内のアドレスレジスタ及
びその論理アドレスとの関係を示す図である。
FIG. 2 shows a physical address space of a memory according to this embodiment,
It is a figure which shows the address register in a memory management unit, and the relationship with the logical address.

【図3】本発明の第1実施例のメモリアクセス回路の書
き込み制御回路における処理を示すフローチャートであ
る。
FIG. 3 is a flowchart showing processing in a write control circuit of the memory access circuit according to the first embodiment of the present invention.

【図4】本発明の第2実施例のメモリアクセス回路の構
成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a memory access circuit according to a second embodiment of the present invention.

【図5】本発明の第2実施例のメモリアクセス回路の書
き込み制御回路における処理を示すフローチャートであ
る。
FIG. 5 is a flowchart showing processing in a write control circuit of the memory access circuit according to the second embodiment of the present invention.

【符号の説明】[Explanation of symbols]

10 演算素子(CPU) 11 メモリマネージメントユニット(MMU) 12 メモリ 13,13a 書き込み制御回路 14,120 RAM 15 ラッチ回路 16 アドレスラッチ回路 17 双方向トライステートバッファ 18 I/Oポート 100 アドレスバス 101 R/W信号 102 BUSY(ビジー)信号 103 データバス 104 制御信号バス 105 HOLD(ホールド)信号 106 割り込み信号 107 データバス 108 アドレスバス 109 コントロールバス 10 arithmetic element (CPU) 11 memory management unit (MMU) 12 memory 13, 13a write control circuit 14, 120 RAM 15 latch circuit 16 address latch circuit 17 bidirectional tri-state buffer 18 I / O port 100 address bus 101 R / W Signal 102 BUSY signal 103 Data bus 104 Control signal bus 105 HOLD signal 106 Interrupt signal 107 Data bus 108 Address bus 109 Control bus

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 書き込み回数に制限があるメモリにアク
セスするメモリアクセス回路であって、 前記メモリのアドレス空間を複数のブロックに分割し、
前記複数のブロックをデータ領域と予備領域とに分けて
管理する管理手段と、 前記メモリの所定アドレスへのデータ書き込み要求が発
生すると、前記所定アドレスを含むブロックの内容を退
避する退避手段と、 前記退避手段により退避されたブロックデータの前記所
定アドレスに該当するアドレスに書込みが要求されたデ
ータを書込む書き込み手段と、 前記メモリの前記所定アドレスを含むブロックと前記予
備領域のブロックとを入れ替える入れ替え手段と、 前記入れ替え手段により入れ替えられた前記メモリの前
記所定アドレスを含むブロックに前記書き込み手段によ
り書込まれたブロックデータを複写する複写手段と、 前記予備領域に転送されたブロックデータを消去する消
去手段と、を有することを特徴とするメモリアクセス回
路。
1. A memory access circuit for accessing a memory having a limited write count, wherein an address space of the memory is divided into a plurality of blocks.
Management means for managing the plurality of blocks by dividing them into a data area and a spare area; and a saving means for saving the contents of the block including the predetermined address when a data write request to the predetermined address of the memory occurs, A writing unit that writes data requested to be written to an address corresponding to the predetermined address of the block data saved by the saving unit, and a replacement unit that replaces a block including the predetermined address of the memory and a block of the spare area Copy means for copying the block data written by the writing means to a block containing the predetermined address of the memory exchanged by the exchange means, and erasing means for erasing the block data transferred to the spare area. And a memory access circuit having
【請求項2】 前記予備領域のブロックは、予め消去さ
れていることを特徴とする請求項1に記載のメモリアク
セス回路。
2. The memory access circuit according to claim 1, wherein the blocks in the spare area are erased in advance.
【請求項3】 前記管理手段は、前記複数のブロックの
それぞれに対応した複数のレジスタを有し、前記レジス
タのそれぞれは前記メモリにおける各ブロックのアドレ
スを記憶していることを特徴とする請求項1に記載のメ
モリアクセス回路。
3. The management means has a plurality of registers corresponding to each of the plurality of blocks, and each of the registers stores an address of each block in the memory. 1. The memory access circuit described in 1.
【請求項4】 前記メモリはEEPROMであることを
特徴とする請求項1乃至3のいずれか1項に記載のメモ
リアクセス回路。
4. The memory access circuit according to claim 1, wherein the memory is an EEPROM.
【請求項5】 書き込み回数に制限があるメモリにアク
セスするメモリアクセス方法であって、 前記メモリのアドレス空間を複数のブロックに分割し、
前記複数のブロックのをデータ領域と予備領域とに分け
て管理し、前記メモリの所定アドレスへのデータ書き込
み要求が発生すると、前記所定アドレスを含むブロック
の内容を退避する工程と、 その退避されたブロックデータの前記所定アドレスに該
当するアドレスに、書込みが要求されたデータを書込む
工程と、 前記メモリの前記所定アドレスを含むブロックと前記予
備領域のブロックとを入れ替える工程と、 その入れ替えられた前記メモリの前記所定アドレスを含
むブロックに前記書き込みが要求されたデータが書込ま
れたブロックデータを複写する工程と、 前記予備領域に転送されたブロックデータを消去する工
程と、を有することを特徴とするメモリアクセス方法。
5. A memory access method for accessing a memory having a limited number of times of writing, wherein the address space of the memory is divided into a plurality of blocks,
Managing the plurality of blocks separately into a data area and a spare area, and when a data write request to a predetermined address of the memory occurs, a step of saving the contents of the block including the predetermined address and the saved Writing data requested to be written to an address corresponding to the predetermined address of the block data; replacing a block including the predetermined address of the memory with a block of the spare area; A step of copying the block data in which the data requested to be written is written to a block including the predetermined address of the memory, and a step of erasing the block data transferred to the spare area. Memory access method.
【請求項6】 前記予備領域のブロックは、予め消去さ
れていることを特徴とする請求項5に記載のメモリアク
セス方法。
6. The memory access method according to claim 5, wherein the blocks of the spare area are erased in advance.
【請求項7】 前記メモリはEEPROMであることを
特徴とする請求項5乃至6のいずれか1項に記載のメモ
リアクセス方法。
7. The memory access method according to claim 5, wherein the memory is an EEPROM.
【請求項8】 書き込み回数に制限があるメモリを備え
たコンピュータ機器であって、 前記メモリのアドレス空間を複数のブロックに分割し、
前記複数のブロックをデータ領域と予備領域とに分けて
管理する管理手段と、 前記メモリの所定アドレスへのデータ書き込み要求を発
生する書込み要求発生手段と、 前記書込み要求発生手段による書込み要求に応じて、前
記メモリの前記所定アドレスを含むブロックの内容を退
避する退避手段と、 前記退避手段により退避されたブロックデータの前記所
定アドレスに該当するアドレスに書込みデータを書込む
書込み手段と、 前記メモリの前記所定アドレスを含むブロックと前記予
備領域のブロックとを入れ替える入れ替え手段と、 前記入れ替え手段により入れ替えられた前記メモリの前
記所定アドレスを含むブロックに前記書込み手段により
書込んだブロックデータを複写する複写手段と、 前記予備領域に転送されたブロックデータを消去する消
去手段と、を有することを特徴とするコンピュータ機
器。
8. A computer device comprising a memory having a limited number of times of writing, wherein an address space of the memory is divided into a plurality of blocks,
Managing means for managing the plurality of blocks separately into a data area and a spare area; a write request generating means for generating a data write request to a predetermined address of the memory; and a write request by the write request generating means A save means for saving the contents of a block of the memory including the predetermined address; a write means for writing write data at an address corresponding to the predetermined address of the block data saved by the save means; Replacement means for replacing a block containing a predetermined address with a block in the spare area, and copying means for copying the block data written by the writing means to the block containing the predetermined address of the memory replaced by the replacement means Erase the block data transferred to the spare area. Computer equipment, characterized in that it comprises a deleting means for, the.
【請求項9】 前記予備領域のブロックは、予め消去さ
れていることを特徴とする請求項8に記載のコンピュー
タ機器。
9. The computer device according to claim 8, wherein the block of the spare area is erased in advance.
【請求項10】 前記管理手段は、前記複数のブロック
のそれぞれに対応した複数のレジスタを有し、前記レジ
スタのそれぞれは前記メモリにおける各ブロックのアド
レスを記憶していることを特徴とする請求項8に記載の
コンピュータ機器。
10. The management means has a plurality of registers corresponding to each of the plurality of blocks, and each of the registers stores an address of each block in the memory. 8. The computer device according to item 8.
【請求項11】 前記メモリはEEPROMであること
を特徴とする請求項8乃至10のいずれか1項に記載の
コンピュータ機器
11. The computer device according to claim 8, wherein the memory is an EEPROM.
JP4706895A 1995-03-07 1995-03-07 Computer apparatus and method and circuit for its memory access Withdrawn JPH08241247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4706895A JPH08241247A (en) 1995-03-07 1995-03-07 Computer apparatus and method and circuit for its memory access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4706895A JPH08241247A (en) 1995-03-07 1995-03-07 Computer apparatus and method and circuit for its memory access

Publications (1)

Publication Number Publication Date
JPH08241247A true JPH08241247A (en) 1996-09-17

Family

ID=12764853

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4706895A Withdrawn JPH08241247A (en) 1995-03-07 1995-03-07 Computer apparatus and method and circuit for its memory access

Country Status (1)

Country Link
JP (1) JPH08241247A (en)

Similar Documents

Publication Publication Date Title
JP2582487B2 (en) External storage system using semiconductor memory and control method thereof
US6205521B1 (en) Inclusion map for accelerated cache flush
US5787493A (en) Control method and apparatus for direct execution of a program on an external apparatus using a randomly accessible and rewritable memory
US5724542A (en) Method of controlling disk control unit
US5553293A (en) Interprocessor interrupt processing system
JPH07146820A (en) Control method for flash memory and information processor using the same
JP2549034B2 (en) Storage device
JPS5876957A (en) Memory hierarchy control
JPH037978B2 (en)
JPH11134875A (en) Semiconductor memory and apparatus and method of controlling semiconductor memory
JPS6367686B2 (en)
JP3798049B2 (en) Data memory and operation method thereof
US8185687B2 (en) Semiconductor storage device and method of controlling semiconductor storage device
US20100169546A1 (en) Flash memory access circuit
US6507894B1 (en) Information processing apparatus and process
US5455925A (en) Data processing device for maintaining coherency of data stored in main memory, external cache memory and internal cache memory
EP0649095A2 (en) Nonvolatile storage with high speed data access
CN111742303A (en) Apparatus and method for accessing metadata when debugging a device
JPH08241247A (en) Computer apparatus and method and circuit for its memory access
JPH0210446A (en) Buffer storage device
GB2037466A (en) Computer with cache memory
JP3125634B2 (en) Electronic computer system
JP3217348B2 (en) Information processing system
JP3166659B2 (en) Storage device
JP3940701B2 (en) Disk array device and cache matching control method applied to the same

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020507