JPS6115250A - Tlb control system - Google Patents

Tlb control system

Info

Publication number
JPS6115250A
JPS6115250A JP59135907A JP13590784A JPS6115250A JP S6115250 A JPS6115250 A JP S6115250A JP 59135907 A JP59135907 A JP 59135907A JP 13590784 A JP13590784 A JP 13590784A JP S6115250 A JPS6115250 A JP S6115250A
Authority
JP
Japan
Prior art keywords
entry
page
tlb
bit
same
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.)
Granted
Application number
JP59135907A
Other languages
Japanese (ja)
Other versions
JPH024017B2 (en
Inventor
Kazutoshi Eguchi
江口 和俊
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP59135907A priority Critical patent/JPS6115250A/en
Priority to US06/749,866 priority patent/US4731740A/en
Publication of JPS6115250A publication Critical patent/JPS6115250A/en
Publication of JPH024017B2 publication Critical patent/JPH024017B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To increase the processing speed by checking and setting a TLB (translation look-aside buffer) entry of a page immediately preceding the page shown a TLB entry to be replaced. CONSTITUTION:A virtual address is loaded to an MAR32 for memory access to a main memory 10, and the intra-page offset contained in the loaded virtual address is led to a boundary checking circuit 36. The circuit 36 checks whether or not the memory access covers a page boundary. For this purpose, it is just required to check whether the offset is shown or not as ''7FE'' in the hexadecimal expression. The result of this check is delivered to a control circuit 37 in the form of a signal PAGEBD. While the coupling information of the low-order bits of a segment number SN in the virtual address loaded to the MAR32 and the low-order bits of a page number PN is led to a TLB35. Thus the TLB35 is retrieved and the stored information of the corresponding entry is read out of the TLB35.

Description

【発明の詳細な説明】 [発明の技術分野] この発明は、TLBを備えた仮想記憶制御方式の計算機
におけるTLB制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a TLB control method in a virtual memory control computer equipped with a TLB.

[発明の技術的背景] 仮想記憶制御方式の計算機では、一般に、仮想アドレス
から実アドレスへのアドレス変換を高速に行なうために
、TE01 (Lranslationl ookas
ide  3 uffer ; 7ドレス変換ハツ77
 )と呼ばれるハードウェア機構が設けられている。
[Technical Background of the Invention] Computers using a virtual memory control method generally use TE01 (Ltranslation lookas) to perform address translation from virtual addresses to real addresses at high speed.
ide 3 uffer; 7 dress conversion hats 77
) is provided.

このTLBの各エントリには、実ページ番号を含むアド
レス変換情報や、対応エントリが正当(有効)か否(無
効)かを示すバリッド(Valid)ビットのフィール
ドを有している。
Each entry of this TLB has a field of address translation information including a real page number and a valid bit indicating whether the corresponding entry is valid (valid) or not (invalid).

TLBは、メモリアクセスに際し、仮想アドレスの所定
フィールドを用いて索引される。そして、仮想アドレス
の所定フィールドとTLBの対応エントリの内容とによ
り、メモリアクセスの正当性がチェックされる。このチ
ェックにより、正当性が保証された場合、対応エントリ
内の実ページ番号と仮想アドレス(のオフセット)とに
より得られる実アドレスを用いたメモリアクセスが行な
われる。これに対し、上記正当性が保証されない場合、
TLBの対応エントリの入替えが行なわれ、しかる後メ
モリアクセスが行なわれる。
The TLB is indexed using a predetermined field of the virtual address during memory access. Then, the validity of the memory access is checked based on the predetermined field of the virtual address and the contents of the corresponding entry in the TLB. If the validity is guaranteed by this check, memory access is performed using a real address obtained from the real page number in the corresponding entry and (the offset of) the virtual address. On the other hand, if the above validity is not guaranteed,
Corresponding entries in the TLB are replaced, and then memory access is performed.

[背景技術の問題点コ しかし、上記したTLBを用いた従来の仮想記憶制御方
式の計算機では、例えば、ハーフワード境界(Half
word  B oundary )のフルワードアク
セス(FuNword  A、ccess)であって、
且つページ境界(P age  3 oundary 
)をまタフメモリアクセスのときなどは、処理速度が低
下する欠点があった。これは、1つのメモリアクセスが
2ページにまたがる場合には、両ページに対応する各T
LBエントリをそれぞれチェックし、同メモリアクセス
の正当性を保証してからメモリアクセスを行なう必要が
あったためである。
[Problems in the Background Art] However, in computers using the conventional virtual memory control method using the TLB described above, for example, halfword boundaries (Half
Full word access (FuNword A, access) of word B boundary),
and page boundaries (Page 3 boundaries)
) had the disadvantage of slowing down processing speed when accessing tough memory. If one memory access spans two pages, each T
This is because it is necessary to check each LB entry and ensure the validity of the same memory access before performing memory access.

[発明の目的] この発明は上記事情に鑑みてなされたものでその目的は
、TLBの各エントリに次ページに対する制御情報が設
定される構成とすることにより、ページ境界をまたぐメ
モリアクセスの場合でも、先頭ページに対応するTLB
エントリのチェックだけでこの種メモリアクセスの正当
性が保証でき、もって処理速度の向上が図れるTLB制
御方式を提供することにある。
[Purpose of the Invention] This invention has been made in view of the above circumstances, and its purpose is to provide a structure in which control information for the next page is set in each entry of the TLB, so that even in the case of memory access that crosses page boundaries, , TLB corresponding to the first page
The object of the present invention is to provide a TLB control method that can guarantee the validity of this type of memory access just by checking entries, thereby improving processing speed.

このJ?Iu他の目的は、ページテーブルエントリに用
意され、対応するページが書換えられたか否かを示すモ
ディファイビットの状態が、たとえ2ページにまたがる
メモリアクセスの場合でも、簡単に把握できるようにす
ることにある。
This J? Iu's other purpose is to make it easy to understand the state of the modify bit, which is prepared in a page table entry and indicates whether the corresponding page has been rewritten, even if the memory access spans two pages. be.

この発明の更に他の目的は、上記モディファイビットが
簡単に把握できる方式を採用する場合において、TLB
エントリの入替え回数を減らすことにある。
Still another object of the present invention is to use the TLB
The purpose is to reduce the number of times entries are replaced.

