JPH06202954A - Tag comparator and translation look-aside buffer using the comparator - Google Patents

Tag comparator and translation look-aside buffer using the comparator

Info

Publication number
JPH06202954A
JPH06202954A JP4347621A JP34762192A JPH06202954A JP H06202954 A JPH06202954 A JP H06202954A JP 4347621 A JP4347621 A JP 4347621A JP 34762192 A JP34762192 A JP 34762192A JP H06202954 A JPH06202954 A JP H06202954A
Authority
JP
Japan
Prior art keywords
bits
tag
page
logical address
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.)
Withdrawn
Application number
JP4347621A
Other languages
Japanese (ja)
Inventor
Hiromasa Takahashi
宏政 高橋
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP4347621A priority Critical patent/JPH06202954A/en
Publication of JPH06202954A publication Critical patent/JPH06202954A/en
Withdrawn 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)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To vary the page size and to reduce the circuit scale of a TLB. CONSTITUTION:The logical addresses VA are divided into bits VA0-VA5, VA6-VA10, VA11-VA19, and VA20-VA31 in the order of higher places. Then the bits VA11-VA19 are divided into (k) bits of higher place variable length and (9-k) bits of lower place variable length (0<=k<=9) based on a page size code B. The lower (9-k+12) bits of the address VA are identical with the page offset. A higher place tag comparator 41 decides whether the bits VA0-VA5 are equal to the tags TAG0-TAG5 or not. Meanwhile a lower place tag comparator 42 decides whether the bits VA11-VA19 are equal to the tags TAG11-TAG19 or not in terms of the comparison valid bits. Then a switch circuit 43 validates only the comparison of higher (k) bits among those comparison results of the comparator 42 based on the page size code B.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、メモリ管理ユニット
(MMU)のTLB(トランスレーション・ルック・ア
サイド・バッファ)に適用されるタグ比較回路及びこれ
を用いたTLBに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tag comparison circuit applied to a TLB (translation look aside buffer) of a memory management unit (MMU) and a TLB using the tag comparison circuit.

【0002】[0002]

【従来の技術】論理アドレスから物理アドレスへの変換
をハードウェア構成で高速に行うために、OS(オペレ
ーティング・システム)によるアドレス変換処理で得ら
れた論理アドレス/物理アドレス対は、CPUチップ又
は周辺チップに備えられたTLBに保持される。このT
LBは、MMUの主要な構成要素である。
2. Description of the Related Art In order to convert a logical address to a physical address at high speed with a hardware configuration, a logical address / physical address pair obtained by an address conversion process by an OS (operating system) is a CPU chip or a peripheral. It is held in the TLB provided on the chip. This T
The LB is the main component of the MMU.

【0003】図6は、従来のTLBのブロック構成を示
す。
FIG. 6 shows a block structure of a conventional TLB.

【0004】論理アドレスVAを保持するレジスタ10
は、上位側からタグフィールド11と、テーブル参照ア
ドレスフィールド12と、ページオフセットフィールド
13とに分けられる。一方、テーブルレジスタ群20
は、例えば64エントリーを有し、各エントリーは、タ
グフィールド21と、物理ページフィールド22とに分
けられている。テーブルレジスタ群20のエントリー
は、フィールド12に保持されているテーブル参照アド
レスPをデコーダ30でデコードすることにより選択さ
れる。タグ比較の際には、この選択により、タグフィー
ルド21からタグTAGが読み出され、物理ページフィ
ールド22から物理ページMが読み出される。
A register 10 holding a logical address VA
Are divided into a tag field 11, a table reference address field 12 and a page offset field 13 from the upper side. On the other hand, the table register group 20
Has 64 entries, for example, and each entry is divided into a tag field 21 and a physical page field 22. The entry of the table register group 20 is selected by the decoder 30 decoding the table reference address P held in the field 12. At the time of tag comparison, by this selection, the tag TAG is read from the tag field 21 and the physical page M is read from the physical page field 22.

【0005】タグ比較回路40は、タグTAGを、タグ
フィールド11に保持されたタグSと比較し、両者が一
致すれば高レベル(ヒット)を出力し、不一致であれば
低レベル(ミス)を出力する。ヒットの場合には、物理
ページMを上位とし、フィールド13に保持されたペー
ジオフセットmを下位とする物理アドレスRAが取り出
され、不図示のアドレスバスインターフェースへ供給さ
れる。ミスの場合には、OSに割込みが掛けられ、主記
憶装置上のテーブルが参照されてアドレス変換処理が行
われ、論理論理アドレスVA/物理アドレスRA対がT
LBに供給される。そして、論理アドレスVAのテーブ
ル参照アドレスPによりテーブルレジスタ群20のエン
トリーが選択され、論理アドレスVAのタグS及び物理
アドレスRAの物理ページMがそれぞれタグフィールド
21及び物理ページフィールド22に格納される。
The tag comparison circuit 40 compares the tag TAG with the tag S held in the tag field 11 and outputs a high level (hit) if both match and a low level (miss) if they do not match. Output. In the case of a hit, a physical address RA having the physical page M as the upper side and the page offset m held in the field 13 as the lower side is fetched and supplied to an address bus interface (not shown). In the case of a miss, the OS is interrupted, the table in the main memory is referred to, address conversion processing is performed, and the logical logical address VA / physical address RA pair is set to T.
Supplied to the LB. Then, the entry of the table register group 20 is selected by the table reference address P of the logical address VA, and the tag S of the logical address VA and the physical page M of the physical address RA are stored in the tag field 21 and the physical page field 22, respectively.

