JPH0664553B2 - Stack control circuit - Google Patents

Stack control circuit

Info

Publication number
JPH0664553B2
JPH0664553B2 JP62233671A JP23367187A JPH0664553B2 JP H0664553 B2 JPH0664553 B2 JP H0664553B2 JP 62233671 A JP62233671 A JP 62233671A JP 23367187 A JP23367187 A JP 23367187A JP H0664553 B2 JPH0664553 B2 JP H0664553B2
Authority
JP
Japan
Prior art keywords
stack
address
control circuit
invalidation
input
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 - Lifetime
Application number
JP62233671A
Other languages
Japanese (ja)
Other versions
JPS6478341A (en
Inventor
宏之 岸本
義彦 清水
Original Assignee
株式会社ピーエフユー
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 株式会社ピーエフユー filed Critical 株式会社ピーエフユー
Priority to JP62233671A priority Critical patent/JPH0664553B2/en
Publication of JPS6478341A publication Critical patent/JPS6478341A/en
Publication of JPH0664553B2 publication Critical patent/JPH0664553B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔概要〕 本発明はキャッシュメモリの無効化アドレスを一時格納
するスタック制御回路の構成に関し、 同一の無効化アドレスを多重にスタックすることを防止
し、これによるスタック個数の削減を図り、キャッシュ
メモリ無効化処理の効率化を図ることを目的とし、 本発明は、中央処理装置と主記憶装置との間に備えれる
キャッシュメモリを無効化するアドレスを、複数のスタ
ックに一時的に格納するスタック制御回路であって、前
記スタック制御回路の入力段に、前記スタックに現在格
納されている無効化アドレスと新たに格納する無効化ア
ドレスを比較判定し、前記無効化アドレスが一致しない
ときのみ前記スタックに前記無効化アドレスを送出する
アドレス比較判定手段を具備するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Outline] The present invention relates to a configuration of a stack control circuit that temporarily stores invalidation addresses of a cache memory, and prevents the same invalidation address from being stacked in multiple layers. For the purpose of reducing the number of cache memories and improving the efficiency of cache memory invalidation processing, the present invention temporarily stores an address for invalidating a cache memory provided between a central processing unit and a main storage device in a plurality of stacks. A stack control circuit for temporarily storing, and the invalidation address currently stored in the stack is compared with the invalidation address newly stored in the input stage of the stack control circuit, and the invalidation address is matched. An address comparison / determination means for sending the invalidation address to the stack is provided only when the stack is not used.

〔産業上の利用分野〕[Industrial application field]

本発明はキャッシュメモリの無効化アドレスを一時格納
するスタック制御回路の構成に関する。
The present invention relates to the configuration of a stack control circuit that temporarily stores an invalidation address of a cache memory.

〔従来の技術及び発明が解決しようとする問題点〕[Problems to be Solved by Prior Art and Invention]

キャッシュメモリは計算機の動作速度を向上させるため
に主メモリとプロセッサとの間にシステムバスを介して
設けられる比較的低容量の高速メモリである。通常、主
メモリの格納されているプログラムやデータの一部分を
一時的にキャッシュメモリに保持し、キャッシュメモリ
とプロセッサとの間でデータの転送をすることにより高
速化を図るものである。
The cache memory is a relatively low-capacity high-speed memory that is provided between the main memory and the processor via the system bus to improve the operating speed of the computer. Usually, a part of a program or data stored in the main memory is temporarily held in the cache memory, and data is transferred between the cache memory and the processor to increase the speed.