[発明の概要] この発明では、仮想記憶制御方式の計算機において、各
TLBエントリに、同エントリの有効/無効を示すビッ
トv′、同エントリで示されるページの次のページに対
応するTLBエントリの有効/無効を示すビットVNi
(i′、,・・・n)nは1以上、の整数)、およびア
ドレス変換情報のフィールドを含むTLBが設けられる
。第1検出手段は、メモリアクセスに際し、対象仮想ア
ドレス、同対象仮想アドレスに対応する上記TLBエン
トリの上記ビットV′、VNi、およびアドレス変換情
報の所定フィールドにより、同エントリに正しいアドレ
ス変換情報が格納されているか否か、および同エントリ
で示されるページの次のページに対応する上記TLBエ
ントリに正しいアドレス変換情報が格納されているか否
かを検出する。また、第2検出手段は、1つのメモリア
クセスが2ページにまたがるか否かを検出する。入替え
手段は、上記第1および第2検出手段の検出結果に応じ
て上記TLBの対応エントリの入替えを行なう。
[Summary of the Invention] In the present invention, in a computer using a virtual memory control method, each TLB entry has a bit v' indicating the validity/invalidity of the entry, and a bit v' of the TLB entry corresponding to the page next to the page indicated by the entry. Bit VNi indicating valid/invalid
(i', . . . n, where n is an integer of 1 or more), and a TLB including a field of address translation information. The first detection means stores correct address translation information in the target virtual address, the bits V' and VNi of the TLB entry corresponding to the target virtual address, and a predetermined field of address translation information when accessing the memory. and whether correct address translation information is stored in the TLB entry corresponding to the page next to the page indicated by the same entry. Further, the second detection means detects whether one memory access spans two pages. The replacement means replaces the corresponding entries in the TLB according to the detection results of the first and second detection means.

この入替え手段によるTLBエントリの入替え時には、
入替え対象TLBエントリの上記ビットV′が無条件で
セットされる。また、同入替え対象TLBエントリで示
されるページの直前ページに対応する上記TLBエント
リのビットVNiが変更される。更に、同入替え対象T
LBエントリで示されるページの直後ページに対応する
上記TLBエントリのチェックが行なわれ、そのチェッ
ク結果を利用することにより、上記入替え対象TLBエ
ントリのビットVNiの値の設定が行なわれる。
When replacing TLB entries using this replacement method,
The bit V' of the TLB entry to be replaced is set unconditionally. Further, the bit VNi of the TLB entry corresponding to the page immediately before the page indicated by the TLB entry to be replaced is changed. Furthermore, the same replacement target T
The TLB entry corresponding to the page immediately after the page indicated by the LB entry is checked, and the value of the bit VNi of the TLB entry to be replaced is set by using the check result.

[発明の実施例1 以下、この発明の一実施例を図面を参照して説明する。[Embodiment 1 of the invention An embodiment of the present invention will be described below with reference to the drawings.

図面は、この発明を適用する仮想記憶制御方式の計算機
の要部の構成を示すもので、10は主メモリである。主
メモリ10には、仮想アドレス空間のセグメント情報を
示すセグメントテーブル11および各セグメントの中の
ページ情報を示すページテーブル12が置かれる。セグ
メントテーブル11の各エントリは、同エントリの有効
/周動を示すバリッドピントV、そのセグメントの主記
憶保護情報P、LEVEL、および対応するページテー
ブル12の先頭アドレスであるページテーブル起点アド
レスPTOのフィールドを有する。また、ページテーブ
ル12の各エントリは、同エントリの有効/無効を示す
バリッドビットV、対応するページが書換えられたこと
を示す(即ち、仮想空間内の該当ページの内容を、主メ
モリ10内の該当ページの内容に一致させる必要がある
ことを示す)モディファイビットM、および仮想アドレ
スを実アドレスに変換するための実ページ番号(アドレ
ス)RPAのフィールドを有する。
The drawing shows the configuration of the main parts of a virtual storage control type computer to which the present invention is applied, and 10 is a main memory. Main memory 10 includes a segment table 11 indicating segment information of a virtual address space and a page table 12 indicating page information in each segment. Each entry in the segment table 11 has a field of a valid focus V indicating the validity/period of the entry, main memory protection information P of the segment, LEVEL, and a page table starting point address PTO which is the starting address of the corresponding page table 12. has. Each entry in the page table 12 also has a valid bit V indicating whether the entry is valid or invalid, and a valid bit V indicating that the corresponding page has been rewritten (that is, the contents of the corresponding page in the virtual space are stored in the main memory 10). It has a field for a modify bit M (indicating that it is necessary to match the contents of the corresponding page) and a real page number (address) RPA for converting a virtual address into a real address.

20はデータバス、30は演算制m装置である。演算制
fil装置30は、データバス20により主メモリ10
と接続される。
20 is a data bus, and 30 is an arithmetic controller. The arithmetic control fil device 30 is connected to the main memory 10 by a data bus 20.
connected to.

演篩制御装置30において、31はPSW(プログラム
ステータスワード)である。PSW31の所定フィール
ドには、プログラムの走行モード【保護の優先レベル)
を示すモード情報MODEが格納される。32は仮想ア
ドレスを保持するメモリアドレスレジスタ(MAR)で
ある。仮想アドレスは、論理的に、セグメント番号SN
、ページ番号PN、およびページ内オフセット0ffs
etに分割される。33はセグメントテーブル11のエ
ントリ(セグメントテーブルエントリ)に格納されてい
る主記憶保護情報P、LEVELを一時保持する保護レ
ジスタ、34はページテーブル12のエントリ(ページ
テーブルエントリ)に格納されている実ページ番号RP
Aを一時保持するRPAレジスタある。
In the sieve control device 30, 31 is a PSW (program status word). The specified field of PSW31 contains the program running mode [priority level of protection].
Mode information MODE indicating the mode is stored. 32 is a memory address register (MAR) that holds virtual addresses. The virtual address is logically segment number SN
, page number PN, and intra-page offset 0ffs
It is divided into et. 33 is a protection register that temporarily holds the main memory protection information P and LEVEL stored in the entry (segment table entry) of the segment table 11, and 34 is the real page stored in the entry (page table entry) of the page table 12. Number RP
There is an RPA register that temporarily holds A.

35は仮想アドレスから実アドレスへのアドレス変換を
高速に行なうためのTLBである。TLB35は、TL
B35A、35Bの2セツトからなり、MAR32に保
持された仮想アドレスのセグメント番号SNの一部、例
えば下位ビットと、同じくページ番号PNの一部、例え
ば下位ビットとの連結情報(SNの一部が下位となる)
によって索引される。TLB35(内のTLB35A、
35B)の各エントリ(TLBエントリ)は、コントロ
ールセクションC8,SN”、PN′、RPAからなる
アドレス変換情報、およびP、LEVELのフィールド
を有する。コントロールセクションC8は、ビットV′
、ビットM′、ビットVNA、ビットVNB、ビットM
NA、およびビットMNBからなる。ビットV−は、対
応するTLBエントリの有効/無効を示し、ビットVN
A、VNBは、同エントリで示されるページの次のペー
ジに対応するTLBエントリ(T L B55A 、 
35Bのエントリ)の有効、/無効を示す。績だ、ビッ
トM′は、対応するページのページテーブル12内エン
トリのモディファイビットMの状態を示し、ビットMN
A。
35 is a TLB for performing address translation from a virtual address to a real address at high speed. TLB35 is TL
It consists of two sets, B35A and 35B, and is information on concatenation of a part of the segment number SN of the virtual address held in the MAR32, for example, the lower bits, and a part of the page number PN, for example, the lower bits (a part of the SN is (lower)
indexed by TLB35 (TLB35A within
35B) each entry (TLB entry) has address translation information consisting of control sections C8, SN", PN', RPA, and fields of P and LEVEL. The control section C8 has bit V'
, bit M', bit VNA, bit VNB, bit M
NA, and bit MNB. Bit V- indicates the validity/invalidity of the corresponding TLB entry, and bit VN
A, VNB is the TLB entry (TLB55A,
35B entry) is valid/invalid. The bit M' indicates the state of the modify bit M of the entry in the page table 12 of the corresponding page, and the bit MN
A.

MNBは、対応するページの次のページのページテーブ
ル12内エントリのモディファイビットMの状態を示す
。SN−は、セグメン1〜番@SNの残りビット(上位
ビット)に対応し、PN−は、ページ番号PNの残りビ
ットに対応する。また、例えばTLB35Bの各エント
リは、参照ピッl−Rを有している。ビットRは、T 
L B55A、 35Bの該当エントリのいずれが(即
ち、T L B 35のA11ll当エントリ、B側該
当エントリのどちらが)最も昔に参照されたかを示す。
MNB indicates the state of the modify bit M of the entry in the page table 12 of the page next to the corresponding page. SN- corresponds to the remaining bits (higher bits) of segment 1 to number @SN, and PN- corresponds to the remaining bits of page number PN. Further, for example, each entry of the TLB 35B has a reference pin l-R. Bit R is T
It shows which of the corresponding entries in LB55A and LB35B (that is, which one of the corresponding entry in A111 of TLB35 and the corresponding entry on the B side) was referenced the earliest.

36はMAR32に保持された仮想アドレスのベージ内
オフセットQffsetにより、対象メモリアクセスが
ページ境界にまたがるか否かをチェックし、その旨を示
す信号PAGEBDを出力する境界チェック回路、37
はT L B 35に対する制紳等を行なうコントロー
ル回路、38は実アドレスを保持するレジスタである。
36 is a boundary check circuit that checks whether the target memory access straddles a page boundary based on the intra-page offset Qffset of the virtual address held in the MAR 32, and outputs a signal PAGEBD indicating this; 37
is a control circuit that controls the TLB 35, and 38 is a register that holds real addresses.

コントロール回路37には、TLB35に対する索引結
果(具体的には、コントロールセクションO8,5N′
、PN′、およびP、LEVEL)、MAR32に保持
された仮想アドレスのSN、PNの上位ビット、境界チ
ェック回路3Gからの信号PAGEBD、図示せぬマイ
クロブログラム制御部からの各種メモリ制御信号が導か
れる。これらメモリ制御信号は、メモリアクセス要求を
示す信号MREQ、メモリリードを示す信号RD、メモ
リライトを示す信号WR1命令フェッチであることを示
す信号IF、およびフルワードアクセスであることを示
す信号FW等である。
The control circuit 37 includes the index result for the TLB 35 (specifically, the control section O8, 5N'
, PN', and P, LEVEL), the SN of the virtual address held in the MAR 32, the upper bits of PN, the signal PAGEBD from the boundary check circuit 3G, and various memory control signals from a microprogram control section (not shown) are guided. It will be destroyed. These memory control signals include a signal MREQ indicating a memory access request, a signal RD indicating a memory read, a signal WR indicating a memory write, a signal IF indicating an instruction fetch, and a signal FW indicating a full word access. be.

次に、この発明の一実施例の動作を説明する。Next, the operation of one embodiment of the present invention will be explained.

今、主メモリ10に対するメモリアクセスのために、M
AR32に仮想アドレスがロードされたものとする。M
 A R32にロードされた仮想アドレス中のページ内
オフセットQffsetは、境界チェック回路36に導
かれる。これにより、境界チェック回路36は、上記し
た主メモ10に対するメモリアクセスがフルワードアク
セスであるものとした場合に、ページ境界にまたがるア
クセスとなるが否かをチェックする。この例では、1ペ
ージは2KBであり、したがって0ffsetは11ビ
ツトで構成される。この場合、ハーフワード境界のフル
ワードアクセスを条件とすると、境界チェック回路36
はQffsetが16進表現r ” 7 F E ”で
あるか否かをチェックすればよい。境界チェック回路3
6は、M A R32からのQffsetに基づくチェ
ック結果を信号PAGEBDとしてコントロール回路3
7に出力する。
Now, for memory access to main memory 10, M
Assume that a virtual address has been loaded into the AR32. M
The intra-page offset Qffset in the virtual address loaded into AR 32 is directed to boundary check circuit 36. Thereby, the boundary check circuit 36 checks whether or not the access straddles a page boundary when the memory access to the main memory 10 described above is a full word access. In this example, one page is 2KB, so 0ffset consists of 11 bits. In this case, assuming fullword access on a halfword boundary, the boundary check circuit 36
What is necessary is to check whether Qffset is expressed in hexadecimal notation r"7FE". Boundary check circuit 3
6 is a control circuit 3 which uses the check result based on Qffset from the MAR 32 as a signal PAGEBD.
Output to 7.

一方、M A R32にロードされた仮想アドレス中の
セグメント番号SNの下位ビットとページ番号PNの下
位ビットとの連結情報は、TLB35に導かれる。しか
して、上記連結情報により、TLB35が索引される。
On the other hand, the concatenation information between the lower bits of the segment number SN and the lower bits of the page number PN in the virtual address loaded into the MAR 32 is led to the TLB 35. Accordingly, the TLB 35 is indexed using the above connection information.

この結果、TLB35(TLB35A、35B)から、
該当エントリの格納情報が読出される。TLB35から
の読出し情報のうち、v′。
As a result, from TLB35 (TLB35A, 35B),
The stored information of the corresponding entry is read. Among the read information from the TLB 35, v'.

M′、VNA、VNB、MNA、MNB、SN”。M′, VNA, VNB, MNA, MNB, SN”.

PN′、P、LEVEL、R(Rk一ついT1.tTL
B35Bからのみ)はコントロール回路37に導かれる
。また、コントロール回路37には、M A R32に
ロードされた仮想アドレスのSNの上位ビット(SN1
.PNの上位ビット(PN−’)、およびPSW31か
らのMODEも導かれる。コントロール回路37は、こ
れらの入力情報により、信号Miss、PRT、MOD
、NEXT:MISS。
PN', P, LEVEL, R (Rk single T1.tTL
B35B only) is led to the control circuit 37. Further, the control circuit 37 has the upper bit of SN (SN1) of the virtual address loaded into the MAR 32.
.. The upper bits of PN (PN-') and MODE from PSW 31 are also derived. The control circuit 37 outputs signals Miss, PRT, MOD based on these input information.
, NEXT: MISS.

NEXT:MODを生成する。信号Missは、TLB
35の該当エントリに(仮想アドレスから実アドレスへ
のアドレス変換のための)正しいアドレス変換情報が無
いこと、即ちミスヒツト(TLBミスヒツト)を示す。
NEXT: Generate MOD. Signal Miss is TLB
This indicates that the corresponding entry of No. 35 does not have correct address translation information (for address translation from a virtual address to a real address), that is, there is a miss (TLB miss).

信号PRTは、PSW31で示された動作モードがその
セグメントへのメモリアクセス権を持っていないこと、
即ち主記憶保護違反であることを示す。信号MODは、
ページテーブル12の該当エントリのモディファイビッ
トMがセントされていないこと(これをモディファイと
呼ぶ)を示す。信号NEXT:MISSは、今アクセス
しようとしているページの次のページに対応するTLB
エントリが正しく作られていないこと、即ち次ページミ
スヒツトを示す。そして、信号NEXT:MODは、今
アクセスしようとしているページの次のページに対応す
るページテーブルエントリのモディファイビットMがセ
ットされていないこと、即ち次ページモディファイを示
す。これらの信号の生成論理は以下の通りである。
Signal PRT indicates that the operating mode indicated by PSW31 does not have memory access rights to that segment;
In other words, this indicates a main memory protection violation. The signal MOD is
This indicates that the modify bit M of the corresponding entry in the page table 12 is not sent (this is called a modify). Signal NEXT: MISS is the TLB corresponding to the page next to the page you are currently trying to access.
Indicates that the entry was not created correctly, that is, a next page miss. The signal NEXT:MOD indicates that the modify bit M of the page table entry corresponding to the page next to the page to be accessed is not set, that is, the next page is modified. The generation logic of these signals is as follows.

■ MISS MISS=HIT HIT=HITA+HITa ITi =V+  ・(SN−−TLB+  (SN−))・ 
(PN”=TLBi  (PN−))なお、SN′、P
N−はMAR32からのSN。
■ MISS MISS=HIT HIT=HITA+HITa ITi =V+ ・(SN−−TLB+ (SN−))・
(PN”=TLBi (PN−)) In addition, SN′, P
N- is SN from MAR32.

PNの上位ピットを示し、V+ 、TLB+(SNi、
TLB+  (PN−)は、TLB35+(+−A、B
)め該当エンド!J(7)V、SN−。
Indicates the upper pit of PN, V+, TLB+(SNi,
TLB+ (PN-) is TLB35+(+-A, B
) Me applicable ending! J(7)V, SN-.

PN”をホす。したがって、HIT+  (i −A。PN". Therefore, HIT + (i - A.

B)は、TLB35iの該当エントリに正しいアドレス
変換情報が有ることを示す。このことから、HITが、
T L B 35の該当エントリのA側またはB側のい
ずれか一方に正しいアドレス変換情報が有ること、即ち
ヒツト(TLBヒツト)を示すことが理解されよう。
B) indicates that the corresponding entry in the TLB 35i has correct address translation information. From this, HIT is
It will be understood that correct address translation information exists on either the A side or the B side of the corresponding entry in TLB 35, that is, it indicates a hit (TLB hit).

■ PRT PRT =HITA・<MODE≧P、LEVELA)+HIT
s ・ (MODE≧P、LEVELe )ナオ、P、
LEVEL+  (i=A、B)は、TL335iの該
当エントリのP、LEVELを示す。
■ PRT PRT = HITA・<MODE≧P, LEVELA)+HIT
s ・ (MODE≧P, LEVELe) Nao, P,
LEVEL+ (i=A, B) indicates P and LEVEL of the corresponding entry in TL335i.

■ MOD MOD=HI TA −MA +HI TB −Msな
お、M+(i−A、B)は、TLB35iの該当エント
リのMを示す。
(1) MOD MOD=HI TA -MA +HI TB -Ms Note that M+(i-A, B) indicates M of the corresponding entry in the TLB 35i.

■ NEXT:MISS NEXT:Miss なお、VNA+ 、VNB+  (i =A、B)le
t、TLB35iの該当エンドりのVNA、VNBを示
す。
■ NEXT:MISS NEXT:Miss In addition, VNA+, VNB+ (i = A, B) le
t, shows the VNA and VNB at the corresponding end of TLB35i.

■ NEXT:MOD NEXT:MOD なお、MNA+ 、MNB+  (i=A、B)は、T
LB35iの該当エントリのMNA、MNBを示す。
■ NEXT:MOD NEXT:MOD Note that MNA+ and MNB+ (i=A, B) are T
The MNA and MNB of the corresponding entry of LB35i are shown.

上記した■〜■に示す信号は、コントロール回路37か
ら図示せぬマイクロプログラム制御部に供給され、メモ
リアクセスを行なう際に、〈マイクロプログラムにより
)予めメモリアクセスの正当性をチェックするのに用い
られる。
The signals shown in ■ to ■ above are supplied from the control circuit 37 to a microprogram control unit (not shown), and are used to check the validity of the memory access (by the microprogram) before performing memory access. .

また、この実施例では、コントロール回路37において
もメモリアクセスの正当性のチェックが行なわれる構成
となっている。これは、例えばロード(Load)命令
のように、メモリアクセスが1回しか行なわれない命令
などの場合、メモリアクセスの正当性をマイクロプロセ
ッサでチェックしていたのでは処理速度が著しく低下し
てしまうことを考慮したためである。即ち、コントロー
ル回路31は、上記した■〜■の信号、更にはマイクロ
プログラム制御部からの各種メモリ制御信号により、メ
モリアクセスの正当性をハード的にチェックする。コン
トロール回路37は、メモリアクセスの正当性が保証で
きない場合、命令実行前にファームウェアレベルでの割
込みを発生する。この場合には、ミスヒツト割込み信号
MISS:IN丁、主記憶保護違反割込み信号PRT:
INT、モディファイ割込み信号MOD : INT、
次ベージミスヒツト割込み信号NEXT:Miss:I
NT、更には次ページモディファイ割込み信号NEXT
 :MOD : INTが、以下に示す論理に従って生
成される。
Further, in this embodiment, the control circuit 37 is also configured to check the validity of memory access. For example, in the case of an instruction that accesses memory only once, such as a load instruction, if the validity of the memory access was checked by a microprocessor, the processing speed would drop significantly. This is because we took this into consideration. That is, the control circuit 31 checks the validity of the memory access in a hardware manner using the above-mentioned signals (1) to (4) as well as various memory control signals from the microprogram control section. If the correctness of memory access cannot be guaranteed, the control circuit 37 generates an interrupt at the firmware level before executing the instruction. In this case, the mishit interrupt signal MISS: IN, the main memory protection violation interrupt signal PRT:
INT, modify interrupt signal MOD: INT,
Next page miss interrupt signal NEXT:Miss:I
NT, and next page modification interrupt signal NEXT
:MOD: INT is generated according to the logic shown below.

■ Miss:INT MISS:INT −Miss−MREQ ■ PRT:IN”r PRT:INT =MISS−PRT−MREQ ■ MOD:INT MOD : INT =MISS−PRT−MOD−MREQ−WR@  N
EXT:MISS:INT NEXT:MISS: INT −MISS−PRT・ (MOD−WR)−NEXT 
:MISS−NEXT :MREQNEXT:MREQ =MREQ−PAGEBD −FW @)  NEXT:MOD:INT NEXT :MOD : INT −M I S3 ・I−’K l ・MtJLl−NE
XT:MISS−NEXT:MOD・NEXT :MR
EQ−WR 以上の■〜[株]の割込み(信号)は、上記した論理か
ら明らかなように、割込み発生の優先順位を有している
。上記の例では、■(ミスヒツト割込み)の優先度が最
も高く、以下■、■の順となり、[相](次ページモデ
ィファイ)の優先度が最も低くなっている。
■ Miss:INT MISS:INT -Miss-MREQ ■ PRT:IN”r PRT:INT =MISS-PRT-MREQ ■ MOD:INT MOD: INT =MISS-PRT-MOD-MREQ-WR@N
EXT:MISS:INT NEXT:MISS: INT -MISS-PRT・(MOD-WR)-NEXT
:MISS-NEXT :MREQNEXT:MREQ =MREQ-PAGEBD-FW @) NEXT:MOD:INT NEXT :MOD : INT -M I S3 ・I-'K l ・MtJLl-NE
XT:MISS-NEXT:MOD・NEXT:MR
EQ-WR As is clear from the above logic, the above-mentioned interrupts (signals) have a priority order of interrupt occurrence. In the above example, ■ (mishit interrupt) has the highest priority, followed by ■, ■, and [phase] (next page modification) has the lowest priority.

上記した論理により、ミスヒツトが検出された場合、〈
マイクロプログラム制御部の制御の下で)コントロール
回路37により、後述するようにTL335の該当エン
トリの入替え(リプレース)が行なわれる。また、主記
憶保護違反の場合には、ソフトウェアレベルでの割込み
が発生される。また、モディファイ(割込み)の場合、
後述するようにページテーブル12の該当エントリのモ
ディファイビットMのセットと、T L B 35の該
当エンi・りのセットなどが行なわれる。また、次ペー
ジミスヒツトの場合、ミスヒツトの場合と同様に、TL
B35の該当エントリの入替えが行なわれる。また、次
ページモディファイの場合には、モディファイ(割込み
)の場合と同様に、ページテーブル12の該当エントリ
のモディファイピッl−Mのセットが行なわれ、更にT
LB35の内容の変更が行なわれる。なお、次ページミ
°スヒット、次ページモディファイは、ページ境界にま
たがるフルワードアクセスのときに発生する可能性があ
る。
According to the above logic, if a mishit is detected,
Under the control of the microprogram control section), the control circuit 37 replaces the corresponding entry in the TL 335 as described later. Furthermore, in the case of a main memory protection violation, an interrupt is generated at the software level. Also, in the case of modify (interrupt),
As will be described later, the modification bit M of the corresponding entry in the page table 12 is set, and the corresponding entry in the TLB 35 is set. In addition, in the case of a next page mishit, the TL
The corresponding entry in B35 is replaced. In addition, in the case of next page modification, as in the case of modification (interrupt), the modification pin l-M of the corresponding entry in the page table 12 is set, and furthermore, T
The contents of LB35 are changed. Note that next page miss hits and next page modifications may occur during full word access that spans page boundaries.

ここで、TLB35の該当エントリの入替え(リプレー
ス)等、TLB35の内容を変更する場合について説明
する。なお、以下の説明では、MAR32にロードされ
た仮想アドレスを対象仮想アドレス、対象仮想アドレス
に対応するTLB35のエントリをTLB該当エントリ
と呼ぶ。また、対象仮想アドレスの直前ページに対応す
るTLBエン]・リセットをTLB直前エントリセット
、対象仮想アドレスの直後のページに対応するTLBエ
ン1〜リセットをTLB直後エントリセットと呼ぶ。
Here, a case will be described in which the contents of the TLB 35 are changed, such as replacing a corresponding entry in the TLB 35. In the following description, the virtual address loaded into the MAR 32 will be referred to as a target virtual address, and the entry in the TLB 35 corresponding to the target virtual address will be referred to as a TLB corresponding entry. Further, the TLB en] reset corresponding to the page immediately before the target virtual address is called the TLB immediately preceding entry set, and the TLB en 1 to reset corresponding to the page immediately after the target virtual address are called the TLB immediately following entry set.

(1)  メモリリード時のミスヒツトの場合メモリリ
ード時にミスヒツト(割込み)が発生した場合、マイク
ロプログラム制御部の制御により、まずセグメントテー
ブル11の該当エントリ中の主配憶保護情報P、LEV
ELが保護レジスタ33にロードされ、対応するページ
テーブル12の該当エントリ中の実ページ番号RPAが
RPAレジスタ34にロードされる。P、LEVELは
、図示せぬセグメントテーブル起点レジスタに格納され
ているセグメントテーブル起点アドレスと、仮想アドレ
スのセグメント番号SNとを用いてセグメントテーブル
11をアクセスすることにより得られる。このときペー
ジテーブル起点アドレスも得られる。また、RPAは、
上記ページテーブル起点アドレスと仮想アドレスのペー
ジ番号PNとを用いて対応するページテーブル12をア
クセスすることにより得られる。
(1) In the case of a miss during a memory read When a miss (interrupt) occurs during a memory read, the main storage protection information P, LEV in the corresponding entry of the segment table 11 is first controlled by the microprogram control unit.
EL is loaded into the protection register 33, and the real page number RPA in the corresponding entry of the corresponding page table 12 is loaded into the RPA register 34. P and LEVEL are obtained by accessing the segment table 11 using the segment table starting point address stored in a segment table starting point register (not shown) and the segment number SN of the virtual address. At this time, the page table starting point address is also obtained. In addition, RPA is
It is obtained by accessing the corresponding page table 12 using the page table starting point address and the page number PN of the virtual address.

P、LEVELおよびRPAがロードされると、マイク
ロプログラムによりTLBリプレース(リード)指令が
発行される。この指令により、TLB35A、353の
該当エントリのうち、一番台に参照された側のエントリ
、例えばTLB35A(TL335のA側)の該当エン
トリの書換えが行なわれる。このとき、A側、B側のい
ずれを書換えたか(この例ではA側)が記憶される。こ
の書換え(リプレース)にあっては、対象仮想アドレス
のSN′、PN′、保護レジスタ33からのP、LEV
EL、およびRPAレジスタ34からのRPAが、TL
B該当エントリの所定フィールドに書込まれる。また、
TLB該当エントリのビットV′がセット、ビットM′
がリセッ]・される一方、VNA。
When P, LEVEL and RPA are loaded, a TLB replace (read) command is issued by the microprogram. This command rewrites the entry of the TLB 35A (A side of the TL 335) that is referenced by the first machine among the corresponding entries of the TLBs 35A and 353, for example, the corresponding entry of the TLB 35A (A side of the TL 335). At this time, it is stored whether the A side or the B side has been rewritten (in this example, the A side). In this rewriting (replacement), SN', PN' of the target virtual address, P from the protection register 33, LEV
EL, and RPA from RPA register 34 is TL
B It is written in a predetermined field of the corresponding entry. Also,
Bit V' of the corresponding TLB entry is set, bit M'
is being reset] while the VNA is being reset.

VNB、MNA、MNBはHL!:される。ナオ、書換
え(リプレース)対象エントリを、TLB35A側、ま
たはT L B 35B側のいずれとするかは、TLB
35Bの該当エントリ中の参照ビットRに基づいて決定
される。この書換えに際し、上記参照ビットRの論理値
は反転される。
VNB, MNA, MNB are HL! : To be done. Nao, whether the entry to be rewritten (replaced) is on the TLB35A side or the TLB35B side is determined by the TLB
It is determined based on the reference bit R in the corresponding entry of 35B. During this rewriting, the logic value of the reference bit R is inverted.

上記した書換えの後、M A R32の内容が、対象仮
想アドレスより1ページ前を示すように変更され、続い
てコントロールセクション・チェンジ〈リード)指令が
発行される。この指令により、TLB直前エントリセッ
]−のコン1〜ロールセクシヨンO8が同時に変更され
る。このC8の変更内容は、TLB直前エントリセット
が、M A R32に設定された仮想アドレス(対象仮
想アドレスより1ページ前を示す仮想アドレス)に対応
するアドレス変換情報を正しく持っている(TLBヒツ
ト)か、否(TLBミス)かにより、次のように異なる
。但し、次の例は、TLBリプレース(リード1指令に
より、TLB35のA側がリプレースされた場合である
After the above-described rewriting, the contents of MAR 32 are changed to indicate one page before the target virtual address, and then a control section change (read) command is issued. By this command, CON 1 to roll section O8 of the TLB immediately preceding entry set]- are changed at the same time. The content of this change in C8 is that the TLB immediately preceding entry set correctly has address translation information corresponding to the virtual address (virtual address indicating one page before the target virtual address) set in MAR32 (TLB hit). The difference is as follows depending on whether it is a TLB miss or not (TLB miss). However, the following example is a case where the A side of the TLB 35 is replaced by a TLB replacement (read 1 command).

a)  ’TLBヒツトの場合 V:不変  VNA :セット VNB:不変(リセット) M:不変  MNA :リセット fvlNB:不変(リセット) b)  TLBミスの場合 V:不変  VNA :リセット VNB:不変 M:不変  MNA:リセット MNB:不変 TLB直前エントリセットのコントロールセクションO
8の変更が終了すると、M A R32の内容が、対象
仮想アドレスより1ページ後を示すように変更され、続
いてチェック指令が発行される。
a) 'TLB hit V: unchanged VNA: set VNB: unchanged (reset) M: unchanged MNA: reset fvlNB: unchanged (reset) b) TLB miss V: unchanged VNA: reset VNB: unchanged M: unchanged MNA :Reset MNB: Immutable TLB immediately before entry set control section O
When the change in step 8 is completed, the contents of M A R 32 are changed to indicate one page after the target virtual address, and then a check command is issued.

この指令により、TLB直後エントリセットがチェック
される。置体的には、TLBミスが或はTLBヒツトか
、更にはビットMがセットされているか否かがチェック
される。なお、TLBミスの場合には、ビットMのチェ
ックは無意味となる。
This command checks the entry set immediately after the TLB. Typically, it is checked whether there is a TLB miss or a TLB hit and whether bit M is set. Note that in the case of a TLB miss, checking bit M becomes meaningless.

このチェックにおいて、TLBヒツトが検出された場合
には、ヒツトしたTLB番号(TLB35のA側か、或
はB側か)が記憶される。
In this check, if a TLB hit is detected, the TLB number of the hit (A side or B side of the TLB 35) is stored.

TLB直後エントリセットのチェックが終了(ると、M
 A R32の内容が対象仮想アドレスに戻され、続い
てチェンジ・ネクスト(ChanoeNeXt)指令が
発行される。この指令により、前記したTLB該当エン
トリのリプレース時に保留されティたVNA、VNB、
MNA、IvlNBが、以下に示すように正しい値に設
定される。この際、チェック指令の実行により得られた
情報が利用される。
Immediately after TLB, the check of the entry set ends (then, M
The contents of AR32 are returned to the target virtual address, followed by a Change Next (ChanoeNeXt) command. With this command, the VNA, VNB, and
MNA, IvlNB are set to the correct values as shown below. At this time, information obtained by executing the check command is used.

a) チェック指令でTLBヒツト〈但しB側とする)
検出の場合 a′、)  ビットMはリセットしていたvNA:リセ
ット vNB:セット MNA :リセット MNB:リセットa−2)  ビ
ットMはセットしていたVNA :リセット VNB 
:セットMNA :リセット MNB :セットb) 
チェック指令でTLBミス検出の場合VNA :リセッ
ト VNB :リセットMNA :リセット MNB 
:リセット(2メモリライト時のミスヒツトの場合メモ
リライト時にミスヒツト(割込み)が発生した場合のT
LBIIJtllの手順は、前記(1)でのTLBリプ
レース(リード)指令の代りにTLBリプレース〈ライ
ト)指令が、コントロールセクション・チェンジ(リー
ド)指令の代りにコントロールセクション・チェンジ〈
ライト)指令が適用されること、そしてページテーブル
12の対応するエントリのモディファイビットMがセッ
トされることを除き、メモリリード時と同様である。こ
の場合、TLB該当エントリ、T L B直前エントリ
セットのコントロールセクションC8は、以下の通りと
なる。
a) TLB hit with check command (However, on B side)
In the case of detection a',) Bit M was reset vNA: Reset vNB: Set MNA: Reset MNB: Reset a-2) Bit M was set VNA: Reset VNB
:Set MNA :Reset MNB :Set b)
If a TLB error is detected with a check command, VNA: Reset VNB: Reset MNA: Reset MNB
: Reset (2 If there is a miss during memory write) T if a miss (interrupt) occurs during memory write
The LBIIJtll procedure is such that the TLB replace (write) command is used instead of the TLB replace (read) command in (1) above, and the control section change command is used instead of the control section change (read) command.
This is the same as when reading the memory, except that a write command is applied and the modify bit M of the corresponding entry in the page table 12 is set. In this case, the control section C8 of the TLB corresponding entry and the TLB immediately preceding entry set is as follows.

a)TLB該当エントリ V:セット  VNA : H VNB:H M:セット  MNA ニス MNB : H X:メモリリード時と同様に設定 されることを示す b)  TLB直前エントリセット 但し、A側がリプレースされた場合 b′、)  TLBヒツトの場合 ■:不変  VNA :セット VNB:不変(リセット) M:不変  MNANヤニト・ MNB:不変(リセット) b−2)  TLBミスの場合 V:不変  VNA :リセット VNB :不変 M:不変  MNA :リセット MNB:不変 (3)  メモリライト時のモ′ディフフイ割込みメモ
リライト時にモディファイ割込みが発生すると、まずペ
ージテーブル12の該当エントリのモディファイビット
Mがセットされる。次に、MAR32に対象仮想アドレ
スがセットされ、続いてセット・モディファイ指令が発
行される。この指令により、TLBi当エントリ(この
例では、■[835のA側の対応するエントリであるも
のとする)のビットMがセットされる。次に、M A 
R32の内容が、対象仮想アドレスより1ページ前を示
すように変更され、続いてコントロールセクション・チ
ェンジ(モディファイ)指令が発行される。この指令に
より、TLB直前エントリセットのコントロールセクシ
ョンC8が変更される。このC8の変更内容は、TLB
直前エントリセットが、MA R32に設定された仮想
アドレス(対象仮想アト−へ レスより1ページ前を示す仮想アドレス)に対応するア
ドレス変換情報を正しく持っている(TLBヒツト)か
、否(TLBミス)かにより、次のように異なる。但し
、次の例は、セット・モディファイ指令により、T L
 B 35のA側の対応するエントリ中のビットMがセ
ットされた場合である。
a) TLB corresponding entry V: set VNA: H VNB: HM: set MNA varnish MNB: H b',) In the case of TLB hit ■: Unchanged VNA: Set VNB: Unchanged (reset) M: Unchanged MNAN Yanito MNB: Unchanged (reset) b-2) In the case of TLB miss V: Unchanged VNA: Reset VNB: Unchanged M : Unchanged MNA : Reset MNB : Unchanged (3) Modify interrupt during memory write When a modify interrupt occurs during memory write, the modify bit M of the corresponding entry in the page table 12 is first set. Next, the target virtual address is set in the MAR 32, and then a set/modify command is issued. This command sets the bit M of the corresponding entry in TLBi (in this example, it is assumed to be the corresponding entry on the A side of ■[835). Next, M.A.
The contents of R32 are changed to indicate one page before the target virtual address, and then a control section change (modify) command is issued. This command changes the control section C8 of the TLB immediately preceding entry set. The contents of this C8 change are TLB
Check whether the previous entry set correctly has address translation information (TLB hit) corresponding to the virtual address set in MA R32 (virtual address indicating one page before the target virtual address) or not (TLB miss). ), it differs as follows. However, in the following example, T L
This is the case when bit M in the corresponding entry on the A side of B 35 is set.

a)  TLBヒツトの場合 V:不変  VNA :不変(セット)VNB:不変 M:不変  MNA :セット M N B :不変 b)  TLBミスの場合 V:不変  VNA :不変(リセット)VNB :不
変 M:不変  MNA :不変(リセツ)〜)MNB :
不変 この場合、TLB直後エンi・リセットの内容により、
TLB該当エントリのコントロールセクションC8が影
響されることはない。
a) In case of TLB hit V: Unchanged VNA: Unchanged (Set) VNB: Unchanged M: Unchanged MNA: Set M N B: Unchanged b) In case of TLB miss V: Unchanged VNA: Unchanged (Reset) VNB: Unchanged M: Unchanged MNA: Unchanged ~) MNB:
Unchanged In this case, depending on the contents of the en-i reset immediately after TLB,
The control section C8 of the corresponding TLB entry is not affected.

上記したTLBilllllによれば、TLB35の各
エントリのコントロールセクションC8には、対応する
ページは勿論、次ページに対する最新の情報も正しく設
定される。例えば、成る仮想アドレスによるメモリリー
ド時にミスヒツト(割込み)が発生した場合、TLB該
当エントリがリプレースされる。この際、V、Mが一義
的に正しい値に設定されるだけでなく、(TLB直後エ
ンドリセットをチェックすることにより)VNA、VN
B。
According to TLBillll described above, in the control section C8 of each entry in the TLB 35, not only the corresponding page but also the latest information for the next page is correctly set. For example, if a miss (interruption) occurs during a memory read using a virtual address, the corresponding TLB entry is replaced. At this time, not only are V and M set to uniquely correct values, but also VNA and VN are set (by checking the end reset immediately after TLB).
B.

MNA、MNBが、TLB直後エントリセットの状態を
正しく反映するように変更される。このとき、TLB該
当エントリのリプレースに伴い、TLB直前Iント’J
セット(DVNA、VNB、MNA、MNBも、TLB
該当エントリの状態を反映するように変更される。
MNA and MNB are changed to correctly reflect the state of the entry set immediately after the TLB. At this time, due to the replacement of the corresponding TLB entry, the TLB immediately preceding INT'J
Set (DVNA, VNB, MNA, MNB, TLB
It will be changed to reflect the state of the corresponding entry.

また、上記メモリリードがページ境界にまたがるフルワ
ードアクセスである場合であって、いずれのページにつ
いてもTLB該当エントリにアドレス変換情報が正しく
格納されていない場合には、次のようにしてTLBエン
トリの変更が行なわれる。この場合、割込みの優先順位
から明らかなように、ミスヒツト扱いとなり、先頭ペー
ジのTLB該当エントリのリプレース(O8の変更を含
む)と、そのTLB直前エントリセットのC8(VNA
、VNB、MNA、MNB)の変更とが行なわれる。そ
して、再び上記したフルワードアクセスを実行しようと
すると、今度は次ページミスヒツト扱いとなる。この場
合には、次のページのTLB該当エントリのリプレース
(C3の変更を含む)と、そのTLB直前エントリセッ
ト、即ち先頭ページのTLB該当エントリのC8(VN
A、VNB、MNA、MNB)の変更とが行なわれる。
In addition, if the above memory read is a full word access that spans page boundaries, and address translation information is not stored correctly in the TLB entry for any page, the TLB entry can be changed as follows. Changes are made. In this case, as is clear from the interrupt priority order, it is treated as a miss, and the corresponding TLB entry on the first page is replaced (including changing O8), and the entry set immediately before that TLB is replaced with C8 (VNA
, VNB, MNA, MNB) are changed. If an attempt is made to perform the full word access described above again, this time it will be treated as a next page miss. In this case, it is necessary to replace the corresponding TLB entry on the next page (including changing C3) and the entry set immediately before that TLB, that is, C8 (VN
A, VNB, MNA, MNB) are changed.

この結果、先頭ページに対応するTLB該当エントリに
は、同エントリおよびTLB直後エントリビットのいず
れにも、正しいアドレス変換情報が格納されていること
を示す情報が設定さ・れる。
As a result, in the TLB corresponding entry corresponding to the first page, information indicating that correct address translation information is stored is set in both the entry and the TLB immediate entry bit.

また、メモリリード時のミスヒツトによりTLB該当エ
ントリのリプレースが行なわれたページに、メモリライ
トアクセスを行なう場合、(もし主記憶保護違反が発生
しなければ)モディファイ割込みが発生し、TLB該当
エントリのピッl−Mだけがセットされる。このとき、
TLB直前エントリセッ1〜のO8(中のMN i )
が、TLB該当エントリの状態を反映するように変更さ
れる。また、ページテーブル12の対応エントリのモデ
ィフアイビットMもセットされる。もし、モディファイ
割込みを適用せずに、ページテーブル12のモディファ
イビットMに対するセット動作回数を減少させたい場合
には、モディファイ(割込み)、次ページモディファイ
(割込み)に相当する状態もミスヒツト(割込み)、次
ページミスヒツト(割込み)扱いとすればよい。但し、
この場合には、TLBエントリのリプレースが伴うため
、セグメントテーブル11およびページテーブル12へ
のアクセスが必要となることから、前記した方式に比べ
効率は低下する。
In addition, when a memory write access is performed to a page where the corresponding TLB entry has been replaced due to a mishit during a memory read, a modify interrupt is generated (if a main memory protection violation does not occur), and the corresponding TLB entry is replaced. Only l-M are set. At this time,
O8 of TLB immediately preceding entry set 1~ (MN i inside)
is changed to reflect the state of the corresponding TLB entry. Additionally, the modify bit M of the corresponding entry in the page table 12 is also set. If you want to reduce the number of set operations for the modify bit M of the page table 12 without applying a modify interrupt, the state corresponding to modify (interrupt) and next page modify (interrupt) can also be changed to miss (interrupt), It may be treated as a next page miss (interrupt). however,
In this case, replacement of the TLB entry is involved, and access to the segment table 11 and page table 12 is required, resulting in lower efficiency compared to the above-described method.

なお、前記実施例では、主記憶保護情報P、 LEVE
Lが1種類である場合について説明したが、これに限る
ものではない。例えば、主記憶保護の効率化のために、
リード保護用、ライト保護用、命令実行保護用の3種類
の主記憶保護情報が用意されている場合にも、同様に実
施できる。この場合、主記憶保護違反の検出は、メモリ
アクセスの種類に対応する主記憶保護情報を用いて行な
われる。
In the above embodiment, the main memory protection information P, LEVE
Although the case where there is one type of L has been described, the present invention is not limited to this. For example, to improve the efficiency of main memory protection,
The same method can be implemented even when three types of main memory protection information are prepared: read protection, write protection, and instruction execution protection. In this case, main memory protection violation is detected using main memory protection information corresponding to the type of memory access.

[発明の効果] 以上詳述したようにこの発明によれば、次に列挙する作
用効果を奏することができる。
[Effects of the Invention] As described in detail above, according to the present invention, the following effects can be achieved.

■ TLBの各エントリに、該当ページは勿論、次ペー
ジに対する最新の制御情報が正しく設定されるので、た
とえページ境界をまたぐメモリアクセスの場合でも、先
頭ページに対応するTLBエントリのチェックだけでこ
の種メモリアクセスの正当性が保証でき、したがってl
l!l理速度の向上が図れる。
■ Since the latest control information for not only the relevant page but also the next page is correctly set in each TLB entry, even in the case of memory access that crosses page boundaries, this type of control information can be solved by simply checking the TLB entry corresponding to the first page. The correctness of memory access can be guaranteed, so l
l! The processing speed can be improved.

■ 対応するページが書換えられたか否かを示すモディ
ファイビットをページテーブルエントリに用意する方式
を採用する場合、たとえ2ページにまたがるメモリアク
セスのときでも、同モディファイピットの状態を簡単に
把握でき、ページテーブルエントリのモディファイビッ
トのセット回数の減少が図れる。
■ When adopting a method of preparing a modify bit in a page table entry that indicates whether the corresponding page has been rewritten, the state of the modify bit can be easily grasped even when memory access spans two pages. The number of times the modify bit of a table entry is set can be reduced.

■ ページテーブルエントリのモディファイビットの把
握が簡単に行なえる方式を採用する場合において、前回
リードアクセスされたページに対するメモリライト時に
は、対応するTLBエントリの入替えを不要とすること
ができる。
(2) In the case of adopting a method in which the modify bit of a page table entry can be easily grasped, it is possible to eliminate the need to replace the corresponding TLB entry when memory is written to a page that was previously read accessed.

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

図面はこの発明の一実施例に係る仮想記憶制御方式の計
算機のの要部の構成を示すブロック図である。 10・・・主メモリ、11・・・セグメントテーブル、
12・・・ページテーブル、35・・・TLB、36・
・・境界チェック回路、37・・・コントロール回路。
The drawing is a block diagram showing the configuration of a main part of a computer using a virtual storage control method according to an embodiment of the present invention. 10... Main memory, 11... Segment table,
12...Page table, 35...TLB, 36.
... Boundary check circuit, 37... Control circuit.

Claims (3)

【特許請求の範囲】[Claims] (1)仮想記憶制御方式の計算機において、各TLBエ
ントリに、同エントリの有効/無効を示すビットV′、
同エントリで示されるページの次のページに対応するT
LBエントリの有効/無効を示すビットVNi(i=1
、・・・n、nは1以上の整数)、およびアドレス変換
情報のフィールドを含むTLBと、メモリアクセスに際
し、対象仮想アドレス、同対象仮想アドレスに対応する
上記TLBエントリの上記ビットV′、VNi、および
アドレス変換情報の所定フィールドにより、同エントリ
に正しいアドレス変換情報が格納されているか否か、お
よび同エントリで示されるページの次のページに対応す
る上記TLBエントリに正しいアドレス変換情報が格納
されているか否かを検出する第1検出手段と、1つのメ
モリアクセスが2ページにまたがるか否かを検出する第
2検出手段と、上記第1および第2検出手段の検出結果
に応じて上記TLBの対応エントリの入替えを行なう入
替え手段と、この入替え手段によるTLBエントリの入
替え時に、入替え対象TLBエントリの上記ビットV′
をセットする手段と、同入替え対象TLBエントリで示
されるページの直前ページに対応する上記TLBエント
リのビットVNiを変更する手段と、同入替え対象TL
Bエントリで示されるページの直後ページに対応する上
記TLBエントリをチェックし、そのチェック結果に応
じて上記入替え対象TLBエントリのビットVNiの値
を設定する手段とを具備することを特徴とするTLB制
御方式。
(1) In a computer using a virtual memory control method, each TLB entry has a bit V' indicating whether the entry is valid or invalid;
T corresponding to the page following the page indicated by the same entry
Bit VNi (i=1
, ... n, n is an integer greater than or equal to 1), and a TLB including a field of address translation information, a target virtual address, and the bits V' and VNi of the TLB entry corresponding to the target virtual address upon memory access. , and a predetermined field of address translation information, it is determined whether correct address translation information is stored in the same entry, and whether correct address translation information is stored in the TLB entry corresponding to the page next to the page indicated by the same entry. a first detection means for detecting whether one memory access spans two pages; a second detection means for detecting whether one memory access spans two pages; a replacement means for replacing the corresponding entries; and when the replacement means replaces the TLB entries, the above-mentioned bit V' of the TLB entry to be replaced is
means for setting the bit VNi of the TLB entry corresponding to the page immediately before the page indicated by the TLB entry to be replaced;
A TLB control characterized by comprising means for checking the TLB entry corresponding to the page immediately after the page indicated by the B entry and setting the value of the bit VNi of the TLB entry to be replaced according to the check result. method.
(2)各ページテーブルエントリに、対応するページが
書換られたか否かを示すモディファイビット、および実
ページ番号のフィールドを有するページテーブルを備え
た仮想記憶制御方式の計算機において、各TLBエント
リに、同エントリの有効/無効を示すビットV′、同エ
ントリで示されるページの次のページに対応するTLB
エントリの有効/無効を示すビットVNi(i=1、・
・・n)nは1以上の整数)、同エントリで示されるペ
ージに対応する上記ページテーブルエントリのモディフ
ァイビットの状態を示すビットM′、同エントリで示さ
れるページの次のページに対応する上記ページテーブル
エントリのモディファイビットの状態を示すビットMN
i、およびアドレス変換情報のフィールドを含むTLB
と、メモリアクセスに際し、対象仮想アドレス、同対象
仮想アドレスに対応する上記TLBエントリの上記ビッ
トV′、VNi、およびアドレス変換情報の所定フィー
ルドにより、同エントリに正しいアドレス変換情報が格
納されているか否か、同エントリで示されるページの次
のページに対応する上記TLBエントリに正しいアドレ
ス変換情報が格納されているか否か、同エントリで示さ
れるページに対応する上記ページテーブルエントリの上
記モディファイビットの状態、および同エントリで示さ
れるページの次のページに対応する上記ページテーブル
エントリの上記モディファイビットの状態を検出する第
1検出手段と、1つのメモリアクセスが2ページにまた
がるか否かを検出する第2検出手段と、上記第1および
第2検出手段の検出結果に応じて上記TLBの対応エン
トリの入替えを行なう入替え手段と、この入替え手段に
よるTLBエントリの入替え時に、入替え対象TLBエ
ントリの上記ビットV′をセットすると共にメモリリー
ド/ライトに応じて上記ビットM′をリセット/セット
する手段と、同入替え対象TLBエントリで示されるペ
ージの直前ページに対応する上記TLBエントリのビッ
トVNi、MNiをメモリリード/ライトに応じて変更
する手段と、同入替え対象TLBエントリで示されるペ
ージの直後ページに対応する上記TLBエントリをチェ
ックし、そのチェック結果に応じて上記入替え対象TL
BエントリのビットVNi、MNiの値を設定する手段
とを具備することを特徴とするTLB制御方式。
(2) In a computer with a virtual memory control system, which has a page table in which each page table entry has a modify bit indicating whether the corresponding page has been rewritten and a field for the real page number, each TLB entry has the same Bit V' indicating validity/invalidity of entry, TLB corresponding to the page following the page indicated by the same entry
Bit VNi (i=1, ・
...n) n is an integer greater than or equal to 1), bit M' indicating the state of the modify bit of the above page table entry corresponding to the page indicated by the same entry, the above corresponding to the page next to the page indicated by the same entry. Bit MN indicating the state of the modify bit of the page table entry
i, and a TLB containing a field of address translation information.
At the time of memory access, it is determined whether correct address translation information is stored in the entry based on the target virtual address, the bits V′ and VNi of the TLB entry corresponding to the target virtual address, and a predetermined field of address translation information. whether correct address translation information is stored in the TLB entry corresponding to the page following the page indicated by the same entry, and the state of the modify bit of the page table entry corresponding to the page indicated by the same entry. , a first detection means for detecting the state of the modify bit of the page table entry corresponding to the page next to the page indicated by the same entry, and a first detection means for detecting whether one memory access spans two pages. 2 detection means; a replacement means for replacing the corresponding entries of the TLB according to the detection results of the first and second detection means; and when the replacement means replaces the TLB entries, the bit V of the TLB entry to be replaced is detected. ' and reset/set the bit M' in response to memory read/write, and memory read bits VNi and MNi of the TLB entry corresponding to the page immediately before the page indicated by the TLB entry to be replaced. / Checks the above TLB entry corresponding to the page immediately after the page indicated by the same replacement target TLB entry, and changes the above replacement target TL according to the check result.
A TLB control method comprising means for setting values of bits VNi and MNi of a B entry.
(3)各ページテーブルエントリに、対応するページが
書換られたか否かを示すモディファイビット、および実
ページ番号のフィールドを有するページテーブルを備え
た仮想記憶制御方式の計算機において、各TLBエント
リに、同エントリの有効/無効を示すビットV′、同エ
ントリで示されるページの次のページに対応するTLB
エントリの有効/無効を示すビットVNi(i=1、・
・・n、nは1以上の整数)、同エントリで示されるペ
ージに対応する上記ページテーブルエントリのモディフ
ァイビットの状態を示すビットM′、同エントリで示さ
れるページの次のページに対応する上記ページテーブル
エントリのモディファイビットの状態を示すビットMN
i、およびアドレス変換情報のフィールドを含むTLB
と、メモリアクセスに際し、対象仮想アドレス、同対象
仮想アドレスに対応する上記TLBエントリの上記ビッ
トV′、VNi、M′、MNi、およびアドレス変換情
報の所定フィールドにより、同エントリに正しいアドレ
ス変換情報が格納されているか否か、同エントリで示さ
れるページの次のページに対応する上記TLBエントリ
に正しいアドレス変換情報が格納されているか否か、同
エントリで示されるページに対応する上記ページテーブ
ルエントリの上記モディファイビットの状態、および同
エントリで示されるページの次のページに対応する上記
ページテーブルエントリの上記モディファイビットの状
態を検出する第1検出手段と、1つのメモリアクセスが
2ページにまたがるか否かを検出する第2検出手段と、
上記第1および第2検出手段の検出結果に応じて上記T
LBの対応エントリの入替えを行なう入替え手段と、こ
の入替え手段によるTLBエントリの入替え時に、入替
え対象TLBエントリの上記ビットV′をセットすると
共にメモリリード/ライトに応じて上記ビットM′をリ
セット/セットする手段と、同入替え対象TLBエント
リで示されるページの直前ページに対応する上記TLB
エントリのビットVNi、MNiをメモリリード/ライ
トに応じて変更する手段と、同入替え対象TLBエント
リで示されるページの直後ページに対応する上記TLB
エントリをチェックし、そのチェック結果に応じて上記
入替え対象TLBエントリのビットVNi、MNiの値
を設定する手段と、上記第1および第2検出手段の検出
結果に応じて上記TLBの対応エントリのビットM′の
みをセットする手段と、この手段によるビットM′セッ
ト対象TLBエントリで示されるページの直前ページに
対応する上記TLBエントリのビットMNiを変更する
手段とを具備することを特徴とするTLB制御方式。
(3) In a computer with a virtual memory control system, which has a page table in which each page table entry has a modify bit indicating whether the corresponding page has been rewritten and a field for the real page number, each TLB entry has the same Bit V' indicating validity/invalidity of entry, TLB corresponding to the page following the page indicated by the same entry
Bit VNi (i=1, ・
...n, n is an integer greater than or equal to 1), bit M' indicating the state of the modify bit of the above page table entry corresponding to the page indicated by the same entry, and bit M' indicating the state of the modify bit of the above page table entry corresponding to the page indicated by the same entry, the above corresponding to the page next to the page indicated by the same entry. Bit MN indicating the state of the modify bit of the page table entry
i, and a TLB containing a field of address translation information.
When accessing the memory, correct address translation information is stored in the entry using the target virtual address, the bits V', VNi, M', MNi of the TLB entry corresponding to the target virtual address, and a predetermined field of address translation information. Whether correct address translation information is stored in the above TLB entry corresponding to the page following the page indicated by the same entry, and whether the above page table entry corresponding to the page indicated by the same entry is stored. a first detection means for detecting the state of the modify bit and the state of the modify bit of the page table entry corresponding to the page next to the page indicated by the same entry; and whether one memory access spans two pages. a second detection means for detecting whether the
The above T according to the detection results of the first and second detecting means.
Swapping means for swapping corresponding entries of LB, and when the swapping means swaps TLB entries, sets the bit V' of the TLB entry to be swapped, and resets/sets the bit M' in response to memory read/write. and the TLB corresponding to the page immediately before the page indicated by the TLB entry to be replaced.
Means for changing bits VNi and MNi of an entry according to memory read/write, and the TLB corresponding to the page immediately after the page indicated by the TLB entry to be replaced.
means for checking the entry and setting the values of bits VNi and MNi of the TLB entry to be replaced according to the check result, and bits of the corresponding entry of the TLB according to the detection results of the first and second detection means. TLB control characterized by comprising means for setting only M', and means for changing bit MNi of the TLB entry corresponding to the page immediately before the page indicated by the TLB entry to which bit M' is set by this means. method.
JP59135907A 1984-06-30 1984-06-30 Tlb control system Granted JPS6115250A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP59135907A JPS6115250A (en) 1984-06-30 1984-06-30 Tlb control system
US06/749,866 US4731740A (en) 1984-06-30 1985-06-28 Translation lookaside buffer control system in computer or virtual memory control scheme

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59135907A JPS6115250A (en) 1984-06-30 1984-06-30 Tlb control system

Publications (2)

Publication Number Publication Date
JPS6115250A true JPS6115250A (en) 1986-01-23
JPH024017B2 JPH024017B2 (en) 1990-01-25

Family

ID=15162614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59135907A Granted JPS6115250A (en) 1984-06-30 1984-06-30 Tlb control system

Country Status (1)

Country Link
JP (1) JPS6115250A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63132355A (en) * 1986-06-18 1988-06-04 フランス国 Memory controller

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58139387A (en) * 1982-02-12 1983-08-18 Hitachi Ltd Address converting system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58139387A (en) * 1982-02-12 1983-08-18 Hitachi Ltd Address converting system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63132355A (en) * 1986-06-18 1988-06-04 フランス国 Memory controller

Also Published As

Publication number Publication date
JPH024017B2 (en) 1990-01-25

Similar Documents

Publication Publication Date Title
US6321314B1 (en) Method and apparatus for restricting memory access
EP2862089B1 (en) Compare and replace dat table entry
JP3740195B2 (en) Data processing device
JP3713312B2 (en) Data processing device
US6523104B2 (en) Mechanism for programmable modification of memory mapping granularity
EP2862059B1 (en) Local clearing control
US4731740A (en) Translation lookaside buffer control system in computer or virtual memory control scheme
JP6314212B2 (en) Page table data management
US5265227A (en) Parallel protection checking in an address translation look-aside buffer
JP4295111B2 (en) Memory management system and memory access security grant method based on linear address
JPS6184756A (en) Memory access controller
AU2004218704A1 (en) Lazy flushing of translation lookaside buffers
JPS63502224A (en) Paged storage management unit that can selectively support multiple address spaces
US4961135A (en) Translation lookaside buffer control system
JP2001034537A (en) Address converting circuit
JP2001222470A (en) Translation look aside buffer circuit
JPH05257811A (en) Memory controller
US5440708A (en) Microprocessor and storage management system having said microprocessor
KR20230101826A (en) Techniques for restricting access to memory using capabilities
JP2007280421A (en) Data processor
US6324635B1 (en) Method and apparatus for address paging emulation
JPS6115250A (en) Tlb control system
KR100611305B1 (en) Method and apparatus for address mapping
JPH024016B2 (en)
JP2005108262A (en) Data processor