JPH0421047A - Address converter - Google Patents

Address converter

Info

Publication number
JPH0421047A
JPH0421047A JP2121333A JP12133390A JPH0421047A JP H0421047 A JPH0421047 A JP H0421047A JP 2121333 A JP2121333 A JP 2121333A JP 12133390 A JP12133390 A JP 12133390A JP H0421047 A JPH0421047 A JP H0421047A
Authority
JP
Japan
Prior art keywords
address
logical
section
relative
storage means
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
JP2121333A
Other languages
Japanese (ja)
Inventor
Koshi Yamada
孔司 山田
Masahiro Uminaga
正博 海永
Nobuo Hiuga
日向 伸夫
Toru Nojiri
徹 野尻
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.)
Hitachi Ltd
Hitachi Keiyo Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Keiyo Engineering 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 Hitachi Ltd, Hitachi Keiyo Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP2121333A priority Critical patent/JPH0421047A/en
Publication of JPH0421047A publication Critical patent/JPH0421047A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve the transplantability at the time of transplanting an operating system for operating on a processor whose address width is small to a processor whose address width is large by providing a base address, and setting the contents of an address conversion table as a relative address. CONSTITUTION:The entry contents of a conversion table corresponding to at least a logical address subordinate part are set as a relative address, and a middle stage table relative address storage means 102 and a base address storage means 103 are provided. Accordingly, an address conversion table structure in a processor of small address width, and an address conversion table structure of a middle stage table and thereafter shown by the middle stage table relative address storage means 102 in a processor of large address width, that is, an address conversion table structure of the part corresponding to an address space of the processor of small address width become the same. In such a way, transplantability at the time of transplanting an operating system for operating on the processor of small address width to the processor of large address width is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、計算機システムのアドレス変換装置に関する
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an address translation device for a computer system.

〔従来の技術〕[Conventional technology]

仮想記憶機能を有する計算機システムの利用者は、シス
テムに実装されている主メモリよりも多くのメモリが備
わっているかのように計算機を扱うことができる。この
ようなシステムでは、利用者プログラムの必要に応じて
動的にメモリの割当てが行われ、そのメモリには利用者
プログラムが扱うアドレスである論理アドレスが割り振
られる。
A user of a computer system having a virtual memory function can treat the computer as if it had more memory than the main memory installed in the system. In such a system, memory is dynamically allocated according to the needs of a user program, and a logical address, which is an address handled by the user program, is allocated to the memory.

そのため、計算機システムは論理アドレスを、実装され
ている主メモリの物理アドレスに変換する必要がある。
Therefore, the computer system needs to convert the logical address into a physical address of the installed main memory.

アドレス変換装置とは、こういった論理アドレスを物理
アドレスに変換する装置である。すなわち、アドレス変
換装置の入力は論理アドレスであ一す、出力は物理アド
レスである。
An address translation device is a device that translates such a logical address into a physical address. That is, the input of the address translation device is a logical address, and the output is a physical address.

ここでは、32ビツトプロセツサのアドレス変換装置を
例に、従来のアドレス変換装置を説明する。従来のアド
レス変換装置では、論理アドレスを第8図に示すように
分割する。第8図において、311はセクションインデ
ックス、312はページインデックス、313はオフセ
ットである。これらセクションインデックス311.ペ
ージインデックス312は、アドレス変換の過程におい
て、各テーブルを参照するためのインデックスとじて利
用される。オフセット313は、アドレス変換の最終過
程において、物理アドレスを決定するためのオフセット
として利用される。セクションインデックス311は1
0ビツト、ページインデックス312とオフセット31
3は11ビツトとする。
Here, a conventional address translation device will be explained using an address translation device for a 32-bit processor as an example. In a conventional address translation device, a logical address is divided as shown in FIG. In FIG. 8, 311 is a section index, 312 is a page index, and 313 is an offset. These section indexes 311. The page index 312 is used as an index to refer to each table in the process of address translation. The offset 313 is used as an offset for determining the physical address in the final process of address translation. Section index 311 is 1
0 bit, page index 312 and offset 31
3 is 11 bits.

次に、アドレス変換の概念を第6図に示す。第6図にお
いて、601は第1段の変換テーブルの絶対アドレスを
記憶する第1段テーブル絶対アドレスレジスタ、114
はセクションテーブル、115はページテーブル、10
4は主メモリである。
Next, the concept of address translation is shown in FIG. In FIG. 6, reference numeral 601 denotes a first-stage table absolute address register 114 that stores the absolute address of the first-stage conversion table.
is the section table, 115 is the page table, 10
4 is the main memory.

仮想記憶機能を有する計算機システムでは、主メモリを
ページと呼ぶ固定長のブロックに分割し、複数個のペー
ジが集まってセクションを構成する。
In a computer system having a virtual memory function, main memory is divided into fixed-length blocks called pages, and a plurality of pages collectively constitute a section.

