JPS61271549A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPS61271549A
JPS61271549A JP60113184A JP11318485A JPS61271549A JP S61271549 A JPS61271549 A JP S61271549A JP 60113184 A JP60113184 A JP 60113184A JP 11318485 A JP11318485 A JP 11318485A JP S61271549 A JPS61271549 A JP S61271549A
Authority
JP
Japan
Prior art keywords
instruction
address
stored
page
cache memory
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
JP60113184A
Other languages
Japanese (ja)
Inventor
Munehiro Minami
南 宗宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP60113184A priority Critical patent/JPS61271549A/en
Publication of JPS61271549A publication Critical patent/JPS61271549A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain the miniaturization and, high-speed operation of a cache memory by providing an instruction address register consisting of high-order address which designates, a prescribed number of instructions as a group and a low-order address which designates each of these instructions of a group. CONSTITUTION:The instruction read out of an external storage device 11 is supplied to an execution unit via an external bus 15 and an access control part 13 and also stored in an entry corresponding to a cache memory part 3 designated by a low-order address 1a of an instruction address register together with '1' of V bits showing the validity. While high-order address 1b of another jumped address is stored in a page address register 7 and it is shown that the instruction of another page is stored in a memory part 3. Then the instructions of other pages are stored successively in the areas following the entry of the part 3 where the instructions of other page addresses are stored through a control part (not shown here). These instructions of other pages are supplied to the execution and carried out successively.

Description

【発明の詳細な説明】 [発明の技術分野〕 この発明は、コンピュータにおいて実行される命令を記
憶装置から先取りして予め記憶しておき、実行中の命令
が完了したとき次の命令を迅速に制御部に供給するキャ
ッシュメモリに関する。
[Detailed Description of the Invention] [Technical Field of the Invention] This invention preemptively stores instructions to be executed in a computer from a storage device, and when the currently executed instruction is completed, the next instruction is quickly executed. This invention relates to a cache memory supplied to a control unit.

[発明の技術的背景および問題点] コンピュータにおいては、一般に1つの命令の実行が完
全に終ってから、次の命令を記憶装置から取り出し制御
部に供給して実行しているが、この1つの命令を実行し
ている間に次の命令を記憶装置から読み出し先取りして
おくことによりコンピユータの処理時間を速くすること
ができる。この場合、次の命令として1つの命令だけで
なく、複数のいくつかの命令を先取りしこれを記憶する
ためにキャッシュメモリが使用されている。
[Technical Background and Problems of the Invention] In a computer, generally after the execution of one instruction is completely completed, the next instruction is taken out from the storage device and supplied to the control unit for execution. By reading and prefetching the next instruction from the storage device while an instruction is being executed, the processing time of the computer can be increased. In this case, a cache memory is used to prefetch and store not only one instruction but also a plurality of instructions as the next instruction.

キャッシュメモリは、一般に次に順次実行されるべく先
取りされる複数の命令として例えば32個の命令を記憶
するメモリ部、すなわちキャッシュメモリ部を有すると
ともに、このキャッシュメモリ部に対応して同様に32
個のメモリロケーションを有するタグメモリ部を有して
いる。キャッシュメモリ部に記憶された例えば32個の
命令は、命令アドレスレジスタに蓄積されている次に実
行すべき命令のアドレスの下位アドレス、例えば5ビツ
トの下位アドレスによって指定される。各命令を記憶し
ている記憶装置のアドレスは、この下位アドレスと残り
の上位アドレスとに分割されるが、前記タグメモリ部は
この上位アドレスをキャッシュメモリ部に記憶された各
命令に対応して記憶している。これによって下位アドレ
スで指定されたキャッシュメモリ部の1つに記憶されて
いる各命令の上位アドレスがわかるようになっているの
である。
A cache memory generally has a memory section, ie, a cache memory section, for storing, for example, 32 instructions as a plurality of instructions to be prefetched to be executed sequentially next, and a cache memory section that similarly stores 32 instructions corresponding to the cache memory section.
It has a tag memory section with memory locations. For example, 32 instructions stored in the cache memory section are specified by a lower address, for example, a 5-bit lower address of the address of the next instruction to be executed stored in the instruction address register. The address of the storage device that stores each instruction is divided into this lower address and the remaining upper address, and the tag memory section uses this upper address to correspond to each instruction stored in the cache memory section. I remember. This allows the upper address of each instruction stored in one of the cache memory units specified by the lower address to be known.

しかしながら、このようにキャッシュメモリ部に記憶さ
れた各命令に対して上位アドレスをそれぞれ記憶するた
めにタグメモリ部を設けることは、メモリ容量としても
かなり大きなものであるため、集積化した場合、比較的
大きな面積を占める上、非経済的でもあるが、機能的に
はこのような面積の増大および非経済性に見合う程の機
能を有していないという問題がある。
However, providing a tag memory section to store the upper address for each instruction stored in the cache memory section requires a fairly large memory capacity, so when integrated, it is difficult to compare. Although it occupies a large area and is also uneconomical, there is a problem in that it does not have enough functionality to justify the increased area and uneconomical nature.

更に具体的に説明すると、上述したようにキャッシュメ
モリ部に記憶される例えば32個の命令を1群と考えて
この1群の命令の単位を1ページという単位で考えると
すると、上位アドレスは各ページを指定することになり
、下位アドレスは各ページに記憶されている各命令を指
定することになる。従って、タグメモリ部にはキャッシ
ュメモリ部に記憶されている各命令に対応するページが
記憶されており、これによりキャッシュメモリ部に記憶
されている各命令はどのページの命令であるかがわかる
ようになっている。
To explain more specifically, if, for example, 32 instructions stored in the cache memory section are considered as one group as described above, and the unit of this one group of instructions is considered as one page, then the upper address of each The page will be specified, and the lower address will specify each instruction stored in each page. Therefore, the tag memory section stores a page corresponding to each instruction stored in the cache memory section, so that it is possible to know which page each instruction stored in the cache memory section belongs to. It has become.

しかしながら、キャッシュメモリ部に記憶される命令群
は、一般に同じページの1群の命令、例えば32個の命
令が記憶されるものであるため、この場合にはタグメモ
リ部にはすべて同じページの番号、すなわち同じ上位ア
ドレスが記憶されている。また、あるページから次のペ
ージに移る場合にも次のページの先頭から順に命令は実
行されていくのでキャッシュメモリ部の命令は順次全部
法のページの命令が記憶されるためタグメモリ部には同
じ次のページの番号が順次記憶されるものと考えてもよ
い。また、あるページの途中からジャンプ命令等が実行
されて別のページにジャンプした時にはそのジャンプ命
令の次から別のページ番号が順次記憶されることになり
、ジャンプ命令以降のページ番号は順次同じ番号が記憶
されるものと考えられる。このように次のページまたは
ジャンプしたページに移り、キャッシュメモリ部に記憶
される命令が順次更新されつつある時にまだ更新されず
にキャッシュメモリ部に残っている前の命令部分に戻っ
て処理を行なう場合に、この前の命令に対してその命令
のページがタグメモリ部で示されていることは必要であ
るが、このようにまだ更新されずに残っている前の命令
に処理が移る確率は非常に少ない。
However, since the instruction group stored in the cache memory section is generally a group of instructions on the same page, for example, 32 instructions, in this case, the tag memory section will all have the same page number. , that is, the same upper address is stored. In addition, when moving from one page to the next page, instructions are executed sequentially from the beginning of the next page, so the instructions in the cache memory section are stored sequentially, so the instructions for all pages are stored in the tag memory section. It may be considered that the same next page number is stored sequentially. In addition, when a jump command etc. is executed from the middle of a page and jumps to another page, different page numbers are stored sequentially from the jump command, and the page numbers after the jump command are sequentially the same number. is considered to be memorized. In this way, when moving to the next page or the page to which the page was jumped, and the instructions stored in the cache memory section are being sequentially updated, the process returns to the previous instruction part that has not been updated and remains in the cache memory section. In this case, it is necessary that the page of the previous instruction is indicated in the tag memory section, but the probability that processing will move to the previous instruction that has not been updated yet is Very few.

従って、このようにキャッシュメモリ部の例えば32個
の各命令に対してタグメモリ部を設けることは、上述し
たように非経済的であるとともに、例えばマイクロコン
ピュータに集積化して内臓するような場合には大きなチ
ップ面積を占めることにもなり、マイクロコンピュータ
の価格を増大するという問題がある。
Therefore, it is not economical to provide a tag memory section for each of the 32 instructions in the cache memory section as described above, and it is difficult to provide a tag memory section for each of the 32 instructions in the cache memory section, for example, when the tag memory section is integrated into a microcomputer. This also occupies a large chip area, which poses a problem of increasing the cost of the microcomputer.

[発明の目的] この発明は、上記に鑑みてなされたもので、その目的と
するところは、タグメモリ部を除去して経済化、小型化
を達成し、かつ高速化を達成することができるようにし
たキャッシュメモリを提供することにある。
[Object of the Invention] This invention was made in view of the above, and its purpose is to eliminate the tag memory section to achieve economicalization, miniaturization, and high speed. The objective is to provide a cache memory that is

[発明の概要] 上記目的を達成するために、この発明は、コンピユータ
において記憶装置に記憶されている命令のうち次に実行
すべき命令を指定すべく、所定数の命令を1群として指
定する上位アドレスおよび該上位アドレスで指定される
1群の命令の各々を指定する下位アドレスで構成される
アドレスを記憶する命令アドレスレジスタと、前記上位
アドレスを記憶する上位アドレスレジスタと、前記上位
アドレスレジスタに記憶されている上位アドレスで指定
される1群の命令を先取りして記憶し、該記憶された1
群の命令の各々は前記命令アドレスレジスタに記憶され
た下位アドレスによって指定されるキャッシュメモリ部
と、前記上位アドレスレジスタに記憶されている上位ア
ドレスと前記命令アドレスレジスタに記憶されている上
位アドレスとを比較し、両上位アドレスが一致したとき
前記キャッシュメモリ部の命令の1つを前記命令アドレ
スレジスタに記憶されている下位アドレスで指定しキャ
ッシュメモリ部から読み出して出力し、両上位アドレス
が一致しないときには前記命令アドレスレジスタに記憶
されているアドレスによって記憶装置から命令を取り出
して出力するとともに該取り出した命令を前記キャッシ
ュメモリ部に記憶する比較制御部とを有することを要旨
とする。
[Summary of the Invention] In order to achieve the above object, the present invention specifies a predetermined number of instructions as a group in order to specify the next instruction to be executed among instructions stored in a storage device in a computer. an instruction address register that stores an address consisting of an upper address and a lower address that specifies each of a group of instructions specified by the upper address; an upper address register that stores the upper address; A group of instructions specified by the stored high-order address is preempted and stored, and the stored 1
Each of the instructions in the group has a cache memory portion specified by a lower address stored in the instruction address register, an upper address stored in the upper address register, and an upper address stored in the instruction address register. Compare, and when both upper addresses match, specify one of the instructions in the cache memory section with the lower address stored in the instruction address register, read it out from the cache memory section, and output it, and when both upper addresses do not match. The gist of the present invention is to include a comparison control section that retrieves and outputs an instruction from a storage device according to an address stored in the instruction address register, and stores the retrieved instruction in the cache memory section.

[発明実施例] 以下、図面を用いてこの発明の詳細な説明する。[Invention Examples] Hereinafter, the present invention will be explained in detail using the drawings.

図はこの発明の一実施例を示すキャッシュメモリの回路
ブロック図である。同図において、1は命令アドレスレ
ジスタであり、この命令アドレスレジスタ1には次に実
行される命令のアドレスが図示しない制御部の制御によ
りセットされる。この命令アドレスレジスタ1は、例え
ば32ビツトで構成され、下位の第3ビツトから第7ビ
ツトの5ピッ]−からなる下位アドレス1a、すなわち
インデックス部IXと第8ビツトから第32ビツトの2
5ビツトからなる上位アドレス1b、すなわちタグ部I
 PTAGとに分割されている。