キャッシュメモリは、各々複数のエントリに分割された
アドレスを格納するタグ部とデータを格納するデータ部
により構成され、タグ部の各エントリはアドレスを示す
ビットと、誤りチェックのためのパリティビットと、そ
のエントリの有効もしくは有効を示すバリッドビットに
より構成される。従って、エントリの無効化は主メモリ
に対応するエントリのバリッドビットを例えば“0”に
リセットすることによりなされる。一方、キャッシュメ
モリの無効化すべきエントリのアドレスを順次一時的に
格納するためにスタック制御回路がキャッシュメモリと
は別個に設けられる。スタック制御回路は無効化アドレ
スごとに格納していく複数的直列のもしくは複数個並列
のスタックで構成される。
The cache memory is composed of a tag unit that stores an address divided into a plurality of entries and a data unit that stores data. Each entry of the tag unit has a bit indicating an address, a parity bit for error checking, and It is composed of valid bits of the entry or a valid bit indicating the validity. Therefore, the entry is invalidated by resetting the valid bit of the entry corresponding to the main memory to, for example, "0". On the other hand, a stack control circuit is provided separately from the cache memory to sequentially and temporarily store the addresses of the entries to be invalidated in the cache memory. The stack control circuit is composed of a plurality of serial or parallel stacks for storing each invalidation address.

このような構成において、すでにキャッシュメモリに登
録されている主メモリのメモリ領域が、システムバスに
接続されたプロセッサあるいは他マスタ装置によって書
き換えられる場合がある。この場合、キャッシュメモリ
の内容と主メモリとの一致がとれなくなるので、例えば
他マスタ装置が主メモリに書込みを行なう際に、主メモ
リのアドレスに対応するキャッシュメモリのエントリの
内容を無効化しなければならない。このような無効化処
理は他マスタ装置による主メモリへの書込み時に、その
アドレスを前述のスタックに順次格納しておきプロセッ
サからのアクセスの空き時間(キャッシュメモリの未使
用時間)を利用して、そのアドレスを無効化アドレスと
してキャッシュメモリに送出することにより行なわれ
る。そして無効化処理の終了したアドレスはスタックか
ら追放され次の無効化アドレスのためのメモリ空間とな
る。
In such a configuration, the memory area of the main memory already registered in the cache memory may be rewritten by the processor or another master device connected to the system bus. In this case, the contents of the cache memory and the main memory cannot be matched. Therefore, for example, when another master device writes to the main memory, the contents of the entry of the cache memory corresponding to the address of the main memory must be invalidated. I won't. In such invalidation processing, when writing to the main memory by another master device, the addresses are sequentially stored in the above-mentioned stack and the idle time of access from the processor (the unused time of the cache memory) is used to This is done by sending that address to the cache memory as an invalidation address. The invalidated address is expelled from the stack and becomes a memory space for the next invalidated address.

第4図は従来のスタック制御回路の構成例であって複数
個のスタックST0〜STnが並列に配置される場合である。
他マスタ装置から無効化アドレスがアドレス線1を介し
てスタックST0〜STnに順次に格納(スタック)されてい
く。無効化処理時にはスタック出力を切り換える切換手
段2によって最も古くスタックされたアドレスからキャ
ッシュメモリのタグ部に送出される。
FIG. 4 shows an example of the configuration of a conventional stack control circuit, in which a plurality of stacks ST 0 to ST n are arranged in parallel.
The invalidation addresses are sequentially stored (stacked) in the stacks ST 0 to ST n via the address line 1 from other master devices. At the time of invalidation processing, the oldest stacked address is sent to the tag portion of the cache memory by the switching means 2 that switches the stack output.

しかしながら、この場合、スタックは現在すでに格納し
ているアドレスと新たにスタックしようとしているアド
レスが、同一であろうと異なるものであろうとすべてス
タックしてしまうので、幾つもの同一アドレスを多重に
保持してしまうことがあり、この場合には同一アドレス
にエントリを再度無効化することがある。例えば、キャ
ッシュメモリのデータ部によっては、1つのアドレスの
エントリに4種類のデータが格納される構成のものがあ
り、このため同一アドレスでデータが異なる場合には同
一エントリを再度無効化してしまう場合である。これに
対処するために、より多くのアドレスを保持しようとす
るとスタックの個数を増大しなければならないという問
題がある。
However, in this case, the stack will stack all the addresses that are already stored and the address that is being newly stacked, whether they are the same or different, so hold multiple identical addresses in multiple layers. In this case, the entry may be invalidated again at the same address. For example, depending on the data part of the cache memory, there is a configuration in which four types of data are stored in an entry of one address. Therefore, when the same address has different data, the same entry is invalidated again. Is. To deal with this, there is a problem that the number of stacks must be increased in order to hold more addresses.

本発明の目的はスタック制御回路においてスタック個数
の削減と、同一アドレスを重ねてスタックすることを防
止しキャッシュメモリ無効化処理の効率化を図ることに
ある。
An object of the present invention is to reduce the number of stacks in a stack control circuit and prevent stacking of the same address in a stack to improve the efficiency of cache memory invalidation processing.

〔問題点を解決するための手段及び作用〕[Means and Actions for Solving Problems]

第1図は本発明の基本構成図である。図に示すように、
スタック制御回路の入力段にアドレス比較判定手段11
を設け、新たな無効化アドレスは先ず最初にこのアドレ
ス比較判定手段11に入力され、現時点ですでにスタッ
クされているアドレスと比較判定し、同一のアドレスは
スタックせず異なるアドレスのみスタックするように構
成する。即ち、スタックST0〜STnからは自己の現在スタ
ックしているアドレスを比較判定手段11に送出してお
き、アドレス比較判定手段11で比較判定した結果、異
なるアドレスであれば、いずれか空いているスタックに
アドレスを送出する。
FIG. 1 is a basic configuration diagram of the present invention. As shown in the figure,
Address comparison / determination means 11 is provided at the input stage of the stack control circuit.
The new invalidation address is first input to the address comparison / determination means 11 to make a comparison determination with the address already stacked at the present time so that the same address is not stacked and only different addresses are stacked. Constitute. That is, from the stacks ST 0 to ST n, the address currently stacked by itself is sent to the comparison / determination means 11, and the address comparison / determination means 11 makes a comparison / determination result. Address is sent to the existing stack.

このようにスタック制御回路の入力段にアドレス比較判
定手段11を付加すると、無効化すべき同一アドレスを
多重にスタックしてしまうことが防止でき、これにより
スタック個数の削減も可能となり結局効率の良い無効化
処理を実施することができる。尚、切換手段12は、前
述と同様に、無効化処理時に最も古くスタックしたアド
レスから順にキャッシュメモリのタグ部に無効化アドレ
スとして送出するためのものである。
By thus adding the address comparison / judgment means 11 to the input stage of the stack control circuit, it is possible to prevent the same address to be invalidated from being stacked in a multiple manner, which makes it possible to reduce the number of stacks and, consequently, efficient invalidation. The chemical treatment can be carried out. Incidentally, the switching means 12 is, as described above, for sending out as the invalidation address to the tag portion of the cache memory in order from the oldest stacked address during the invalidation processing.

〔実施例〕〔Example〕

第2図は本発明によるスタック制御回路の一実施例構成
図である。図において、21はアドレスラッチ回路、2
2はアドレス比較判定回路、23は第1のスタックカウ
ンタ、24はスタック入力制御回路、25はスタック、
26は第2のスタックカウンタ、27はスタック出力制
御回路である。このような構成において、アクセス元で
あるプロセッサや他マスタ装置からのアドレスAは一
旦アドレスラッチ回路21にラッチされる。一方、アド
レス比較判定回路22にはスタックST0〜ST3のアドレス
〜が各々入力され、アドレスラッチ回路21から出
力されたアドレスAと比較し、CPUから送出される
メモリライト信号(SET)によってスタック入力イネ
イブル信号(E)を作成する。第1スタックカウンタ2
3はイネイブル信号Eによりカウントする4進カウンタ
であって、3→0→1→2→3→0→…のようにサイク
リックに順次、スタックを示すカウント値Cを出力す
る。このカウント値Cはアドレス比較判定回路22に
出力されると共にスタック入力制御回路24に出力され
る。
FIG. 2 is a block diagram of an embodiment of the stack control circuit according to the present invention. In the figure, 21 is an address latch circuit, 2
2 is an address comparison / determination circuit, 23 is a first stack counter, 24 is a stack input control circuit, 25 is a stack,
Reference numeral 26 is a second stack counter, and 27 is a stack output control circuit. In such a configuration, the address A 1 from the processor as the access source or another master device is once latched in the address latch circuit 21. On the other hand, the address-stack ST 0 ~ST 3 is respectively input to the address comparison determination circuit 22 compares the address A 2 output from the address latch circuit 21, the memory write signal sent from the CPU (SET) Create a stack input enable signal (E). First stack counter 2
Reference numeral 3 denotes a quaternary counter which counts by the enable signal E, and cyclically outputs a count value C 1 indicating a stack in the order of 3 → 0 → 1 → 2 → 3 → 0 →. The count value C 1 is output to the address comparison / determination circuit 22 and the stack input control circuit 24.