【0006】このようなTLBにより、論理アドレスか
ら物理アドレスへの変換が高速に行われる。
With such a TLB, conversion from a logical address to a physical address is performed at high speed.

【0007】通常、ページサイズは4KB、すなわち、
ページオフセットフィールド13は12ビットである。
最近、通常のページサイズの他に、例えば4MBのペー
ジサイズをもつTLBも用いられている。このような大
きなページサイズは、OSのカーネルのように主記憶装
置上に常駐するプログラム等に用いられ、ページイン及
びページアウトが効率よく行われる。
Usually, the page size is 4 KB, that is,
The page offset field 13 is 12 bits.
Recently, in addition to the normal page size, TLB having a page size of 4 MB, for example, is also used. Such a large page size is used for a program or the like resident in the main storage device such as the OS kernel, and page-in and page-out are efficiently performed.

【0008】[0008]

【発明が解決しようとする課題】しかし、従来では、ペ
ージサイズが固定であったため、通常のページサイズの
TLBと、別個の大きなページサイズのTLBとを備え
なければならず、回路規模が大きくなっていた。
However, in the past, since the page size was fixed, it was necessary to provide a TLB having a normal page size and a separate TLB having a large page size, resulting in a large circuit scale. Was there.

【0009】本発明の目的は、このような問題点に鑑
み、ページサイズを可変にしてTLBの回路規模を縮小
することが可能なタグ比較回路及びこれを用いたTLB
を提供することにある。
In view of the above problems, an object of the present invention is to make a page size variable and to reduce the circuit scale of the TLB, and a TLB using the same.
To provide.

【0010】[0010]

【課題を解決するための手段及びその作用】図1は、第
1発明に係るタグ比較回路の原理構成を示す。ただし、
図1は、以下のp、q、r、sがそれぞれ6、5、9、
12である場合を示す) この第1発明は、論理アドレスVAの一部ビットとテー
ブルレジスタ群に保持されているタグTAGとを比較し
て、論理アドレスVAから物理アドレスRAへの変換が
TLBで可能であるかどうかを判定するタグ比較回路で
あって、論理アドレスVAはその上位側から順にpビッ
トVA0〜VA5、qビットVA6〜VA10、rビッ
トVA11〜VA19、sビットVA20〜VA31と
分けられ、rビットVA11〜VA19はページサイズ
コードBに基づき更に0≦k≦rなる上位側の可変長k
ビットと下位側の可変長r−kビットとに分けられ、論
理アドレスVAの下位r−k+sビットは、物理アドレ
スRAの下位r−k+sビットと等しいページオフセッ
トであり、論理アドレスVAのpビットVA0〜VA5
の値SHとタグTAGの上位pビットTAG0〜TAG
5の値TAGHとが等しいかどうかを判定する上位タグ
比較回路41と、論理アドレスVAのrビットVA11
〜VA19の値SLmHとタグTAGの下位rビットT
AG11〜TAG19の値TAGLとが、比較有効ビッ
トについて等しいかどうかを判定する下位タグ比較回路
42と、ページサイズコードBに基づいて、下位タグ比
較回路42によるrビットVA11〜VA19の比較の
うち、上位kビットの比較を有効にし、下位r−kビッ
トの比較を無効にするスイッチ回路43とを有し、上位
タグ比較回路41が等しいと判定し、かつ、下位タグ比
較回路42が等しいと判定しているときに、論理アドレ
スVAから物理アドレスRAへの変換がTLBで可能で
あると判定する。
FIG. 1 shows the principle configuration of a tag comparison circuit according to the first invention. However,
In FIG. 1, the following p, q, r, and s are 6, 5, 9, and
In the first invention, a part of the bits of the logical address VA is compared with the tag TAG held in the table register group, and the conversion from the logical address VA to the physical address RA is TLB. In the tag comparison circuit for determining whether or not it is possible, the logical address VA is divided into p bits VA0 to VA5, q bits VA6 to VA10, r bits VA11 to VA19, and s bits VA20 to VA31 in order from the upper side. , R bits VA11 to VA19 are further variable length k on the upper side of 0 ≦ k ≦ r based on the page size code B.
The logical address VA is divided into bits and lower variable length r−k bits, and the lower r−k + s bits of the logical address VA are a page offset equal to the lower r−k + s bits of the physical address RA, and the p bit VA0 of the logical address VA. ~ VA5
Value SH and the upper p bits TAG0 to TAG of the tag TAG
5 and the higher tag comparison circuit 41 for judging whether the value TAGH is equal to 5 and the r bit VA11 of the logical address VA.
~ Value SLmH of VA19 and lower r bit T of tag TAG
Among the comparison of r bits VA11 to VA19 by the lower tag comparison circuit 42 based on the page size code B and the lower tag comparison circuit 42 that determines whether or not the values TAGL of AG11 to TAG19 are equal for the comparison valid bit, A switch circuit 43 for validating the comparison of the upper k bits and invalidating the comparison of the lower r−k bits, and determining that the upper tag comparison circuit 41 is equal and determining that the lower tag comparison circuit 42 is equal. During this time, it is determined that the conversion from the logical address VA to the physical address RA is possible by TLB.

