JPH06124237A - Address translation buffer device - Google Patents

Address translation buffer device

Info

Publication number
JPH06124237A
JPH06124237A JP4274543A JP27454392A JPH06124237A JP H06124237 A JPH06124237 A JP H06124237A JP 4274543 A JP4274543 A JP 4274543A JP 27454392 A JP27454392 A JP 27454392A JP H06124237 A JPH06124237 A JP H06124237A
Authority
JP
Japan
Prior art keywords
entry
tlb
replacement
area
register
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
JP4274543A
Other languages
Japanese (ja)
Inventor
Toshiro Shimada
利郎 島田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP4274543A priority Critical patent/JPH06124237A/en
Publication of JPH06124237A publication Critical patent/JPH06124237A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the efficiency of an entire computer system by dynamically changing the ratio of a high speed Translation Lookaside Buffer mechanism (TLB) replacement inhibited area and a replacable area by the hit ratio of the TLB in the replacement control of the TLB. CONSTITUTION:The entire area of the TLB is divided into a first entry replacement inhibited area and a first entry replacable area and further, the first entry replacable area is divided into a second entry replacement inhibited area and a second entry replacable area. The boundary of the second entry replacement inhibited area and the second entry replacable area is changed by the hit ratio of the TLB and the ratio of the TLB replacement inhibited area and the replacable area is dynamically changed.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はページ仮想記憶計算機シ
ステムにおいて、仮想アドレスと実アドレスの高速変換
を実行するためのTLBと呼ばれる変換索引緩衝機構を
持つアドレス変換バッファ装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an address translation buffer device having a translation lookaside buffer mechanism called TLB for executing high speed translation of virtual addresses and real addresses in a page virtual memory computer system.

【0002】[0002]

【従来の技術】仮想記憶システムでは、中央処理装置
(Central Processing Unit、
以下これをCPUと呼ぶ)から出力される仮想アドレス
(Virtual Address、以下これをVAと
呼ぶ)は、CPUに接続されたメモリ管理装置(Mem
ory Management Unit、以下これを
MMUと呼ぶ)によって、実メモリ上の物理アドレス
(Physical Address、以下これをPA
と呼ぶ)に変換された後、実メモリのアクセスに使用さ
れる。
2. Description of the Related Art In a virtual memory system, a central processing unit (Central Processing Unit),
A virtual address (Virtual Address, hereinafter referred to as VA) output from a CPU (hereinafter referred to as CPU) is a memory management device (Mem) connected to the CPU.
ory Management Unit (hereinafter referred to as MMU), a physical address (Physical Address) in the real memory, hereinafter referred to as PA.
Used to access the real memory.

【0003】MMUでは上記仮想アドレスVAから物理
アドレスPAへの変換を行なうため、仮想アドレスVA
と物理アドレスPAとの対を、一つのエントリ項目とし
たアドレス変換テーブルを利用する。アドレス変換テー
ブルは一般に大きなものであるので、テーブルは全てメ
モリ上に配置し、その一部をMMU内のアドレス変換バ
ッファ或いはトランスレーション・ルックアサイド・バ
ッファ(Translation Look−asid
e Buffer、以下これをTLBと呼ぶ)と呼ばれ
るキャッシュメモリに格納し、変換の高速化を計ってい
る。
Since the MMU translates the virtual address VA into the physical address PA, the virtual address VA
An address conversion table in which a pair of a physical address PA and a physical address PA is used as one entry item is used. Since the address translation table is generally large, all the tables are arranged in the memory, and a part of the table is placed in the address translation buffer or the translation look-aside buffer (Translation Look-aside) in the MMU.
e Buffer, hereinafter referred to as TLB), is stored in a cache memory to speed up conversion.

【0004】CPUより出力される仮想アドレスVAが
TLB内のいずれかのエントリと合致すれば(以下これ
をTLBヒットと呼ぶ)、物理アドレスPAが即座に得
られるためシステムは高い効率を得ることができるが、
TLB内のいずれのエントリとも合致しなければ(以下
これをTLBミスと呼ぶ)、MMUはメモリ内のアドレ
ス変換テーブルを検索しなければならないためシステム
の効率は低下してしまう。
If the virtual address VA output from the CPU matches with any entry in the TLB (hereinafter referred to as a TLB hit), the physical address PA is immediately obtained and the system can obtain high efficiency. I can, but
If it does not match any of the entries in the TLB (hereinafter referred to as TLB miss), the MMU must search the address translation table in the memory, which reduces the efficiency of the system.

【0005】MMUにおけるアドレス変換効率の高いシ
ステムを実現するためには、高い確率でTLBヒットす
る必要がある。
In order to realize a system with high address conversion efficiency in MMU, it is necessary to hit TLB with high probability.

【0006】TLBのヒット率を決める1要因として、
TLBミス発生時のエントリ置換をいかに行なうかとい
ったエントリ置換方式が重要である。2つの代表的な方
式があり、一つはエントリミスが発生した時点で最も参
照頻度の少ないエントリと新しいエントリを置換するL
RU(Least Recently Used)方式
で、もうひとつは置換するエントリをランダムに決定す
るランダム方式である。LRU方式はランダム方式に比
べて高ヒット率が得られるが、制御が複雑であることか
ら、回路の規模がTLBの数に比例して増えてしまい、
LSIで実装する場合は通常ランダム方式を採用するこ
とが多い。
[0006] One factor that determines the TLB hit rate is
An entry replacement method is important, such as how to perform entry replacement when a TLB miss occurs. There are two typical methods, one is L which replaces the entry with the least reference frequency at the time when an entry error occurs and a new entry.
The RU (Least Recently Used) method, and the other is a random method that randomly determines an entry to be replaced. The LRU method can obtain a higher hit rate than the random method, but since the control is complicated, the circuit scale increases in proportion to the number of TLBs.
When mounting with an LSI, a random method is often adopted.

【0007】ところで、コンピュータシステムのアドレ
ス空間は通常複数用意されており、少なくともオペレー
ティングシステムがスーパーバイザモードでアクセスす
る領域とユーザプログラムがユーザモードでアクセスす
る領域の2つは区別される。ユーザ領域、スーパーバイ
ザ領域といった複数のアドレス空間を持つシステムで
は、CPUがこれらのアドレス空間を識別するためにア
ドレス空間識別子(Address Space Id
entifier、以下ASI)信号をアドレス信号と
共に出力することでアドレス空間の切り分けを行なって
いる。ASI信号を持ったCPUでは、ASIを1オペ
ランドとして指定するロード/ストア命令を備えてい
る。
By the way, a plurality of address spaces of a computer system are usually prepared, and at least an area accessed by the operating system in the supervisor mode and an area accessed by the user program in the user mode are distinguished from each other. In a system having a plurality of address spaces such as a user area and a supervisor area, the CPU uses an address space identifier (Address Space Id) to identify these address spaces.
The address space is divided by outputting an "entifier" (hereinafter, ASI) signal together with the address signal. A CPU having an ASI signal has a load / store instruction that specifies ASI as one operand.

【0008】置換方式をランダム方式とするシステム
で、TLBの高いヒット率を得る方法として、頻繁にア
クセスすることが確実なエントリをエントリ置換の対象
から外すという、所謂エントリロック制御方式が良く知
られている。図6を例にこの方法を説明する。図6は1
28エントリのTLBである。エントリの0から2はエ
ントリの置換を禁止したエントリ置換禁止領域であり、
エントリの0から2以外のエントリはエントリ置換が可
能なエントリ置換可能領域である。エントリ置換可能領
域はエントリ置換初期レジスタによってその領域の最初
を識別することが可能であり、エントリ置換レジスタは
エントリ置換可能領域の範囲でランダムにその値を変
え、TLBミス時に置換対象となるエントリを示してい
る。オペレーティングシステムの割り込みベクタや割り
込みルーチンといったいわゆるスーパバイザ領域のエン
トリは、頻繁にアクセスされるのでエントリ置換禁止領
域に配置することによって高TLBヒット率を得ること
ができる。エントリ置換初期レジスタは、スーパーバイ
ザモードでの書き込みが可能であるので、エントリ置換
禁止領域とエントリ置換可能領域の大きさを変化させる
ことが可能である。
As a method for obtaining a high hit rate of the TLB in a system in which the replacement method is a random method, a so-called entry lock control method in which an entry that is surely frequently accessed is excluded from the entry replacement targets is well known. ing. This method will be described with reference to FIG. 6 is 1
It is a TLB of 28 entries. Entries 0 to 2 are entry replacement prohibited areas where entry replacement is prohibited,
Entries other than the entries 0 to 2 are entry replaceable areas in which entries can be replaced. The entry replaceable area can identify the beginning of the area by the entry replacement initial register, and the entry replacement register randomly changes the value within the range of the entry replaceable area, and selects the entry to be replaced when the TLB miss occurs. Shows. Since an entry in a so-called supervisor area such as an interrupt vector or interrupt routine of the operating system is frequently accessed, a high TLB hit rate can be obtained by arranging the entry in the entry replacement prohibited area. Since the entry replacement initial register can be written in the supervisor mode, it is possible to change the sizes of the entry replacement prohibited area and the entry replacement enabled area.

【0009】[0009]

【発明が解決しようとする課題】従来のLSI内蔵のT
LB装置では、上述したとおりTLBのエントリロック
制御を行うことによりTLBのヒット率向上を行ってい
る。通常は、システムの初期化を行なう時点でエントリ
置換初期レジスタへの書き込みを行いエントリ置換禁止
領域を固定するといった静的な制御を行うだけであり、
動的な制御を行うためにはエントリ置換初期レジスタを
再設定しなければならないため、実行するプログラムに
よって大きく変わるTLBヒット率の変化に対応するの
は非常に困難であった。
[Problems to be Solved by the Invention]
The LB device improves the TLB hit rate by performing the TLB entry lock control as described above. Normally, at the time of system initialization, only static control such as writing to the entry replacement initial register and fixing the entry replacement prohibited area is performed.
Since it is necessary to reset the entry replacement initial register in order to perform dynamic control, it is very difficult to cope with a change in the TLB hit rate that greatly changes depending on the program to be executed.

【0010】そこで本発明では、TLBの置換制御にお
いてTLBのヒット率によりTLB置換禁止領域と置換
可能領域の比率の変更を動的に行うことによって、計算
機システム全体の効率を向上させた、アドレス変換バッ
ファ装置を提供することを目的とする。
Therefore, in the present invention, in the TLB replacement control, the ratio of the TLB replacement prohibited area to the replaceable area is dynamically changed according to the hit rate of the TLB to improve the efficiency of the entire computer system. An object is to provide a buffer device.

【0011】[0011]

【課題を解決するための手段】本発明は、前記目的を達
成するため、仮想アドレスと物理アドレスとの対をひと
つのエントリとして構成されたアドレス変換テーブルの
一部をトランスレーション・ルックアサイド・バッファ
に保持し、仮想アドレスから物理アドレスへの変換を行
なう仮想記憶計算機システムにおいて使用されるアドレ
ス変換バッファ装置であって、前記トランスレーション
・ルックアサイド・バッファの領域を第1エントリ置換
禁止領域と第1エントリ置換可能領域とに分けるエント
リ番号を保持する第1エントリ初期置換レジスタ手段
と、前記第1エントリ置換可能領域のうちの1つのエン
トリ番号を保持する第1エントリ置換レジスタ手段と、
前記第1エントリ置換可能領域を第2エントリ置換禁止
領域と第2エントリ置換可能領域とに分けるエントリ番
号を保持する第2エントリ置換初期レジスタ手段と、前
記第2エントリ置換可能領域のうちの1つのエントリ番
号を保持する第2エントリ置換レジスタ手段と、前記ト
ランスレーション・ルックアサイド・バッファがアクセ
スされたときのトランスレーション・ルックアサイド・
バッファのヒット率を検出するトランスレーション・ル
ックアサイド・バッファヒット率検出手段と、該トラン
スレーション・ルックアサイド・バッファヒット率検出
手段により検出されたヒット率に応じて前記第2エント
リ置換初期レジスタ手段の値を変更し、自動的に前記第
2エントリ置換禁止領域と前記第2エントリ置換可能領
域の比率を変更するエントリ置換制御手段とを有するこ
とを特徴とする。
In order to achieve the above-mentioned object, the present invention uses a translation lookaside buffer as a part of an address translation table configured with a pair of a virtual address and a physical address as one entry. An address translation buffer device used in a virtual storage computer system for performing a translation from a virtual address to a physical address, the translation lookaside buffer area including a first entry replacement prohibited area and a first entry replacement prohibited area. First entry initial replacement register means for holding an entry number to be divided into an entry replaceable area, and first entry replacement register means for holding an entry number of one of the first entry replaceable areas,
One of the second entry replacement possible register means for holding an entry number for dividing the first entry replacement possible area into a second entry replacement prohibited area and a second entry replacement possible area; Second entry replacement register means for holding an entry number and a translation lookaside register when the translation lookaside buffer is accessed.
A translation lookaside buffer hit ratio detecting means for detecting a hit ratio of the buffer; and a second entry replacement initial register means for detecting the hit ratio detected by the translation lookaside buffer hit ratio detecting means. The present invention is characterized by further comprising entry replacement control means for changing a value and automatically changing a ratio of the second entry replacement prohibited area and the second entry replaceable area.

【0012】[0012]

【作用】まず、本発明の原理を図1〜図3を参照して説
明する。
First, the principle of the present invention will be described with reference to FIGS.

【0013】本発明においては、TBL(トランスレー
ション・ルックアサイド・バッファ)の全体の領域が、
第1エントリ置換禁止領域と第1エントリ置換可能領域
とに分けられ、更に第1エントリ置換可能領域は第2エ
ントリ置換禁止領域と第2エントリ置換可能領域とに分
けられる。
In the present invention, the entire area of the TBL (translation lookaside buffer) is
The first entry replaceable area and the first entry replaceable area are divided, and the first entry replaceable area is further divided into the second entry replace prohibited area and the second entry replaceable area.

【0014】図1において、第1エントリ置換初期レジ
スタ手段は、TLBを第1エントリ置換可能領域と第1
エントリ置換禁止領域の2つの領域に分けるためのエン
トリ番号を保持しており、これに加えて第1エントリ置
換レジスタ手段によって第1エントリ置換可能領域内の
一つのエントリ番号を指定することにより、従来技術で
述べた図6と同様なTLBの制御を行うことが可能とな
る。第2エントリ置換初期レジスタ手段は、第1エント
リ置換可能領域を第2エントリ置換可能領域と第2エン
トリ置換禁止領域の2つの領域に分けるためのエントリ
番号を保持している。
In FIG. 1, the first entry replacement initial register means sets the TLB as a first entry replaceable area and a first entry replaceable area.
Conventionally, an entry number for dividing the entry replacement prohibited area into two areas is held, and in addition to this, one entry number in the first entry replaceable area is designated by the first entry replacement register means. It becomes possible to perform the TLB control similar to that of FIG. 6 described in the technology. The second entry replacement initial register means holds an entry number for dividing the first entry replaceable area into two areas, a second entry replaceable area and a second entry replace prohibited area.

【0015】スーパーバイザモードでTLBミスが発生
した場合は、図2に示すように、第1エントリ置換レジ
スタが示すエントリ置換可能領域の1エントリと置換が
実行される。ユーザモードでのTLBでTLBミスが発
生した場合は、図3に示すように、第2エントリ置換レ
ジスタが示すエントリ置換可能領域の1エントリと置換
が実行される。これによってスーパーバイザモードでの
み置換される第2エントリ置換禁止領域が得られる。
When a TLB miss occurs in the supervisor mode, one entry in the entry replaceable area indicated by the first entry replacement register is replaced as shown in FIG. When a TLB miss occurs in the TLB in the user mode, as shown in FIG. 3, one entry in the entry replaceable area indicated by the second entry replacement register is replaced. As a result, the second entry replacement prohibited area that is replaced only in the supervisor mode is obtained.

【0016】次に、本発明の作用を図4に示される概略
構成図を参照して説明する。システム初期化時に各レジ
スタ手段1,2,3,4は適切な値に設定される。また
システム初期化時にTLBヒット率検出手段6も初期設
定され、ヒット数を検出するためのTLBアクセスカウ
ント数と目標TLBヒット数が内部レジスタに設定され
るものとする。TLB7に入力される仮想アドレスVA
はTLB内で比較され、TLBヒットした場合、TLB
ヒット率検出手段6へTLBヒット信号を出力すると同
時に物理アドレスPAの出力を行う。TLBミスが発生
した場合、TLB7はTLBヒット率検出手段6へTL
Bミス信号を出力すると同時にTLB置換制御手段5に
TLBエントリの置換要求を行う。TLB置換制御手段
5はASI信号からTLBミスを引き起こしたTLBア
クセスが、ユーザモードであったのかスーパーバイザモ
ードであったのかを判別し、判別結果によって、第1エ
ントリ置換初期レジスタ1と第1エントリ置換レジスタ
2の組合せか、第2エントリ置換初期レジスタ3と第1
エントリ置換レジスタ4の組合せか、いずれかを選択
し、データバスより入力される新たなエントリとエント
リ置換レジスタに示されるTLBのエントリとの置換制
御を行う。TLBヒット率検出手段6はスーパーバイザ
モードでのTLBアクセスが上記TLBアクセスカウン
ト数に達すると、内部カウンタの値と上記目標TLBヒ
ット数との比較を行う。もしも内部カウンタの値が目標
ヒット数に達していない場合は、TLB置換制御手段5
に対して第2エントリ置換初期レジスタの値の加算要求
を出す。またユーザモードでのTLBアクセスが上記T
LBアクセスカウント数に達すると、内部カウンタの値
と上記目標TLBヒット数との比較を行う。もしも内部
カウンタの値が目標ヒット数に達していない場合は、T
LB置換制御手段5に対して第2エントリ置換初期レジ
スタの値の減算要求を出す。ただし、第2エントリ置換
初期レジスタは第1エントリ置換初期レジスタの値を制
限とする。
Next, the operation of the present invention will be described with reference to the schematic block diagram shown in FIG. At the time of system initialization, each register means 1, 2, 3, 4 is set to an appropriate value. Further, it is assumed that the TLB hit rate detection means 6 is also initialized at the time of system initialization, and the TLB access count number for detecting the hit number and the target TLB hit number are set in the internal register. Virtual address VA input to TLB7
Are compared in the TLB, and if the TLB is hit, the TLB
At the same time as outputting the TLB hit signal to the hit ratio detecting means 6, the physical address PA is output. When a TLB miss occurs, the TLB 7 sends the TLB hit rate detection means 6 to the TL.
At the same time as outputting the B-miss signal, the TLB replacement control means 5 is requested to replace the TLB entry. The TLB replacement control means 5 determines from the ASI signal whether the TLB access causing the TLB miss is the user mode or the supervisor mode, and the first entry replacement initial register 1 and the first entry replacement are determined according to the determination result. A combination of the registers 2 or the second entry replacement initial register 3 and the first
Either the combination of the entry replacement registers 4 is selected, and replacement control between the new entry input from the data bus and the TLB entry indicated in the entry replacement register is performed. When the TLB access in the supervisor mode reaches the TLB access count number, the TLB hit rate detecting means 6 compares the value of the internal counter with the target TLB hit number. If the value of the internal counter has not reached the target number of hits, the TLB replacement control means 5
A request to add the value of the second entry replacement initial register is issued to. In addition, the TLB access in the user mode is the above T
When the LB access count number is reached, the value of the internal counter is compared with the target TLB hit number. If the value of the internal counter has not reached the target number of hits, T
A request for subtracting the value of the second entry replacement initial register is issued to the LB replacement control means 5. However, the second entry replacement initial register limits the value of the first entry replacement initial register.

【0017】[0017]

【実施例】以下、図面を参照しながら実施例に基づいて
本発明の特徴を具体的に説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The features of the present invention will be specifically described below based on embodiments with reference to the drawings.

【0018】ここでは、ページ仮想記憶計算機システム
において使用されるアドレス変換バッファ装置であっ
て、仮想アドレスと物理アドレスとの対をひとつのエン
トリとして構成されたアドレス変換テーブルの一部を、
フルアソシアティブ方式で構成された高速キャッシュメ
モリであるTLBに保持し、仮想アドレスから物理アド
レスへの変換を行なうアドレス変換バッファ装置を例に
挙げて説明する。
Here, an address translation buffer device used in the page virtual memory computer system, which is a part of an address translation table constructed by a pair of a virtual address and a physical address as one entry,
An address translation buffer device, which is held in a TLB, which is a high-speed cache memory configured by the full associative method, and translates a virtual address to a physical address will be described as an example.

【0019】図5は、本発明のアドレス変換バッファ装
置の実施例を示すブロック図である。
FIG. 5 is a block diagram showing an embodiment of the address translation buffer device of the present invention.

【0020】第1エントリ置換初期レジスタ手段1は、
図2に示すとおり、TLB7を第1エントリ置換禁止領
域と第1エントリ置換可能領域に分けるエントリを格納
するためのレジスタである。また、第1エントリ置換レ
ジスタ手段2は、第1エントリ置換可能領域で次にTL
Bミスが発生した時に置換するエントリを格納するする
ためのレジスタである。
The first entry replacement initial register means 1 is
As shown in FIG. 2, this is a register for storing an entry that divides the TLB 7 into a first entry replacement prohibited area and a first entry replaceable area. In addition, the first entry replacement register means 2 uses the first entry replaceable area for the next TL.
This is a register for storing an entry to be replaced when a B miss occurs.

【0021】第2エントリ置換初期レジスタ手段3は、
図3に示すとおり、第1エントリ置換可能領域を第2エ
ントリ置換禁止領域と第2エントリ置換可能領域に分け
るエントリを格納するためのレジスタである。また、第
2エントリ置換レジスタ手段4は、第2エントリ置換可
能領域で次にTLBミスが発生した時に置換するエント
リを格納するためのレジスタである。
The second entry replacement initial register means 3 is
As shown in FIG. 3, this is a register for storing an entry that divides the first entry replaceable area into a second entry replacement prohibited area and a second entry replaceable area. The second entry replacement register means 4 is a register for storing an entry to be replaced when the next TLB miss occurs in the second entry replaceable area.

【0022】TLB置換制御手段5は、第1エントリ置
換レジスタ2と第2エントリ置換レジスタ4の変更を行
うと同時に、TLBの置換制御も行い、TLBヒット率
検出手段6からレジスタ変更要求信号を受け第2エント
リ置換初期レジスタ3の変更を行う制御手段である。
The TLB replacement control means 5 changes the first entry replacement register 2 and the second entry replacement register 4 and at the same time performs TLB replacement control and receives a register change request signal from the TLB hit ratio detection means 6. It is a control means for changing the second entry replacement initial register 3.

【0023】TLB7は、仮想アドレスVAと物理アド
レスPAの対をエントリとしこれを格納するアドレス変
換バッファを構成する。TLB7は入力される仮想アド
レスVAとエントリの比較を行い、TLBヒット、TL
Bミスを検出しそれぞれの信号を外部に出力するもので
ある。
The TLB 7 constitutes an address translation buffer for storing a pair of a virtual address VA and a physical address PA as an entry. The TLB 7 compares the input virtual address VA with the entry, and checks the TLB hit, TL
The B miss is detected and each signal is output to the outside.

【0024】TLBヒット率検出手段6は、TLBのヒ
ット率を検出する装置である。
The TLB hit ratio detecting means 6 is a device for detecting the TLB hit ratio.

【0025】以下、TLBヒット率検出手段6の詳細に
ついて説明する。
The details of the TLB hit rate detecting means 6 will be described below.

【0026】TLBヒットカウントレジスタ手段101
は、第2エントリ置換初期レジスタ3を変更する際のT
LBヒット率を格納するレジスタ手段である。ANDゲ
ート102は、ASI信号と比較器103の出力信号と
比較器109の出力信号を入力とし、第2エントリ置換
初期レジスタの変更信号を出力する。比較器103は、
TLBヒットカウントレジスタ手段101とマルチプレ
クサ104の出力信号を入力とし比較を行う。マルチプ
レクサ104は、ユーザモードTLBヒットカウントレ
ジスタ(図中、uヒットレジスタと図示)105とスー
パーバイザモードTLBヒットカウントレジスタ(図
中、sヒットレジスタと図示)106の出力をASI信
号によってマルチプレクスするマルチプレクサ装置であ
る。ユーザモードTLBヒットカウントレジスタ105
は、ユーザモードでのTLBヒットをカウントするカウ
ンタ装置である。スーパーバイザモードTLBヒットカ
ウントレジスタ106は、スーパーバイザモードでのT
LBヒットをカウントするカウンタ装置である。TLB
ヒットカウンタ手段107は、TLBヒットをカウント
するカウンタ装置である。TLBアクセスカウントレジ
スタ手段108は、TLBヒットをカウントするための
TLBアクセスのサンプリング数を格納するレジスタ装
置である。比較器109は、TLBアクセスカウントレ
ジスタ手段108とマルチプレクサ110の出力信号を
入力とし比較を行う装置である。マルチプレクサ110
は、ユーザモードアクセスカウントレジスタ111とス
ーパーバイザモードアクセスカウントレジスタ112の
出力をASI信号によってマルチプレクスするマルチプ
レクサ装置である。ユーザモードアクセスカウントレジ
スタ111はユーザモードでのTLBアクセスをカウン
トするカウンタ装置である。スーパーバイザモードアク
セスカウントレジスタ112は、スーパーバイザモード
でのTLBアクセスをカウントするカウンタ装置であ
る。TLBアクセスカウンタ手段113は、TLBアク
セスをカウントするカウンタ装置である。
TLB hit count register means 101
Is T when changing the second entry replacement initial register 3.
It is a register means for storing the LB hit rate. The AND gate 102 receives the ASI signal, the output signal of the comparator 103, and the output signal of the comparator 109, and outputs a change signal for the second entry replacement initial register. The comparator 103 is
The output signals of the TLB hit count register means 101 and the multiplexer 104 are input and comparison is performed. The multiplexer 104 multiplexes the outputs of the user mode TLB hit count register (shown as u hit register in the figure) 105 and the supervisor mode TLB hit count register (shown as s hit register in the figure) 106 by the ASI signal. Is. User mode TLB hit count register 105
Is a counter device that counts TLB hits in user mode. The supervisor mode TLB hit count register 106 is set to T in the supervisor mode.
A counter device that counts LB hits. TLB
The hit counter means 107 is a counter device that counts TLB hits. The TLB access count register means 108 is a register device that stores the sampling number of TLB access for counting TLB hits. The comparator 109 is a device that receives the output signals of the TLB access count register means 108 and the multiplexer 110 as input and performs comparison. Multiplexer 110
Is a multiplexer device that multiplexes the outputs of the user mode access count register 111 and the supervisor mode access count register 112 by an ASI signal. The user mode access count register 111 is a counter device that counts TLB accesses in the user mode. The supervisor mode access count register 112 is a counter device that counts TLB accesses in the supervisor mode. The TLB access counter means 113 is a counter device that counts TLB accesses.

【0027】次に、図5に示される実施例の動作を説明
する。
Next, the operation of the embodiment shown in FIG. 5 will be described.

【0028】TLB7に入力される仮想アドレスVAが
TLB7内部のエントリと合致した場合、TLB7はT
LBヒット信号を出力し、仮想アドレスVAに対応する
物理アドレスPAを出力する。合致しない場合は、TL
B7はTLBミス信号を出力し、TLB置換制御手段5
によって指示されるエントリをデータバスより入力され
る新たなエントリと置換する。TLB置換制御手段5
は、ASI信号によってTLBミス発生時のアクセスモ
ードを認識し、ユーザモードアクセスの場合は第2エン
トリ置換レジスタ手段4の内容を置換するエントリと
し、スーパーバイザモードアクセスの場合は第1エント
リ置換レジスタ手段2の内容を置換するエントリとし、
TLB7に指示する。データバスより入力される新たな
エントリとエントリ置換レジスタに示されるTLBのエ
ントリとの置換制御を行う。TLB7の出力するTLB
ヒット、TLBミスの信号は、TLBヒットカウンタ手
段107とTLBアクセスカウンタ手段113にも入力
される。TLBアクセスカウンタ手段113はASI信
号によってアクセスのモードを識別し、ユーザモードの
場合はユーザTLBアクセスカウントレジスタ111
を、スーパーバイザモードの場合はスーパーバイザTL
Bアクセスカウントレジスタ112を、入力として選択
し、レジスタの値に+1を行って再びそれぞれのレジス
タへストアする。ユーザTLBアクセスカウントレジス
タ111とスーパーバイザTLBアクセスカウントレジ
スタ112の値はASI信号とマルチプレクサ110に
よっていずれかの値が選択され、比較器109でTLB
アクセスカウントレジスタ手段108と比較され、TL
Bアクセスカウントレジスタ手段108に等しい場合1
を出力する。ユーザTLBアクセスカウントレジスタ1
11とスーパーバイザTLBアクセスカウントレジスタ
112はこの信号によって再び0にセットされる。
When the virtual address VA input to TLB7 matches an entry inside TLB7, TLB7 returns T
The LB hit signal is output, and the physical address PA corresponding to the virtual address VA is output. TL if not matched
B7 outputs a TLB miss signal, and TLB replacement control means 5
Replaces the entry pointed to by the new entry entered from the data bus. TLB replacement control means 5
Recognizes the access mode when the TLB miss occurs by the ASI signal, and makes the entry to replace the contents of the second entry replacement register means 4 in the case of user mode access, and the first entry replacement register means 2 in the case of supervisor mode access. As an entry that replaces the contents of
Instruct TLB7. Replacement control between a new entry input from the data bus and the TLB entry indicated in the entry replacement register is performed. TLB output by TLB7
The hit and TLB miss signals are also input to the TLB hit counter means 107 and the TLB access counter means 113. The TLB access counter means 113 identifies the access mode by the ASI signal, and in the case of the user mode, the user TLB access count register 111.
, Supervisor TL in supervisor mode
The B access count register 112 is selected as an input, the value of the register is incremented by +1 and stored again in each register. One of the values of the user TLB access count register 111 and the supervisor TLB access count register 112 is selected by the ASI signal and the multiplexer 110, and the comparator 109 selects TLB.
Compared with access count register means 108, TL
1 if equal to B access count register means 108
Is output. User TLB access count register 1
11 and supervisor TLB access count register 112 are again set to 0 by this signal.

【0029】TLBヒットカウンタ手段107はASI
信号によってアクセスのモードを識別し、ユーザモード
の場合はユーザTLBヒットカウントレジスタ105
を、スーパーバイザモードの場合はスーパーバイザTL
Bヒットカウントレジスタ106を、入力として選択
し、レジスタの値に+1を行って再びそれぞれのレジス
タへストアする。ユーザTLBヒットカウントレジスタ
105とスーパーバイザTLBヒットカウントレジスタ
106の値はASI信号とマルチプレクサ104によっ
ていずれかの値が選択され、比較器103でTLBヒッ
トカウントレジスタ手段101と比較され、TLBヒッ
トカウントレジスタ手段101より小さい場合1を出力
する。ユーザTLBヒットカウントレジスタ105とス
ーパーバイザTLBヒットカウントレジスタ106は、
この信号によって再び0にセットされる。
The TLB hit counter means 107 uses ASI.
The mode of access is identified by a signal, and in the case of the user mode, the user TLB hit count register 105
, Supervisor TL in supervisor mode
The B hit count register 106 is selected as an input, the register value is incremented by +1 and stored again in each register. One of the values of the user TLB hit count register 105 and the supervisor TLB hit count register 106 is selected by the ASI signal and the multiplexer 104, the comparator 103 compares the selected value with the TLB hit count register means 101, and the TLB hit count register means 101. If smaller, 1 is output. The user TLB hit count register 105 and the supervisor TLB hit count register 106 are
It is set to 0 again by this signal.

【0030】比較器103と比較器109とASI信号
を入力したANDゲート102は、比較器103が1で
比較器109が1を出力する場合に第2エントリ置換初
期レジスタ手段3の変更要求信号をTLB置換制御手段
5に与える。TLB置換制御手段5は変更要求信号とA
SI信号によってアクセスモードの識別を行いスーパー
バイザモードの場合は第2エントリ置換初期レジスタ手
段3を+1し、ユーザモードの場合は第2エントリ置換
初期レジスタ手段3を−1する。ただし第2エントリ置
換初期レジスタ手段3の値は第1エントリ置換初期レジ
スタ手段1を下限とし、それ以下の値をとることがない
ようにTLB置換制御手段5によって制御される。
The AND gate 102 to which the comparator 103, the comparator 109, and the ASI signal are input outputs the change request signal of the second entry replacement initial register means 3 when the comparator 103 outputs 1 and the comparator 109 outputs 1. It is given to the TLB replacement control means 5. The TLB replacement control means 5 receives the change request signal and A
The access mode is identified by the SI signal, and the second entry replacement initial register means 3 is incremented by +1 in the supervisor mode, and the second entry replacement initial register means 3 is decremented by -1 in the user mode. However, the value of the second entry replacement initial register means 3 is controlled by the TLB replacement control means 5 so that the first entry replacement initial register means 1 has a lower limit and does not take a value less than that.

【0031】上述した本発明のアドレス変換バッファ装
置の構成及び動作を整理すると以下の通りである。
The configuration and operation of the above-described address translation buffer device of the present invention can be summarized as follows.

【0032】本発明においては、エントリを連続して順
序付けられるTLB7の領域をプログラムによる明示的
な置換以外には置換を禁止する第1エントリ置換禁止領
域と、第1エントリ置換禁止領域以外の領域であってプ
ログラムによる明示的な置換のみならずTLBミスが発
生した場合の置換が可能な第1エントリ置換可能領域と
の二つの領域に分け、この二つの領域の境界を示すもの
として、第1エントリ置換可能領域の最初のエントリ番
号を、プログラムからアクセス可能なレジスタにより構
成される第1エントリ置換初期レジスタ手段1に保持さ
せる。また、上記第1エントリ置換可能領域のうちの1
つのエントリ番号を、プログラムからアクセス可能なレ
ジスタから構成される第1エントリ置換レジスタ手段2
に保持させる。
In the present invention, the area of the TLB 7 in which the entries are consecutively ordered is composed of a first entry replacement prohibited area where replacement is prohibited except for an explicit replacement by the program, and an area other than the first entry replacement prohibited area. Therefore, not only the explicit replacement by the program but also the first entry that can be replaced when a TLB miss occurs is divided into two areas, the replaceable area and the first entry as a boundary of these two areas. The first entry number of the replaceable area is held in the first entry replacement initial register means 1 composed of a register accessible by the program. Also, one of the first entry replaceable areas
First entry replacement register means 2 composed of registers which can access one entry number from a program
To hold.

【0033】更に、上記第1エントリ置換可能領域を、
ユーザプログラム実行時には置換を禁止する第2エント
リ置換禁止領域と、TLBミスが発生した場合の置換が
可能な第2エントリ置換可能領域との2つの領域に分
け、この二つの領域の境界を示すものとして、第2エン
トリ置換可能領域の最初のエントリ番号を、プログラム
からアクセス可能なレジスタから構成される第2エント
リ置換初期レジスタ手段3に保持させる。また、上記第
2エントリ置換可能領域のうちの1つのエントリ番号を
プログラムからアクセス可能なレジスタからなる第2エ
ントリ置換レジスタ手段4に保持させる。
Further, the first entry replaceable area is
It is divided into two areas, a second entry replacement prohibited area in which replacement is prohibited during execution of a user program and a second entry replaceable area in which replacement is possible when a TLB miss occurs, and indicates the boundary between these two areas. As a result, the first entry number of the second entry replaceable area is held in the second entry replacement initial register means 3 composed of a register accessible from the program. Further, one entry number of the second entry replaceable area is held in the second entry replacement register means 4 which is a register accessible by the program.

【0034】そして、TLBヒット率検出手段6によ
り、スーパーバイザモードとユーザモードの各々につい
て、TLBをアクセスするある回数に対するTLBヒッ
トの回数をカウントし、TLBの置換制御手段5によ
り、TLBミスした場合に、アクセス元がユーザプログ
ラム又はユーザデータの場合、第2エントリ置換レジス
タ4に格納された番号のエントリと新しいエントリとの
置換を行ない、アクセス元がスーパーバイザプログラム
又はスーパーバイザデータの場合、第1エントリ置換レ
ジスタ2に格納された番号のエントリと新しいエントリ
との置換を行ない、更に、上記TLBヒット率検出手段
6の結果によって、上記第2エントリ置換初期レジスタ
手段3の値を変更し、自動的に第2エントリ置換禁止領
域と第2エントリ置換可能領域の比率を変更する。
Then, the TLB hit ratio detection means 6 counts the number of TLB hits with respect to a certain number of times of accessing the TLB in each of the supervisor mode and the user mode, and the TLB replacement control means 5 detects a TLB miss. , If the access source is a user program or user data, the entry having the number stored in the second entry replacement register 4 is replaced with a new entry, and if the access source is a supervisor program or supervisor data, the first entry replacement register The entry having the number stored in 2 is replaced with a new entry, and the value of the second entry replacement initial register means 3 is changed according to the result of the TLB hit ratio detection means 6 to automatically change the second entry. Entry replacement prohibited area and second entry replacement To change the ratio of Noh area.

【0035】[0035]

【発明の効果】本発明においては、TLBの置換制御に
おいてTLBのヒット率によりTLB置換禁止領域と置
換可能領域の比率の変更を動的に行うことによって、常
に最適なTLBの制御を行うことが可能となり、TLB
の高ヒット率を得て計算機システム全体の効率を向上さ
せたアドレス変換バッファ装置を得ることが可能とな
る。
According to the present invention, in the TLB replacement control, the ratio of the TLB replacement prohibited area to the replaceable area is dynamically changed according to the TLB hit rate, so that the optimum TLB control is always performed. Enabled, TLB
It is possible to obtain an address translation buffer device which has a high hit rate and which improves the efficiency of the entire computer system.

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

【図1】 本発明アドレス変換バッファ装置におけるT
LBの領域分けの状態を表す概念図である。
FIG. 1 is a block diagram of T in the address translation buffer device of the present invention.
It is a conceptual diagram showing the state of LB area division.

【図2】 スーパーバイザーモードにおいてTLBミス
が発生した場合のTLBの領域分けの状態を表す概念図
である。
FIG. 2 is a conceptual diagram showing a state of TLB area division when a TLB miss occurs in the supervisor mode.

【図3】 ユーザモードにおいてTLBミスが発生した
場合のTLBの領域分けの状態を表す概念図である。
FIG. 3 is a conceptual diagram showing a state of TLB area division when a TLB miss occurs in the user mode.

【図4】 本発明のアドレス変換バッファ装置の基本的
な構成を示すブロック図である。
FIG. 4 is a block diagram showing a basic configuration of an address translation buffer device of the present invention.

【図5】 本発明のアドレス変換バッファ装置の一実施
例を示すブロック図である。
FIG. 5 is a block diagram showing an embodiment of an address translation buffer device of the present invention.

【図6】 従来技術におけるTLBの領域分けの状態を
表す概念図である。
FIG. 6 is a conceptual diagram showing a state of TLB area division in the conventional technique.

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

1…第1エントリ置換初期レジスタ手段、2…第1エン
トリ置換レジスタ手段、3…第2エントリ置換初期レジ
スタ手段、4…第2エントリ置換レジスタ手段、5…T
LB置換制御手段、6…TLBヒット率検出手段、7…
TLB、101…TLBヒットカウントレジスタ手段、
102…ANDゲート、103,109…比較器、10
4,110…マルチプレクサ、105…ユーザモードT
LBヒットカウントレジスタ、106…スーパーバイザ
モードTLBヒットカウントレジスタ、107…TLB
ヒットカウンタ手段、108…TLBアクセスカウント
レジスタ手段、111…ユーザモードTLBアクセスカ
ウントレジスタ、112…スーパーバイザモードTLB
アクセスカウントレジスタ、113…TLBアクセスカ
ウンタ手段
1 ... 1st entry replacement initial register means, 2 ... 1st entry replacement register means, 3 ... 2nd entry replacement initial register means, 4 ... 2nd entry replacement register means, 5 ... T
LB replacement control means, 6 ... TLB hit rate detection means, 7 ...
TLB, 101 ... TLB hit count register means,
102 ... AND gate, 103, 109 ... Comparator, 10
4, 110 ... Multiplexer, 105 ... User mode T
LB hit count register, 106 ... Supervisor mode TLB hit count register, 107 ... TLB
Hit counter means, 108 ... TLB access count register means, 111 ... User mode TLB access count register, 112 ... Supervisor mode TLB
Access count register, 113 ... TLB access counter means

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 仮想アドレスと物理アドレスとの対をひ
とつのエントリとして構成されたアドレス変換テーブル
の一部をトランスレーション・ルックアサイド・バッフ
ァに保持し、仮想アドレスから物理アドレスへの変換を
行なう仮想記憶計算機システムにおいて使用されるアド
レス変換バッファ装置であって、 前記トランスレーション・ルックアサイド・バッファの
領域を第1エントリ置換禁止領域と第1エントリ置換可
能領域とに分けるエントリ番号を保持する第1エントリ
初期置換レジスタ手段と、 前記第1エントリ置換可能領域のうちの1つのエントリ
番号を保持する第1エントリ置換レジスタ手段と、 前記第1エントリ置換可能領域を第2エントリ置換禁止
領域と第2エントリ置換可能領域とに分けるエントリ番
号を保持する第2エントリ置換初期レジスタ手段と、 前記第2エントリ置換可能領域のうちの1つのエントリ
番号を保持する第2エントリ置換レジスタ手段と、 前記トランスレーション・ルックアサイド・バッファが
アクセスされたときのトランスレーション・ルックアサ
イド・バッファのヒット率を検出するトランスレーショ
ン・ルックアサイド・バッファヒット率検出手段と、 該トランスレーション・ルックアサイド・バッファヒッ
ト率検出手段により検出されたヒット率に応じて前記第
2エントリ置換初期レジスタ手段の値を変更し、自動的
に前記第2エントリ置換禁止領域と前記第2エントリ置
換可能領域の比率を変更するエントリ置換制御手段とを
有することを特徴とするアドレス変換バッファ装置。
1. A virtual look-aside buffer that holds a part of an address translation table configured with a pair of a virtual address and a physical address as one entry and translates the virtual address to the physical address. An address translation buffer device used in a storage computer system, the first entry holding an entry number for dividing an area of the translation lookaside buffer into a first entry replacement prohibited area and a first entry replaceable area. Initial replacement register means, first entry replacement register means for holding one entry number of the first entry replaceable area, first entry replaceable area to second entry replacement prohibited area and second entry replacement The second that holds the entry number that divides the possible area Entry replacement initial register means, second entry replacement register means for holding an entry number of one of the second entry replaceable areas, and translation look when the translation lookaside buffer is accessed Translation lookaside buffer hit ratio detection means for detecting the hit ratio of the aside buffer, and the second entry replacement initial register according to the hit ratio detected by the translation lookaside buffer hit ratio detection means An address translation buffer device comprising: an entry replacement control means for changing the value of the means and automatically changing the ratio of the second entry replacement prohibited area and the second entry replaceable area.
JP4274543A 1992-10-13 1992-10-13 Address translation buffer device Pending JPH06124237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4274543A JPH06124237A (en) 1992-10-13 1992-10-13 Address translation buffer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4274543A JPH06124237A (en) 1992-10-13 1992-10-13 Address translation buffer device

Publications (1)

Publication Number Publication Date
JPH06124237A true JPH06124237A (en) 1994-05-06

Family

ID=17543183

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4274543A Pending JPH06124237A (en) 1992-10-13 1992-10-13 Address translation buffer device

Country Status (1)

Country Link
JP (1) JPH06124237A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007035904A1 (en) * 2005-09-21 2007-03-29 Qualcomm Incorporated Method and apparatus for managing cache partitioning
US7761686B2 (en) 2004-06-02 2010-07-20 Fujitsu Semiconductor Limited Address translator and address translation method
JP2013519965A (en) * 2010-02-17 2013-05-30 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド IOMMU with TLB support design

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761686B2 (en) 2004-06-02 2010-07-20 Fujitsu Semiconductor Limited Address translator and address translation method
WO2007035904A1 (en) * 2005-09-21 2007-03-29 Qualcomm Incorporated Method and apparatus for managing cache partitioning
JP2009509274A (en) * 2005-09-21 2009-03-05 クゥアルコム・インコーポレイテッド Method and apparatus for managing cache partitioning
US7650466B2 (en) 2005-09-21 2010-01-19 Qualcomm Incorporated Method and apparatus for managing cache partitioning using a dynamic boundary
JP4847534B2 (en) * 2005-09-21 2011-12-28 クゥアルコム・インコーポレイテッド Method and apparatus for managing cache partitioning
EP1934754B1 (en) * 2005-09-21 2018-12-26 Qualcomm Incorporated Method and apparatus for managing cache partitioning
JP2013519965A (en) * 2010-02-17 2013-05-30 アドバンスト・マイクロ・ディバイシズ・インコーポレイテッド IOMMU with TLB support design

Similar Documents

Publication Publication Date Title
US6014732A (en) Cache memory with reduced access time
US5265227A (en) Parallel protection checking in an address translation look-aside buffer
KR960001946B1 (en) Translation lookaside buffer
US5493660A (en) Software assisted hardware TLB miss handler
US5282274A (en) Translation of multiple virtual pages upon a TLB miss
JP3740195B2 (en) Data processing device
US4376297A (en) Virtual memory addressing device
US8296538B2 (en) Storing secure mode page table data in secure and non-secure regions of memory
US5918251A (en) Method and apparatus for preloading different default address translation attributes
US7426626B2 (en) TLB lock indicator
US6012132A (en) Method and apparatus for implementing a page table walker that uses a sliding field in the virtual addresses to identify entries in a page table
US6304944B1 (en) Mechanism for storing system level attributes in a translation lookaside buffer
JP4065660B2 (en) Translation index buffer with distributed functions in parallel
US10083126B2 (en) Apparatus and method for avoiding conflicting entries in a storage structure
US5555395A (en) System for memory table cache reloads in a reduced number of cycles using a memory controller to set status bits in the main memory table
EP3497577B1 (en) Updating least-recently-used data for greater persistence of higher-generality cache entries
EP0506236A1 (en) Address translation mechanism
JPH04352256A (en) Method and apparatus for saving memory space
WO1998044422A1 (en) Page table walker which positions a sliding field in a virtual address using page size
US20160140042A1 (en) Instruction cache translation management
JPH0619793A (en) History table of virtual address conversion estimation for cache access
CN114761934A (en) In-process Translation Lookaside Buffer (TLB) (mTLB) for enhancing a Memory Management Unit (MMU) TLB for translating Virtual Addresses (VA) to Physical Addresses (PA) in a processor-based system
CN109983538B (en) Memory address translation
JP2007280421A (en) Data processor
US6567907B1 (en) Avoiding mapping conflicts in a translation look-aside buffer