JP2728434B2 - Address translation device - Google Patents

Address translation device

Info

Publication number
JP2728434B2
JP2728434B2 JP63152336A JP15233688A JP2728434B2 JP 2728434 B2 JP2728434 B2 JP 2728434B2 JP 63152336 A JP63152336 A JP 63152336A JP 15233688 A JP15233688 A JP 15233688A JP 2728434 B2 JP2728434 B2 JP 2728434B2
Authority
JP
Japan
Prior art keywords
memory
bit
data
access right
address
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.)
Expired - Fee Related
Application number
JP63152336A
Other languages
Japanese (ja)
Other versions
JPS6478343A (en
Inventor
哲朗 本村
克明 高木
俊平 河崎
亘孝 天野
公夫 大江
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 Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Microcomputer System Ltd
Hitachi 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 Microcomputer System Ltd, Hitachi Ltd filed Critical Hitachi Microcomputer System Ltd
Priority to JP63152336A priority Critical patent/JP2728434B2/en
Publication of JPS6478343A publication Critical patent/JPS6478343A/en
Application granted granted Critical
Publication of JP2728434B2 publication Critical patent/JP2728434B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は論理アドレスを物理アドレスに変換するため
のアドレス変換装置に関し、とくにマイクロ・コンピュ
ータ・システムにおける、マルチタスクを扱う仮想記憶
システムに好適なアドレス変換装置に係る。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an address translation device for translating a logical address into a physical address, and is particularly suitable for a virtual storage system that handles multitasking in a microcomputer system. The present invention relates to an address translation device.

[従来の技術] 従来、マイクロ・コンピュータ・システムにおけるマ
ルチタスクを取扱う仮想記憶システムにおいては、アド
レス変換とメモリ保護のためのメモリアクセス権のチェ
ックがメモリ管理の重要な機能となっている。そこで、
アドレス変換とは、実行中のあるタスクから指示された
論理的なアドレス(以後、論理アドレスと呼ぶ)を実メ
モリ上の物理的なアドレス(以後、物理アドレスと呼
ぶ)へ変換することである。メモリアクセス権のチェッ
クとは、その物理アドレスのメモリ域が、他のアクセス
に固有に割られた、したがって、そのタスクがアクセス
してはいけないメモリ域であるかを、そのメモリ域に割
りあてられたメモリ保護レベルと、そのタスクに割りあ
てられたメモリアクセス権レベルとに基づきチェックす
ることである。マイクロコンピュータにあっては、アド
レス変換をメモリアクセスを権のチェックの両方を行う
アドレス変換装置がすでに用いられている。これについ
てはたとえば、コンピュータ・デザイン,Vol.25,No.19,
1986年10月15日号第21頁から第30頁(Computer Design,
Vol.25,No.19,Oct.15,1986,pp.21-30)において論じら
れている。
2. Description of the Related Art Conventionally, in a virtual storage system that handles multitasking in a microcomputer system, address conversion and checking of a memory access right for memory protection are important functions of memory management. Therefore,
The address conversion is to convert a logical address (hereinafter, referred to as a logical address) specified by a certain task being executed into a physical address (hereinafter, referred to as a physical address) on a real memory. Checking memory access rights means that the memory area at that physical address is allocated to that memory area if it is a memory area that is uniquely allocated to other accesses, and therefore should not be accessed by the task. The check is based on the memory protection level and the memory access right level assigned to the task. In a microcomputer, an address translation device that performs both address translation and memory access right checking has already been used. About this, for example, Computer Design, Vol.25, No.19,
October 15, 1986, pages 21 to 30 (Computer Design,
Vol.25, No.19, Oct.15, 1986, pp.21-30).

後に詳しく説明するように、従来のアドレス変換装置
では、上記アドレス変換とメモリアクセス権のチェック
をシーケンスシャルに行っていた。
As described later in detail, in the conventional address translation device, the address translation and the check of the memory access right are sequentially performed.

[発明が解決しようとする問題点] 上記従来技術においては上記シーケンシャル動作のた
めに有効な物理アドレスを獲得するまでに要する時間が
アドレス変換に要する時間よりメモリ・アクセス権チェ
ックの時間だけ長くなる。
[Problems to be Solved by the Invention] In the above-described conventional technology, the time required to acquire a valid physical address for the sequential operation is longer than the time required for address translation by the time required for memory access right check.

本発明の目的は、アドレス変換とメモリ・アクセス権
チェックを並行して行いうるアドレス変換装置を提供す
ることにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an address translation device capable of performing address translation and memory access right check in parallel.

[問題点を解決するための手段] このため本発明ではアドレス変換回路を複数の物理ア
ドレスを記憶するメモリ(814A)と、該複数の物理アド
レスに対応する複数の信号対であって、各対が該複数の
物理アドレスの一つに対応する論理アドレスと該一つの
物理アドレスのメモリ位置に割りあてられたメモリ保護
レベルを示すメモリ保護レベルデータとの対からなるも
のを記憶し、アドレス変換すべき論理アドレスと、該記
憶されたメモリ保護レベルデータのそれぞれの各ビット
が検索されるべきかを指示するためのマスクデータであ
って、アドレス変換を要求するプログラムに割りあてら
れたメモリアクセス権レベルに依存して定められたもの
と、該記憶されたメモリ保護レベルデータの各々と比較
されるべき比較用データとに応答して、該アドレス変換
すべき論理アドレスと一致する論理アドレスと、該マス
クデータにより検索されるべきヒット位置であると示さ
れたビット位置において、該比較用データと一致するメ
モリ保護レベルデータとを有する信号対を検索し、該検
出された信号対に対応する物理アドレスを出力すべきこ
とを該メモリに指示する連想メモリ(810A)とにて構成
した。
[Means for Solving the Problems] For this reason, in the present invention, the address conversion circuit includes a memory (814A) for storing a plurality of physical addresses, and a plurality of signal pairs corresponding to the plurality of physical addresses. Stores a pair of a logical address corresponding to one of the plurality of physical addresses and memory protection level data indicating a memory protection level assigned to a memory location of the one physical address, and performs address conversion. Logical address to be provided, and mask data for indicating whether each bit of the stored memory protection level data is to be searched, and a memory access right level assigned to a program requesting address conversion. And the comparison data to be compared with each of the stored memory protection level data. A signal pair having a logical address that matches the logical address to be dress-converted and memory protection level data that matches the comparison data at the bit position indicated as the hit position to be searched by the mask data. An associative memory (810A) for instructing the memory to search and output a physical address corresponding to the detected signal pair.

[作用] メモリ保護のためのメモリアクセス権チェックのため
には、プログラム(たとえばタスク)に割りあてられた
メモリアクセス権レベルがアドレス変換の結果得られた
物理アドレスのメモリ領域に割りあてられたメモリ保護
レベル以下か(又は以上か)を判別する必要がある。本
発明は連想メモリを用いてこの判別をも連想メモリで行
っている。このために、本発明では、メモリ保護レベル
を表わすデータおよびメモリアクセス権レベルを表わす
データのデータ表現を工夫することにより、あるメモリ
アクセス権レベルでアクセス可能な一つ又は複数のメモ
リ保護レベルデータのすべては、上記メモリアクセス権
レベルで定まる特定のビット位置において特定の値をも
つことを利用する。
[Operation] To check the memory access right for memory protection, the memory access right level assigned to the program (eg, task) is assigned to the memory area of the physical address obtained as a result of the address conversion. It is necessary to determine whether it is below (or above) the protection level. The present invention uses an associative memory to perform this determination using an associative memory. For this reason, in the present invention, by devising the data expression of the data representing the memory protection level and the data representing the memory access right level, one or a plurality of memory protection level data accessible at a certain memory access right level are obtained. All utilize the fact that it has a specific value at a specific bit position determined by the memory access right level.

すなわち、本発明では連想メモリがアドレス変換後に
得られる物理アドレスのメモリ領域に割りあてられたメ
モリ保護レベルも記憶しておき、マスク信号で上記位置
を示し連想メモリが、このビット位置のみにおいて、比
較用データとあらかじめ記憶したメモリ保護レベルデー
タとの一致を判別可能になっているので連想メモリは、
入力された論理アドレスに一致する論理アドレスと、メ
モリアクセス権レベルでアクセス可能な一つ又は複数の
メモリ保護レベルデータのいずれか一つとの信号対に対
して一致信号を出力する。したがってアドレス変換によ
り得られる物理アドレスに割り当てられたメモリ保護レ
ベルが実行中のプログラムに割りあてられたメモリアク
セス権レベルでアクセス可能なものであることが保障さ
れる。勿論、以上において、論理アドレスについての一
致検出、メモリ保護レベルデータとメモリアクセス権レ
ベルデータの特許のビット位置での一致検出が同一の連
想メモリにて行なわれるので、これらの2つの一致検出
を並行して行える。
That is, in the present invention, the associative memory also stores the memory protection level assigned to the memory area of the physical address obtained after the address conversion, and indicates the above position by a mask signal, and the associative memory compares only the bit position. Memory and the memory protection level data stored in advance can be determined, so the associative memory is
A match signal is output for a signal pair of a logical address that matches the input logical address and one of one or a plurality of memory protection level data accessible at the memory access right level. Therefore, it is guaranteed that the memory protection level assigned to the physical address obtained by the address conversion is accessible at the memory access right level assigned to the program being executed. Of course, in the above description, the coincidence detection of the logical address and the coincidence detection of the memory protection level data and the memory access right level data at the bit position of the patent are performed in the same associative memory. You can do it.

[実施例] 実施例の説明の前に従来技術を詳細に説明する。[Example] Prior to description of an example, a conventional technique will be described in detail.

第8図において、12は実行中のタスクに割りあてられ
たメモリアクセス権レベルデータMALを保持するレベル
レジスタ13はアドレス変換すべき論理アドレスLAを保持
するLAレジスタ、15は変換により得られた物理アドレス
PAを保持する出力レジスタ、11は連想メモリ810に対し
て連想検索すべきビット位置を指定するマスクデータを
保持するマスクレジスタ、82は変換後の物理アドレスの
メモリ位置が、実行中のタスクによりアクセスが許され
るメモリ保護レベルを有するかをチェックするメモリア
クセス権レベルチェック回路である。その他の要素は物
理アドレスを対応する論理アドレスに変換するためのア
ドレス変換バッファ(以下TLBと呼ぶ)81を構成する。
In FIG. 8, reference numeral 12 denotes a level register which holds the memory access right level data MAL allocated to the task being executed, 13 denotes an LA register which holds a logical address LA to be converted, and 15 denotes a physical address obtained by the conversion. address
An output register holding PA, 11 is a mask register holding mask data specifying a bit position to be associatively searched for the associative memory 810, 82 is a memory location of a converted physical address, which is accessed by a task being executed. Is a memory access right level check circuit for checking whether the memory access right has an allowable memory protection level. Other elements constitute an address translation buffer (hereinafter referred to as TLB) 81 for translating a physical address into a corresponding logical address.

TLB81は複数の論理アドレスの上位ビット部分LA-1,LA
-2,……LA-n入力された論理アドレスと一致する論理ア
ドレスがそれらの中にないかを検索する連想メモリ810
と、それらの論理アドレスにそれぞれ対応する物理アド
レスのそれぞれの上位ビット部分PA-1,PA-2,……,PA-n
およびそれぞれの物理アドレスに割りあてられたメモリ
保護レベルデータMPL-1,MPL-2,……,MPL-nとを対にして
記憶するRAM814とからなる。
TLB81 is the upper bits LA-1, LA of multiple logical addresses
-2, ...... LA-n associative memory 810 searching for a logical address that matches the input logical address
And the upper bit portions PA-1, PA-2,..., PA-n of the physical addresses respectively corresponding to the logical addresses.
, And MPL-n, which are memory protection level data MPL-1, MPL-2,..., MPL-n allocated to each physical address.

連想メモリ810はメモリ部812、デコーダ811、制御部8
10よりなる。マスクレジスタ11内のマスクデータの各ビ
ット(マスクビット)はLAレジスタ13内の論理アドレス
部LA-uの各ビットに対応して設けられている。あるマス
クビットの値が1の場合は、論理アドレスLAの上位ビッ
ト部LA-uの対応ビットと記憶された論理アドレスLA-1,L
A-2,……の対応するビットとの比較を連想メモリ810に
指示し、そのマスクビットの値は上記比較を無効化し常
に一致しているとみなすことを連想メモリ810に指示す
る。
The associative memory 810 includes a memory unit 812, a decoder 811, a control unit 8
Consists of ten. Each bit (mask bit) of the mask data in the mask register 11 is provided corresponding to each bit of the logical address part LA-u in the LA register 13. If the value of a certain mask bit is 1, the corresponding bit of the upper bit part LA-u of the logical address LA and the stored logical address LA-1, L
A-2,... Are instructed to the associative memory 810, and the value of the mask bit instructs the associative memory 810 to invalidate the comparison and always assume that they match.

この従来技術では、このマスクデータとして、値1の
ビット列“11……”が格納されている。したがってこの
従来例では論理アドレスLAの上位ビット部LA-uの全ビッ
トについて比較を行うべきことを連想メモリ810に指示
することになる。
In this conventional technique, a bit string “11...” Of value 1 is stored as the mask data. Therefore, in this conventional example, the associative memory 810 is instructed to compare all the bits of the upper bit portion LA-u of the logical address LA.

デコーダ811は、論理アドレスの上位ビット部分LA-u
の一つのビットおよび対応するマスクビットとの対が入
力される複数の部分デコーダ811-1,811-2,……811-mか
らなる。各部分デコーダは、二つの入力信号の組み合わ
せに依存して変わる検索用の2つの信号をメモリ部812
に与える。
The decoder 811 outputs the upper bit portion LA-u of the logical address.
., 811-m to which a pair of one of the bits and a corresponding mask bit is input. Each partial decoder stores two signals for search, which change depending on a combination of two input signals, in the memory unit 812.
Give to.

次に第8図の動作を第9図のタイムチャートに従い説
明する。動作は、第9図に示すようにアドレス変換とメ
モリ・アクセス権チェックの2ステージより成る。
Next, the operation of FIG. 8 will be described with reference to the time chart of FIG. The operation consists of two stages of address conversion and memory access right check as shown in FIG.

(1)アドレス変換ステージ 連想メモリ810では論理アドレスLAの上位ビット部分L
A-uと一致する論理アドレスがあるかを検索する。815は
各々が連想メモリ810のメモリ部812の各エントリに対応
して設けられたビットラインの群である。
(1) Address conversion stage In associative memory 810, upper bit portion L of logical address LA
Search for a logical address that matches Au. 815 is a group of bit lines provided corresponding to each entry of the memory unit 812 of the associative memory 810.

メモリ部812は論理アドレスの上位ビット部LA-uと一
致する論理アドレスたとえばLA-i(i=1,2……or n)
を保持するエントリ(ヒットエントリ)がある場合、そ
のエントリに対応するヒットラインに1をその他のエン
トリに対応するヒットラインに0を出力する。
The memory unit 812 stores a logical address, for example, LA-i (i = 1, 2,... Or n) corresponding to the upper bit part LA-u of the logical address.
Is output (hit entry), 1 is output to the hit line corresponding to that entry, and 0 is output to the hit lines corresponding to the other entries.

ヒットエントリがない場合、ヒットライン群815の信
号が入力されるミスヒット判定用の13ゲート813の出力8
18は1となりこの信号はマイクロコンピュータ(図示せ
ず)のマイクロ制御ユニット(図示せず)にミスヒット
信号として通知される。
If there is no hit entry, the signal of the hit line group 815 is input.
18 becomes 1 and this signal is notified to a micro control unit (not shown) of a microcomputer (not shown) as a mishit signal.

ヒットエントリがある場合、そのエントリに対応する
ヒットライン上の値“1"の信号に応答して、RAM814は、
そのヒットラインに対応する物理アドレスの上位ビット
部PA-iおよびメモリ保護しレベルMPL-iを出力する。
If there is a hit entry, the RAM 814 responds to the signal of the value “1” on the hit line corresponding to the entry,
The high-order bit part PA-i of the physical address corresponding to the hit line and the memory protection level MPL-i are output.

(2)メモリアクセス権レベルチェック チェック回路82は、このメモリ保護レベルデータMPL-
iとレベルレジスタ12に保持された、論理アドレスLAを
発生した実行中のタスクに割りあてられたメモリアクセ
ス権レベルデータMALとを比較しメモリアクセス権のチ
ェックを行う。
(2) Memory access right level check The check circuit 82 checks the memory protection level data MPL-
The memory access right is checked by comparing i with the memory access right level data MAL held in the level register 12 and assigned to the running task that generated the logical address LA.

その説明の前にメモリアクセス権レベルデータとメモ
リ保護レベルデータとの関係について説明する。メモリ
アクセス権はいくつかのレベルに分れ、メモリ保護レベ
ルもメモリアクセス権レベルと同数のレベルに分かれて
いる。
Prior to the description, the relationship between the memory access right level data and the memory protection level data will be described. The memory access right is divided into several levels, and the memory protection level is also divided into the same number of levels as the memory access right level.

メモリアクセス権レベル及びメモリ保護レベルのそれ
ぞれのレベル総数が4レベルの場合、それぞれは第10A
図に示すように、2進数表示のデータ00,01,10,11のい
ずれかのレベルデータで表わされる。一般には、メモリ
アクセス権レベルとメモリ保護レベルのそれぞれのレベ
ルの総数を2P(P:整数)とすると、メモリアクセス権レ
ベルとメモリ保護レベルは、値0〜2P−1のいずれかを
とるPビットの2進数のデータで表わされる。すなわち
番号kのレベルに対するレベルデータは、値kをもつ2
進データである。メモリ・アクセス権レベルはその値が
小さくなるほど高いレベルにあり、 メモリアクセス権レベル≦メモリ保護レベル を満たすタスクは、メモリに対してアクセス権を持つこ
とが出来る。第10B図はそれらのレベルが4レベルの場
合についてのメモリアクセス権レベルデータとそれでア
クセス可能なメモリ保護レベルデータを示す。この従来
例ではレベル番号とレベルデータの値は一致している。
If the total number of each of the memory access right level and the memory protection level is 4, each of them is 10A
As shown in the drawing, the data is represented by any one of binary data 00, 01, 10, and 11. Generally, assuming that the total number of each of the memory access right level and the memory protection level is 2 P (P: integer), the memory access right level and the memory protection level take one of the values 0 to 2 P −1. It is represented by P-bit binary data. That is, the level data for the level of the number k is 2 having the value k.
Hexadecimal data. The memory access right level is higher as the value is smaller, and a task satisfying memory access right level ≦ memory protection level can have access right to the memory. FIG. 10B shows memory access right level data and memory protection level data that can be accessed by the four levels. In this conventional example, the level number and the value of the level data match.

したがって、チェック回路82では、RAM814より読み出
されたメモリ保護レベルデータMPL-iとレベルレジスタ1
2に保持されたメモリアクセス権レベルデータMALについ
て上述の条件を満すかを判別し、この条件が満されない
ときに、その物理アドレスの上位ビット部分PA-iがその
タクスによりアクセス不可能と判断し、アクセス権チェ
ックエラー信号821をマイクロ制御ユニット(図示せ
ず)出力する。なお、この信号821が出力されないとき
には、上記物理アドレスの上位ビット部分PA-iとLAレジ
スタ13に保持された論理アドレスLAの下位ビット部分LA
-Lを出力レジスタ15にセットし、そのレジスタの内容が
アドレス変換後の物理アドレスPAとして利用される。
Therefore, in the check circuit 82, the memory protection level data MPL-i read from the RAM 814 and the level register 1
It is determined whether or not the above condition is satisfied for the memory access right level data MAL held in step 2.If this condition is not satisfied, it is determined that the upper bit portion PA-i of the physical address is inaccessible due to the task. , And outputs an access right check error signal 821 to a micro control unit (not shown). When this signal 821 is not output, the upper bit portion PA-i of the physical address and the lower bit portion LA of the logical address LA held in the LA register 13 are output.
-L is set in the output register 15, and the contents of the register are used as the physical address PA after the address conversion.

上記、従来技術においては、アドレス変換とメモリ・
アクセス権チェックをシーケンシャルに行う。このた
め、有効な物理アドレスの獲得まで、メモリ・アクセス
権チェックの時間分、余計にかかる。特にTLB81のエン
トリ数が増大する場合、論理アドレスLAの検索に要する
時間が増大し、アドレス変換ステージのみで1サイクル
必要になる。従って、メモリ・アクセス権チェックは2
サイクル目にずれこみ、有効な物理アドレス獲得まで2
サイクル必要になる。
In the prior art described above, address translation and memory
Perform access right check sequentially. For this reason, it takes extra time for the memory access right check to acquire a valid physical address. In particular, when the number of entries in the TLB 81 increases, the time required for searching for the logical address LA increases, and one cycle is required only in the address translation stage. Therefore, the memory access right check is 2
Deviated at the cycle, 2 to obtain a valid physical address
Cycle required.

大規模なTLBにおいて高速アドレス変換を行うために
は、従来方式の限界は目に見えている。本発明は、この
解決策としてアドレス変換とメモリ・アクセス権チェッ
クの同時処理することを目的とするものである。
To perform high-speed address translation in a large-scale TLB, the limitations of the conventional method are visible. An object of the present invention is to solve the above problem by simultaneously performing address conversion and memory access right check.

以下、本発明の実施例を図面により詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

まず、第2図で、本発明によるアドレス変換装置1を
内蔵するマイクロ・プロセッサ2の内部構成を説明す
る。マイクロ・プロセッサ2は、ホスト・プロセッサ
(図示せず)からの信号により起動されるコ・プロセッ
サであり、マイクロ命令を命令の基本単位となる。マイ
クロ・プロセッサ2は、マイクロ・リード・オンリー・
メモリ(以後、マイクロROMと呼ぶ)21,マイクロ制御ユ
ニット22,演算ユニット23、アドレス変換装置1、バス
制御ユニット24より構成されている。内部バスとして内
部データ・バス16、外部バスとして外部アドレス・バス
17、外部データ・バス25をもっている。ユニット21は他
ユニットを制御するマイクロ・プログラムを格納してお
り、ユニット22は他ユニットからの情報を元にマイクロ
・プログラムを制御する。ユニット23は各種演算を実行
する他アドレス変換装置に入力する論理アドレスをレジ
スタ・ファイル231に保持する。アドレス変換装置1
は、アドレス変換とメモリ・アクセス権チェックを並行
して行い、変換により得られる物理アドレスを外部アド
レス・バス17を介して外部メモリ26に送出する。バス制
御ユニット24は、外部アドレス・バス17と外部データ・
バス25の制御を行う。第2図において本発明に特徴的な
のはアドレス変換装置1がアドレス変換とメモリアクセ
ス権チェックとを並行して1マシンサイクルで行うよう
に構成されていること、およびこのアドレス変換装置1
に供給すべきマスクデータMSKをレジスタファイル231に
保持していること、および前述のアドレス変換装置1の
高速化に伴ないマイクロROM21内のマイクロプログラム
がアドレス変換およびメモリアクセス権のチェックを同
一サイクルで実行するようになっていることである。
First, with reference to FIG. 2, the internal configuration of a microprocessor 2 incorporating an address translation device 1 according to the present invention will be described. The microprocessor 2 is a coprocessor activated by a signal from a host processor (not shown), and a micro instruction is a basic unit of the instruction. Microprocessor 2 is a micro read only
It comprises a memory (hereinafter referred to as a micro ROM) 21, a micro control unit 22, an arithmetic unit 23, an address conversion device 1, and a bus control unit 24. Internal data bus 16 as internal bus, external address bus as external bus
17, has an external data bus 25. The unit 21 stores a micro program for controlling another unit, and the unit 22 controls the micro program based on information from the other unit. The unit 23 holds in the register file 231 logical addresses to be input to other address translators for executing various operations. Address translation device 1
Performs the address conversion and the memory access right check in parallel, and sends the physical address obtained by the conversion to the external memory 26 via the external address bus 17. The bus control unit 24 is connected to the external address bus 17 and the external data bus.
The bus 25 is controlled. In FIG. 2, the present invention is characterized in that the address translation device 1 is configured to perform the address translation and the memory access right check in parallel in one machine cycle.
Is stored in the register file 231, and the microprogram in the micro ROM 21 performs the address conversion and the memory access right check in the same cycle with the speeding up of the address conversion device 1 described above. That is to do it.

次に第1図に従ってアドレス変換装置1の構造を説明
する。
Next, the structure of the address translator 1 will be described with reference to FIG.

第1図において、第8図と同じ参照番号は同じものを
さす、第1図において第8図と異なる点は以下の通りで
ある。
In FIG. 1, the same reference numerals as those in FIG. 8 denote the same parts, and the differences between FIG. 1 and FIG. 8 are as follows.

TLB81Aを構成するRAM814Aには複数の物理アドレスの
それぞれの上位ビット部分PA-1〜PA-nのみを記憶し、TL
B81Aを構成する連想メモリ810Aのメモリ部812Aには、そ
れぞれの物理アドレスに対応する論理アドレスのそれぞ
れの上位ビット部分LA-1〜LA-nと、それぞれの物理アド
レスに割りあてられたメモリ保護レベルデータMPL-1〜M
PL-nを互いに対にして記憶している。連想メモリ810Aの
デコーダとしてメモリ部812Aのメモリ保護レベルデータ
MPL-1〜MPL-nを記憶する部分に対してデコーダ811Aが設
けられている。このデコーダは、メモリ保護レベルMPL-
1,MPL-2,……又はMPL-nの各ビット位置に対応してそれ
ぞれ設けられた3つの部分デコーダ811A-1〜811A-3から
なる。これらの部分デコーダはデコーダ811内の部分デ
コーダ811-1〜811-mと同じ構造を有する。この部分デコ
ーダの各々は、レベルレジスタ12内のデータの一つのビ
ットと、本発明で新たに設けられたマスクレジスタ11A
内のマスクデータMSKの内の対応するビットが入力され
る。レベルレジスタには、実行中のタスクのメモリアク
セス権レベルとは無関係に比較用のデータとして、3ビ
ットの1の列がセットされている。このマスクデータMS
Kは、レベルレジスタ12内の比較用データのビット数と
同じビット数を有する。このマスクデータMSKのあるビ
ットの値が1のときには、連想メモリ810Aに、そのビッ
トに対応するレベルレジスタ12内の比較用データのビッ
トについての一致検索のための比較を行うことを連想メ
モリ810Aに指示し、そのビットの値が0のときには、そ
のビット位置に対応するレベルレジスタ内の比較用デー
タのビットについて上記比較を行なわず、そのビットに
ついて一致が得られたものとすべきことを連想メモリ81
0Aに指示する点ではマスクレジスタ11内のマスクデータ
と同じ目的でマスクレジスタ11Aが用いられるが、本実
施例では従来例と異なり、このマスクデータのあるビッ
トは0にもなりうる。すなわち、このマスクデータMSK
の値は、アドレス変換を要求したタスクに割りあてられ
たメモリアクセス権レベルデータに等しくしてある。本
発明で用いるメモリアクセス権レベルデータおよびメモ
リ保護レベルデータが従来例と異なる。
The RAM 814A constituting the TLB81A stores only the upper bit portions PA-1 to PA-n of each of a plurality of physical addresses,
The memory portion 812A of the associative memory 810A constituting the B81A includes upper bits LA-1 to LA-n of a logical address corresponding to each physical address and a memory protection level assigned to each physical address. Data MPL-1 to M
PL-n is stored in pairs. Memory protection level data of the memory unit 812A as a decoder of the associative memory 810A
A decoder 811A is provided for a part storing MPL-1 to MPL-n. This decoder uses the memory protection level MPL-
.. Or MPL-n. Each of the partial decoders 811A-1 to 811A-3 is provided corresponding to each bit position. These partial decoders have the same structure as the partial decoders 811-1 to 811-m in the decoder 811. Each of the partial decoders includes one bit of data in the level register 12 and a mask register 11A newly provided in the present invention.
The corresponding bit in the mask data MSK is input. In the level register, a 3-bit 1 column is set as comparison data regardless of the memory access right level of the task being executed. This mask data MS
K has the same number of bits as the number of bits of the comparison data in the level register 12. When the value of a certain bit of the mask data MSK is 1, the associative memory 810A instructs the associative memory 810A to perform a comparison for a match search for the bit of the comparison data in the level register 12 corresponding to the bit. When the value of the bit is 0, the associative memory indicates that the comparison should not be performed for the bit of the comparison data in the level register corresponding to the bit position, and that a match should be obtained for the bit. 81
Although the mask register 11A is used for the same purpose as the mask data in the mask register 11 in the point of designating 0A, a certain bit of the mask data can be 0 in the present embodiment, unlike the conventional example. That is, this mask data MSK
Is equal to the memory access right level data assigned to the task that has requested the address translation. The memory access right level data and the memory protection level data used in the present invention are different from the conventional example.

以下、上記2つのレベルデータについて説明する。第
3A図に示すように、レベル総数が4つの場合メモリアク
セス権レベルデータとメモリ保護レベルデータはいずれ
も、レベル番号iのときにi個の値“1"のビット又はビ
ット列をそれぞれの先頭部に有する3ビットのデータと
なるようにする。より一般的には、上記2種のレベルデ
ータの各々は、そのレベル総数がkのとき、レベルlに
対してはl個の値“1"のビット又はビット列をその先頭
部に有するk−1ビットのデータで表わす。
Hereinafter, the two level data will be described. No.
As shown in FIG. 3A, when the total number of levels is 4, both the memory access right level data and the memory protection level data have i bits or bit strings of value “1” at the beginning of each at the level number i. 3 bit data. More generally, when the total number of levels is k, each of the above two types of level data has, for level 1, k−1 bits having 1 value “1” or a bit string at the head thereof. Expressed by bit data.

従来例と同じくあるメモリアクセス権レベルアクセス
可能なメモリ領域のメモリ保護レベルは前者以下のレベ
ルである。したがって第3A図に示したメモリアクセス権
でデータアクセス可能なメモリ領域のメモリ保護レベル
データは第3B図に示すものとなる。
Similar to the conventional example, the memory protection level of a memory area accessible by a certain memory access right level is lower than the former level. Accordingly, the memory protection level data of the memory area accessible by the memory access right shown in FIG. 3A is as shown in FIG. 3B.

すなわち、あるメモリアクセス権レベルデータでアク
セス可能なメモリ領域のメモリ保護レベルデータは、前
者の値“1"のビット位置に対応するビット位置(第3B図
で○で囲ったビット位置)値1となっているものであ
り、それ以外のビット位の値は前者の対応するデータの
値と異なっていてもよい。いいかえると、あるメモリア
クセス権レベルデータの値“1"すべてのビットについ
て、あるメモリ保護レベルデータの値が1であるかを調
べることにより、そのメモリ保護レベルデータが与えら
れたメモリ領域がそのメモリアクセス権レベルデータで
アクセス可能なものであるか否かを判別できる。同じ判
別方法により、メモリアクセス権レベル0に対するレベ
ルデータのごとくその全ビットの値が0のとき、そのレ
ベルデータはすべてのメモリ保護レベルをアクセスして
よいことも分かる。
That is, the memory protection level data of the memory area accessible by a certain memory access right level data includes a bit position (a bit position circled in FIG. 3B) corresponding to the bit position of the former value “1” and a value 1 The values of the other bit positions may be different from the corresponding data values of the former. In other words, by checking whether the value of a certain memory protection level data is 1 for all bits of the value “1” of a certain memory access right level data, the memory area to which the memory protection level data is given is stored in that memory. It is possible to determine whether or not the access right level data is accessible. According to the same determination method, when the values of all the bits are 0 as in the level data for the memory access right level 0, it can be understood that the level data may access all the memory protection levels.

