JPH05100955A - Control system for cache memory - Google Patents

Control system for cache memory

Info

Publication number
JPH05100955A
JPH05100955A JP3257383A JP25738391A JPH05100955A JP H05100955 A JPH05100955 A JP H05100955A JP 3257383 A JP3257383 A JP 3257383A JP 25738391 A JP25738391 A JP 25738391A JP H05100955 A JPH05100955 A JP H05100955A
Authority
JP
Japan
Prior art keywords
cache memory
instruction
read request
processor
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP3257383A
Other languages
Japanese (ja)
Inventor
Kazuo Nagabori
和雄 長堀
Hisamitsu Tanihira
久光 谷平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3257383A priority Critical patent/JPH05100955A/en
Publication of JPH05100955A publication Critical patent/JPH05100955A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To efficiently shorten the processing waiting time for a processor with a smaller storage capacity. CONSTITUTION:A cache memory controller 4 is interposed among a processor 1, a main memory 2 and a cache memory 3, controls registration of an instruction or data in the main memory 2 to the cache memory 3, and when read-out is requested from the processor 1, in accordance with whether an instruction or data corresponding to the read-out request is registered in the cache memory 3 or not, it is read out of the cache memory 3 or the main memory 2 and returned to the processor 1. In such a cache memory control system, when the read-out request of the processor 1 corresponds to the part in which continuity of the instruction is lost on a program, only the instruction or the data corresponding to this read-out request is registered in the cache memory 3.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、キャッシュメモリにお
けるデータの記憶方式に関し、特に少ない記憶容量で効
率的にその機能を発揮することができる、キャッシュメ
モリの制御方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data storage system for a cache memory, and more particularly to a cache memory control system capable of efficiently exhibiting its function with a small storage capacity.

【0002】プロセッサの処理能力を向上させるための
技術として、種々の方式が提案され実行されているが、
その一つに、キャッシュメモリを用いる方法がある。
As a technique for improving the processing capacity of a processor, various systems have been proposed and implemented.
One of them is to use a cache memory.

【0003】キャッシュメモリは、主記憶装置(メイン
メモリ)とプロセッサとの間の動作速度差を調整するた
めに用いられる小容量の高速記憶装置であって、これに
使用頻度の高いメインメモリの内容の一部(命令および
データ)をメインメモリから写しとっておき、プロセッ
サがまずこれにアクセスすることによって、プロセッサ
からみたメインメモリの見かけの動作速度を速くして、
プロセッサの処理待ち時間を短縮し、プロセッサの高速
動作を妨げないようにする機能を有するものである。
The cache memory is a small-capacity high-speed storage device used for adjusting the difference in operating speed between the main storage device (main memory) and the processor, and the contents of the main memory that are frequently used for this purpose. A part of (instruction and data) is copied from the main memory, and the processor first accesses it to increase the apparent operation speed of the main memory as seen from the processor,
It has a function of shortening the processing waiting time of the processor and preventing the high-speed operation of the processor from being hindered.

【0004】このようなキャッシュメモリにおけるデー
タの記憶方式は、少ない記憶容量で効率的にプロセッサ
の処理待ち時間を短縮することが可能なものであること
が要望される。
A data storage system in such a cache memory is required to be capable of efficiently reducing the processing waiting time of the processor with a small storage capacity.

【0005】[0005]

【従来の技術】図5は、従来のキャッシュメモリの制御
方式を示したものであって、11はプロセッサを示し、
12はメインメモリ、13はキャッシュメモリである。
また14はプロセッサ11とメインメモリ12およびキ
ャッシュメモリ13の間に介在して、それぞれのメモリ
からの命令およびデータの読み出しと、キャッシュメモ
リ13におけるメインメモリ12の内容の記憶を制御す
るキャッシュメモリコントローラである。
2. Description of the Related Art FIG. 5 shows a conventional cache memory control system, in which 11 is a processor,
Reference numeral 12 is a main memory, and 13 is a cache memory.
A cache memory controller 14 is provided between the processor 11 and the main memory 12 and the cache memory 13 to control reading of instructions and data from the respective memories and storage of the contents of the main memory 12 in the cache memory 13. is there.

【0006】図5の構成における各部の動作は、次のよ
うにして行なわれる。 プロセッサ11は、キャッシュメモリコントローラ
14に対して、制御線を介して命令またはデータの読み
出し要求を出力し、アドレスバスを介してその命令また
はデータのアドレス(メインメモリのアドレス)指示を
出力する。
The operation of each unit in the configuration of FIG. 5 is performed as follows. The processor 11 outputs a command or data read request to the cache memory controller 14 via a control line, and outputs an address (main memory address) instruction of the command or data via an address bus.