【0011】第2発明のTLBは、例えば図2に示す如
く、上記構成のタグ比較回路40Aと、論理アドレスV
Aが格納されるレジスタ10と、2pエントリを有し、
各エントリに、タグTAGと物理ページMとページサイ
ズコードBとが対をなして格納されるテーブルレジスタ
群20Aと、論理アドレスVAのqビットVA6〜VA
10をデコードしてテーブルレジスタ群20Aの1エン
トリを選択する第1デコーダ30と、選択された該エン
トリから出力されるページサイズコードBをデコードし
てスイッチ回路43の上記有効/無効を制御する第2デ
コーダ50とを有し、該タグ比較回路が等しいと判定し
たときに、選択された該エントリから出力される物理ペ
ージMを上位とし、論理アドレスVAの下位r−k+s
ビットのページオフセットmを下位とする物理アドレス
RAを出力する。
The TLB of the second invention is, for example, as shown in FIG. 2, a tag comparison circuit 40A having the above-mentioned configuration and a logical address V.
It has a register 10 in which A is stored and a 2p entry,
A table register group 20A in which a tag TAG, a physical page M, and a page size code B are stored in pairs in each entry, and q bits VA6 to VA of the logical address VA.
A first decoder 30 which decodes 10 to select one entry of the table register group 20A, and a page size code B which is output from the selected entry and which controls the validity / invalidity of the switch circuit 43. 2 and a decoder 50, and when it is determined that the tag comparison circuits are equal, the physical page M output from the selected entry is set as the upper order and the lower order r−k + s of the logical address VA is set.
The physical address RA having the lower page offset m of bits is output.

【0012】本発明によれば、タグ比較回路40Aによ
る比較ビットがページサイズコードBに応じて変化し、
論理アドレスVA及び物理アドレスRAに共通のページ
オフセット(下位r−k+sビット)のビット数がペー
ジサイズコードBに応じてs〜r+sの範囲で可変であ
るので、複数のページサイズを用いても1つのTLBを
備えればよく、しかも、ページサイズを可変にする構成
が比較的簡単であるので、TLBの回路規模を全体とし
て従来よりも縮小することができる。
According to the present invention, the comparison bit by the tag comparison circuit 40A changes according to the page size code B,
Since the number of bits of the page offset (lower r−k + s bits) common to the logical address VA and the physical address RA is variable within the range of s to r + s according to the page size code B, even if a plurality of page sizes are used, 1 Since only one TLB needs to be provided and the configuration for changing the page size is relatively simple, the circuit scale of the TLB can be reduced as a whole as compared with the conventional one.

【0013】[0013]

【実施例】以下、図面に基づいて本発明の一実施例を説
明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0014】図2は、TLBのブロック構成を示す。FIG. 2 shows a block structure of the TLB.

【0015】論理アドレスレジスタ10は、その上位側
から、上位タグフィールド11Hと、テーブル参照アド
レスフィールド12と、可変長付加フィールド14と、
下位ページオフセットフィールド13Lとに分けられ
る。これらフィールド11H、12及び13Lにはそれ
ぞれ、論理アドレスVAの上位タグSH、テーブル参照
アドレスP、下位ページオフセットmLが格納される。
一方、テーブルレジスタ群20Aは、例えば64エント
リーを有し、各エントリーは、タグフィールド21と、
物理ページフィールド22と、ページサイズコードフィ
ールド23とに分けられる。これらフィールド21、2
2及び23にはそれぞれ、タグTAG、物理ページM及
びページサイズコードBが格納される。
The logical address register 10 has, from the upper side thereof, an upper tag field 11H, a table reference address field 12, a variable length addition field 14, and
It is divided into a lower page offset field 13L. An upper tag SH of the logical address VA, a table reference address P, and a lower page offset mL are stored in these fields 11H, 12 and 13L, respectively.
On the other hand, the table register group 20A has, for example, 64 entries, and each entry includes a tag field 21 and
It is divided into a physical page field 22 and a page size code field 23. These fields 21, 2
A tag TAG, a physical page M, and a page size code B are stored in 2 and 23, respectively.

【0016】テーブルレジスタ群20Aのエントリー
は、フィールド12のテーブル参照アドレスPをデコー
ダ30でデコードすることにより選択され、フィールド
21、22及び23からそれぞれ前記TAG、M及びB
が読み出される。このタグTAGは、タグ比較回路40
Aの一方の入力端に供給される。タグ比較回路40Aの
他方の入力端には、その上位側に、フィールド11Hに
保持された上位タグSHが供給され、下位側に、フィー
ルド14に保持された可変長付加SLmHが供給され
る。
The entry of the table register group 20A is selected by decoding the table reference address P of the field 12 with the decoder 30, and the tags 21, M and B are selected from the fields 21, 22 and 23, respectively.
Is read. This tag TAG is a tag comparison circuit 40.
It is supplied to one input terminal of A. To the other input end of the tag comparison circuit 40A, the upper tag SH held in the field 11H is supplied to the upper side and the variable length added SLmH held in the field 14 is supplied to the lower side.

【0017】また、ページサイズコードBがデコーダ5
0に供給されてデコードされ、デコーダ50の出力でタ
グ比較回路40Aの比較ビット数が後述のように制御さ
れる。タグ比較回路40Aは、図1に示す如く、上位タ
グ比較回路41と、下位タグ比較回路42と、スイッチ
回路43とを備えている。
Further, the page size code B is the decoder 5
It is supplied to 0 and decoded, and the output of the decoder 50 controls the number of comparison bits of the tag comparison circuit 40A as described later. As shown in FIG. 1, the tag comparison circuit 40A includes an upper tag comparison circuit 41, a lower tag comparison circuit 42, and a switch circuit 43.