第1図の実施例はこのことを利用したものであり、マ
スクレジスタ11A内のマスクデータとして、アドレス変
換を要求したタスクに割りあてられたメモリアクセス権
レベルデータと同じデータをマスクデータとしてセット
し、レベルレジスタ12にはすべて“1"の値のビット列を
セットすることにより、連想メモリ810Aに、そのレベル
データの値が1の一つ又は複数のビット位置のすべてに
ついてのみ、記憶されたメモリ保護レベルデータMPL-1
〜MPL-nのいずれかがレベルレジスタ12内の値“1"と一
致するかを判別させ、それ以外のビット位置については
この判別は行なわないようにするものである。もし、上
記一つ又は複数のビット位置のすべてで一致が検出され
たメモリ保護レベルデータMPL-iが検出された場合、そ
のデータは上記メモリアクセス権レベルデータでアクセ
ス可能なものであると判別できる。
The embodiment of FIG. 1 utilizes this fact, and sets, as mask data in the mask register 11A, the same data as the memory access right level data allocated to the task which has requested the address translation as mask data. By setting a bit string having a value of "1" in the level register 12, the associative memory 810A stores the level data value in only one or a plurality of bit positions of the memory protection. Level data MPL-1
... MPL-n is determined to match the value “1” in the level register 12, and this determination is not performed for other bit positions. If the memory protection level data MPL-i in which a match is detected at all of the one or more bit positions is detected, it can be determined that the data is accessible with the memory access right level data. .

