JPH0383150A - Control system for cache device with address converting mechanism - Google Patents

Control system for cache device with address converting mechanism

Info

Publication number
JPH0383150A
JPH0383150A JP1221047A JP22104789A JPH0383150A JP H0383150 A JPH0383150 A JP H0383150A JP 1221047 A JP1221047 A JP 1221047A JP 22104789 A JP22104789 A JP 22104789A JP H0383150 A JPH0383150 A JP H0383150A
Authority
JP
Japan
Prior art keywords
address
cache
tlb
logical
bus
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
JP1221047A
Other languages
Japanese (ja)
Inventor
Masanobu Yuhara
雅信 湯原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1221047A priority Critical patent/JPH0383150A/en
Publication of JPH0383150A publication Critical patent/JPH0383150A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To resolve a synonym problem in a single CPU by introducing an inverse TLB besides a TLB, a TAG, and cache data and using a logical cache which does not require address conversion at the time of cache hit. CONSTITUTION:Such control is performed that a physical address corresponding to the logical address of a cache block registered in a TAG 2 is certainly registered in an inverse TLB 3. When a system bus is monitored to find that the physical address transmitted to a main device hits the inverse TLB 3, the TAG 2 is accessed by the corresponding logical address as the output of the inverse TLB 3, and the operation to secure the consistency of the cache is performed in the case of hit. Thus, the logical cache is used to resolve a synonym problem, and the snoop function is realized.

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術(第9図〉 発明が解決しようとする課題 課題を解決するための手段(第1図) 作用 実施例(第2図〜第8図) 発明の効果 〔概要〕 アドレス変換機構付キャッシュ装置の制御方式論理キャ
ッシュを使用してシノニム問題を解決すると共に、スヌ
ーブ機能をも実現できるようにすることを目的とし、 アドレス変換とバッファリングを行うアドレス変換機構
付キャッシュ装置において、TLBと、逆TLBと、T
AGと、与えられた論理アドレスバスの内容と、その論
理アドレスを物理アドレスに変換した結果を、更に逆T
LBによって逆変換した内部論理アドレスバスの内容と
を比較する比較器とを設け、TAGに登録されているキ
ャッシュブロックの物理アドレスは、必ず逆TLBに登
録されるように制御し、かつ、外部のバス上の物理アド
レスが逆TLBにヒツトした場合には、逆TLBの出力
でTAGをアクセスし、TAGにヒツトしていたらキャ
ッシュの一貫性を保証する動作を実行するように構成す
る。
[Detailed Description of the Invention] [Table of Contents] Overview Industrial Application Fields Prior Art (Fig. 9) Means for Solving the Problems to be Solved by the Invention (Fig. 1) Working Examples (Fig. 2) - Figure 8) Effects of the invention [Summary] The purpose of this invention is to solve the synonym problem by using a control method logical cache of a cache device with an address translation mechanism, and also to realize a snob function. In a cache device with an address translation mechanism that performs buffering, a TLB, an inverse TLB, and a
AG, the contents of the given logical address bus, and the result of converting the logical address to a physical address, and further inverse T.
A comparator is provided to compare the contents of the internal logical address bus reversely converted by the LB, and the physical address of the cache block registered in the TAG is controlled so that it is always registered in the reverse TLB, and If the physical address on the bus hits the inverted TLB, the TAG is accessed using the output of the inverted TLB, and if the TAG is hit, an operation is executed to ensure cache coherence.

〔産業上の利用分野〕[Industrial application field]

本発明はアドレス変換機構付キャッシュ装置の制御方式
に関し、更に詳しくいえば、データ処理装置に用いられ
、特に、キャッシュとして論理キャッシュを用い、シノ
ニム問題を解決すると共に、スヌーブ機能をも実現でき
るようにしたアドレス変換機構付キャッシュ装置の制御
方式に関する。
The present invention relates to a control method for a cache device with an address translation mechanism, and more specifically, it is used in a data processing device, and in particular, it uses a logical cache as a cache to solve the synonym problem and also realize a snob function. This invention relates to a control method for a cache device with an address translation mechanism.

〔従来の技術〕[Conventional technology]

第9図は、従来例の説明図であり、(イ)はアドレス変
換の説明図、(ロ)は物理キャッシュを使用した並列ア
クセス方式の説明図である。
FIG. 9 is an explanatory diagram of a conventional example, in which (a) is an explanatory diagram of address conversion, and (b) is an explanatory diagram of a parallel access method using a physical cache.

従来、複数の論理アドレスが1つの物理アドレスに変換
されることがある時、キャッシュの一貫性を保つには、
物理キャッシュ(物理アドレスでキャッシュを検索する
)を使用した、更に高性能なシステムでは、TLB用の
RAMと、キャッシュのTAGRAM (アドレス等の
記憶部分)を同時にアクセスする並列アクセス方式がと
られている。
Traditionally, to maintain cache coherency when multiple logical addresses may be translated into one physical address,
More high-performance systems that use a physical cache (searching the cache using physical addresses) use a parallel access method that simultaneously accesses the TLB RAM and the cache's TAGRAM (the part that stores addresses, etc.). .

(イ)図のように、論理アドレスのO〜工1ビットはオ
フセット(ページ内のアドレスで、物理アドレスに同じ
)となっていて物理アドレスへの変換時に、この部分は
変換しない。
(B) As shown in the figure, bits 0 to 1 of the logical address are an offset (an address within a page, the same as a physical address), and this part is not converted when converting to a physical address.

従って、残りの12〜31ビツトの論理ページアドレス
だけを物理ページアドレスへ変換する。
Therefore, only the remaining 12 to 31 bits of logical page addresses are converted into physical page addresses.

(ロ)図において、論理アドレスの12〜16ビントの
アドレスを用いてTLBLA (TI、Bの論理アドレ
ス部分)を引き、その結果の出力と、論理アドレスの1
7〜31ビツトのアドレスとを比較し、比較結果により
、TLBヒツトを見る。
(b) In the figure, TLBLA (logical address part of TI, B) is drawn using the 12th to 16th bits of the logical address, and the output of the result and the 1st bit of the logical address are drawn.
Compare the 7 to 31 bit addresses and check the TLB hit based on the comparison result.

また、論理アドレスの12〜16ビツトのアドレスでT
LBPA (TLBの物理アドレス部分)を引き、その
出力の物理アドレスと、論理アドレスの4〜11ピント
のアドレス (物理アドレス)によりTAGから引いた
物理アドレスとを比較し、この比較結果と、上記TLB
ヒツトを見る比較結果とが、共に一敗した比較結果であ
った場合には、キャツシュヒツトとなる。
Also, T in the 12-16 bit logical address
Subtract LBPA (physical address part of TLB), compare the output physical address with the physical address subtracted from TAG using the address (physical address) of the 4th to 11th pins of the logical address, and use this comparison result and the above TLB.
If both of the results of the comparison result in one loss, the result is a hit.

そして、TLBPAの出力と、論理アドレスのO〜11
ビットのアドレスにより、物理アドレスに変換する。
Then, the output of TLBPA and the logical address 0 to 11
Converts a bit address to a physical address.

このようにすると、一般に、論理アドレスを用いてTL
Bを引き、物理アドレスに変換し、この物理アドレスを
用いてキャッシュを引く、という2段階のRAMを引く
動作を必要としていたのが、上記のような並列アクセス
方式によると、この点が改善され高性能なシステムとな
る。
In this way, the logical address is generally used to
The parallel access method described above has improved this point, which required a two-step RAM drawing operation: drawing B, converting it to a physical address, and using this physical address to draw the cache. This results in a high-performance system.

上記のように、物理キャッシュでTLBとTAGを同時
にアクセスするためには、TAGRAMをアクセスする
ためのアドレス部分がアドレス変換の対象になっていな
いビットである必要がある。
As described above, in order to access the TLB and TAG simultaneously in the physical cache, the address portion for accessing the TAGRAM needs to be a bit that is not subject to address translation.

例えば、アドレス変換の1ページが4KBで、論理アド
レス、物理アドレスとも32ビ・ノドの場合、第9図(
イ)のように、下位12°ピントのオフセント (ペー
ジ内のアドレス)がアドレス変換の対象外である(物理
アドレスのまま)。
For example, if one page of address translation is 4KB and both the logical address and physical address are 32 bits, Figure 9 (
As in (b), the offset (address within the page) of the lower 12 degrees of focus is not subject to address translation (it remains a physical address).

アドレスが12ビツトということは、キャッシュの容量
が4KB(=ページサイズ)までしか許されないことに
なる。
The fact that the address is 12 bits means that the cache capacity is only allowed up to 4KB (=page size).

そこで、セットアソシアテイビテイを、4ウエイあるい
は16ウエイと増やすことになるが、制御の高速性や複
雑性の問題があるので限度がある。
Therefore, the set associativity is increased to 4 ways or 16 ways, but there is a limit due to the problems of high speed and complexity of control.

16ウエイにしても、4KBX16=64KBである。Even if it is 16 ways, 4KB x 16 = 64KB.

これに対し、主記憶容量が多い方では100MBから数
GBになっている。このような場合には、キャッシュの
容量も増やす必要があり、論理キャッシュでは100K
Bから数MBのキャンシュもめずらしくなくなっている
On the other hand, those with larger main memory capacities range from 100MB to several GB. In such a case, it is necessary to increase the cache capacity, and the logical cache capacity is 100K.
Canches of several MB from B are no longer rare.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記のような従来のものにおいては次のような欠点があ
った。
The above-mentioned conventional devices had the following drawbacks.

(1)論理キャッシュは、大容量のものも使用可能であ
るが、物理キュッシュは容量を増やしにくい。
(1) A large capacity logical cache can be used, but it is difficult to increase the capacity of a physical cache.

(2)物理キュッシュは、論理キャッシュに比較して検
索時間がかかる。
(2) Physical cache takes longer to search than logical cache.

即ち、論理キャッシュでは、キャッシュにヒントしてい
る限り、アドレス変換結果を(例え、平行してアクセス
していたとしても)使用する必要がないが、物理キュソ
シュでは、アドレス変換結果が正しかったか(TLBに
ヒントしたか)を制?il論理に加える必要があり、ク
リティカルバスになる。
In other words, in the logical cache, as long as the cache is hinted, there is no need to use the address translation result (even if accessed in parallel), but in the physical cache, it is not necessary to use the address translation result (TLB Did you give a hint to)? It needs to be added to the il logic and becomes a critical bus.

(3)論理キャッシュでは、複数の論理アドレスが、1
つの物理アドレスに変換される時に、それらが同一デー
タであることが識別困難である。
(3) In a logical cache, multiple logical addresses are
When converted into two physical addresses, it is difficult to identify that they are the same data.

これはシノニム(synony■)問題と呼ばれる。This is called the synonym problem.

また、システムバス上には、物理アドレスがのるので、
そのアドレスを監視してキャッシュブロックの状態を変
更することができないためである。
Also, since the physical address is on the system bus,
This is because it is not possible to monitor the address and change the state of the cache block.

本発明は、このような従来の欠点を解消し、論理キャッ
シュを使用してシノニム問題を解決すると共に、スヌー
ブ機能をも実現できるようにすることを目的とする。
It is an object of the present invention to overcome such conventional drawbacks, to solve the synonym problem using a logical cache, and to also realize a snob function.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理図であり、1はTLB、2はTA
G、3は逆TLB、4はデータ部、5はl器、6はバス
インターフェイスを示す。
FIG. 1 is a diagram of the principle of the present invention, where 1 is the TLB and 2 is the TA.
G, 3 is an inverse TLB, 4 is a data section, 5 is an l unit, and 6 is a bus interface.

本発明では、キャッシュ容量の問題を解決するために、
論理キャンシュを使用し、更に論理キャッシュのシノニ
ム問題と、スヌーブ機能実現のために、TLBI、TA
G2、及びキャッシュデータ4に加え、逆TLB3を導
入する。
In the present invention, in order to solve the problem of cache capacity,
TLBI, TA are used to solve the synonym problem of the logical cache and to realize the snob function.
In addition to G2 and cache data 4, a reverse TLB3 is introduced.

この逆TLB 3は、物理アドレスから論理アドレスへ
の変換対を記憶するものであり、シノニム問題を解決す
るために、キャッシュでは同一物理アドレスに変換され
るような論理アドレスを持ったブロックは、常に1つに
限るように制御する。
This inverse TLB 3 stores translation pairs from physical addresses to logical addresses, and in order to solve the synonym problem, blocks with logical addresses that are translated to the same physical address in the cache are always Control so that there is only one.

このために与えられた論理アドレスと、その論理アドレ
スを物理アドレスに変換した結果を、更に逆TLBで逆
変換した論理アドレスとを比較するための比較器5を設
ける。
For this purpose, a comparator 5 is provided to compare the given logical address and the logical address obtained by inversely converting the result of converting the logical address into a physical address using an inverse TLB.

また、逆TLB3のミスが問題にならないように、キャ
ンシュに登録されているブロックに関しては、そのブロ
ックの物理アドレスで逆TLB 3を検索した場合、必
ずヒフ)することを保証するように制御する。
Furthermore, in order to prevent errors in the reverse TLB 3 from becoming a problem, control is performed to ensure that when a block registered in the cache is searched for the reverse TLB 3 using the physical address of the block, a hit occurs.

