JPH0546483A - Virtual address conversion system - Google Patents

Virtual address conversion system

Info

Publication number
JPH0546483A
JPH0546483A JP3204244A JP20424491A JPH0546483A JP H0546483 A JPH0546483 A JP H0546483A JP 3204244 A JP3204244 A JP 3204244A JP 20424491 A JP20424491 A JP 20424491A JP H0546483 A JPH0546483 A JP H0546483A
Authority
JP
Japan
Prior art keywords
address
page
page size
virtual
real
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
JP3204244A
Other languages
Japanese (ja)
Inventor
Tetsuro Ono
哲朗 大野
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 JP3204244A priority Critical patent/JPH0546483A/en
Publication of JPH0546483A publication Critical patent/JPH0546483A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1027Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/65Details of virtual memory and virtual address translation
    • G06F2212/652Page size control

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To manage the limited memory resource with proper page size and to realize good memory access protection. CONSTITUTION:Page size information (PGS) (g) and (l) is registered in each entry of TLBs 17 and 18. Based on the page size information (PGS) (g) and (l), the page size allocated for each page is shown. At the address conversion from the virtual address to the real address, the page size information (PGS) (g) and (l) is read out from the TLBs 17 and 18, whether or not an offset address (RAD)c of the conversion objective virtual address is included in the size shown by the page size information (PGS) (g) and (l) is checked. In the case the offset address (RAD)c exceeds the page size, an error is detected and the value of the converted real address is judged to be invalid.

Description

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

【0001】[0001]

【産業上の利用分野】この発明はコンピュータシステム
上で仮想アドレスをページング方式によって実アドレス
に変換する仮想アドレス変換方式に関し、特に高信頼性
が要求される高速リアルタイムシステムに適した仮想ア
ドレス変換方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a virtual address conversion method for converting a virtual address into a real address by a paging method on a computer system, and more particularly to a virtual address conversion method suitable for a high-speed real-time system requiring high reliability. ..

【0002】[0002]

【従来の技術】一般に、電子計算機システムにおいて
は、主記憶装置上の実記憶容量の上限を意識せずにプロ
グラムを作成できるように、主記憶装置の実アドレス空
間よりも大きな仮想アドレス空間を実現する仮想記憶方
式が用いられている。しかし、仮想記憶方式では、実行
するタスクの切り替え時に主記憶と2次記憶との間でデ
ータの置き換えをしなければならないので、タスクの切
り替えは比較的大きなオーバーヘッドとなる。このた
め、従来、特に動作の高速性が要求されるリアルタイム
システムにおいては、仮想記憶方式はほとんど採用され
ていなかった。
2. Description of the Related Art Generally, in a computer system, a virtual address space larger than the real address space of the main memory is realized so that a program can be created without being aware of the upper limit of the real memory capacity on the main memory. A virtual memory method is used. However, in the virtual memory system, since the data must be replaced between the main memory and the secondary memory when the task to be executed is switched, the task switching becomes a relatively large overhead. For this reason, the virtual memory system has heretofore been scarcely adopted, especially in a real-time system that requires high-speed operation.

【0003】ところが、高速性だけでなく高信頼性が要
求されるリアルタイムシステムについては、仮想記憶方
式を採用することは充分に意義がある。なぜなら、仮想
記憶方式では、カーネルや各タスク間でのメモリアクセ
ス保護をハードウェアによって容易に支援できるからで
ある。
However, for a real-time system that requires not only high speed but also high reliability, it is sufficiently significant to adopt the virtual memory system. This is because the virtual memory system can easily support memory access protection between the kernel and each task by hardware.

【0004】仮想記憶にも種々の方式があるが、高速リ
アルタイム処理の実行に十分適用でるようなな効率の良
いタスク切り替えを行うためには、ページング方式で、
且つCPU内部にアドレス変換テーブルバッファ(TL
B)を備えた仮想記憶システムが好ましい。というの
は、TLBを用いたページング方式の仮想記憶方式は、
アドレス変換が比較的単純なので、高速性が期待でき、
且つコスト的にも有利であるためである。
There are various methods for virtual memory, but in order to perform efficient task switching that is sufficiently applicable to the execution of high-speed real-time processing, the paging method is used.
In addition, the address translation table buffer (TL
A virtual memory system with B) is preferred. This is because the paging-based virtual memory system using TLB is
Since the address translation is relatively simple, you can expect high speed,
This is also advantageous in terms of cost.

【0005】このような仮想記憶方式をリアルタイムシ
ステムで用いる場合には、通常の仮想記憶システムと異
なり、基本的にはスワップアウト、スワップインのペー
ジ置き換えによるオーバーヘッドを無くすために、全て
のコード、データを主記憶上に常駐しておくことが必要
となる。また、TLBのミスヒットも出切るだけ発生し
ないようにすることが望ましい。
When such a virtual memory system is used in a real-time system, unlike a normal virtual memory system, basically, in order to eliminate the overhead of swap-out and swap-in page replacement, all codes and data are eliminated. Must be resident in the main memory. Further, it is desirable to prevent the occurrence of TLB mishits.