以上から明らかなとおり、レベルレジスタ12にセット
すべきデータは、マスクデータMSKが値1のビットにつ
いて値1であればよいので、レベルレジスタ12内の比較
用データはマスクデータMSKと同じくメモリアクセス権
レベルデータそのものでもよい。より一般的には、各メ
モリアクセス権レベルデータ値1のビットと同じビット
位置において値1を有しておればよい。本実施例ではそ
の最も簡単なデータとしてオール“1"のビット列を用い
る。これはどのメモリアクセス権レベルデータに対して
も用いられる最も簡単なデータであるからである。
As is clear from the above, since the data to be set in the level register 12 only needs to be the value 1 for the bit of the value 1 of the mask data MSK, the comparison data in the level register 12 has the same memory access right as the mask data MSK. The level data itself may be used. More generally, it is only necessary to have the value 1 at the same bit position as the bit of each memory access right level data value 1. In this embodiment, a bit string of all "1" is used as the simplest data. This is because this is the simplest data used for any memory access right level data.

このように本発明は、メモリアクセス権レベルデータ
の特定の一つ又は複数のビット位置において一致するメ
モリ係数レベルデータがあるか否かを検出することによ
り、そのメモリアクセス権レベルデータがアクセスして
もよいメモリ保護レベルデータを検出可能とするもので
ある。
As described above, the present invention detects whether or not there is memory coefficient level data that matches at one or more specific bit positions of the memory access right level data, so that the memory access right level data can be accessed. This makes it possible to detect good memory protection level data.