【0018】論理アドレスVAのビットを、その上位側
からビットVA0〜VA31と表す。本実施例では、上
位タグフィールド11HをビットVA0〜VA5の6ビ
ットとし、テーブル参照アドレスフィールド12をVA
6〜VA10の5ビットとし、可変長付加フィールド1
4をビットVA11〜VA19の9ビットとし、下位ペ
ージオフセットフィールド13LをVA20〜VA31
の12ビットとする。これに対し、タグTAGは、上位
タグTAGHと下位タグTAGLとからなり、上位タグ
TAGHのビットを、その上位側からビットTAG0〜
TAG5と表し、下位タグTAGLのビットを、その上
位側からTAG11〜TAG19と表す。
The bits of the logical address VA are expressed as bits VA0 to VA31 from the upper side. In this embodiment, the upper tag field 11H is 6 bits of bits VA0 to VA5, and the table reference address field 12 is VA.
5 bits of 6 to VA, variable length additional field 1
4 is 9 bits of bits VA11 to VA19, and the lower page offset field 13L is VA20 to VA31.
12 bits. On the other hand, the tag TAG is composed of an upper tag TAGH and a lower tag TAGL, and the bits of the upper tag TAGH are bit TAG0 to bit 0 from the upper side.
It is expressed as TAG5, and the bits of the lower tag TAGL are expressed as TAG11 to TAG19 from the upper side.

【0019】上位タグ比較回路41は、ビットVA0〜
VA5をそれぞれビットTAG0〜TAG5と比較し、
下位タグ比較回路42は、ビットVA11〜VA19を
それぞれTAG11〜TAG19と、スイッチ回路43
で有効にされているビットについて比較する。
The upper tag comparison circuit 41 has bits VA0 to VA0.
VA5 is compared with bits TAG0 to TAG5, respectively,
The lower tag comparison circuit 42 sets bits VA11 to VA19 to TAG11 to TAG19 and a switch circuit 43, respectively.
Compare for the bits that are enabled in.

【0020】可変長付加フィールド14は、スイッチ回
路43で有効にされて下位タグ比較回路42で比較され
る可変長下位タグフィールド11Lと、スイッチ回路4
3で無効にされて下位タグ比較回路42で比較されない
可変長上位ページオフセットフィールド13Hとに分け
られる。フィールド11Lには下位タグSLが格納さ
れ、フィールド13Hには上位ページオフセットmHが
格納される。タグフィールド11は、フィールド12を
介し互いに離れた上位タグフィールド11Hと下位タグ
フィールド11Lとからなり、これらに保持された上位
タグSHと下位タグSLとでタグSが構成される。ま
た、ページオフセットフィールド13は、上位ページオ
フセットフィールド13Hと下位ページオフセットフィ
ールド13Lとからなり、これらに保持された上位ペー
ジオフセットmHと下位ページオフセットmLとでペー
ジオフセットmが構成される。
The variable length additional field 14 is validated by the switch circuit 43 and compared with the lower tag comparison circuit 42 by the variable length lower tag field 11L and the switch circuit 4.
3 and the variable length upper page offset field 13H which is invalidated in 3 and is not compared in the lower tag comparison circuit 42. The lower tag SL is stored in the field 11L, and the upper page offset mH is stored in the field 13H. The tag field 11 is composed of an upper tag field 11H and a lower tag field 11L which are separated from each other via a field 12, and the upper tag SH and the lower tag SL held in these fields constitute a tag S. The page offset field 13 is composed of an upper page offset field 13H and a lower page offset field 13L, and the upper page offset mH and the lower page offset mL held in them form a page offset m.

【0021】ページサイズコードBは、例えば2ビット
であり、その値と、ページジサイズ及び可変長比較ビッ
トとの関係は、図4に示すようになっている。
The page size code B is, for example, 2 bits, and the relationship between the value and the page size and variable length comparison bit is as shown in FIG.

【0022】すなわち、ページサイズコードBの値が
‘00’のとき、ページサイズは4KBであり、スイッ
チ回路43で、ビットVA11〜VA19とビットTG
A11〜TAG19との比較が有効にされる。ページサ
イズコードBの値が‘01’のとき、ページサイズは3
2KBであり、スイッチ回路43で、ビットVA11〜
VA16とビットTGA11〜TAG16との比較が有
効にされる。ページサイズコードBの値が‘10’のと
き、ページサイズは256KBであり、スイッチ回路4
3で、ビットVA11〜VA13とビットTGA11〜
TAG13との比較が有効にされる。また、ページサイ
ズコードBの値が‘11’のとき、ページサイズは2M
Bであり、スイッチ回路43で、下位タグ比較回路42
による各ビットの比較が全て無効にされる。
That is, when the value of the page size code B is "00", the page size is 4 KB, and the switch circuit 43 uses the bits VA11 to VA19 and the bit TG.
The comparison with A11-TAG19 is enabled. When the value of page size code B is '01', the page size is 3
2 KB, the switch circuit 43, the bits VA11 ~
The comparison of VA16 with bits TGA11-TAG16 is enabled. When the value of the page size code B is '10', the page size is 256 KB and the switch circuit 4
3 in bits VA11-VA13 and bits TGA11-
The comparison with TAG 13 is enabled. When the page size code B value is '11', the page size is 2M.
B, the switch circuit 43, the lower tag comparison circuit 42
All comparisons of each bit by are disabled.