The figure is a circuit block diagram of a cache memory showing an embodiment of the present invention. In the figure, 1 is an instruction address register, and the address of the next instruction to be executed is set in this instruction address register 1 under the control of a control section (not shown). This instruction address register 1 is composed of, for example, 32 bits, and includes a lower address 1a consisting of 5 bits from the 3rd bit to the 7th bit, that is, an index part IX and 2 bits from the 8th bit to the 32nd bit.
Upper address 1b consisting of 5 bits, that is, tag part I
It is divided into PTAG and PTAG.

命令アドレスレジスタ1は、命令を記憶している主記憶
装置である外部記憶装置11にアクセスυ制御部13お
よび外部バス15を介して接続されていて、これにより
外部記憶装置11に記憶されている命令を取り出し得る
ようになっている。
The instruction address register 1 is connected to an external storage device 11, which is a main storage device that stores instructions, via an access υ control unit 13 and an external bus 15, so that instructions are stored in the external storage device 11. It is now possible to retrieve commands.

符号3は、外部記憶装置11から先取された命令を記憶
するキャッシュメモリ部であり、このキャッシュメモリ
部3は、先取りされた例えば32ビツトの命令ワードを
記憶する命令ワード部3aと該命令に対応してその命令
の有効性を示す1ビツトのVビット3bからなる33ビ
ツトのエントリを32エントリ記憶し得る、すなわち3
2個の命令ワードとVビットを記憶するメモリロケーシ
ョンを有し、この32のメモリロケーションの各々は命
令アドレスレジスタ1の下位アドレス1aで指定される
ようになっている。Vビットは対応する命令が有効な命
令であるか否かを示すもので、新しい命令がキャッシュ
メモリ部にフェッチされた場合にはその命令は今フェッ
チしたばかりで有効なものであるため、Vビットは「1
」にセットされ、その命令は使用することができること
を意味している。
Reference numeral 3 denotes a cache memory section that stores an instruction prefetched from the external storage device 11, and this cache memory section 3 includes an instruction word section 3a that stores a prefetched instruction word of, for example, 32 bits, and an instruction word section 3a that stores a prefetched instruction word of, for example, 32 bits. It is possible to store 32 entries of 33 bits consisting of 1 bit V bit 3b indicating the validity of the instruction, that is, 3
It has memory locations for storing two instruction words and the V bit, each of these 32 memory locations being designated by a lower address 1a of instruction address register 1. The V bit indicates whether the corresponding instruction is a valid instruction or not. When a new instruction is fetched into the cache memory section, the instruction has just been fetched and is valid, so the V bit indicates whether the corresponding instruction is a valid instruction or not. is “1”
”, meaning the instruction can be used.