〔作用〕[Effect]

本発明は上記のように構成したので、TAGに登録され
ているキャッシュブロックの論理アドレスに対応した物
理アドレスは、必ず逆TLBに登録されているように制
御し、かつシステムバスを監視して本装置内に伝達され
た物理アドレスが、逆TLBにヒントした場合には、逆
TLBの出力である対応する論理アドレスでTAGをア
クセスし、TAGにヒツトした場合にはキャッシュの一
貫性を保証する動作を行うものである。
Since the present invention is configured as described above, the physical address corresponding to the logical address of the cache block registered in the TAG is controlled so that it is always registered in the reverse TLB, and the system bus is monitored and the real address is controlled. When the physical address transmitted within the device hints to the reverse TLB, the TAG is accessed using the corresponding logical address that is the output of the reverse TLB, and when the TAG is hit, the cache coherency is guaranteed. This is what we do.

したがって、論理キャッシュを使用してシノニム問題を
解決し、スヌーブ機能も実現可能となる。
Therefore, the synonym problem can be solved using a logical cache, and the snob function can also be realized.

〔実施例〕〔Example〕

以下、本発明の実施例を図面に基づいて説明する。 Embodiments of the present invention will be described below based on the drawings.

第2図は、本発明の1実施例のブロフク図であり、1は
TLB、2はTAG、3は逆TLB、4はデータ部、5
は比較器、6はバスインターフェイス、100は主メモ
リ、101−103はcpU、104〜106はアドレ
ス変換機構打器キャッシュ装置、107はバスを示す。
FIG. 2 is a block diagram of one embodiment of the present invention, where 1 is a TLB, 2 is a TAG, 3 is a reverse TLB, 4 is a data section, and 5 is a block diagram of an embodiment of the present invention.
1 is a comparator, 6 is a bus interface, 100 is a main memory, 101-103 are CPUs, 104-106 are address translator cache devices, and 107 is a bus.

なお、CPUI 01内の構成は、他のCPUでも同じ
構成となっており、多数のCPUで主メモI7100を
共通に使用する。
Note that the configuration within CPUI 01 is the same for other CPUs, and the main memory I7100 is commonly used by many CPUs.

各CPUI 01〜103内に設けられたアドレス変換
機構付キャッシュ装置104〜106は、上位バス及び
システムバスに接続される。
Cache devices 104 to 106 with address translation mechanisms provided in each CPUI 01 to 103 are connected to an upper level bus and a system bus.

上位バスは、論理アドレスバスと、上位データバスと、
上記制御信号バスを含み、システムバスは、物理アドレ
スバスと、下位データバスと下位制御バスを含む、 TLB (アドレス変換バッファ)1は、論理アドレス
バスと、物理アドレスバスに接続され、論理アドレスか
ら物理アドレスへのアドレス変換対を有限個記憶する。
The upper bus includes a logical address bus, an upper data bus,
The system bus includes the above-mentioned control signal bus, and the system bus includes a physical address bus, a lower data bus, and a lower control bus. A TLB (address translation buffer) 1 is connected to the logical address bus and the physical address bus, and is connected to the logical address bus. A finite number of address translation pairs to physical addresses are stored.

このTLB 1は、論理アドレスが与えられた時、その
論理アドレスに対応する物理アドレスが登録されている
かどうかを検索し、その検索結果を出力すると共に、検
索に底切した場合は、対応する物理アドレスを物理アド
レスバスに出力する。
When given a logical address, this TLB 1 searches to see if a physical address corresponding to the logical address is registered, outputs the search results, and if the search runs out, it searches for the corresponding physical address. Outputs the address to the physical address bus.

逆TLB (逆アドレス変換バフファ)3は、物理アド
レスバスと、内部論理アドレスバスに接続され、物理ア
ドレスから論理アドレスへの逆変換対を有限個記憶する
The inverse TLB (reverse address translation buffer) 3 is connected to the physical address bus and the internal logical address bus, and stores a finite number of inverse translation pairs from physical addresses to logical addresses.

この逆TLB3は、物理アドレスが与えられた時、その
物理アドレスに対応する論理アドレスが登録されている
か検索し、その検索結果を出力すると共に、検索に底切
した場合には、対応する論理アドレスを内部論理アドレ
スバスに出力する。
When the inverse TLB 3 is given a physical address, it searches to see if a logical address corresponding to the physical address is registered, outputs the search results, and if the search is exhausted, it searches for the corresponding logical address. output to the internal logical address bus.

TAG2は、論理アドレスバスと内部論理アドレスバス
に接続され、キャッシュに登録されているブロックの論
理アドレスを記憶し、論理アドレスバス、または内部ア
ドレスバスのアドレスがキャッシュに登録されているか
を検査し、その結果を出力する。
TAG2 is connected to the logical address bus and the internal logical address bus, stores the logical address of the block registered in the cache, checks whether the address of the logical address bus or the internal address bus is registered in the cache, Output the result.