【0006】つまり、リアルタイムシステムにおいて
は、仮想記憶システムは、実アドレス空間よりも大きな
仮想アドレス空間を実現するためというよりは、むし
ろ、主記憶に対するメモリアクセス保護機構として使用
されることになる。
That is, in the real-time system, the virtual memory system is used as a memory access protection mechanism for the main memory, rather than realizing a virtual address space larger than the real address space.

【0007】ところが、従来のページング方式では、各
ページのページサイズは固定であり、可変できたとして
も、それは、全てのページについて一律に共通のページ
サイズを選択するだけである。このため、このような固
定サイズのページング方式では、限られた記憶容量の主
記憶上に、全てのコードとデータをマッピングし、それ
らを、適切に保護することは困難である。
However, in the conventional paging system, the page size of each page is fixed, and even if the page size can be varied, it is only necessary to uniformly select a common page size for all pages. Therefore, in such a fixed-size paging method, it is difficult to map all the codes and data on the main memory having a limited storage capacity and appropriately protect them.

【0008】一般に、ページサイズを小さくすると、主
記憶を適切に管理できるが、ページ数が増加するので、
TLBに全てのエリトリが入り切らず、そのため、TL
Bのミスヒットが頻繁に発生するようになる。また、逆
に、ページサイズを大きくすると、エントリ数は少なく
できるが、今度は、ページ内に無駄な領域が発生し易く
なり、主記憶を有効利用できなくなってしまう。
Generally, when the page size is reduced, the main memory can be properly managed, but since the number of pages increases,
Not all ELITORI fit into TLB, so TL
B's miss hits will occur frequently. On the contrary, if the page size is increased, the number of entries can be reduced, but this time, a wasteful area is likely to occur in the page and the main memory cannot be effectively used.

【0009】そうかといって、可変長サイズを利用でき
るセグメント方式では、アドレス変換が複雑になり、コ
スト的に引き合わない。また、メモリ割り当ての処理も
複雑化される。
On the other hand, in the segment system in which the variable length size can be used, the address conversion becomes complicated and the cost cannot be paid for. Also, the memory allocation process is complicated.

【0010】そこで、各ページ毎に任意のページサイズ
を割り当てるページング方式が要求される。しかし、こ
のように任意のページサイズを割り当てると、ページ内
オフセットアドレスが可変長となるので、従来のよう
に、単に、TLBに登録された実ページアドレスとその
ページ内オフセットアドレスとを加算して実アドレスを
生成するアドレス変換方式では、その変換された実アド
レスの値が仮想ページアドレスで指定されるページのペ
ージサイズを越えてしまう場合がある。
Therefore, a paging method for allocating an arbitrary page size for each page is required. However, when an arbitrary page size is allocated in this way, the in-page offset address has a variable length. Therefore, simply adding the actual page address registered in the TLB and the in-page offset address as in the conventional case. In the address translation method of generating a real address, the value of the translated real address may exceed the page size of the page specified by the virtual page address.

【0011】この場合、主記憶上の本来アクセスすべき
ページではなく、次のページに誤ってアクセスされると
いう不具合が生じ、十分なメモリアクセス保護を実現で
きなくなってしまう。
In this case, the next page is mistakenly accessed instead of the page originally to be accessed on the main memory, and sufficient memory access protection cannot be realized.

【0012】[0012]

【発明が解決しようとする課題】従来では、限られたメ
モリ資源を有効に利用できず、高速性、高信頼性が要求
されるシステムに適用することは困難であった。
In the past, it was difficult to apply limited memory resources effectively, and it was difficult to apply them to a system that requires high speed and high reliability.

【0013】この発明はこのような点に鑑みてなされた
もので、ページサイズを各ページ毎に設定した際にペー
ジサイズを越える主記憶アクセスを禁止できるようにし
て、限られたメモリ資源を適切なページサイズで管理し
え、しかも十分なメモリアクセス保護を実現することが
できる仮想アドレス変換方式を提供することを目的とす
る。
The present invention has been made in view of the above circumstances, and when the page size is set for each page, main memory access exceeding the page size can be prohibited, and the limited memory resources can be appropriately used. It is an object of the present invention to provide a virtual address translation method that can be managed with various page sizes and can realize sufficient memory access protection.

【0014】[0014]

