JPH0877072A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPH0877072A
JPH0877072A JP6206634A JP20663494A JPH0877072A JP H0877072 A JPH0877072 A JP H0877072A JP 6206634 A JP6206634 A JP 6206634A JP 20663494 A JP20663494 A JP 20663494A JP H0877072 A JPH0877072 A JP H0877072A
Authority
JP
Japan
Prior art keywords
address
data
instruction
bus
storage area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6206634A
Other languages
Japanese (ja)
Inventor
Isao Uchiumi
功朗 内海
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP6206634A priority Critical patent/JPH0877072A/en
Publication of JPH0877072A publication Critical patent/JPH0877072A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE: To prevent a cache hit rate from decreasing depending upon an application program and to prevent the execution efficiency of the application program from decreasing at the time of an access conflict. CONSTITUTION: A two-way associative cache memory consists of tag memories 410 and 412 and data memories 417 and 421. An instruction address from an instruction address bus 401 and a data address from a data address bus 402 are distributed to respective ways of the cache memory by registers 403, 404, and 405, and multiplexers 406, 407, 408, and 409. Coincidence circuits 411 and 413 decide whether or not the tag addresses of the distributed addresses are registered in the tag memories 410 and 412. When they are registered, data memories 417 and 421 are accessed by registers 414 and 415, multiplexers 416 and 420, and bus drivers 418, 419, 422, and 423.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、中央処理装置と主記
憶装置の間で、命令やデータを一時的に保持するための
キャッシュメモリ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory device for temporarily holding instructions and data between a central processing unit and a main storage device.

【0002】[0002]

【従来の技術】一般に、コンピュータシステムにおいて
は、中央処理装置(以下、「CPU」という。)と主記
憶装置(以下、「メインメモリ」という。)の動作速度
の違いを調整するために、キャッシュメモリ装置を設け
るようになっている。
2. Description of the Related Art Generally, in a computer system, a cache is used in order to adjust the difference in operating speed between a central processing unit (hereinafter referred to as "CPU") and a main storage device (hereinafter referred to as "main memory"). A memory device is provided.

【0003】このキャッシュメモリ装置は、命令やデー
タが格納されるメモリ部(キャッシュメモリ)と、これ
を制御する制御部とからなり、メモリ部を高速素子で構
成することにより、CPUとメインメモリの動作速度の
違いを調整するようになっている。
This cache memory device comprises a memory unit (cache memory) for storing instructions and data, and a control unit for controlling the memory unit. By configuring the memory unit with high-speed elements, the CPU and the main memory are separated. It is designed to adjust for differences in operating speed.

【0004】ところで、コンピュータシステムのアーキ
テクチャの1つとして、バスを命令用のバスとデータ用
のバスに分離したハーバード・アーキテクチャがある。
このハーバード・アーキテクチャ構成のコンピュータシ
ステムにおいても、キャッシュメモリ装置が設けられ
る。この場合のキャッシュメモリ装置の接続方法として
は、従来、次の2つの方法が考えられている。
By the way, as one of computer system architectures, there is a Harvard architecture in which a bus is separated into an instruction bus and a data bus.
A cache memory device is also provided in the computer system having the Harvard architecture. Conventionally, the following two methods have been considered as connection methods for the cache memory device in this case.

【0005】1つは、バスコントロールユニットとメイ
ンメモリとの間に、命令アクセスとデータアクセスで共
用されるキャッシュメモリ装置(以下、「ユニファイド
キャッシュ」という。)を挿入する方法(以下、「第1
の方法」という。)である。ここで、バスコントロール
ユニットとは、命令バスとデータバスからのアクセスを
調整するユニットである。
One is a method of inserting a cache memory device (hereinafter, referred to as "unified cache") shared between instruction access and data access between the bus control unit and the main memory (hereinafter, referred to as "first cache"). 1
Method. ). Here, the bus control unit is a unit that adjusts access from the instruction bus and the data bus.

【0006】もう1つは、バスコントロールユニットの
前に、命令バスとデータバスのそれぞれに対応した専用
のキャッシュメモリ装置(以下、「専用キャッシュ」と
いう。)を設ける方法(以下、「第2の方法」とい
う。)である。すなわち、バスコントロールユニットの
前に、命令アクセス専用のキャッシュメモリ装置(以
下、「命令キャッシュ」という。)と、データアクセス
専用のキャッシュメモリ装置(以下、「データキャッシ
ュ」という。)を設ける方法である。
The other is to provide a dedicated cache memory device (hereinafter referred to as "dedicated cache") corresponding to each of the instruction bus and the data bus in front of the bus control unit (hereinafter referred to as "second cache"). Method.)). That is, in this method, a cache memory device dedicated to instruction access (hereinafter referred to as "instruction cache") and a cache memory device dedicated to data access (hereinafter referred to as "data cache") are provided in front of the bus control unit. .

【0007】図2は、第1の方法によって構成されたコ
ンピュータシステム、すなわち、ユニファイドキャッシ
ュを備えたコンピュータシステムの構成を示すブロック
図である。
FIG. 2 is a block diagram showing the configuration of a computer system configured by the first method, that is, a computer system having a unified cache.

【0008】図2において、101はCPU、102は
命令アドレスバス、103は命令バス、104はデータ
アドレスバス、105はデータバス、106はバスコン
トロールユニット、107はユニファイドキャッシュ、
108は外部アドレスバス、109は外部データバス、
110はメインメモリである。
In FIG. 2, 101 is a CPU, 102 is an instruction address bus, 103 is an instruction bus, 104 is a data address bus, 105 is a data bus, 106 is a bus control unit, 107 is a unified cache,
108 is an external address bus, 109 is an external data bus,
110 is a main memory.

【0009】以下、図2における動作を説明する。CP
U101は、命令をアクセスする場合、命令アドレスバ
ス102を介して命令アクセス要求をバスコントロール
ユニット106に送る。これに対し、データをアクセス
する場合は、データアドレスバス104を介してデータ
アクセス要求をバスコントロールユニット106に送
る。
The operation in FIG. 2 will be described below. CP
When accessing an instruction, the U 101 sends an instruction access request to the bus control unit 106 via the instruction address bus 102. On the other hand, when accessing data, a data access request is sent to the bus control unit 106 via the data address bus 104.

【0010】バスコントロールユニット106は、命令
アクセス要求またはデータアクセス要求を受けると、命
令アドレスバス102またはデータアドレスバス104
から選択したアクセスのアドレスを外部アドレスバス1
08を介してユニファイドキャッシュ107に転送す
る。
When the bus control unit 106 receives an instruction access request or a data access request, the instruction address bus 102 or the data address bus 104.
The address of the access selected from the external address bus 1
08 to the unified cache 107.

【0011】なお、バスコントロールユニット106
は、命令アクセス要求とデータアクセス要求が同時にC
PU101から発行された場合、いずれか一方を選択す
る。この場合は、他方は、一方のアクセスが終了するま
で待たされる。
The bus control unit 106
Is an instruction access request and a data access request at the same time.
When issued from the PU 101, one of them is selected. In this case, the other waits until one access ends.

【0012】ユニファイドキャッシュ107のメモリ部
に、アクセスされたデータが登録されている場合、すな
わち、キャッシュ・ヒットの場合、このデータは、外部
データバス109を介してバスコントロールユニット1
06に転送される。
When the accessed data is registered in the memory section of the unified cache 107, that is, in the case of a cache hit, this data is transmitted via the external data bus 109 to the bus control unit 1.
06.

【0013】バスコントロールユニット106は、外部
データバス109からデータを受けると、このデータを
アクセス要求を受けた側、もしくは、命令アクセス要求
とデータアクセス要求を同時に受けた場合は、選択した
アクセス要求を受けた側のバスに出力する。
When the bus control unit 106 receives data from the external data bus 109, it receives the data, or if it receives both the instruction access request and the data access request at the same time, it sends the selected access request. Output to the receiving bus.

【0014】すなわち、バスコントロールユニット10
6は、命令アクセス要求を受けて、あるいは、選択し
て、外部アドレスバス108に命令アクセス側のアクセ
ス要求を発行した場合、外部データバス109からの命
令を命令バス103を介してCPU101に転送する。
That is, the bus control unit 10
When the instruction access request is received or selected and the instruction access side access request is issued to the external address bus 108, 6 transfers the instruction from the external data bus 109 to the CPU 101 via the instruction bus 103. .

【0015】一方、バスコントロールユニット106
は、データアクセス要求を受けて、あるいは、選択し
て、外部アドレスバス108にデータアクセス側のアク
セス要求を発行した場合、外部データバス109からの
データをデータバス105を介してCPU101に転送
する。
On the other hand, the bus control unit 106
When the data access request is received or selected and the data access side access request is issued to the external address bus 108, the data from the external data bus 109 is transferred to the CPU 101 via the data bus 105.

【0016】ユニファイドキャッシュ107は、バスコ
ントロールユニット106からのアクセス要求でアクセ
スしたデータがメモリ部に登録されていない場合、すな
わち、キャッシュ・ミスの場合、メインメモリ110か
らこのデータを取り出し、外部データバス109を通し
てバスコントロールユニット106に転送する。この
時、ユニファイドキャッシュ107は、外部データバス
109上のデータを自身のメモリ部にも登録する。
The unified cache 107 takes out this data from the main memory 110 when the data accessed by the access request from the bus control unit 106 is not registered in the memory section, that is, in the case of a cache miss, and the external data is fetched. Transfer to the bus control unit 106 through the bus 109. At this time, the unified cache 107 also registers the data on the external data bus 109 in its own memory unit.

【0017】以上が、ユニファイドキャッシュを備えた
コンピュータシステムの構成である。 このような構成
によれば、バスコントロールユニット106からは、命
令アクセス要求とデータアクセス要求が混在した形で出
力される。これにより、ユニファイドキャッシュ107
には、命令とデータの両方が登録される。
The above is the configuration of the computer system provided with the unified cache. According to this structure, the bus control unit 106 outputs the instruction access request and the data access request in a mixed form. As a result, the unified cache 107
Both the command and the data are registered in.

【0018】この場合、使用頻度の高い命令の数が使用
頻度の高いデータの数より多い場合は、ユニファイドキ
ャッシュ107には、命令の方がデータよりも多く登録
される。逆に、使用頻度の高いデータの数が使用頻度の
高い命令の数より多い場合は、データの方が命令よりも
多く登録される。
In this case, when the number of frequently used instructions is larger than the number of frequently used data, more instructions are registered in the unified cache 107 than data. On the contrary, when the number of frequently used data is larger than the number of frequently used instructions, the data is registered more than the instructions.

【0019】これにより、CPU101で実行されるア
プリケーションプログラムに合せて、ユニファイドキャ
ッシュに命令やデータを登録することができるため、キ
ャッシュヒット率を高めることができる。
As a result, instructions and data can be registered in the unified cache in accordance with the application program executed by the CPU 101, so that the cache hit rate can be increased.

【0020】図3は、第2の方法によって構成されたコ
ンピュータシステム、すなわち、専用キャッシュを備え
たコンピュータシステムの構成を示すブロック図であ
る。
FIG. 3 is a block diagram showing the configuration of a computer system configured by the second method, that is, a computer system having a dedicated cache.

【0021】図3において、201はCPU、202は
命令キャッシュ、203は命令アドレスバス、204は
命令バス、205はデータキャッシュ、206はデータ
アドレスバス、207はデータバス、208はバスコン
トロールユニット、209は外部アドレスバス、210
は外部データバス、211はメインメモリである。
In FIG. 3, 201 is a CPU, 202 is an instruction cache, 203 is an instruction address bus, 204 is an instruction bus, 205 is a data cache, 206 is a data address bus, 207 is a data bus, 208 is a bus control unit, 209. Is the external address bus, 210
Is an external data bus, and 211 is a main memory.

【0022】以下、図3における動作を説明する。CP
U201は、命令をアクセスする場合、命令アドレスバ
ス203にアクセスしようとするアドレスを出力する。
命令キャッシュ202は、そのアドレスの命令がメモリ
部に登録されているかどうかを判定する。命令が登録さ
れている場合、すなわち、キャッシュ・ヒットの場合、
命令キャッシュ202は、この命令を命令バス204を
介してCPU201に転送する。これにより、この命令
は、CPU201で実行される。
The operation in FIG. 3 will be described below. CP
When accessing an instruction, the U 201 outputs the address to be accessed to the instruction address bus 203.
The instruction cache 202 determines whether the instruction at that address is registered in the memory unit. If the instruction is registered, ie a cache hit,
The instruction cache 202 transfers this instruction to the CPU 201 via the instruction bus 204. As a result, this instruction is executed by the CPU 201.

【0023】命令が登録されていない場合、すなわち、
キャッシュ・ミスの場合、命令キャッシュ202は、命
令アドレスバス203を介してバスコントロールユニッ
ト208に命令アクセス要求を転送する。バスコントロ
ールユニット208は、この要求を受けると、外部アド
レスバス209を介してメインメモリ211をアクセス
し、アドレスに対応する命令を外部データバス210を
介して取り込む。
If the command is not registered, that is,
In the case of a cache miss, the instruction cache 202 transfers the instruction access request to the bus control unit 208 via the instruction address bus 203. Upon receiving this request, the bus control unit 208 accesses the main memory 211 via the external address bus 209 and fetches the instruction corresponding to the address via the external data bus 210.

【0024】この後、バスコントロールユニット208
は、取り込んだ命令を命令バス204を介してCPU2
01と命令キャッシュ202に転送する。これにより、
この命令は、CPU201で実行されるとともに、その
アドレスとともに命令キャッシュ202のメモリ部に登
録される。
After this, the bus control unit 208
Receives the received instruction via the instruction bus 204 from the CPU 2
01 and the instruction cache 202. This allows
This instruction is executed by the CPU 201 and is registered in the memory unit of the instruction cache 202 together with its address.

【0025】CPU201は、データをアクセスする場
合、データアドレスバス206にアクセスしようとする
アドレスを転送する。データキャッシュ205は、その
アドレスのデータがメモリ部に登録されているかどうか
を判定する。データが登録されている場合、すなわち、
キャッシュ・ヒットの場合、データキャッシュ205
は、これをデータバス207を介してCPU201に転
送する。
When the data is accessed, the CPU 201 transfers the address to be accessed to the data address bus 206. The data cache 205 determines whether or not the data at that address is registered in the memory unit. If the data is registered, that is,
In case of cache hit, data cache 205
Transfers this to the CPU 201 via the data bus 207.

【0026】データが登録されていない場合、すなわ
ち、キャッシュ・ミスの場合、データキャッシュ205
は、データアドレスバス206を介してバスコントロー
ルユニット208に、データアクセス要求を送る。バス
コントロールユニット208は、この要求を受けると、
外部アドレスバス209を介してメインメモリ211を
アクセスし、アドレスに対応するデータを外部データバ
ス210を介して取り込む。
When the data is not registered, that is, when there is a cache miss, the data cache 205
Sends a data access request to the bus control unit 208 via the data address bus 206. When the bus control unit 208 receives this request,
The main memory 211 is accessed via the external address bus 209, and the data corresponding to the address is fetched via the external data bus 210.

【0027】この後、バスコントロールユニット208
は、取り込んだデータをデータバス207を介してCP
U201とデータキャッシュ205に転送する。これに
より、このデータは、CPU201で処理されるととも
に、そのアドレスとともにデータキャッシュ205のメ
モリ部に登録される。
After this, the bus control unit 208
Sends the captured data to the CP via the data bus 207.
Transfer to U201 and data cache 205. As a result, this data is processed by the CPU 201 and registered in the memory unit of the data cache 205 together with its address.

【0028】以上が、専用キャッシュを備えたコンピュ
ータシステムの構成である。このような構成によれば、
CPU201は、命令キャッシュ202とデータキャッ
シュ205のそれぞれに同時にアクセスすることができ
る。これにより、命令アクセスとデータアクセスが競合
した場合でも、一方のアクセスが終わるまで、他方のア
クセスを持つ必要がないので、アクセスの実行効率を高
めることができる。
The above is the configuration of the computer system having the dedicated cache. According to such a configuration,
The CPU 201 can simultaneously access each of the instruction cache 202 and the data cache 205. As a result, even if the instruction access and the data access conflict with each other, it is not necessary to have the other access until the one access ends, so that the access execution efficiency can be improved.

【0029】[0029]

【発明が解決しようとする課題】第1の方法によれば、
上記の如く、CPU101で実行されるアプリケーショ
ンプログラムに合わせて、ユニファイドキャッシュ10
7に命令とデータを登録することができる。これによ
り、この方法によれば、ユニファイドキャッシュ107
をアクセスする際のキャッシュ・ヒット率を高めること
ができる。
According to the first method,
As described above, according to the application program executed by the CPU 101, the unified cache 10
Commands and data can be registered in 7. Thus, according to this method, the unified cache 107
It is possible to increase the cache hit rate when accessing.

【0030】しかしながら、この方法では、命令アクセ
ス要求とデータアクセス要求が競合した場合、一方のア
クセスが終わるまで、他方のアクセスを待たせる必要が
ある。これにより、この方法では、アプリケーションプ
ログラムの実行効率が低下するという問題があった。
However, in this method, when the instruction access request and the data access request conflict with each other, it is necessary to wait the other access until one access ends. As a result, this method has a problem that the execution efficiency of the application program is reduced.

【0031】これに対し、第2の方法によれば、上記の
如く、CPU201は、命令キャッシュ202とデータ
キャッシュ205を同時にアクセスすることができるの
で、命令アクセス要求とデータアクセス要求が競合した
場合でも、アプリケーションプログラムの実行効率が低
下することはない。
On the other hand, according to the second method, as described above, the CPU 201 can access the instruction cache 202 and the data cache 205 at the same time, so that even if the instruction access request and the data access request conflict with each other. , The execution efficiency of the application program does not decrease.

【0032】しかしながら、この第2の方法では、命令
キャッシュ202とデータキャッシュ205の容量が固
定であるため、実行するアプリケーションプログラムに
よっては、キャッシュ・ヒット率が低下する場合がある
という問題があった。
However, in the second method, since the capacity of the instruction cache 202 and the data cache 205 is fixed, there is a problem that the cache hit rate may decrease depending on the application program to be executed.

【0033】すなわち、使用頻度の高い命令数とデータ
数は、CPU201上で実行されるアプリケーションプ
ログラムによって当然異なってくる。
That is, the number of frequently used instructions and the number of data frequently differ depending on the application program executed on the CPU 201.

【0034】例えば、命令数の少ないループ等のアプリ
ケーションプログラムでは、使用頻度の高い命令がわず
かに処理され、使用頻度の高いデータが多量に処理され
る。このようなアプリケーションプログラムを実行する
場合は、命令キャッシュ202の容量を少なくし、デー
タキャッシュ205の容量を多くした方が、データキャ
ッシュ205におけるキャッシュ・ミスの発生回数を少
なくし、CPU201の処理効率を高めることができ
る。
For example, in an application program such as a loop having a small number of instructions, frequently used instructions are slightly processed, and frequently used data are processed in large quantities. When executing such an application program, reducing the capacity of the instruction cache 202 and increasing the capacity of the data cache 205 reduces the number of cache miss occurrences in the data cache 205 and improves the processing efficiency of the CPU 201. Can be increased.

【0035】逆に、使用頻度が高い命令数が多く、使用
頻度の高いデータ数が少ないアプリケーションプログラ
ムを実行する場合は、命令キャッシュ202の容量を多
くし、また、データキャッシュ205の容量を少なくし
た方が、命令キャッシュ202におけるキャッシュ・ミ
スの発生回数を少なくし、CPU201の処理効率を高
めることができる。
On the contrary, when executing an application program having a large number of frequently used instructions and a small number of frequently used data, the capacity of the instruction cache 202 is increased and the capacity of the data cache 205 is reduced. Therefore, the number of cache misses in the instruction cache 202 can be reduced, and the processing efficiency of the CPU 201 can be improved.

【0036】しかしながら、第2の方法では、上記の如
く、命令キャッシュ202とデータキャッシュ205の
容量が固定となっているため、アプリケーションプログ
ラムに合わせて命令とデータの記憶容量を調整すること
ができない。このため、この方法では、キャッシュ・ミ
スが多発してしまうわけである。
However, in the second method, since the capacity of the instruction cache 202 and the data cache 205 is fixed as described above, the storage capacity of the instruction and the data cannot be adjusted according to the application program. Therefore, this method results in frequent cache misses.