また、キャッシュメモリ部3に対応してプログラムベー
ジアドレスレジスタ7が設置ノられている。
Further, a program page address register 7 is provided corresponding to the cache memory section 3.

このベージアドレスレジスタ7は、キャッシュメモリ部
3に記憶されている命令の上位アドレスを記憶するため
のものであり、これによるキャッシュメモリ部3に記憶
されている命令の上位アドレスが識別されるようになっ
ている。この結果、キャッシュメモリ部3に記憶された
各命令はページアドレスレジスタ7で指定される上位ア
ドレスおよび命令アドレスレジスタ1の下位アドレス1
aで指定される下位アドレスで指定される外部記憶装置
11のアドレス記憶されているものと同じである。
This page address register 7 is for storing the upper address of the instruction stored in the cache memory section 3, and is used to identify the upper address of the instruction stored in the cache memory section 3. It has become. As a result, each instruction stored in the cache memory section 3 has an upper address specified by the page address register 7 and a lower address 1 of the instruction address register 1.
This is the same as the address stored in the external storage device 11 specified by the lower address specified by a.

前述したように、キャッシュメモリ部3に記憶される3
2個のエントリを1群と考えてこの1群の命令を1ペー
ジという単位で考えるとすると、ページアドレスレジス
タ7で指定される上位アドレスは各ページを指定づるこ
とになり、命令アドレスレジスタ1の下位アドレス1a
は各ページに記憶されている各命令を指定することにな
る。
As mentioned above, the 3 data stored in the cache memory unit 3
If we consider two entries as one group and this one group of instructions as one page, the upper address specified in page address register 7 will specify each page, and the instructions in instruction address register 1 will be Lower address 1a
will specify each instruction stored in each page.

ページアドレスレジスタ7には、命令アドレスレジスタ
1の上位アドレス1bが供給されるようになっている。
The page address register 7 is supplied with the upper address 1b of the instruction address register 1.

そして、例えば今あるページの命令を実行していたもの
が、ページが替って次のページに移るような場合には、
そのページの先頭のアドレスが命令アドレスレジスタ1
にセットされることになるが、この命令アドレスレジス
タ1にセットされた次ページの先頭アドレスは前記アク
セス制御部13、外部バス15を介して外部記憶表w1
11に供給され、外部記憶装置11から命令が読み出さ
れ、この命令は外部バス15、アクセス制御部13を介
して図示しない制御部の命令実行ユニットに供給される
と同時に、この命令はキャッシュメモリ部に記憶され、
またこの命令のアドレスの上位アドレス、すなわち命令
アドレスレジスタ1にセットされている上位アドレス1
bがページアドレスレジスタ7に次のページを指定すべ
く蓄積されるようになっている。この結果、次のページ
を示す上位アドレスがページアドレスレジスタに蓄積さ
れるとともに、このページの命令がキャッシュメモリ部
に記憶されるようになっている。
For example, if the one that is currently executing the command on the current page changes to the next page,
The first address of that page is instruction address register 1
The start address of the next page set in the instruction address register 1 is sent to the external storage table w1 via the access control unit 13 and the external bus 15.
11, the instruction is read from the external storage device 11, and this instruction is supplied to the instruction execution unit of the control section (not shown) via the external bus 15 and the access control section 13, and at the same time, this instruction is read out from the cache memory. stored in the department,
Also, the upper address of this instruction address, that is, the upper address 1 set in the instruction address register 1.
b is stored in the page address register 7 to designate the next page. As a result, the upper address indicating the next page is stored in the page address register, and the instructions for this page are stored in the cache memory section.