【課題を解決するための手段および作用】この発明は、
仮想ページアドレスとオフセットアドレスから成る仮想
アドレスをページング方式で実アドレスに変換する仮想
アドレス変換方式において、ページ毎に設けられた複数
のエリトリを有し、各エントリ内に、仮想ページアドレ
スと実ページアドレスとの対応を示す情報、およびその
ページのページサイズを示すページサイズ情報が登録さ
れたアドレス変換テーブルと、前記アドレス変換テーブ
ルを参照して変換対象の仮想アドレスの仮想ページアド
レスに対応する実ページアドレスを求め、その実ページ
アドレスに前記オフセットアドレスを加えて実アドレス
を生成する手段と、前記アドレス変換テーブルを参照し
て前記変換対象の仮想アドレスの仮想ページアドレスに
対応する前記ページサイズ情報を求め、このページサイ
ズ情報で示されるサイズ内に前記変換対象の仮想アドレ
スのオフセットアドレスが含まれるか否かによって前記
実アドレスの有効性の有無を判断する手段とを具備し、
ページサイズを各ページ毎に設定し、ページサイズを越
える主記憶アクセスを禁止することを特徴とする。
Means and Actions for Solving the Problems
In a virtual address translation method that translates a virtual address consisting of a virtual page address and an offset address into a real address by the paging method, it has multiple elites provided for each page, and each entry has a virtual page address and a real page address. And an address translation table in which page size information indicating the page size of the page is registered, and a real page address corresponding to the virtual page address of the virtual address to be translated by referring to the address translation table. Means for generating the real address by adding the offset address to the real page address, and the page size information corresponding to the virtual page address of the virtual address to be translated by referring to the address translation table, Indicated by page size information And means for determining whether the validity of the real address depending on whether include offset address of the virtual address of the conversion target in size,
The page size is set for each page, and main memory access exceeding the page size is prohibited.

【0015】この仮想アドレス変換方式においては、ア
ドレス変換テーブルの各エントリに、ページサイズ情報
が登録されており、このページサイズ情報によって各ペ
ージ毎に割り当てられたページサイズが示される。仮想
アドレスから実アドレスへのアドレス変換時には、その
ページサイズ情報がアドレス変換テーブルから読み出さ
れ、そのページサイズ情報で示されるサイズ内に、変換
対象仮想アドレスのオフセットアドレスが含まれるか否
かが調べられる。オフセットアドレスがページサイズを
越えた場合には、エラー検出され、変換された実アドレ
スの値が無効と判断される。このため、ページサイズを
各ページ毎に予め割り当てておくことによって、任意の
ページサイズのページングによるアドレス変換を正常に
実行できる。したがって、限られたメモリ資源を適切な
ページサイズで管理することが可能となる。
In this virtual address translation method, page size information is registered in each entry of the address translation table, and the page size assigned to each page is indicated by this page size information. At the time of address translation from virtual address to real address, the page size information is read from the address translation table, and it is checked whether the offset address of the translation target virtual address is included in the size indicated by the page size information. Be done. If the offset address exceeds the page size, an error is detected and the converted real address value is judged to be invalid. Therefore, by assigning the page size to each page in advance, the address conversion by paging of an arbitrary page size can be normally executed. Therefore, it is possible to manage the limited memory resource with an appropriate page size.

【0016】[0016]

【実施例】以下、図面を参照してこの発明の実施例を説
明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0017】図1はこの発明の一実施例に関わる仮想ア
ドレス変換方式を実現するためのシステム構成が示され
ている。このシステムは、2ウェイーセットアソシアテ
ィブ構成のTLBを用いてアドレス変換を行うページン
グ方式のアドレス変換システムであり、ここでは、仮想
アドレスを32ビット、TLBの各エントリのサイズを
64ビット、ページサイズは256、512、1K、2
K、4K、8Kバイトの内の任意のサイズがページ毎に
設定される場合の構成を示している。
FIG. 1 shows a system configuration for realizing a virtual address conversion system according to an embodiment of the present invention. This system is a paging type address translation system that performs address translation using a 2-way set associative TLB. Here, the virtual address is 32 bits, the size of each TLB entry is 64 bits, and the page size is 256, 512, 1K, 2
It shows a configuration in which an arbitrary size among K, 4K, and 8K bytes is set for each page.

【0018】このシステムは、仮想アドレスレジスタ1
1、カレントタスクレジスタ(TID)12、ページサ
イズエラー検出器13、セレクタ14、マージ回路1
5、エラー制御ユニット16、セット“0”のアドレス
変換テーブルバッファ(TLB)17、セット“1”の
アドレス変換テーブルバッファ(TLB)18、比較器
19,20,21,22、ANDゲートアレイ23、5
入力ORゲート24、デコーダ25から構成されてい
る。
This system has a virtual address register 1
1, current task register (TID) 12, page size error detector 13, selector 14, merge circuit 1
5, error control unit 16, address translation table buffer (TLB) 17 of set “0”, address translation table buffer (TLB) 18 of set “1”, comparators 19, 20, 21, 22 and AND gate array 23, 5
It is composed of an input OR gate 24 and a decoder 25.