以下、第1図の装置の動作を第4図のタイムチャート
を参照して説明する。
Hereinafter, the operation of the apparatus of FIG. 1 will be described with reference to the time chart of FIG.

マスクレジスタ11内のオール1のビット列に応答し
て、デコーダ811は、LAレジスタ13内の論理アドレスLA
の上位ビット部分の各ビットの値に対応した信号をメモ
リ部812Aへ送出し、一方、デコーダ811Aは、マスクレジ
スタ11A内のマスクデータMSKの内、値1のビットに対し
ては、レベルレジスタ12内の対応するビット位置の値1
に対応する信号をメモリ部812Aに送出し、マスクデータ
MSKの値0のビットに対しては、レベルレジスタ12内の
対応するビット位置の値(“1")に無関係に比較動作を
無効とする信号をメモリ部812Aに送る。メモリ部812A
は、デコーダ811,811Aの出力に応答して、LAレジスタ13
内の論理アドレスLAの上位ビット部分とLA-uと一致する
論理アドレス上位ビット部分LA-uと上記比較動作を無効
とする信号が入力されたビット位置以外についてレベル
レジスタ12内の値1と一致するビットを有するメモリ保
護レベルデータMPL-iとを有するエントリがあるとき
に、そのエントリに対応する、ヒットライン群815の一
つに“1"を出力し、RAM814Aはこのヒットラインに対応
するエントリの物理アドレスPA-iを出力する。これは、
LAレジスタ13内の論理アドレス下位ビット部分LA-Lと組
み合わさって、物理アドレスPAとして出力レジスタ15に
セットされ外部アドレスバス17を介して外部メモリ26へ
送出される。もし、上記ヒットエントリがないときに
は、ゲート813がミスヒット信号をマイクロ制御22ユニ
ット(第2図)へ出力する。第5図に部分デコーダ811A
-3およびメモリセル51を示す。他の部分デコーダ811-1
〜811-mおよび811A-1〜811A-2も部分デコーダ811A-3と
同じ構造を有する。メモリ部812A内の他のメモリセル51
と同じ構造を有する。部分デコーダ811A-3はインバータ
回路500、アンド回路501,502から構成されている。121a
はレベルレジスタ12の一つのビット(“1")が入力され
る信号数であり、112aはマスク・レジスタ11又は11Aの
一つのマスクビットを入力とする信号線である。503は
アドレス・データ・イネーブル信号ADEを制御部140から
入力するための信号線である。部分デコーダ811A-3は信
号線112a上の信号が1の場合、ワード線145a,146aに、
入力線121a上の信号と等しい信号およびこれを反転した
信号を出力する。一方、信号線112a上の信号が0の場
合、ワード線145a,146a上の上記信号をともに“0"にす
る。
In response to the all-ones bit string in the mask register 11, the decoder 811 outputs the logical address LA in the LA register 13.
The decoder 811A sends a signal corresponding to the value of each bit of the upper bit portion of the mask data MSK in the mask register 11A to the level register 12 for the bit of value 1 in the mask data MSK in the mask register 11A. The value of the corresponding bit position in
Is transmitted to the memory unit 812A, and the mask data
For the bit of the MSK value 0, a signal for invalidating the comparison operation is sent to the memory unit 812A regardless of the value (“1”) of the corresponding bit position in the level register 12. Memory unit 812A
Responds to the outputs of the decoders 811, 811A,
The logical address upper bit part LA-u that matches the upper bit part of the logical address LA and the logical address upper bit part LA-u that matches the value 1 in the level register 12 other than the bit position where the signal invalidating the comparison operation is input When there is an entry having the memory protection level data MPL-i having the corresponding bit, "1" is output to one of the hit line groups 815 corresponding to the entry, and the RAM 814A stores the entry corresponding to this hit line. Output the physical address PA-i. this is,
Combined with the logical address lower bit portion LA-L in the LA register 13, it is set in the output register 15 as a physical address PA and sent to the external memory 26 via the external address bus 17. If there is no hit entry, the gate 813 outputs a mishit signal to the microcontroller 22 unit (FIG. 2). FIG. 5 shows a partial decoder 811A.
-3 and the memory cell 51 are shown. Other partial decoder 811-1
81811-m and 811A-111811A-2 also have the same structure as the partial decoder 811A-3. Other memory cells 51 in the memory unit 812A
Has the same structure as The partial decoder 811A-3 includes an inverter circuit 500 and AND circuits 501 and 502. 121a
Is the number of signals to which one bit ("1") of the level register 12 is input, and 112a is a signal line to which one mask bit of the mask register 11 or 11A is input. 503 is a signal line for inputting the address data enable signal ADE from the control unit 140. When the signal on the signal line 112a is 1, the partial decoder 811A-3 connects to the word lines 145a and 146a,
A signal equal to the signal on the input line 121a and a signal obtained by inverting the signal are output. On the other hand, when the signal on the signal line 112a is 0, the above signals on the word lines 145a and 146a are both set to "0".

メモリ・セル51は、nMOSトランジスタからなる回路
で、ワード線145aおよびこのメモリセルに対応して設け
られたヒットライン149aに接続された2段回路505およ
びワード線146aおよびヒットライン149aに接続された2
段回路506および2段回路505,506に接続された、インバ
ータ回路507と508よりなるラッチとより構成されてい
る。このメモリセルでは信号線511に信号を記憶するも
のでこの信号線511の電位値が記憶されたデータの値に
対応する。
The memory cell 51 is a circuit composed of an nMOS transistor, and is connected to a word line 145a, a two-stage circuit 505 connected to a hit line 149a provided corresponding to the memory cell, and a word line 146a and a hit line 149a. 2
It comprises a latch composed of inverter circuits 507 and 508 connected to the stage circuit 506 and the two-stage circuits 505 and 506. In this memory cell, a signal is stored in the signal line 511, and the potential value of the signal line 511 corresponds to the value of the stored data.

以下、このメモリセル51がメモリ部812Aの最上方エン
トリでメモリ保護レベルデータMPL-1の最下位ビットを
保持している場合について第6A図から第6c図を参照し
て、メモリセル51の動作を説明する。メモリセルの動作
は、(a)そのメモリセルの情報と信号線121aの信号を
比較した結果、一致するケース、(b)上記比較を無効
化するケース、(c)上記比較の結果不一致になるケー
スの3ケースよりなる。
Hereinafter, a case where the memory cell 51 holds the least significant bit of the memory protection level data MPL-1 in the uppermost entry of the memory unit 812A will be described with reference to FIGS. 6A to 6c. Will be described. The operation of the memory cell is as follows: (a) the case where the information of the memory cell is compared with the signal of the signal line 121a, the result is a match; (b) the case where the comparison is invalidated; It consists of three cases.

(a)比較した結果、一致するケース(第6A図) このケースは、マスク・レジスタ11AのマスクデータM
SKが‘111'でメモリ部812A内のメモリ保護レベルデータ
が‘111'である場合に生ずる。すなわち、このケースは
信号線112aは‘1'であり、メモリ保護レベルデータMPL-
1の最下位ビットを示す信号レベルを有する信号線511の
信号値は‘1'である場合に生じる。
(A) Case where the result of comparison is a match (Fig. 6A) This case is the case where the mask data M in the mask register 11A is
This occurs when SK is “111” and the memory protection level data in the memory unit 812A is “111”. That is, in this case, the signal line 112a is “1” and the memory protection level data MPL-
This occurs when the signal value of the signal line 511 having the signal level indicating the least significant bit of 1 is “1”.

まずヒット・ライン149aには,アドレス変換サイクル
の前サイクルT3〜T4に電源153よりチャージが蓄積され
る。これをプリチャージと呼ぶ。次にアドレス変換サイ
クルのT1〜T2で信号ADE503が‘1'になると、信号線112
a,121aが共に‘1'であるためアンド回路501の出力につ
ながったワード線145aは‘1'となる。アンド回路502の
出力につなかったワード線146aはインバータ500の出力
が‘0'となるため‘0'となる。この時、nMOS2段回路50
5,506は、非導通状態になってヒットライン149aのチャ
ージは保たれる。nMOS2段回路505が非導通となるのは、
信号線511の信号が‘1'であるためnMOSゲート入力線514
は‘0'となりアース側のnMOSが非導通となるためであ
る。同様にnMOS2段回路506は、nMOSゲート入力線515が
‘0'となりヒットライン149a側のnMOSが非導通となるた
め、非導通が状態となる。nMOS2段回路505と506が非導
通状態となるため,第6A図に示すようにヒットライン14
9aは‘1'のまま保たれ、比較は一致したことを示す。
The first hit lines 149a, charge is accumulated from the power supply 153 before the cycle T 3 through T 4 address conversion cycle. This is called precharge. Next, when the signal ADE503 becomes “1” in the address translation cycle from T 1 to T 2 , the signal line 112
Since both a and 121a are “1”, the word line 145a connected to the output of the AND circuit 501 becomes “1”. The word line 146a that has not been connected to the output of the AND circuit 502 becomes “0” because the output of the inverter 500 becomes “0”. At this time, the nMOS two-stage circuit 50
5,506 becomes non-conductive and the charge of the hit line 149a is maintained. The nMOS two-stage circuit 505 becomes non-conductive because
Since the signal on the signal line 511 is “1”, the nMOS gate input line 514
Is "0" and the ground-side nMOS becomes non-conductive. Similarly, in the nMOS two-stage circuit 506, the nMOS gate input line 515 becomes '0', and the nMOS on the hit line 149a side becomes non-conductive, so that the non-conductive state is established. Since the nMOS two-stage circuits 505 and 506 are turned off, the hit line 14 shown in FIG.
9a was kept at '1', indicating that the comparison was consistent.

(b)比較を無効化するケース(第6B図) このケースはマスク・レジスタ11AのマスクデータMSK
が‘110'でメモリ部812Aのメモリ保護レベルデータMPL-
1が‘110'又は‘111'の場合に生じる。すなわちこのケ
ースはMSKの最下位ビットを入力する信号線112aは‘0'
であり、メモリ保護レベルの最下位ビットを示すメモリ
内容信号線511は‘0'又は‘1'となる場合に生じる。信
号線511が‘0'でも‘1'でも比較の結果は一致している
とみなされる。
(B) Case where comparison is invalidated (Fig. 6B) This case is the mask data MSK of the mask register 11A.
Is '110' and the memory protection level data MPL-
Occurs when 1 is '110' or '111'. That is, in this case, the signal line 112a for inputting the least significant bit of MSK is '0'
This occurs when the memory content signal line 511 indicating the least significant bit of the memory protection level becomes “0” or “1”. Regardless of whether the signal line 511 is “0” or “1”, the result of the comparison is considered to be consistent.

(a)のケースと同様にしてヒットライン149aにはア
ドレス変換の前サイクルT3〜T4にプリチャージが行なわ
れる。信号線112aが‘0'であるためワード線145a,146a
は共に‘0'となる。従ってnMOSゲート入力線513,515が
共に‘0'となるnMOS2段回路505と506は非導面状態とな
り、ヒットライン149aのチャージは保たれる。この結
果、第6B図に示すようにヒットライン149aは‘1'のまま
保たれ、比較した結果は一致したとみなされる。
The case and the hit lines 149a in the same manner as in (a) pre-charged to the previous cycle T 3 through T 4 of the address translation is performed. Since the signal line 112a is '0', the word lines 145a, 146a
Are both '0'. Therefore, the nMOS two-stage circuits 505 and 506 in which the nMOS gate input lines 513 and 515 are both “0” are in the non-conductive surface state, and the charge of the hit line 149a is maintained. As a result, as shown in FIG. 6B, the hit line 149a is kept at “1”, and the result of the comparison is considered to be the same.

(c)比較した結果、不一致になるケース(第6C図) このケースはマスク・レジスタ11A内のマスクデータM
SKが‘111'でメモリ部812A内のメモリ保護レベルデータ
MPL-1が‘110'である場合に生じる。つまり、従ってマ
スクデータMSKの最下位ビットを入力する信号線112aは
‘1'であり、メモリ保護レベルデータMPL-1の最下位ビ
ットを示すメモリ内信号線511が‘0'である場合に生じ
る。第6図に示すようにケース(a),(b)と同様に
してアドレス変換の前サイクルT3〜T4にプリチャージが
行なわれる。アドレス変換サイクルのT1〜T2で信号ADE5
03が‘1'になると、(a)のケースと同様にしてアンド
回路501,502の出力145a,146aはそれぞれ‘1',‘0'とな
る。従ってnMOSゲート入力線513,514は共に‘1'となりn
MOS2段回路505は導通状態となりヒットライン149aのチ
ャージはアースへ流れる。この結果、第6C図に示すよう
にヒットライン149aは‘0'となり比較の結果は不一致で
あることを示す。
(C) Case where the comparison results in a mismatch (FIG. 6C) This case corresponds to the mask data M in the mask register 11A.
SK is '111' and memory protection level data in memory unit 812A
Occurs when MPL-1 is '110'. That is, the signal line 112a for inputting the least significant bit of the mask data MSK is “1”, and this occurs when the in-memory signal line 511 indicating the least significant bit of the memory protection level data MPL-1 is “0”. . Case (a) as shown in FIG. 6, the precharge is performed to the preceding cycle T 3 through T 4 address conversion similar to (b). Signal T 1 through T 2 address translation cycle ADE5
When 03 becomes "1", the outputs 145a and 146a of the AND circuits 501 and 502 become "1" and "0", respectively, as in the case of (a). Therefore, both nMOS gate input lines 513 and 514 become '1' and n
The MOS two-stage circuit 505 becomes conductive and the charge of the hit line 149a flows to the ground. As a result, as shown in FIG. 6C, the hit line 149a becomes “0”, indicating that the comparison result is inconsistent.

上記に述べたメモリセルの動作はメモリ部812A内の全
ビットについて共通である。あるエントリの全ビットで
比較した結果が一致した時ヒットライン149aは‘1'のま
まであり、1ビットでも比較した結果が不一致になれば
ヒットライン149aは‘0'となる。即ち、有効なエントリ
が検索されたかどうかは各エントリのヒットラインの値
によって判別できる。
The operation of the memory cell described above is common to all bits in the memory unit 812A. The hit line 149a remains "1" when the comparison result of all the bits of a certain entry matches, and the hit line 149a becomes "0" if the comparison result does not match even with one bit. That is, whether a valid entry has been searched can be determined based on the value of the hit line of each entry.

ヒット・エントリがなければ、ゲート813の出力、818
は‘1'となるので、これをミスヒット信号としてマイク
ロ制御ユニット27(第2図)へ伝達する。
If there is no hit entry, the output of gate 813, 818
Becomes '1', which is transmitted to the micro control unit 27 (FIG. 2) as a mishit signal.

以下、この場合のマイクロプロセッサ処理を説明す
る。
Hereinafter, the microprocessor processing in this case will be described.

マイクロ制御ユニット22はミスヒット信号を受ける
と、マイクロROM21に格納されている不一致時処理用マ
イクロ・プログラムを起動する。このマイクロ・プログ
ラムは、まず不一致の原因がLA1の不一致なのか、メモ
リ・アクセス権チェック・エラーなのかを判定して、そ
れぞれのエラー処理を行う。第7図にこの判定処理のマ
イクロ・プログラムのフローチャートを示す。
When receiving the mishit signal, the micro control unit 22 activates the inconsistency processing micro program stored in the micro ROM 21. The microprogram first determines whether the cause of the mismatch is LA1 mismatch or a memory access right check error, and performs each error processing. FIG. 7 shows a flowchart of the micro program of this determination processing.

まず、レジスタ・ファイル231より内部データ・バス1
6を介して、マスク・レジスタ11AのMSKに‘000'をセッ
トする(ステップ71)。すなわち、メモリ保護レベルデ
ータについての比較を無効化する。次に、メモリ部812A
において論理アドレスの上位ビット部LA-uを保持するエ
ントリを検索する(ステップ72)。検索の結果ヒットエ
ントリがあるかを判定し(ステップ73)、ヒットエント
リがあり、ミスヒット信号818は出力されない場合は、
先の不一致のメモリ・アクセス権チェックエラー処理74
を行い、ヒット・エントリがなく、ミスヒット信号818
が出力されると、論理アドレスの上位ビット部LA-uに等
しい論理アドレスを保持するエントリが無いと判定で
き、このときの処理を行う(ステップ75)。ステップ7
4,75の処理は、従来技術と同様であり、ここでは省略す
る。
First, the internal data bus 1
'000' is set to the MSK of the mask register 11A via 6 (step 71). That is, the comparison of the memory protection level data is invalidated. Next, the memory unit 812A
Is searched for an entry holding the upper bit part LA-u of the logical address (step 72). It is determined whether there is a hit entry as a result of the search (step 73). If there is a hit entry and the mishit signal 818 is not output,
Unmatched memory access right check error processing 74
And there is no hit entry and the mishit signal 818
Is output, it can be determined that there is no entry holding the logical address equal to the upper bit part LA-u of the logical address, and the processing at this time is performed (step 75). Step 7
The processing of 4,75 is the same as that of the prior art, and is omitted here.

以上において、メモリ保護レベルデータおよびメモリ
アクセス権データとして第3A図に示したものを用いた
が、本発明はこれに限定されるものでなく、特許請求の
範囲内での種々の変形を含むものである。
In the above, the data shown in FIG. 3A is used as the memory protection level data and the memory access right data, but the present invention is not limited to this and includes various modifications within the scope of the claims. .

[発明の効果] 本発明によれば、従来シーケンシャルに行っていたア
ドレス変換とメモリ・アクセス権チェックを同時に行な
うことができる。このため、従来アドレス変換時間に加
えて必要だったメモリ・アクセス権チェックのための時
間が不要となった。メモリ保護機能を内蔵したメモリ管
理ユニットの高速化を実現することができる。
[Effects of the Invention] According to the present invention, address conversion and memory access right check, which are conventionally performed sequentially, can be performed simultaneously. For this reason, the time for checking the memory access right, which was required in addition to the address conversion time in the related art, is not required. A high-speed memory management unit having a built-in memory protection function can be realized.

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

第1図は本発明によるアドレス変換装置の概略ブロック
図、第2図は、第1図のアドレス変換装置を含むマイク
ロ・プロセッサのシステム構成図、第3A図は第2図の装
置に用いるメモリ保護レベルデータとメモリアクセス権
データを示す図、第3B図は第1図の装置を用いる各メモ
リアクセス権レベルデータでアクセス可能なメモリ保護
レベルデータを示す図、第4図は第1図の装置の動作の
タイムチャート、第5図は第1図の装置に用いる部分デ
コーダとメモリセルの詳細回路図、第6A図から第6C図は
第5図の装置の動作タイミング・チャート、第7図は第
2図の装置における不一致処理のフローチャート、第8
図は従来のアドレス変換装置の概略ブロック図、第9図
は第8図の装置の動作のタイムチャート、第10図は第8
図の装置に用いるメモリアクセス権レベルデータとメモ
リ保護レベルデータを示す図である。
FIG. 1 is a schematic block diagram of an address translation device according to the present invention, FIG. 2 is a system configuration diagram of a microprocessor including the address translation device of FIG. 1, and FIG. 3A is a memory protection used in the device of FIG. FIG. 3B is a diagram showing level data and memory access right data, FIG. 3B is a diagram showing memory protection level data accessible by each memory access right level data using the device of FIG. 1, and FIG. 4 is a diagram of the device of FIG. 5 is a detailed circuit diagram of a partial decoder and a memory cell used in the device of FIG. 1, FIGS. 6A to 6C are operation timing charts of the device of FIG. 5, and FIG. Flow chart of mismatch processing in the apparatus shown in FIG.
FIG. 9 is a schematic block diagram of a conventional address translation device, FIG. 9 is a time chart of the operation of the device of FIG. 8, and FIG.
FIG. 3 is a diagram showing memory access right level data and memory protection level data used in the device shown in FIG.

フロントページの続き (72)発明者 河崎 俊平 東京都小平市上水本町1450番地 株式会 社日立製作所武蔵工場内 (72)発明者 天野 亘孝 神奈川県川崎市麻生区王禅寺1099番地 株式会社日立製作所システム開発研究所 内 (72)発明者 大江 公夫 東京都小平市上水本町1479番地 日立マ イクロコンピュータエンジニアリング株 式会社内 (56)参考文献 特開 昭61−156347(JP,A)Continuing from the front page (72) Inventor Shunpei Kawasaki 1450 Kamisumihonmachi, Kodaira-shi, Tokyo Inside Musashi Plant of Hitachi, Ltd. Within the Development Laboratory (72) Inventor Kimio Oe 1479, Kamizuhoncho, Kodaira-shi, Tokyo Within Hitachi Microcomputer Engineering Co., Ltd. (56) References JP-A-61-156347 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】演算ユニットから供給された論理アドレス
と、値が小さい程高いメモリアクセス権を示す0以上n
(nは自然数)以下の整数値であるマスクデータとに対
応する物理アドレスを出力するためのアドレス変換装置
であって、 論理アドレスと、当該論理アドレスに対応する物理アド
レスのメモリ保護レベルの値が整数m(mは0以上n以
下)の場合は第1ビットから第mビットまでが1であり
残りが0であるnビットのデータであるメモリ保護レベ
ルの組からなるエントリを保持するメモリ部と、 前記演算ユニットから供給された論理アドレスを保持す
る前記メモリ部のエントリの検索と、前記演算ユニット
から供給された先頭からiビットまでが1であり残りが
0であるnビットのデータとして示されたマスクデータ
に対して、少なくとも先頭から第iビットまでが1のメ
モリ保護レベルを保持するエントリの検索とを並列に実
行することにより、前記演算ユニットから供給された論
理アドレスとマスクデータとに対応するエントリを抽出
する検索手段とを有する連想メモリを備え、 前記メモリ部の各エントリに対応する物理アドレスを保
持するRAMと、 前記検索手段が対応するエントリを抽出したことに応じ
て、前記RAMに保持された当該エントリに対応する物理
アドレスを出力する手段と、 前記検索手段がエントリを抽出できなかったことに応じ
て、ミスヒット信号を出力する手段とを備えたことを特
徴とするアドレス変換装置。
1. A logical address supplied from an arithmetic unit and 0 to n indicating a higher memory access right as the value is smaller.
An address translation device for outputting a physical address corresponding to mask data which is an integer value of (n is a natural number) or less, wherein a logical address and a memory protection level value of a physical address corresponding to the logical address are A memory unit for holding an entry consisting of a set of memory protection levels, which are n-bit data in which the first bit to the m-th bit are 1 and the remaining bits are 0 when m is an integer from 0 to n; A search for an entry in the memory unit that holds the logical address supplied from the arithmetic unit, and the n-bit data supplied from the arithmetic unit is represented as n-bit data in which the first to i bits are 1 and the rest are 0. Search for an entry having a memory protection level of at least 1 from the beginning to the i-th bit is 1 for the mask data set A RAM that holds a physical address corresponding to each entry of the memory unit, further comprising an associative memory having search means for extracting an entry corresponding to the logical address and the mask data supplied from the arithmetic unit; A means for outputting a physical address corresponding to the entry held in the RAM in response to the search means extracting the corresponding entry; and a mishit in response to the search means not being able to extract the entry. Means for outputting a signal.
JP63152336A 1987-06-22 1988-06-22 Address translation device Expired - Fee Related JP2728434B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63152336A JP2728434B2 (en) 1987-06-22 1988-06-22 Address translation device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP15332987 1987-06-22
JP62-153329 1987-06-22
JP63152336A JP2728434B2 (en) 1987-06-22 1988-06-22 Address translation device

Publications (2)

Publication Number Publication Date
JPS6478343A JPS6478343A (en) 1989-03-23
JP2728434B2 true JP2728434B2 (en) 1998-03-18

Family

ID=26481282

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63152336A Expired - Fee Related JP2728434B2 (en) 1987-06-22 1988-06-22 Address translation device

Country Status (1)

Country Link
JP (1) JP2728434B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH035854A (en) * 1989-06-01 1991-01-11 Matsushita Electric Ind Co Ltd Address conversion device and exception detection system in address conversion device
JP4335940B2 (en) 2007-11-29 2009-09-30 Necエレクトロニクス株式会社 Data processing apparatus and peripheral device protection method in data processing apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0186230A2 (en) * 1984-12-21 1986-07-02 Koninklijke Philips Electronics N.V. Memory access controller with parallel checking of virtual address and action word

Also Published As

Publication number Publication date
JPS6478343A (en) 1989-03-23

Similar Documents

Publication Publication Date Title
US5784709A (en) Translating buffer and method for translating addresses utilizing invalid and don't care states
US5617348A (en) Low power data translation circuit and method of operation
JPH0315211B2 (en)
JPH0814801B2 (en) Programmable access memory
JPH08101797A (en) Translation lookaside buffer
JPH11161547A (en) Storage device for data processor and method for accessing storage place
JPH05225053A (en) High-speed tag comparison and bank selection in set associative cache
JPH06222996A (en) High-speed virtual physical address conversion as well as method and system for collation of cache tag
US7117196B2 (en) Method and system for optimizing leaf comparisons from a tree search
JP3045952B2 (en) Full associative address translator
US5218687A (en) Method and apparatus for fast memory access in a computer system
KR910001314B1 (en) Method for operating data processing system
KR20010029993A (en) Address conversion circuit
US5463760A (en) Break function in-circuit emulator for a microprocessor with a cache memory
US4280177A (en) Implicit address structure and method for accessing an associative memory device
JPH08235068A (en) Processing system and method for operation of processing system
US5295253A (en) Cache memory utilizing a two-phase synchronization signal for controlling saturation conditions of the cache
JP2728434B2 (en) Address translation device
KR910007029B1 (en) Address translation apparatus
JPH05198186A (en) Associative memory system
CN110580231B (en) Processing circuit, buffer, memory and processor
JPH0695967A (en) Data processor
US6226731B1 (en) Method and system for accessing a cache memory within a data-processing system utilizing a pre-calculated comparison array
JPS623354A (en) Cache memory access system
US6418524B1 (en) Method and apparatus for dependent segmentation and paging processing

Legal Events

Date Code Title Description
S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313117

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees