JPH0748189B2 - Data processing device - Google Patents
Data processing deviceInfo
- Publication number
- JPH0748189B2 JPH0748189B2 JP1146036A JP14603689A JPH0748189B2 JP H0748189 B2 JPH0748189 B2 JP H0748189B2 JP 1146036 A JP1146036 A JP 1146036A JP 14603689 A JP14603689 A JP 14603689A JP H0748189 B2 JPH0748189 B2 JP H0748189B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- data processing
- processing unit
- cache
- signal
- 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.)
- Expired - Lifetime
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュメモリを有するデータ処理装置に関
し、特にキャッシュメモリを複数備えたリアルタイムマ
ルチタスクシステムに好適なデータ処理装置に関する。The present invention relates to a data processing device having a cache memory, and more particularly to a data processing device suitable for a real-time multitasking system having a plurality of cache memories.
第3図は複数のキャッシュメモリを備えた従来の一般的
なデータ処理装置の要部の構成を示すブロック図の一例
である。FIG. 3 is an example of a block diagram showing a configuration of a main part of a conventional general data processing device having a plurality of cache memories.
図中、1はデータ処理部であり、後述する複数のキャッ
シュメモリ、即ち第1,第2,第3,第4キャッシュメモリ2,
3,4,5または主メモリ7に対してデータのアクセスを行
う。またこのデータ処理部1は、各キャッシュメモリ2,
3,4,5に保持されてはいけないような主メモリ7の領域
(ノンキャッシャブル領域)のデータをアクセスする場
合には後述するバスドライバ回路6へ与えているローア
クティブの第2信号S2をアクティブ(ローレベル)にす
る。In the figure, reference numeral 1 denotes a data processing unit, which includes a plurality of cache memories to be described later, that is, first, second, third and fourth cache memories 2,
Data is accessed to 3, 4, 5 or the main memory 7. In addition, the data processing unit 1 uses each cache memory 2,
When accessing data in the area (non-cacheable area) of the main memory 7 that should not be held in 3, 4 or 5, the low active second signal S2 given to the bus driver circuit 6 to be described later is applied. Make it active (low level).
各キャッシュメモリ2,3,4,5は4ウェイセットアソシア
ティブ方式及びライトスルー方式を採用しており、常に
主メモリ7とのデータの一致を維持している。Each of the cache memories 2, 3, 4, and 5 adopts the 4-way set associative method and the write-through method, and always keeps the data coincident with the main memory 7.
各キャッシュメモリ2,3,4,5は、データ処理部1により
アクセスされた際に、アクセス対象のデータを保持して
いない場合にはローアクティブの第1信号S1をアクティ
ブにする。この各キャッシュメモリ2,3,4,5が出力する
第1信号S1は4入力の論理回路8の各入力信号となって
いる。When each of the cache memories 2, 3, 4, and 5 is accessed by the data processing unit 1, if it does not hold the data to be accessed, it activates the low-active first signal S1. The first signal S1 output from each of the cache memories 2, 3, 4, 5 is an input signal of the 4-input logic circuit 8.
なおこの論理回路8は、その4入力の内の少なくとも1
入力がアクティブであればローアクティブの出力信号を
アクティブにする。The logic circuit 8 has at least one of the four inputs.
If the input is active, the low active output signal is activated.
また各キャッシュメモリ2,3,4,5とデータ処理部1と
は、データバスDBを介してシステムバスSBに接続されて
いるが、データバスDBにはそのシステムバスSBとの接続
点にバスドライバ回路6が介装されている。The cache memories 2, 3, 4, and the data processing unit 1 are connected to the system bus SB via the data bus DB, but the data bus DB has a bus at the connection point with the system bus SB. The driver circuit 6 is interposed.
バスドライバ回路6は、データ処理部1から出力されて
いる第1信号S1及び論理回路8の出力信号により制御さ
れて、データバスDBを開閉駆動し、データ処理部1及び
各キャッシュメモリ2,3,4,5とシステムバスSBとの間に
接続しまた遮断する。より具体的には、データ処理部1
から出力されている第1信号S1及び論理回路8から出力
されている信号の内のいずれか一方がアクティブであれ
ばバスドライバ回路6はデータ処理部1及び各キャッシ
ュメモリ2,3,4,5とシステムバスSBとの間を接続してデ
ータの送受が可能な状態にする。The bus driver circuit 6 is controlled by the first signal S1 output from the data processing unit 1 and the output signal of the logic circuit 8 to open / close the data bus DB, and the data processing unit 1 and each cache memory 2, 3 Connect between 4, 5 and system bus SB and disconnect. More specifically, the data processing unit 1
If either one of the first signal S1 output from the logic circuit 8 and the signal output from the logic circuit 8 is active, the bus driver circuit 6 causes the data processing unit 1 and each cache memory 2, 3, 4, 5, And system bus SB are connected so that data can be sent and received.
システムバスSBにはバスドライバ回路6を介して上述の
データバスDBが接続されると共に主メモリ7が接続され
ている。The above-mentioned data bus DB is connected to the system bus SB via the bus driver circuit 6, and the main memory 7 is also connected to the system bus SB.
主メモリ7にはデータ処理部1によるアクセス対象とな
る種々のデータが格納されている。The main memory 7 stores various data to be accessed by the data processing unit 1.
このような従来のキャッシュメモリを備えたデータ処理
装置の動作は以下の如くである。The operation of the data processing device having such a conventional cache memory is as follows.
データ処理部1がデータのリードアクセスを行うと、各
キャッシュメモリ2,3,4,5はアクセス対象のデータ自身
に保持されているか否かを判断する。アクセス対象のデ
ータが保持されている場合をキャッシュヒットと称し、
アクセス対象のデータがそれが保持されているキャッシ
ュメモリ2,3,4,5のいずれかからデータバスDBを介して
データ処理部1に送られる。When the data processing unit 1 makes a read access to data, each of the cache memories 2, 3, 4, and 5 determines whether or not the data itself to be accessed is held. When the data to be accessed is held, it is called a cache hit,
The data to be accessed is sent to the data processing unit 1 via the data bus DB from any of the cache memories 2, 3, 4, and 5 in which it is held.
アクセス対象のデータがいずれのキャッシュメモリ2,3,
4,5にも保持されていない場合をキャッシュミスと称
し、主メモリ7からアクセス対象のデータを含む4ワー
ド(各キャッシュメモリ2,3,4,5のライン数に対応す
る)のデータが出力されてシステムバスSB及びデータバ
スDBを介してキャッシュメモリ2,3,4,5及びデータ処理
部1に送られる。データ処理部1はこの主メモリ7から
送られた4ワードのデータを取込む。また各キャッシュ
メモリ2,3,4,5には予め主メモリ7のアドレスの内の保
持可能なアドレス領域がキャッシング可能領域として設
定されており、主メモリ7から送られて来たデータはそ
のアドレスが含まれるキャッシング可能領域が設定され
ているいずれかのキャッシュメモリ2,3,4,5に保持され
る。The data to be accessed is cache memory 2,3,
A case where the data is not held in 4,5 is called a cache miss, and 4-word data (corresponding to the number of lines of each cache memory 2, 3, 4, 5) including the data to be accessed is output from the main memory 7. It is sent to the cache memories 2, 3, 4, 5 and the data processing unit 1 via the system bus SB and the data bus DB. The data processing unit 1 takes in the 4-word data sent from the main memory 7. In each cache memory 2, 3, 4 and 5, an address area that can be held within the address of the main memory 7 is set in advance as a cacheable area, and the data sent from the main memory 7 has the address. Is held in any of the cache memories 2, 3, 4, and 5 in which the cacheable area including is set.
ところで、データ処理部1がデータのリード動作あるい
はライト動作を行う場合、まずキャッシュメモリ2,3,4,
5をアクセスする。この際、データ処理部1から出力さ
れたアクセス信号が主メモリ7にそのまま与えられる
と、主メモリ7からデータが読出されて出力される。一
方、同時にキャッシュメモリ2,3,4,5のいずれかでキャ
ッシュヒットした場合にはそのキャッシュメモリからも
データが出力される。このため、キャッシュメモリ2,3,
4,5のいずれかから出力されたデータと主メモリ7から
出力されたデータとがデータバスDB上で衝突することに
なり、これを回避するために主メモリ7とデータ処理部
1との間をバスドライバ回路6により遮断可能にしてい
る。By the way, when the data processing unit 1 performs a data read operation or a data write operation, first, the cache memories 2, 3, 4,
Access 5. At this time, if the access signal output from the data processing unit 1 is directly applied to the main memory 7, the data is read from the main memory 7 and output. On the other hand, if a cache hit occurs in any of the cache memories 2, 3, 4, and 5 at the same time, the data is also output from that cache memory. Therefore, the cache memory 2,3,
The data output from any one of 4 and 5 and the data output from the main memory 7 will collide on the data bus DB, and in order to avoid this, between the main memory 7 and the data processing unit 1. Can be cut off by the bus driver circuit 6.
データ処理部1がキャッシュミスした場合は、アクセス
対象のデータを主メモリ7からデータ処理部1へ転送す
る必要がある。このため、各キャッシュメモリ2,3,4,5
は自身がキャッシュミスしたことを示す信号、即ちそれ
ぞれの第1信号S1をアクティブにしてバスドライバ回路
6に与える。これにより、バスドライバ回路6が開いて
データバスDBが駆動され、データ処理部1と主メモリ7
との間のデータの送受が可能な状態になる。When the data processing unit 1 makes a cache miss, it is necessary to transfer the data to be accessed from the main memory 7 to the data processing unit 1. Therefore, each cache memory 2,3,4,5
Activates a signal indicating that it has made a cache miss, that is, each first signal S1 and supplies it to the bus driver circuit 6. As a result, the bus driver circuit 6 is opened to drive the data bus DB, and the data processing unit 1 and the main memory 7 are
It becomes possible to send and receive data between and.
また、主メモリ7のメモリ領域の内のI/O領域等のよう
なキャッシングしてはならないような領域をデータ処理
部1がアクセスする際には、データ処理部1から出力さ
れているノンキャッシャブル信号、即ち第2信号S2がア
クティブになる。この第2信号S2はバスドライバ回路6
に与えられており、この第2信号S2がアクティブになる
ことによりバスドライバ回路6はデータバスDBを駆動
し、データ処理部1と主メモリ3との間のデータの送受
を可能な状態とする。これによりデータ処理部1は直接
主メモリ7をアクセスすることが可能になる。Further, when the data processing unit 1 accesses an area such as an I / O area in the memory area of the main memory 7 that should not be cached, the non-cacher output from the data processing unit 1 is used. The bull signal, that is, the second signal S2 becomes active. This second signal S2 is the bus driver circuit 6
When the second signal S2 becomes active, the bus driver circuit 6 drives the data bus DB to enable the data transfer between the data processing unit 1 and the main memory 3. . As a result, the data processing unit 1 can directly access the main memory 7.
以上のように、いずれかのキャッシュメモリ2,3,4,5が
キャッシュヒットした場合以外は、データバスDBが駆動
されてデータ処理部1から主メモリ7をアクセス可能な
状態にする必要がある。As described above, the data bus DB must be driven to make the main memory 7 accessible from the data processing unit 1 except when any one of the cache memories 2, 3, 4, and 5 has a cache hit. .
各キャッシュメモリ2,3,4,5はそれぞれ内部にアクセス
対象のアドレス上位4ビットを比較対象とするアドレス
上位4ビットのアドレスコンパレータを有している。こ
のアドレスコンパレータは、それぞれのキャッシュメモ
リ2,3,4,5にキャッシング可能領域として設定されてい
るアドレスの上位4ビットと、データアクセスに際して
データ処理部1から与えられるアクセス対象のデータの
アドレスの上位4ビットとを比較し、一致している場合
にキャッシングするモードと、一致していない場合にキ
ャッシングするモードとのいずれかを設定することが可
能である。Each of the cache memories 2, 3, 4, and 5 has an address comparator of the upper 4 bits of the address in which the upper 4 bits of the address of the access target are compared. This address comparator is composed of the upper 4 bits of the address set as a cacheable area in each of the cache memories 2, 3, 4, and the upper address of the data to be accessed given from the data processing unit 1 at the time of data access. It is possible to compare four bits and set either a mode for caching when they match or a mode for caching when they do not match.
いま、たとえば第1キャッシュメモリ2のアドレスコン
パレータの設定値が“0000"、第2キャッシュメモリ3
のアドレスコンパレータの設定値が“0100"、第3キャ
ッシュメモリ4のアドレスコンパレータの設定値が“10
00"、第4キャッシュメモリ5のアドレスコンパレータ
の設定値が“1100"であるとし、またアドレスが一致し
た場合にキャッシングするモードが設定されているとす
る。この状態は第2図の如くメモリ空間上で模式的に表
すことが可能である。Now, for example, the setting value of the address comparator of the first cache memory 2 is "0000", the second cache memory 3
The address comparator setting value of "0100", the address comparator setting value of the third cache memory 4 is "10"
00 ", the setting value of the address comparator of the fourth cache memory 5 is" 1100 ", and the mode for caching when the addresses match is set. This state is the memory space as shown in FIG. It can be represented schematically above.
たとえば、データ処理部1がアドレス上位4ビットが
“0100"でアクセスした場合、第2キャッシュメモリ3
のみがキャッシングし、キャッシュミスした場合には第
1信号S1をアクティブにしてバスドライバ回路6に与え
る。他の第1,第3,第4キャッシュメモリ2,4,5はそれぞ
れに設定されているアドレス上位4ビットが一致しない
のでキャッシングはしない。For example, when the data processing unit 1 accesses with the upper 4 bits of the address being “0100”, the second cache memory 3
If only one caches and a cache miss occurs, the first signal S1 is activated and given to the bus driver circuit 6. The other first, third, and fourth cache memories 2, 4, and 5 do not perform caching because the upper 4 bits of the address set in each do not match.
また、データ処理部1によるアクセス対象のアドレスの
上位4ビットがたとえば“0010"である場合は、いずれ
のキャッシュメモリ2,3,4,5のキャッシング可能領域と
してもこのアドレスは設定されていないので、いずれの
キャッシュメモリ2,3,4,5もキャッシングはしない。従
ってこの場合、いずれのキャッシュメモリ2,3,4,5も第
1信号S1をアクティブにすることはないし、またデータ
処理部1も第2信号S2をアクティブにしないので、バス
ドライバ回路6はデータバスDBを駆動することはない。If the upper 4 bits of the address to be accessed by the data processing unit 1 is, for example, “0010”, this address is not set as the cacheable area of any of the cache memories 2, 3, 4, and 5. , Neither of the cache memories 2, 3, 4, 5 is cached. Therefore, in this case, none of the cache memories 2, 3, 4 and 5 activates the first signal S1 and the data processing unit 1 does not activate the second signal S2. It does not drive the bus DB.
一方、アドレスの上位4ビットが一致した場合にキャッ
シングしないモードが設定されている場合は、キャッシ
ュメモリ2,3,4,5の内の少なくとも一つがキャッシング
してキャッシュミスするとデータバスDBが駆動されるの
で、同時に他のいずれかのキャッシュメモリ2,3,4,5が
キャッシュヒットするとそのキャッシュメモリから出力
されたデータと主メモリ7から出力されたデータとが衝
突する。On the other hand, when the mode that does not perform caching when the upper 4 bits of the address match is set, the data bus DB is driven when at least one of the cache memories 2, 3, 4, and 5 causes a cache miss. Therefore, if any of the other cache memories 2, 3, 4, 5 hits the cache at the same time, the data output from the cache memory and the data output from the main memory 7 collide.
たとえば、各キャッシュメモリ2,3,4,5の内部アドレス
コンパレータの設定値が第2図の模式図に示す如くであ
る場合に、データ処理部1によるアクセス対象のデータ
のアドレスの上位4ビットが“0100"であれば、第2キ
ャッシュメモリ3のみがキャッシングせず、他の第1,第
3,第4キャッシュメモリ2,4,5はキャッシングする。こ
の際、たとえば第4キャッシュメモリ5がキャッシュヒ
ットし、他の第1及び第3キャッシュメモリ2,4がキャ
ッシュミスしたとすると、第4キャッシュメモリ5がア
クセス対象のデータを出力するのと同時に他のキャッシ
ュメモリからバスドライバ回路6に与えられている第1
信号S1がアクティブになる。このため、データバスDBが
駆動されて主メモリ7からアクセス対象のデータが出力
されてデータの衝突が発生する。また、アドレスの上位
4ビットが“0010"のデータをデータ処理部1がアクセ
スした場合にも同様のデータの衝突が発生する。For example, when the set values of the internal address comparators of the cache memories 2, 3, 4, and 5 are as shown in the schematic diagram of FIG. 2, the upper 4 bits of the address of the data to be accessed by the data processing unit 1 are If "0100", only the second cache memory 3 does not perform caching,
The third and fourth cache memories 2, 4, 5 cache. At this time, for example, if the fourth cache memory 5 has a cache hit and the other first and third cache memories 2 and 4 have cache misses, the fourth cache memory 5 outputs the data to be accessed and at the same time the other cache memory From the first cache memory to the bus driver circuit 6
Signal S1 becomes active. Therefore, the data bus DB is driven, the data to be accessed is output from the main memory 7, and data collision occurs. The same data collision also occurs when the data processing unit 1 accesses data whose upper 4 bits of the address are "0010".
上述のように、複数のキャッシュメモリを有する従来の
データ処理装置においては、少なくとも1個のキャッシ
ュメモリに設定されているキャッシング可能領域以外の
領域がアクセスされた場合には、アクセス対象のデータ
がキャッシュメモリと主メモリとの双方から出力され、
これらがデータバス上で衝突するという問題がある。As described above, in the conventional data processing device having a plurality of cache memories, when an area other than the cacheable area set in at least one cache memory is accessed, the access target data is cached. Output from both memory and main memory,
There is the problem that they collide on the data bus.
本発明はこのような事情に鑑みてなされたものであり、
複数のキャッシュメモリそれぞれが、アクセス対象のデ
ータのアドレスがキャッシング可能領域であるか否かを
検出し、この結果に従ってデータの衝突を回避するよう
に構成されたデータ処理装置の提供を目的とする。The present invention has been made in view of such circumstances,
An object of the present invention is to provide a data processing device configured such that each of a plurality of cache memories detects whether an address of data to be accessed is a cacheable area and avoids data collision according to the result.
本発明のデータ処理装置は、複数のキャッシュメモリそ
れぞれに設定されているキャッシング可能領域以外の領
域のアドレスがアクセスされたか否かを検出する手段を
備え、複数のキャッシュメモリ総てでそれぞれのキャッ
シング可能領域以外がアクセスされたことが検出された
場合にデータ処理部と主メモリとを接続するように構成
している。The data processor of the present invention comprises means for detecting whether or not an address of an area other than the cacheable area set in each of the plurality of cache memories has been accessed, and each of the plurality of cache memories is capable of caching. The configuration is such that the data processing unit and the main memory are connected when it is detected that an area other than the area is accessed.
本発明のデータ処理装置では、複数のキャッシュメモリ
総てでそれぞれのキャッシング可能領域以外がアクセス
されたことが検出された場合にデータ処理部と主メモリ
とが接続されるので、データの衝突が回避される。In the data processing device of the present invention, the data processing unit and the main memory are connected when it is detected that all areas other than the respective cacheable areas are accessed in all of the plurality of cache memories, so that data collision is avoided. To be done.
以下、本発明をその実施例を示す図面に基づいて詳述す
る。Hereinafter, the present invention will be described in detail with reference to the drawings showing an embodiment thereof.
第1図は本発明に係るデータ処理装置の要部の構成を示
すブロック図である。なお、第3図に示した従来例と同
一または相当部分には同一の参照符号を付与してある。FIG. 1 is a block diagram showing a configuration of a main part of a data processing device according to the present invention. The same or corresponding parts as those of the conventional example shown in FIG. 3 are designated by the same reference numerals.
図中、1はデータ処理部であり、後述する複数のキャッ
シュメモリ、即ち第1,第2,第3,第4キャッシュメモリ2,
3,4,5または主メモリ7に対してデータのアクセスを行
う。またこのデータ処理部1は、各キャッシュメモリ2,
3,4,5に保持されてはいけないような主メモリ7の領域
(ノンキャッシャブル領域)のデータをアクセスする場
合には後述するバスドライバ回路6へ与えているローア
クティブの第2信号S2をアクティブ(ローレベル)にす
る。In the figure, reference numeral 1 denotes a data processing unit, which includes a plurality of cache memories to be described later, that is, first, second, third and fourth cache memories 2,
Data is accessed to 3, 4, 5 or the main memory 7. In addition, the data processing unit 1 uses each cache memory 2,
When accessing data in the area (non-cacheable area) of the main memory 7 that should not be held in 3, 4 or 5, the low active second signal S2 given to the bus driver circuit 6 to be described later is applied. Make it active (low level).
各キャッシュメモリ2,3,4,5は4ウェイセットアソシア
ティブ方式及びライトスルー方式を採用しており、常に
主メモリ7とのデータの一致を維持している。Each of the cache memories 2, 3, 4, and 5 adopts the 4-way set associative method and the write-through method, and always keeps the data coincident with the main memory 7.
各キャッシュメモリ2,3,4,5は、データ処理部1により
アクセスされた際に、アクセス対象のデータを保持して
いない場合にはローアクティブの第1信号S1をアクティ
ブにする。この各キャッシュメモリ2,3,4,5が出力する
第1信号S1は4入力の論理回路8の各入力信号となって
いる。When each of the cache memories 2, 3, 4, and 5 is accessed by the data processing unit 1, if it does not hold the data to be accessed, it activates the low-active first signal S1. The first signal S1 output from each of the cache memories 2, 3, 4, 5 is an input signal of the 4-input logic circuit 8.
なおこの論理回路8は、その4入力の内の少なくとも1
入力がアクティブであればローアクティブの出力信号を
アクティブにする。The logic circuit 8 has at least one of the four inputs.
If the input is active, the low active output signal is activated.
また各キャッシュメモリ2,3,4,5とデータ処理部1と
は、データバスDBを介してシステムバスSBに接続されて
いるが、データバスDBにはそのシステムバスSBとの接続
点にバスドライバ回路6が介装されている。The cache memories 2, 3, 4, and the data processing unit 1 are connected to the system bus SB via the data bus DB, but the data bus DB has a bus at the connection point with the system bus SB. The driver circuit 6 is interposed.
更に、各キャッシュメモリ2,3,4,5には予め主メモリ7
のアドレスの内の保持可能なアドレス領域がキャッシン
グ可能領域として設定されており、主メモリ7から送ら
れて来たデータはそのアドレスと一致するキャッシング
可能領域が設定されているいずれまのキャッシュメモリ
2,3,4,5に保持される。Further, each cache memory 2, 3, 4, 5 has a main memory 7 in advance.
The address area that can be held is set as a cacheable area, and the data sent from the main memory 7 has a cacheable area that matches the address.
It is held at 2,3,4,5.
具体的には、各キャッシュメモリ2,3,4,5にはそれぞれ
内部に対象のアドレス上位4ビットを比較対象とするア
ドレスコンパレータを有している。このアドレスコンパ
レータは、それぞれのキャッシュメモリ2,3,4,5にキャ
ッシング可能領域として設定されているアドレスの上位
4ビットと、データアクセスに際してデータ処理部1か
ら与えられるアクセス対象のデータのアドレスの上位4
ビットとを比較し、一致している場合にキャッシングす
るモードと、一致していない場合にキャッシングするモ
ードとのいずれかの設定することが可能である。Specifically, each of the cache memories 2, 3, 4, and 5 has an address comparator inside which the upper 4 bits of the target address are compared. This address comparator is composed of the upper 4 bits of the address set as a cacheable area in each of the cache memories 2, 3, 4, and the upper address of the data to be accessed given from the data processing unit 1 at the time of data access. Four
It is possible to compare the bits with each other, and set either the mode in which caching is performed when they match or the mode in which caching is performed when they do not match.
また各キャッシュメモリ2,3,4,5からはローアクティブ
の第3信号S3が4入力の論理回路9へ与えられている。
この第3信号S3は、それぞれのキャッシュメモリ2,3,4,
5において、上述の内部アドレスコンパレータによる比
較結果が一致していない場合、換言すればそれぞれのキ
ャッシュメモリ2,3,4,5のキャッシング可能領域以外の
アドレスがアクセスされた場合にアクティブになる。そ
して、論理回路9は4入力総てがアクティブである場合
にのみそのローアクティブの出力信号である第4信号S4
をアクティブにする。この第4信号S4はバスドライバ回
路6に与えられている。Further, the low-active third signal S3 is applied to the 4-input logic circuit 9 from each of the cache memories 2, 3, 4, and 5.
This third signal S3 is applied to each of the cache memories 2, 3, 4,
In 5, when the comparison result by the above-mentioned internal address comparator does not match, in other words, it becomes active when an address other than the cacheable area of each cache memory 2, 3, 4, 5 is accessed. Then, the logic circuit 9 outputs the fourth signal S4 which is a low active output signal only when all four inputs are active.
To activate. The fourth signal S4 is given to the bus driver circuit 6.
バスドライバ回路6は、データ処理部1から与えられて
いる第1信号S1,論理回路8の出力信号及び論理回路9
から与えられている第4信号S4により制御されて、デー
タバスDBを開閉駆動する。より具体的には、データ処理
部1から与えられている第1信号S1,論理回路8の出力
信号及び論理回路9から出力されている第4信号S4の少
なくとも一つがアクティブであれば、バスドライバ回路
6はデータ処理部1及び各キャッシュメモリ2,3,4,5と
システムバスSBとの間を接続してデータの送受が可能な
状態にする。The bus driver circuit 6 includes the first signal S1, the output signal of the logic circuit 8 and the logic circuit 9 provided from the data processing unit 1.
The data bus DB is opened / closed by being controlled by the fourth signal S4 given from the. More specifically, if at least one of the first signal S1, the output signal of the logic circuit 8 and the fourth signal S4 output from the logic circuit 9 provided from the data processing unit 1 is active, the bus driver The circuit 6 connects the data processing unit 1 and the cache memories 2, 3, 4, and 5 to the system bus SB so that data can be transmitted and received.
システムバスSBにはバスドライバ回路6を介して上述の
データバスDBが接続されると共に主メモリ7が接続され
ている。The above-mentioned data bus DB is connected to the system bus SB via the bus driver circuit 6, and the main memory 7 is also connected to the system bus SB.
主メモリ7にはデータ処理部1によるアクセス対象とな
る種々のデータが格納されている。The main memory 7 stores various data to be accessed by the data processing unit 1.
このような従来のキャッシュメモリを備えたデータ処理
装置の動作は以下の如くである。The operation of the data processing device having such a conventional cache memory is as follows.
データ処理部1がデータのリードアクセスを行うと、各
キャッシュメモリ2,3,4,5はアクセス対象のデータが自
身に保持されているか否かを判断する。アクセス対象の
データが保持されている場合をキャッシュヒットと称
し、アクセス対象のデータはそれが保持されているキャ
ッシュメモリ2,3,4,5のいずれかからデータバスDBを介
してデータ処理部1に送られる。When the data processing unit 1 makes a read access to data, each of the cache memories 2, 3, 4, and 5 determines whether or not the data to be accessed is held by itself. The case where the data to be accessed is held is referred to as a cache hit, and the data to be accessed is from the cache memory 2, 3, 4, or 5 where it is held via the data bus DB to the data processing unit 1. Sent to.
アクセス対象のデータがいずれのキャッシュメモリ2,3,
4,5にも保持されていない場合をキャッシュミスと称
し、主メモリ7からアクセス対象のデータを含む4ワー
ド(各キャッシュメモリ2,3,4,5のライン数に対応す
る)のデータがシステムバスSB及びデータバスDBを介し
てキャッシュメモリ2,3,4,5及びデータ処理部1に送ら
れる。データ処理部1はこの主メモリ7から送られた4
ワードのデータを取込む。また各キャッシュメモリ2,3,
4,5はそのアドレスと一致するキャッシング可能領域が
設定されているいずれかのキャッシュメモリ2,3,4,5に
保持される。The data to be accessed is cache memory 2,3,
The case where the data is not held in 4,5 is called a cache miss, and the data of 4 words (corresponding to the number of lines of each cache memory 2, 3, 4, 5) including the data to be accessed from the main memory 7 is the system. It is sent to the cache memories 2, 3, 4, 5 and the data processing unit 1 via the bus SB and the data bus DB. The data processing unit 1 sends the data from the main memory 7
Capture word data. In addition, each cache memory 2,3,
4,5 are held in any of the cache memories 2, 3, 4, 5 in which a cacheable area that matches the address is set.
ところで、データ処理部1がデータのリード動作あるい
はライト動作を行う場合、まずキャッシュメモリ2,3,4,
5をアクセスする。この際、データ処理部1から出力さ
れたアクセス信号が主メモリ7にそのまま与えられる
と、主メモリ7からデータが読出されて出力される。一
方、同時にキャッシュメモリ2,3,4,5のいずれかでキャ
ッシュヒットした場合にはそのキャッシュメモリからも
データが出力される。このため、キャッシュメモリ2,3,
4,5から出力されたデータと主メモリ7から出力された
データとがデータバスDB上で衝突することになり、これ
を回避するために主メモリ7とデータ処理部1との間を
バスドライバ回路6により遮断可能にしている。By the way, when the data processing unit 1 performs a data read operation or a data write operation, first, the cache memories 2, 3, 4,
Access 5. At this time, if the access signal output from the data processing unit 1 is directly applied to the main memory 7, the data is read from the main memory 7 and output. On the other hand, if a cache hit occurs in any of the cache memories 2, 3, 4, and 5 at the same time, the data is also output from that cache memory. Therefore, the cache memory 2,3,
The data output from 4,5 and the data output from the main memory 7 collide with each other on the data bus DB. To avoid this, a bus driver is provided between the main memory 7 and the data processing unit 1. It is possible to cut off by the circuit 6.
データ処理部1がキャッシュミスした場合は、アスセス
対象のデータを主メモリ7からデータ処理部1へ転送す
る必要がある。このため、各キャッシュメモリ2,3,4,5
は自身がキャッシュミスしたことを示す信号、即ち第1
信号S1をアクティブとしてバスドライバ回路6に与え
る。これにより、バスドライバ回路6が開いてデータバ
スDBが駆動され、データ処理部1と主メモリ7との間の
データの送受が可能な状態になる。When the data processing unit 1 makes a cache miss, it is necessary to transfer the data to be accessed from the main memory 7 to the data processing unit 1. Therefore, each cache memory 2,3,4,5
Is a signal indicating that it has made a cache miss, that is, the first
The signal S1 is supplied to the bus driver circuit 6 as active. As a result, the bus driver circuit 6 is opened and the data bus DB is driven, so that data can be sent and received between the data processing unit 1 and the main memory 7.
また、主メモリ7のメモリ領域の内のI/O領域等のよう
なキャッシングしてはならないような領域(ノンキャッ
シャブル信号)をデータ処理部1がアクセスする際に
は、データ処理部1から出力されるノンキャッシャブル
信号、即ち第2信号S2がアクティブになる。この第2信
号S2バスドライバ回路6に与えられており、この第2信
号S2がアクティブになることによりバスドライバ回路6
はデータバスDBを駆動し、データ処理部1と主メモリ3
との間のデータの送受を可能な状態とする。これにより
データ処理部1は直接主メモリ7をアクセスすることが
可能になる。Further, when the data processing unit 1 accesses an area (non-cacheable signal) that should not be cached, such as an I / O area in the memory area of the main memory 7, the data processing unit 1 The non-cacheable signal that is output, that is, the second signal S2 becomes active. The second signal S2 is given to the bus driver circuit 6, and when the second signal S2 becomes active, the bus driver circuit 6
Drives the data bus DB, the data processing unit 1 and the main memory 3
It is possible to send and receive data between and. As a result, the data processing unit 1 can directly access the main memory 7.
以上のように、いずれかのキャッシュメモリ2,3,4,5が
キャッシュヒットした場合以外は、データバスDBを駆動
してデータ処理部1による主メモリ7に対するアクセス
を可能にする必要がある。As described above, it is necessary to drive the data bus DB so that the data processing unit 1 can access the main memory 7 except when one of the cache memories 2, 3, 4, and 5 has a cache hit.
いま、たとえば第1キャッシュメモリ2のアドレスコン
パレータの設定値が“0000"、第2キャッシュメモリ3
のアドレスコンパレータの設定値が“0100"、第3キャ
ッシュメモリ4のアドレスコンパレータの設定値が“10
00"、第4キャッシュメモリ5のアドレスコンパレータ
の設定値が“1100"であるとし、またアドレスが一致し
た場合にキャッシングするモードが設定されているとす
る。この状態は第2図の如くメモリ空間で模式的に表す
ことが可能である。Now, for example, the setting value of the address comparator of the first cache memory 2 is "0000", the second cache memory 3
The address comparator setting value of "0100", the address comparator setting value of the third cache memory 4 is "10"
00 ", the setting value of the address comparator of the fourth cache memory 5 is" 1100 ", and the mode for caching when the addresses match is set. This state is the memory space as shown in FIG. Can be schematically represented by.
たとえば、データ処理部1のアクセス対象のアドレスの
上位4ビットが“0100"である場合、第2キャッシュメ
モリ3のみがキャッシングし、第3信号S3をノンアクテ
ィブにする。他の第1,第3,第4キャッシュメモリ2,4,5
はそれぞれに設定されているキャッシング可能領域であ
るアドレス上位4ビットが一致しないのでキャッシング
はせず、それぞれの、第3信号S3をアクティブにする。For example, when the upper 4 bits of the address to be accessed by the data processing unit 1 are "0100", only the second cache memory 3 caches and the third signal S3 is made inactive. Other first, third, fourth cache memory 2,4,5
Does not perform caching because the upper 4 bits of the address, which is the cacheable area set for each, do not match, and activates the respective third signal S3.
以上により論理回路9を出力信号である第4信号S4はア
クティブになり、バスドライバ回路6はデータバスDBを
駆動することはない。この際、キャッシングした第2キ
ャッシュメモリ3がキャッシュミスした場合及びアクセ
ス対象がノンキャッシャブル領域である場合にのみ、そ
れぞれ第2キャッシュメモリ3及びデータ処理部1から
バスドライバ回路6へ与えられている第1信号S1及び第
2信号S2がアクティブになってバスドライバ回路6がデ
ータバスDBを駆動する。従って、第2キャッシュメモリ
3から出力されるデータと主メモリ7から出力されるデ
ータとが衝突することはない。As described above, the fourth signal S4, which is an output signal from the logic circuit 9, becomes active, and the bus driver circuit 6 does not drive the data bus DB. At this time, only when the cached second cache memory 3 has a cache miss and when the access target is a non-cacheable area, the data is supplied from the second cache memory 3 and the data processing unit 1 to the bus driver circuit 6, respectively. The first signal S1 and the second signal S2 are activated and the bus driver circuit 6 drives the data bus DB. Therefore, the data output from the second cache memory 3 does not collide with the data output from the main memory 7.
また、データ処理部1によるアクセス対象のアドレスの
上位4ビットが“0010"である場合は、このアドレスは
いずれのキャッシュメモリ2,3,4,5のキャッシング可能
領域としても設定されていないので、総てのキャッシュ
メモリ2,3,4,5の第3信号S3はアクティブになる。従っ
て、論理回路9の出力信号である第4信号S4もアクティ
ブになるので、バスドライバ回路6はデータバスDBを駆
動する。これによりデータ処理部1は主メモリ7をアク
セスすることが可能になる。If the upper 4 bits of the address to be accessed by the data processing unit 1 is “0010”, this address is not set as the cacheable area of any of the cache memories 2, 3, 4, and 5, The third signal S3 of all the cache memories 2, 3, 4, 5 becomes active. Therefore, the fourth signal S4, which is the output signal of the logic circuit 9, becomes active, and the bus driver circuit 6 drives the data bus DB. This allows the data processing unit 1 to access the main memory 7.
一方、アドレスの上位4ビットが一致した場合にキャッ
シングしないモードが設定されている場合は以下の如く
である。On the other hand, when the mode that does not perform caching when the upper 4 bits of the address match is set, the following is performed.
たとえば、各キャッシュメモリ2,3,4,5の内部アドレス
コンパレータの設定値が第2図に示す如くである場合、
データ処理部1によるアクセス対象のデータのアドレス
の上位4ビットが“0100"であれば、第2キャッシュメ
モリ3のみがキャッシングせず、他の第1,第3,第4キャ
ッシュメモリ2,4,5はキャッシングする。即ち、第2キ
ャッシュメモリ3の第3信号S3はアクティブになり、他
の第1,3,4キャッシュメモリ2,4,5の第3信号S3はノンア
クティブになる。従って、論理回路9の出力信号である
第4信号S4はノンアクティブになるので、バスドライバ
回路6はデータバスDBを駆動することはない。For example, when the set values of the internal address comparators of the cache memories 2, 3, 4, and 5 are as shown in FIG.
If the upper 4 bits of the address of the data to be accessed by the data processing unit 1 are “0100”, only the second cache memory 3 does not cache, and the other first, third, fourth cache memories 2, 4, 5 is caching. That is, the third signal S3 of the second cache memory 3 becomes active, and the third signal S3 of the other 1,3,4 cache memories 2,4,5 becomes non-active. Therefore, the fourth signal S4 which is the output signal of the logic circuit 9 becomes non-active, and the bus driver circuit 6 does not drive the data bus DB.
この際、データバスDBが駆動されるのは、第2キャッシ
ュメモリ3以外の第1,3,4キャッシュメモリ2,4,5がキャ
ッシュミスした場合と、データ処理部1によるアクセス
対象がノンキャッシャブル領域である場合のみであるの
で、データの衝突は発生しない。At this time, the data bus DB is driven when the first, third, fourth cache memories 2, 4, 5 other than the second cache memory 3 cause a cache miss, and when the access target by the data processing unit 1 is a non-cacher. Only in the case of the bull area, data collision does not occur.
また、データ処理部1によるアクセス対象のアドレスの
上位4ビットが“0010"である場合、総てのキャッシュ
メモリ2,3,4,5がキャッシングしてそれぞれの第3信号S
3がノンアクティブになる。このため、論理回路9の出
力信号である第4信号S4もノンアクティブになってバス
ドライバ回路6はデータバスDBを駆動しないので、デー
タの衝突は発生しない。Further, when the upper 4 bits of the address to be accessed by the data processing unit 1 are “0010”, all the cache memories 2, 3, 4 and 5 are cached and the respective third signal S.
3 becomes inactive. Therefore, the fourth signal S4, which is the output signal of the logic circuit 9, becomes non-active and the bus driver circuit 6 does not drive the data bus DB, so that no data collision occurs.
以上の詳述したように本発明のデータ処理では、複数の
キャッシュメモリを備えている場合に、複数のキャッシ
ュメモリ総てでそれぞれのキャッシング可能領域以外が
アクセスされたことが検出された場合にはデータ処理部
と主メモリとが接続されてデータ処理部からのアクセス
が可能になるように構成しているので、データの衝突が
回避される。As described in detail above, in the data processing of the present invention, when a plurality of cache memories are provided, if it is detected that all cache memories other than the respective cacheable areas are accessed. Since the data processing unit and the main memory are connected so that the data processing unit can access the data processing unit, data collision can be avoided.
第1図は本発明のデータ処理装置の要部の構成を示すブ
ロック図、第2図は複数のキャッシュメモリそれぞれの
キャッシング可能領域を示す模式図、第3図は従来のキ
ャッシュメモリを備えたデータ処理装置の要部の構成を
示すブロック図である。 1……データ処理部、2,3,4,5……キャッシュメモリ、
6……バスドライバ回路、7……主メモリ、DB……デー
タバス、SB……システムバス、S1……第1信号、S2……
第2信号、S3……第3信号 なお、各図中同一符号は同一又は相当部分を示す。FIG. 1 is a block diagram showing a configuration of a main part of a data processing apparatus of the present invention, FIG. 2 is a schematic diagram showing a cacheable area of each of a plurality of cache memories, and FIG. 3 is a data having a conventional cache memory. It is a block diagram which shows the structure of the principal part of a processing apparatus. 1 ... Data processing unit, 2,3,4,5 ... Cache memory,
6 ... Bus driver circuit, 7 ... Main memory, DB ... Data bus, SB ... System bus, S1 ... First signal, S2 ...
2nd signal, S3 ... 3rd signal In addition, the same code | symbol shows the same or corresponding part in each figure.
Claims (1)
ていて前記データ処理部によりアクセスされる主メモリ
と、それぞれ前記主メモリの所定の領域が保持可能領域
として設定されその保持可能領域内の一部の記憶内容を
保持し、前記データ処理部によるデータアクセスに際し
てアクセス対象のデータを保持していない場合に所定の
信号を出力する複数のキャッシュメモリと、前記所定の
信号が与えられた場合に前記データ処理部と前記システ
ムバスとを接続して前記データ処理部による前記主メモ
リへのアクセスを可能にするバスドライバ回路とを備え
たデータ処理装置において、 前記各キャッシュメモリは、前記データ処理部によるア
クセス対象のデータがそれぞれに設定されている保持可
能領域以外である場合に所定の信号を出力する手段をそ
れぞれ備え、 前記バスドライバ回路は、総てのキャッシュメモリから
前記所定の信号が出力された場合に前記データ処理部と
前記システムバスとを接続すべくなしてあることを特徴
とするデータ処理装置。1. A data processing unit, a main memory connected to a system bus and accessed by the data processing unit, and a predetermined area of the main memory is set as a holdable area. A plurality of cache memories that hold a part of the stored contents and output a predetermined signal when the data to be accessed is not held at the time of data access by the data processing unit, and a case where the predetermined signal is given. A data processing device comprising a bus driver circuit that connects the data processing unit and the system bus to enable the data processing unit to access the main memory, wherein each of the cache memories includes the data processing unit. Outputs a predetermined signal when the data to be accessed by is outside the holdable area set for each The bus driver circuit is configured to connect the data processing unit and the system bus when the predetermined signal is output from all the cache memories. Processing equipment.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1146036A JPH0748189B2 (en) | 1989-06-07 | 1989-06-07 | Data processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1146036A JPH0748189B2 (en) | 1989-06-07 | 1989-06-07 | Data processing device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0310345A JPH0310345A (en) | 1991-01-17 |
| JPH0748189B2 true JPH0748189B2 (en) | 1995-05-24 |
Family
ID=15398659
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1146036A Expired - Lifetime JPH0748189B2 (en) | 1989-06-07 | 1989-06-07 | Data processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0748189B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5502828A (en) * | 1992-12-18 | 1996-03-26 | Advanced Micro Devices, Inc. | Reducing memory access in a multi-cache multiprocessing environment with each cache mapped into different areas of main memory to avoid contention |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS61267149A (en) * | 1985-05-21 | 1986-11-26 | Nec Corp | Data processor |
-
1989
- 1989-06-07 JP JP1146036A patent/JPH0748189B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0310345A (en) | 1991-01-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5361391A (en) | Intelligent cache memory and prefetch method based on CPU data fetching characteristics | |
| US6321321B1 (en) | Set-associative cache-management method with parallel and single-set sequential reads | |
| JPH06208508A (en) | Cash tag memory | |
| US20020199079A1 (en) | Method to prefetch data from system memory using a bus interface unit | |
| JPH06309216A (en) | Data processor with cache memory capable of being used as linear ram bank | |
| JPH0668735B2 (en) | Cache memory | |
| US6219765B1 (en) | Memory paging control apparatus | |
| US5502828A (en) | Reducing memory access in a multi-cache multiprocessing environment with each cache mapped into different areas of main memory to avoid contention | |
| US5835934A (en) | Method and apparatus of low power cache operation with a tag hit enablement | |
| US5737575A (en) | Interleaved key memory with multi-page key cache | |
| US6363460B1 (en) | Memory paging control method | |
| US6314494B1 (en) | Dynamically size configurable data buffer for data cache and prefetch cache memory | |
| US5367659A (en) | Tag initialization in a controller for two-way set associative cache | |
| JPH04357539A (en) | Dual port cache tag memory device | |
| JPH02165250A (en) | Data processor | |
| EP1789883B1 (en) | A virtual address cache and method for sharing data using a unique task identifier | |
| US5619673A (en) | Virtual access cache protection bits handling method and apparatus | |
| US5761722A (en) | Method and apparatus for solving the stale data problem occurring in data access performed with data caches | |
| JPH0748189B2 (en) | Data processing device | |
| JPH02302853A (en) | Improved type cash access method and apparatus | |
| JPH07234819A (en) | Cache memory | |
| JPH01229345A (en) | Data processor | |
| JP2976980B2 (en) | Cache control method | |
| JPH03230238A (en) | Cache memory control system | |
| JPH05342101A (en) | Hierarchical cache memory |