【0023】図3は、タグ比較回路40Aの構成例を示
す。
FIG. 3 shows a configuration example of the tag comparison circuit 40A.

【0024】上位タグ比較回路41は、ビットVAiと
ビットTAGiとを比較するイクスクルーシブオア回路
Ei、i=0〜5を備え、下位タグ比較回路42は、ビ
ットVAjとビットTAGjとを比較するイクスクルー
シブオア回路Ej、j=11〜19を備えている。イク
スクルーシブオア回路E0〜E19は互いに同一構成で
あり、イクスクルーシブオア回路E0は、トランジスタ
T1とトランジスタT2とが直列接続され、トランジス
タT3とトランジスタT4とが直列接続され、トランジ
スタT1のドレインとトランジスタT3のドレインが共
にコモン線Cに接続されている。コモン線Cは、プルア
ップトランジスタT5を介して電源配線VDDに接続さ
れている。図中、*は信号レベルの反転を表しており、
トランジスタT1、T2、T3及びT4のゲートにそれ
ぞれ*TAG0、ビットVA0、*VA0及びTAG0
が供給され、プルアップトランジスタT5のゲートにク
ロックCLKが供給される。
The upper tag comparison circuit 41 includes an exclusive OR circuit Ei, i = 0 to 5 for comparing the bit VAi and the bit TAGi, and the lower tag comparison circuit 42 compares the bit VAj and the bit TAGj. The exclusive OR circuit Ej, j = 11 to 19 is provided. The exclusive OR circuits E0 to E19 have the same configuration as each other. In the exclusive OR circuit E0, the transistor T1 and the transistor T2 are connected in series, the transistor T3 and the transistor T4 are connected in series, and the drain of the transistor T1 is connected. The drains of the transistors T3 are both connected to the common line C. The common line C is connected to the power supply line VDD via the pull-up transistor T5. In the figure, * represents the inversion of the signal level,
* TAG0 and bits VA0, * VA0 and TAG0 are applied to the gates of the transistors T1, T2, T3 and T4, respectively.
And the clock CLK is supplied to the gate of the pull-up transistor T5.

【0025】スイッチ回路43は、トランジスタスイッ
チSW11〜SW19を備え、トランジスタスイッチS
Wj(j=11〜19)は、そのドレインがコモン線C
に接続され、ソースがイクスクルーシブオア回路Ejの
電流入力端に接続されている。したがって、トランジス
タスイッチSWjがオンのときイクスクルーシブオア回
路Ejによる比較が有効となり、トランジスタスイッチ
SWjがオフのときイクスクルーシブオア回路Ejによ
る比較が無効となる。
The switch circuit 43 includes transistor switches SW11 to SW19, and transistor switch S
The drain of Wj (j = 11 to 19) is the common line C.
And the source is connected to the current input terminal of the exclusive OR circuit Ej. Therefore, when the transistor switch SWj is on, the comparison by the exclusive OR circuit Ej is valid, and when the transistor switch SWj is off, the comparison by the exclusive OR circuit Ej is invalid.

【0026】スイッチ回路43は、デコーダ50によ
り、ページサイズコードBの値が‘00’のときトラン
ジスタスイッチSW11〜SW19が全てオンにされ、
ページサイズコードBの値が‘01’のときトランジス
タスイッチSW11〜SW16のみがオンにされ、ペー
ジサイズコードBの値が‘10’のときトランジスタス
イッチSW11〜SW13のみがオンにされ、ページサ
イズコードBの値が‘11’のときトランジスタスイッ
チSW11〜SW19が全てオフにされる。
In the switch circuit 43, the decoder 50 turns on all the transistor switches SW11 to SW19 when the value of the page size code B is "00",
When the value of the page size code B is '01', only the transistor switches SW11 to SW16 are turned on. When the value of the page size code B is '10', only the transistor switches SW11 to SW13 are turned on and the page size code B When the value of is "11", all the transistor switches SW11 to SW19 are turned off.

【0027】上記構成において、クロックCLKが低レ
ベルのとき、プルアップトランジスタT5がオンになっ
てコモン線Cがプリチャージされる。このとき、上位タ
グ比較回路41及び下位タグ比較回路42は非動作状態
にされている。クロックCLKが高レベルに遷移する
と、プルアップトランジスタT5がオフになり、かつ、
上位タグ比較回路41及び下位タグ比較回路42が動作
状態にされる。
In the above structure, when the clock CLK is at the low level, the pull-up transistor T5 is turned on and the common line C is precharged. At this time, the upper tag comparison circuit 41 and the lower tag comparison circuit 42 are in a non-operating state. When the clock CLK transitions to a high level, the pull-up transistor T5 turns off, and
The upper tag comparison circuit 41 and the lower tag comparison circuit 42 are activated.