また、ページアドレスレジスタ7に対応して比較器21
が設けられている。この比較器21は、前記命令アドレ
スレジスタ1から供給される上位アドレス1bとページ
アドレスレジスタ7からの上位アドレスとを比較し、ペ
ージアドレスレジスタ7に蓄積されている上位アドレス
が命令アドレスレジスタ1の制御のもとに次に実行する
命令の上位アドレスと同じ正しいものであるか否かを識
別するためのものである。この比較結果、上位アドレス
が正しい場合には比較器から「1」レベ、ルの出力信号
が次段のゲート27に供給される。このゲート27には
更にキャッシュメモリ部3のVビットが供給されており
、このvビットが「1」の場合にはゲート27は「1」
レベルヒツト信号を出力し、このヒツト信号を次段のゲ
ート31に供給する。この結果、キャッシュメモリ部3
に記憶されていて命令アドレスレジスタ1の下位アドレ
ス1aで指定される命令が前記実行ユニットに供給され
て実行されるようになっている。
Also, a comparator 21 corresponds to the page address register 7.
is provided. This comparator 21 compares the upper address 1b supplied from the instruction address register 1 with the upper address from the page address register 7, and the upper address stored in the page address register 7 is the control address of the instruction address register 1. This is to identify whether the address is the same as the upper address of the next instruction to be executed. As a result of this comparison, if the upper address is correct, an output signal of "1" level is supplied from the comparator to the gate 27 of the next stage. This gate 27 is further supplied with the V bit of the cache memory section 3, and when this v bit is "1", the gate 27 is "1".
A level hit signal is output, and this hit signal is supplied to the gate 31 of the next stage. As a result, cache memory section 3
The instruction stored in the instruction address register 1 and designated by the lower address 1a of the instruction address register 1 is supplied to the execution unit and executed.

以上のように、この発明の一実施例のキャッシュメモリ
は構成されている。次にその作用を説明する。
As described above, a cache memory according to an embodiment of the present invention is configured. Next, its effect will be explained.

最初、例えば第1ページの先頭アドレスから実行すると
して、命令アドレスレジスタ1にはこの第1ページの先
頭アドレスが図示しない制御部によりセラ!〜されると
ともに、ページアドレスレジスタ7にはこの第1ページ
の上位アドレスが蓄積され、キャッシュメモリ部3には
その第1ページの先頭アドレスからの命令が「1」のV
ビットとともに順に記憶されているという状態で、まず
ページが連続的に例えば第1ページから第2ページへと
次のページに移る場合について説明する。
Initially, for example, when execution is performed from the start address of the first page, the start address of the first page is stored in the instruction address register 1 by a control unit (not shown). ..., the upper address of this first page is stored in the page address register 7, and the instruction from the first address of the first page is stored in the cache memory unit 3 at a V of "1".
First, a case will be described in which the pages are sequentially stored together with the bits, and the page sequentially moves to the next page, for example, from the first page to the second page.

まず、命令アドレスレジスタ1セツトされている最初に
実行すべき命令のアドレスである第1ページの先頭アド
レスの上位アドレス1bが比較器21の一方の入力に供
給され、他方の入力に供給されているページアドレスレ
ジスタ7からの上位アドレスと比較される。今の場合、
両上位アドレスは等しいので、比較器21からは一致信
号がゲート27に供給される。一方、このゲート27に
は命令アドレスレジスタ1の下位アドレス1aで指定さ
れるキャッシュメモリ部3のVビットが供給されている
が、今の場合このVビットは「1」であるので、ゲート
27からはヒツト信号°が出力され、このヒツト信号に
よりゲート31が駆動される。この結果、命令アドレス
レジスタ1の下位アドレス1aで指定されているエント
リの命令がキャッシュメモリ部3から実行ユニットに出
力され、次の命令として実行ユニットで実行される。
First, the upper address 1b of the top address of the first page, which is the address of the first instruction to be executed set in the instruction address register 1, is supplied to one input of the comparator 21, and is supplied to the other input. It is compared with the upper address from the page address register 7. In this case,
Since both upper addresses are equal, a match signal is supplied from the comparator 21 to the gate 27. On the other hand, this gate 27 is supplied with the V bit of the cache memory unit 3 specified by the lower address 1a of the instruction address register 1, but since this V bit is "1" in this case, the gate 27 is A hit signal ° is output, and the gate 31 is driven by this hit signal. As a result, the instruction in the entry specified by the lower address 1a of the instruction address register 1 is output from the cache memory section 3 to the execution unit, and is executed by the execution unit as the next instruction.

また、この命令の実行中の所定の時点においては、命令
アドレスレジスタ1にその次に実行すべき命令のアドレ
スが制御部の制御によりセットされる。このアドレスは
、前の命令がジャンプ命令等でない場合には、通常法の
アドレスであり、下位アドレスが+1インクレメントし
ただけで上位アドレスは同じである。すなわち、同じく
第1ページで先頭の命令から次の命令に移ったのみであ
る。そして、このアドレスの上位アドレス1bは上述し
た最初の場合と同様に比較器21に供給され、ページア
ドレスレジスタ7から供給されている上位アドレスとを
比較される。ページは当然同じであるので、両上位アド
レスは等しいため、比較器21から一致信号がゲート2
7に供給される。
Further, at a predetermined time point during the execution of this instruction, the address of the next instruction to be executed is set in the instruction address register 1 under the control of the control section. This address is a normal address if the previous instruction is not a jump instruction or the like, and the upper address remains the same except that the lower address is incremented by +1. That is, the instruction is simply moved from the first instruction to the next instruction on the first page. Then, the upper address 1b of this address is supplied to the comparator 21 as in the first case described above, and is compared with the upper address supplied from the page address register 7. Since the pages are naturally the same, both upper addresses are equal, so a match signal is sent from the comparator 21 to the gate 2.
7.

下位アドレス1aで指定されるエントリのキャッシュメ
モリ部3のVビットは「1Jであるので、ゲート27か
らはヒツト信号が出力され、上述した場合と同様に下位
アドレス1aで指定されるエントリのキャッシュメモリ
部3の命令がゲート31を介して実行ユニットに供給さ
れる。
Since the V bit of the cache memory section 3 of the entry specified by the lower address 1a is "1J," a hit signal is output from the gate 27, and the cache memory section 3 of the entry specified by the lower address 1a is outputted as in the case described above. The instructions of section 3 are supplied to the execution unit via gate 31.

以下同様な動作を第1のページの各命令に対して繰返し
て行なう。第1のページのすべての命令を完了すると、
次に第2のページの先頭アドレスが命令アドレスレジス
タ1にセットされる。その結果、この命令アドレスレジ
スタ1にセットされたアドレスの上位アドレス1bが比
較器21に供給され、ページアドレスレジスタ7から供
給されている上位アドレスと比較されるが、この場合ペ
ージアドレスレジスタ7には第1のページに対応する上
位アドレスが蓄積されているので、命令アドレスレジス
タ1から供給される第2のページに対応する上位アドレ
ス1bと一致しないため、比較器21からの不一致信号
が出力され、この不一致信号によりキャッシュメモリ部
3のVビットはすべて「0」にリセットされるとともに
、次に実行すべき第2ページの先頭アドレスが命令アド
レスレジスタ1からアクセス制御部13、外部バス15
を介して外部記憶装置11に供給されて外部記憶装置1
1から次に実行すべき第2ページ先頭アドレスの命令が
読み出される。この命令は外部バス15、アクセスυ制
御部13を介して実行ユニットに供給されて実行される
とともに、命令アドレスレジスタ1の下位アドレス1a
で指定されるキャッシュメモリ部3の対応するエントリ
にこの命令の有効性を示すvビットの11」とともに記
憶される。また、このときページアドレスレジスタ7に
は命令アドレスレジスタ1にセットされている上位アド
レスlb、すなわち第2ページの先頭アドレスの上位ア
ドレス1bが蓄積されて、第2ページの命令がキャッシ
ュメモリ部3に記憶されていることを示す。そして、こ
のように第2ページの先頭アドレスの命令が記憶さ机た
キャッシュメモリ部3のエントリ以降には図示しないI
IJ 111部により順次第2ページの各命令が記憶さ
れ、以下上述した場合と同様に順次実行ユニットに供給
されて実行される。
Thereafter, similar operations are repeated for each instruction of the first page. After completing all instructions on the first page,
Next, the start address of the second page is set in the instruction address register 1. As a result, the upper address 1b of the address set in the instruction address register 1 is supplied to the comparator 21 and compared with the upper address supplied from the page address register 7. In this case, the page address register 7 is Since the upper address corresponding to the first page is stored, it does not match the upper address 1b corresponding to the second page supplied from the instruction address register 1, so a mismatch signal is output from the comparator 21. Due to this mismatch signal, all the V bits of the cache memory unit 3 are reset to "0", and the start address of the second page to be executed next is changed from the instruction address register 1 to the access control unit 13 to the external bus 15.
is supplied to the external storage device 11 via the external storage device 1
The instruction at the top address of the second page to be executed next is read from 1. This instruction is supplied to the execution unit via the external bus 15 and the access υ control unit 13 and executed, and is also executed at the lower address 1a of the instruction address register 1.
The instruction is stored in the corresponding entry of the cache memory unit 3 specified by , along with the v bit of 11'' indicating the validity of this instruction. Also, at this time, the upper address lb set in the instruction address register 1, that is, the upper address 1b of the first address of the second page, is stored in the page address register 7, and the instruction of the second page is stored in the cache memory section 3. Indicates that it is remembered. Then, after the entry of the cache memory section 3 where the instruction at the start address of the second page is stored, there is an I, not shown.
The IJ 111 sequentially stores two pages of instructions, and then sequentially supplies them to the execution unit for execution in the same way as in the case described above.