スタック入力制御回路24にはアドレスラッチ回路21
からのアドレスAと、アドレス比較判定回路22から
のイネイブル信号Eと、スタックカウンタ23からのカ
ウント値Cが入力され、イネイブル信号Eによってカ
ウント値Cにより選択されたスタックへアドレスA
を出力する。スタック25はスタック入力制御回路24
により指定されたスタックへアドレスAをスタックす
る。一方、第2のスタックカウンタ26はCPUの空き
時間に送出される無効化信号IVによりカウントする4
進カウンタであって、カウンタ値3→0→1→2→3→
0→…のようにサイクリックに順次スタックを示すカウ
ント値Cを出力する。スタック出力制御回路27は第
2のスタックカウンタ26により指定されたスタックの
アドレスAをキャッシュメモリのタグ部(図示せず)
へ無効化アドレスAとして出力する。
The stack input control circuit 24 includes the address latch circuit 21.
The address A 2 from the enable signal E from the address comparison determination circuit 22, the count value C 1 is input from the stack counter 23, the address A 2 to the stack which is selected by the count value C 1 by enable signal E
Is output. The stack 25 is a stack input control circuit 24
The address A 3 is stacked on the stack designated by. On the other hand, the second stack counter 26 counts by the invalidation signal IV sent during the idle time of the CPU 4
It is a binary counter and the counter value is 3 → 0 → 1 → 2 → 3 →
A count value C 2 indicating a stack is cyclically output as 0 → ... The stack output control circuit 27 uses the address A 4 of the stack designated by the second stack counter 26 as the tag portion (not shown) of the cache memory.
And outputs it as an invalidation address A 5 .

第3図は第2図に示すアドレス比較判定回路22の一実
施例回路図である。図において、31a〜38はANDゲ
ート、39〜43はORゲートである。これらの内で、AN
Dゲート31b,32b,33b,34bの入力は反転し
て入力され、NORゲート44の出力はANDゲート3
8の一方に入力される。ANDゲート35の一方の入力
にはスタック番号を示すカウント値“0”が、ORゲー
ト43の入力にはスタック番号を示すカウント値“1”
および“2”が、ANDゲート37の一方の入力にはス
タック番号を示すカウント値“3”が入力される。これ
らのカウント値(C0,C1,C2,C3)は第1のス
タックカウンタ23から出力されるカウント値Cに対
応する。ANDゲート38の出力はスタック入力制御回
路24に入力されるイネイブル信号Eである。この場
合、ANDゲート38の他方の入力にはメモリライト信
号SETが入力される。従ってこれら入力信号の両方が
ハイレベル“H”のときイネイブル信号Eが得られる。
FIG. 3 is a circuit diagram of an embodiment of the address comparison / determination circuit 22 shown in FIG. In the figure, 31a to 38 are AND gates and 39 to 43 are OR gates. Among these, AN
The inputs of the D gates 31b, 32b, 33b and 34b are inverted and input, and the output of the NOR gate 44 is the AND gate 3
8 is input to one side. The count value "0" indicating the stack number is input to one input of the AND gate 35, and the count value "1" indicating the stack number is input to the OR gate 43.
And "2", and the count value "3" indicating the stack number is input to one input of the AND gate 37. These count values (C0, C1, C2, C3) correspond to the count value C 1 output from the first stack counter 23. The output of the AND gate 38 is the enable signal E input to the stack input control circuit 24. In this case, the memory write signal SET is input to the other input of the AND gate 38. Therefore, when both of these input signals are at the high level "H", the enable signal E is obtained.

この回路の動作は次にようになる。例えば、第1のスタ
ックカウンタ23から出力されるカウント値がスタック
ST0を示す“0”のとき、スタックST0のアドレスが有効
なのでアドレスAとスタックST0とが比較される。こ
の場合、C0=“H”、C1,C2,C3=“L”なの
で、ANDゲート35〜37の出力はローレベル“L”とな
る。アドレスAとスタックST0のアドレスの比較によ
って不一致ならばANDゲート31aと31bの出力が共に
“L”となるので、ORゲート39の出力は“L”とな
る。従ってNORゲート44の出力は“H”となるので
メモリライト信号SETが1のときのみイネイブル信号
Eは“H”となる。また、カウント値がスタックST2
示す“2”のとき、スタックST0,ST1,ST2のアドレス
が有効なのでこれらをアドレスAと比較する。この場
合、C2=“H”、C0,C1,C3が“L”なのでA
NDゲート37の出力は“L”となる。従って、アドレス
とスタックST0のアドレスの比較、AとST1の比
較、AとST2の比較において、それぞれ不一致なら
ば、それぞれが“L”となる。故に、これらがすべて
“L”となり、メモリライト信号SETが“H”のとき
のみイネイブル信号が“H”となる。
The operation of this circuit is as follows. For example, the count value output from the first stack counter 23 is the stack
When indicating the ST 0 "0", since the address of the stack ST 0 is valid and the address A 2 and stack ST 0 are compared. In this case, since C0 = “H” and C1, C2, C3 = “L”, the outputs of the AND gates 35 to 37 are low level “L”. If the addresses A 2 and the address of the stack ST 0 do not match, the outputs of the AND gates 31 a and 31 b both become “L”, and the output of the OR gate 39 therefore becomes “L”. Therefore, the output of the NOR gate 44 becomes "H", and the enable signal E becomes "H" only when the memory write signal SET is "1". Further, when the count value indicates a stack ST 2 of "2", the stack ST 0, ST 1, since the address of the ST 2 is enabled to compare these with the address A 2. In this case, C2 = "H" and C0, C1, C3 are "L", so A
The output of the ND gate 37 becomes "L". Therefore, if there is a mismatch in the comparison of the address A 2 and the address of the stack ST 0 , the comparison of A 2 and ST 1 , and the comparison of A 2 and ST 2 , each becomes “L”. Therefore, all of them become "L", and the enable signal becomes "H" only when the memory write signal SET is "H".

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明によれば、キャッシュメモリ
の無効化アドレスをスタックするスタック制御回路にア
ドレスを比較する比較判定手段を付加することによっ
て、同一の無効化アドレスが多重スタックされることを
防止することができ、これによりスタック数を削減する
ことができ、効率の良い無効化処理が可能となる。
As described above, according to the present invention, it is possible to prevent the same invalidation address from being stacked in multiple stacks by adding the comparison / determination means for comparing the addresses to the stack control circuit that stacks the invalidation addresses of the cache memory. Therefore, the number of stacks can be reduced, and efficient invalidation processing can be performed.

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

第1図は本発明の基本構成図、 第2図は第1図の一実施例詳細ブロック図、 第3図は第2図アドレス比較判回路の詳細図、 および 第4図は従来の構成図である。 (符号の説明) 11…アドレス比較判定手段、 12…切換手段、 21…アドレスラッチ回路、 22…アドレス比較判定回路、 23…第1スタックカウンタ、 24…スタック入力制御回路、 25…スタック、 26…第2スタックカウンタ、 27…スタック出力制御回路。 FIG. 1 is a basic configuration diagram of the present invention, FIG. 2 is a detailed block diagram of one embodiment of FIG. 1, FIG. 3 is a detailed diagram of an address comparison judgment circuit of FIG. 2, and FIG. 4 is a conventional configuration diagram. Is. (Explanation of Codes) 11 ... Address Comparison / Determination Means, 12 ... Switching Means, 21 ... Address Latch Circuit, 22 ... Address Comparison Judgment Circuit, 23 ... First Stack Counter, 24 ... Stack Input Control Circuit, 25 ... Stack, 26 ... Second stack counter, 27 ... Stack output control circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】中央処理装置と主記憶装置との間に備えら
れるキャッシュメモリを無効化するアドレスを、複数の
スタック(25)に一時的に格納するスタック制御回路
であって、 前記スタック制御回路の入力段に、前記スタックに現在
格納されている無効化アドレスと新たに格納する無効化
アドレスを比較判定し、前記無効化アドレスが一致しな
いときのみ前記スタックに前記無効化アドレスを送出す
るアドレス比較判定回路(22)と、前記スタックを指
定するためのカウントを行うスタックカウンタ(23)
とを備え、かつ前記スタックと前記アドレス比較回路と
前記スタックカウンタは、入力されるアドレスに対して
並列に接続されていることを特徴とするスタック制御回
路。
1. A stack control circuit for temporarily storing, in a plurality of stacks (25), an address for invalidating a cache memory provided between a central processing unit and a main storage unit. Address comparison for determining the invalidation address currently stored in the stack and the invalidation address newly stored in the input stage of the stack, and transmitting the invalidation address to the stack only when the invalidation address does not match. Judgment circuit (22) and stack counter (23) for counting to specify the stack
And a stack control circuit, wherein the stack, the address comparison circuit, and the stack counter are connected in parallel to an input address.
JP62233671A 1987-09-19 1987-09-19 Stack control circuit Expired - Lifetime JPH0664553B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62233671A JPH0664553B2 (en) 1987-09-19 1987-09-19 Stack control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62233671A JPH0664553B2 (en) 1987-09-19 1987-09-19 Stack control circuit

Publications (2)

Publication Number Publication Date
JPS6478341A JPS6478341A (en) 1989-03-23
JPH0664553B2 true JPH0664553B2 (en) 1994-08-22

Family

ID=16958707

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62233671A Expired - Lifetime JPH0664553B2 (en) 1987-09-19 1987-09-19 Stack control circuit

Country Status (1)

Country Link
JP (1) JPH0664553B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09146839A (en) * 1995-11-21 1997-06-06 Kofu Nippon Denki Kk Cache memory controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5680756A (en) * 1979-12-07 1981-07-02 Hitachi Ltd Information processing system

Also Published As

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

Similar Documents

Publication Publication Date Title
US4692893A (en) Buffer system using parity checking of address counter bit for detection of read/write failures
US7526709B2 (en) Error detection and correction in a CAM
US5230045A (en) Multiple address space system including address translator for receiving virtual addresses from bus and providing real addresses on the bus
US5123101A (en) Multiple address space mapping technique for shared memory wherein a processor operates a fault handling routine upon a translator miss
US6845024B1 (en) Result compare circuit and method for content addressable memory (CAM) device
US4604688A (en) Address translation buffer control system
JPS63195752A (en) Cache memory
US4943914A (en) Storage control system in which real address portion of TLB is on same chip as BAA
JPH07120312B2 (en) Buffer memory controller
JPH0621998B2 (en) Memory-management system
US5742790A (en) Detection circuit for identical and simultaneous access in a parallel processor system with a multi-way multi-port cache
US4035766A (en) Error-checking scheme
JPH0664553B2 (en) Stack control circuit
CN109901880B (en) Spinlock hardware circuit and electronic equipment
JPS59207098A (en) Information processor
JPS60701B2 (en) data processing equipment
JPH0250654B2 (en)
US7167942B1 (en) Dynamic random access memory controller
JPS62212751A (en) Data processor
JPH0756640B2 (en) Storage device
JPS61141054A (en) Information processor
JPH06149675A (en) Cache memory device
JPH02176839A (en) Information processor
JPS609296B2 (en) Buffer memory control method
JPH01321538A (en) Semiconductor device