JPH02230346A - Cache memory system - Google Patents

Cache memory system

Info

Publication number
JPH02230346A
JPH02230346A JP1050624A JP5062489A JPH02230346A JP H02230346 A JPH02230346 A JP H02230346A JP 1050624 A JP1050624 A JP 1050624A JP 5062489 A JP5062489 A JP 5062489A JP H02230346 A JPH02230346 A JP H02230346A
Authority
JP
Japan
Prior art keywords
memory
bank
address
storage means
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
JP1050624A
Other languages
Japanese (ja)
Inventor
Toshikatsu Mori
俊勝 森
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP1050624A priority Critical patent/JPH02230346A/en
Publication of JPH02230346A publication Critical patent/JPH02230346A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To clear all the entries of a cache memory by installing two storage means for storing invalid information of data stored in the cache memory and clearing the content of the other storage means when one storage means is used for a normal access. CONSTITUTION:A valid bit memory part 1 is duplicated by memory banks 11 and 12. A bank selection signal 111 from a control circuit 14 decides which bank is used in which way. The memory bank 11 is used as the normal access. An output signal 116 is selected in a multiplexer 19 and is transmitted to a gate 6 as an output signal 106 from the valid bit memory part 1. When one memory bank 11 is used for the normal access, the content of the other memory bank 12 is cleared. Thus, all the entires of the cache memory can be cleared without deteriorating the performance of the system.

Description