【0028】例えば、ビットVA0が高レベルでビット
TAG0が低レベルの場合には、トランジスタT1とト
ランジスタT2が共にオン、トランジスタT3とトラン
ジスタT4が共にオフとなり、コモン線C上の電荷がト
ランジスタT1及びT2を通ってグランド線側に放電さ
れ、コモン線Cが低レベル(ミス)に遷移する。ビット
VA0とビットTAG0とが不一致の場合には、コモン
線C上の電荷はイクスクルーシブオア回路E0を通って
放電されない。他のイクスクルーシブオア回路Ei、i
=2〜19についても同様である。ただし、下位タグ比
較回路42については、トランジスタスイッチSWjが
オフになっているときには上述のようにイクスクルーシ
ブオア回路Ejによる比較が無効となり、トランジスタ
スイッチSWjがオンでビットVAjとビットTAGj
の値が一致している場合と等しくなる。
For example, when the bit VA0 is high level and the bit TAG0 is low level, both the transistors T1 and T2 are turned on, the transistors T3 and T4 are both turned off, and the charge on the common line C is transferred to the transistors T1 and It is discharged to the ground line side through T2, and the common line C transits to a low level (miss). When the bit VA0 and the bit TAG0 do not match, the charge on the common line C is not discharged through the exclusive OR circuit E0. Other exclusive OR circuits Ei, i
The same applies to = 2 to 19. However, in the lower tag comparison circuit 42, when the transistor switch SWj is off, the comparison by the exclusive OR circuit Ej is invalid as described above, and the transistor switch SWj is on and the bit VAj and the bit TAGj.
Equals if the values of match.

【0029】タグ比較回路40Aの出力が高レベル(ヒ
ット)のとき、図2において、デコーダ50の出力で合
成回路60が制御されて、物理ページフィールド22の
物理ページMとページオフセットフィールド13のペー
ジオフセットmとが合成され、物理アドレスRAが合成
回路60から出力される。
When the output of the tag comparison circuit 40A is at a high level (hit), the synthesis circuit 60 is controlled by the output of the decoder 50 in FIG. 2, and the physical page M of the physical page field 22 and the page of the page offset field 13 are controlled. The offset m is combined, and the physical address RA is output from the combining circuit 60.

【0030】タグ比較回路40Aの出力が低レベル(ミ
ス)のときのOSによるアドレス変換処理の一例を、図
5に示す。
FIG. 5 shows an example of address conversion processing by the OS when the output of the tag comparison circuit 40A is at a low level (miss).

【0031】OSは、セグメントテーブルとページテー
ブルとを主記憶装置上に確保している。セグメントベー
スレジスタSBRの内容でセグメントテーブルの先頭ア
ドレスが指定され、この先頭からS番目の内容Qにより
ページテーブルのエントリーが指定され、このエントリ
ーからP番目の内容Mが物理ページを表している。この
物理ページMの先頭からm番目の斜線部が物理アドレス
となる。
The OS secures a segment table and a page table in the main storage device. The start address of the segment table is specified by the content of the segment base register SBR, the entry of the page table is specified by the Sth content Q from the beginning, and the Pth content M from this entry represents a physical page. The m-th hatched portion from the beginning of this physical page M is the physical address.

【0032】ページテーブルには、ページサイズコード
Bが物理ページMと対をなして格納されており、このペ
ージサイズコードBの値によりページサイズが定まる。
このときのS、M及びBは、図2において、Pで選択さ
れた10Aのエントリーに保持される。これにより、次
回このS及びPと等しい論理アドレスVAに対するアド
レス変換がTLBにより高速に行われる。
The page size code B is stored in the page table in pairs with the physical page M, and the page size is determined by the value of the page size code B.
At this time, S, M and B are held in the entry of 10A selected by P in FIG. As a result, next time, the address conversion for the logical address VA equal to S and P is performed at high speed by the TLB.

【0033】本実施例では、ページサイズが可変であ
り、複数のページサイズを用いても1つのTLBを備え
ればよく、しかも、ページサイズを可変にする構成が比
較的簡単であるので、TLBの回路規模を全体として従
来よりも大幅に縮小することができる。
In the present embodiment, the page size is variable, and even if a plurality of page sizes are used, it is sufficient to provide one TLB. Moreover, since the configuration for varying the page size is relatively simple, the TLB is used. The circuit scale of can be significantly reduced as compared to the conventional one.

【0034】なお、上記実施例において、タグフィール
ド21は、ページサイズコードBの値に応じて6〜15
ビットの可変長としても、15ビットの固定長としても
よい。これに応じて物理ページフィールド22も可変長
又は固定長とすることができる。
In the above embodiment, the tag field 21 is 6 to 15 depending on the value of the page size code B.
A variable length of bits or a fixed length of 15 bits may be used. Accordingly, the physical page field 22 can also have a variable length or a fixed length.

【0035】また、図5において、セグメントSとペー
ジPとをまとめてページとする場合であってもよい。
Further, in FIG. 5, the segment S and the page P may be combined into a page.

【0036】[0036]

【発明の効果】以上説明した如く、本発明に係るタグ比
較回路及びこれを用いたトランスレーション・ルック・
アサイド・バッファによれば、タグ比較回路による比較
ビットがページサイズコードに応じて変化し、論理アド
レス及び物理アドレスに共通のページオフセットのビッ
ト数がページサイズコードに応じて可変であるので、複
数のページサイズを用いても1つのTLBを備えればよ
く、しかも、ページサイズを可変にする構成が比較的簡
単であるので、TLBの回路規模を全体として従来より
も縮小することができるという優れた効果を奏し、CP
Uチップの回路規模縮小化に寄与するところが大きい。
As described above, the tag comparison circuit according to the present invention and the translation look
According to the aside buffer, the comparison bit by the tag comparison circuit changes according to the page size code, and the number of bits of the page offset common to the logical address and the physical address is variable according to the page size code. Even if the page size is used, only one TLB needs to be provided, and since the configuration that makes the page size variable is relatively simple, the circuit scale of the TLB can be reduced as a whole compared to the conventional one. Effective, CP
It greatly contributes to the reduction of the circuit scale of the U chip.

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