ページテーブル115の各エントリはページの先頭アド
レスを記憶し、セクションテーブル114の各エントリ
はページテーブル115の先頭アドレスを記憶する。第
1段テーブル絶対アドレスレジスタ601.セクション
テーブル114エントリおよびページテーブル115エ
ントリの各内容は絶対アドレスであり、各エントリのサ
イズは全て32ビツトとする。
Each entry of the page table 115 stores the start address of a page, and each entry of the section table 114 stores the start address of the page table 115. First stage table absolute address register 601. The contents of each section table 114 entry and page table 115 entry are absolute addresses, and the size of each entry is all 32 bits.

アドレス変換は、第7図に示す手順で行われる。Address translation is performed according to the procedure shown in FIG.

最初に、第1段テーブル絶対アドレスレジスタ601と
セクションインデックス311を加算して、入力の論理
アドレスに対応するセクションテーブル114エントリ
のアドレスを求める(ステップ7o1)。次に、求めた
セクションテーブル114エントリの内容とページイン
デックス312を加算して、ページテーブル115エン
トリのアドレスを求める(ステップ702)。最後に、
求めたページテーブル115エントリの内容とオフセッ
ト313を加算し、目的の物理アドレスを求める(ステ
ップ703)。
First, the first stage table absolute address register 601 and the section index 311 are added to obtain the address of the section table 114 entry corresponding to the input logical address (step 7o1). Next, the address of the page table 115 entry is obtained by adding the obtained contents of the section table 114 entry and the page index 312 (step 702). lastly,
The content of the obtained page table 115 entry and the offset 313 are added to obtain the target physical address (step 703).

このように、従来のアドレス変換装置は、論理アドレス
を複数のフィールドに分割し、その分割数に応じた段数
のアドレス変換テーブルを備えている。そして、論理ア
ドレスの各フィールドを変換テーブルのインデックスと
して、多段階のアドレス変換テーブルを検索し、論理ア
ドレスを物理アドレスに変換する。
In this way, the conventional address translation device divides a logical address into a plurality of fields and includes an address translation table with a number of stages corresponding to the number of fields. Then, a multi-stage address translation table is searched using each field of the logical address as an index of the translation table, and the logical address is translated into a physical address.

なお、従来のアドレス変換装置については、例えば“H
32/2QQオペレーションアーキテクチャマニュアル
”第4章において述べられている。
Regarding the conventional address translation device, for example, “H
32/2QQ Operational Architecture Manual, Chapter 4.

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

従来のアドレス変換装置では、アドレス幅が異なるプロ
セッサ間のアドレス変換テーブル構造は大きく異なるた
め、これによって、オペレーティングシステムの移植性
が低下するという問題点があった。
In conventional address translation devices, the structure of address translation tables between processors with different address widths differs greatly, which poses a problem in that the portability of the operating system is reduced.

例えば、従来のアドレス変換装置を備えた32ビツトプ
ロセツサと64ビツトプロセツサのアドレス変換テーブ
ル構造を比較すると、次の2つの点が異なる。
For example, when comparing the address translation table structures of a 32-bit processor equipped with a conventional address translation device and a 64-bit processor, the following two points differ.

第1に、各変換テーブルエントリの内容は絶対アドレス
であるため、変換テーブルエントリのビット幅が異なる
First, since the contents of each translation table entry are absolute addresses, the bit widths of the translation table entries are different.

第2に、変換テーブルの段数も異なる。これは、64ビ
ツトプロセツサのようにアドレス幅が太きくなると、変
換テーブルの段数を32ビツトプロセツサと同じ段数と
し、物理ページまたは変換テーブルのサイズを大きくす
るよりも、物理ページおよび変換テーブルのサイズを3
2ビツトプロセツサと同じサイズとし、変換テーブルの
段数を増やした方が、主メモリを有効に利用できるため
、64ビツトプロセツサの方が変換テーブルの段数が多
くなる。
Second, the number of stages of the conversion table also differs. This means that when the address width becomes wider as in a 64-bit processor, the size of the physical page and translation table is increased by 3, rather than increasing the size of the physical page or translation table by setting the number of stages of the translation table to be the same as that of a 32-bit processor.
If the size is the same as that of a 2-bit processor and the number of stages of the conversion table is increased, the main memory can be used more effectively, so the 64-bit processor has a larger number of stages of the conversion table.

このように、アドレス幅が異なると、変換テーブルエン
トリのビット幅および変換テーブルの段数が異なる。こ
ういったアドレス変換テーブル構造の相違により、オペ
レーティングシステムの移植性は低下する。
In this way, when the address width differs, the bit width of the translation table entry and the number of stages of the translation table differ. These differences in address translation table structures reduce the portability of operating systems.

本発明は、従来のアドレス変換装置を備え、アドレス幅
が小さいプロセッサ上で動作するオペレーティングシス
テムを、アドレス幅が大きいプロセッサへ移植する際の
移植性を高めるアドレス変換装置を提供することを目的
とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide an address translation device that is equipped with a conventional address translation device and improves portability when an operating system running on a processor with a small address width is ported to a processor with a large address width. .

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

上記目的を達成するため、本発明のアドレス変換装置は
、ベースアドレスを設け、アドレス変換テーブルの内容
を相対アドレスとする。
In order to achieve the above object, the address translation device of the present invention provides a base address and makes the contents of the address translation table a relative address.