また、以上のようにして例えば第1ページまた第2ペー
ジを順次実行中にページの途中でジャンプ命令等により
他のページに移るような場合には、当然比較器21にお
ける上位アドレスの比較は一致しないので、比較器21
からは不一致信号が出力され、この不一致信号によりキ
ャッシュメモリ部3のVビットがすべてrOJにリセッ
トされるとともに、ジャンプ命令等で命令アドレスレジ
スタ1にセットされた次に実行すべき他のページのアド
レスが命令アドレスレジスタ1からアクセス制御部13
、外部バス15を介して外部記憶装置11に供給されて
外部記憶装置11から次に実行すべき他のページのアド
レスの命令が読み出される。以下の動作は上述した場合
と同様にである。
In addition, in the case where, for example, the first page and the second page are sequentially executed as described above and the page is moved to another page by a jump instruction or the like in the middle of the page, naturally the comparison of the upper addresses in the comparator 21 will result in a match. Since it does not, comparator 21
A mismatch signal is output from , and this mismatch signal resets all the V bits of the cache memory unit 3 to rOJ, and also sets the address of another page to be executed next that is set in the instruction address register 1 by a jump instruction, etc. is from the instruction address register 1 to the access control unit 13
, are supplied to the external storage device 11 via the external bus 15, and the command at the address of another page to be executed next is read from the external storage device 11. The following operations are similar to those described above.

すなわち、このようにした外部記憶装置11から読み出
されれた命令は外部バス15、アクセス制御1ss13
を介して実行ユニットに供給されて実行されるとともに
、命令アドレスレジスタ1の下位アドレス1aで指定さ
れるキャッシュメモリ部3の対応するエントリにこの命
令の有効性を示すVビットの「1」とともに記憶される
。また、このときページアドレスレジスタ7には命令ア
ドレスレジスタ1にセットされている上位アドレス1b
That is, the instructions read from the external storage device 11 in this manner are transferred to the external bus 15 and the access control 1ss13.
is supplied to the execution unit via the instruction address register 1 for execution, and is stored in the corresponding entry of the cache memory section 3 specified by the lower address 1a of the instruction address register 1 along with the V bit "1" indicating the validity of this instruction. be done. At this time, the page address register 7 also contains the upper address 1b set in the instruction address register 1.
.

すなわちジャンプした他のページのアドレスの上位アド
レス1bが蓄積されて、他のページの命令がキャッシュ
メモリ部3に記憶されていることを示す。そして、この
ように他のページのアドレスの命令が記憶されたキャッ
シュメモリ部3のエントリ以降には図示しない制msに
より順次他のページの各命令が記憶され、以下上述した
場合と同様に順次実行ユニットに供給されて実行される
That is, the upper address 1b of the address of the other page to which the jump was made is accumulated, indicating that the instructions of the other page are stored in the cache memory unit 3. Then, after the entry of the cache memory unit 3 where the instructions at the addresses of other pages are stored, each instruction of the other pages is sequentially stored by a control system (not shown), and thereafter executed sequentially in the same manner as in the above case. is fed to the unit and executed.

なお、上述したジャンプ処理等において、他のページの
先頭アドレスにジャンプしたのでなく、他のページの途
中のアドレスにジャンプした場合には、キャッシュメモ
リ部3においてそのジャンプした途中のエントリから他
のページの途中の命令が「1」のvビットとともに記憶
される。そして、この途中のエントリより上のキャッシ
ュメモリ部3のエントリには前のページの命令が残って
いるが、この命令に対するVビットはrOJになってい
るので、仮にジャンプ命令等でこの部分に相当する他の
ページの上方の命令が指定されたとしてもVビットが「
0」であるため、誤って前のページの命令が使用されな
いようになっている。
In addition, in the above-mentioned jump processing, etc., if the jump is not to the start address of another page but to an address in the middle of another page, the cache memory unit 3 executes the jump from the entry in the middle of the jump to the other page. The instruction in the middle of is stored with the v bit of "1". The instruction of the previous page remains in the entry in the cache memory unit 3 above this intermediate entry, but the V bit for this instruction is rOJ, so if a jump instruction etc. Even if the upper instruction of another page is specified, the V bit is
0'', this prevents the instruction on the previous page from being used by mistake.

[発明の効果] 以上説明したように、この発明によれば、キャッシュメ
モリ部に記憶される各命令に対応してその上位アドレス
を記憶するメモリ部、すなわち従来のキャッシュメモリ
におけるタグメモリ部を有していす、この代りに1つの
上位アドレスのみを記憶する上位アドレスレジスタを設
けたのみであるので、必要とするメモリが大幅に低減さ
れているため、経済化および小型化でき、特に集積化し
た場合チップ面積を大幅に減少し、経済化し得るととも
に、従来のタグメモリ部に代えてレジスタを使用してい
るので高速化が達成されている。
[Effects of the Invention] As described above, according to the present invention, a memory section that stores the upper address of each instruction stored in the cache memory section, that is, a tag memory section in a conventional cache memory section, is provided. Instead, a high-order address register that stores only one high-order address is provided, so the required memory is significantly reduced, making it economical and compact, especially when integrated. In this case, the chip area can be significantly reduced, making it more economical, and since a register is used in place of the conventional tag memory section, high speed is achieved.

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

図はこの発明の一実施例を示すキャッシュメモリのブロ
ック図である。 1・・・命令アドレスレジスタ、 3・・・キャッシュメモリ部、 7・・・ページアドレスレジスタ、 11・・・外部記憶装置、 21・・・比較器。
The figure is a block diagram of a cache memory showing an embodiment of the present invention. DESCRIPTION OF SYMBOLS 1... Instruction address register, 3... Cache memory section, 7... Page address register, 11... External storage device, 21... Comparator.

Claims (1)

【特許請求の範囲】[Claims] コンピュータにおいて記憶装置に記憶されている命令の
うち次に実行すべき命令を指定すべく、所定数の命令を
1群として指定する上位アドレスおよび該上位アドレス
で指定される1群の命令の各々を指定する下位アドレス
で構成されるアドレスを記憶する命令アドレスレジスタ
と、前記上位アドレスを記憶する上位アドレスレジスタ
と、前記上位アドレスレジスタに記憶されている上位ア
ドレスで指定される1群の命令を先取りして記憶し、該
記憶された1群の命令の各々は前記命令アドレスレジス
タに記憶された下位アドレスによつて指定されるキャッ
シュメモリ部と、前記上位アドレスレジスタに記憶され
ている上位アドレスと前記命令アドレスレジスタに記憶
されている上位アドレスとを比較し、両上位アドレスが
一致したとき前記キャッシュメモリ部の命令の1つを前
記命令アドレスレジスタに記憶されている下位アドレス
で指定しキャッシュメモリ部から読み出して出力し、両
上位アドレスが一致しないときには前記命令アドレスレ
ジスタに記憶されているアドレスによって記憶装置から
命令を取り出して出力するとともに該取り出した命令を
前記キャッシュメモリ部に記憶する比較制御部とを有す
ることを特徴とするキャッシュメモリ。
In order to specify the next instruction to be executed among the instructions stored in a storage device in a computer, a high-order address that specifies a predetermined number of instructions as a group, and each of the group of instructions specified by the high-order address are An instruction address register that stores an address consisting of a specified lower address, an upper address register that stores the upper address, and a group of instructions specified by the upper address stored in the upper address register. and each of the stored instructions is stored in a cache memory section specified by a lower address stored in the instruction address register, an upper address stored in the upper address register, and the instruction. Compare the upper address stored in the address register, and when both upper addresses match, specify one of the instructions in the cache memory section with the lower address stored in the instruction address register and read it from the cache memory section. and a comparison control unit that retrieves and outputs the instruction from the storage device according to the address stored in the instruction address register and stores the retrieved instruction in the cache memory section when the two upper addresses do not match. A cache memory characterized by:
JP60113184A 1985-05-28 1985-05-28 Cache memory Pending JPS61271549A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60113184A JPS61271549A (en) 1985-05-28 1985-05-28 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60113184A JPS61271549A (en) 1985-05-28 1985-05-28 Cache memory

Publications (1)

Publication Number Publication Date
JPS61271549A true JPS61271549A (en) 1986-12-01

Family

ID=14605681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60113184A Pending JPS61271549A (en) 1985-05-28 1985-05-28 Cache memory

Country Status (1)

Country Link
JP (1) JPS61271549A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63189953A (en) * 1987-02-02 1988-08-05 Alps Electric Co Ltd Disk cache system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63189953A (en) * 1987-02-02 1988-08-05 Alps Electric Co Ltd Disk cache system

Similar Documents

Publication Publication Date Title
US4792897A (en) Address translation unit for translation of virtual address to real address using translation tables of multi-level hierarchical structure
JP2003509733A5 (en)
JPH08101797A (en) Translation lookaside buffer
US4999770A (en) Command controlled multi-storage space protection key pretesting system permitting access regardless of test result if selected key is predetermined value
KR100335672B1 (en) Fast data retrieval from physical addressing data storage structures using memory page crossing prediction comments
US6571316B1 (en) Cache memory array for multiple address spaces
JPS61210430A (en) Data processor
KR950006590B1 (en) Microprocessor with a cache memory
JPH05210593A (en) Memory partitioning device for microprocessor and method of loading segment descriptor to segment-register
JP4004847B2 (en) Associative memory device
US4641277A (en) System for detecting access to storage
SU784814A3 (en) Address retrieving device
JPS61271549A (en) Cache memory
US4456976A (en) Associative memory system
US6745313B2 (en) Absolute address bits kept in branch history table
JPH0548497B2 (en)
KR100517765B1 (en) Cache memory and control method thereof
JPS61271572A (en) Cache memory
JPS5815810B2 (en) digital processing equipment
EP0173556A2 (en) Hierarchical architecture for determining the least recently used cache memory
JPS623354A (en) Cache memory access system
JP2621763B2 (en) Information processing device
KR100505633B1 (en) Data reading apparatus and method for cache memory
JPH0528414B2 (en)
JP2727947B2 (en) Address trace method