【0007】 キャッシュメモリコントローラ14
は、これを受信して、キャッシュメモリ13に対して、
制御線を介して読み出しのメモリ制御信号を出力し、ア
ドレスバスを介してアドレスを出力する。この場合のア
ドレスは、メインメモリ12に対するアドレスと一定の
相関関係を有し、例えばメインメモリのアドレスの一部
を使用する等、一定の変形を施されている。
Cache memory controller 14
Receives this and, for the cache memory 13,
A read memory control signal is output via the control line, and an address is output via the address bus. The address in this case has a certain correlation with the address for the main memory 12, and is subjected to a certain modification such as using a part of the address of the main memory.

【0008】 キャッシュメモリ13は要求された命
令またはデータを登録していれば、これを出力するの
で、キャッシュメモリコントローラ14は、その内容を
チェックする。この場合のチェックは、例えば、キャッ
シュメモリ13内の命令またはデータに付加されてい
る、メインメモリ12のアドレスに対応して登録された
ことを示す確認情報(タグデータ)をチェックすること
によって行なわれる。
If the requested instruction or data has been registered, the cache memory 13 outputs this so that the cache memory controller 14 checks the content. The check in this case is performed, for example, by checking the confirmation information (tag data) added to the instruction or data in the cache memory 13 and indicating that the instruction or data is registered corresponding to the address of the main memory 12. ..

【0009】 キャッシュメモリ13内に、要求され
たメインメモリのコピーがないときは、キャッシュメモ
リコントローラ14は、メインメモリ12に対して、制
御線を介して読み出し要求を出力し、アドレスバスを介
して、メインメモリのアドレスを出力する。
When there is no requested copy of the main memory in the cache memory 13, the cache memory controller 14 outputs a read request to the main memory 12 via the control line, and outputs the read request to the main memory 12 via the address bus. , Output main memory address.

【0010】 メインメモリ12は、要求された命令
またはデータをキャッシュメモリコントローラ14へ返
送する。
The main memory 12 returns the requested instruction or data to the cache memory controller 14.

【0011】 キャッシュメモリコントローラ14
は、受信した命令またはデータをプロセッサ11へ返送
すると同時に、制御線を介して書き込みのメモリ制御信
号を出力することによって、この命令またはデータをキ
ャッシュメモリ13に書き込む。
Cache memory controller 14
Returns the received instruction or data to the processor 11 and, at the same time, outputs the write memory control signal via the control line, thereby writing the instruction or data in the cache memory 13.

【0012】このように、従来のキャッシュメモリの使
用方法としては、プロセッサが一度読み込んだすべての
命令およびデータのコピーをキャッシュメモリに記憶す
る方法が一般に用いられている。
As described above, as a conventional method of using the cache memory, a method of storing a copy of all the instructions and data read once by the processor in the cache memory is generally used.

【0013】[0013]

【発明が解決しようとする課題】キャッシュメモリにお
いては、プロセッサがキャッシュメモリにアクセスした
とき、所望の命令またはデータがキャッシュメモリ内に
あって、直ちに読み出すことができた(ヒットした)場
合は、プロセッサの処理待ち時間を短縮することができ
るが、所望の命令またはデータがキャッシュメモリ内に
なかったときは、改めてメインメモリにアクセスしなけ
ればならず、所望の命令またはデータを読み出すまで
に、余分な時間が必要になる。
In the cache memory, when the processor accesses the cache memory and the desired instruction or data is in the cache memory and can be immediately read (hit), the processor However, if the desired instruction or data is not in the cache memory, the main memory must be accessed again, and an extra time is required before the desired instruction or data is read. I need time.

【0014】そこで、キャッシュメモリにおけるミスヒ
ットを少なくすることが必要になるが、従来の方式で
は、キャッシュメモリに対する、ミスヒットの確率を小
さくするために、キャッシュメモリとメインメモリとの
マッピング方式を工夫したり、またはキャッシュメモリ
の容量を増加させることによって、できるだけ多くのメ
インメモリのコピーを、キャッシュメモリ内に持たせる
ようにして対応している。
Therefore, it is necessary to reduce the number of miss hits in the cache memory, but in the conventional method, the mapping method of the cache memory and the main memory is devised in order to reduce the probability of the miss hit to the cache memory. By increasing the capacity of the cache memory or by increasing the capacity of the cache memory, it is possible to have as many copies of the main memory as possible in the cache memory.

【0015】一方、プロセッサの処理方式としては、一
つの命令の処理終了時、次の命令の処理に移行する形態
が一般に用いられている。この場合、メインメモリとプ
ロセッサ間のデータ通信速度が、プロセッサにおける命
令処理速度とほぼ同じか、またはプロセッサの命令処理
速度より早い場合には、プロセッサはキャッシュメモリ
がなくても、十分、満足できる処理能力を得ることがで
きる。
On the other hand, as a processing method of a processor, a mode is generally used in which the processing shifts to the processing of the next instruction when the processing of one instruction is completed. In this case, if the data communication speed between the main memory and the processor is almost the same as the instruction processing speed in the processor, or faster than the instruction processing speed in the processor, the processor can perform satisfactory processing without the cache memory. You can gain the ability.

【0016】しかしながら、従来のキャッシュメモリの
記憶方式は、前述のように、プロセッサが一度読み込ん
だすべての命令およびデータのコピーを記憶するもので
あり、従って、無駄の多い方法であるということができ
る。
However, the conventional cache memory storage system stores a copy of all instructions and data once read by the processor, as described above, and thus can be said to be a wasteful method. ..

【0017】プロセッサの処理能力が低下するのは、プ
ログラム上において、処理された命令と次の命令との間
に連続性がない(アドレスの番地が続いていない)場合
である。すなわち、ジャンプ命令または分岐命令と呼ば
れる命令が実行されたときに、メインメモリからジャン
プ先または分岐先の命令が読み出されてプロセッサに届
くまでに時間がかかる場合、すなわちメインメモリとプ
ロセッサ間の通信時間が長くなる場合に、このような処
理能力の低下が生じる。
The processing capability of the processor decreases when there is no continuity between the processed instruction and the next instruction on the program (address addresses do not continue). That is, when an instruction called a jump instruction or a branch instruction is executed, it takes time to read the instruction at the jump destination or branch destination from the main memory and reach the processor, that is, communication between the main memory and the processor. Such a reduction in processing capacity occurs when the time becomes long.

【0018】そこで、このようなメインメモリとプロセ
ッサ間の通信時間が長くなる場合にのみキャッシュメモ
リを使用することによって、少ない容量のキャッシュメ
モリを用いて、プロセッサの処理待ち時間を短縮して、
プロセッサの命令処理能力の低下を防止するようにする
ことが考えられるが、従来、このようなキャッシュメモ
リの使用方法は提案されていなかった。
Therefore, by using the cache memory only when the communication time between the main memory and the processor becomes long, the processing waiting time of the processor is shortened by using the cache memory with a small capacity.
Although it is possible to prevent the reduction of the instruction processing capability of the processor, conventionally, such a method of using the cache memory has not been proposed.

【0019】本発明はこのような従来技術の課題を解決
しようとするものであって、少ない容量のキャッシュメ
モリを用いて、メインメモリとプロセッサ間の通信時間
が長くなることを防止し、プロセッサの処理待ち時間を
短縮することができるキャッシュメモリの制御方式を提
供することを目的としている。
The present invention is intended to solve such a problem of the prior art, and uses a cache memory having a small capacity to prevent the communication time between the main memory and the processor from increasing, and It is an object of the present invention to provide a cache memory control method capable of reducing the processing waiting time.

【0020】[0020]

【課題を解決するための手段】本発明は、プロセッサ1
と、メインメモリ2およびキャッシュメモリ3の間に介
在して、メインメモリ2内の命令またはデータのキャッ
シュメモリ3への登録を制御するとともに、プロセッサ
1からの読み出し要求があったとき、この読み出し要求
に対応する命令またはデータのキャッシュメモリ3内に
おける登録の有無に応じて、これをキャッシュメモリ3
またはメインメモリ2から読み出してプロセッサ1に返
送するキャッシュメモリコントローラ4において、プロ
セッサ1の読み出し要求がプログラム上において命令の
連続性が失われている箇所に対応するものであるとき
の、この読み出し要求に対応する命令またはデータのみ
をキャッシュメモリ3内に登録するものである。
According to the present invention, a processor 1 is provided.
And controlling the registration of instructions or data in the main memory 2 in the cache memory 3 by interposing between the main memory 2 and the cache memory 3, and when there is a read request from the processor 1, this read request Depending on whether or not the instruction or data corresponding to is registered in the cache memory 3,
Alternatively, in the cache memory controller 4 which reads from the main memory 2 and returns it to the processor 1, when the read request of the processor 1 corresponds to a location where instruction continuity is lost on the program, Only the corresponding instruction or data is registered in the cache memory 3.

【0021】また本発明はこのようなキャッシュメモリ
制御方式において、前回の読み出し要求時のアドレスに
+1した値と、今回の読み出し要求時のアドレスとを比
較して不一致時、今回の読み出し要求がプログラム上に
おいて命令の連続性が失われている箇所に対応するもの
であることを判別する読み出し要求判別手段5を設けた
ものである。
Further, according to the present invention, in such a cache memory control system, the value obtained by adding +1 to the address at the time of the previous read request is compared with the address at the time of the current read request, and when they do not match, the current read request is programmed. The read request discriminating means 5 for discriminating that the instruction corresponds to the portion where the continuity of the instruction is lost is provided.

【0022】また本発明は、このようなキャッシュメモ
リコントローラ4において、プロセッサ1の読み出し要
求がプログラム上において命令の連続性が失われている
箇所に対応するものであることを記憶する読み出し要求
記憶手段5を備え、メインメモリ2からこのような読み
出し要求に対応する命令またはデータが読み出されたと
き、読み出し要求記憶手段5の記憶に基づいて、これを
キャッシュメモリ3内に登録するものである。
Further, according to the present invention, in such a cache memory controller 4, the read request storage means for storing that the read request of the processor 1 corresponds to a portion where the continuity of instructions is lost on the program. When the instruction or data corresponding to such a read request is read from the main memory 2, it is registered in the cache memory 3 based on the storage of the read request storage means 5.

【0023】[0023]

【作用】図1は、本発明の原理的構成を示したものであ
る。キャッシュメモリコントローラ4は、プロセッサ1
と、メインメモリ2およびキャッシュメモリ3の間に介
在するものであり、メインメモリ2内の命令またはデー
タのキャッシュメモリ3への登録を制御するとともに、
プロセッサ1からの読み出し要求があったとき、この読
み出し要求に対応する命令またはデータがキャッシュメ
モリ3内に登録されているときは、これをキャッシュメ
モリ3から読み出し、キャッシュメモリ3内に登録され
ていないときは、これをメインメモリ2から読み出して
プロセッサ1に返送する機能を行なう。
FIG. 1 shows the principle of the present invention. The cache memory controller 4 is the processor 1
And is interposed between the main memory 2 and the cache memory 3, and controls registration of instructions or data in the main memory 2 in the cache memory 3 and
When there is a read request from the processor 1, if an instruction or data corresponding to this read request is registered in the cache memory 3, this is read from the cache memory 3 and is not registered in the cache memory 3. At this time, the function of reading this from the main memory 2 and returning it to the processor 1 is performed.

【0024】このようなキャッシュメモリコントローラ
4において、プロセッサ1の読み出し要求がプログラム
上において命令の連続性が失われている箇所に対応する
ものであるときの、この読み出し要求に対応する命令ま
たはデータのみをキャッシュメモリ3内に登録するよう
にする。
In such a cache memory controller 4, when the read request of the processor 1 corresponds to a location where the continuity of instructions is lost on the program, only the instruction or data corresponding to this read request is issued. Are registered in the cache memory 3.

【0025】このように本発明のキャッシュメモリの制
御方式では、ジャンプ命令または分岐命令のように、プ
ロセッサの処理能力を低下させる上で影響が大きい、命
令の連続性を乱す読み出し要求に対応する命令またはデ
ータのみをキャッシュメモリに登録するので、少ない容
量のキャッシュメモリを用いて、効率的にプロセッサの
処理能力の低下を防止することができる。
As described above, according to the cache memory control method of the present invention, an instruction such as a jump instruction or a branch instruction, which has a great influence on reducing the processing capability of the processor, corresponds to a read request which disturbs the continuity of the instruction. Alternatively, since only the data is registered in the cache memory, it is possible to efficiently prevent the deterioration of the processing capability of the processor by using the cache memory having a small capacity.

【0026】また、このようなキャッシュメモリの制御
方式において、読み出し要求判別手段5を設けて、前回
の読み出し要求時のアドレスに+1した値と、今回の読
み出し要求時のアドレスとを比較して不一致時、今回の
読み出し要求がプログラム上において命令の連続性が失
われている箇所に対応するものであることを判別するこ
とによって、通常の読み出し要求と、ジャンプ命令また
は分岐命令のように、命令の連続性を乱す読み出し要求
とを区別して出力することができないプロセッサの場合
でも、命令の連続性を乱す読み出し要求に対応する命令
またはデータのみをキャッシュメモリに登録することが
できる。
Further, in such a cache memory control system, the read request discriminating means 5 is provided, and the value obtained by adding +1 to the address at the time of the previous read request and the address at the time of the current read request are compared and they do not match. At this time, by determining that the read request this time corresponds to the part where the continuity of the instruction is lost in the program, the normal read request and the instruction Even in the case of a processor that cannot output a read request that disturbs continuity separately, only an instruction or data corresponding to a read request that disturbs instruction continuity can be registered in the cache memory.

【0027】さらにこれらの場合に、キャッシュメモリ
コントローラ4に読み出し要求記憶手段5を設けて、プ
ロセッサ1の読み出し要求がプログラム上において命令
の連続性が失われている箇所に対応するものであること
を記憶し、この記憶結果に基づいて、メインメモリ2か
らこのような読み出し要求に対応する命令またはデータ
が読み出されたとき、これをキャッシュメモリ3内に登
録するようにすることによって、キャッシュメモリ内
に、命令の連続性を乱す読み出し要求に対応する命令ま
たはデータのみを登録することができる。
Further, in these cases, the cache memory controller 4 is provided with the read request storage means 5 so that the read request of the processor 1 corresponds to a portion where the continuity of instructions is lost on the program. When the instruction or data corresponding to such a read request is stored in the cache memory 3 based on the stored result, the cache memory 3 stores the instruction or data. In addition, only an instruction or data corresponding to a read request that disturbs the continuity of instructions can be registered.

【0028】[0028]

【実施例】図2は、本発明の一実施例の構成を示したも
のであって、図5におけると同じものを同じ番号で示し
ている。11Aは本発明の場合のプロセッサを示し、1
4Aは本発明におけるキャッシュメモリコントローラで
ある。また、15,16はプロセッサ11Aとキャッシ
ュメモリコントローラ14Aとを接続する、それぞれ第
1および第2の制御線である。
FIG. 2 shows the structure of an embodiment of the present invention, in which the same components as those in FIG. 5 are designated by the same reference numerals. 11A indicates a processor in the case of the present invention, 1
4A is a cache memory controller in the present invention. Reference numerals 15 and 16 are first and second control lines connecting the processor 11A and the cache memory controller 14A, respectively.

【0029】図2の構成における各部の動作は、次のよ
うにして行なわれる。 プロセッサ11Aは、キャッシュメモリコントロー
ラ14Aに対して、制御線を介して命令またはデータの
読み出し要求を出力し、アドレスバスを介してその命令
またはデータのアドレス(メインメモリのアドレス)指
示を出力する。この際、読み出し要求が通常の要求であ
れば、制御線15を介して出力し、ジャンプ命令または
分岐命令によって発生した読み出し要求のときは、制御
線16を介して出力する。
The operation of each unit in the configuration of FIG. 2 is performed as follows. The processor 11A outputs a command or data read request to the cache memory controller 14A via the control line, and outputs an address (main memory address) instruction of the command or data via the address bus. At this time, if the read request is a normal request, it is output via the control line 15, and if it is a read request generated by a jump instruction or a branch instruction, it is output via the control line 16.

【0030】 キャッシュメモリコントローラ14A
は、これを受信して、キャッシュメモリ13に対して、
制御線を介して読み出しのメモリ制御信号を出力し、ア
ドレスバスを介してアドレスを出力する。この際、読み
出し要求が制御線16を介して入力された、ジャンプ命
令または分岐命令によって発生した読み出し要求のとき
は、その旨を記憶する。
Cache memory controller 14A
Receives this and, for the cache memory 13,
A read memory control signal is output via the control line, and an address is output via the address bus. At this time, if the read request is a read request input via the control line 16 and is generated by a jump instruction or a branch instruction, the fact is stored.

【0031】 キャッシュメモリ13は要求された命
令またはデータを登録していれば、これを出力するの
で、キャッシュメモリコントローラ14Aは、その内容
をチェックする。
If the requested instruction or data has been registered, the cache memory 13 outputs it, so the cache memory controller 14 A checks the content.

【0032】 キャッシュメモリ13に、要求された
メインメモリのコピーがないときは、キャッシュメモリ
コントローラ14Aは、メインメモリ12に対して、制
御線を介して読み出し要求を出力し、アドレスバスを介
して、メインメモリのアドレスを出力する。
When the requested copy of the main memory is not present in the cache memory 13, the cache memory controller 14 A outputs a read request to the main memory 12 via the control line, and then, via the address bus, Outputs the main memory address.

【0033】 メインメモリ12は、要求された命令
またはデータをキャッシュメモリコントローラ14Aへ
返送する。
The main memory 12 returns the requested instruction or data to the cache memory controller 14A.

【0034】 キャッシュメモリコントローラ14A
は、受信した命令またはデータをプロセッサ11Aへ返
送すると同時に、この命令またはデータがの段階で記
憶された、ジャンプ命令または分岐命令によって発生し
た読み出し要求に対応するものであったときは、制御線
を介して書き込みのメモリ制御信号を出力することによ
って、これをキャッシュメモリ13に登録する。これ以
外の命令またはデータはキャッシュメモリ13への登録
を行なわない。
Cache memory controller 14A
Returns the received instruction or data to the processor 11A and, at the same time, when this instruction or data corresponds to the read request generated by the jump instruction or the branch instruction stored at the step of, the control line is set. This is registered in the cache memory 13 by outputting a memory control signal for writing via. Other instructions or data are not registered in the cache memory 13.

【0035】図3は、図2の実施例において使用するプ
ロセッサを示したものである。プロセッサ11Aは、命
令またはデータ読み出し要求を、通常の読み出し要求
と、ジャンプ命令または分岐命令によって発生した読み
出し要求とを、分けて出力することができ、これらの要
求は、それぞれ制御線15と16とを介して出力される
ことが示されている。
FIG. 3 shows a processor used in the embodiment of FIG. The processor 11A can separately output an instruction or data read request into a normal read request and a read request generated by a jump instruction or a branch instruction, and these requests are output as control lines 15 and 16, respectively. It is shown to be output via the.

【0036】図4は、本発明の他の実施例の構成を示し
たものであって、図2におけると同じものを同じ番号で
示している。11は図5に示された従来方式の場合と同
様のプロセッサを示し、17は読み出し要求を、通常の
読み出し要求と、ジャンプ命令または分岐命令に対応す
る読み出し要求とに分別する読み出し要求分別回路であ
る。
FIG. 4 shows the configuration of another embodiment of the present invention, in which the same components as in FIG. 2 are designated by the same reference numerals. Reference numeral 11 denotes a processor similar to that of the conventional system shown in FIG. 5, and 17 is a read request classification circuit for classifying a read request into a normal read request and a read request corresponding to a jump instruction or a branch instruction. is there.

【0037】読み出し要求分別回路17において、21
は入力データに対して+1する+1回路、22は、入力
データを一時保持する保持回路であって、例えばフリッ
プフロップやラッチ回路によって構成される。23は、
二入力を比較する比較回路、24は、入力を二出力に切
り替えるセレクタである。
In the read request classification circuit 17, 21
Is a +1 circuit that adds +1 to the input data, and 22 is a holding circuit that temporarily holds the input data, and is composed of, for example, a flip-flop or a latch circuit. 23 is
A comparison circuit for comparing two inputs, and 24 is a selector for switching the input to two outputs.

【0038】プロセッサ11から読み出し要求が発生し
たとき、読み出し要求分別回路17では、+1回路21
でプロセッサ11から出力されたアドレスの値に+1し
て、保持回路22に次の読み出し要求発生時まで保持す
る。次の読み出し要求発生時、比較回路22は保持回路
22に保持されたアドレスと、プロセッサ11から出力
されたアドレスとを比較して、一致または不一致を示す
出力を発生する。セレクタ24は、比較回路22の出力
に応じて、プロセッサ11からの読み出し要求を切り換
えて出力する。
When a read request is issued from the processor 11, the read request classification circuit 17 includes a +1 circuit 21.
Then, the value of the address output from the processor 11 is incremented by 1 and held in the holding circuit 22 until the next read request is generated. When the next read request is generated, the comparison circuit 22 compares the address held in the holding circuit 22 with the address output from the processor 11, and generates an output indicating a match or a mismatch. The selector 24 switches and outputs the read request from the processor 11 according to the output of the comparison circuit 22.

