JP2009181422A - Data save unit and method - Google Patents

Data save unit and method Download PDF

Info

Publication number
JP2009181422A
JP2009181422A JP2008020954A JP2008020954A JP2009181422A JP 2009181422 A JP2009181422 A JP 2009181422A JP 2008020954 A JP2008020954 A JP 2008020954A JP 2008020954 A JP2008020954 A JP 2008020954A JP 2009181422 A JP2009181422 A JP 2009181422A
Authority
JP
Japan
Prior art keywords
data
address
write
cpu
read
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
JP2008020954A
Other languages
Japanese (ja)
Inventor
Yosuke Suzuki
陽介 鈴木
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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2008020954A priority Critical patent/JP2009181422A/en
Publication of JP2009181422A publication Critical patent/JP2009181422A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve data save processing appropriately even in an environment with a severe time restriction such as a response time. <P>SOLUTION: A data save unit 3, which is a digital circuit for processing a data read request or write request to be transmitted from a CPU 2 to a first memory area 4, reads data from a storage device inside the data save unit 3 or the first memory area 4 and transmits the data to the CPU 2, when the CPU 2 requires to read data. In addition, when the CPU 2 requires to write data, the data save unit 3 stores a write destination address and write data as a set of entries in the inner storage device once, reads the entries, one set at a time, while the CPU 2 requires neither to read nor to write data, saves the data from the first memory area 4 to a second memory area 5, and then writes new data in the first memory area 4. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、マイクロコンピュータやビジネス用途のコンピュータシステム等におけるデータの読み出し及び書き出し制御に関するものであり、コンピュータに障害が起きた場合に備えてデータを退避用メモリに退避させておくデータ退避装置及びデータ退避方法に関する。   The present invention relates to data read and write control in a microcomputer, a computer system for business use, etc., and relates to a data saving apparatus and data for saving data in a save memory in case a failure occurs in the computer It relates to the evacuation method.

宇宙線や電磁ノイズによりコンピュータで扱われるデータの一部が反転する、ソフトエラーという現象が知られている。このソフトエラーによる障害を防止するため、航空及び宇宙分野やビジネス用途のコンピュータでは、謝り訂正符号の利用やマイクロコンピュータの多重化など、さまざまなシステム回復の技術が利用されている。自動車制御の分野でも、ブレーキやステアリング、シフトなどの安全性に関わる制御装置の電子化が進んでおり、ソフトエラー対策も課題の一つと言われている。   A phenomenon known as soft error is known, in which part of data handled by a computer is inverted due to cosmic rays and electromagnetic noise. In order to prevent the failure caused by the soft error, various system recovery techniques such as the use of an apologize correction code and the multiplexing of a microcomputer are used in aerospace and business computers. Also in the field of automobile control, electronic control devices related to safety such as brakes, steering, and shifting are progressing, and countermeasures against soft errors are said to be one of the issues.

従来のソフトエラー対策の方法は、大きく、空間冗長に基づく方法と、時間冗長に基づく方法に分類できる。
空間冗長に基づく方法としては、ECCなど誤り訂正符号によりデータ化けを修正する方法や、パリティ符号などの誤り検出符号によりデータ化けを検出して訂正する方法、あるいは、システムの構成を多重化し、出力の多数決をとる方法などが知られている。
Conventional soft error countermeasure methods can be broadly classified into methods based on spatial redundancy and methods based on time redundancy.
As a method based on spatial redundancy, a method of correcting data corruption by an error correction code such as ECC, a method of detecting and correcting data corruption by an error detection code such as a parity code, or a system configuration multiplexed and output The method of taking the majority vote is known.

しかしながら、誤り訂正符号や誤り検出符号を使った方法は、データの一部が反転した場合にしか対応できないという問題がある。また、システムの構成を多重化した場合、消費電力や製造コストが増加するという問題がある。   However, the method using an error correction code or error detection code has a problem that it can cope only when a part of data is inverted. Further, when the system configuration is multiplexed, there is a problem that power consumption and manufacturing cost increase.

一方、時間冗長に基づく方法としては、ソフトエラーが一時的に発生する事象であることに着目し、処理を複数回行って比較し、正しい処理結果を得る方法も考案されている。この方式では、システムの構成を多重化した場合と比べ、低コストで実現可能というメリットがある。   On the other hand, as a method based on time redundancy, focusing on the fact that a soft error occurs temporarily, a method has been devised in which processing is performed a plurality of times and compared to obtain a correct processing result. This method has an advantage that it can be realized at a lower cost than the case where the system configuration is multiplexed.

しかしながら、この方法は、全ての処理を複数回実行するために処理の実行時間が長くなり、リアルタイム性が必要とされる制御には適さないという問題がある。
この問題に対しては、エラーが発生したときのみ、チェックポイントに戻って、エラーが発生した部分の処理をリトライする装置が考案されている。
However, this method has a problem that the execution time of the process becomes long because all the processes are executed a plurality of times, and is not suitable for the control that requires real-time property.
To solve this problem, an apparatus has been devised that returns to a checkpoint only when an error occurs and retries processing of the portion where the error has occurred.

例えば、特許文献1に記載された装置では、チェックポイントでCPUの汎用レジスタ、プログラムカウンタ、スタックポインタの値をメモリの特定の領域に格納するとともに、チェックポイント以降はCPUがメモリに書込みを行う前に、書込みを行うアドレスからデータの読出しを行い、退避用メモリ(トレースメモリ)に読出したデータを格納する。   For example, in the device described in Patent Document 1, the CPU general-purpose register, program counter, and stack pointer values are stored in specific areas of the memory at checkpoints, and after the checkpoint, the CPU does not write to the memory. Then, the data is read from the address to be written, and the read data is stored in the save memory (trace memory).

エラー発生時には、退避用メモリに格納されたデータ、およびチェックポイント時点でメモリに格納した、汎用レジスタ、プログラムカウンタ、スタックポインタの値をメモリおよびCPUに書き戻す。   When an error occurs, the data stored in the save memory and the values of the general-purpose register, program counter, and stack pointer stored in the memory at the time of the checkpoint are written back to the memory and the CPU.

ソフトエラーは一時的な現象であり、連続して発生する確率は非常に低い。そのため、書き戻した時点から処理を再開することにより、システムを回復することができる。
また、リトライを開始するポイント(チェックポイント)をあらかじめ決めている場合、チェックポイント時点のデータを回復できればよいので、あるアドレスのデータを一旦退避した後は、そのアドレスに対して書き込まれたデータを退避する必要はなくなる。
特開平9−81405号公報
Soft error is a temporary phenomenon, and the probability of continuous occurrence is very low. Therefore, the system can be recovered by resuming the processing from the time of writing back.
In addition, if the point (checkpoint) at which retry is started is determined in advance, it is only necessary to recover the data at the time of the checkpoint. Therefore, after the data at a certain address is temporarily saved, the data written to that address is There is no need to evacuate.
JP-A-9-81405

しかしながら、特許文献1の方法によりデータの退避を行う場合、CPUがメモリにデータの書き込みを行う前に、書き込み先のデータの読み出しを行うため、データの読み出しのためにバスサイクルが延長されてしまい、プログラム処理時間が増加してしまうという問題があった。   However, when the data is saved by the method of Patent Document 1, the CPU reads the write destination data before the CPU writes the data to the memory, so that the bus cycle is extended for reading the data. There is a problem that the program processing time increases.

このときのプログラム処理時間の増加量は、CPUがメモリにデータを書き込む回数に比例するため、実行するプログラムによっては処理時間の増加量を見積もるのが困難となる場合もある。   The amount of increase in program processing time at this time is proportional to the number of times the CPU writes data into the memory, and it may be difficult to estimate the amount of increase in processing time depending on the program to be executed.

これらの問題があるため、特許文献1に記載の方法は、応答時間など時間制約の厳しい組み込み系の制御に適用するのは難しい。
本発明はこれらの課題を解決するためになされたものであり、応答時間など時間制約の厳しい環境下であっても適切にデータの退避処理を実現することを目的とする。
Because of these problems, it is difficult to apply the method described in Patent Document 1 to embedded system control with severe time constraints such as response time.
The present invention has been made to solve these problems, and it is an object of the present invention to appropriately implement data saving processing even in an environment where time constraints such as response time are severe.

前記課題を解決するためになされた請求項1記載の発明は、アクセス対象となるメモリに対してCPUが各種信号を送信するためのアドレスバス、データバス及び制御バスに接続されたデータ退避装置であり、メモリのデータを退避用メモリに退避させるというものである。このデータ退避装置は、メモリ書き込み検出手段、待ち行列格納手段、CPUアクセス検出手段及び待ち行列処理手段を備えている。   In order to solve the above-mentioned problem, the invention according to claim 1 is a data saving device connected to an address bus, a data bus, and a control bus for the CPU to transmit various signals to a memory to be accessed. Yes, the memory data is saved in the save memory. The data saving apparatus includes a memory write detection unit, a queue storage unit, a CPU access detection unit, and a queue processing unit.

そして、このデータ退避装置では、メモリ書き込み検出手段が、CPUから制御バスを介して送信されるメモリに対する書き込み信号を検出し、待ち行列格納手段は、メモリ書き込み検出手段により書き込み信号が検出されると、CPUからアドレスバス及びデータバスを介して各々送信される書き込み先アドレス及び書き込みデータを1組のエントリとして待ち行列に格納する。   In this data evacuation device, the memory write detection means detects a write signal to the memory transmitted from the CPU via the control bus, and the queue storage means detects the write signal by the memory write detection means. The write destination address and write data respectively transmitted from the CPU via the address bus and data bus are stored in the queue as a set of entries.

一方、CPUアクセス検出手段は、アクセス対象となるメモリに対してCPUがデータの読み出し及び書き込みのいずれも行わない状態を検出し、待ち行列処理手段が、CPUアクセス検出手段によりCPUがデータの読み出し及び書き込みのいずれも行わない状態が検出されている間に、待ち行列からエントリを取り出し、そのエントリの書き込み先アドレスに格納されていたデータをメモリから退避用メモリに退避させる退避処理を行うとともに、その書き込み先アドレスにエントリの書き込みデータを格納する書き込み処理を行う。   On the other hand, the CPU access detection means detects a state in which the CPU does not read or write data to the memory to be accessed, and the queue processing means causes the CPU access detection means to cause the CPU to read and write data. While a state in which neither writing is performed is detected, an entry is taken out from the queue, and the save processing for saving the data stored in the write destination address of the entry from the memory to the save memory is performed. Write processing for storing the write data of the entry at the write destination address is performed.

このような請求項1記載の発明によれば、CPUがデータの書き込み信号を送信するタイミングでデータの退避処理が行われるのではなく、書き込み先アドレス及び書き込みデータは、いったん待ち行列のエントリとして格納される。そのため、データの書き込みに伴って退避処理を行うためにCPUがストールすることがなくなり、データの書き込み処理に伴う処理速度の低下を防止することができる。   According to the first aspect of the present invention, the data saving process is not performed at the timing when the CPU transmits the data write signal, but the write destination address and the write data are temporarily stored as queue entries. Is done. For this reason, the CPU does not stall because the save process is performed as data is written, and a reduction in processing speed due to the data write process can be prevented.

また、一般的な制御プログラムでは、全処理に占めるアクセスの比率が数%から30%程度となっており、少なくとも10サイクルのうち7サイクル程度はアクセスがなされていないことになる。そのため、その分のサイクルを待ち行列に格納されたエントリの退避処理及び書き込み処理にあてれば、CPUの空きサイクルを利用して退避処理及び書き込み処理が行われることになり、待ち行列の処理待ちによる処理時間の増加もほとんど生じないことになる。   In a general control program, the ratio of access to all processes is about several percent to 30%, and at least about 7 cycles out of 10 cycles are not accessed. Therefore, if the corresponding cycle is used for the save processing and write processing of the entry stored in the queue, the save processing and write processing are performed using the free CPU cycle, and the queue waits for processing. An increase in processing time hardly occurs.

したがって、本発明によれば、応答時間など時間制約の厳しい環境下であっても適切にデータの退避処理を実現することが可能になるという効果が得られる。
次に、請求項2記載の発明は、請求項1記載のデータ退避装置において、CPUアクセス検出手段が、制御バスを介して送信される読み出し信号及び書き込み信号の有無をそれぞれ監視し、それらの信号がいずれも送信されていない場合に、CPUがデータの読み出し及び書き込みのいずれも行わない状態として検出するというものである。
Therefore, according to the present invention, there is an effect that it is possible to appropriately realize data saving processing even in an environment where time constraints such as response time are severe.
Next, according to a second aspect of the present invention, in the data evacuation device according to the first aspect, the CPU access detecting means monitors the presence or absence of a read signal and a write signal transmitted via the control bus. When neither is transmitted, the CPU detects that neither reading nor writing of data is performed.

このような請求項2記載の発明によれば、制御バスを介して送信される読み出し信号及び書き込み信号を監視することで、データの読み出し及び書き込みのいずれも行わない状態を容易に検出できるという効果が得られる。これを実現する構成としては、例えば、両信号を入力とするNOR回路を用いることができる。   According to such a second aspect of the invention, it is possible to easily detect a state in which neither reading nor writing of data is performed by monitoring the reading signal and the writing signal transmitted via the control bus. Is obtained. As a configuration for realizing this, for example, a NOR circuit having both signals as inputs can be used.

一方、請求項3記載の発明は、請求項1記載のデータ退避装置において、CPUに対する命令信号が送信される命令バスにCPUアクセス検出手段が接続されており、命令バスを監視してCPUがデータの読み出し及び書き込みのいずれも行わない状態を検出する。   On the other hand, according to a third aspect of the present invention, in the data saving apparatus according to the first aspect, the CPU access detecting means is connected to an instruction bus to which an instruction signal for the CPU is transmitted. A state in which neither reading nor writing is performed is detected.

このような請求項3記載の発明によれば、CPUがメモリに対してアクセスをする前に、CPUがメモリへアクセスするかどうかを判定するため、メモリへのアクセスの開始直後から退避処理を実行することが可能となる。このことによりCPUがメモリへの読み出し及び書き出し信号を送信した後にCPUのアクセスを判定する場合と比べて、クロックの周波数を高くすることが可能となり、処理の高速動作を実現できるという効果を得ることができる。   According to the third aspect of the present invention, before the CPU accesses the memory, in order to determine whether or not the CPU accesses the memory, the save process is executed immediately after the access to the memory is started. It becomes possible to do. This makes it possible to increase the clock frequency and achieve a high-speed processing operation compared to the case where the CPU determines access to the CPU after transmitting read and write signals to the memory. Can do.

また、請求項4記載の発明は、請求項1乃至3のいずれかに記載のデータ退避装置において、CPUアクセス検出手段が、さらに、アクセス対象となるメモリに対してCPUがデータの読み出しを行うことを検出する。そして、待ち行列処理手段は、同一読み出しアドレス判定手段及び読み出しデータ送信手段を備えており、同一読み出しアドレス判定手段は、CPUアクセス検出手段によりデータの読み出しを行うことが検出されると、その読み出しに対応する読み出し先アドレスをアドレスバスから取り出し、その読み出し先アドレスと待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する。そして、読み出しデータ送信手段は、同一のアドレスが存在すると判定された場合にそのアドレスと組になっている書き込みデータを待ち行列から取り出し、その書き込みデータを読み出しデータとしてCPUに送信し、同一アドレスが存在しないと判定された場合は読み出し先アドレスに格納されたデータをメモリから取り出し、そのデータを読み出しデータとしてCPUに送信する。   According to a fourth aspect of the present invention, in the data evacuation device according to any one of the first to third aspects, the CPU access detecting means further causes the CPU to read data from the memory to be accessed. Is detected. The queue processing means includes the same read address determination means and read data transmission means. When the same read address determination means detects that the data is read by the CPU access detection means, The corresponding read destination address is extracted from the address bus, and the read destination address is compared with the write destination address stored in the queue to determine whether or not the same address exists. When it is determined that the same address exists, the read data transmission means takes out the write data paired with the address from the queue, transmits the write data to the CPU as read data, and the same address If it is determined that the data does not exist, the data stored at the read destination address is taken out from the memory, and the data is transmitted to the CPU as read data.

このような請求項4記載の発明によれば、データの読み出しについて、待ち行列に格納されたデータをチェックするため、退避処理がなされていないデータが待ち行列に残っていたとしても、データの読み出し処理が適切に実行されるという効果が得られる。   According to the invention as set forth in claim 4, since the data stored in the queue is checked for data reading, even if data that has not been saved remains in the queue, the data is read out. The effect that processing is appropriately executed is obtained.

特に、請求項5記載の発明は、請求項4に記載の発明において、待ち行列処理手段が、さらに同一アドレス選択手段を備えており、同一アドレス選択手段が、同一のアドレスが複数存在すると判定された場合はそれら同一のアドレスの内で待ち行列に最も新しく格納されたアドレスと組になっている書き込みデータをCPUに送信する読み出しデータとして選択する。   In particular, in the invention described in claim 5, it is determined in the invention described in claim 4 that the queue processing means further includes the same address selection means, and the same address selection means determines that a plurality of the same addresses exist. In such a case, the write data paired with the address most recently stored in the queue among the same addresses is selected as read data to be transmitted to the CPU.

このような請求項5記載の発明によれば、待ち行列に同一のアドレスで複数の書き込みデータが格納されていた場合でも最も新しいデータを読み出すことができるので、データの読み出しが適切にできるという効果が得られる。   According to the fifth aspect of the present invention, since the latest data can be read even when a plurality of write data is stored at the same address in the queue, it is possible to appropriately read the data. Is obtained.

一方、請求項6記載の発明は、請求項1乃至4のいずれかに記載のデータ退避装置において、CPUアクセス検出手段が、さらに、CPUがアクセス対象となるメモリに対してデータの書き込みを行うことを検出する。そして、待ち行列処理手段は、同一書き込みアドレス判定手段及びデータ書き換え手段を備えており、同一書き込みアドレス判定手段は、CPUアクセス検出手段によりデータの書き込みを行うことが検出されると、その書き込みに対応する書き込み先アドレス及び書き込みデータをアドレスバス及びデータバスから各々取り出し、書き込み先アドレスと待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する。さらに、データ書き換え手段は、同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータをデータバスから取り出した書き込みデータに書き換える。   On the other hand, according to a sixth aspect of the present invention, in the data evacuation device according to any one of the first to fourth aspects, the CPU access detecting means further writes data to a memory to be accessed by the CPU. Is detected. The queue processing means includes the same write address determination means and the data rewrite means. The same write address determination means responds to the writing when the CPU access detection means detects that the data is written. The write destination address and the write data to be performed are respectively taken out from the address bus and the data bus, and the write destination address and the write destination address stored in the queue are compared to determine whether or not the same address exists. Further, when it is determined that the same address exists, the data rewrite means rewrites the write data paired with the address to the write data taken out from the data bus.

このような請求項6記載の発明によれば、データの書き込みについて、待ち行列に格納されたデータをチェックして、同一のアドレスがあれば組となっているデータを書き換えるので、待ち行列には1つのアドレスに対して1個の書き込み要求しかない状態を実現できる。そのため、同一のアドレスに対する複数の書き込みの中から、最新の書き込みデータを選択する機能(請求項5記載の同一アドレス選択手段)が不要となり、小型の回路を構成できるという効果が得られる。   According to the sixth aspect of the present invention, when data is written, the data stored in the queue is checked, and if there is the same address, the paired data is rewritten. A state where there is only one write request for one address can be realized. This eliminates the need for the function of selecting the latest write data from a plurality of writes to the same address (the same address selection means as defined in claim 5), and provides an effect that a small circuit can be configured.

特に、請求項7記載の発明は、請求項6に記載の発明において、待ち行列格納手段が、各エントリに含まれる情報として、さらに、エントリの有効又は無効を示すエントリ有効タグを格納する。そして、データ書き換え手段が、同一書き込みアドレス判定手段により同一のアドレスが存在すると判定された場合は、書き込みデータを書き換える代わりに、待ち行列に格納された同一のアドレスと組になっているエントリ有効タグを無効とするとともに、アドレスバス及びデータバスから各々取り出した書き込み先アドレス及び書き込みデータを新たなエントリとして待ち行列に格納する。   In particular, according to a seventh aspect of the invention, in the sixth aspect of the invention, the queue storage means further stores an entry validity tag indicating validity or invalidity of the entry as information included in each entry. If the data rewrite means determines that the same address exists by the same write address determination means, instead of rewriting the write data, the entry valid tag paired with the same address stored in the queue Is invalidated, and the write destination address and the write data respectively fetched from the address bus and the data bus are stored in the queue as new entries.

このような請求項7記載の発明によれば、エントリ有効タグの操作でエントリを無効とすることができるので、待ち行列中のデータを書き換えるための機能を設ける必要がなくなり、高速動作する小型の回路を構成できるという効果が得られる。   According to the invention described in claim 7, since the entry can be invalidated by the operation of the entry valid tag, it is not necessary to provide a function for rewriting data in the queue, and the small size that operates at high speed is achieved. The effect that a circuit can be configured is obtained.

次に、請求項8記載の発明は、請求項1乃至7のいずれかに記載のデータ退避装置において、アクセス対象となるメモリの一部のメモリ領域について退避処理及び書き込み処理を行うものであることを前提に、CPUアクセス検出手段が、退避処理及び書き込み処理が行われる一部のメモリ領域に対してCPUがデータの読み出し及び書き込みのいずれも行わない状態を検出する。   Next, according to an eighth aspect of the present invention, in the data evacuation device according to any one of the first to seventh aspects, the evacuation process and the write process are performed for a part of the memory area of the memory to be accessed. Based on the above, the CPU access detection means detects a state in which the CPU does not read or write data in a part of the memory area where the saving process and the writing process are performed.

このような請求項8記載の発明によれば、CPUがアクセスする先をチェックすることにより、実際にはCPUがデータ退避装置で管理されたメモリにアクセスしないのに、アクセスがあると誤って検出されるのを防止できる。その結果、データ退避装置が退避処理を実行できる機会が増えるので、待ち行列がいっぱいになり退避処理が間に合わなくなる状況を起こりにくくすることができるという効果が得られる。   According to the invention described in claim 8, by checking the access destination by the CPU, it is erroneously detected that there is an access even though the CPU does not actually access the memory managed by the data saving device. Can be prevented. As a result, the chance that the data saving apparatus can execute the saving process increases, so that it is possible to make it difficult to cause a situation where the queue is full and the saving process is not in time.

また、請求項9記載の発明は、請求項1乃至8のいずれかに記載のデータ退避装置において、退避済みアドレスリスト格納手段及び同一退避アドレス判定手段を備える。そして、退避済みアドレスリスト格納手段は、退避用メモリに退避されたデータの書き込み先アドレスを退避済みアドレスリストとして格納し、同一退避アドレス判定手段は、新たに退避処理がされるデータの書き込み先アドレスと退避済みアドレスリストとを比較して同一のアドレスが存在するか否かを判定する。この場合、待ち行列処理手段は、同一退避アドレス判定手段により同一のアドレスが存在すると判定されると退避処理を行なわない。   According to a ninth aspect of the present invention, in the data evacuation apparatus according to any one of the first to eighth aspects, the evacuated address list storage unit and the same evacuated address determination unit are provided. The saved address list storage means stores the write destination address of the data saved in the save memory as a saved address list, and the same saved address determination means stores the write destination address of the data to be newly saved. And the saved address list are compared to determine whether or not the same address exists. In this case, the queue processing means does not perform the save processing when it is determined by the same save address determining means that the same address exists.

つまり、請求項9記載の発明は、退避済みのデータが多い場合にデータの探索に時間がかかるのを防止するものである。すなわち、データの探索について、例えば、一般的な探索手法である線形探索を用いた場合、退避済みデータの数をNとすると、平均でN/2回の比較処理が必要となる。   In other words, the invention described in claim 9 prevents time-consuming search for data when there is a large amount of saved data. That is, for example, when a linear search that is a general search method is used for data search, if the number of saved data is N, N / 2 comparison processes are required on average.

しかしながら、本件のデータ退避装置では一定のチェックポイントにおける退避データを再現できれば十分であり、あるチェックポイントの後にいったんデータが退避されれば、そのデータが格納されているアドレスについて、次のチェックポイントの前にさらにデータを退避する必要はないものである。   However, it is sufficient for the data evacuation device in this case to reproduce the evacuation data at a certain checkpoint. Once the data is evacuated after a certain checkpoint, the next checkpoint is stored at the address where the data is stored. There is no need to further save data before.

このような請求項9記載の発明によれば、既に退避されているデータを改めて退避する処理を省くことができるので、その分、待ち行列の処理を進めることができるという効果がある。   According to the ninth aspect of the invention, it is possible to omit the process of newly saving data that has already been saved, so that there is an effect that the process of the queue can be advanced accordingly.

次に、請求項10記載の発明は、アクセス対象となるメモリに対してCPUが送信する各種信号を、アドレスバス、データバス及び制御バスを介して取り出し、メモリのデータを退避用メモリに退避させるデータ退避方法である。このデータ退避方法は、メモリ書き込み検出ステップ、待ち行列格納ステップ、CPUアクセス検出ステップ及び待ち行列処理ステップを備え、メモリ書き込み検出ステップでCPUから制御バスを介して送信されるメモリに対する書き込み信号を検出すると、待ち行列格納ステップで、CPUからアドレスバス及びデータバスを介して各々送信される書き込み先アドレス及び書き込みデータを1組のエントリとして待ち行列に格納する。そして、CPUアクセス検出ステップでCPUがアクセス対象となるメモリに対してデータの読み出し及び書き込みのいずれも行わない状態を検出し、待ち行列処理ステップでは、CPUがデータの読み出し及び書き込みのいずれも行わない状態が検出されている間に、待ち行列からエントリを取り出し、エントリの書き込み先アドレスに格納されていたデータをメモリから退避用メモリに退避させる退避処理を行うとともに、その書き込み先アドレスにエントリの書き込みデータを格納する書き込み処理を行う。   Next, according to the tenth aspect of the present invention, various signals transmitted by the CPU to the memory to be accessed are taken out via the address bus, data bus, and control bus, and the memory data is saved in the save memory. This is a data saving method. This data saving method includes a memory write detection step, a queue storage step, a CPU access detection step, and a queue processing step, and when a write signal to the memory transmitted from the CPU via the control bus is detected in the memory write detection step. In the queue storage step, the write destination address and the write data respectively transmitted from the CPU via the address bus and the data bus are stored in the queue as a set of entries. In the CPU access detection step, a state in which the CPU does not read or write data to the memory to be accessed is detected, and in the queue processing step, the CPU does not read or write data. While the status is detected, the entry is taken out from the queue, and the data stored at the entry write destination address is saved from the memory to the save memory, and the entry is written to the write destination address. Write processing to store data.

このような請求項10記載のデータ退避方法によれば、請求項1に記載の発明と同様の効果を得ることができる。
請求項11記載の発明は、請求項10に記載のデータ退避方法において、CPUアクセス検出ステップでは、さらに、アクセス対象となるメモリに対してCPUがデータの読み出しを行うことを検出する。そして、待ち行列処理ステップは、同一読み出しアドレス判定ステップ及び読み出しデータ送信ステップを備えている。ここで、同一読み出しアドレス判定ステップでは、CPUアクセス検出ステップでデータの読み出しを行うことが検出されると、その読み出しに対応する読み出し先アドレスをアドレスバスから取り出し、その読み出し先アドレスと待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定し、読み出しデータ送信ステップでは、同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータを待ち行列から取り出し、その書き込みデータを読み出しデータとしてCPUに送信し、同一読み出しアドレス判定ステップで同一アドレスが存在しないと判定された場合は読み出し先アドレスに格納されたデータをメモリから取り出し、そのデータを読み出しデータとしてCPUに送信する。
According to such a data saving method of the tenth aspect, the same effect as that of the first aspect of the invention can be obtained.
According to an eleventh aspect of the present invention, in the data saving method according to the tenth aspect, in the CPU access detecting step, it is further detected that the CPU reads data from the memory to be accessed. The queue processing step includes an identical read address determination step and a read data transmission step. Here, in the same read address determination step, when it is detected that data is read in the CPU access detection step, the read destination address corresponding to the read is taken out from the address bus and stored in the read destination address and the queue. Is compared with the written write destination address to determine whether or not the same address exists. In the read data transmission step, if it is determined that the same address exists, the write data paired with that address Is read from the queue, the write data is sent to the CPU as read data, and if it is determined in the same read address determination step that the same address does not exist, the data stored in the read destination address is extracted from the memory and the data CPU as read data To send.

このような請求項11記載の発明によれば、請求項4に記載の発明と同様の効果を得ることができる。
また、請求項12記載の発明は、請求項11に記載のデータ退避方法において、読み出しデータ送信ステップでは、CPUアクセス検出ステップでデータの読み出しを行うことが検出されると、同一読み出しアドレス判定ステップの判定にかかわらず、予め読み出し先アドレスに格納されたデータをメモリから取り出しておく。
According to the eleventh aspect of the invention, the same effect as that of the fourth aspect of the invention can be obtained.
According to a twelfth aspect of the present invention, in the data saving method according to the eleventh aspect, in the read data transmission step, when it is detected that data is read in the CPU access detection step, the same read address determination step is performed. Regardless of the determination, data stored in advance at the read destination address is extracted from the memory.

このような請求項12記載の発明によれば、CPUアクセス検出ステップでデータの読み出しを行うことを検出すると、待ち行列に同一のアドレスがあるか否かにかかわらず、予め読み出しデータをメモリから取り出して準備しておくため、待ち行列に同一のアドレスがなかった場合でも迅速に読み出しデータをCPUに送信することが可能となり、読み出し処理の高速化が実現できるという効果がある。   According to such a twelfth aspect of the invention, when it is detected that the data is read in the CPU access detecting step, the read data is previously fetched from the memory regardless of whether or not the queue has the same address. Therefore, even when there is no identical address in the queue, read data can be sent to the CPU quickly, and the speed of the read process can be increased.

また、請求項13記載の発明は、請求項11又は12に記載のデータ退避方法において、待ち行列処理ステップが、さらに、同一アドレス選択ステップを備え、同一アドレス選択ステップでは、同一読み出しアドレス判定ステップで同一のアドレスが複数存在すると判定された場合はそれら同一のアドレスの内で待ち行列に最も新しく格納されたアドレスと組になっている書き込みデータをCPUに送信する読み出しデータとして選択する。   The invention according to claim 13 is the data saving method according to claim 11 or 12, wherein the queue processing step further comprises the same address selection step, and the same address selection step includes the same read address determination step. When it is determined that there are a plurality of the same addresses, write data paired with the address stored most recently in the queue among the same addresses is selected as read data to be transmitted to the CPU.

このような請求項13記載の発明によれば、請求項5に記載の発明と同様の効果が得られる。
一方、請求項14記載の発明は、請求項10乃至12のいずれかに記載のデータ退避方法において、CPUアクセス検出ステップで、さらに、アクセス対象となるメモリに対してCPUがデータの書き込みを行うことを検出する。そして、待ち行列処理ステップは、同一書き込みアドレス判定ステップ及びデータ書き換えステップを備える。同一書き込みアドレス判定ステップでは、CPUアクセス検出ステップでデータの書き込みを行うことが検出されると、その書き込みに対応する書き込み先アドレス及び書き込みデータをアドレスバス及びデータバスから各々取り出し、書き込み先アドレスと待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する。そして、データ書き換えステップでは、同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータをデータバスから取り出した書き込みデータに書き換える。
According to such a thirteenth aspect, the same effect as that of the fifth aspect can be obtained.
On the other hand, according to a fourteenth aspect of the present invention, in the data saving method according to any one of the tenth to twelfth aspects, in the CPU access detecting step, the CPU further writes data to the memory to be accessed. Is detected. The queue processing step includes an identical write address determination step and a data rewrite step. In the same write address determination step, when it is detected that data is written in the CPU access detection step, the write destination address and the write data corresponding to the write are taken out from the address bus and the data bus, respectively, and the write destination address and the wait are waited for. It is determined whether or not the same address exists by comparing with the write destination address stored in the matrix. In the data rewriting step, when it is determined that the same address exists, the write data paired with the address is rewritten to the write data taken out from the data bus.

このような請求項14記載の発明によれば、請求項6に記載の発明と同様の効果を得ることができる。
また、請求項15記載の発明は、請求項14に記載のデータ退避方法において、待ち行列格納ステップで、各エントリに含まれる情報として、さらに、エントリの有効又は無効を示すエントリ有効タグを格納する。そして、データ書き換えステップでは、同一書き込みアドレス判定ステップで同一のアドレスが存在すると判定された場合は、書き込みデータを書き換える代わりに、待ち行列に格納された同一のアドレスと組になっているエントリ有効タグを無効とするとともに、アドレスバス及びデータバスから各々取り出した書き込み先アドレス及び書き込みデータを新たなエントリとして待ち行列に格納する。
According to such an invention described in claim 14, the same effect as that of the invention described in claim 6 can be obtained.
Further, in the data saving method according to claim 14, in the data saving method according to claim 14, in the queue storing step, an entry valid tag indicating validity or invalidity of the entry is further stored as information included in each entry. . In the data rewrite step, if it is determined that the same address exists in the same write address determination step, the entry valid tag paired with the same address stored in the queue instead of rewriting the write data Is invalidated, and the write destination address and the write data respectively fetched from the address bus and the data bus are stored in the queue as new entries.

このような請求項15記載の発明によれば、請求項7に記載の発明と同一の効果を得ることができる。   According to such an invention described in claim 15, the same effect as that of the invention described in claim 7 can be obtained.

以下、本発明が適用された実施形態について、図面を用いて説明する。
[1 第1実施形態]
まず、第1実施形態のマイクロコンピュータ(以下、「マイコン」という。)について説明する。
[1−1 全体構成]
図1は、第1実施形態としてのマイコンの構成を示すブロック図である。図1に示すように、このマイコンは、ROM1、CPU2、データ退避装置3、第1のメモリ領域(MEM1)4及び第2のメモリ領域(MEM2)5を備える。
Embodiments to which the present invention is applied will be described below with reference to the drawings.
[1 First Embodiment]
First, the microcomputer according to the first embodiment (hereinafter referred to as “microcomputer”) will be described.
[1-1 Overall configuration]
FIG. 1 is a block diagram showing the configuration of the microcomputer as the first embodiment. As shown in FIG. 1, the microcomputer includes a ROM 1, a CPU 2, a data saving device 3, a first memory area (MEM 1) 4, and a second memory area (MEM 2) 5.

このマイコンにおいて、CPU2は、命令側アドレスバス6、命令側制御バス7及び命令側データバス8を介してROM1に接続されている。また、データ退避装置3は、データ側アドレスバス9、データ側制御バス10及びデータ側データバス11を介してCPU2に接続され、第1メモリ側アドレスバス12、第1メモリ側制御バス13及び第1メモリ側データバス14を介して第1のメモリ領域4に接続されている。さらに、このデータ退避装置3は、第2メモリ側アドレスバス15、第2メモリ側制御バス16及び第2メモリ側データバス17を介して第2のメモリ領域5に接続されている。   In this microcomputer, the CPU 2 is connected to the ROM 1 via an instruction side address bus 6, an instruction side control bus 7 and an instruction side data bus 8. The data saving device 3 is connected to the CPU 2 via the data side address bus 9, the data side control bus 10 and the data side data bus 11, and the first memory side address bus 12, the first memory side control bus 13 and the first side. 1 memory side data bus 14 is connected to the first memory area 4. Further, the data saving device 3 is connected to the second memory area 5 via the second memory side address bus 15, the second memory side control bus 16 and the second memory side data bus 17.

そして、このマイコンでは、CPU2からデータ側制御バス10を介してデータの読み出し要求及び書き込み要求等の制御信号が送られ、それら読み出し要求又は書き込み要求に対応するアドレス信号がデータ側アドレスバス9を介して送られる。また、読み出したデータ及び書き込むデータ等のデータ信号はデータ側データバス11を介して送られる。   In this microcomputer, control signals such as data read requests and write requests are sent from the CPU 2 via the data side control bus 10, and address signals corresponding to these read requests or write requests are sent via the data side address bus 9. Sent. Data signals such as read data and write data are sent via the data-side data bus 11.

また、データ退避装置3と第1のメモリ領域4及び第2のメモリ領域5と間のデータの送受信についても同様であり、それぞれ第1メモリ側制御バス13及び第2メモリ側制御バス16を介して、データの読み出し要求及び書き込み要求等の制御信号が送られ、第1メモリ側アドレスバス12及び第2メモリ側アドレスバス15を介してそれらの要求に対応するアドレス信号が送られる。そして、第1メモリ側データバス14及び第2メモリ側データバス17を介して読み出したデータ又は書き込むデータが送られる。   The same applies to transmission / reception of data between the data saving device 3 and the first memory area 4 and the second memory area 5, via the first memory side control bus 13 and the second memory side control bus 16, respectively. Then, control signals such as a data read request and a write request are sent, and address signals corresponding to these requests are sent via the first memory side address bus 12 and the second memory side address bus 15. Then, the read data or the write data is sent via the first memory side data bus 14 and the second memory side data bus 17.

ここで、データ退避装置3は、CPU2から第1のメモリ領域4に送られるデータの読み出し要求及び書き込み要求を処理するデジタル回路である。具体的には、CPU2からデータの読み出し要求があると、データ退避装置3は、当該データ退避装置3内部の記憶装置(後述する待ち行列格納回路19)又は第1のメモリ領域4から該当するデータの読み出しを行い、そのデータをCPU2に送る。また、CPU2からデータの書き込み要求があると、データ退避装置3は、内部の記憶装置(後述する待ち行列格納回路19)に書き込み先アドレス及び書き込みデータを1組のエントリとしていったん格納し、CPU2によるデータの読み出し及び書き込み要求のいずれも行われていない状態の間に、そのエントリを1組ずつ読み出して、第1のメモリ領域4から第2のメモリ領域5へデータを退避させた後、第1のメモリ領域4に新たなデータの書き込みを行う。
[1−2 内部構成]
図2は、データ退避装置3の内部構成を示すブロック図である。データ退避装置3は、メモリ書き込み要求検出回路18、待ち行列格納回路19、CPUアクセス検出回路20及び待ち行列処理回路21を備える。
Here, the data saving device 3 is a digital circuit that processes a read request and a write request of data sent from the CPU 2 to the first memory area 4. Specifically, when there is a data read request from the CPU 2, the data evacuation device 3 receives the corresponding data from the storage device (queue storage circuit 19 described later) or the first memory area 4 in the data evacuation device 3. Is read and the data is sent to the CPU 2. When the CPU 2 receives a data write request, the data saving device 3 temporarily stores the write destination address and the write data as a set of entries in an internal storage device (a queue storage circuit 19 described later). While neither data read nor write request is performed, the entries are read one by one, and after the data is saved from the first memory area 4 to the second memory area 5, the first New data is written in the memory area 4 of the memory.
[1-2 Internal configuration]
FIG. 2 is a block diagram showing an internal configuration of the data saving device 3. The data saving apparatus 3 includes a memory write request detection circuit 18, a queue storage circuit 19, a CPU access detection circuit 20, and a queue processing circuit 21.

メモリ書き込み要求検出回路18は、CPU2からデータ側制御バス10を介して送られるデータの書き込み要求の信号を検出し、待ち行列格納回路19に対して検出結果を出力するデジタル回路である。   The memory write request detection circuit 18 is a digital circuit that detects a data write request signal sent from the CPU 2 via the data-side control bus 10 and outputs a detection result to the queue storage circuit 19.

待ち行列格納回路19は、メモリ書き込み要求検出回路18からの出力を入力として、データ側アドレスバス9を介してCPU2から送られる書き込み先アドレス、及びデータ側データバス11を介してCPU2から送られる書き込み先データを1つの組(エントリ)として内部の記憶回路に待ち行列として格納し、待ち行列処理回路21の要求に応じて、待ち行列の内容を待ち行列処理回路21に出力するデジタル回路である。この待ち行列格納回路19は、待ち行列につき書き込みアドレス及び書き込みデータを1組のエントリとして、FIFO(First-In First-Out)形式で格納する。待ち行列格納回路19に格納される待ち行列のデータ構造は、図3に示すとおりであり、エントリ1から順にアドレスA及びデータDが1組ずつ格納される。   The queue storage circuit 19 receives the output from the memory write request detection circuit 18 as an input, the write destination address sent from the CPU 2 via the data side address bus 9, and the write sent from the CPU 2 via the data side data bus 11. This is a digital circuit that stores the previous data as a set (entry) as a queue in an internal storage circuit and outputs the contents of the queue to the queue processing circuit 21 in response to a request from the queue processing circuit 21. The queue storage circuit 19 stores a write address and write data for each queue as a set of entries in a FIFO (First-In First-Out) format. The data structure of the queue stored in the queue storage circuit 19 is as shown in FIG. 3, and one set of address A and data D is stored in order from entry 1.

CPUアクセス検出回路20は、データ側制御バス10を介してCPU2によりデータの読み出し要求又は書き込み要求が行われているか否かの状態を検出し、待ち行列処理回路21にその結果を出力するデジタル回路である。   The CPU access detection circuit 20 detects whether or not a data read request or write request is made by the CPU 2 via the data-side control bus 10 and outputs the result to the queue processing circuit 21 It is.

図4は、CPUアクセス検出回路20の入力に近い前半部分を示したデジタル回路図である。この回路は1個のNOR素子22を備え、データ側制御バス10の中からデータ読み出し信号及びデータ書き込み信号を入力とし、その演算結果が出力線23に出力される。このCPUアクセス検出回路20によれば、データの読み出し信号及び書き込み信号がいずれも送られていないサイクルにのみ真の値が出力されることになる。出力線23からの信号は、後述する図5に示す回路を通った後、待ち行列処理回路21に送られる。   FIG. 4 is a digital circuit diagram showing the first half portion close to the input of the CPU access detection circuit 20. This circuit includes one NOR element 22, receives a data read signal and a data write signal from the data side control bus 10, and outputs the calculation result to the output line 23. The CPU access detection circuit 20 outputs a true value only in a cycle in which neither a data read signal nor a write signal is sent. A signal from the output line 23 is sent to the queue processing circuit 21 after passing through a circuit shown in FIG.

図5は、CPUアクセス検出回路20の出力に近い後半部分を示したデジタル回路図である。この回路は、アドレスデコード回路24及びAND素子25を備える。
アドレスデコード回路24は、データ側アドレスバス9を入力として、CPU2から送られるアドレスがデータ退避装置3と接続された第1のメモリ領域4の範囲内にあるときにだけ、真の値をAND素子25に出力するように設計されたデジタル回路である。また、AND素子25は、図4で示した回路の出力線23及びアドレスデコード回路24からの出力を入力として、論理積をとり、その演算結果を待ち行列処理回路21に出力する。
FIG. 5 is a digital circuit diagram showing the second half portion close to the output of the CPU access detection circuit 20. This circuit includes an address decoding circuit 24 and an AND element 25.
The address decode circuit 24 inputs the true value only when the address sent from the CPU 2 is within the range of the first memory area 4 connected to the data saving device 3 with the data side address bus 9 as an input. 25 is a digital circuit designed to output to 25. The AND element 25 takes the outputs from the output line 23 and the address decode circuit 24 of the circuit shown in FIG. 4 as inputs and outputs a logical product to the queue processing circuit 21.

この図5に示した回路によれば、データ退避装置3による退避処理が行われる第1のメモリ領域4以外のアドレスに対してデータの読み出し及び書き込みがあったとしても、CPUアクセス検出回路20の出力結果としては、データの読み出し及び書き込みのいずれも行われていない状態が出力されることになる。   According to the circuit shown in FIG. 5, even if data is read from or written to an address other than the first memory area 4 where the saving process by the data saving device 3 is performed, the CPU access detection circuit 20 As an output result, a state in which neither reading nor writing of data is performed is output.

次に、待ち行列処理回路21は、CPUアクセス検出回路20からCPU2がアクセスを行っていない状態の信号を入力し、待ち行列格納回路19からエントリを1組ずつ取り出し、データの退避処理及び書き込み処理を行なう。またCPU2からの読み出し要求及び書き込み要求に応じてエントリのアドレスと比較し、待ち行列のデータの授受も行なう。CPU2からの要求に応じてデータを読み出した場合はデータ側データバス11を介して結果をCPU2に送る。またこの待ち行列処理回路21は、第1メモリ側アドレスバス12、第1メモリ側制御バス13及び第1メモリ側データバス14を介して第1のメモリ領域4に接続され、第2メモリ側アドレスバス15、第2メモリ側制御バス16及び第2メモリ側データバス17を介して第2のメモリ領域5に接続されている。   Next, the queue processing circuit 21 inputs a signal indicating that the CPU 2 is not accessing from the CPU access detection circuit 20, takes out one set of entries from the queue storage circuit 19, and saves and writes data. To do. In addition, in response to a read request and a write request from the CPU 2, it is compared with the address of the entry, and queue data is exchanged. When data is read in response to a request from the CPU 2, the result is sent to the CPU 2 via the data side data bus 11. The queue processing circuit 21 is connected to the first memory area 4 via the first memory side address bus 12, the first memory side control bus 13, and the first memory side data bus 14, and the second memory side address. It is connected to the second memory area 5 through the bus 15, the second memory side control bus 16 and the second memory side data bus 17.

図6は、待ち行列処理回路21の内部構成の一部を示すブロック図であり、CPU2からの読み出し要求に対する処理を実現するものである。この回路は、同一読み出しアドレス判定回路26、Nto1セレクタ27及び2to1セレクタ28から構成され、待ち行列格納回路19に接続されている。   FIG. 6 is a block diagram showing a part of the internal configuration of the queue processing circuit 21 and realizes processing for a read request from the CPU 2. This circuit is composed of the same read address determination circuit 26, an Nto1 selector 27, and a 2to1 selector 28, and is connected to the queue storage circuit 19.

同一読み出しアドレス判定回路26は、データ側アドレスバス9を介してCPU2から送られるアドレスと、待ち行列格納回路19に格納されている待ち行列のエントリのアドレスとを入力して比較し、その結果をNto1セレクタ27及び2to1セレクタ28に出力する。すなわち、この同一読み出しアドレス判定回路26は、CPU2から読み出し要求があったときに動作を開始し、CPU2からのアドレスと待ち行列のアドレスとを比較し、同一のアドレスがある場合は、Nto1セレクタ27にエントリ値を送り、2to1セレクタ28に待ち行列のデータをCPU2に対して送るように指示する選択信号を送る。また、同一のアドレスがない場合は、第1のメモリ領域4に格納されていたデータをCPU2に対して送るように指示する選択信号を送る。   The same read address determination circuit 26 inputs and compares the address sent from the CPU 2 via the data side address bus 9 and the address of the queue entry stored in the queue storage circuit 19 and compares the result. The data is output to the Nto1 selector 27 and the 2to1 selector 28. That is, the same read address determination circuit 26 starts its operation when a read request is received from the CPU 2, compares the address from the CPU 2 with the address of the queue, and if there is an identical address, the Nto1 selector 27 The entry value is sent to the 2 to 1 selector 28 and a selection signal is sent to instruct the CPU 2 to send the queue data to the CPU 2. If there is no identical address, a selection signal is sent to instruct the CPU 2 to send the data stored in the first memory area 4.

Nto1セレクタ27は、同一読み出しアドレス判定回路26から送られたエントリ値を入力し、そのエントリ値に対応するデータを待ち行列格納回路19に格納されている待ち行列から読み出し、その読み出したデータを2to1セレクタ28に出力する。   The Nto1 selector 27 inputs the entry value sent from the same read address determination circuit 26, reads data corresponding to the entry value from the queue stored in the queue storage circuit 19, and reads the read data to 2to1. Output to the selector 28.

2to1セレクタ28は、同一読み出しアドレス判定回路26から送られる選択信号を入力して、その選択信号に従い、第1のメモリ領域4から第1メモリ側データバス14を介して読み出したデータか、Nto1セレクタ27から送られたデータかのいずれかを選択して、CPU2に対して読み出しデータとしてデータ側データバス11を介して送る。   The 2to1 selector 28 receives a selection signal sent from the same read address determination circuit 26, and in accordance with the selection signal, the data read from the first memory area 4 via the first memory side data bus 14 or the Nto1 selector One of the data sent from 27 is selected and sent as read data to the CPU 2 via the data-side data bus 11.

図7は、同一読み出しアドレス判定回路26の内部構成を示すブロック図である。同一読み出しアドレス判定回路26は、N個のコンパレータ29及び1個の選択信号生成回路30を備え、N個のコンパレータ29は、データ側アドレスバス9及び待ち行列格納回路19に格納されている待ち行列のN個分のアドレスを入力とし、比較の結果を選択信号生成回路30に出力する比較回路である。   FIG. 7 is a block diagram showing an internal configuration of the same read address determination circuit 26. The same read address determination circuit 26 includes N comparators 29 and one selection signal generation circuit 30, and the N comparators 29 are queues stored in the data side address bus 9 and the queue storage circuit 19. The comparison circuit outputs the comparison result to the selection signal generation circuit 30.

選択信号生成回路30は、コンパレータ29からの出力を入力して、Nto1セレクタ27及び2to1セレクタ28に演算結果を出力するデジタル回路である。選択信号生成回路30により実現される真理値表は図8に示すとおりである。図8に示すとおり、選択信号生成回路30はプライオリティエンコーダとなっており、コンパレータ29の各出力は重み付きで扱われ、この例ではCt0-NのNの番号が小さいエントリを選択する信号を優先してNto1セレクタ27に出力する。また、2to1セレクタ28にEXIST信号として真の値を送る。   The selection signal generation circuit 30 is a digital circuit that receives an output from the comparator 29 and outputs a calculation result to the Nto1 selector 27 and the 2to1 selector 28. The truth table realized by the selection signal generation circuit 30 is as shown in FIG. As shown in FIG. 8, the selection signal generation circuit 30 is a priority encoder, and each output of the comparator 29 is handled with a weight. In this example, priority is given to a signal for selecting an entry having a small N number in Ct0-N. To the Nto1 selector 27. Also, a true value is sent to the 2to1 selector 28 as an EXIST signal.

2to1セレクタ28は、EXIST信号として真の値を受けた場合に、Nto1セレクタの出力値をCPUに出力し、真でない場合は第1メモリ側データバス14の値を出力する。なお、図8の真理値表はNが8の場合について図示したものである。   The 2to1 selector 28 outputs the output value of the Nto1 selector to the CPU when it receives a true value as the EXIST signal, and outputs the value of the first memory side data bus 14 when it is not true. Note that the truth table in FIG. 8 is illustrated when N is eight.

図9は、待ち行列処理回路21の内部構成の一部を示すブロック図であり、CPU2から書き込み要求があった場合に待ち行列格納回路19に格納されている待ち行列のデータの書き換え処理を実現するデジタル回路である。   FIG. 9 is a block diagram showing a part of the internal configuration of the queue processing circuit 21. When a write request is received from the CPU 2, the rewrite processing of the queue data stored in the queue storage circuit 19 is realized. It is a digital circuit.

CPU2から書き込み要求があった場合の処理を実現するデジタル回路については全体を示さないが、読み込み要求があった場合と同様、図6及び図7で示した比較回路を共通で用いることにより、書き込み先のアドレスと待ち行列のアドレスとが比較され、同一のアドレスが存在した場合は、該当するエントリに対して書き換えを要求するエントリ要求信号が送られる。   A digital circuit that realizes processing when a write request is received from the CPU 2 is not shown in its entirety. However, as in the case where a read request is issued, the comparison circuit shown in FIG. 6 and FIG. The previous address and the queue address are compared, and if the same address exists, an entry request signal for requesting rewriting is sent to the corresponding entry.

図9に示すとおり、書き換え処理を実現する回路は、N個のデータ書き換え回路31及びN個のOR素子32を備える。データ書き換え回路31は、図2には示さないデータ側データバス11を介してCPU2から書き込みデータを入力し、WE(Write Enable)端子に真の値が入力されたときに、待ち行列のデータを書き込みデータで書き換える信号を待ち行列格納回路19に出力するデジタル回路である。WE端子には、OR素子32から当該エントリの書き換えをすべき旨の信号が送られる。   As shown in FIG. 9, the circuit that implements the rewriting process includes N data rewriting circuits 31 and N OR elements 32. The data rewrite circuit 31 inputs write data from the CPU 2 via the data-side data bus 11 not shown in FIG. 2, and when the true value is input to the WE (Write Enable) terminal, the data in the queue is received. This is a digital circuit that outputs a signal to be rewritten with write data to the queue storage circuit 19. A signal indicating that the entry should be rewritten is sent from the OR element 32 to the WE terminal.

OR素子32は、CPUアクセス検出回路20から送られるデータ書き込み信号及び当該エントリを書き換える際に真の値となるエントリ書き換え信号を入力として論理和をとる。このエントリ書き換え信号は、CPU2からデータの書き込み要求について待ち行列格納回路19に格納されている待ち行列のエントリに同一のアドレスがあった場合に、該当するエントリに対応するOR素子32に対して送られる。またデータ書き込み信号は、待ち行列のエントリに同一のアドレスがなかった場合に待ち行列格納回路19に格納されている待ち行列の新たなエントリに対応するOR素子32に対して送られる。
[1−3 処理フロー]
次に第1実施形態の処理フローを説明する。
The OR element 32 takes a logical sum by inputting a data write signal sent from the CPU access detection circuit 20 and an entry rewrite signal that becomes a true value when rewriting the entry. This entry rewrite signal is sent to the OR element 32 corresponding to the corresponding entry when the same address exists in the queue entry stored in the queue storage circuit 19 for the data write request from the CPU 2. It is done. The data write signal is sent to the OR element 32 corresponding to the new entry in the queue stored in the queue storage circuit 19 when there is no identical address in the queue entry.
[1-3 Processing flow]
Next, the processing flow of the first embodiment will be described.

図10は、第1実施形態のデータ退避装置3により実行されるCPU2から読み出し要求があった場合の処理フローを示すフローチャートであり、これまでに説明してきた構成により実現される。CPU2から読み出し要求があった場合、次のステップで処理される。   FIG. 10 is a flowchart showing a processing flow when there is a read request from the CPU 2 executed by the data saving device 3 of the first embodiment, and is realized by the configuration described so far. When there is a read request from the CPU 2, it is processed in the next step.

まずS101で、CPU2から送られる読み出しアドレスと待ち行列格納回路19に格納されている待ち行列のエントリのアドレスとが同一読み出しアドレス判定回路26により比較される。S102で一致するエントリの有無により分岐の処理がされる。   First, in step S <b> 101, the read address sent from the CPU 2 and the address of the queue entry stored in the queue storage circuit 19 are compared by the same read address determination circuit 26. A branching process is performed depending on whether or not there is a matching entry in S102.

S102で一致するエントリがあった場合(YES)、次のS103で、Nto1セレクタ27により送られるそのエントリのデータが2to1セレクタ28により選択される。また、S102で一致するエントリがなかった場合(NO)、次のS104で第1のメモリ領域4からCPU2からの読み出しアドレスに該当するデータが2to1セレクタ28により選択される。   If there is a matching entry in S102 (YES), the data of that entry sent by the Nto1 selector 27 is selected by the 2to1 selector 28 in the next S103. If there is no matching entry in S102 (NO), data corresponding to the read address from the CPU 2 from the first memory area 4 is selected by the 2to1 selector 28 in the next S104.

最後のS105では、S103又はS104で選択したデータを読み出しデータとしてデータ側データバス11を介してCPU2に出力する。
図11は、第1実施形態のデータ退避装置3においてCPU2から書き込み要求があった場合の処理フローを示すフローチャートである。CPU2から書き込み要求があった場合、次のステップで処理される。
In the last S105, the data selected in S103 or S104 is output to the CPU 2 via the data-side data bus 11 as read data.
FIG. 11 is a flowchart illustrating a processing flow when the CPU 2 receives a write request in the data saving apparatus 3 according to the first embodiment. When there is a write request from the CPU 2, it is processed in the next step.

まずS201で、CPU2からの書き込みアドレスと待ち行列格納回路19に格納されている待ち行列のエントリのアドレスとが比較される。S202で一致するエントリの有無により分岐の処理がされる。なお、この比較回路の構成については説明を省略したが、図6及び図7に示した同一読み出しアドレス判定回路26と同一回路を共用して実現する。   First, in S201, the write address from the CPU 2 is compared with the address of the queue entry stored in the queue storage circuit 19. In S202, branch processing is performed depending on whether or not there is a matching entry. Although the description of the configuration of the comparison circuit is omitted, it is realized by sharing the same circuit as the same read address determination circuit 26 shown in FIGS.

S202で一致するエントリがあった場合(YES)、次のS203で、そのエントリのデータをCPU2からの書き込みデータに書き換える。この場合、新たにエントリを追加する処理はしない。   If there is a matching entry in S202 (YES), the data of the entry is rewritten to the write data from the CPU 2 in the next S203. In this case, no new entry is added.

これに対して、S202で一致するエントリがなかった場合(NO)、次のS204で、CPU2からの書き込み要求に応じた書き込み先アドレス及び書き込みデータを1組のエントリとして待ち行列に追加する。   On the other hand, if there is no matching entry in S202 (NO), in the next S204, the write destination address and write data corresponding to the write request from the CPU 2 are added to the queue as a set of entries.

図12は、待ち行列格納回路19の待ち行列にデータが書き込まれる動作のタイミングを示すタイミングチャートである。メモリ書き込み要求検出回路18により書き込み要求の信号が検出されると、クロック信号に従って順次、データ側アドレスバス9からアドレスA1、A2、A3、A4を、データ側データバス11から書き込みデータD1、D2、D3、D4を取り出し、アドレス及びデータを1組のエントリとして待ち行列に格納していく。ここで、図12に示すPtrR及びPtrWは、それぞれ書き込み及び読み出しデータが格納される場所をポインタで示している。また、EMPTYは待ち行列が空か否かを検出する。   FIG. 12 is a timing chart showing the timing of the operation in which data is written to the queue of the queue storage circuit 19. When the write request signal is detected by the memory write request detection circuit 18, the addresses A1, A2, A3, A4 are sequentially sent from the data side address bus 9 and the write data D1, D2,. D3 and D4 are taken out, and the address and data are stored in the queue as a set of entries. Here, PtrR and PtrW shown in FIG. 12 indicate pointers where the write and read data are stored, respectively. EMPTY also detects whether the queue is empty.

このタイミングチャートで、CPU2から書き込み要求があった場合、待ち行列がフルの状態でなければ、すなわち空きがあれば、CPU2はストールすることなく、書き込み処理を終了する。仮に、待ち行列がフルの状態であったとすれば、図示しないウエイト信号をCPU2に送ることにより、待ち行列に空きができるまでCPU2をストールさせる。   In this timing chart, when there is a write request from the CPU 2, if the queue is not full, that is, if there is an empty space, the CPU 2 ends the write process without stalling. If the queue is full, a wait signal (not shown) is sent to the CPU 2 so that the CPU 2 is stalled until the queue is empty.

図13は、データ退避装置3が退避動作を行うタイミングを示すタイミングチャートである。CPUアクセス検出回路20が、CPU2から読み出し要求及び書き込み要求のいずれもなされていない状態であることを検出し、CPUアクセス信号を待ち行列処理回路21に送る。CPUアクセス検出回路20からのCPUアクセス信号によりCPU2からのアクセスがない状態が検出されると、待ち行列処理回路21は、クロック信号に従って、まず、待ち行列からアドレスA1に格納されている読み出しデータD1’を読み出し、次のタイミングで、その読み出しデータD1’を退避用の第2のメモリ領域5に書き込むとともに、CPU2から送られる書き込みデータD1を第1のメモリ領域4のアドレスA1に書き込む。
[1−4 本実施形態の効果]
以上説明したとおり、第1実施形態のデータ退避装置3によれば、CPU2がデータの書き込み信号を送信するタイミングでデータの退避処理及び書き込み処理が行われるのではなく、書き込み先アドレス及び書き込みデータは、いったん待ち行列格納回路19の待ち行列のエントリとして格納される。そのため、データの書き込みに伴って退避処理を行うためにCPU2がストールすることがなくなり、データの書き込み処理に伴う処理速度の低下を防止することができる。
FIG. 13 is a timing chart showing the timing at which the data saving apparatus 3 performs the saving operation. The CPU access detection circuit 20 detects that neither a read request nor a write request is made from the CPU 2 and sends a CPU access signal to the queue processing circuit 21. When a state in which there is no access from the CPU 2 is detected by the CPU access signal from the CPU access detection circuit 20, the queue processing circuit 21 first reads the read data D1 stored in the address A1 from the queue according to the clock signal. 'Is read, and at the next timing, the read data D1' is written to the second memory area 5 for saving, and the write data D1 sent from the CPU 2 is written to the address A1 of the first memory area 4.
[1-4 Effects of the present embodiment]
As described above, according to the data saving apparatus 3 of the first embodiment, the data saving process and the writing process are not performed at the timing when the CPU 2 transmits the data writing signal, but the writing destination address and the writing data are Once stored as a queue entry of the queue storage circuit 19. For this reason, the CPU 2 is not stalled because the save process is performed as data is written, and a reduction in processing speed due to the data write process can be prevented.

また、CPUアクセス検出回路20によりCPU2がアクセスを行なわない空きサイクルが検出され、そのサイクルを利用して退避処理及び書き込み処理が行われることになり(図13)、待ち行列の処理待ちによる処理時間の増加もほとんど生じない。   Also, the CPU access detection circuit 20 detects an empty cycle in which the CPU 2 does not access, and the save process and the write process are performed using the cycle (FIG. 13). There is almost no increase.

したがって、データ退避装置3によれば、応答時間など時間制約の厳しい環境下であっても適切にデータの退避処理を実現することが可能になるという効果が得られる。
また、図4に示したようにCPUアクセス検出回路20は、データ側制御バス10を介して送信される読み出し信号及び書き込み信号を監視することで、データの読み出し及び書き込みのいずれも行わない状態を容易に検出できる。この検出回路は1個のNOR素子22により構成され、簡素かつ低コストで実現されている。
Therefore, according to the data saving apparatus 3, it is possible to appropriately realize data saving processing even in an environment where time constraints such as response time are severe.
Further, as shown in FIG. 4, the CPU access detection circuit 20 monitors a read signal and a write signal transmitted via the data-side control bus 10 to make a state in which neither reading nor writing of data is performed. It can be easily detected. This detection circuit is composed of one NOR element 22 and is realized simply and at low cost.

また本実施形態のデータ退避装置3は、データの読み出しについて、同一読み出しアドレス判定回路26により待ち行列に格納されたデータをチェックする(S101、S102)。そのため、退避処理がなされていないデータが待ち行列に残っていたとしても、データの読み出し処理が適切に実行されるという効果が得られる。   Further, the data saving device 3 of the present embodiment checks the data stored in the queue by the same read address determination circuit 26 for the data read (S101, S102). Therefore, even if data that has not been saved is left in the queue, an effect that the data read process is appropriately executed can be obtained.

また本実施形態のデータ退避装置3は、データの書き込みについて、待ち行列に格納されたデータをチェックして(S201、S202)、同一のアドレスがあれば組となっているデータを書き換える(S203、図9に示した回路)。これにより、待ち行列には1つのアドレスに対して1個の書き込み要求しかない状態を実現できる。そのため、同一のアドレスに対する複数の書き込みの中から、最新の書き込みデータを選択する機能が不要となり、小型の回路で構成できるという効果が得られる。   Further, the data saving device 3 of the present embodiment checks the data stored in the queue for data writing (S201, S202), and rewrites the paired data if there is the same address (S203, S202). The circuit shown in FIG. This realizes a state in which the queue has only one write request for one address. For this reason, the function of selecting the latest write data from a plurality of writes to the same address becomes unnecessary, and an effect of being configured with a small circuit can be obtained.

また本実施形態のCPUアクセス検出回路20内部の図5に示した回路によれば、CPU2がアクセスする先をチェックすることにより、実際にはCPU2が第1のメモリ領域4にアクセスしないのに、アクセスがあると誤って検出されるのを防止できる。その結果、データ退避装置3が退避処理を実行できる機会が増えるので、待ち行列がいっぱいになり退避処理が間に合わなくなる状況を起こりにくくすることができる。
[1−5 特許請求の範囲との関係]
なお、第1実施形態のデータ退避装置3では、メモリ書き込み要求検出回路18がメモリ書き込み検出手段、待ち行列格納回路19が待ち行列格納手段、CPUアクセス検出回路20がCPUアクセス検出手段、待ち行列処理回路21が待ち行列処理手段に相当する。
Further, according to the circuit shown in FIG. 5 inside the CPU access detection circuit 20 of the present embodiment, the CPU 2 does not actually access the first memory area 4 by checking the access destination by the CPU 2. It is possible to prevent erroneous detection when there is access. As a result, the chance that the data saving apparatus 3 can execute the saving process increases, so that it is difficult to cause a situation where the queue becomes full and the saving process is not in time.
[1-5 Relationship with Claims]
In the data saving apparatus 3 of the first embodiment, the memory write request detection circuit 18 is a memory write detection means, the queue storage circuit 19 is a queue storage means, the CPU access detection circuit 20 is a CPU access detection means, and a queue process. The circuit 21 corresponds to queue processing means.

また、同一読み出しアドレス判定回路26が同一読み出しアドレス判定手段、Nto1セレクタ27及び2to1セレクタ28が読み出しデータ送信手段に相当し、S201及びS202を実行する図示しない比較回路が同一書き込みアドレス判定手段、図9に示したデジタル回路を含むデータ退避装置3がデータ書き換え手段に相当する。
[2 第2実施形態]
次に、第2実施形態のマイコンについて説明する。
[2−1 第1実施形態との相違点]
図14は、第2実施形態としてのマイコンが備えるデータ退避装置3を示すブロック図である。第2実施形態としてのデータ退避装置3は、第1実施形態のデータ退避装置3に退避済みデータ判定回路33及び退避済みアドレスリスト34を付け加えたものであり、その他の構成は第1実施形態と同様である。
The same read address determination circuit 26 corresponds to the same read address determination means, the Nto1 selector 27 and the 2to1 selector 28 correspond to the read data transmission means, and the comparison circuit (not shown) that executes S201 and S202 is the same write address determination means. The data saving device 3 including the digital circuit shown in FIG.
[2 Second Embodiment]
Next, a microcomputer according to the second embodiment will be described.
[2-1 Difference from First Embodiment]
FIG. 14 is a block diagram showing the data saving apparatus 3 provided in the microcomputer as the second embodiment. The data saving apparatus 3 according to the second embodiment is obtained by adding a saved data determination circuit 33 and a saved address list 34 to the data saving apparatus 3 according to the first embodiment. Other configurations are the same as those of the first embodiment. It is the same.

退避済みデータ判定回路33は、待ち行列処理回路21及び退避済みアドレスリスト34に接続され、各種データのやりとりを行う。退避済みアドレスリスト34には、データ退避装置3がデータの退避を行なった際に、図示しないバスを介して、そのデータが格納されていた第1のメモリ領域4内のアドレスが、退避済みとなったアドレスとして格納されている。   The saved data determination circuit 33 is connected to the queue processing circuit 21 and the saved address list 34, and exchanges various data. In the saved address list 34, when the data saving device 3 saves data, the address in the first memory area 4 in which the data is stored is saved via a bus (not shown). Is stored as an address.

そして、退避済みデータ判定回路33は、待ち行列格納回路19に格納されたエントリを処理する際に、書き込み先のアドレスが退避済みアドレスリスト34に格納されているか否かをチェックする。
[2−2 処理フロー]
次に、第2実施形態の処理フローを説明する。第2実施形態では、待ち行列処理回路21は、各エントリの処理を行う際、処理すべきエントリのアドレスを退避済みデータ判定回路33に送り、退避済みデータ判定回路33による判定が終わるまで待機する。判定結果(未退避/退避済み)によって退避動作を行うか否かが判定される。
Then, the saved data determination circuit 33 checks whether or not the write destination address is stored in the saved address list 34 when the entry stored in the queue storage circuit 19 is processed.
[2-2 Processing flow]
Next, the processing flow of the second embodiment will be described. In the second embodiment, when processing each entry, the queue processing circuit 21 sends the address of the entry to be processed to the saved data determination circuit 33 and waits until the determination by the saved data determination circuit 33 is completed. . It is determined whether or not the save operation is performed based on the determination result (unsaved / saved).

図15は、退避済みデータ判定回路33により行われる判定処理を示すタイミングチャートである。
退避済みデータ判定回路33により待ち行列処理回路21から送られるアドレスと退避済みアドレスリスト34に格納されたアドレスとを比較して一致するアドレスがあるか否かが判定される。退避済みアドレスリスト34に格納されたアドレスに一致するアドレスがなく、判定結果が未退避と判定される場合(a)、第2のメモリ領域5に対する退避動作が行われる。退避済みと判定される場合(b)、判定の結果、退避済みを示す信号がオンになり新たな退避動作は行わない。
[2−3 効果]
第2実施形態のデータ退避装置3は、退避済みのデータが多い場合にデータの探索に時間がかかるのを防止するものである。すなわちデータ退避装置3は一定のチェックポイントにおける退避データを再現できれば十分であり、あるチェックポイントの後にいったんデータが退避されれば、そのデータが格納されているアドレスについて、次のチェックポイントの前にさらにデータを退避する必要はない。
FIG. 15 is a timing chart showing the determination process performed by the saved data determination circuit 33.
The saved data determination circuit 33 compares the address sent from the queue processing circuit 21 with the address stored in the saved address list 34 to determine whether there is a matching address. When there is no address that matches the address stored in the saved address list 34 and the determination result is determined to be unsaved (a), the saving operation for the second memory area 5 is performed. When it is determined that the saving has been completed (b), as a result of the determination, a signal indicating that saving has been performed is turned on, and no new saving operation is performed.
[2-3 Effects]
The data saving apparatus 3 according to the second embodiment is designed to prevent the time required for searching for data when there is a large amount of saved data. That is, it is sufficient for the data saving device 3 to be able to reproduce the saved data at a certain checkpoint. Once the data is saved after a certain checkpoint, the address where the data is stored is before the next checkpoint. Further, there is no need to save data.

第2実施形態のデータ退避装置3によれば、既に退避されているデータを改めて退避する処理を省くことができるので、その分、待ち行列の処理を進めることができるという効果が得られる。
[2−4 特許請求の範囲との関係]
なお第2実施形態のデータ退避装置3では、退避済みアドレスリスト34がアドレスリスト格納手段、退避済みデータ判定回路33が同一退避アドレス判定手段に相当する。
[3 第3実施形態]
次に、第3実施形態のマイコンについて説明する。
[3−1 第1実施形態との相違点]
第3実施形態のマイコンは、データ退避装置3の待ち行列格納回路19に格納される待ち行列のデータ構造が第1実施形態と異なる。具体的には、図16に示すように、待ち行列の各エントリには、データ値、アドレス値に加えて、エントリが有効か無効かを示すタグが設けられている。なお、図16の例では、各エントリのタグとして、エントリの有効を示すデータ(Valid)が記憶されている。
According to the data evacuation device 3 of the second embodiment, it is possible to omit the process of evacuating data that has already been evacuated, so that it is possible to advance the queue process accordingly.
[2-4 Relationship with Claims]
In the data saving apparatus 3 of the second embodiment, the saved address list 34 corresponds to address list storage means, and the saved data determination circuit 33 corresponds to the same saved address determination means.
[3 Third Embodiment]
Next, a microcomputer according to a third embodiment will be described.
[3-1 Differences from First Embodiment]
The microcomputer of the third embodiment differs from the first embodiment in the data structure of the queue stored in the queue storage circuit 19 of the data saving device 3. Specifically, as shown in FIG. 16, each entry in the queue is provided with a tag indicating whether the entry is valid or invalid in addition to the data value and the address value. In the example of FIG. 16, data (Valid) indicating validity of an entry is stored as a tag of each entry.

図17は、第3実施形態のデータ退避装置3においてCPU2から書き込み要求があった場合の処理フロー示すフローチャートである。S302でエントリの有無が判定されるまでは、図11の処理フローと同様である。   FIG. 17 is a flowchart showing a processing flow when there is a write request from the CPU 2 in the data saving apparatus 3 of the third embodiment. Until the presence / absence of an entry is determined in S302, the processing flow is the same as that in FIG.

S302で一致するエントリがあった場合、S303では、データを書き換えるのではなく、一致するエントリのタグにエントリの無効を示すデータを格納する。S303の処理の後、及びS302で一致するエントリがなかった場合、S304でCPU2からの書き込み要求に対応するアドレス及びデータを1組のエントリとして、待ち行列格納回路19の待ち行列に追加する。このときのエントリのタグは有効とされる。   If there is a matching entry in S302, in S303, data indicating invalidity of the entry is stored in the tag of the matching entry instead of rewriting the data. After the process of S303 and when there is no matching entry in S302, the address and data corresponding to the write request from the CPU 2 are added to the queue of the queue storage circuit 19 as a set of entries in S304. The tag of the entry at this time is valid.

なお、第3実施形態の待ち行列処理回路21は、エントリのタグに無効を示すデータが書き込まれているときは、そのエントリに対して何の処理も行わず、次のエントリを待ち行列から取り出して処理を行う。
[3−2 効果]
第3実施形態の待ち行列処理回路21によれば、エントリの有効タグの操作でエントリを無効とすることができるので、待ち行列中のデータを書き換えるための機能を設ける必要がなくなり、高速動作する小型の回路を構成できるという効果が得られる。
[4 第4実施形態]
次に、第4実施形態のマイコンについて説明する。
[4−1 第1実施形態との相違点]
第4実施形態のマイコンは、データ退避装置3におけるCPUアクセス検出回路20の内部構成が第1実施形態と異なる。図18は、第4実施形態のCPUアクセス検出回路20の内部構成を説明するデジタル回路図である。このCPUアクセス検出回路20は、並列のフリップフロップ35、メモリアクセス命令判別回路36、2段の直列のフリップフロップ37から構成される。並列のフリップフロップ35は命令側制御バス7を入力としてメモリアクセス命令判別回路36に結果を出力する。メモリアクセス命令判別回路36は並列のフリップフロップ35からの出力を入力として直列のフリップフロップ37にデータを送る。直列のフリップフロップ37はメモリアクセス命令判別回路36からのデータを入力して、後述する回路(図20)を通じて待ち行列処理回路21にデータを送る。
The queue processing circuit 21 of the third embodiment takes out the next entry from the queue without performing any processing on the entry when invalid data is written in the entry tag. Process.
[3-2 Effects]
According to the queue processing circuit 21 of the third embodiment, since the entry can be invalidated by operating the valid tag of the entry, there is no need to provide a function for rewriting data in the queue, and the operation is performed at high speed. The effect that a small circuit can be configured is obtained.
[4 Fourth Embodiment]
Next, a microcomputer according to a fourth embodiment will be described.
[4-1 Differences from First Embodiment]
The microcomputer of the fourth embodiment is different from the first embodiment in the internal configuration of the CPU access detection circuit 20 in the data saving apparatus 3. FIG. 18 is a digital circuit diagram illustrating the internal configuration of the CPU access detection circuit 20 of the fourth embodiment. The CPU access detection circuit 20 includes a parallel flip-flop 35, a memory access instruction determination circuit 36, and a two-stage serial flip-flop 37. The parallel flip-flop 35 inputs the instruction side control bus 7 and outputs the result to the memory access instruction determination circuit 36. The memory access instruction determination circuit 36 receives the output from the parallel flip-flop 35 and sends data to the serial flip-flop 37. The serial flip-flop 37 receives the data from the memory access instruction determination circuit 36 and sends the data to the queue processing circuit 21 through a circuit (FIG. 20) described later.

第1実施形態ではCPUアクセス検出回路20は、データ側制御バス10を介してCPU2から送られる信号を検出していたが、この第4実施形態では、ROM1とCPU2とを接続する命令側バスの信号を検出する。すなわちこの第4実施形態では、命令側制御バス7からCPU2に対する制御信号が並列のフリップフロップ35に送信される。そして、メモリアクセス命令判別回路36は、並列のフリップフロップ35から送られる信号からデータの読み出し又は書き込みの要求が行われるか否かを判別し、その結果を直列のフリップフロップ37に出力する。   In the first embodiment, the CPU access detection circuit 20 detects a signal sent from the CPU 2 via the data side control bus 10, but in this fourth embodiment, the instruction side bus connecting the ROM 1 and the CPU 2 is connected. Detect the signal. That is, in the fourth embodiment, a control signal for the CPU 2 is transmitted from the instruction side control bus 7 to the parallel flip-flop 35. Then, the memory access instruction determination circuit 36 determines whether or not a data read or write request is made from the signal sent from the parallel flip-flop 35, and outputs the result to the serial flip-flop 37.

図19は、第4実施形態で用いるCPU2のパイプライン処理を示す説明図である。
このパイプライン処理では、IF(Instruction Fetch)で、命令信号を命令キャッシュから読み出し、DEC(Instruction Decode/register read)で、CPU2から送られる制御信号を生成し、図示しないレジスタ・ファイルをレジスタ指定子で参照する。そして、EXE(EXecution/address calculation)で、数値の計算、データやアドレス・分岐先の計算を行い、MA(Memory Access)で、データの読み出し又はデータの書き込みを実行する。WB(Write Back)では、図示しないレジスタにデータを書き込む。
FIG. 19 is an explanatory diagram showing pipeline processing of the CPU 2 used in the fourth embodiment.
In this pipeline processing, an instruction signal is read from the instruction cache by IF (Instruction Fetch), a control signal sent from the CPU 2 is generated by DEC (Instruction Decode / register read), and a register file (not shown) is registered as a register specifier. Refer to. Then, numerical value calculation, data and address / branch destination calculation are performed by EXE (EXecution / address calculation), and data reading or data writing is executed by MA (Memory Access). In WB (Write Back), data is written to a register (not shown).

そして、CPUアクセス検出回路20は、IFで制御信号がCPU2に送信され、並列のフリップフロップ35に制御信号が取り込まれてから、3サイクル後、すなわちMAステージに相当するサイクルで、メモリアクセス命令判別回路36の検出信号が出力されるように設計されている。具体的には、並列のフリップフロップ35で制御信号が取り込まれて、次のサイクルで、メモリアクセス命令判別回路36により、データの読み出し又は書き出し信号が送られるのか否かが判別される。そして、2段の直列のフリップフロップ37により、さらに2サイクル後に検出信号が出力される。   The CPU access detection circuit 20 determines the memory access instruction three cycles after the control signal is transmitted to the CPU 2 by IF and the control signal is taken into the parallel flip-flop 35, that is, in a cycle corresponding to the MA stage. The detection signal of the circuit 36 is designed to be output. Specifically, the control signal is taken in by the parallel flip-flop 35, and in the next cycle, the memory access instruction determination circuit 36 determines whether a data read or write signal is sent. Then, the detection signal is output after another two cycles by the two-stage serial flip-flop 37.

なお、ここでは、IFから3サイクル後にMAが来るパイプライン処理について、デジタル回路を実現したが、サイクル数に応じて、直列のフリップフロップの数を変更すれば、いかなるパイプライン処理にも対応することができる。   Here, the digital circuit is realized for the pipeline processing in which MA comes after 3 cycles from IF. However, any pipeline processing can be handled by changing the number of serial flip-flops according to the number of cycles. be able to.

図20は、第4実施形態のCPUアクセス検出回路20の一部を示したデジタル回路図である。この回路は、アドレスデコード回路24、AND素子25及び2段の直列のフリップフロップ37から構成される。この回路は、図18に示したメモリアクセス命令判別回路36からの入力となっており、2段の直列のフリップフロップ37に出力されている点を除けば、図5に示したデジタル回路と同様の構成である。
[4−2 効果]
第4実施形態のデータ退避装置3によれば、CPU2がメモリにアクセスする前に命令側制御バス7を監視して、CPU2がメモリへアクセスするかどうかを判定するため、メモリへのアクセスの開始直後から退避処理を実行することが可能となる。このことによりCPU2がメモリへの読み出し及び書き出し信号を送信した後にCPUのアクセスを判定する第1実施形態のデータ退避装置3に比べて、クロックの周波数を高くすることが可能となり、処理の高速動作を実現できるという効果を得ることができる。
[5 第5実施形態]
次に、第5実施形態のマイコンについて説明する。
[5−1 第1実施形態との相違点]
第5実施形態のマイコンは、CPU2から読み出し要求があった場合にデータ退避装置3が実行する処理フローの内容が第1実施形態と異なる。図21は、第5実施形態において、CPU2から読み出し要求があった場合の処理フローを示すフローチャートである。
FIG. 20 is a digital circuit diagram showing a part of the CPU access detection circuit 20 of the fourth embodiment. This circuit includes an address decoding circuit 24, an AND element 25, and two stages of flip-flops 37 in series. This circuit is the input from the memory access instruction determination circuit 36 shown in FIG. 18, and is the same as the digital circuit shown in FIG. 5 except that it is output to the two-stage serial flip-flop 37. It is the composition.
[4-2 Effects]
According to the data saving device 3 of the fourth embodiment, before the CPU 2 accesses the memory, the instruction side control bus 7 is monitored to determine whether the CPU 2 accesses the memory. The save process can be executed immediately after. As a result, the clock frequency can be made higher than that of the data saving apparatus 3 of the first embodiment for determining the access of the CPU after the CPU 2 transmits the read and write signals to the memory, and the processing can be performed at high speed. The effect that can be realized can be obtained.
[5 Fifth Embodiment]
Next, a microcomputer according to a fifth embodiment will be described.
[5-1 Differences from First Embodiment]
The microcomputer of the fifth embodiment is different from the first embodiment in the content of the processing flow executed by the data saving device 3 when there is a read request from the CPU 2. FIG. 21 is a flowchart showing a processing flow when there is a read request from the CPU 2 in the fifth embodiment.

CPU2からの読み出し要求があった場合、S401で、CPU2からの読み出しアドレスと待ち行列格納回路19に格納されている待ち行列のアドレスとが比較されるのは、図10で示した処理フローと同様であるが、この処理では同時にS402の処理も行う。すなわち、S402では、一致するエントリがあるか否かに関わらず、第1のメモリ領域4から予めデータを読み出しておく。その他の処理フローは図10の処理フローと同様である。
[5−2 効果]
第5実施例では、CPUアクセス検出回路20がデータの読み出しを行うことを検出すると、待ち行列に同一のアドレスがあるか否かにかかわらず、予め読み出しデータを第1のメモリ領域4から取り出して準備しておくため、待ち行列に同一のアドレスがなかった場合でも迅速に読み出しデータをCPU2に送信することが可能となり、読み出し処理の高速化が実現できるという効果がある。
[6 第6実施形態]
次に、第6実施形態のマイコンについて説明する。
[6−1 第1実施形態との相違点]
第6実施形態のマイコンは、CPU2から読み出し要求があった場合にデータ退避装置3が実行する処理フローの内容が第1実施形態と異なる。図22は、第6実施形態において、CPU2から読み出し要求があった場合の処理フローを示すフローチャートである。
When there is a read request from the CPU 2, the read address from the CPU 2 is compared with the queue address stored in the queue storage circuit 19 in S401, as in the processing flow shown in FIG. However, in this process, the process of S402 is also performed. That is, in S402, data is read from the first memory area 4 in advance regardless of whether there is a matching entry. The other processing flow is the same as the processing flow of FIG.
[5-2 Effects]
In the fifth embodiment, when the CPU access detection circuit 20 detects reading of data, the read data is taken out from the first memory area 4 in advance regardless of whether or not the queue has the same address. Since the preparation is made, it is possible to quickly transmit the read data to the CPU 2 even when the same address is not in the queue, and the speed of the read process can be increased.
[6 Sixth Embodiment]
Next, a microcomputer according to a sixth embodiment will be described.
[6-1 Differences from First Embodiment]
The microcomputer of the sixth embodiment is different from the first embodiment in the content of the processing flow executed by the data saving device 3 when there is a read request from the CPU 2. FIG. 22 is a flowchart showing a processing flow when there is a read request from the CPU 2 in the sixth embodiment.

この処理フローでは、第5実施形態の処理フロー(図21)にS505の処理が加えられている。すなわち、S503で一致するエントリがあるとされた場合、S504で一致するエントリのデータを選択するところまでは、図21の処理フローと同様であるが、さらにS505で、一致するエントリのうちで最新のエントリが選択される。他の処理フローは図21に示したものと同様である。   In this processing flow, the processing of S505 is added to the processing flow (FIG. 21) of the fifth embodiment. That is, when it is determined that there is a matching entry in S503, the process is the same as the processing flow of FIG. 21 until the data of the matching entry is selected in S504. However, in S505, the latest entry among the matching entries is selected. Entries are selected. The other processing flow is the same as that shown in FIG.

なおこの点、第1実施形態のように、データの書き込み処理の段階で待ち行列に格納されたデータをチェックし、同一のアドレスがあれば組となっているデータを書き換えておけば、待ち行列には1つのアドレスに対して1個の書き込み要求しかない状態となっており、あえて読み出し処理としてS505を設ける必要はない。したがって、この第6実施形態は、書き込み処理の段階で、待ち行列内のアドレスをチェックする等の処理を行なっておらず、待ち行列内に同一アドレスに対して複数のエントリが存在していることを前提としている。
[6−2 効果]
第6実施形態のデータ退避装置3によれば、待ち行列に同一のアドレスで複数の書き込みデータが格納されていた場合でも最も新しいデータを読み出すことができるので、適切なデータの読み出しができるという効果が得られる。
[6−3 特許請求の範囲との関係]
第6実施形態のS405を実現する待ち行列処理回路21が同一アドレス選択手段に相当する。
[7 他の形態]
以上、本発明の実施形態について説明したが、本発明は、記載した実施形態に限られるものではなく種々の形態を採り得る。
In this respect, as in the first embodiment, if the data stored in the queue is checked at the stage of data write processing, and if there is the same address, the paired data is rewritten, the queue Since there is only one write request for one address, it is not necessary to provide S505 as a read process. Therefore, in the sixth embodiment, processing such as checking the address in the queue is not performed at the stage of the write processing, and there are a plurality of entries for the same address in the queue. Is assumed.
[6-2 Effects]
According to the data saving apparatus 3 of the sixth embodiment, even when a plurality of write data is stored in the queue at the same address, the newest data can be read, so that the appropriate data can be read. Is obtained.
[6-3 Relationship with Claims]
The queue processing circuit 21 realizing S405 of the sixth embodiment corresponds to the same address selection means.
[7 Other forms]
As mentioned above, although embodiment of this invention was described, this invention is not restricted to described embodiment, Various forms can be taken.

例えば、本実施形態ではマイコンの構成を前提としたが、何らかのメモリ領域とデータの読み出し及び書き込みを実行するシステムであれば、どのようなものであっても応用できる。すなわち、コンピュータに内蔵又は外付けされたハードディスクとデータのやりとりをする場合、ローカルエリア又は広域エリアのネットワークを通じてサーバとなっている記憶領域にアクセスするような場合などである。   For example, in the present embodiment, the configuration of the microcomputer is assumed. However, any system can be applied as long as it is a system that executes reading and writing of some memory area and data. That is, when data is exchanged with a hard disk built in or externally attached to a computer, a storage area serving as a server is accessed through a network in a local area or a wide area.

また、本実施形態では主にデジタル回路による実現を前提としたが、同様の処理をソフトウエアにより実現することも可能である。   Further, in the present embodiment, it is premised on the realization by a digital circuit, but the same processing can be realized by software.

第1実施形態としてのマイコンの構成を示すブロック図である。It is a block diagram which shows the structure of the microcomputer as 1st Embodiment. データ退避装置の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a data evacuation apparatus. 待ち行列格納回路に格納されるデータ構造を示す説明図である。It is explanatory drawing which shows the data structure stored in a queue storage circuit. CPUアクセス検出回路の入力に近い前半部分を示したデジタル回路図である。It is the digital circuit diagram which showed the first half part near the input of a CPU access detection circuit. CPUアクセス検出回路の出力に近い後半部分を示したデジタル回路図である。It is the digital circuit diagram which showed the latter half part near the output of a CPU access detection circuit. 待ち行列処理回路の内部構成の一部を示すブロック図である。It is a block diagram which shows a part of internal structure of a queue processing circuit. 同一読み出しアドレス判定回路の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the same read address determination circuit. 選択信号生成回路が実現する真理値表を示した説明図である。It is explanatory drawing which showed the truth table which a selection signal generation circuit implement | achieves. 待ち行列処理回路の内部構成の一部を示すブロック図である。It is a block diagram which shows a part of internal structure of a queue processing circuit. データ退避装置においてCPUから読み出し要求があった場合の処理フローを示すフローチャートである。It is a flowchart which shows the processing flow when there exists a read request from CPU in a data evacuation apparatus. データ退避装置においてCPUから書き込み要求があった場合の処理フローを示すフローチャートである。It is a flowchart which shows the processing flow when there exists a write request from CPU in a data evacuation apparatus. 待ち行列格納回路の待ち行列にデータが書き込まれる動作のタイミングを示すタイミングチャートである。It is a timing chart which shows the timing of the operation | movement in which data are written in the queue of a queue storage circuit. データ退避装置が退避動作を行うタイミングを示すタイミングチャートである。It is a timing chart which shows the timing which a data evacuation apparatus performs evacuation operation. 第2実施形態としてのデータ退避装置を示すブロック図である。It is a block diagram which shows the data evacuation apparatus as 2nd Embodiment. 退避済みデータ判定回路により行われる判定処理を示すタイミングチャートである。It is a timing chart which shows the determination process performed by the saved data determination circuit. 第3実施形態として、待ち行列格納回路に格納される待ち行列のデータ構造を示す説明図である。It is explanatory drawing which shows the data structure of the queue stored in a queue storage circuit as 3rd Embodiment. 第3実施形態のデータ退避装置においてCPUから書き込み要求があった場合の処理フローを示すフローチャートである。It is a flowchart which shows the processing flow when there exists a write request from CPU in the data evacuation apparatus of 3rd Embodiment. 第4実施形態としてのCPUアクセス検出回路の内部構成を説明するデジタル回路図である。It is a digital circuit diagram explaining the internal structure of the CPU access detection circuit as 4th Embodiment. 第4実施形態で用いるCPUのパイプライン処理を示す説明図である。It is explanatory drawing which shows the pipeline process of CPU used in 4th Embodiment. 第4実施形態のCPUアクセス検出回路の一部を示したデジタル回路図である。It is the digital circuit diagram which showed a part of CPU access detection circuit of 4th Embodiment. 第5実施形態において、CPUから読み出し要求があった場合の処理フローを示すフローチャートである。In a 5th embodiment, it is a flow chart which shows a processing flow when there is a read demand from CPU. 第6実施形態において、CPUから読み出し要求があった場合の処理フローを示すフローチャートである。In 6th Embodiment, it is a flowchart which shows the processing flow when there exists a read request from CPU.

符号の説明Explanation of symbols

1…ROM、2…CPU、3…データ退避装置、4…第1のメモリ領域、5…第2のメモリ領域、6…命令側アドレスバス、7…命令側制御バス、8…命令側データバス、9…データ側アドレスバス、10…データ側制御バス、11…データ側データバス、12…第1メモリ側アドレスバス、13…第1メモリ側制御バス、14…第1メモリ側データバス、15…第2メモリ側アドレスバス、16…第2メモリ側制御バス、17…第2メモリ側データバス、18…メモリ書き込み要求検出回路、19…待ち行列格納回路、20…CPUアクセス検出回路、21…待ち行列処理回路、22…NOR素子、23…出力線、24…アドレスデコード回路、25…AND素子、26…同一読み出しアドレス判定回路、27…Nto1セレクタ、28…2to1セレクタ、29…コンパレータ、30…選択信号生成回路、31…データ書き換え回路、32…OR素子、33…退避済みデータ判定回路、34…退避済みアドレスリスト、35…並列のフリップフロップ、36…メモリアクセス命令判別回路、37…直列のフリップフロップ DESCRIPTION OF SYMBOLS 1 ... ROM, 2 ... CPU, 3 ... Data saving device, 4 ... 1st memory area, 5 ... 2nd memory area, 6 ... Instruction side address bus, 7 ... Instruction side control bus, 8 ... Instruction side data bus 9, data side address bus, 10 ... data side control bus, 11 ... data side data bus, 12 ... first memory side address bus, 13 ... first memory side control bus, 14 ... first memory side data bus, 15 2nd memory side address bus, 16 ... 2nd memory side control bus, 17 ... 2nd memory side data bus, 18 ... Memory write request detection circuit, 19 ... Queue storage circuit, 20 ... CPU access detection circuit, 21 ... Queue processing circuit, 22 ... NOR element, 23 ... output line, 24 ... address decoding circuit, 25 ... AND element, 26 ... same read address determination circuit, 27 ... Nto1 selector, 28 ... 2to DESCRIPTION OF SYMBOLS 1 selector, 29 ... Comparator, 30 ... Selection signal generation circuit, 31 ... Data rewriting circuit, 32 ... OR element, 33 ... Saved data determination circuit, 34 ... Saved address list, 35 ... Parallel flip-flop, 36 ... Memory Access command discriminating circuit, 37 ... series flip-flop

Claims (15)