【0037】大きなアプリケーションプログラムでは、
命令の使用頻度を高くするループ内の命令数はプログラ
ム内で大きく異なっており、命令キャッシュ202とデ
ータキャッシュ205の容量を固定にしていては、実行
最中のプログラムの変化に対応できず、処理効率が悪く
なる。
In a large application program,
The number of instructions in a loop that increases the frequency of use of instructions is greatly different in the program, and if the capacity of the instruction cache 202 and the data cache 205 is fixed, it is not possible to respond to changes in the program during execution, and It becomes less efficient.

【0038】以上から、ハーバードアーキテクチャ構成
のコンピュータシステムに設けられるキャッシュメモリ
装置においては、アプリケーションプログラムによって
キャッシュ・ヒット率が低下することがあるという問題
と、アクセス競合時にアプリケーションプログラムの実
行効率が低下するという問題を解決することができる装
置が望まれる。
As described above, in the cache memory device provided in the computer system having the Harvard architecture, the problem that the cache hit rate may be lowered by the application program and the execution efficiency of the application program is lowered when access conflicts occur. A device that can solve the problem is desired.

【0039】[0039]

【課題を解決するための手段】上記課題を解決するため
に、この発明は、キャッシュメモリ装置において、キャ
ッシュメモリと、アドレス振分け手段と、登録判定手段
と、アクセス手段とを設けるようにしたものである。
In order to solve the above-mentioned problems, the present invention provides a cache memory device, which is provided with a cache memory, an address distribution unit, a registration determination unit, and an access unit. is there.

【0040】ここで、キャッシュメモリは、互いに独立
にアクセス可能な複数の記憶領域を有し、かつ、各記憶
領域ごとに、主記憶装置のアドレスを保持するアドレス
記憶領域とそのアドレスに格納されている内容を保持す
る内容記憶領域を有する。
Here, the cache memory has a plurality of storage areas that can be accessed independently of each other, and for each storage area, an address storage area for holding the address of the main storage device and the address are stored in that address. It has a content storage area for holding the content stored therein.

【0041】アドレス振分け手段は、メインメモリをア
クセスするための複数のアドレスを複数の記憶領域に振
り分ける機能を有する。登録判定手段は、アドレス振分
け手段により振り分けられたアドレスが対応するアドレ
ス記憶領域に登録されているか否かを判定する機能を有
する。アクセス手段は、アドレスが登録されていると判
定されると、対応する内容記憶領域をアクセスする機能
を有する。
The address allocating means has a function of allocating a plurality of addresses for accessing the main memory to a plurality of storage areas. The registration determining means has a function of determining whether or not the address assigned by the address assigning means is registered in the corresponding address storage area. The access means has a function of accessing the corresponding content storage area when it is determined that the address is registered.

【0042】[0042]

【作用】いま、複数のアドレスが命令アドレスとデータ
アドレスであるとする。この場合、この2つのアドレス
は、例えば、使用頻度の高い命令の数と使用頻度の高い
データの数に応じて、複数の記憶領域に適宜振り分けら
れる。これにより、使用頻度の高い命令の数とデータの
数に応じて、命令とデータの記憶容量を変えることがで
きるので、CPUで実行されるアプリケーションプログ
ラムによって、キャッシュ・ヒット率が低下することが
あるという問題を解決することができる。
Operation: It is now assumed that a plurality of addresses are an instruction address and a data address. In this case, these two addresses are appropriately allocated to a plurality of storage areas according to the number of frequently used instructions and the number of frequently used data, for example. As a result, the storage capacity of instructions and data can be changed according to the number of frequently used instructions and the number of data, so that the cache hit rate may decrease depending on the application program executed by the CPU. The problem can be solved.

【0043】また、キャッシュメモリの各記憶領域が互
いに独立にアクセス可能であるため、CPUは、命令が
格納されている記憶領域とデータが格納されている記憶
領域を同時にアクセスすることができる。これにより、
命令アクセス要求とデータアクセス要求が競合した場合
でも、アプリケーションプログラムの実行効率が低下す
るのを防止することができる。
Since the respective storage areas of the cache memory can be accessed independently of each other, the CPU can simultaneously access the storage area in which the instruction is stored and the storage area in which the data is stored. This allows
Even if the instruction access request and the data access request compete with each other, it is possible to prevent the execution efficiency of the application program from decreasing.

【0044】[0044]

【実施例】以下、図面を参照しながら、この発明の実施
例を詳細に説明する。図1は、この発明の一実施例の構
成を示すブロック図である。なお、以下の説明では、こ
の発明をハーバードアーキテクチャ構成のコンピュータ
システムに設けられるキャッシュメモリ装置に適用する
場合を代表として説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In the following description, the case where the present invention is applied to a cache memory device provided in a computer system having a Harvard architecture will be described as a representative.

【0045】まず、図1に示すキャッシュメモリ装置の
構成を説明する前に、このキャッシュメモリ装置を有す
るコンピュータシステムの構成を図4を参照しながら説
明する。
First, before describing the configuration of the cache memory device shown in FIG. 1, the configuration of a computer system having this cache memory device will be described with reference to FIG.

【0046】図4において、301はCPU、302は
図3の命令キャッシュ202とデータキャッシュ205
を共通化した共通キャッシュ、303は命令アドレスバ
ス、304は命令バス、305はデータアドレスバス、
306はデータバス、307はバスコントロールユニッ
ト、308は外部アドレスバス、309は外部データバ
ス、310はメインメモリである。なお、この実施例の
キャッシュメモリ装置は、共通キャッシュ302に相当
する。
In FIG. 4, 301 is a CPU, 302 is the instruction cache 202 and data cache 205 of FIG.
Common cache, 303 is an instruction address bus, 304 is an instruction bus, 305 is a data address bus,
306 is a data bus, 307 is a bus control unit, 308 is an external address bus, 309 is an external data bus, and 310 is a main memory. The cache memory device of this embodiment corresponds to the common cache 302.

【0047】上記構成において、動作を説明する。ハー
バード・アーキテクチャ構成のCPU301は、命令を
アクセスする場合、命令アドレスバス303にアクセス
したい命令のアドレスを出力する。同様に、データをア
クセスする場合、データアドレスバス305にアクセス
したいデータのアドレスを転送する。
The operation of the above configuration will be described. When accessing an instruction, the CPU 301 of the Harvard architecture configuration outputs the address of the instruction to access to the instruction address bus 303. Similarly, when accessing data, the address of the data to be accessed is transferred to the data address bus 305.

【0048】共通キャッシュ302は、命令アドレスバ
ス303及びデータアドレスバス305を介して命令及
びデータのアクセス要求を並列に処理し、それぞれのア
ドレスがメモリ部に登録されているかどうかを判定す
る。
The common cache 302 processes instruction and data access requests in parallel via the instruction address bus 303 and the data address bus 305, and determines whether each address is registered in the memory unit.

【0049】アクセスした命令が登録されている場合、
すなわち、命令キャッシュ・ヒットの場合には、共通キ
ャッシュ302は、この命令を命令バス304を介して
CPU301に転送する。同様に、アクセスしたデータ
がキャッシュ302に登録されている場合、すなわち、
データキャッシュ・ヒットの場合には、このデータをデ
ータバス306を介してCPU301に転送する。
If the accessed instruction is registered,
That is, in the case of an instruction cache hit, the common cache 302 transfers this instruction to the CPU 301 via the instruction bus 304. Similarly, when the accessed data is registered in the cache 302, that is,
In the case of a data cache hit, this data is transferred to the CPU 301 via the data bus 306.

【0050】アクセスした命令が登録されていない場
合、すなわち、命令キャッシュ・ミスの場合、共通キャ
ッシュ302は、命令アドレスバス203を介してバス
コントロールユニット307にキャッシュ・ミスしたこ
とを通知する。バスコントロールユニット307は、こ
の通知を受けると、外部アドレスバス308を介してメ
インメモリ310をアクセスし、外部データバス309
を介して命令を取り込む。
If the accessed instruction is not registered, that is, if there is an instruction cache miss, the common cache 302 notifies the bus control unit 307 via the instruction address bus 203 of the cache miss. Upon receiving this notification, the bus control unit 307 accesses the main memory 310 via the external address bus 308, and the external data bus 309
Take in the instructions via.

【0051】バスコントロールユニット307に取り込
まれた命令は、命令バス304を介してCPU201に
転送され、このCPU201で実行される。これと同時
に、この命令は、共通キャッシュ302のメモリ部にも
登録される。
The instruction fetched by the bus control unit 307 is transferred to the CPU 201 via the instruction bus 304 and executed by the CPU 201. At the same time, this instruction is also registered in the memory unit of the common cache 302.

【0052】同様に、アクセスしたデータが登録されて
いない場合、すなわち、データキャッシュ・ミスの場
合、キャッシュ302は、バスコントロールユニット3
07にキャッシュ・ミスしたことをデータアドレスバス
305を介して通知する。バスコントロールユニット3
07は、この通知を受けると、外部アドレスバス308
を介してメインメモリ310をアクセスし、外部データ
バス309を介して命令を取り込む。
Similarly, when the accessed data is not registered, that is, when there is a data cache miss, the cache 302 determines that the bus control unit 3
A cache miss in 07 is notified via the data address bus 305. Bus control unit 3
07 receives this notification, and external address bus 308
To access the main memory 310 and fetch an instruction via the external data bus 309.

【0053】バスコントロールユニット307に取り込
まれたデータは、データバス306を介してCPU30
1に転送され、このCPU301で処理される。これと
同時に、このデータは、共通キャッシュ302のメモリ
部にも登録される。
The data fetched by the bus control unit 307 is sent to the CPU 30 via the data bus 306.
1, and is processed by the CPU 301. At the same time, this data is also registered in the memory unit of the common cache 302.

【0054】以上が、この実施例のキャッシュメモリ装
置(共通キャッシュ)を備えたコンピュータシステムの
概略である。次に、図1を参照しながら、この実施例の
キャッシュメモリ装置を説明する。なお、以下の説明で
は、キャッシュメモリ(メモリ部)として、2ウェイ・
セットアソシアティブ方式のキャッシュメモリを用いる
場合を代表として説明するが、ウェイ数が3以上のセッ
トアソシアティブ方式のキャッシュメモリでも、基本的
な構成は同じである。
The above is the outline of the computer system including the cache memory device (common cache) of this embodiment. Next, the cache memory device of this embodiment will be described with reference to FIG. In the following description, a 2-way cache memory (memory unit) is used.
A case where a set associative cache memory is used will be described as a representative, but a set associative cache memory having three or more ways has the same basic configuration.

【0055】ウェイ数とは、検索の際、アドレスのタグ
比較に用いられるタグ比較器の数である。この実施例で
は、2つのウェイをウェイ0、ウェイ1と呼ぶことにす
る。それぞれは、タグメモリとデータメモリのペアから
なっている。
The number of ways is the number of tag comparators used for tag comparison of addresses during retrieval. In this embodiment, the two ways are called way 0 and way 1. Each consists of a pair of tag memory and data memory.

【0056】図1において、401は、命令アドレスバ
スである。402は、データアドレスバスである。
In FIG. 1, 401 is an instruction address bus. Reference numeral 402 is a data address bus.

【0057】403は、共通キャッシュにアクセスする
命令のアドレスを保持する命令アドレスレジスタであ
る。なお、以下の説明では、この命令アドレスの上位の
アドレスを命令タグアドレスIT、下位のアドレスを命
令インデックスアドレスIIと呼ぶことにする。
Reference numeral 403 is an instruction address register that holds the address of the instruction that accesses the common cache. In the following description, an upper address of this instruction address will be called an instruction tag address IT and a lower address will be called an instruction index address II.

【0058】404は、このキャッシュにアクセスする
データのアドレスを保持するデータアドレスレジスタで
ある。なお、以下の説明では、このデータアドレスの上
位のアドレスをデータタグアドレスDT、下位のアドレ
スをデータインデックスアドレスDIと呼ぶことにす
る。
Reference numeral 404 is a data address register which holds the address of the data for accessing this cache. In the following description, the upper address of this data address will be called the data tag address DT, and the lower address will be called the data index address DI.

【0059】405は、ウェイ0を命令アクセスとデー
タアクセスのどちらに設定するかを指定するデータD0
と、ウェイ1を命令アクセスとデータアクセスのどちら
に設定するかを指定するデータD1とを保持する命令/
データ切替え制御レジスタである。各データD0,D1
は1ビットで表され、例えば、CPU上で実行されるア
プリケーションプログラムによってレジスタ405にセ
ットされるようになっている。
Reference numeral 405 denotes data D0 designating whether to set way 0 for instruction access or data access.
And a data D1 designating whether the way 1 is set to instruction access or data access /
It is a data switching control register. Each data D0, D1
Is represented by 1 bit, and is set in the register 405 by an application program executed on the CPU, for example.

【0060】406は、命令/データ切替え制御レジス
タ405に保持されているウェイ0側の指定データD0
に従って、命令アドレスレジスタ403に保持されてい
る命令インデックスアドレスIIとデータアドレス40
4に保持されているデータインデックスアドレスDIの
いずれか一方を選択するタグ0用下位アドレスマルチプ
レクサである。
Reference numeral 406 denotes designated data D0 on the way 0 side held in the instruction / data switching control register 405.
According to the instruction index address II and the data address 40 held in the instruction address register 403.
4 is a low-order address multiplexer for tag 0 that selects one of the data index addresses DI held in No. 4.

【0061】407は、命令/データ切替え制御レジス
タ405に保持されているウェイ0側の指定データD0
に従って、命令アドレスレジスタ403に保持されてい
る命令タグアドレスITとデータアドレスレジスタ40
4に保持されているデータタグアドレスDTのいずれか
一方を選択するタグ0用上位アドレスマルチプレクサで
ある。
Reference numeral 407 denotes designated data D0 on the way 0 side held in the instruction / data switching control register 405.
In accordance with the instruction tag address IT and the data address register 40 held in the instruction address register 403.
4 is a high-order address multiplexer for tag 0 that selects one of the data tag addresses DT held in No. 4.

【0062】408は、命令/データ切替え制御レジス
タ405に保持されているウェイ1側の指定データD1
に従って、命令アドレスレジスタ403に保持されてい
る命令インデックスアドレスIIとデータアドレスレジ
スタ404に保持されているデータインデックスアドレ
スDIのいずれか一方を選択するタグ1用下位アドレス
マルチプレクサである。
Reference numeral 408 denotes designation data D1 on the way 1 side held in the instruction / data switching control register 405.
The lower address multiplexer for tag 1 selects either one of the instruction index address II held in the instruction address register 403 and the data index address DI held in the data address register 404 according to the above.

【0063】409は、命令/データ切替え制御レジス
タ405に保持されているウェイ1側の指定データD1
に従って、命令アドレスレジスタ403に保持されてい
る命令タグアドレスITとデータアドレスレジスタ40
4に保持されているデータタグアドレスDTのいずれか
一方を選択するタグ1用上位アドレスマルチプレクサで
ある。
Reference numeral 409 denotes designated data D1 on the way 1 side held in the instruction / data switching control register 405.
In accordance with the instruction tag address IT and the data address register 40 held in the instruction address register 403.
4 is a high-order address multiplexer for tag 1 that selects either one of the data tag addresses DT held in No. 4.

【0064】410は、ウェイ0側のタグ0用メモリで
ある。このタグ0用メモリ410は、ウェイ0へのデー
タ書込み時には、タグ0用下位アドレスマルチプレクサ
406により選択されたインデックスアドレスをアドレ
スとして、タグ0用上位アドレスマルチプレクサ407
により選択されたタグアドレスを書き込まれる。
Reference numeral 410 is a tag 0 memory on the way 0 side. When writing data to the way 0, the tag 0 memory 410 uses the index address selected by the tag 0 lower address multiplexer 406 as an address, and the tag 0 upper address multiplexer 407.
The tag address selected by is written.

【0065】反対に、ウェイ0からのデータ読出し時に
は、タグ0用下位アドレスマルチプレクサ406により
選択されたインデックスアドレスをアドレスとして、タ
グアドレスを読み出される。
On the other hand, when reading data from the way 0, the tag address is read using the index address selected by the tag 0 lower address multiplexer 406 as an address.

【0066】411は、タグ0用上位アドレスマルチプ
レクサ407により選択されたタグアドレスと、タグ0
メモリ410から読み出されたタグアドレスとが一致し
ているかどうかを判定するタグ0用一致回路である。
Reference numeral 411 denotes the tag address selected by the tag 0 upper address multiplexer 407 and the tag 0.
It is a tag 0 matching circuit that determines whether or not the tag address read from the memory 410 matches.

【0067】412は、ウェイ1側のタグ1用メモリで
ある。このタグ1用メモリ412は、ウェイ1へのデー
タ書込み時には、タグ1用下位アドレスマルチプレクサ
408により選択されたインデックスアドレスをアドレ
スとして、タグ1用上位アドレスマルチプレクサ409
により選択されたタグアドレスを書き込まれる。
Reference numeral 412 is a tag 1 memory on the way 1 side. When writing data to the way 1, the tag 1 memory 412 uses the index address selected by the tag 1 lower address multiplexer 408 as an address and the tag 1 upper address multiplexer 409.
The tag address selected by is written.

【0068】反対に、ウェイ1からのデータ読出し時に
は、タグ1用下位アドレスマルチプレクサ408により
選択されたインデックスアドレスをアドレスとして、タ
グアドレスを読み出される。
On the other hand, when reading data from the way 1, the tag address is read by using the index address selected by the lower address multiplexer for tag 1 408 as an address.

【0069】413は、タグ1用上位アドレスマルチプ
レクサ409により選択されたタグアドレスと、タグ1
用メモリ412から読み出されたタグアドレスが一致し
ているかどうかを判定するタグ1用一致回路である。
Reference numeral 413 denotes the tag address selected by the tag 1 upper address multiplexer 409 and the tag 1
It is a tag 1 matching circuit that determines whether or not the tag addresses read from the memory 412 match.

【0070】414は、共通キャッシュに登録する命令
を保持する命令レジスタである。415は、共通キャッ
シュに登録するデータを保持するデータレジスタであ
る。
An instruction register 414 holds an instruction to be registered in the common cache. A data register 415 holds data to be registered in the common cache.

【0071】416は、命令/データ切替え制御レジス
タ405に保持されているウェイ0側の指定データD0
に従って、命令レジスタ414に保持されている命令と
データレジスタ415に保持されているデータのいずれ
か一方を選択するデータ0用マルチプレクサである。
Reference numeral 416 denotes designation data D0 on the way 0 side held in the instruction / data switching control register 405.
The multiplexer for data 0 selects any one of the instruction held in the instruction register 414 and the data held in the data register 415 according to the above.

【0072】417は、データ0用メモリである。この
データ0用メモリ417は、ウェイ0へのデータ書込み
時には、タグ0用アドレスマルチプレクサ406により
選択されたインデックスアドレスをアドレスとして、デ
ータ0用マルチプレクサ416の選択出力を書き込まれ
る。反対に、ウェイ0からのデータ読出し時には、タグ
0用下位アドレスマルチプレクサ406により選択され
たインデックスアドレスをアドレスとして、登録命令ま
たは登録データが読み出される。
Reference numeral 417 is a data 0 memory. The data 0 memory 417 is written with the selected output of the data 0 multiplexer 416 using the index address selected by the tag 0 address multiplexer 406 as an address when writing data to the way 0. On the contrary, when reading data from the way 0, the registration command or the registration data is read using the index address selected by the lower address multiplexer for tag 0 406 as an address.

【0073】418は、ウェイ0用命令バスドライバで
ある。このバスドライバ418は、 タグ0用一致回路411で、2つのアドレスが一致
すると判定されていること 命令/データ切替え制御レジスタ405に保持され
ているウェイ0側の指定データD0が命令アクセスを指
定していること 共通キャッシュへのアクセスが読出しであること の3つの条件が同時に成立した場合に限り、イネーブル
とされる。
Reference numeral 418 is an instruction bus driver for way 0. This bus driver 418 is such that the tag 0 matching circuit 411 determines that the two addresses match. The designated data D0 on the way 0 side held in the instruction / data switching control register 405 designates the instruction access. It is enabled only when the three conditions that the access to the common cache is read are satisfied at the same time.

【0074】419は、ウェイ0用データバスドライバ
である。このバスドライバ419は、 タグ0用一
致回路411で、2つのアドレスが一致すると判定され
ている こと 命令/データ切替え制御レジスタ405の保持され
ているウェイ0側の指定データD0がデータアクセスを
指定していること 共通キャッシュへのアクセスが読出しであること の3つの条件が同時に成立した場合に限り、イネーブル
とされる。
Reference numeral 419 is a data bus driver for way 0. The bus driver 419 is such that the tag 0 matching circuit 411 determines that the two addresses match. The designated data D0 on the way 0 side held in the instruction / data switching control register 405 designates data access. It is enabled only when the three conditions that the access to the common cache is read are satisfied at the same time.

【0075】420は、命令/データ切替え制御レジス
タ405に保持されているウェイ1側の指定データD1
に従って、命令レジスタ414に保持されている命令と
データレジスタ415に保持されているデータのいずれ
か一方を選択するデータ1用マルチプレクサである。
Reference numeral 420 is designation data D1 on the way 1 side held in the instruction / data switching control register 405.
The data 1 multiplexer selects one of the instruction held in the instruction register 414 and the data held in the data register 415 according to the above.

【0076】421は、データ1用メモリである。この
データ1用メモリ421は、ウェイ1へのデータ書込み
時には、タグ1用アドレスマルチプレクサ408により
選択されたインデックスアドレスをアドレスとして、デ
ータ1用マルチプレクサ420の選択出力が書き込まれ
る。
Reference numeral 421 is a data 1 memory. In the data 1 memory 421, when data is written to the way 1, the selection output of the data 1 multiplexer 420 is written with the index address selected by the tag 1 address multiplexer 408 as an address.

【0077】反対に、ウェイ1からのデータ読出し時に
は、タグ1用下位アドレスマルチプレクサ408により
選択されたインデックスアドレスをアドレスとして、登
録命令または登録データが読み出される。
On the contrary, when reading data from the way 1, the registration command or the registration data is read using the index address selected by the tag 1 lower address multiplexer 408 as an address.

【0078】422は、ウェイ1用命令バスドライバで
ある。このバスドライバ422は、 タグ1用一致回路413で、2つのアドレスが一致
すると判定されていること 命令/データ切替え制御レジスタ405に保持され
ているウェイ1側の指定データD1が命令アクセスを指
定していること 共通キャッシュへのアクセスが読出しであること の3つの条件が同時に成立した場合に限り、イネーブル
とされる。
Reference numeral 422 is a way 1 instruction bus driver. The bus driver 422 is such that the tag 1 matching circuit 413 determines that the two addresses match. The designated data D1 on the way 1 side held in the instruction / data switching control register 405 designates the instruction access. It is enabled only when the three conditions that the access to the common cache is read are satisfied at the same time.

【0079】423は、ウェイ1用データバスドライバ
である。このバスドライバ423は、 タグ1用一
致回路413で、2つのアドレスが一致すると判定され
ている こと 命令/データ切替え制御レジスタ405の保持され
ているウェイ1側の指定データD1がデータアクセスを
指定していること 共通キャッシュへのアクセスが読出しであること の3つの条件が同時に成立した場合に限り、イネーブル
とされる。
Reference numeral 423 is a data bus driver for way 1. This bus driver 423 is such that the tag 1 matching circuit 413 determines that the two addresses match. The designated data D1 on the way 1 side held in the instruction / data switching control register 405 designates data access. It is enabled only when the three conditions that the access to the common cache is read are satisfied at the same time.

【0080】424は、命令バスである。425はデー
タバスである。
Reference numeral 424 is an instruction bus. 425 is a data bus.

【0081】ここで、タグ0用メモリ410とデータ0
用メモリ417を併せてウェイ0と呼ぶことにする。ま
た、タグ1用メモリ412とデータ1用メモリ421を
併せてウェイ1と呼ぶことにする。
Here, the tag 410 memory 410 and the data 0
The memory for memory 417 will be collectively referred to as way 0. Further, the tag 1 memory 412 and the data 1 memory 421 are collectively referred to as a way 1.

【0082】また、図において、点線は、命令/データ
切替え制御レジスタ405からの制御信号と、タグ0用
一致回路411及びタグ1用一致回路413からの制御
信号を表す。また、実線はデータ信号を、2重線はバス
をそれぞれ表す。
Further, in the figure, the dotted line represents the control signal from the instruction / data switching control register 405 and the control signals from the tag 0 matching circuit 411 and the tag 1 matching circuit 413. Further, the solid line represents a data signal and the double line represents a bus.

【0083】上記構成において、動作を説明する。ま
ず、命令/データ切替え制御レジスタ405に保持され
ているウェイ0側の指定データD0を命令アクセス用に
設定した場合の読出し動作を説明する。
The operation of the above configuration will be described. First, a read operation when the designated data D0 on the way 0 side held in the instruction / data switching control register 405 is set for instruction access will be described.

【0084】この場合、タグ0用下位アドレスマルチプ
レクサ406では、命令アドレスレジスタ403に保持
されている命令インデックスアドレスIIが選択され
る。また、タグ0用上位アドレスマルチプレクサ407
では、命令アドレスレジスタ403に保持されている命
令タグアドレスITが選択される。
In this case, the tag 0 lower address multiplexer 406 selects the instruction index address II held in the instruction address register 403. Also, the upper address multiplexer 407 for tag 0
Then, the instruction tag address IT held in the instruction address register 403 is selected.

【0085】これにより、タグ0用メモリ410から、
タグ0用下位アドレスマルチプレクサ406により選択
された命令インデックスアドレスIIに対応するデータ
が読み出される。このデータはウェイ0に登録されてい
るタグアドレスである。
Thus, from the tag 0 memory 410,
The data corresponding to the instruction index address II selected by the tag 0 lower address multiplexer 406 is read. This data is the tag address registered in way 0.

【0086】また、データ0用メモリ417からは、上
記命令インデックスアドレスIIに対応したデータが読
み出される。このデータはウェイ0に登録されている命
令である。タグ0用メモリ410から読み出されたタグ
アドレスは、タグ0用一致回路411に供給され、タグ
0用上位アドレスマルチプレクサ407により選択され
た命令タグアドレスITと比較される。これにより、両
者が一致するか否かが判定される。
Further, the data corresponding to the instruction index address II is read from the data 0 memory 417. This data is an instruction registered in way 0. The tag address read from the tag 0 memory 410 is supplied to the tag 0 matching circuit 411 and compared with the instruction tag address IT selected by the tag 0 upper address multiplexer 407. As a result, it is determined whether the two match.

【0087】両者が一致すると判定されると、ウェイ0
に命令が登録されていることになる。すなわち、命令キ
ャッシュ・ヒットとなる。これにより、この場合は、デ
ータ0用メモリ417から読み出された命令は、上記指
定データD0によってイネーブルとされているウェイ0
用命令バスドライバ418を介して命令バス424に転
送される。
When it is determined that the two match, the way 0
The order is registered in. That is, it is an instruction cache hit. As a result, in this case, the instruction read from the memory for data 0 417 is the way 0 enabled by the designated data D0.
Is transferred to the instruction bus 424 via the instruction bus driver 418.

【0088】一方、一致しないと判定されると、命令キ
ャッシュ・ミスとなる。これにより、この場合は、命令
アドレスに対応する命令をキャッシュ外部から取り込む
ことになる。キャッシュ外部から取り込まれた命令は、
CPUに転送されると同時に、命令レジスタ414にセ
ットされる。
On the other hand, if it is determined that they do not match, an instruction cache miss occurs. As a result, in this case, the instruction corresponding to the instruction address is fetched from the outside of the cache. Instructions fetched from outside the cache are
At the same time as being transferred to the CPU, it is set in the instruction register 414.

【0089】命令レジスタ41にセットされた命令は、
上記指定データD0に基づいて、データ0用マルチプレ
クサ416により選択された後、データ0メモリ417
に書き込まれる。これと同時に、タグ0用上位アドレス
マルチプレクサ407により選択されたタグアドレスが
タグ0用メモリ410に書き込まれる。これにより、キ
ャッシュ・ミスした命令が共通キャッシュに登録された
ことになる。
The instruction set in the instruction register 41 is
After being selected by the data 0 multiplexer 416 based on the designated data D0, the data 0 memory 417 is selected.
Is written to. At the same time, the tag address selected by the tag 0 upper address multiplexer 407 is written in the tag 0 memory 410. This means that the cache missed instruction is registered in the common cache.

【0090】次に、命令/データ切替え制御レジスタ4
05に保持されているウェイ0側の指定データD0をデ
ータアクセス用に設定した場合の読出し動作を説明す
る。
Next, the instruction / data switching control register 4
A read operation when the designated data D0 on the way 0 side held in 05 is set for data access will be described.

【0091】この場合、タグ0用下位アドレスマルチプ
レクサ406では、データアドレスレジスタ404に保
持されているデータインデックスアドレスDIが選択さ
れる。また、タグ0用上位アドレスマルチプレクサ40
7では、データアドレスレジスタ403に保持されてい
るデータタグアドレスDTが選択される。
In this case, the tag 0 lower address multiplexer 406 selects the data index address DI held in the data address register 404. Also, the upper address multiplexer 40 for the tag 0
In 7, the data tag address DT held in the data address register 403 is selected.

【0092】これにより、タグ0用メモリ410から、
タグ0用下位アドレスマルチプレクサ406により選択
されたデータインデックスアドレスDIに対応するデー
タが読み出される。このデータはウェイ0に登録されて
いるタグアドレスである。
As a result, from the tag 0 memory 410,
The data corresponding to the data index address DI selected by the tag 0 lower address multiplexer 406 is read. This data is the tag address registered in way 0.

【0093】また、データ0用メモリ417からは、上
記データインデックスアドレスDIに対応したデータが
読み出される。このデータはウェイ0に登録されている
データである。
Data corresponding to the data index address DI is read from the data 0 memory 417. This data is the data registered in way 0.

【0094】タグ0用メモリ410から読み出されたタ
グアドレスは、タグ0用一致回路411に供給され、タ
グ0用上位アドレスマルチプレクサ407により選択さ
れたデータタグアドレスDTと比較される。これによ
り、両者が一致するか否かが判定される。
The tag address read from the tag 0 memory 410 is supplied to the tag 0 matching circuit 411 and compared with the data tag address DT selected by the tag 0 upper address multiplexer 407. As a result, it is determined whether the two match.

【0095】両者が一致すると判定されると、ウェイ0
にデータが登録されていることになる。すなわち、デー
タキャッシュ・ヒットとなる。これにより、この場合
は、データ0用メモリ417から読み出されたデータ
が、上記指定データD0によってイネーブルとされてい
るウェイ0用データバスドライバ419を介してデータ
バス425に転送される。
If it is determined that the two match, the way 0
The data is registered in. That is, it becomes a data cache hit. As a result, in this case, the data read from the data 0 memory 417 is transferred to the data bus 425 via the way 0 data bus driver 419 enabled by the designated data D0.

【0096】一方、一致しないと判定されると、データ
キャッシュ・ミスとなる。これにより、この場合は、デ
ータアドレスに対応するデータをキャッシュ外部から取
り込むことになる。キャッシュ外部から取り込まれたデ
ータは、CPUに転送されると同時に、データレジスタ
415にセットされる。
On the other hand, if it is determined that they do not match, a data cache miss occurs. As a result, in this case, the data corresponding to the data address is fetched from the outside of the cache. The data fetched from the outside of the cache is transferred to the CPU and set in the data register 415 at the same time.

【0097】データレジスタ415にセットされたデー
タは、上記指定データD0に基づいて、データ0用マル
チプレクサ416により選択された後、データ0メモリ
417に書き込まれる。これと同時に、タグ0用上位ア
ドレスマルチプレクサ407により選択されたタグアド
レスがタグ0用メモリ410に書き込まれる。これによ
り、キャッシュ・ミスしたデータが共通キャッシュに登
録されたことになる。
The data set in the data register 415 is selected by the data 0 multiplexer 416 based on the designated data D0 and then written in the data 0 memory 417. At the same time, the tag address selected by the tag 0 upper address multiplexer 407 is written in the tag 0 memory 410. As a result, the cache-missed data is registered in the common cache.

【0098】次に、命令/データ切替え制御レジスタ4
05に保持されているウェイ0側の指定データD0をデ
ータアクセス側に設定した場合の書込み動作を説明す
る。
Next, the instruction / data switching control register 4
The write operation in the case where the designated data D0 on the way 0 side held in 05 is set on the data access side will be described.

【0099】この場合、タグ0用下位アドレスマルチプ
レクサ406では、データアドレスレジスタ404に保
持されているデータインデックスアドレスDIが選択さ
れる。同様に、タグ0用上位アドレスマルチプレクサ4
07では、データタグアドレスDTが選択される。ま
た、データ0用マルチプレクサ416では、データレジ
スタ415に保持されているデータが選択される。
In this case, the tag 0 lower address multiplexer 406 selects the data index address DI held in the data address register 404. Similarly, upper address multiplexer 4 for tag 0
At 07, the data tag address DT is selected. Further, the data 0 multiplexer 416 selects the data held in the data register 415.

【0100】これにより、タグ0用メモリ410から、
タグ0用下位アドレスマルチプレクサ406により選択
されたデータインデックスアドレスDIに対応するデー
タが読み出される。このデータは、ウェイ0に登録され
ているタグアドレスである。
As a result, from the tag 0 memory 410,
The data corresponding to the data index address DI selected by the tag 0 lower address multiplexer 406 is read. This data is the tag address registered in way 0.

【0101】タグ0用メモリ410から読み出されたタ
グアドレスは、タグ0用一致回路411に供給され、タ
グ0用上位アドレスマルチプレクサ407により選択さ
れたデータタグアドレスDTと比較される。これによ
り、両者が一致するか否かが判定される。
The tag address read from the tag 0 memory 410 is supplied to the tag 0 matching circuit 411 and compared with the data tag address DT selected by the tag 0 upper address multiplexer 407. As a result, it is determined whether the two match.

【0102】両者が一致すると判定されると、ウェイ0
にデータが一度登録されていることになるので、データ
キャッシュ・ヒットとなる。これにより、この場合は、
データ0用マルチプレクサ416により選択されたデー
タは、データ0用メモリ417において、タグ0用下位
アドレスマルチプレクサ406により選択されたデータ
インデックスアドレスDIに対応した位置に書き込まれ
る。
If it is determined that the two match, the way 0
Since the data is registered once in, it becomes a data cache hit. So in this case,
The data selected by the data 0 multiplexer 416 is written in the data 0 memory 417 at a position corresponding to the data index address DI selected by the tag 0 lower address multiplexer 406.

【0103】一方、両者が一致しないと判定されると、
データキャッシュ・ミスとなる。この場合、データは、
例えば、メインメモリにのみ書き込まれる。
On the other hand, if it is determined that they do not match,
Data cache miss. In this case, the data is
For example, it is written only in the main memory.

【0104】以上、ウェイ0側におけるアクセスを説明
したが、ウェイ1側においても、命令/データ切替え制
御レジスタ405にセットする指定データD1を切り替
えることにより、ウェイ0側と同じアクセスを行うこと
ができる。
The access on the way 0 side has been described above, but the same access as on the way 0 side can be performed on the way 1 side by switching the designated data D1 set in the instruction / data switching control register 405. .

【0105】この場合、ウェイ1側のタグ1用下位アド
レスマルチプレクサ408、タグ1用上位アドレスマル
チプレクサ409、タグ1用メモリ412、タグ1用一
致回路413、データ1用マルチプレクサ420、デー
タ1用メモリ421、ウェイ1用命令バスドライバ42
2、ウェイ1用データバスドライバ423は、それぞれ
ウェイ0側のタグ0用下位アドレスマルチプレクサ40
6、タグ0用上位アドレスマルチプレクサ407、タグ
0用メモリ410、タグ0用一致回路411、データ0
用マルチプレクサ416、データ0用メモリ417、ウ
ェイ0用命令バスドライバ418、ウェイ0用データバ
スドライバ419に対応した動作を行う。
In this case, the tag 1 lower address multiplexer 408, the tag 1 upper address multiplexer 409, the tag 1 memory 412, the tag 1 matching circuit 413, the data 1 multiplexer 420, and the data 1 memory 421 on the way 1 side. , Way 1 instruction bus driver 42
2, the data bus driver 423 for the way 1 respectively includes the lower address multiplexer 40 for the tag 0 on the way 0 side.
6, tag 0 upper address multiplexer 407, tag 0 memory 410, tag 0 matching circuit 411, data 0
The operation corresponding to the data multiplexer 416, the data 0 memory 417, the way 0 instruction bus driver 418, and the way 0 data bus driver 419 is performed.

【0106】このように、命令/データ切替え制御レジ
スタ405にセットする指定データD0,D1の値を変
更することにより、ウェイ0とウェイ1をそれぞれ命令
アクセス用、データアクセス用に設定することができ
る。この場合、命令アクセス、データアクセスとキャッ
シュのウェイ0、ウェイ1の組合せは、図5に示すよう
に、4通りある。
By changing the values of the designated data D0 and D1 set in the instruction / data switching control register 405 in this way, way 0 and way 1 can be set for instruction access and data access, respectively. . In this case, there are four combinations of instruction access, data access and cache ways 0 and 1 as shown in FIG.

【0107】なお、命令アクセスまたはデータアクセス
用の複数のウェイを指定した場合、命令またはデータを
登録すべきウェイの選択は、通常のセットアソシアティ
ブ方式のキャッシュと同じように、LRU(Least
Recently Used)等の置換アルゴリズム
によって実施される。
When a plurality of ways for instruction access or data access are designated, the way to register the instruction or data is selected in the same way as in the normal set associative cache.
It is implemented by a replacement algorithm such as Recent Used).

【0108】以上詳述したこの実施例によれば、次のよ
うな効果が得られる。
According to this embodiment described in detail above, the following effects can be obtained.

【0109】(1) まず、この実施例によれば、キャ
ッシュメモリ装置において、 互いに独立にアクセス可能な複数の記憶領域(ウェ
イ0,1)を有し、かつ、各記憶領域ごとに、メインメ
モリのアドレスを保持するアドレス記憶領域(タグ0用
メモリ410、タグ1用メモリ412)とそのアドレス
に格納されている内容を保持する内容記憶領域(データ
0用メモリ417、データ1用メモリ421)を有する
キャッシュメモリと、 メインメモリをアクセスするための複数のアドレス
(命令アドレス、データアドレス)を、上記複数の記憶
領域に振り分けるアドレス振分け手段(レジスタ40
3,404,405、マルチプレクサ406,407,
408,409)と、 各記憶領域ごとに、アドレス振分け手段により振り
分けられたアドレスがアドレス記憶領域に登録されてい
るか否かを判定する登録判定手段(一致回路411,4
12)と、 この登録判定手段により、アドレスが登録されてい
ると判定されると、このアドレスが登録されていると判
定されたアドレス記憶領域に対応する内容記憶領域をア
クセスするアクセス手段(レジスタ414,415、マ
ルチプレクサ416,420、バスドライバ418,4
19,422,423)とを設けるようにしたので、キ
ャッシュ・ヒット率の低下とアクセス競合時の実行効率
の低下を防止することができる。
(1) First, according to this embodiment, the cache memory device has a plurality of storage areas (ways 0, 1) that can be accessed independently of each other, and a main memory is provided for each storage area. An address storage area (memory for tag 0 410, memory 412 for tag 1) that holds the address of and a content storage area (memory 417 for data 0, memory 421 for data 1) that holds the content stored at that address An address distribution unit (register 40) that allocates a plurality of addresses (instruction address, data address) for accessing the cache memory and the main memory to the plurality of storage areas.
3, 404, 405, multiplexers 406, 407,
408, 409) and registration determining means (matching circuits 411, 4) for determining, for each storage area, whether the address assigned by the address assigning means is registered in the address storage area.
12), and when the registration determination means determines that the address is registered, the access means (register 414) for accessing the content storage area corresponding to the address storage area determined to have the address registered. , 415, multiplexers 416, 420, bus drivers 418, 4
19, 422, 423), it is possible to prevent a decrease in cache hit rate and a decrease in execution efficiency during access contention.

【0110】すなわち、上記構成によれば、使用頻度の
高い命令の数と使用頻度の高いデータの数に応じて、命
令とデータの記憶容量を変えることができるので、CP
Uによって実行されるアプリケーションプログラムによ
っては、キャッシュ・ヒット率が低下することがあると
いう問題を解決することができる。
That is, according to the above configuration, the storage capacity of instructions and data can be changed according to the number of frequently used instructions and the number of frequently used data.
Depending on the application program executed by U, the problem that the cache hit rate may decrease can be solved.

【0111】また、上記構成によれば、各記憶領域が独
立にアクセス可能であるため、命令アクセス要求とデー
タアクセス要求が競合した場合でも、命令アクセスとデ
ータアクセスを同時に行うことができる。これにより、
アクセス競合時にアプリケーションプログラムの実行効
率が低下するとう問題を解決することができる。
Further, according to the above configuration, since each storage area can be independently accessed, even if the instruction access request and the data access request conflict with each other, the instruction access and the data access can be simultaneously performed. This allows
It is possible to solve the problem that the execution efficiency of the application program is deteriorated at the time of access conflict.

【0112】(2) また、この実施例によれば、キャ
ッシュメモリとして、複数のポートを有するセットアソ
シアティブ方式のキャシュメモリを用いるようにしたの
で、上述したような構成を有するキャッシュメモリを別
途開発することなく、キャッシュメモリ装置を構築する
ことができる。
(2) According to this embodiment, since the cache memory of the set associative system having a plurality of ports is used as the cache memory, the cache memory having the above-mentioned structure is separately developed. It is possible to construct a cache memory device without any need.

【0113】(3) また、この実施例によれば、図3
に示す命令キャッシュ202(あるいはデータキャッシ
ュ205)に、レジスタ403,404,405と、マ
ルチプレクサ406,407,408,409,41
6,420を付加するだけの簡単な構成により、キャッ
シュメモリ装置を構築することができる。
(3) Further, according to this embodiment, as shown in FIG.
In the instruction cache 202 (or data cache 205) shown in FIG. 1, registers 403, 404, 405 and multiplexers 406, 407, 408, 409, 41 are provided.
The cache memory device can be constructed with a simple configuration in which only 6,420 is added.

【0114】以上、この発明の一実施例を詳細に説明し
たが、この発明は、上述したような実施例に限定される
ものではない。
Although one embodiment of the present invention has been described in detail above, the present invention is not limited to the above embodiment.

【0115】(1) 例えば、先の実施例では、キャッ
シュメモリとして、2つのウェイを有するセットアソシ
アティブ方式のキャッシュメモリを用いる場合を説明し
た。しかし、この発明は、3つ以上のウェイを有するセ
ットアソシアティブ方式のキャッシュメモリを用いるよ
うにしてもよい。
(1) For example, in the above embodiment, the case where the set associative cache memory having two ways is used as the cache memory has been described. However, the present invention may use a set associative cache memory having three or more ways.

【0116】(2) また、先の実施例では、1つのC
PUによって命令アクセス及びデータアクセスされるキ
ャッシュメモリ装置に、この発明を適用する場合を説明
した。しかし、この発明は、2つ以上のCPUによって
命令アクセス及びデータアクセスされるキャッシュメモ
リ装置にも適用することができる。
(2) Also, in the previous embodiment, one C
The case where the present invention is applied to a cache memory device that is instruction-accessed and data-accessed by a PU has been described. However, the present invention can also be applied to a cache memory device that is instruction-accessed and data-accessed by two or more CPUs.

【0117】この場合、アクセスの実行途中で、各ポー
トに対してウェイを指定するレジスタの値を換えること
により、キャッシュのウェイを媒介してCPU間のデー
タ転送を行うことも可能になる。
In this case, by changing the value of the register designating the way for each port during the execution of the access, it becomes possible to transfer the data between the CPUs via the way of the cache.

【0118】すなわち、いま、この発明のキャッシュメ
モリ装置が2つのCPU0,CPU1と接続されている
ものとする。また、命令/データ切替え制御レジスタが
ウェイ0をCPU0のデータアクセスに指定しているも
のとする。このような状態で、CPU0がウェイ0のデ
ータを更新したものとする。その後、命令/データ切替
え制御レジスタがウェイ0をCPU1のデータアクセス
に書き換えることにより、、CPU1はウェイ0に登録
されているデータを取り出すことができる。
That is, it is assumed that the cache memory device of the present invention is connected to two CPU0 and CPU1. It is also assumed that the instruction / data switching control register designates way 0 for CPU0 data access. In such a state, it is assumed that the CPU0 updates the data of way0. After that, the instruction / data switching control register rewrites the way 0 to the data access of the CPU 1, so that the CPU 1 can take out the data registered in the way 0.

【0119】このように、この発明によれば、2つのC
PUにおいて、キャッシュを媒介にしてデータを受け渡
すことも可能となる。
Thus, according to the present invention, two C
In the PU, it is possible to transfer data via a cache.

【0120】(3) さらに、先の実施例では、キャッ
シュメモリとして、セットアソシアティブ方式のキャッ
シュメモリを用いる場合を説明した。しかし、この発明
は、セットアソシアティブ方式以外の方式、例えば、ダ
イレクトマッピング方式のキャッシュメモリを用いるよ
うにしてもよい。
(3) Further, in the above embodiment, the case where the set associative cache memory is used as the cache memory has been described. However, the present invention may use a method other than the set associative method, for example, a direct mapping method cache memory.

【0121】(4) さらにまた、先の実施例では、キ
ャッシュメモリを、複数のポートを有する1つのメモリ
チップで構成する場合を説明した。しかし、この発明
は、複数のメモリチップで構成するようにしてもよい。
(4) Furthermore, in the above embodiment, the case where the cache memory is composed of one memory chip having a plurality of ports has been described. However, the present invention may be configured with a plurality of memory chips.

【0122】すなわち、この発明のキャッシュメモリ
は、互いに独立にアクセス可能な複数の記憶領域を有
し、かつ、各記憶領域ごとに、アドレス記憶領域と内容
記憶領域を有する構成であれば、複数のポートを有する
1つのメモリチップで構成してもよいし、1つのポート
を有する複数のメモリチップで構成してもよい。
That is, if the cache memory of the present invention has a plurality of storage areas that can be accessed independently of each other and that each storage area has an address storage area and a content storage area, a plurality of storage areas are provided. It may be configured with one memory chip having a port, or may be configured with a plurality of memory chips having one port.

【0123】(5) このほかにも、この発明は、その
要旨を逸脱しない範囲で種々様々変型実施可能なことは
勿論である。
(5) In addition to this, the present invention can of course be variously modified without departing from the scope of the invention.

【0124】[0124]

【発明の効果】以上詳述したようにこの発明によれば、
互いに独立にアクセス可能な複数の記憶領域を有し、か
つ、各記憶領域ごとにアドレス記憶領域と内容記憶領域
を有するキャッシュメモリと、メインメモリをアクセス
するための複数のアドレスを上記複数の記憶領域に振り
分ける手段と、各記憶領域ごとに、アドレス振分け手段
により振り分けられたアドレスがアドレス記憶領域に保
持されているか否かを判定する手段と、アドレスが保持
されていると判定されると、対応する内容記憶領域をア
クセスする手段とを設けるようにしたので、アプリケー
ションプログラムによってキャッシュ・ヒット率が低下
することがあるという問題と、アクセス競合時にアプリ
ケーションプログラムの実行効率が低下するという問題
を解決することができる。
As described above in detail, according to the present invention,
A cache memory having a plurality of storage areas that can be accessed independently of each other, and a cache memory having an address storage area and a content storage area for each storage area, and a plurality of addresses for accessing the main memory. And means for deciding whether or not the address assigned by the address allocating means is held in the address storage area, and means for deciding that the address is held. Since the means for accessing the content storage area is provided, it is possible to solve the problem that the cache hit rate may be reduced by the application program and the problem that the execution efficiency of the application program is reduced due to access conflict. it can.

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

【図1】この発明の一実施例の構成を示すブロック図で
ある。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】ユニファイドキャッシュを有するハーバード・
アーキテクチャ構成のコンピュータシステムの構成を示
すブロック図である。
FIG. 2 Harvard with unified cache
It is a block diagram which shows the structure of the computer system of an architectural structure.

【図3】専用キャッシュを有するハーバード・アーキテ
クチャ構成のコンピュータシステムの構成を示すブロッ
ク図である。
FIG. 3 is a block diagram showing a configuration of a computer system having a Harvard architecture configuration having a dedicated cache.

【図4】この発明の一実施例のキャッシュメモリ装置を
有するハーバード・アーキテクチャ構成のコンピュータ
システムの構成を示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a computer system having a Harvard architecture configuration having a cache memory device according to an embodiment of the present invention.

【図5】この発明の一実施例の動作を説明するための図
である。
FIG. 5 is a diagram for explaining the operation of the embodiment of the present invention.

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