【発明の詳細な説明】 反丘立二 本発明はキャッシュメモリシステムに関し、特にキャッ
シュメモリ内エントリの無効化方式に間する. 良米韮逝 プロセッサと主メモリとの間に小容凰の高速なバックァ
メモリを設置することにより、実効的な主メモリのアク
セス時間を高速化し得ることは一般によく知られている
.この方法に関しては、「コンピューティングサーベイ
( Couut ingSurveV)』(14巻3号
, 1982年, PP.473 〜530 )に詳述
されている. 通常、この方法はキャッシュメモリと呼ばれ、計算機シ
ステムに広く使用されている.また、この方法は計算機
システム上で実行されるプログラムのメモリアクセスに
局所性があるという性質を利用したものであり、プロセ
ッサから主メモリへのアクセスに際して、アクセスが行
われたワードを含む一定サイズの連続した記憶位置、い
わゆるブロックの内蓉を主メモリからキャッシュメモリ
に取込むことによって、メモリアクセスの大部分が高速
なキャッシュメモリへのアクセスですむので、低速な主
メモリへのアクセスを削減することができる. キャッシュメモリはデータメモリと、データメモリの主
メモリ上の位置を示すアドレスタグメモリと、アドレス
タグの有意性を示すバリッドビットメモリとから梢成さ
れるのが一般的であり、それらのメモリにはRAM (
ランダムアクセスメモリ)が用いられている. 一方、仮想記憶方式を用いる計X機システムでは仮想空
間の切換え後に同じ仮想アドレスが用いられる場合があ
り、この場合には仮想アドレスが同じであっても、キャ
ッシュメモリのデータメモリの内容が興なってくるので
、キャッシュメモリ内のバリッドピットをクリアする必
要が出てくる.したがって、このようなときにはキャッ
シュメモリの全てのエントリのバリッドビットがクリア
されるまで、プロセッサからのアクセスを保留するか、
あるいはキャッシュメモリをバイパスさせて主メモリに
直接アクセスする方法がとられている. このような従来のキャッシュメモリシステムでは、仮想
記憶方式を用いる計算機システムにおける仮想空間の切
換えなどによりキャッシュメモリの全エントリのバリッ
ドビットをクリアする場合に、バリッドビットメモリの
全アドレスに対してライトサイクルを実行するようにな
っているため、この間プロセッサからのアクセスを保留
するか、あるいはキャッシュメモリをバイパスさせて主
メモリに直接アクセスしなければならず、システムの性
能低下を招くという欠点がある. 九肌塁旦工 本発明は上記のような従来のものの欠点を除去すべくな
されたもので、システムの性能低下を招くことなく、キ
ャッシュメモリの全エントリをクリアすることができる
キャッシュメモリシステムの提供を目的とする. 凡肌塁璽蔦 本発明によるキャッシュメモリシステムは、キャッシュ
メモリに格納されたデータの有効無効を示す無効化情報
を格納する第1および第2の格納手段と、前記第1の格
納手段の前記無効化情報によりキャッシュアクセスが行
われているとき、前記キャッシュメモリの全エントリに
対する無効化指示信号に応答して前記第1の格納手段の
無効化情報によるキャッシュアクセスを前記第2の格納
手段の無効化情報によるキャッシュアクセスに切換える
切換え手段と、前記無効化指示信号に応答して前記第1
の格納手段の内容をクリアするクリア手段とを有するこ
とを特徴とする. K監遇 次に、本発明の一実施例について図面を参照して説明す
る. 第1図は本発明の一実施例の構成を示すブロック図であ
る.図において、通常動作を行う場合には、図示せぬプ
ロセッサからのアクセスが発生すると、そのアクセスア
ドレスがアドレスレジスタ2に格納され、該アクセスア
ドレスの下位アドレス信号101がバリッドビットメモ
リ部1と、アドレスタグメモリ部3と、データメモリ部
4とに伝えられる. アドレスタグメモリ部3にはメモリアドレスの上位部が
格納されており、下位アドレス信号101によってアド
レスタグメモリ部3から読出されたメモリアドレスの上
位アドレス信号103と、アドレスレジスタ2に格納さ
れたアクセスアドレスの上位アドレス信号102とが比
■器うで比較され、それらアドレスが一致しているか否
かの判定が行われる. それらアドレスが一致している場合には、比較器5から
の出力信号105が“1”となる.一方、バリッドピッ
トメモリ部1からの出力信号106はアドレスタグメモ
リ部3の内容が正しいか否かを示しているので、この出
力信号106と比較器5からの出力信号105との論理
積演算がゲート6で行われ、その演算結果がヒット信号
107として出力される. すなわち、ヒット信号107はアドレスタグメモリ部3
の内容が確定した値であり、かつその内容が現在アクセ
スされているメモリアドレスの上位側と一致したときの
み“1”となり、データメモリ部4からの出力データ1
04が有効であることを示している. プロセッサはゲート6からのヒット信号107によりデ
ータメモリ部4からの出力データ104の有意性を判断
し、もし出力データ104が無効であった場合には、図
示せぬ主メモリを直接アクセスする. 次に、本発明の一実施例によるバリツドピットメモリ部
1の動作について説明する. バリッドピットメモリ部1はメモリバンク11.12に
より二重化されており、制御回路14からのバンク選択
信号111によりどちらのバンクがどのように使用され
るのかが決定される.バンク選択信号111が“0′′
のときには、マルチプレクサ(MPX)15からメモリ
バンク11へのアドレス入力信号118として下位アド
レス信号101が供給される. すなわち、メモリバンク11は通常アクセス用として使
用され、その出力信号116がマルチプレクサ19で選
択されてバリッドビットメモリ部1からの出力信号10
6としてゲート6に送出される.また、データメモリ部
4に主メモリからのデータが書込まれた場合には、その
ときのアクセスアドレスの上位アドレスがアドレスタグ
メモリ部3に書込まれるとともに、メモリバンク11に
は制御回1114からの書込み制御信号113がマルチ
プレクサ17からの書込み信号114として供給され、
データメモリ部4に書込まれたデータの有意性を示す情
報が書込まれる.このとき、メモリバンク11への書込
みデータとしてインバータ20から“1′が供給される
. 一方、マルチプレクサ16からメモリバンク12へのア
ドレス入力信号119としてはカウンタ13からのアド
レス情報110が供給される.すなわち、メモリバンク
12にはカウンタ13で発生されたメモリバンク12の
全領域に対するクリアアドレスが供給される. このとき、メモリバンク12には制御回路14から出力
される書込み制御信号112がマルチプレクサ18から
の書込み信号115として供給されるとともに、書込み
データとして“0”が供給される。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a cache memory system, and particularly to a method for invalidating entries in a cache memory. It is generally well known that the effective main memory access time can be sped up by installing a small, high-speed backup memory between the processor and the main memory. This method is detailed in "Computing Survey" (Vol. 14, No. 3, 1982, pp. 473-530). This method is usually called cache memory, and is used in computer systems. This method is widely used. Also, this method takes advantage of the property that memory access of programs executed on a computer system has locality, and when accessing main memory from the processor, By importing contiguous storage locations of a fixed size containing words, so-called blocks, from main memory to cache memory, the majority of memory accesses can be accessed to high-speed cache memory, so it can be transferred to slower main memory. Generally, the cache memory consists of a data memory, an address tag memory that indicates the location of the data memory in main memory, and a valid bit memory that indicates the significance of the address tag. , and their memory includes RAM (
Random access memory) is used. On the other hand, in X-machine systems that use the virtual memory method, the same virtual address may be used after switching the virtual space, and in this case, even if the virtual address is the same, the contents of the data memory in the cache memory may be changed. Therefore, it becomes necessary to clear the valid pits in the cache memory. Therefore, in such cases, access from the processor should be suspended until the valid bits of all entries in the cache memory are cleared, or
Alternatively, methods are used to bypass the cache memory and directly access main memory. In such conventional cache memory systems, when clearing the valid bits of all entries in the cache memory due to virtual space switching in a computer system using virtual memory, a write cycle is performed on all addresses in the valid bit memory. During this time, access from the processor must be suspended or the cache memory must be bypassed to directly access the main memory, which has the disadvantage of reducing system performance. SUMMARY OF THE INVENTION The present invention has been made to eliminate the drawbacks of the conventional systems as described above, and aims to provide a cache memory system that can clear all cache memory entries without deteriorating system performance. Purpose. A cache memory system according to the present invention includes first and second storage means for storing invalidation information indicating the validity or invalidity of data stored in the cache memory, and the invalidation information of the first storage means. When the cache access is being performed based on the invalidation information, the cache access based on the invalidation information of the first storage means is invalidated by the second storage means in response to an invalidation instruction signal for all entries of the cache memory. a switching means for switching to information-based cache access; and a switching means for switching to information-based cache access;
and clearing means for clearing the contents of the storage means. Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In the figure, when performing normal operation, when an access from a processor (not shown) occurs, the access address is stored in the address register 2, and the lower address signal 101 of the access address is sent to the valid bit memory section 1 and the address The information is transmitted to the tag memory section 3 and the data memory section 4. The upper part of the memory address is stored in the address tag memory section 3, and the upper address signal 103 of the memory address read from the address tag memory section 3 by the lower address signal 101 and the access address stored in the address register 2 The upper address signal 102 of the address is compared with the higher order address signal 102 by a comparator, and it is determined whether or not these addresses match. If these addresses match, the output signal 105 from the comparator 5 becomes "1". On the other hand, since the output signal 106 from the valid pit memory section 1 indicates whether the contents of the address tag memory section 3 are correct or not, the AND operation of this output signal 106 and the output signal 105 from the comparator 5 is performed. This is performed at the gate 6, and the result of the calculation is output as a hit signal 107. That is, the hit signal 107 is transmitted to the address tag memory section 3.
becomes “1” only when the content is a fixed value and matches the upper side of the currently accessed memory address, and output data 1 from the data memory unit 4.
04 is valid. The processor determines the significance of the output data 104 from the data memory unit 4 based on the hit signal 107 from the gate 6, and if the output data 104 is invalid, it directly accesses the main memory (not shown). Next, the operation of the variable pit memory section 1 according to an embodiment of the present invention will be explained. The valid pit memory section 1 is duplicated by memory banks 11 and 12, and which bank is used and how is determined by a bank selection signal 111 from the control circuit 14. Bank selection signal 111 is “0''
At this time, the lower address signal 101 is supplied from the multiplexer (MPX) 15 to the memory bank 11 as the address input signal 118. That is, the memory bank 11 is used for normal access, and its output signal 116 is selected by the multiplexer 19 to be used as the output signal 10 from the valid bit memory section 1.
It is sent to gate 6 as 6. Further, when data from the main memory is written to the data memory section 4, the upper address of the access address at that time is written to the address tag memory section 3, and the data from the control circuit 1114 is written to the memory bank 11. A write control signal 113 of is provided as a write signal 114 from multiplexer 17;
Information indicating the significance of the data written to the data memory section 4 is written. At this time, "1" is supplied from the inverter 20 as write data to the memory bank 11. On the other hand, address information 110 from the counter 13 is supplied as the address input signal 119 from the multiplexer 16 to the memory bank 12. That is, the memory bank 12 is supplied with a clear address for the entire area of the memory bank 12 generated by the counter 13. At this time, the memory bank 12 receives the write control signal 112 output from the control circuit 14 from the multiplexer 18. is supplied as the write signal 115, and "0" is supplied as the write data.