【0039】比較回路23における一致時は、アドレス
が連続でありプログラム上における命令の連続性が失わ
れていないので、セレクタ24からの出力は通常の読み
出し要求であって、制御線15を介してキャッシュメモ
リコントローラ14Aに入力される。比較回路23にお
ける不一致時は、アドレスが不連続でありプログラム上
における命令の連続性が失われているので、セレクタ2
4からの出力はジャンプ命令または分岐命令に対応する
読み出し要求であって、制御線16を介してキャッシュ
メモリコントローラ14Aに入力される。
At the time of a match in the comparison circuit 23, the addresses are continuous and the continuity of the instructions on the program is not lost, so the output from the selector 24 is a normal read request and is sent via the control line 15. It is input to the cache memory controller 14A. When the comparison circuit 23 does not match, the addresses are discontinuous and the instruction continuity on the program is lost. Therefore, the selector 2
The output from 4 is a read request corresponding to a jump instruction or a branch instruction, and is input to the cache memory controller 14A via the control line 16.

【0040】従って図4に示された実施例によれば、命
令またはデータ読み出し要求を、通常の読み出し要求
と、ジャンプ命令または分岐命令に基づく読み出し要求
とに区別して出力することができないプロセッサ11の
場合でも、キャッシュメモリコントローラ14Aは、図
2の実施例の場合と同様に動作して、プログラム上にお
ける命令の連続性を乱す読み出し要求に対応する命令ま
たはデータのみを、キャッシュメモリ13に登録するこ
とができる。
Therefore, according to the embodiment shown in FIG. 4, the instruction or data read request of the processor 11 which cannot output the read request separately from the normal read request and the read request based on the jump instruction or the branch instruction. Even in such a case, the cache memory controller 14A operates in the same manner as in the embodiment of FIG. 2 and registers only the instruction or data corresponding to the read request that disturbs the continuity of instructions on the program in the cache memory 13. You can

【0041】[0041]

【発明の効果】以上説明したように本発明によれば、プ
ロセッサの処理能力を低下させる上で影響が大きい、ジ
ャンプ命令または分岐命令のように、プログラム上にお
ける命令の連続性を乱す読み出し要求に対応する命令ま
たはデータのみをキャッシュメモリに登録するようにし
たので、少ない容量のキャッシュメモリを用いて、従来
のすべての命令またはデータを記憶する方式のキャッシ
ュメモリの場合と同等の、プロセッサ処理能力を得るこ
とができる。
As described above, according to the present invention, a read request that disturbs the continuity of instructions in a program, such as a jump instruction or a branch instruction, which has a large effect on reducing the processing capability of a processor. Since only the corresponding instructions or data are registered in the cache memory, a processor capacity equivalent to that of the conventional cache memory that stores all instructions or data is used with a small capacity cache memory. Obtainable.

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

【図1】本発明の原理的構成を示す図である。FIG. 1 is a diagram showing a principle configuration of the present invention.

【図2】本発明の一実施例の構成を示す図である。FIG. 2 is a diagram showing a configuration of an exemplary embodiment of the present invention.

【図3】図2の実施例において使用するプロセッサを示
す図である。
FIG. 3 shows a processor used in the embodiment of FIG.

【図4】本発明の他の実施例の構成を示す図である。FIG. 4 is a diagram showing the configuration of another embodiment of the present invention.

【図5】従来のキャッシュメモリの制御方式を示す図で
ある。
FIG. 5 is a diagram showing a conventional cache memory control method.

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