301…CPU 302…共通キャッシュ 303…命令アドレスバス 304…命令バス 305…データアドレスバス 306…データバス 307…バスコントロールユニット 308…外部アドレスバス 309…外部データバス 310…メインメモリ 401…命令アドレスバス 402…データアドレスバス 403…命令アドレスレジスタ 404…データアドレスレジスタ 405…命令/データ切替え制御レジスタ 406…タグ0用下位アドレスマルチプレクサ 407…タグ0用上位アドレスマルチプレクサ 408…タグ1用下位アドレスマルチプレクサ 409…タグ1用上位アドレスマルチプレクサ 410…タグ0用メモリ 411…タグ0用一致回路 412…タグ1用メモリ 413…タグ1用一致回路 414…命令レジスタ 415…データレジスタ 416…データ0用マルチプレクサ 417…データ0用メモリ 418…ウェイ0用命令バスドライバ 419…ウェイ0用データバスドライバ 420…データ1用マルチプレクサ 421…データ1用メモリ 422…ウェイ1用命令バスドライバ 423…ウェイ1用データバスドライバ 424…命令バス 425…データバス 301 ... CPU 302 ... Common cache 303 ... Instruction address bus 304 ... Instruction bus 305 ... Data address bus 306 ... Data bus 307 ... Bus control unit 308 ... External address bus 309 ... External data bus 310 ... Main memory 401 ... Instruction address bus 402 ... data address bus 403 ... instruction address register 404 ... data address register 405 ... instruction / data switching control register 406 ... lower address multiplexer for tag 0 407 ... upper address multiplexer for tag 0 408 ... lower address multiplexer for tag 1 409 ... tag 1 Upper address multiplexer 410 ... Tag 0 memory 411 ... Tag 0 matching circuit 412 ... Tag 1 memory 413 ... Tag 1 matching circuit 414 ... Instruction register 415 Data register 416 ... Data 0 multiplexer 417 ... Data 0 memory 418 ... Way 0 instruction bus driver 419 ... Way 0 data bus driver 420 ... Data 1 multiplexer 421 ... Data 1 memory 422 ... Way 1 instruction bus driver 423 ... Data bus driver for way 1 424 ... Instruction bus 425 ... Data bus

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置と主記憶装置との間で、命
令やデータを一時的に保持するキャッシュメモリ装置に
おいて、 互いに独立にアクセス可能な複数の記憶領域を有し、か
つ、各記憶領域ごとに、主記憶装置のアドレスを保持す
るアドレス記憶領域とそのアドレスに格納されている内
容を保持する内容記憶領域を有するキャッシュメモリ
と、 前記主記憶装置をアクセスするための複数のアドレス
を、前記複数の記憶領域に振り分けるアドレス振分け手
段と、 前記複数の記憶領域の各記憶領域ごとに、前記アドレス
振分け手段により振り分けられたアドレスが前記アドレ
ス記憶領域に登録されているか否かを判定する登録判定
手段と、 この登録判定手段により、前記アドレスが登録されてい
ると判定されると、この登録されていると判定されたア
ドレス記憶領域に対応する内容記憶領域をアクセスする
アクセス手段とを具備したことを特徴とするキャッシュ
メモリ装置。
1. A cache memory device for temporarily holding instructions and data between a central processing unit and a main memory unit, having a plurality of memory regions accessible independently of each other, and each memory region. A cache memory having an address storage area for holding the address of the main storage device and a content storage area for holding the contents stored at that address; and a plurality of addresses for accessing the main storage device, Address allocation means for allocating to a plurality of storage areas, and registration determination means for determining, for each storage area of the plurality of storage areas, whether the address allocated by the address allocation means is registered in the address storage area When the registration determining means determines that the address is registered, it is determined that the address is registered. Cache memory apparatus being characterized in that comprising an access means for accessing the contents storage area corresponding to the address storage area.
【請求項2】 前記アドレス振分け手段は、 前記複数のアドレスを保持するアドレス保持手段と、 前記複数の記憶領域に対する前記複数のアドレスの振分
け方を示す振分け情報を保持する振分け情報保持手段
と、 この振分け情報保持手段に保持されている振分け情報に
基づいて、前記アドレス保持手段に保持されている複数
のアドレスを前記複数の記憶領域に振り分ける振分け手
段とを具備するように構成されていることを特徴とする
請求項1記載のキャッシュメモリ装置。
2. The address distribution unit, an address holding unit that holds the plurality of addresses, and a distribution information holding unit that holds distribution information indicating how to distribute the plurality of addresses to the plurality of storage areas. And a distribution unit configured to distribute the plurality of addresses stored in the address storage unit to the plurality of storage areas based on the distribution information stored in the distribution information storage unit. The cache memory device according to claim 1.
【請求項3】 前記複数のアドレスは、命令アドレスバ
スを介して与えられる命令アドレスとデータアドレスバ
スを介して与えられるデータアドレスであり、 前記アドレス振分け手段は、 前記命令アドレスバスを介して与えられる命令アドレス
を保持する命令アドレス保持手段と、 前記データアドレスバスを介して与えられるデータアド
レスを保持するデータアドレス保持手段と、 前記複数の記憶領域に対する前記命令アドレスと前記デ
ータアドレスの振分け方を示す振分け情報を保持する振
分け情報保持手段と、 この振分け情報保持手段に保持されている振分け情報に
基づいて、前記命令アドレス保持手段に保持されている
命令アドレスと前記データアドレス保持手段に保持され
ているデータアドレスを前記複数の記憶領域に振り分け
る振分け手段とを具備するように構成され、 前記アクセス手段は、 命令バスを介して与えられる命令を保持する命令保持手
段と、 データバスを介して与えられるデータを保持するデータ
保持手段と、 前記振分け情報保持手段に保持されている振分け情報に
基づいて、前記命令保持手段に保持されている命令と前
記データ保持手段に保持されているデータを前記複数の
記憶領域に振り分ける振分け手段と、 前記複数の記憶領域の各記憶領域ごとに設けられ、書込
み時、前記アドレス振分け手段により振り分けられたア
ドレスが自記憶領域のアドレス記憶領域に保持されてい
ると前記登録判定手段により判定されると、前記振分け
手段により振り分けられた命令あるいはデータを自記憶
領域の内容記憶領域に書き込む書込み手段と、 前記複数の記憶領域の各記憶領域ごとに設けられ、読出
し時、前記アドレス振分け手段により振り分けられたア
ドレスが自記憶領域のアドレス記憶領域に登録されてい
ると前記登録判定手段により判定されると、自記憶領域
の内容記憶領域から命令あるいはデータを読み出し、前
記命令バスあるいは前記データバスに出力する読出し手
段とを具備するように構成されていることを特徴とする
請求項1記載のキャッシュメモリ装置。
3. The plurality of addresses are an instruction address given via an instruction address bus and a data address given via a data address bus, and the address distribution means is given via the instruction address bus. Instruction address holding means for holding an instruction address, data address holding means for holding a data address given via the data address bus, and distribution indicating how to distribute the instruction address and the data address to the plurality of storage areas Sorting information holding means for holding information, and an instruction address held in the instruction address holding means and data held in the data address holding means based on the sorting information held in the sorting information holding means Addresses are assigned to the storage areas The access unit is configured to include an instruction holding unit that holds an instruction given via an instruction bus, a data holding unit that holds data given via a data bus, and the distribution unit. Distribution means for allocating the command held in the command holding means and the data held in the data holding means to the plurality of storage areas based on the distribution information held in the information holding means; The distribution means is provided for each storage area of the storage area, and when the address determined by the address allocation means at the time of writing is held by the registration determination means as being held in the address storage area of the own storage area, the allocation means Writing means for writing the command or data distributed by the above into the content storage area of its own storage area; The storage area is provided for each storage area of the storage area, and at the time of reading, when the registration determination means determines that the address assigned by the address assignment means is registered in the address storage area of the own storage area, the own storage area 2. The cache memory device according to claim 1, further comprising: a reading unit that reads out an instruction or data from the content storage area of and outputs to the instruction bus or the data bus.
【請求項4】 前記キャッシュメモリは、複数のポート
を有するセットアソシアティブ方式のメモリであり、 前記アドレス振分け手段は、前記キャッシュメモリの各
ウェイごとに、前記複数のアドレスを振り分けるように
構成されていることを特徴とする請求項1記載のキャッ
シュメモリ装置。
4. The cache memory is a set associative type memory having a plurality of ports, and the address distribution unit is configured to distribute the plurality of addresses for each way of the cache memory. The cache memory device according to claim 1, wherein:
JP6206634A 1994-08-31 1994-08-31 Cache memory device Pending JPH0877072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6206634A JPH0877072A (en) 1994-08-31 1994-08-31 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6206634A JPH0877072A (en) 1994-08-31 1994-08-31 Cache memory device

Publications (1)

Publication Number Publication Date
JPH0877072A true JPH0877072A (en) 1996-03-22

Family

ID=16526617

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6206634A Pending JPH0877072A (en) 1994-08-31 1994-08-31 Cache memory device

Country Status (1)

Country Link
JP (1) JPH0877072A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100805974B1 (en) * 1999-12-06 2008-02-25 텍사스 인스트루먼츠 인코포레이티드 Smart cache
JP2008090673A (en) * 2006-10-03 2008-04-17 Mitsubishi Electric Corp Cache memory control device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100805974B1 (en) * 1999-12-06 2008-02-25 텍사스 인스트루먼츠 인코포레이티드 Smart cache
JP2008090673A (en) * 2006-10-03 2008-04-17 Mitsubishi Electric Corp Cache memory control device

Similar Documents

Publication Publication Date Title
US7783827B2 (en) Data processor having a memory controller with cache memory
US6725336B2 (en) Dynamically allocated cache memory for a multi-processor unit
US4881163A (en) Computer system architecture employing cache data line move-out queue buffer
US6006307A (en) Computer system employing a mirrored memory system for providing prefetch bandwidth
JPH0219945A (en) Main memory controller
US6101589A (en) High performance shared cache
US6546465B1 (en) Chaining directory reads and writes to reduce DRAM bandwidth in a directory based CC-NUMA protocol
US6038642A (en) Method and system for assigning cache memory utilization within a symmetric multiprocessor data-processing system
US6952761B2 (en) Bus interface selection by page table attributes
JPH07248967A (en) Memory control system
US5727179A (en) Memory access method using intermediate addresses
JPH0727492B2 (en) Buffer storage
US4547848A (en) Access control processing system in computer system
JPH0877072A (en) Cache memory device
EP1285340B1 (en) Shared bus interface for digital signal processor
JPH0421222B2 (en)
JPH07282023A (en) Data transfer amount variable processor and system using the same
JP2001325148A (en) Method and device for controlling access
KR960005394B1 (en) Dual process board sharing cache memory
KR960003650B1 (en) Input/output processor for improving computer system performance
JP2742245B2 (en) Parallel computer
JPH1055308A (en) Cache memory
JPH0566994A (en) Multiprocessor system
JP2004046643A (en) Cache device and method for selecting storage means
JPS6345669A (en) Multi-processor system