【図1】本発明に係るタグ比較回路の原理構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a principle configuration of a tag comparison circuit according to the present invention.

【図2】本発明の一実施例のTLBのブロック図であ
る。
FIG. 2 is a block diagram of a TLB according to an embodiment of the present invention.

【図3】図2のタグ比較回路の構成例を示す図である。FIG. 3 is a diagram showing a configuration example of a tag comparison circuit of FIG.

【図4】ページサイズコードBの値と可変長のページサ
イズ及び比較ビットとの関係を示す表である。
FIG. 4 is a table showing a relationship between a value of a page size code B, a variable length page size, and comparison bits.

【図5】OSによるアドレス変換処理の説明図である。FIG. 5 is an explanatory diagram of an address conversion process by the OS.

【図6】従来のTLBのブロック図である。FIG. 6 is a block diagram of a conventional TLB.

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

10 論理アドレスレジスタ 11 タグフィールド 11H 上位タグフィールド 11L 下位タグフィールド 12 テーブル参照アドレスフィールド 13 ページオフセットフィールド 13H 上位ページオフセットフィールド 13L 下位ページオフセットフィールド 14 可変長付加フィールド 20、20A テーブルレジスタ群 21 タグフィールド 22 物理ページフィールド 23 ページサイズコードフィールド 30、50 デコーダ 40、40A タグ比較回路 41 上位タグ比較回路 42 下位タグ比較回路 43 スイッチ回路 60 合成回路 T1〜T5 トランジスタ SW11〜19 トランジスタスイッチ E0〜E19 イクスクルーシブオア回路 VA 論理アドレス RA 物理アドレス TAG タグ m ページオフセット M 物理ページ 10 Logical Address Register 11 Tag Field 11H Upper Tag Field 11L Lower Tag Field 12 Table Reference Address Field 13 Page Offset Field 13H Upper Page Offset Field 13L Lower Page Offset Field 14 Variable Length Additional Field 20, 20A Table Register Group 21 Tag Field 22 Physical Page field 23 Page size code field 30, 50 Decoder 40, 40A Tag comparison circuit 41 Upper tag comparison circuit 42 Lower tag comparison circuit 43 Switch circuit 60 Synthesis circuit T1 to T5 transistor SW11 to 19 Transistor switch E0 to E19 Exclusive OR circuit VA logical address RA physical address TAG tag m page offset M physical page

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 論理アドレス(VA)の一部ビットとテ
ーブルレジスタ群(20A)に保持されているタグ(T
AG)とを比較して、該論理アドレスから物理アドレス
(RA)への変換がTLBで可能であるかどうかを判定
するタグ比較回路であって、該論理アドレスはその上位
側から順にpビット(VA0〜VA5)、qビット(V
A6〜VA10)、rビット(VA11〜VA19)、
sビット(VA20〜VA31)と分けられ、該rビッ
トはページサイズコード(B)に基づき更に0≦k≦r
なる上位側の可変長kビットと下位側の可変長r−kビ
ットとに分けられ、該論理アドレスの下位r−k+sビ
ットは、該物理アドレスの下位r−k+sビットと等し
いページオフセット(m)であり、 該論理アドレスの該pビット(VA0〜VA5)の値
(SH)と該タグの上位pビット(TAG0〜TAG
5)の値(TAGH)とが等しいかどうかを判定する上
位タグ比較回路(41)と、 該論理アドレスの該rビット(VA11〜VA19)の
値(SLmL)と該タグの下位rビット(TAG11〜
TAG19)の値(TAGL)とが、比較有効ビットに
ついて等しいかどうかを判定する下位タグ比較回路(4
2)と、 該ページサイズコードに基づいて、該下位タグ比較回路
による該rビットの比較のうち、該上位kビットの比較
を有効にし、該下位r−kビットの比較を無効にするス
イッチ回路(43)と、 を有し、該上位タグ比較回路が等しいと判定し、かつ、
該下位タグ比較回路が等しいと判定しているときに、該
論理アドレスから該物理アドレスへの変換が該TLBで
可能であると判定することを特徴とするタグ比較回路。
1. A partial bit of a logical address (VA) and a tag (T held in a table register group (20A).
AG) to compare the logical address to the physical address (RA) with the TLB and determine whether the logical address is p bits (in order from the upper side). VA0 to VA5), q bits (V
A6 to VA10), r bits (VA11 to VA19),
It is divided into s bits (VA20 to VA31), and the r bits are further 0 ≦ k ≦ r based on the page size code (B).
Is divided into an upper variable length k bit and a lower variable length r−k bit, and the lower r−k + s bits of the logical address are equal to the lower r−k + s bits of the physical address. And the value (SH) of the p bits (VA0 to VA5) of the logical address and the upper p bits (TAG0 to TAG) of the tag.
5) the upper tag comparison circuit (41) for judging whether the value (TAGH) is equal, the value (SLmL) of the r bits (VA11 to VA19) of the logical address, and the lower r bit (TAG11) of the tag. ~
The lower tag comparison circuit (4) for determining whether the value (TAGL) of the TAG 19) is equal to the comparison valid bit.
2) and a switch circuit for validating the comparison of the upper k bits among the comparisons of the r bits by the lower tag comparison circuit and invalidating the comparison of the lower r−k bits based on the page size code. (43) and, it is determined that the upper tag comparison circuits are equal, and
A tag comparison circuit, characterized in that, when the lower tag comparison circuit determines that they are equal, it determines that conversion from the logical address to the physical address is possible in the TLB.
【請求項2】 請求項1記載のタグ比較回路(40A)
と、 前記論理アドレス(VA)が格納されるレジスタ(1
0)と、 2pエントリを有し、各エントリに、前記タグ(TA
G)と物理ページ(M)と前記ページサイズコード
(B)とが対をなして格納されるテーブルレジスタ群
(20A)と、 前記論理アドレスの前記qビット(VA6〜VA10)
をデコードして該テーブルレジスタ群の1エントリを選
択する第1デコーダ(30)と、 選択された該エントリから出力される該ページサイズコ
ードをデコードして前記スイッチ回路(43)の前記有
効/無効を制御する第2デコーダ(50)と、 を有し、該タグ比較回路が等しいと判定したときに、選
択された該エントリから出力される該物理ページ(M)
を上位とし、該論理アドレスの下位r−k+sビットの
ページオフセット(m)を下位とする物理アドレス(R
A)を出力することを特徴とするトランスレーション・
ルック・アサイド・バッファ。
2. The tag comparison circuit (40A) according to claim 1.
And a register (1 for storing the logical address (VA)
0) and 2p entries, and each entry has the tag (TA
G), a physical page (M), and the page size code (B) are paired and stored in a table register group (20A), and the q bits (VA6 to VA10) of the logical address.
A first decoder (30) that decodes a table register group to select one entry of the table register group, and decodes the page size code output from the selected entry to enable / disable the switch circuit (43). And a second decoder (50) for controlling, and the physical page (M) output from the selected entry when the tag comparison circuits are determined to be equal.
Is a higher address, and the page offset (m) of the lower r−k + s bits of the logical address is a lower physical address (R
A), which is characterized by outputting
Look aside buffer.
JP4347621A 1992-12-28 1992-12-28 Tag comparator and translation look-aside buffer using the comparator Withdrawn JPH06202954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4347621A JPH06202954A (en) 1992-12-28 1992-12-28 Tag comparator and translation look-aside buffer using the comparator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4347621A JPH06202954A (en) 1992-12-28 1992-12-28 Tag comparator and translation look-aside buffer using the comparator