【0019】仮想アドレスレジスタ11には、19ビッ
トの仮想ページアドレスと13ビットのページ内オフセ
ットアドレスとから成る32ビットの仮想アドレスが設
定される。19ビットの仮想ページアドレスは、14ビ
ットのバーチャルタグ(VSN)aと5ビットのTLB
セレクト(VPG)bとから構成されている。
In the virtual address register 11, a 32-bit virtual address consisting of a 19-bit virtual page address and a 13-bit in-page offset address is set. The 19-bit virtual page address is a 14-bit virtual tag (VSN) a and a 5-bit TLB.
Select (VPG) b.

【0020】セット“0”のTLB17は、5ビットの
TLBセレクト(VPG)bによってアドレッシングさ
れたバッファメモリであり、TLBセレクト(VPG)
bによって指定される複数のエントリを有している。各
エントリには、8ビットのタスクID情報(TID)e
と、14ビットの仮想アドレスタグ(VSN)fと、3
ビットのページサイズ情報(PGS)gと、24ビット
の実ページアドレス(PAD)hと、15ビットのメモ
リアクセス制御ビット情報(PRO)iとが登録されて
いる。
The TLB 17 of the set "0" is a buffer memory addressed by a 5-bit TLB select (VPG) b, and is a TLB select (VPG).
It has a plurality of entries designated by b. Each entry has 8-bit task ID information (TID) e
, A 14-bit virtual address tag (VSN) f, and 3
The page size information (PGS) g of bits, the real page address (PAD) h of 24 bits, and the memory access control bit information (PRO) i of 15 bits are registered.

【0021】セット“1”のTLB18は、TLB17
と同じく、5ビットのTLBセレクト(VPG)bによ
ってアドレッシングされたバッファメモリであり、TL
Bセレクト(VPG)bによって指定される複数のエン
トリを有している。各エントリには、8ビットのタスク
ID情報(TID)jと、14ビットの仮想アドレスタ
グ(VSN)kと、3ビットのページサイズ情報(PG
S)lと、24ビットの実ページアドレス(PAD)m
と、15ビットのメモリアクセス制御ビット情報(PR
O)nとが登録されている。
The TLB 18 of the set "1" is the TLB 17
Is a buffer memory addressed by a 5-bit TLB select (VPG) b.
It has a plurality of entries designated by B select (VPG) b. Each entry has 8-bit task ID information (TID) j, 14-bit virtual address tag (VSN) k, and 3-bit page size information (PG
S) l and 24-bit real page address (PAD) m
And 15-bit memory access control bit information (PR
O) n are registered.

【0022】ここで、3ビットのページサイズ情報(P
GS)g,lの各々は、8Kバイト、4Kバイト、2K
バイト、1Kバイト、512バイト、および256バイ
トの6種類のページサイズのうちの1つを示している。
すなわち、ページサイズは各ページ毎に設定されてお
り、その設定されたページサイズがページサイズ情報
(PGS)で認識できるように構成されている。また、
TLB17,18の内容と主記憶上の実アドレス空間と
の対応は、例えば図2のようになっている。
Here, 3-bit page size information (P
GS) g and l are each 8K bytes, 4K bytes, 2K
One of six page sizes of 1 byte, 512 bytes, and 256 bytes is shown.
That is, the page size is set for each page, and the set page size can be recognized by the page size information (PGS). Also,
The correspondence between the contents of the TLBs 17 and 18 and the real address space on the main memory is, for example, as shown in FIG.

【0023】図2に示されているように、主記憶上には
リアルタイムシステムのデータ処理の実行に必要なジョ
ブ1〜ジョブnの全てのコード,データが記憶され、ま
た各ページ毎にページサイズが割り当てられている。こ
こでは、ジョブ1の第1ページP−1のページサイズが
2Kバイト、第2ページP−2のページサイズが4Kバ
イト、第3ページP−3のページサイズが8Kバイト、
そして、第2nページのページサイズが2Kバイトであ
る場合を想定している。
As shown in FIG. 2, all codes and data of jobs 1 to n necessary for executing data processing of the real-time system are stored in the main memory, and the page size for each page is stored. Has been assigned. Here, the page size of the first page P-1 of job 1 is 2 Kbytes, the page size of the second page P-2 is 4 Kbytes, the page size of the third page P-3 is 8 Kbytes,
Then, it is assumed that the page size of the 2n-th page is 2 Kbytes.

【0024】この場合、TLB17,18には、実行対
象ジョブ(カレントタスク)、例えばジョブ1の全ての
ページに対応する情報が登録されており、例えば、第1
ページP−1に対応するTLB17の第1エントリに
は、第1ページP−1の仮想ページアドレス、実ページ
アドレス、さらに、そのページサイズ(2Kバイト)を
示す情報が登録され、また、第2ページP−2に対応す
るTLB18の第1エントリには、第2ページP−2の
仮想ページアドレス、実ページアドレス、さらに、その
ページサイズ(4バイト)を示す情報が登録される。
In this case, information corresponding to all pages of the job to be executed (current task), eg, job 1, is registered in the TLBs 17 and 18, for example, the first
In the first entry of the TLB 17 corresponding to the page P-1, the virtual page address of the first page P-1, the real page address, and information indicating the page size (2 Kbytes) are registered. In the first entry of the TLB 18 corresponding to page P-2, the virtual page address of the second page P-2, the real page address, and information indicating the page size (4 bytes) are registered.

【0025】図1のセレクタ14は、TLB17から読
み出されたページサイズ情報(PGS)g,実ページア
ドレス(PAD)hと、TLB18から読み出されたペ
ージサイズ情報(PGS)l,実ページアドレス(PA
D)mとを入力し、いずれか一方のTLBからのページ
サイズ情報(PGS),実ページアドレス(PAD)を
選択する。
The selector 14 of FIG. 1 has the page size information (PGS) g and the real page address (PAD) h read from the TLB 17, and the page size information (PGS) 1 and the real page address read from the TLB 18. (PA
D) m is input, and page size information (PGS) and real page address (PAD) from one of the TLBs are selected.

【0026】このセレクタ14による選択動作は、比較
19〜22による比較結果に基づいてコントローラ16
によって制御される。すなわち、TLB17,18双方
のカレントタスクID情報(TID)e,jおよび仮想
アドレスタグ(VSN)f,kは、比較器19,21,
および20,22によって、カレントタスクレジスタ1
2に設定されているカレントタスクID情報(TID)
dおよび仮想アドレスレジスタ11に設定された仮想ア
ドレスタグ(VSN)aとそれぞれ比較され、一致する
カレントタスクID情報(TID)と仮想アドレスタグ
(VSN)がセレクタ14によって選択される。
The selection operation by the selector 14 is performed by the controller 16 based on the comparison result by the comparisons 19 to 22.
Controlled by. That is, the current task ID information (TID) e, j and the virtual address tags (VSN) f, k of both the TLBs 17 and 18 are compared with the comparators 19 and 21,
And 20, 22, depending on the current task register 1
Current task ID information (TID) set to 2
d and the virtual address tag (VSN) a set in the virtual address register 11 are respectively compared, and the matching current task ID information (TID) and virtual address tag (VSN) are selected by the selector 14.

【0027】ページサイズエラー検出器13は、セレク
タ14によって選択されたページサイズ情報(PGS)
Oで示されるサイズ内にページ内オフセットアドレス
(RAD)cが属すか否かを調べ、オフセットアドレス
(RAD)cがページサイズをオーバしている場合にエ
ラー出力rを発生するものであり、ANDゲートアレイ
23、ORゲート24、およびデコーダ25から構成さ
れている。
The page size error detector 13 has page size information (PGS) selected by the selector 14.
It is checked whether or not the in-page offset address (RAD) c belongs to the size indicated by O, and an error output r is generated when the offset address (RAD) c exceeds the page size. It is composed of a gate array 23, an OR gate 24, and a decoder 25.

【0028】デコーダ25は、ページサイズ情報(PG
S)Oで指定されるページサイズに応じてページサイズ
オーバー検出用の5ビットのマスクデータを発生する。
この5ビットのマスクデータの一例を図3に示す。
The decoder 25 uses the page size information (PG
S) 5-bit mask data for page size over detection is generated according to the page size designated by O.
An example of this 5-bit mask data is shown in FIG.

【0029】図3に示されているように、マスクデータ
は、ページサイズが256バイトの時は“11111”
となり、ページサイズが512バイトの時は“1111
0”となり、ページサイズが1Kバイトの時は“111
00”となり、ページサイズが2Kバイトの時は“11
000”となり、ページサイズが4Kバイトの時は“1
0000”となり、ページサイズが8Kバイトの時は
“00000”となる。
As shown in FIG. 3, the mask data is "11111" when the page size is 256 bytes.
And when the page size is 512 bytes, "1111"
When the page size is 1 Kbyte, it becomes "111".
00 "and" 11 "when the page size is 2 Kbytes
000 "and" 1 "when the page size is 4 Kbytes
0000 ", and" 0000 "when the page size is 8 Kbytes.

【0030】ANDゲートアレイ23は、デコーダ25
からの5ビットのマスクデータvとページ内オフセット
アドレスcの上位5ビットのデータuを入力し、対応す
るビットの論理積をとって、5ビットの論理積出力xを
発生する。この論理積出力xは、ページ内オフセットア
ドレスcの上位5ビットのデータuをページサイズに対
応するマスクデータvでマスクしたものであり、ページ
内オフセットアドレスcが指定されたページサイズを越
える場合には、論理積出力xの5ビットのいずれかが
“1”となる。ORゲート24は、論理積出力xの5ビ
ットを入力し、それら5ビットの論理和をページサイズ
エラー出力rとして発生する。この場合、“1”のペー
ジサイズエラー出力rが、ページサイズエラーの発生を
示す。
The AND gate array 23 includes a decoder 25.
The 5-bit mask data v and the upper 5-bit data u of the in-page offset address c are input, and the corresponding bits are ANDed to generate a 5-bit AND output x. This logical product output x is obtained by masking the upper 5-bit data u of the in-page offset address c with the mask data v corresponding to the page size, and when the in-page offset address c exceeds the specified page size. , Any one of the 5 bits of the logical product output x becomes "1". The OR gate 24 inputs 5 bits of the logical product output x and generates a logical sum of these 5 bits as a page size error output r. In this case, the page size error output r of "1" indicates that a page size error has occurred.

【0031】マージ回路15は、セレクタ14によって
選択された24ビットの実ページアドレスpに13ビッ
トのページ内オフセットアドレスcを加えて、32ビッ
トの実アドレスqを生成する。この場合、ページ内オフ
セットアドレスcは、24ビットの実ページアドレスp
の下位ビットと一部重複した状態で、下位ビット側に加
えられる。
The merge circuit 15 adds a 13-bit in-page offset address c to the 24-bit real page address p selected by the selector 14 to generate a 32-bit real address q. In this case, the in-page offset address c is the 24-bit real page address p.
Is added to the low-order bit side in a state of overlapping with the low-order bit of.

【0032】エラー制御ユニット16は、アドレス変換
時のエラー発生を検出するためのものであり、主記憶に
対するメモリアクセス保護のために、メモリアクセス制
御ビット情報(PRO)i,nに基づいて実ページアド
レス(PAD)h,mの有効/無効や、リード/ライト
それぞれについての許可/禁止を判断する。
The error control unit 16 is for detecting the occurrence of an error at the time of address translation, and in order to protect the memory access to the main memory, the real page is based on the memory access control bit information (PRO) i, n. It is determined whether the addresses (PAD) h and m are valid / invalid and whether read / write is permitted / prohibited.

【0033】また、エラー制御ユニット16は、ページ
サイズエラー検出器13からのページサイズエラー出力
rを入力し、それが“1”の時は、実アドレスqを無効
であると認識して、主記憶アクセスを禁止するために、
メモリアクセス保護エラー出力tを発生する。
Further, the error control unit 16 inputs the page size error output r from the page size error detector 13, and when it is "1", it recognizes that the real address q is invalid. In order to prohibit memory access,
A memory access protection error output t is generated.

【0034】さらに、エラー制御ユニット16は、比較
器19〜22の比較結果によってTLB17,18にお
けるミスヒットを検出すると、TLB17,18の内容
更新を指示するために、TLBミス出力sを発生する。
次に、図1のシステムのアドレス変換動作を説明する。
Further, when the error control unit 16 detects a mishit in the TLBs 17 and 18 based on the comparison result of the comparators 19 to 22, it outputs a TLB miss output s to instruct the contents update of the TLBs 17 and 18.
Next, the address translation operation of the system of FIG. 1 will be described.

【0035】まず、仮想アドレスレジスタ11のTLB
セレクト情報bによってTLB17,18のエントリが
一緒に選択される。その指定されたエントリにおけるバ
ーチャルタグ(VSN)f,kがTLB17,18から
読み出され、比較器20,22によってそれぞれ仮想ア
ドレスレジスタ11のバーチャルタグ(VSN)aと比
較される。
First, the TLB of the virtual address register 11
The entries of TLBs 17 and 18 are selected together by the select information b. The virtual tags (VSN) f and k in the designated entry are read from the TLBs 17 and 18, and are compared with the virtual tags (VSN) a of the virtual address register 11 by the comparators 20 and 22, respectively.

【0036】また、指定されたエントリにおけるカレン
トタスクID情報(TID)e,jがTLB17,18
から読み出され、比較器19,21によってそれぞれカ
レントレジスタ12のカレントタスクID情報(TI
D)dと比較される。
The current task ID information (TID) e, j in the designated entry is the TLB 17,18.
Read from the current task ID information (TI) of the current register 12 by the comparators 19 and 21, respectively.
D) Compared with d.

【0037】そして、TLB17,18のうちで、バー
チャルタグ(VSN)aとカレントタスクID情報(T
ID)dの双方にそれぞれ一致するバーチャルタグおよ
びカレントタスクID情報を有するエントリが選択さ
れ、セレクタ14からは、その選択されたTLBのエン
トリに対応する実ページアドレス(PAD)およびペー
ジサイズ情報(PGS)がそれぞれ出力p,oとして出
力される。
Of the TLBs 17 and 18, the virtual tag (VSN) a and the current task ID information (T
The entry having the virtual tag and the current task ID information that respectively match both ID) d is selected, and the selector 14 selects the real page address (PAD) and page size information (PGS) corresponding to the entry of the selected TLB. ) Are output as outputs p and o, respectively.

【0038】そして、ページサイズエラー検出器13で
は、ページサイズ情報oに対応する5ビットのマスクデ
ータvが発生され、そのマスクデータvはページ内オフ
セットアドレスcの上位5ビットuとビット毎にAND
が取られ、その5ビットのAND出力をORすることで
ページサイズエラーの有無が検出される。
Then, the page size error detector 13 generates 5-bit mask data v corresponding to the page size information o, and the mask data v is ANDed bit by bit with the upper 5 bits u of the in-page offset address c.
Is taken, and the presence or absence of a page size error is detected by ORing the 5-bit AND output.

【0039】ページサイズエラーが発生した場合には、
エラー制御ユニット16は、実アドレスqを無効である
と認識して、主記憶アクセスを禁止するために、メモリ
アクセス保護エラー出力tを発生する。また、ページサ
イズエラーが発生しなくても、メモリアクセス制御ビッ
ト情報(PRO)が有効でない場合には、エラー制御ユ
ニット16は、同じく、メモリアクセス保護エラー出力
tを発生する。
When a page size error occurs,
The error control unit 16 recognizes that the real address q is invalid and generates a memory access protection error output t in order to prohibit main memory access. Further, even if the page size error does not occur, if the memory access control bit information (PRO) is not valid, the error control unit 16 similarly generates the memory access protection error output t.

【0040】以上のように、この実施例においては、T
LB17,18の各エントリに、ページサイズ情報(P
GS)g,lが登録されており、このページサイズ情報
(PGS)g,lによって各ページ毎に割り当てられた
ページサイズが示される。仮想アドレスから実アドレス
へのアドレス変換時には、そのページサイズ情報(PG
S)g,lがTLB17,18から読み出され、そのペ
ージサイズ情報(PGS)g,lで示されるサイズ内
に、変換対象仮想アドレスのオフセットアドレス(RA
D)cが含まれるか否かが調べられる。オフセットアド
レス(RAD)cがページサイズを越えた場合には、エ
ラー検出され、変換された実アドレスの値が無効と判断
される。このため、ページサイズを各ページ毎に予め割
り当てておくことによって、任意のページサイズのペー
ジングによるアドレス変換を正常に実行できる。したが
って、限られたメモリ資源を適切なページサイズで管理
することが可能となり、特に、高速性、高信頼性が要求
されるリアルタイムシステムに好適となる。
As described above, in this embodiment, T
In each entry of LBs 17 and 18, page size information (P
GS) g, l is registered, and the page size assigned to each page is indicated by this page size information (PGS) g, l. When translating an address from a virtual address to a real address, the page size information (PG
S) g, l is read from the TLBs 17,18, and within the size indicated by the page size information (PGS) g, l, the offset address (RA
D) It is checked whether c is included. When the offset address (RAD) c exceeds the page size, an error is detected and it is determined that the converted real address value is invalid. Therefore, by assigning a page size to each page in advance, address translation by paging of an arbitrary page size can be normally executed. Therefore, it becomes possible to manage the limited memory resources with an appropriate page size, which is particularly suitable for a real-time system that requires high speed and high reliability.

【0041】[0041]

【発明の効果】以上のように、この発明によれば、ペー
ジサイズを各ページ毎に設定した際にページサイズを越
える主記憶アクセスを禁止できるようになり、限られた
メモリ資源を適切なページサイズで管理しえ、しかも十
分なメモリアクセス保護を実現することができる。
As described above, according to the present invention, when the page size is set for each page, the main memory access exceeding the page size can be prohibited, and the limited memory resource can be used for the appropriate page. It can be managed by size, and sufficient memory access protection can be realized.

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

【図1】この発明の一実施例に係わる仮想アドレス変換
方式を実現するためのシステム構成を示すブロック図。
FIG. 1 is a block diagram showing a system configuration for realizing a virtual address conversion system according to an embodiment of the present invention.

【図2】同実施例の仮想アドレス変換方式におけるTL
Bの内容と主記憶上の実アドレス空間との対応を示す
図。
FIG. 2 is a TL in the virtual address translation system of the same embodiment.
The figure which shows the correspondence of the content of B and the real address space on a main memory.

【図3】同実施例の仮想アドレス変換方式で用いられる
ページサイズエラー検出用のマスクデータパターンを示
す図。
FIG. 3 is a view showing a mask data pattern for detecting a page size error used in the virtual address conversion system of the embodiment.

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

11…仮想アドレスレジスタ、13…ページサイズエラ
ー検出器、17,18…TLB、g,l…ページサイズ
情報。
11 ... Virtual address register, 13 ... Page size error detector, 17, 18 ... TLB, g, l ... Page size information.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 仮想ページアドレスとオフセットアドレ
スから成る仮想アドレスをページング方式で実アドレス
に変換する仮想アドレス変換方式において、 ページ毎に設けられた複数のエリトリを有し、各エント
リ内に、仮想ページアドレスと実ページアドレスとの対
応を示す情報、およびそのページのページサイズを示す
ページサイズ情報が登録されたアドレス変換テーブル
と、 前記アドレス変換テーブルを参照して変換対象の仮想ア
ドレスの仮想ページアドレスに対応する実ページアドレ
スを求め、その実ページアドレスに前記オフセットアド
レスを加えて実アドレスを生成する手段と、 前記アドレス変換テーブルを参照して前記変換対象の仮
想アドレスの仮想ページアドレスに対応する前記ページ
サイズ情報を求め、このページサイズ情報で示されるサ
イズ内に前記変換対象の仮想アドレスのオフセットアド
レスが含まれるか否かによって前記実アドレスの有効性
の有無を判断する手段とを具備し、 ページサイズを各ページ毎に設定し、ページサイズを越
えるアクセスを禁止することを特徴とする仮想アドレス
変換方式。
1. In a virtual address translation method for translating a virtual address composed of a virtual page address and an offset address into a real address by a paging method, a virtual page is provided in each entry, and each entry has a virtual page. Information indicating the correspondence between the address and the real page address, and the address conversion table in which the page size information indicating the page size of the page is registered, and referring to the address conversion table, the virtual page address of the virtual address to be converted is set. Means for obtaining a corresponding real page address, adding the offset address to the real page address to generate a real address, and referring to the address translation table, the page size corresponding to the virtual page address of the virtual address to be translated Seeking information, this page size And a means for determining whether or not the real address is valid depending on whether or not the offset address of the virtual address to be translated is included in the size indicated by the information, and the page size is set for each page, A virtual address translation method that prohibits access exceeding the page size.
JP3204244A 1991-08-14 1991-08-14 Virtual address conversion system Pending JPH0546483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3204244A JPH0546483A (en) 1991-08-14 1991-08-14 Virtual address conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3204244A JPH0546483A (en) 1991-08-14 1991-08-14 Virtual address conversion system

Publications (1)

Publication Number Publication Date
JPH0546483A true JPH0546483A (en) 1993-02-26

Family

ID=16487243

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3204244A Pending JPH0546483A (en) 1991-08-14 1991-08-14 Virtual address conversion system

Country Status (1)

Country Link
JP (1) JPH0546483A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008155848A1 (en) * 2007-06-20 2010-08-26 富士通株式会社 Computer, TLB control method, and TLB control program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2008155848A1 (en) * 2007-06-20 2010-08-26 富士通株式会社 Computer, TLB control method, and TLB control program
US8190853B2 (en) 2007-06-20 2012-05-29 Fujitsu Limited Calculator and TLB control method
JP4998554B2 (en) * 2007-06-20 2012-08-15 富士通株式会社 Arithmetic processing apparatus, information processing apparatus, and control method for arithmetic processing apparatus

Similar Documents

Publication Publication Date Title
US6088780A (en) Page table walker that uses at least one of a default page size and a page size selected for a virtual address space to position a sliding field in a virtual address
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
US5584014A (en) Apparatus and method to preserve data in a set associative memory device
EP0797149B1 (en) Architecture and method for sharing tlb entries
US5574877A (en) TLB with two physical pages per virtual tag
US4985828A (en) Method and apparatus for generating a real address multiple virtual address spaces of a storage
US5628023A (en) Virtual storage computer system having methods and apparatus for providing token-controlled access to protected pages of memory via a token-accessible view
US6189074B1 (en) Mechanism for storing system level attributes in a translation lookaside buffer
CA1226372A (en) Address translation control system
EP0492859A2 (en) Translation lookaside buffer
EP0506236A1 (en) Address translation mechanism
JPH04319747A (en) Address converting mechanism
JP3454854B2 (en) Memory management device and method
EP0410740B1 (en) A virtual storage address space access control system and method
JPH0895864A (en) Address converting device
US4984150A (en) Virtual memory control management system
JPH0546483A (en) Virtual address conversion system
JPH03235144A (en) Cache memory controller
EP0533190B1 (en) Data processing system with address translation function for different page sizes
WO1988002148A1 (en) A transparent translation method and apparatus for use in a memory management unit
JPS623354A (en) Cache memory access system
JP3456727B2 (en) Data processing device
KR0184475B1 (en) Cache memory access circuit
JPH06124237A (en) Address translation buffer device
JPS5953633B2 (en) computer system