1 プロセッサ 2 メインメモリ 3 キャッシュメモリ 4 キャッシュメモリコントローラ 5 読み出し要求判別手段 6 読み出し要求記憶手段 1 Processor 2 Main Memory 3 Cache Memory 4 Cache Memory Controller 5 Read Request Discriminating Means 6 Read Request Storage Means

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサ(1)と、メインメモリ
(2)およびキャッシュメモリ(3)の間に介在して、
メインメモリ(2)内の命令またはデータのキャッシュ
メモリ(3)への登録を制御するとともに、プロセッサ
(1)からの読み出し要求があったとき、該読み出し要
求に対応する命令またはデータのキャッシュメモリ
(3)内における登録の有無に応じて、これをキャッシ
ュメモリ(3)またはメインメモリ(2)から読み出し
てプロセッサ(1)に返送するキャッシュメモリコント
ローラ(4)において、プロセッサ(1)の読み出し要
求がプログラム上において命令の連続性が失われている
箇所に対応するものであるときの、該読み出し要求に対
応する命令またはデータのみをキャッシュメモリ(3)
内に登録するようにしたことを特徴とするキャッシュメ
モリの制御方式。
1. A processor (1) interposed between a main memory (2) and a cache memory (3),
The instruction or data in the main memory (2) is controlled to be registered in the cache memory (3), and when a read request is issued from the processor (1), the instruction or data cache memory corresponding to the read request ( In the cache memory controller (4) which reads out from the cache memory (3) or the main memory (2) and returns it to the processor (1) according to the presence / absence of registration in 3), a read request from the processor (1) is issued. The cache memory (3) stores only the instruction or data corresponding to the read request when the instruction corresponds to a portion where the continuity of the instruction is lost on the program.
A cache memory control method characterized by being registered in the cache memory.
【請求項2】 請求項1に記載のキャッシュメモリ制御
方式において、前回の読み出し要求時のアドレスに+1
した値と、今回の読み出し要求時のアドレスとを比較し
て不一致時、今回の読み出し要求がプログラム上におい
て命令の連続性が失われている箇所に対応するものであ
ることを判別する読み出し要求判別手段(5)を設けた
ことを特徴とするキャッシュメモリの制御方式。
2. The cache memory control method according to claim 1, wherein the address at the time of the previous read request is +1.
When the read request and the address at the time of this read request do not match, the read request at this time corresponds to the part where the continuity of instructions is lost in the program. A method for controlling a cache memory, characterized in that means (5) is provided.
【請求項3】 前記キャッシュメモリコントローラ
(4)において、プロセッサ(1)の読み出し要求がプ
ログラム上において命令の連続性が失われている箇所に
対応するものであるとき該要求を記憶する読み出し要求
記憶手段(6)を備え、メインメモリ(2)から該読み
出し要求に対応する命令またはデータが読み出されたと
き該記憶に基づいてこれをキャッシュメモリ(3)内に
登録することを特徴とする請求項1または2に記載のキ
ャッシュメモリの制御方式。
3. A read request memory for storing, in the cache memory controller (4), a read request of the processor (1) when the read request corresponds to a location where instruction continuity is lost on a program. Means (6), characterized in that when an instruction or data corresponding to the read request is read from the main memory (2), it is registered in the cache memory (3) based on the storage. Item 3. A cache memory control method according to Item 1 or 2.
JP3257383A 1991-10-04 1991-10-04 Control system for cache memory Withdrawn JPH05100955A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3257383A JPH05100955A (en) 1991-10-04 1991-10-04 Control system for cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3257383A JPH05100955A (en) 1991-10-04 1991-10-04 Control system for cache memory

Publications (1)

Publication Number Publication Date
JPH05100955A true JPH05100955A (en) 1993-04-23

Family

ID=17305627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3257383A Withdrawn JPH05100955A (en) 1991-10-04 1991-10-04 Control system for cache memory

Country Status (1)

Country Link
JP (1) JPH05100955A (en)

Similar Documents

Publication Publication Date Title
JPS59165144A (en) Order extractor
US6826636B2 (en) Method and architecture capable of programming and controlling access data and instructions
US6952761B2 (en) Bus interface selection by page table attributes
US5829035A (en) System and method for preventing stale data in multiple processor computer systems
US5649231A (en) Storage control method and apparatus having a buffer storage for transferring variable amounts of data to a main storage based on current system load
KR0128272B1 (en) Information processing system and method of operation including cache memory
KR960007833B1 (en) Method and apparatus for fast page mode selection
JPH0816472A (en) Data processor
JPH09218823A (en) Cache memory controller
JPH05100955A (en) Control system for cache memory
US5233700A (en) Address translation device with an address translation buffer loaded with presence bits
US6526485B1 (en) Apparatus and method for bad address handling
US6374344B1 (en) Methods and apparatus for processing load instructions in the presence of RAM array and data bus conflicts
JP2001229074A (en) Memory controller and information processor and memory control chip
JP3161422B2 (en) Microcomputer
JP2762797B2 (en) Information processing apparatus of pipeline configuration having instruction cache
JPH0520192A (en) Cache memory store system
JPH02307123A (en) Computer
JPH08166905A (en) Cache memory control method
JPH0769863B2 (en) Data processing device
JPH0528414B2 (en)
JPH1055308A (en) Cache memory
JPH04359336A (en) Data substituting circuit for cache memory
JPS6389951A (en) Cache memory device
JPS6266350A (en) Cache memory

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990107