Publications (1)

Publication Number Publication Date
JPH06202954A true JPH06202954A (en) 1994-07-22

Family

ID=18391464

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4347621A Withdrawn JPH06202954A (en) 1992-12-28 1992-12-28 Tag comparator and translation look-aside buffer using the comparator

Country Status (1)

Country Link
JP (1) JPH06202954A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08115261A (en) * 1994-10-14 1996-05-07 Hitachi Ltd Address conversion circuit
JPH08320830A (en) * 1994-09-09 1996-12-03 Hitachi Ltd Data processor
US6266755B1 (en) * 1994-10-14 2001-07-24 Mips Technologies, Inc. Translation lookaside buffer with virtual address conflict prevention
JPWO2008155848A1 (en) * 2007-06-20 2010-08-26 富士通株式会社 Computer, TLB control method, and TLB control program
JP2016507096A (en) * 2013-01-15 2016-03-07 クゥアルコム・インコーポレイテッドQualcomm Incorporated Duplicate check for translation index buffer (TLB)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08320830A (en) * 1994-09-09 1996-12-03 Hitachi Ltd Data processor
JPH08115261A (en) * 1994-10-14 1996-05-07 Hitachi Ltd Address conversion circuit
US6266755B1 (en) * 1994-10-14 2001-07-24 Mips Technologies, Inc. Translation lookaside buffer with virtual address conflict prevention
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
JP2016507096A (en) * 2013-01-15 2016-03-07 クゥアルコム・インコーポレイテッドQualcomm Incorporated Duplicate check for translation index buffer (TLB)

Similar Documents

Publication Publication Date Title
US5155825A (en) Page address translation cache replacement algorithm with improved testability
EP0496288B1 (en) Variable page size per entry translation look-aside buffer
KR0148129B1 (en) A sense amplifier with an integral logic function
US5809528A (en) Method and circuit for a least recently used replacement mechanism and invalidated address handling in a fully associative many-way cache memory
US5717885A (en) TLB organization with variable page size mapping and victim-caching
US5696925A (en) Memory management unit with address translation function
US8607026B2 (en) Translation lookaside buffer
US5353424A (en) Fast tag compare and bank select in set associative cache
US5412787A (en) Two-level TLB having the second level TLB implemented in cache tag RAMs
US5953748A (en) Processor with an efficient translation lookaside buffer which uses previous address computation results
US5617348A (en) Low power data translation circuit and method of operation
US6678815B1 (en) Apparatus and method for reducing power consumption due to cache and TLB accesses in a processor front-end
JPH08329687A (en) Semiconductor integrated circuit
EP0549321A2 (en) Method and system for high-speed virtual-to-physical address translation and cache tag matching
JPH04352256A (en) Method and apparatus for saving memory space
WO1996027834A1 (en) Lookaside buffer for address translation in a computer system
US5956752A (en) Method and apparatus for accessing a cache using index prediction
US4736287A (en) Set association memory system
JP3045952B2 (en) Full associative address translator
JPH07295889A (en) Address conversion circuit
US6785152B2 (en) Content addressable memory with power reduction technique
US6081136A (en) Dynamic NOR gates for NAND decode
KR100277902B1 (en) Microprocessor
JPH06202954A (en) Tag comparator and translation look-aside buffer using the comparator
US6385696B1 (en) Embedded cache with way size bigger than page size

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000307