より具体的には、論理アドレスを大きく上位部。More specifically, the logical address is greatly increased in the upper part.

下位部の2つに分割し、少なくとも論理アドレス下位部
に対応するアドレス変換テーブルの各エントリの内容は
ベースアドレスからの相対アドレスとし、残りのアドレ
ス変換テーブルの各エントリの内容は絶対アドレスとす
る。そして、前記ベースアドレスを記憶するベースアド
レス記憶手段と、論理アドレス上位部がOである論理ア
ドレスの論理アドレス下位部に対応したテーブル内で最
上段のテーブルの前記ベースアドレスからの相対アドレ
スを記憶する途中段テーブル相対アドレス記憶手段と、
第1段のテーブルの絶対アドレスを記憶する第1段テー
ブル絶対アドレス記憶手段とを設ける。さらに、論理ア
ドレス上位部が0である場合、前記途中段テーブル相対
アドレス記憶手段が示す途中段テーブルからテーブル検
索を開始し、論理アドレスを物理アドレスへ変換するア
ドレス変換手段と、論理アドレス上位部が0でない場合
、前記第1段テーブル絶対アドレス記憶手段が示す第1
段テーブルからテーブル検索を開始し、論理アドレスを
物理アドレスへ変換するアドレス変換手段とを設ける。
The address translation table is divided into two lower parts, and the content of each entry in the address translation table corresponding to at least the lower part of the logical address is a relative address from the base address, and the content of each entry in the remaining address translation table is an absolute address. and base address storage means for storing the base address, and a relative address from the base address of the topmost table in the table corresponding to the logical address lower part of the logical address whose upper logical address part is O. intermediate table relative address storage means;
and first stage table absolute address storage means for storing the absolute address of the first stage table. Further, when the upper part of the logical address is 0, the table search is started from the intermediate table indicated by the intermediate table relative address storage means, and the address conversion means converts the logical address into a physical address, and the upper part of the logical address is 0. If it is not 0, the first address indicated by the first stage table absolute address storage means is
An address conversion means is provided which starts table search from the stage table and converts a logical address into a physical address.

また、上記第1段テーブル絶対アドレス記憶手段の代わ
りに、第1段テーブルの上記ベースアドレスからの相対
アドレスを記憶する第1段テーブル相対アドレス記憶手
段を設ける。
Further, instead of the first stage table absolute address storage means, first stage table relative address storage means is provided for storing a relative address from the base address of the first stage table.

〔作用〕[Effect]

本発明においては、少なくとも論理アドレス下位部に対
応する変換テーブルのエントリ内容を相対アドレスとし
、途中段テーブル相対アドレス記憶手段とベースアドレ
ス記憶手段を設けることによって、従来のアドレス変換
装置を備えた小さいアドレス幅のプロセッサにおけるア
ドレス変換テーブル構造と、本発明のアドレス変換装置
を備えた大きいアドレス幅のプロセッサにおける上記途
中段テーブル相対アドレス記憶手段が示す途中段テーブ
ル以降のアドレス変換テーブル構造、すなわち、前記小
さいアドレス幅のプロセッサのアドレス空間に相当する
部分のアドレス変換テーブル構造が同じであるため、従
来のアドレス変換装置を備えた小さいアドレス幅プロセ
ッサ上で動作するオペレーティングシステムを、大きい
アドレス幅のプロセッサへ移植する際の移植性が向上す
る。
In the present invention, the entry contents of the translation table corresponding to at least the lower part of the logical address are relative addresses, and by providing intermediate table relative address storage means and base address storage means, small address translation devices equipped with a conventional address translation device can be used. Address conversion table structure in a wide address width processor and address conversion table structure after the middle table indicated by the middle table relative address storage means in a large address width processor equipped with the address translation device of the present invention, that is, the small address Since the address translation table structure of the part corresponding to the address space of a wide-width processor is the same, it is easy to port an operating system running on a small address-width processor equipped with a conventional address translation device to a large-address-width processor. improves portability.

〔実施例〕〔Example〕

(実施例1) 以下、本発明の一実施例を図面により説明する。 (Example 1) An embodiment of the present invention will be described below with reference to the drawings.

ここでは、64ビツトプロセツサのアドレス変換装置に
本発明を適用させる。
Here, the present invention is applied to an address translation device for a 64-bit processor.

本実施例では、64ビツトの論理アドレスを第3図に示
すように大きく上位部、下位部の2つに分割し、さらに
上位部、下位部をそれぞれ3つに分割する。第3図にお
いて、30は論理アドレス上位部、31は論理アドレス
下位部、301゜302.303,311はセクション
インデックス、312はページインデックス、313は
オフセットである。論理アドレス上位部30.下位部3
1はそれぞれ32ビツトとする。
In this embodiment, a 64-bit logical address is roughly divided into two parts, an upper part and a lower part, as shown in FIG. 3, and each of the upper part and lower part is further divided into three parts. In FIG. 3, 30 is an upper part of a logical address, 31 is a lower part of a logical address, 301, 302, 303, and 311 are section indexes, 312 is a page index, and 313 is an offset. Logical address upper part 30. Lower part 3
Each 1 is 32 bits.

論理アドレス下位部31は第8図に示す32ビットプロ
セッサの論理アドレスに相当する。セクションインデッ
クス301,302,303゜311およびページイン
デックス312は各変換テーブルインデックスであり、
オフセット313は物理ページ内のオフセットである。
The logical address lower part 31 corresponds to the logical address of the 32-bit processor shown in FIG. Section indexes 301, 302, 303° 311 and page index 312 are conversion table indexes,
Offset 313 is an offset within the physical page.

セクションインチ2クス301,311は10ビツトと
し、セクションインデックス302,303、ページイ
ンデックス312およびオフセット313は11ビツト
とする。したがって、1ページは4にバイトである。
Section inches 301 and 311 are 10 bits, and section indexes 302 and 303, page index 312 and offset 313 are 11 bits. Therefore, one page is 4 bytes.

第1図は、本実施例によるアドレス変換の概念を示す。FIG. 1 shows the concept of address translation according to this embodiment.

第1図において、101は第1段の変換テーブルの絶対
アドレスを記憶する第1段テーブル絶対アドレス変換タ
、102は論理アドレス上位部30が0である論理アド
レスに対応するセクションテーブル114の相対アドレ
スを記憶する途中段テーブル相対アドレスレジスタ、1
03はセクションテーブル114.ページテーブル11
5および物理アドレスのベースアドレスを記憶するベー
スアドレスレジスタ、111はセクションインデックス
301に対応する第1段のセクションテーブル、112
はセクションインデックス302に対応する第2段のセ
クションテーブル、113はセクションインデックス3
03に対応する第3段のセクションテーブル、114は
セクションインデックス311に対応する第4段のセク
ションテーブル、115はページインデックス312に
対応した第5段の変換テーブルであるページテーブルで
ある。第1段テーブル絶対アドレスレジスタ101とベ
ースアドレスジスタ103は64ビツトとし、途中段テ
ーブル相対アドレスレジスタ102は32ビツトとする
。セクションテーブル111.112,113の各エン
トリは64ビツトとし、セクションテーブル114.ペ
ージテーブル115の各エントリは32ビツトである。
In FIG. 1, 101 is a first-stage table absolute address converter that stores the absolute address of the first-stage translation table, and 102 is a relative address of the section table 114 corresponding to a logical address whose logical address upper part 30 is 0. Intermediate table relative address register for storing 1
03 is the section table 114. Page table 11
5 and a base address register for storing the base address of the physical address; 111 is a first stage section table corresponding to the section index 301; 112;
is the second stage section table corresponding to section index 302, and 113 is section index 3.
03 is a section table in the third stage, 114 is a section table in the fourth stage corresponding to the section index 311, and 115 is a page table which is a conversion table in the fifth stage corresponding to the page index 312. The first stage table absolute address register 101 and the base address register 103 are 64 bits, and the intermediate stage table relative address register 102 is 32 bits. Each entry in section tables 111, 112, 113 is 64 bits, and section table 114. Each entry in page table 115 is 32 bits.

このように、本実施例のアドレス変換装置は、論理アド
レス下位部31に対応したセクションテーブル114.
ページテーブル115の各エントリの内容をベースアド
レスからの相対アドレスとし、論理アドレス上位部30
に対応したセクションテブル111,112,113の
各エントリの内容を絶対アドレスとし、前記ベースアド
レスを記憶するベースアドレスレジスタ103と、論理
アドレス上位部30が0である論理アドレスに対応した
セクションテーブル114の前記ベースアドレスからの
相対アドレスを記憶する途中段テーブル相対アドレス1
02と、セクションテーブル111の絶対アドレスを記
憶する第1段テーブル絶対アドレスレジスタ101を設
ける。
In this way, the address translation device of this embodiment has the section table 114 .corresponding to the logical address lower part 31 .
The content of each entry in the page table 115 is a relative address from the base address, and the logical address upper part 30
The content of each entry in the section table 111, 112, 113 corresponding to the above is set as an absolute address, and the base address register 103 that stores the base address and the section table 114 corresponding to the logical address whose logical address upper part 30 is 0 are stored. Intermediate table relative address 1 for storing relative addresses from the base address
02 and a first stage table absolute address register 101 that stores the absolute address of the section table 111.

第2図の手順にしたがって、本実施例のアドレス変換の
過程を説明する。まず最初に、論理アドレス上位部30
がOであるか否か判断する(ステップ201)、論理ア
ドレス上位部30がOである場合、ベースアドレスレジ
スタ103.途中段テーブル相対アドレスレジスタ10
2およびセクションインデックス311の値を加算し、
論理アドレスに対応するセクションテーブル114エン
トリのアドレスを求める(ステップ2o2)。そして、
ベースアドレスレジスタ1o3.ページインデックス3
12および今求めたセクションテーブル114エントリ
の内容を加算し、論理アドレスに対応するページテーブ
ル115エントリのアドレスを求める(ステップ207
)。最後に、ベースアドレス103.オフセット313
および今求めたページテーブル115エントリの内容を
加算し、論理アドレスに対応する物理アドレスを求める
(ステップ208)。
The process of address translation in this embodiment will be explained according to the procedure shown in FIG. First of all, the logical address upper part 30
is O (step 201). If the logical address upper part 30 is O, the base address register 103. Intermediate table relative address register 10
2 and the value of section index 311 are added,
The address of the section table 114 entry corresponding to the logical address is determined (step 2o2). and,
Base address register 1o3. Page index 3
12 and the content of the section table 114 entry just found to find the address of the page table 115 entry corresponding to the logical address (step 207
). Finally, base address 103. offset 313
and the content of the page table 115 entry just obtained to obtain the physical address corresponding to the logical address (step 208).

一方、論理アドレス上位部30が0でない場合、第1段
テーブル絶対アドレスレジスタ101とセクションイン
デックス301を加算し、論理アドレスに対応するセク
ションテーブル112エントリのアドレスを求める(ス
テップ2o3)。次に、今求めた変換テーブル111エ
ントリの内容とセクションインデックス302を加算し
、論理アドレスに対応するセクションテーブル112ニ
ントリのアドレスを求める(ステップ2o4)。さらに
、今求めたセクションテーブル112エントリの内容と
セクションインデックス303を加算し、論理アドレス
に対応するセクションテーブル113エントリのアドレ
スを求める(ステップ2o5)。
On the other hand, if the logical address upper part 30 is not 0, the first stage table absolute address register 101 and the section index 301 are added to find the address of the section table 112 entry corresponding to the logical address (step 2o3). Next, the content of the conversion table 111 entry just found and the section index 302 are added to find the address of the section table 112 entry corresponding to the logical address (step 2o4). Furthermore, the contents of the section table 112 entry just found and the section index 303 are added to find the address of the section table 113 entry corresponding to the logical address (step 2o5).

そして、今求めたセクションテーブル113エントリの
内容とセクションインデックス311を加算し、論理ア
ドレスに対応するセクションテーブル114エントリの
アドレスを求める(ステップ206)。このあとは、先
程の論理アドレス上位部30がOである場合と同じく、
ベースアドレスレジスタ103.ページインデックス3
12および今求めたセクションテーブル114エントリ
の内容を加算し、論理アドレスに対応するページテーブ
ル115エントリのアドレスを求める(ステップ207
)。最後に、ベースアドレス103゜オフセット313
および今求めたページテーブル115エントリの内容を
加算し、論理アドレスに対応する論理アドレスを求める
(ステップ208)。
Then, the contents of the section table 113 entry just found and the section index 311 are added to find the address of the section table 114 entry corresponding to the logical address (step 206). After this, as in the case where the logical address upper part 30 is O,
Base address register 103. Page index 3
12 and the content of the section table 114 entry just found to find the address of the page table 115 entry corresponding to the logical address (step 207
). Finally, base address 103° offset 313
and the content of the page table 115 entry just obtained to obtain the logical address corresponding to the logical address (step 208).

このように、従来のアドレス変換装置を備えた32ビツ
トプロセツサのアドレス変換テーブルの構造と、本実施
例の途中段テーブル相対アドレスレジスタ102.セク
ションテーブル114およびページテーブル115の構
造が同じである。
As described above, the structure of the address translation table of a 32-bit processor equipped with a conventional address translation device and the intermediate table relative address register 102 of this embodiment are as follows. Section table 114 and page table 115 have the same structure.

(実施例2) 次に、第1段テーブル絶対アドレスレジスタ1010代
わりに、第1段テーブルのベースアドレスからの相対ア
ドレスを記憶する手段を備えたアドレス変換装置の他の
実施例を説明する。
(Embodiment 2) Next, another embodiment of an address translation device including means for storing a relative address from the base address of the first stage table in place of the first stage table absolute address register 1010 will be described.

第4図は1本実施例によるアドレス変換の概念を示す。FIG. 4 shows the concept of address translation according to this embodiment.

第4図において、401は第1段変換テーブルのベース
アドレスからの相対アドレスを記憶する第1段テーブル
相対アドレスレジスタ、103は全変換テーブルおよび
物理アドレスのベースアドレスを記憶するベースアドレ
スレジスタ、411はセクションインデックス301に
対応する第1段のセクションテーブル、412はセクシ
ョンインデックス302に対応する第2段のセクション
テーブル、413はセクションインデックス303に対
応する第3段のセクションテーブルである。ベースアド
レスレジスタ103は64ビツトとし、第1段テーブル
相対アドレスレジスタ401と途中段テーブル相対アド
レスレジスタ102は32ビツトとする。セクションテ
ーブル411.412,413,414およびページテ
ーブル115の各エントリは32ビツトとする。
In FIG. 4, 401 is a first-stage table relative address register that stores the relative address from the base address of the first-stage translation table, 103 is a base address register that stores the base address of all translation tables and physical addresses, and 411 is a base address register that stores the base address of the entire translation table and physical addresses. A first stage section table 412 corresponds to the section index 301, a second stage section table 412 corresponds to the section index 302, and a third stage section table 413 corresponds to the section index 303. The base address register 103 has 64 bits, and the first stage table relative address register 401 and the intermediate stage table relative address register 102 have 32 bits. Each entry in section tables 411, 412, 413, 414 and page table 115 is 32 bits.

本実施例と第1図に示した実施例とを比較すると、論理
アドレス上位部30に対応する変換テーブルエントリと
、第1段セクションテーブルを指すアドレスレジスタに
関して、第1図の実施例1では絶対アドレスであったが
、第4図の本実施例2ではベースアドレスからの相対ア
ドレスとなっている。このように、本実施例のアドレス
変換装置は、全変換テーブルの各エントリの内容をベー
スアドレスからの相対アドレスとし、第1図の第1段テ
ーブル絶対アドレスレジスタ101の代わりに、第1段
テーブル相対アドレスレジスタ401を設ける。
Comparing this embodiment with the embodiment shown in FIG. 1, with respect to the translation table entry corresponding to the upper part 30 of the logical address and the address register pointing to the first stage section table, in the embodiment 1 shown in FIG. However, in the second embodiment shown in FIG. 4, it is a relative address from the base address. In this way, the address translation device of this embodiment uses the content of each entry in the entire translation table as a relative address from the base address, and instead of the first stage table absolute address register 101 in FIG. A relative address register 401 is provided.

第5図の手順にしたがって、本実施例のアドレス変換の
過程を説明する。なお、第5図では、第2図に示した実
施例1のアドレス変換手順でのステップ203,204
,205,206が、ステップ503 、504 、5
05 、5061.ニー変わッテでいる。つまり、論理
アドレス上位部30がOである場合のアドレス変換手順
は第2図の実施例1のアドレス変換手順と同じであるが
、論理アドレス上位部30が0でない場合には、セクシ
ョンテーブル114エントリアドレスを求める段階まで
の手順が第2図の実施例1のアドレス変換手順と異なっ
ている。
The process of address translation in this embodiment will be explained according to the procedure shown in FIG. In addition, in FIG. 5, steps 203 and 204 in the address conversion procedure of the first embodiment shown in FIG.
, 205, 206 in steps 503, 504, 5
05, 5061. My knees are weird. In other words, the address translation procedure when the logical address upper part 30 is O is the same as the address translation procedure of the first embodiment in FIG. 2, but when the logical address upper part 30 is not 0, the section table 114 entry The procedure up to the stage of obtaining an address is different from the address conversion procedure of the first embodiment shown in FIG.

まず最初に、論理アドレス上位部30がOであるか否か
を判断する(ステップ201)。論理アドレス上位部3
0がOである場合は前述の本実施例と同じく、ベースア
ドレスレジスタ103.途中段テーブル相対アドレスレ
ジスタ102およびセクションインデックス311の値
を加算し、論理アドレスに対応するセクションテーブル
114エントリのアドレスを求める(ステップ202)
First, it is determined whether the logical address upper part 30 is O (step 201). Logical address upper part 3
If 0 is O, the base address register 103. The values of the intermediate table relative address register 102 and the section index 311 are added to find the address of the section table 114 entry corresponding to the logical address (step 202).
.

そして、ベースアドレスレジスタ1o3.ページインデ
ックス312および今求めたセクションテーブル114
エントリの内容を加算し、論理アドレスに対応するペー
ジテーブル115エントリのアドレスを求める(ステッ
プ207)。最後に、ベースアドレスレジスタ103.
オフセット313および今求めたページテーブル115
エントリの内容を加算し、論理アドレスに対応する物理
アドレスを求める(ステップ208)。
And base address register 1o3. Page index 312 and section table 114 just obtained
The contents of the entries are added to find the address of the page table 115 entry corresponding to the logical address (step 207). Finally, base address register 103.
Offset 313 and the page table 115 just found
The contents of the entries are added to find the physical address corresponding to the logical address (step 208).

一方、論理アドレス上位部30がOでない場合、本実施
例では、ベースアドレスレジスタ103゜第1段テーブ
ル相対アドレスレジスタ401およびセクションインデ
ックス301を加算し、論理アドレスに対応するセクシ
ョンテーブル411エントリのアドレスを求める(ステ
ップ503)。
On the other hand, if the logical address upper part 30 is not O, in this embodiment, the base address register 103, the first stage table relative address register 401, and the section index 301 are added, and the address of the section table 411 entry corresponding to the logical address is determined. (step 503).

次に、ベースアドレスレジスタ103.セクションイン
デックス302および今求めたセクションテーブル4−
11エントリの内容を加算し、論理アドレスに対応する
セクションテーブル412エントリのアドレスを求める
(ステップ5o4)。さらに、ベースアドレスレジスタ
103.セクションインデックス303および今求めた
セクションテーブル412エントリの内容を加算し、論
理アドレスに対応するセクションテーブル4−3エント
リのアドレスを求める(ステップ505)。そして、ベ
ースアドレスレジスタ103.セクションインデックス
311および今求めたセクションテーブル413エント
リの内容を加算し、論理アドレスに対応するセクション
テーブル114エントリのアドレスを求める(ステップ
506)。このあとは、前述の論理アドレス上位部30
がOである場合と同じく、ベースアドレスレジスタ10
3゜ページインデックス312および今求めたセクショ
ンテーブル114エントリの内容を加算し、論理アドレ
スに対応するページテーブル115エントリのアドレス
を求める(ステップ20?)、最後に、ベースアドレス
レジスタ103.オフセット313および今求めたペー
ジテーブル115エントリの内容を加算し、論理アドレ
スに対応する論理アドレスを求める(ステップ208)
Next, base address register 103. Section index 302 and section table 4-
The contents of the 11 entries are added to find the address of the section table 412 entry corresponding to the logical address (step 5o4). Furthermore, base address register 103. The section index 303 and the content of the section table 412 entry just found are added to find the address of the section table 4-3 entry corresponding to the logical address (step 505). And base address register 103. The section index 311 and the content of the section table 413 entry just found are added to find the address of the section table 114 entry corresponding to the logical address (step 506). After this, the above-mentioned logical address upper part 30
As in the case where is O, the base address register 10
3. Add the contents of the page index 312 and the section table 114 entry just found to find the address of the page table 115 entry corresponding to the logical address (step 20?).Finally, the base address register 103. Add the offset 313 and the content of the page table 115 entry just found to find the logical address corresponding to the logical address (step 208).
.

このように、従来のアドレス変換装置を備えた32ビツ
トプロセツサのアドレス変換テーブルの構造と、本実施
例の途中段テーブル相対アドレスレジスタ102.セク
ションテーブル114およびページテーブル115の構
造が同じである。
As described above, the structure of the address translation table of a 32-bit processor equipped with a conventional address translation device and the intermediate table relative address register 102 of this embodiment are as follows. Section table 114 and page table 115 have the same structure.

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

本発明によれば、従来のアドレス変換装置を備えた小さ
いアドレス幅のプロセッサにおけるアドレス変換テーブ
ル構造と、本発明のアドレス変換装置を備えた大きいア
ドレス幅のプロセッサにおける途中段テーブル相対アド
レス記憶手段が示す途中段テーブル以降のアドレス変換
テーブル構造。
According to the present invention, an address translation table structure in a small address width processor equipped with a conventional address translation device and an intermediate table relative address storage means in a large address width processor equipped with the address translation device of the present invention are shown. Address translation table structure after the intermediate table.

すなわち、前記小さいアドレス幅のプロセッサのアドレ
ス空間に相当する部分のアドレス変換テーブル構造が同
じになる。
That is, the address translation table structure of the portion corresponding to the address space of the processor with the small address width becomes the same.

したがって、本発明によって、従来のアドレス変換装置
を備えた小さいアドレス幅のプロセッサ上で動作するオ
ペレーティングシステムを、大きいアドレス幅のプロセ
ッサへ移植する際の移植性が向上する。
Therefore, the present invention improves the portability of an operating system running on a small address width processor with a conventional address translation device to a large address width processor.

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

第1図は本発明の一実施例におけるアドレス変換の概念
を示す説明図、第2図は本発明の一実施例におけるアド
レス変換手順を示すフローチャート、第3図は本発明の
一実施例における論理アドレスの分割方法を示す図、第
4図は本発明の他の実施例におけるアドレス変換の概念
を示す説明図。 第5図は本発明の他の実施例におけるアドレス変換手順
を示すフローチャート、第6図は従来のアドレス変換装
置におけるアドレス変化の概念を示す説明図、第7図は
従来のアドレス変換装置におけるアドレス変換手順を示
すフローチャート、第8図は従来のアドレス変換装置に
おける論理アドレスの分割方法を示す図である。 101.601・・・第1段テーブル絶対アドレスレジ
スタ、1o2・・・途中段テーブル相対アドレスレジス
タ、103・・・ベースアドレスレジスタ、104・・
・主メモリ、111〜114,411〜413・・・セ
クションテーブル、115・・・ページテーブル、20
1〜208,503〜506・・・本発明の実施例にお
けるアドレス変換手順、30・・・論理アドレス上位部
、31・・・論理アドレス下位部、301〜303.3
11・・・セクションインデックス、312・・・ペー
ジインデックス、313・・・オフセット、401・・
・第1段テーブル相対アドレスレジスタ、701〜70
3・・・従来のアドレス変換装置におけるアドレス変換
手順。 第1図 第2図 第3図 第4図 第5図
FIG. 1 is an explanatory diagram showing the concept of address translation in one embodiment of the present invention, FIG. 2 is a flowchart showing the address translation procedure in one embodiment of the present invention, and FIG. 3 is a logic diagram in one embodiment of the present invention. FIG. 4 is an explanatory diagram showing the concept of address conversion in another embodiment of the present invention. FIG. 5 is a flowchart showing an address translation procedure in another embodiment of the present invention, FIG. 6 is an explanatory diagram showing the concept of address change in a conventional address translation device, and FIG. 7 is an address translation in a conventional address translation device. FIG. 8 is a flowchart showing the procedure, and is a diagram showing a logical address division method in a conventional address translation device. 101.601...First stage table absolute address register, 1o2...Intermediate stage table relative address register, 103...Base address register, 104...
・Main memory, 111 to 114, 411 to 413...Section table, 115...Page table, 20
1-208, 503-506... Address conversion procedure in the embodiment of the present invention, 30... Upper part of logical address, 31... Lower part of logical address, 301-303.3
11... Section index, 312... Page index, 313... Offset, 401...
・First stage table relative address register, 701 to 70
3...Address translation procedure in a conventional address translation device. Figure 1 Figure 2 Figure 3 Figure 4 Figure 5

Claims (1)

【特許請求の範囲】 1、多段階のテーブル検索により、入力された論理アド
レスを物理アドレスへ変換するアドレス変換装置におい
て、論理アドレスを大きく上位部、下位部の2つに分割
し、少なくとも論理アドレス下位部に対応したテーブル
はそのエントリ内容をベースアドレスからの相対アドレ
スとし、残りのテーブルはそのエントリ内容を絶対アド
レスとし、前記ベースアドレスを記憶するベースアドレ
ス記憶手段と、論理アドレス上位部が0である論理アド
レスの論理アドレス下位部に対応したテーブル内で最上
段のテーブルの前記ベースアドレスからの相対アドレス
を記憶する途中段テーブル相対アドレス記憶手段と、第
1段のテーブルの絶対アドレスを記憶する第1段テーブ
ル絶対アドレス記憶手段と、論理アドレス上位部が0で
ある場合、前記途中段テーブル相対アドレス記憶手段が
示すテーブルからテーブル検索を開始し、論理アドレス
を物理アドレスへ変換するアドレス変換手段と、論理ア
ドレス上位部が0でない場合、前記第1段テーブル絶対
アドレス記憶手段が示すテーブルからテーブル検索を開
始し、論理アドレスを物理アドレスへ変換するアドレス
変換手段とを具備したアドレス変換装置。 2、上記第1段テーブル絶対アドレス記憶手段の代わり
に、第1段テーブルの上記ベースアドレスからの相対ア
ドレスを記憶する第1段テーブル相対アドレス記憶手段
を具備した請求項1記載のアドレス変換装置。
[Claims] 1. In an address translation device that converts an input logical address into a physical address by multi-stage table search, the logical address is roughly divided into two parts, an upper part and a lower part, and at least the logical address The table corresponding to the lower part has its entry contents as a relative address from the base address, and the remaining tables have their entry contents as absolute addresses, and have a base address storage means for storing the base address, and a logical address whose upper part is 0. intermediate table relative address storage means for storing a relative address from the base address of the top table in the table corresponding to the lower logical address part of a certain logical address; and a middle table relative address storage means for storing the absolute address of the first table. a one-stage table absolute address storage means; and an address conversion means for starting a table search from the table indicated by the middle-stage table relative address storage means and converting the logical address into a physical address when the upper part of the logical address is 0; An address translation device comprising address conversion means for starting a table search from the table indicated by the first-stage table absolute address storage means when the upper part of the logical address is not 0, and converting the logical address into a physical address. 2. The address translation device according to claim 1, further comprising first stage table relative address storage means for storing a relative address from said base address of said first stage table in place of said first stage table absolute address storage means.
JP2121333A 1990-05-14 1990-05-14 Address converter Pending JPH0421047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2121333A JPH0421047A (en) 1990-05-14 1990-05-14 Address converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2121333A JPH0421047A (en) 1990-05-14 1990-05-14 Address converter

Publications (1)

Publication Number Publication Date
JPH0421047A true JPH0421047A (en) 1992-01-24

Family

ID=14808668

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2121333A Pending JPH0421047A (en) 1990-05-14 1990-05-14 Address converter

Country Status (1)

Country Link
JP (1) JPH0421047A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2582362A (en) * 2019-03-21 2020-09-23 Advanced Risc Mach Ltd Page table structure

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2582362A (en) * 2019-03-21 2020-09-23 Advanced Risc Mach Ltd Page table structure
GB2582362B (en) * 2019-03-21 2021-08-04 Advanced Risc Mach Ltd Page table structure

Similar Documents

Publication Publication Date Title
KR920001324A (en) How byte compare works in high performance processors and their processors
US20120331265A1 (en) Apparatus and Method for Accelerated Hardware Page Table Walk
US10303791B2 (en) Efficient join on dynamically compressed inner for improved fit into cache hierarchy
JPH0421047A (en) Address converter
JP7187410B2 (en) Database processing system and database processing method
US5193160A (en) Address translation system with register storing section and area numbers
JP2000122876A (en) Information processor
US7793069B2 (en) Indexing for dynamic address translation
JPS5939049B2 (en) Code conversion method
US6532486B1 (en) Apparatus and method for saturating data in register
JPH0417046A (en) Address converter
JPH05143334A (en) Branch predicting table system
JPH04282724A (en) Address resolving system between programs
JPS61224039A (en) Digital logarithm converting circuit
JPH04101272A (en) Data element retrieving method
JPS62126447A (en) Address conversion method
JPS6250945A (en) Program loading system
JPS61279960A (en) Buffer management system
JPH04243424A (en) Dynamic link system
JPS617934A (en) General purpose bit operating system
JPH01175651A (en) Address converting system
JPS61204752A (en) Address converting system
JPS63104134A (en) Index retrieving system
JPS63189955A (en) Data transferring and processing system in virtual computer system
JP2000076068A (en) Computer system