データ部4は、キャッシュのデータ記憶部分で、論理ア
)ルスバスと、上位データバス、下位データバスに接続
される。
The data section 4 is a data storage section of the cache, and is connected to a logical pulse bus, an upper data bus, and a lower data bus.

比較器5は、与えられた論理アドレスバスの内容と、そ
の論理アドレスに変換した結果を、更に逆TLBで逆変
換した内部論理アドレスバスの内容を比較する。
The comparator 5 compares the contents of the given logical address bus with the contents of the internal logical address bus obtained by inversely converting the result of the logical address conversion using the inverse TLB.

システムバスインターフェイス6は、アドレス変換機構
付キャッシュ装置からシステムバスへのアクセス要求を
インターフェイスすると共に、システムバス上の予め定
められた種類のアクセスを装置内に伝達する。
The system bus interface 6 interfaces access requests from the cache device with an address translation mechanism to the system bus, and also transmits predetermined types of accesses on the system bus into the device.

上記の構成において、スヌープ機能実現のためには次の
ようにする。
In the above configuration, the snoop function can be implemented as follows.

各CPU104〜106は、共通に使用するバス107
を監視していて、主メモリ100への書き込みがあると
、バス107上の物理アドレスを取り込む。
Each of the CPUs 104 to 106 uses a bus 107 that is commonly used.
is monitored, and when a write is made to the main memory 100, the physical address on the bus 107 is taken in.

取り込んだ物理アドレスは、バスインターフェイス6か
ら逆TLB3へ送られ論理アドレスに変換される。
The captured physical address is sent from the bus interface 6 to the inverse TLB 3 and converted into a logical address.

変換された論理アドレスでTAG2をみて、同じアドレ
スがあるかどうかをみる(自分のキャッシュにある論理
アドレスか否か)。
Look at TAG2 with the converted logical address and see if the same address exists (whether it is a logical address in your own cache).

その結果キャツシュヒツト、即ち同じ論理アドレスがあ
ると、その論理アドレスを無効化する。
As a result, if there is a cache hit, that is, the same logical address, that logical address is invalidated.

また、シノニム問題を解決するには、次のようにする。Also, to solve the synonym problem, do the following:

即ち、キャッシュでは、同一物理アドレスに変換される
ような論理アドレスを持ったブロックは、常に1つに限
るように制御すればよい。
That is, in the cache, the number of blocks having logical addresses that are translated into the same physical address may be controlled to be limited to one at any time.

このため、比較器5において、与えられた論理アドレス
と、該論理アドレスを物理アドレスに変換した結果を、
更に逆TLB3で変換した論理アドレスとを比較する。
Therefore, in the comparator 5, the given logical address and the result of converting the logical address into a physical address are
Furthermore, it is compared with the logical address translated by inverse TLB3.

その結果、両者が不一致の場合には、もう−度逆TLB
3からの論理アドレスでTAG2を引き、ヒツトした場
合にはシノニム問題があると判断し、その他の場合は正
常と判断して処理を行う。
As a result, if the two do not match, the reverse TLB is executed again.
TAG2 is subtracted using the logical address from 3, and if it is a hit, it is determined that there is a synonym problem, and in other cases, it is determined that it is normal and processing is performed.

以下、詳細に説明する。This will be explained in detail below.

先ず、リードの場合は次のように制御する。First, in the case of reading, control is performed as follows.

(11外部から論理アドレスが与えられると、TLBl
では、論理アドレスの内、ページアドレスの下位Nビッ
トをアドレスとしてRAMをリードする。
(11 When a logical address is given from outside, TLBl
Then, among the logical addresses, the RAM is read using the lower N bits of the page address as an address.

同時に、TAG2、データ4では、論理アドレスの内、
論理ページアドレスの下位Lピントと、ページ内オフセ
ントの上位Mビットを使用してRAMをリードする。
At the same time, in TAG2 and data 4, among the logical addresses,
The RAM is read using the lower L pinto of the logical page address and the upper M bits of the intra-page offset.

データ4のリードは、TLB 1とTAG2のリード後
に行ってもよい、高速性が要求されていない場合には、
キャッシュにミスしたことがわかってからTLB 1を
引いてもよい。
Reading data 4 may be performed after reading TLB 1 and TAG 2. If high speed is not required,
TLB 1 may be subtracted after it is known that the cache has missed.

(2)TLBIがミスした時には、主メモリ100上に
あるアドレス変換テーブルを検索して、変換対をTLB
に登録し、上記(1)から再実行する。
(2) When TLBI misses, the address translation table on the main memory 100 is searched and the translation pair is transferred to TLB.
, and re-execute from (1) above.

(3)TLBIにヒツトした場合は、キャッシュミスの
チエツクを行う。
(3) If TLBI is hit, check for cache miss.

また、キャッシュにヒントしていた場合には、論理アド
レスの下位ビットでデータ部4から読み出したデータを
データバスに返して終了する。
If the cache is hinted, the data read from the data section 4 using the lower bits of the logical address is returned to the data bus and the process ends.

(4)  キャッシュにミスヒントした場合には、逆T
LB3を検索し、逆TLB3にミスした場合は、下記の
(6)に進む。
(4) If there is a miss hint in the cache, inverted T
If LB3 is searched and reverse TLB3 is missed, proceed to (6) below.

(5)逆TLB3にヒントした場合には、逆TLB3か
ら出力される内部論理アドレスと、元の論理アドレスを
比較器5において比較する。
(5) When the inverse TLB 3 is hinted, the comparator 5 compares the internal logical address output from the inverse TLB 3 with the original logical address.

その結果、両者が一致すれば正常な状態として処理され
るが、不一致の場合は、逆TLB 3からの論理アドレ
スでTAG2をもう一度引く。
As a result, if the two match, it is treated as a normal state, but if they do not match, TAG2 is subtracted once again using the logical address from reverse TLB 3.

そして、TAG2でヒントしなければ正常として処理さ
れ、ヒツトした場合にはシノニム問題があると判断され
る。
If there is no hint in TAG2, it is processed as normal, and if there is a hint, it is determined that there is a synonym problem.

このシノニム問題があった場合には、該当するシノニム
ブロックを無効化する(ストアバック系のキャッシュで
は、シノニムブロックを主メモリ100に転送する必要
がある場合がある〉、その後下記(6)へ進む。
If this synonym problem occurs, invalidate the corresponding synonym block (in store-back caches, it may be necessary to transfer the synonym block to the main memory 100), then proceed to (6) below. .

(6)上記(1)で求めておいた物理アドレスを使用し
て、当該ブロックを主メモリ100からキャッシュに転
送し、キャッシュに登録する。
(6) Using the physical address obtained in (1) above, transfer the block from the main memory 100 to the cache and register it in the cache.

(7)  更に、当該ブロックの物理アドレスから論理
アドレスへの変換対を逆TLB3に登録する。
(7) Furthermore, the physical address to logical address conversion pair of the block is registered in the inverse TLB3.

ここで、逆TLB3への登録方法にいくつかの方法が考
えられる。
Here, several methods can be considered for registration in the reverse TLB 3.

イ1例えば、逆TLB3の各エントリは、TAG2の各
エントリに対応させる。この場合、逆変換対を古い逆T
LBエントリ上に上書きすればよい。
B1 For example, each entry of the inverse TLB3 is made to correspond to each entry of TAG2. In this case, we define the inverse transform pair as the old inverse T
It is sufficient to overwrite the LB entry.

口、逆TLB3から、何らかの方法で古いエントリを追
い出す。
First, remove the old entry from reverse TLB3 by some method.

例えば、逆TLB3が物理アドレスからのダイレクトマ
ツブトであったならば、物理アドレスの一部から直接ア
ドレスされるエントリが追い出しの対象となる。
For example, if the inverse TLB 3 is a direct address from a physical address, the entry that is directly addressed from a part of the physical address will be the target of eviction.

また、逆TLB3がFIFO方式のフルアソシアティブ
であったならば、一番昔に登録されたエントリが追い出
しの対象となる。
Furthermore, if the inverse TLB 3 is fully associative using the FIFO method, the oldest registered entry will be the target of eviction.

追い出しの対象となったエントリについては、その論理
アドレスで示される1論理ページ内にあるブロックがキ
ャンシュに登録されていれば(一般に複数)、それをキ
ャッシュから追い出す。
Regarding the entry to be evicted, if a block within one logical page indicated by the logical address is registered in the cache (in general, there are a plurality of blocks), it is evicted from the cache.

この実施例では、ストアスル一方式を仮定しているので
、その論理ページをキーにしてキャッシュを無効化する
だけでよい。
In this embodiment, since a one-way store method is assumed, it is sufficient to invalidate the cache using the logical page as a key.

このようにすると、キャッシュに登録されているブロッ
クに関しては、必ず逆TLB3にセットすることを保証
できる。
In this way, it is possible to guarantee that blocks registered in the cache are always set in the reverse TLB3.

ライトの場合は次のようになる。For lights it looks like this:

(1)TLBl内のTLBLAとTLBPAとを同時に
読み出す。
(1) Read TLBLA and TLBPA in TLBl simultaneously.

<z) ’rt、ssスのチエツクを行い、TLB 1
がミスしていれば、主メモリ100上のアドレス変換テ
ーブルをもとに、TLBIへの登録を行い、上記(1)
から再実行する。
<z) 'Check rt, ss, TLB 1
If there is a mistake, register in TLBI based on the address translation table in main memory 100, and perform (1) above.
Rerun from.

(3)TLBI出力の物理アドレスを使用して、主メモ
リ100ヘデータを書き込む、また、以下の処理は主メ
モリ100への書き込みと平行して行える。
(3) Data is written to the main memory 100 using the physical address of the TLBI output, and the following processing can be performed in parallel with writing to the main memory 100.

(4)  キャッシュミスのチエツクを行い、キャッシ
ュミスにした場合、TLBIの出力の物理アドレスを逆
TLB3にかけて次へ進む。
(4) Check for a cache miss, and if it is a cache miss, apply the physical address of the TLBI output to the inverse TLB3 and proceed to the next step.

キャッシュにヒントした場合は、与えられた論理アドレ
スで、データ4にデータライトして終了する。
If the cache is hinted, data is written to data 4 using the given logical address and the process ends.

(5)  逆TLB3にヒツトすれば、逆TLB3から
出力される内部論理アドレスと、元の論理アドレスを比
較器5において比較する。
(5) If the inverse TLB 3 is hit, the comparator 5 compares the internal logical address output from the inverse TLB 3 with the original logical address.

その結果、両者が一致すれば正常な状態として処理され
るが、不一致の場合は、逆TLB 3からの論理アドレ
スでTAG2をもう一度引く。
As a result, if the two match, it is treated as a normal state, but if they do not match, TAG2 is subtracted once again using the logical address from reverse TLB 3.

そして、TAG2でヒントしなければ正常として処理さ
れ、ヒツトした場合にはシノニム問題があると判断され
、リード時と同様に処理される。
If there is no hint in TAG2, it is processed as normal, and if it is a hit, it is determined that there is a synonym problem, and the processing is performed in the same way as when reading.

次に、逆TLB3の出力の論理アドレスでデータ部4に
データライトする。また、逆TLBにミスヒントした場
合は、データ部4はそのままにして終了する。
Next, data is written into the data section 4 using the logical address output from the inverse TLB 3. Furthermore, if there is a mishint in the reverse TLB, the data section 4 is left as is and the process ends.

次に、システムバス上で、ライトがあった場合の動作を
説明する。
Next, we will explain the operation when there is a write on the system bus.

(1)  システムバス上の物理アドレスで、逆TLB
3を検索する。
(1) Reverse TLB at the physical address on the system bus
Search for 3.

(2)逆TLB3にミスした場合には、何もしないで終
了する(逆TLB3にミスすれば、その物理ページのデ
ータはキャッシュに登録されていない事が保証されるた
め)。
(2) If there is a miss in reverse TLB3, the process ends without doing anything (because if there is a miss in reverse TLB3, it is guaranteed that the data of that physical page is not registered in the cache).

(3)逆TLB3にヒツトした場合には、逆TLB3の
出力の論理アドレスで、TAG2を検索する。
(3) If the inverse TLB3 is hit, search TAG2 using the logical address of the output of the inverse TLB3.

(41TAG2にミスヒツトした場合は、何もしないで
終了する。
(If there is a miss on 41TAG2, the process ends without doing anything.

(5)  T A G 2にヒントした場合には、その
キャソシュブロンクを無効化する。
(5) If you hint at TAG 2, invalidate that cashoche bronc.

上記実施例におけるTLB 1、逆T’LB3、TAG
2、データ4について、さらに詳細に説明すると次のよ
うになる。
TLB 1, reverse T'LB3, TAG in the above embodiment
2. Data 4 will be explained in more detail as follows.

TLBIは、TLBLA (TLBの論理アドレス部分
)とTLBPA (TLBの物理アドレス部分)とから
戒り、また、逆TLB3についても、それぞれ、逆TL
BLAと、逆TLBPAとで構成される。
TLBI is separated from TLBLA (logical address part of TLB) and TLBPA (physical address part of TLB), and also for reverse TLB3, respectively.
It consists of BLA and reverse TLBPA.

第3図はTLBLAの構成例であり、1−1は比較器、
1−2はデコーダを示す。
Figure 3 shows an example of the configuration of TLBLA, where 1-1 is a comparator,
1-2 indicates a decoder.

この例は、ページサイズ4KB (アドレス変換の最小
単位となる)とした時の構成例であり、256エントリ
のダイレクトマツブト構成をとる。
This example is a configuration example when the page size is 4 KB (the minimum unit of address translation), and has a direct matrix configuration of 256 entries.

通常時は、論理アドレスのビット19〜12〈8ビフト
)をRAMのデコーダ1−2に供給し、読み出された1
2ビツトを論理アドレスのビット31〜20(12ピン
ト)と比較器1−1で比較する。
Normally, bits 19 to 12 (8 bits) of the logical address are supplied to the RAM decoder 1-2, and the read 1
Comparator 1-1 compares the 2 bits with bits 31 to 20 (12 pins) of the logical address.

同時にそのエントリの有効性を示すV (Valid)
ビットも読み出しており、■ピントが0の時には、比較
器1−1の比較結果によらずTLBミスを出力する。
V (Valid) which also indicates the validity of the entry
The bit is also read, and when the focus is 0, a TLB miss is output regardless of the comparison result of the comparator 1-1.

登録時には、論理アドレスのビット19−12で指定さ
れたエントリへ、論理アドレスのビット31−20を書
き込むと共に、Vビットに1を書き込む。
At the time of registration, bits 31-20 of the logical address are written to the entry specified by bits 19-12 of the logical address, and 1 is written to the V bit.

第4図は、TLBPAの構成例を示した図であり、1−
3はデコーダを示す。
FIG. 4 is a diagram showing an example of the configuration of TLBPA, and 1-
3 indicates a decoder.

TLBPAもTLBLAと同様に、論理アドレスのビッ
ト19〜12(8ビツト)をRAMのデコーダ1−3に
与える。
Similarly to TLBLA, TLBPA also provides bits 19 to 12 (8 bits) of the logical address to the RAM decoder 1-3.

RAMの出力は、20ビツトで、これを物理アドレスバ
スの上位20ビツトに出力する。
The output of the RAM is 20 bits, which is output to the upper 20 bits of the physical address bus.

物理アドレスバスの下位12ビツトは、論理アドレスバ
スの下位12ビツトの内容と同じ値を出力する。TLB
への登録時には、論理アドレスのピント19〜12で指
定されたエントリに物理アドレスバスの上位20ビツト
を書き込む。
The lower 12 bits of the physical address bus output the same value as the contents of the lower 12 bits of the logical address bus. T.L.B.
When registering to , the upper 20 bits of the physical address bus are written to the entry specified by pins 19 to 12 of the logical address.

第5図は、TAGの構成例を示した図であり、2−1.
2−2は比較器を示す。
FIG. 5 is a diagram showing an example of the configuration of TAG, and 2-1.
2-2 shows a comparator.

キャッシュダイレクトマツブトで、1ブロツク16バイ
ト、16にエントリ、容量256MBとし、TAGRA
Mは2ボートとする。
Cache Direct Mabutsu, 1 block 16 bytes, 16 entries, capacity 256MB, TAGRA
M has 2 boats.

TAGRAMの1ポートをひくのは、論理アドレスのビ
ット17〜4 (14ビツト)で、出力は14ビツトの
登録アドレスとVビットである。
What draws one port of TAGRAM are bits 17 to 4 (14 bits) of the logical address, and the output is the 14-bit registered address and the V bit.

TAGへの登録時には、論理アドレスのビット17〜4
で指定されたエントリに、論理アドレスのビット31〜
18(14ピント)とV=1を書き込む、TAGRAM
の別の1ボートをひくのは、内部論理アドレスのビット
17〜4で、同様に、TAGの内容と、内部論理アドレ
スの上記14ビツトとを比較する。
When registering to TAG, bits 17 to 4 of the logical address
Bits 31 to 31 of the logical address are added to the entry specified by
Write 18 (14 pinto) and V=1, TAGRAM
Bits 17 to 4 of the internal logical address draw another 1 vote, and the contents of the TAG are similarly compared with the above 14 bits of the internal logical address.

また、内部論理アドレスバスの上位20ピントで指定し
た論理ページ内に相当するTAGエントリのVビットを
0にする機能を持つ。
It also has a function of setting the V bit of the TAG entry corresponding to the logical page specified by the upper 20 pins of the internal logical address bus to 0.

第6図はDATAの構成例を示した図である。FIG. 6 is a diagram showing an example of the configuration of DATA.

キャッシュのデータ部は、TAGと同様に、論理アドレ
スのビット17〜4 (14ビツト)でアクセスされる
The data portion of the cache is accessed by bits 17 to 4 (14 bits) of the logical address, similar to the TAG.

選択したエントリ (ブロック)の16バイトの内、論
理アドレスの下位4ビツトとアクセスサイズで定まるバ
イトのみがアクセスされる。
Of the 16 bytes of the selected entry (block), only the bytes determined by the lower 4 bits of the logical address and the access size are accessed.

リード時には、アクセスしたデータが上位データバスに
読み出される。
At the time of reading, the accessed data is read to the upper data bus.

ライトには2通りあり、Iつはキャツシュヒツトした時
のキャンシュへのライトで、もう1つはキャッシュミス
した時に、主メモリから転送したデータをキャッシュに
登録するためのライトである。
There are two types of writes: I is a write to the cache when a cache hit occurs, and the other is a write for registering data transferred from the main memory in the cache when a cache miss occurs.

第7図は、逆TLBPAの構成例であり、3−1は比較
器、3−2はデコーダを示す。
FIG. 7 shows a configuration example of an inverse TLBPA, where 3-1 shows a comparator and 3-2 shows a decoder.

逆TLBは、TLBの論理アドレスと、物理アドレスと
を逆にした構成とする。この例では、256エントリの
ダイレクトマツブト構成をとる。
The reverse TLB has a configuration in which the logical address and physical address of the TLB are reversed. In this example, a direct computer configuration with 256 entries is used.

通常時は、物理アドレスのビット19〜12をRAMの
デコーダ3−2に供給し、読み出された12ビツトを、
物理アドレスのピント31〜20と比較器3−1で比較
する。
Normally, bits 19 to 12 of the physical address are supplied to the RAM decoder 3-2, and the read 12 bits are
The physical address pinpoints 31 to 20 are compared with the comparator 3-1.

同時に、そのエントリの有効性を示すV (Valid
)ビットも読み出しており、VビットがOの時には、比
較結果によらず、逆TLBミスを出力する。
At the same time, V (Valid
) bit is also read, and when the V bit is O, a reverse TLB miss is output regardless of the comparison result.

登録時には、物理アドレスのビット19〜12で指定さ
れたエントリへ、物理アドレスのビット31〜20を書
き込むと共に、Vビットに1を書き込む。
At the time of registration, bits 31 to 20 of the physical address are written to the entry specified by bits 19 to 12 of the physical address, and 1 is written to the V bit.

第8図は、逆TLBLAの構成例を示した図であり、3
−3はデコーダを示す。
FIG. 8 is a diagram showing an example of the configuration of a reverse TLBLA.
-3 indicates a decoder.

逆TLBLAも逆TLBPAと同様に、物理アドレスの
ビット19〜12 (8ビツト)をRAMのデコーダ3
−3に与える。
Similar to reverse TLBPA, reverse TLBLA also transfers bits 19 to 12 (8 bits) of the physical address to the RAM decoder 3.
-Give to 3.

RAMの出力は、20ビツトで、これを内部論理アドレ
スバスの上位20ビツトに出力する。
The output of the RAM is 20 bits, which is output to the upper 20 bits of the internal logical address bus.

論理アドレスバスの下位12ビツトは、物理アドレスバ
スの下位12ビツトの内容と同じ値を出力する。
The lower 12 bits of the logical address bus output the same value as the contents of the lower 12 bits of the physical address bus.

逆TLBへの登録時には、物理アドレスのビット19〜
12で指定されたエントリに、物理アドレスバスの上位
20ビツトを書き込む。
When registering to the reverse TLB, bits 19 to 19 of the physical address
Write the upper 20 bits of the physical address bus to the entry specified by 12.

なお、上記実施例においては、ストアスル一方式で説明
したが、本発明はこの方式に限らず、ストアバック系の
各種並列キャッシュ方式にも同様に適用可能である。
Although the above embodiment has been described using a store-through method, the present invention is not limited to this method, but can be similarly applied to various store-back parallel cache methods.

また、マルチプロセッサでも、単一プロセッサでも、同
様にして適用できる。
Further, the present invention can be similarly applied to both multiprocessors and single processors.

更に、キャッシュ装置において、逆TLBの各エントリ
をTAGの各エントリ毎に持ってもよ(、逆TLBに新
たに登録する時には、既に登録されていたエントリを逆
TLBから追い出し、追い出すエントリに記憶されてい
た論理アドレスが示すページ内のデータについては、キ
ャッシュから追い出してもよい。
Furthermore, the cache device may have each entry in the reverse TLB for each entry in the TAG. The data in the page indicated by the previously stored logical address may be evicted from the cache.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば次のような効果が
ある。
As explained above, the present invention has the following effects.

(1)  キャツシュヒツト時にアドレス変換を必要と
しない論理キャッシュを使用して、単一CPU内のシノ
ニム問題を解決できる。
(1) A logical cache that does not require address translation at cache time can be used to solve the synonym problem within a single CPU.

(2)マルチプロセッサ用スヌープ機能をサポートし、
マルチプロセッサ間でのシノニム問題も解決できる。
(2) Supports snoop function for multiprocessors,
It can also solve the synonym problem between multiple processors.

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

第1図は本発明に係るアドレス変換機構付キシュ装置の
制御方式の原理図、 第2図は本発明の1実施例のブロック図、第3図はTL
BLAの構成例を示した図、第4図はTLBPAの構成
例を示した図、第5図はTAGの構成例を示した図、 第6図はDATAの構成例を示した図、第7図は逆TL
BLAの構成例を示した図、第8図は逆TLBPAの構
成例を示した図、第9図は従来例の説明図である。 ヤ ト・−TLB       2−・TAG3−・−逆T
LB    4−データ
Fig. 1 is a principle diagram of the control system of the Kish device with an address translation mechanism according to the present invention, Fig. 2 is a block diagram of an embodiment of the present invention, and Fig. 3 is a TL
Figure 4 shows an example of the configuration of BLA, Figure 4 shows an example of the configuration of TLBPA, Figure 5 shows an example of the configuration of TAG, Figure 6 shows an example of the configuration of DATA, Figure 7 shows an example of the configuration of DATA. The figure is reverse TL
FIG. 8 is a diagram showing a configuration example of a BLA, FIG. 8 is a diagram showing a configuration example of a reverse TLBPA, and FIG. 9 is an explanatory diagram of a conventional example. Yato・-TLB 2-・TAG3-・-inverted T
LB 4-Data

Claims (1)

【特許請求の範囲】 アドレス変換とバッファリングを行うアドレス変換機構
付キャッシュ装置の制御方式において、論理アドレスバ
スと物理アドレスバスに接続され、論理アドレスから物
理アドレスへのアドレス変換対を記憶したTLB(1)
と、 物理アドレスバスと内部論理アドレスバスに接続され、
物理アドレスから論理アドレスへの逆変換対を記憶した
逆TLB(3)と、 論理アドレスバスと内部論理アドレスバスに接続され、
論理キャッシュに登録されているブロックの論理アドレ
スを記憶したTAG(2)と、与えられた論理アドレス
バスの内容と、その論理アドレスを物理アドレスに変換
した結果を、更に逆TLB(3)によって逆変換した内
部論理アドレスバスの内容とを比較する比較器(5)と
を設け、 TAG(2)に登録されているキャッシュブロックの物
理アドレスは、必ず逆TLB(3)に登録されるように
制御し、 かつ、外部のバスを監視し、該バス上の物理アドレスが
逆TLB(3)にヒットした場合には、前記逆TLB(
3)の出力でTAG(2)をアクセスし、TAG(2)
にヒットしていたらキャッシュの一貫性を保証する動作
を実行することを特徴とするアドレス変換機構付キャッ
シュ装置の制御方式。
[Scope of Claims] In a control method for a cache device with an address translation mechanism that performs address translation and buffering, a TLB (TLB) connected to a logical address bus and a physical address bus and storing address translation pairs from logical addresses to physical addresses. 1)
and connected to the physical address bus and internal logical address bus,
It is connected to an inverse TLB (3) that stores inverse translation pairs from physical addresses to logical addresses, a logical address bus, and an internal logical address bus,
The TAG (2) that stores the logical address of the block registered in the logical cache, the contents of the given logical address bus, and the result of converting the logical address into a physical address are further inverted by the inverse TLB (3). A comparator (5) is provided to compare the contents of the converted internal logical address bus, and control is performed so that the physical address of the cache block registered in the TAG (2) is always registered in the inverse TLB (3). And, if the external bus is monitored and the physical address on the bus hits the reverse TLB (3), the inverse TLB (3) is checked.
Access TAG(2) with the output of 3), and
1. A control method for a cache device with an address translation mechanism, characterized in that if there is a hit, an operation is executed to guarantee cache coherence.
JP1221047A 1989-08-28 1989-08-28 Control system for cache device with address converting mechanism Pending JPH0383150A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1221047A JPH0383150A (en) 1989-08-28 1989-08-28 Control system for cache device with address converting mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1221047A JPH0383150A (en) 1989-08-28 1989-08-28 Control system for cache device with address converting mechanism

Publications (1)

Publication Number Publication Date
JPH0383150A true JPH0383150A (en) 1991-04-09

Family

ID=16760661

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1221047A Pending JPH0383150A (en) 1989-08-28 1989-08-28 Control system for cache device with address converting mechanism

Country Status (1)

Country Link
JP (1) JPH0383150A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7330961B2 (en) 2002-11-21 2008-02-12 Fujitsu Limited Cache control method and processor system
JP2009087139A (en) * 2007-10-01 2009-04-23 Mitsubishi Electric Corp Cache memory control device
JP2010097558A (en) * 2008-10-20 2010-04-30 Toshiba Corp Virtual address cache memory and virtual address cache method
JP2011198091A (en) * 2010-03-19 2011-10-06 Toshiba Corp Virtual address cache memory, processor, and multiprocessor system
JP2016535883A (en) * 2013-10-04 2016-11-17 クアルコム,インコーポレイテッド Look-aside buffer coherency for multi-core heterogeneous system transformations

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7330961B2 (en) 2002-11-21 2008-02-12 Fujitsu Limited Cache control method and processor system
JP2009087139A (en) * 2007-10-01 2009-04-23 Mitsubishi Electric Corp Cache memory control device
JP2010097558A (en) * 2008-10-20 2010-04-30 Toshiba Corp Virtual address cache memory and virtual address cache method
US8949572B2 (en) 2008-10-20 2015-02-03 Kabushiki Kaisha Toshiba Effective address cache memory, processor and effective address caching method
JP2011198091A (en) * 2010-03-19 2011-10-06 Toshiba Corp Virtual address cache memory, processor, and multiprocessor system
US8607024B2 (en) 2010-03-19 2013-12-10 Kabushiki Kaisha Toshiba Virtual address cache memory, processor and multiprocessor
US9081711B2 (en) 2010-03-19 2015-07-14 Kabushiki Kaisha Toshiba Virtual address cache memory, processor and multiprocessor
JP2016535883A (en) * 2013-10-04 2016-11-17 クアルコム,インコーポレイテッド Look-aside buffer coherency for multi-core heterogeneous system transformations

Similar Documents

Publication Publication Date Title
US5535352A (en) Access hints for input/output address translation mechanisms
KR930004430B1 (en) Apparatus for maintaining consistency in a multiprocessor computer system using caching
US6721848B2 (en) Method and mechanism to use a cache to translate from a virtual bus to a physical bus
US8782348B2 (en) Microprocessor cache line evict array
US6418515B1 (en) Cache flush unit
US5379394A (en) Microprocessor with two groups of internal buses
JPH03142644A (en) Cache memory control system
US7472227B2 (en) Invalidating multiple address cache entries
EP0365117B1 (en) Data-processing apparatus including a cache memory
US7117312B1 (en) Mechanism and method employing a plurality of hash functions for cache snoop filtering
EP0752662A1 (en) Method and apparatus for tagging a multi-way associative cache
US5479629A (en) Method and apparatus for translation request buffer and requestor table for minimizing the number of accesses to the same address
US5737575A (en) Interleaved key memory with multi-page key cache
JPH0551937B2 (en)
JPH0797352B2 (en) Computer system and I / O controller
US9442856B2 (en) Data processing apparatus and method for handling performance of a cache maintenance operation
JPH0383150A (en) Control system for cache device with address converting mechanism
US5649155A (en) Cache memory accessed by continuation requests
US7971002B1 (en) Maintaining instruction coherency in a translation-based computer system architecture
JPH055137B2 (en)
JPS6329297B2 (en)
JPS5922315B2 (en) Buffer memory control method
KR100433511B1 (en) Snooping apparatus for cache cohecence
JPH086852A (en) Cache control method
JP3293872B2 (en) Cache matching method