アクセス対象となるメモリに対してCPUが各種信号を送信するためのアドレスバス、データバス及び制御バスに接続され、前記メモリのデータを退避用メモリに退避させるデータ退避装置であって、
前記CPUから前記制御バスを介して送信される前記メモリに対する書き込み信号を検出するメモリ書き込み検出手段と、
前記メモリ書き込み検出手段により前記書き込み信号が検出されると、前記CPUから前記アドレスバス及び前記データバスを介して各々送信される書き込み先アドレス及び書き込みデータを1組のエントリとして待ち行列に格納する待ち行列格納手段と、
前記CPUが前記アクセス対象となるメモリに対してデータの読み出し及び書き込みのいずれも行わない状態を検出するCPUアクセス検出手段と、
前記CPUアクセス検出手段により、前記CPUがデータの読み出し及び書き込みのいずれも行わない状態が検出されている間に、前記待ち行列から前記エントリを取り出し、前記エントリの書き込み先アドレスに格納されていたデータを前記メモリから前記退避用メモリに退避させる退避処理を行うとともに、前記書き込み先アドレスに前記エントリの書き込みデータを格納する書き込み処理を行う待ち行列処理手段と
を備えることを特徴とするデータ退避装置。
A data evacuation device that is connected to an address bus, a data bus, and a control bus for the CPU to transmit various signals to a memory to be accessed, and evacuates data in the memory to a evacuation memory,
Memory write detection means for detecting a write signal to the memory transmitted from the CPU via the control bus;
When the write signal is detected by the memory write detection means, a write destination address and write data respectively transmitted from the CPU via the address bus and the data bus are stored in a queue as a set of entries. Matrix storage means;
CPU access detection means for detecting a state in which the CPU does not read or write data to the memory to be accessed;
While the CPU access detecting unit detects that the CPU does not read or write data, the entry is taken out from the queue and stored in the entry write destination address. And a queue processing means for performing a write process for storing the write data of the entry at the write destination address.
前記CPUアクセス検出手段は、前記制御バスを介して送信される読み出し信号及び書き込み信号の有無をそれぞれ監視し、前記読み出し信号及び前記書き込み信号のいずれも送信されていない場合に前記CPUがデータの読み出し及び書き込みのいずれも行わない状態として検出すること
を特徴とする請求項1に記載のデータ退避装置。
The CPU access detection means monitors the presence or absence of a read signal and a write signal transmitted via the control bus, and the CPU reads data when neither the read signal nor the write signal is transmitted. The data evacuation apparatus according to claim 1, wherein the data evacuation device is detected as a state where neither writing nor writing is performed.
前記CPUアクセス検出手段は、前記CPUに対する命令信号が送信される命令バスに接続され、前記命令バスを監視して前記CPUがデータの読み出し及び書き込みのいずれも行わない状態を検出すること
を特徴とする請求項1に記載のデータ退避装置。
The CPU access detecting means is connected to an instruction bus to which an instruction signal for the CPU is transmitted, and monitors the instruction bus to detect a state in which the CPU does not read or write data. The data saving apparatus according to claim 1.
前記CPUアクセス検出手段は、さらに、前記CPUが前記アクセス対象となるメモリに対してデータの読み出しを行うことを検出し、
前記待ち行列処理手段は、
前記CPUアクセス検出手段によりデータの読み出しを行うことが検出されると、その読み出しに対応する読み出し先アドレスを前記アドレスバスから取り出し、その読み出し先アドレスと前記待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する同一読み出しアドレス判定手段と、
前記同一読み出しアドレス判定手段により同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータを前記待ち行列から取り出し、その書き込みデータを読み出しデータとして前記CPUに送信し、前記同一読み出しアドレス判定手段により同一アドレスが存在しないと判定された場合は前記読み出し先アドレスに格納されたデータを前記メモリから取り出し、そのデータを読み出しデータとして前記CPUに送信する読み出しデータ送信手段と
を備えることを特徴とする請求項1乃至3のいずれかに記載のデータ退避装置。
The CPU access detecting means further detects that the CPU reads data from the memory to be accessed,
The queue processing means includes
When it is detected by the CPU access detecting means that the data is read, the read destination address corresponding to the read is taken out from the address bus, and the read destination address and the write destination address stored in the queue are obtained. The same read address determination means for comparing whether or not the same address exists,
When it is determined by the same read address determination means that the same address exists, the write data paired with the address is taken out from the queue, and the write data is transmitted to the CPU as read data, and the same Read data transmission means for taking out data stored in the read destination address from the memory and transmitting the data to the CPU as read data when the read address determination means determines that the same address does not exist. The data evacuation device according to claim 1, wherein
前記待ち行列処理手段は、さらに、
前記同一読み出しアドレス判定手段により同一のアドレスが複数存在すると判定された場合はそれら同一のアドレスの内で前記待ち行列に最も新しく格納されたアドレスと組になっている書き込みデータを前記CPUに送信する読み出しデータとして選択する同一アドレス選択手段を備えること
を特徴とする請求項4に記載のデータ退避装置。
The queue processing means further includes:
If the same read address determination means determines that there are a plurality of the same addresses, the write data paired with the address stored most recently in the queue among the same addresses is transmitted to the CPU. 5. The data saving apparatus according to claim 4, further comprising a same address selection unit that selects the read data.
前記CPUアクセス検出手段は、さらに、前記CPUが前記アクセス対象となるメモリに対してデータの書き込みを行うことを検出し、
前記待ち行列処理手段は、
前記CPUアクセス検出手段によりデータの書き込みを行うことが検出されると、その書き込みに対応する書き込み先アドレス及び書き込みデータを前記アドレスバス及び前記データバスから各々取り出し、前記書き込み先アドレスと前記待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する同一書き込みアドレス判定手段と、
前記同一書き込みアドレス判定手段により同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータを前記データバスから取り出した書き込みデータに書き換えるデータ書き換え手段と
を備えることを特徴とする請求項1乃至4のいずれかに記載のデータ退避装置。
The CPU access detecting means further detects that the CPU writes data to the memory to be accessed,
The queue processing means includes
When it is detected by the CPU access detection means that data writing is performed, a write destination address and write data corresponding to the write are taken out from the address bus and the data bus, respectively, and are written to the write destination address and the queue. The same write address determination means for comparing the stored write destination address to determine whether the same address exists,
Data rewriting means for rewriting the write data paired with the address to the write data taken out from the data bus when the same write address judging means judges that the same address exists. The data evacuation device according to any one of claims 1 to 4.
前記待ち行列格納手段は、各エントリに含まれる情報として、さらに、エントリの有効又は無効を示すエントリ有効タグを格納し、
前記データ書き換え手段は、前記同一書き込みアドレス判定手段により同一のアドレスが存在すると判定された場合は、書き込みデータを書き換える代わりに、前記待ち行列に格納された同一のアドレスと組になっているエントリ有効タグを無効とするとともに、前記アドレスバス及び前記データバスから各々取り出した前記書き込み先アドレス及び前記書き込みデータを新たなエントリとして待ち行列に格納すること
を特徴とする請求項6に記載のデータ退避装置。
The queue storage means further stores an entry valid tag indicating validity or invalidity of the entry as information included in each entry,
If the same address is determined by the same write address determination means, the data rewrite means is valid for the entry paired with the same address stored in the queue instead of rewriting the write data. The data saving apparatus according to claim 6, wherein the tag is invalidated, and the write destination address and the write data respectively fetched from the address bus and the data bus are stored in a queue as new entries. .
前記データ退避装置は、前記アクセス対象となるメモリの一部のメモリ領域について前記退避処理及び前記書き込み処理を行うものであり、
前記CPUアクセス検出手段は、前記CPUが前記一部のメモリ領域に対してデータの読み出し及び書き込みのいずれも行わない状態を検出すること
を特徴とする請求項1乃至7のいずれかに記載のデータ退避装置。
The data evacuation device performs the evacuation process and the write process for a part of the memory area of the memory to be accessed,
The data according to any one of claims 1 to 7, wherein the CPU access detection unit detects a state in which the CPU does not read and write data to the partial memory area. Evacuation device.
前記退避用メモリに退避されたデータの書き込み先アドレスを退避済みアドレスリストとして格納する退避済みアドレスリスト格納手段と、
新たに退避処理がされるデータの書き込み先アドレスと前記退避済みアドレスリストとを比較して同一のアドレスが存在するか否かを判定する同一退避アドレス判定手段とを備え、
前記待ち行列処理手段は、前記同一退避アドレス判定手段により同一のアドレスが存在すると判定されると前記退避処理を行なわないこと
を特徴とする請求項1乃至8のいずれかに記載のデータ退避装置。
A saved address list storage means for storing a write destination address of data saved in the save memory as a saved address list;
The same save address determination means for comparing the write destination address of the data to be newly saved and the saved address list to determine whether or not the same address exists,
9. The data evacuation apparatus according to claim 1, wherein the queue processing unit does not perform the evacuation process when it is determined by the same evacuation address determination unit that the same address exists.
アクセス対象となるメモリに対してCPUが送信する各種信号を、アドレスバス、データバス及び制御バスを介して取り出し、前記メモリのデータを退避用メモリに退避させるデータ退避方法であって、
前記CPUから前記制御バスを介して送信される前記メモリに対する書き込み信号を検出するメモリ書き込み検出ステップと、
前記メモリ書き込み検出ステップで前記書き込み信号が検出されると、前記CPUから前記アドレスバス及び前記データバスを介して各々送信される書き込み先アドレス及び書き込みデータを1組のエントリとして待ち行列に格納する待ち行列格納ステップと、
前記CPUが前記アクセス対象となるメモリに対してデータの読み出し及び書き込みのいずれも行わない状態を検出するCPUアクセス検出ステップと、
前記CPUアクセス検出ステップで、前記CPUがデータの読み出し及び書き込みのいずれも行わない状態が検出されている間に、前記待ち行列から前記エントリを取り出し、前記エントリの書き込み先アドレスに格納されていたデータを前記メモリから前記退避用メモリに退避させる退避処理を行うとともに、前記書き込み先アドレスに前記エントリの書き込みデータを格納する書き込み処理を行う待ち行列処理ステップと
を備えることを特徴とするデータ退避方法。
A data evacuation method in which various signals transmitted by a CPU to a memory to be accessed are extracted via an address bus, a data bus, and a control bus, and the data in the memory is evacuated to a evacuation memory,
A memory write detection step of detecting a write signal to the memory transmitted from the CPU via the control bus;
When the write signal is detected in the memory write detection step, a write destination address and write data respectively transmitted from the CPU via the address bus and the data bus are stored in a queue as a set of entries. A matrix storage step;
A CPU access detection step of detecting a state in which the CPU does not read or write data to the memory to be accessed;
While the CPU access detection step detects that the CPU is neither reading nor writing data, the entry is taken out from the queue, and the data stored in the write destination address of the entry And a queuing process step for performing a write process for storing the write data of the entry at the write destination address.
前記CPUアクセス検出ステップでは、さらに、前記CPUが前記アクセス対象となるメモリに対してデータの読み出しを行うことを検出し、
前記待ち行列処理ステップは、
前記CPUアクセス検出ステップでデータの読み出しを行うことが検出されると、その読み出しに対応する読み出し先アドレスを前記アドレスバスから取り出し、その読み出し先アドレスと前記待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する同一読み出しアドレス判定ステップと、
前記同一読み出しアドレス判定ステップで同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータを前記待ち行列から取り出し、その書き込みデータを読み出しデータとして前記CPUに送信し、前記同一読み出しアドレス判定ステップで同一アドレスが存在しないと判定された場合は前記読み出し先アドレスに格納されたデータを前記メモリから取り出し、そのデータを読み出しデータとして前記CPUに送信する読み出しデータ送信ステップと
を備えることを特徴とする請求項10に記載のデータ退避方法。
In the CPU access detection step, the CPU further detects that the CPU reads data from the memory to be accessed,
The queuing step includes
When it is detected that the data is read in the CPU access detection step, a read destination address corresponding to the read is taken out from the address bus, and the read destination address and the write destination address stored in the queue are obtained. The same read address determination step for determining whether or not the same address exists in comparison,
When it is determined in the same read address determination step that the same address exists, the write data paired with the address is taken out from the queue, the write data is transmitted to the CPU as read data, and the same A read data transmission step of extracting data stored in the read destination address from the memory and transmitting the data as read data to the CPU when it is determined in the read address determination step that the same address does not exist; The data saving method according to claim 10.
前記読み出しデータ送信ステップでは、前記CPUアクセス検出ステップでデータの読み出しを行うことが検出されると、同一読み出しアドレス判定ステップの判定にかかわらず、予め前記読み出し先アドレスに格納されたデータを前記メモリから取り出しておくこと
を特徴とする請求項11に記載のデータ退避方法。
In the read data transmission step, when it is detected that the data is read in the CPU access detection step, the data previously stored in the read destination address is read from the memory regardless of the determination in the same read address determination step. The data saving method according to claim 11, wherein the data saving method is taken out.
前記待ち行列処理ステップは、さらに、
前記同一読み出しアドレス判定ステップで同一のアドレスが複数存在すると判定された場合はそれら同一のアドレスの内で前記待ち行列に最も新しく格納されたアドレスと組になっている書き込みデータを前記CPUに送信する読み出しデータとして選択する同一アドレス選択ステップを備えること
を特徴とする請求項11又は12に記載のデータ退避方法。
The queuing step further comprises:
When it is determined in the same read address determination step that there are a plurality of the same addresses, the write data paired with the address most recently stored in the queue among the same addresses is transmitted to the CPU. The data saving method according to claim 11, further comprising a same address selection step of selecting as read data.
前記CPUアクセス検出ステップでは、さらに、前記CPUが前記アクセス対象となるメモリに対してデータの書き込みを行うことを検出し、
前記待ち行列処理ステップは、
前記CPUアクセス検出ステップでデータの書き込みを行うことが検出されると、その書き込みに対応する書き込み先アドレス及び書き込みデータを前記アドレスバス及び前記データバスから各々取り出し、前記書き込み先アドレスと前記待ち行列に格納された書き込み先アドレスとを比較して同一のアドレスが存在するか否かを判定する同一書き込みアドレス判定ステップと、
前記同一書き込みアドレス判定ステップで同一のアドレスが存在すると判定された場合はそのアドレスと組になっている書き込みデータを前記データバスから取り出した書き込みデータに書き換えるデータ書き換えステップと
を備えることを特徴とする請求項10乃至12のいずれかに記載のデータ退避方法。
The CPU access detecting step further detects that the CPU writes data to the memory to be accessed,
The queuing step includes
When it is detected in the CPU access detection step that data writing is performed, a write destination address and write data corresponding to the write are retrieved from the address bus and the data bus, respectively, and are written to the write destination address and the queue. The same write address determination step for comparing the stored write destination address to determine whether the same address exists,
A data rewriting step of rewriting the write data paired with the address to the write data taken out from the data bus when it is determined in the same write address determination step that the same address exists. The data saving method according to claim 10.
前記待ち行列格納ステップでは、各エントリに含まれる情報として、さらに、エントリの有効又は無効を示すエントリ有効タグを格納し、
前記データ書き換えステップでは、前記同一書き込みアドレス判定ステップで同一のアドレスが存在すると判定された場合は、書き込みデータを書き換える代わりに、前記待ち行列に格納された同一のアドレスと組になっているエントリ有効タグを無効とするとともに、前記アドレスバス及び前記データバスから各々取り出した前記書き込み先アドレス及び前記書き込みデータを新たなエントリとして待ち行列に格納すること
を特徴とする請求項14に記載のデータ退避方法。
In the queue storing step, as information included in each entry, an entry valid tag indicating validity or invalidity of the entry is further stored,
In the data rewriting step, if it is determined in the same write address determining step that the same address exists, instead of rewriting the write data, the entry valid paired with the same address stored in the queue is valid. 15. The data saving method according to claim 14, wherein the tag is invalidated, and the write destination address and the write data respectively fetched from the address bus and the data bus are stored in a queue as new entries. .
JP2008020954A 2008-01-31 2008-01-31 Data save unit and method Pending JP2009181422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008020954A JP2009181422A (en) 2008-01-31 2008-01-31 Data save unit and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008020954A JP2009181422A (en) 2008-01-31 2008-01-31 Data save unit and method

Publications (1)

Publication Number Publication Date
JP2009181422A true JP2009181422A (en) 2009-08-13

Family

ID=41035341

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008020954A Pending JP2009181422A (en) 2008-01-31 2008-01-31 Data save unit and method

Country Status (1)

Country Link
JP (1) JP2009181422A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0444140A (en) * 1990-06-11 1992-02-13 Hitachi Ltd Virtual memory control method
JPH058646U (en) * 1991-07-16 1993-02-05 横河電機株式会社 Memory device
JPH08328967A (en) * 1995-05-26 1996-12-13 Canon Inc Portable information processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0444140A (en) * 1990-06-11 1992-02-13 Hitachi Ltd Virtual memory control method
JPH058646U (en) * 1991-07-16 1993-02-05 横河電機株式会社 Memory device
JPH08328967A (en) * 1995-05-26 1996-12-13 Canon Inc Portable information processor

Similar Documents

Publication Publication Date Title
EP2503460B1 (en) Hardware acceleration for a software transactional memory system
US8732550B2 (en) Processor and error correcting method
US8131951B2 (en) Utilization of a store buffer for error recovery on a store allocation cache miss
US20070050563A1 (en) Synchronization arbiter for proactive synchronization within a multiprocessor computer system
US10929130B2 (en) Guarded storage event handling during transactional execution
US11010066B2 (en) Identifying processor attributes based on detecting a guarded storage event
AU2018209038A1 (en) Load logical and shift guarded instruction
KR20200083479A (en) Storage fusion system and method
US20090265579A1 (en) Information processing apparatus and error correction method
US8769333B2 (en) Application reliability and fault tolerant chip configurations
US8495452B2 (en) Handling corrupted background data in an out of order execution environment
JP2009181422A (en) Data save unit and method
KR101703173B1 (en) Data cache controller, devices having the same, and method of operating the same
US9201655B2 (en) Method, computer program product, and hardware product for eliminating or reducing operand line crossing penalty
US8533565B2 (en) Cache controller and cache controlling method
US6990556B2 (en) System and method for simultaneous access of the same doubleword in cache storage
US20070300032A1 (en) Early Directory Access of A Double Data Rate Elastic Interface
US11625331B2 (en) Cache control apparatus and cache system control method
JP3476314B2 (en) Microprocessor
JP2013196466A (en) Processor system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100222

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120515

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121002