よって、メモリバンク12ではカウンタ13からのアド
レス情報110と制御回路14からの書込み制御信号1
12とによって、その内容が順次“0”にクリアされて
いく. 上述のように処理が行われているとき、メモリバンク1
1のエントリを無効化するための無効化要求信号121
がプロセッサから制御回路14に送られてくると、制御
回路14からのバンク選択信号111が反転して“1″
となり、メモリバンク11.12の役割が交換され、メ
モリバンク12が通常アクセス用に使用されるとともに
、メモリバンク11の内容がクリアされることになる.
すなわち、マルチブレクサ16からメモリバンク12へ
のアドレス入力信号119として下位アドレス信号10
1が供給され、メモリバンク12からの出力信号117
がマルチプレクサ19で選択されてバリッドビットメモ
リ部1からの出力信号106としてゲート6に送出され
る. 一方、マルチブレクサ15からメモリバンク11へのア
ドレス入力信号118としてはカウンタ13からのアド
レス情報110が供給され、制御回路14からの書込み
制御信号112がマルチプレクサ17からの書込み信号
114として供給されるとともに、書込みデータとして
インバータ20を介して“0”が供給され、メモリバン
ク11の内容が順次゛″0″にクリアされていく. メモリバンク11.12の内容がクリアされている期間
中、制御回1!fil4はプロセッサに対してとジー信
号120を出力しているので、この期間中にプロセッサ
がメモリバンク11.12のエントリを無効化しようと
したときには、制御回路14からのビジー信号120が
オフになるまでプロセッサからの無効化要求信号121
は保留される.このように、バリッドピットメモリ部1
をメモリバンク11.12で二重化し、一方のメモリバ
ンク11を通常アクセス用に使用しているときには、他
方のメモリバンク12の内容をクリアするようにするこ
とによって、仮想記憶方式を用いる計算機システムにお
ける仮想空間の切換えなどによりキャッシュメモリの全
エントリのバリッドピットをクリアする場合に、システ
ムの性能低下を招くことなく、キャッシュメモリの全エ
ントリの無効化を実行することができる. 九肌立夏1 以上説明したように本発明によれば、キャッシュメモリ
に格納されたデータの有効無効を示す無効化情報を格納
するなめに第1および第2の格納手段を設け、第1の格
納手段を通常アクセス用に使用しているときには、第2
の格納手段の内容をクリアするようにすることによって
、システムの性能低下を招くことなく、キャッシュメモ
リの全エントリをクリアすることができるという効果が
ある.
Therefore, in the memory bank 12, the address information 110 from the counter 13 and the write control signal 1 from the control circuit 14
12, the contents are sequentially cleared to "0". When processing is performed as described above, memory bank 1
Invalidation request signal 121 for invalidating entry 1
is sent from the processor to the control circuit 14, the bank selection signal 111 from the control circuit 14 is inverted and becomes "1".
Thus, the roles of memory banks 11 and 12 are exchanged, and memory bank 12 is used for normal access, and the contents of memory bank 11 are cleared.
That is, the lower address signal 10 is used as the address input signal 119 from the multiplexer 16 to the memory bank 12.
1 is supplied and the output signal 117 from memory bank 12
is selected by the multiplexer 19 and sent to the gate 6 as the output signal 106 from the valid bit memory section 1. On the other hand, the address information 110 from the counter 13 is supplied as the address input signal 118 from the multiplexer 15 to the memory bank 11, and the write control signal 112 from the control circuit 14 is supplied as the write signal 114 from the multiplexer 17. "0" is supplied as write data via the inverter 20, and the contents of the memory bank 11 are sequentially cleared to "0". During the period when the contents of memory banks 11 and 12 are cleared, control times 1! Since fil4 outputs the busy signal 120 to the processor, when the processor tries to invalidate the entry in memory bank 11.12 during this period, the busy signal 120 from the control circuit 14 is turned off. Invalidation request signal 121 from processor until
will be put on hold. In this way, valid pit memory section 1
By duplicating the memory bank 11 and 12 with memory banks 11 and 12, and clearing the contents of the other memory bank 12 when one memory bank 11 is used for normal access, the When clearing the valid pits of all cache memory entries due to virtual space switching, etc., all entries in the cache memory can be invalidated without degrading system performance. Ritsuka Kuhada 1 As explained above, according to the present invention, the first and second storage means are provided to store invalidation information indicating the validity or invalidity of data stored in the cache memory, and the first storage means When the means is used for normal access, the second
By clearing the contents of the storage means, it is possible to clear all entries in the cache memory without degrading system performance.

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

第1図は本発明の一実施例の構成を示すブロック図であ
る. 主要部分の符号の説明 1・・・・・・バリッドピットメモリ部1 1, 1 1 5〜1 3・・・・・・アドレスタグメモリ部 4・・・・・・データメモリ部 2・・・・・・メモリバンク 3・・・・・・カウンタ 4・・・・・・制御回路 9・・・・・・マルチブレクサ 0・・・・・・インバータ
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. Explanation of symbols of main parts 1... Valid pit memory section 1 1, 1 1 5-1 3... Address tag memory section 4... Data memory section 2... ...Memory bank 3...Counter 4...Control circuit 9...Multiplexer 0...Inverter

Claims (1)

【特許請求の範囲】[Claims] (1)キャッシュメモリに格納されたデータの有効無効
を示す無効化情報を格納する第1および第2の格納手段
と、前記第1の格納手段の前記無効化情報によりキャッ
シュアクセスが行われているとき、前記キャッシュメモ
リの全エントリに対する無効化指示信号に応答して前記
第1の格納手段の無効化情報によるキャッシュアクセス
を前記第2の格納手段の無効化情報によるキャッシュア
クセスに切換える切換え手段と、前記無効化指示信号に
応答して前記第1の格納手段の内容をクリアするクリア
手段とを有することを特徴とするキャッシュメモリシス
テム。
(1) Cache access is performed using first and second storage means that store invalidation information indicating the validity or invalidity of data stored in the cache memory, and the invalidation information of the first storage means. switching means for switching the cache access based on the invalidation information of the first storage means to the cache access based on the invalidation information of the second storage means in response to an invalidation instruction signal for all entries of the cache memory; and clearing means for clearing the contents of the first storage means in response to the invalidation instruction signal.
JP1050624A 1989-03-02 1989-03-02 Cache memory system Pending JPH02230346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1050624A JPH02230346A (en) 1989-03-02 1989-03-02 Cache memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1050624A JPH02230346A (en) 1989-03-02 1989-03-02 Cache memory system

Publications (1)

Publication Number Publication Date
JPH02230346A true JPH02230346A (en) 1990-09-12

Family

ID=12864136

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1050624A Pending JPH02230346A (en) 1989-03-02 1989-03-02 Cache memory system

Country Status (1)

Country Link
JP (1) JPH02230346A (en)

Similar Documents

Publication Publication Date Title
JP3587591B2 (en) Method of controlling cache miss and computer system thereof
US6772316B2 (en) Method and apparatus for updating and invalidating store data
US6205521B1 (en) Inclusion map for accelerated cache flush
JPH0668735B2 (en) Cache memory
JP3718302B2 (en) Instruction fetch method and apparatus
TW343303B (en) Cache flushing device and computer system applied with the same
US7620779B1 (en) System and method for handling direct memory accesses
JP2818415B2 (en) Buffer storage device
US5619673A (en) Virtual access cache protection bits handling method and apparatus
EP0173909A2 (en) Look-aside buffer least recently used marker controller
KR910005160A (en) Multiprocessor cache system with three states by generating invalidation signal during write access
GB2307319A (en) Dual-directory virtual cache
CA1299767C (en) Cache memory control system
JP3733604B2 (en) Cache memory
JPH02230346A (en) Cache memory system
US6401173B1 (en) Method and apparatus for optimizing bcache tag performance by inferring bcache tag state from internal processor state
JPS644214B2 (en)
JPH05342101A (en) Hierarchical cache memory
JP2703255B2 (en) Cache memory writing device
JPH06250926A (en) Data processing system provided with cache memory of plural hierarchies
JPH08305634A (en) Information processing method and device therefor
JP2963257B2 (en) Processing equipment
CA1313422C (en) Cache memory control system
JPS5818710B2 (en) memory system
JPH0421044A (en) One-chip cache memory