JPH01312649A - Cache purge circuit - Google Patents

Cache purge circuit

Info

Publication number
JPH01312649A
JPH01312649A JP63143541A JP14354188A JPH01312649A JP H01312649 A JPH01312649 A JP H01312649A JP 63143541 A JP63143541 A JP 63143541A JP 14354188 A JP14354188 A JP 14354188A JP H01312649 A JPH01312649 A JP H01312649A
Authority
JP
Japan
Prior art keywords
purge
circuit
cache
ram
tag
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
JP63143541A
Other languages
Japanese (ja)
Inventor
Toshiyuki Kimura
敏幸 木村
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 JP63143541A priority Critical patent/JPH01312649A/en
Publication of JPH01312649A publication Critical patent/JPH01312649A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To speed up purge by always outputting a miss hit in the middle of purge and permitting a CPU to make an access to a main memory with assuming a cache to be disable. CONSTITUTION:The purge of a cache memory is usually executed when power is supplied or when a task is switched. The former is executed when the power of a system is turned on and the latter is executed before the execution of the new task when the content of the main memory 11 is updated for switching the task under the environment of a multi task by DMA. When a purge signal P is inputted to the title circuit, a system comes the middle of purge while a flip flop FF1 outputs a disable signal DE, and the circuit always outputs the 'miss hit' M in the middle of purge. The access from the CPU12 is unconditionally performed to the main memory 11 with assuming cache to be disable. Thus, the purge action can be speeded up.

Description

【発明の詳細な説明】 〔概 要〕 キャッシュメモリの内容をパージするキャッシュパージ
回路に関し、 ソフトウェアによらず比較的簡単な回路構成によりパー
ジ時間の短縮を図ることを目的とし、キャッシュメモリ
の内容をパージするキャッシュパージ回路であって、ア
ドレス、有効/無効ビットを格納するタグ用RAMと、
 パージ信号を受けると前記タグ用RAMの全エリアを
クリアするまでディスエイブル信号を出力するフリップ
フロップ回路と、パージ中は前記タグ用RAMのアドレ
スをクロック毎にカウントアンプするカウン夕と、パー
ジ中は前記タグ用RAMのアドレスをCPUのアドレス
から前記カウンタの出力に切り換えるマルチプレクサと
、前記CPUのアドレスと前記タグ用RAMから出力さ
れたアドレスを比較する比較回路と、パージ中、前記デ
ィスエイブル信号を受け前記タグ用RAMへ書き込み信
号を送出する制御回路とにより構成する。
[Detailed Description of the Invention] [Summary] Regarding a cache purge circuit that purges the contents of a cache memory, the purpose of this invention is to shorten the purge time with a relatively simple circuit configuration without using software. a cache purge circuit for purging, a tag RAM for storing addresses and valid/invalid bits;
a flip-flop circuit that outputs a disable signal until all areas of the tag RAM are cleared when receiving a purge signal; a counter that counts and amplifies the address of the tag RAM every clock during purge; a multiplexer that switches the address of the tag RAM from the CPU address to the output of the counter; a comparison circuit that compares the CPU address and the address output from the tag RAM; and a comparator circuit that receives the disable signal during purge. and a control circuit that sends a write signal to the tag RAM.

(産業上の利用分野〕 本発明はCPU用のキャッシュメモリの内容をパージす
るキャッシュパージ回路の構成に関する。
(Field of Industrial Application) The present invention relates to the configuration of a cache purge circuit that purges the contents of a cache memory for a CPU.

〔従来の技術及び発明が解決しようとする課題〕従来、
キャッシュメモリの内容をパージする代表的な方式とし
て、タグ用5−RAMを所定のソフトウェアにより全ア
ドレスについてクリアする方式と、クリア機能付のタグ
用RAMを用いる方式がある。
[Problems to be solved by conventional techniques and inventions] Conventionally,
Typical methods for purging the contents of the cache memory include a method in which the tag 5-RAM is cleared for all addresses using predetermined software, and a method in which a tag RAM with a clearing function is used.

前者はソフトウェアにより例えば“0”をキャッシュメ
モリに書き込むことによりパージするものである。この
場合、ハードが不要なためコストメリットはあるが、ソ
フトウェアが複雑となり、さらにパージに長時間を要す
る等の問題がある。
The former is purged by software, for example, by writing "0" into the cache memory. In this case, there is a cost advantage because no hardware is required, but there are problems such as the software becoming complicated and the purging process taking a long time.

後者はアドレスの比較回路、パージ機能等を有している
。そのためコストアップとなり、さらにこれら回路によ
り動作の高速化が図れない。また集積度が低く大容量化
が困難な問題もある。
The latter has an address comparison circuit, a purge function, etc. This increases costs, and furthermore, these circuits cannot increase the speed of operation. Another problem is that the degree of integration is low, making it difficult to increase capacity.

本発明の目的は、ソフトウェアによらず比較的M単な回
路構成によりパージ動作の高速化を図ることにある。
An object of the present invention is to speed up the purge operation by using a relatively simple circuit configuration without using software.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は、本発明の原理構成図である。本発明は、キャ
ッシュメモリの内容をパージするキャッシュバージ回路
であって、アドレス、有効/無効ビットを格納するタグ
用RAM (TAG)と、パージ信号(P)を受けると
前記タグ用RAMの全エリアをクリアするまでディスエ
イブル信号(DE)を出力するフリップフロップ回路(
FF)と、パージ中は前記タグ用RAMのアドレスをク
ロック毎にカウントアツプするカウンタ(CNT)と、
パージ中は前記タグ用RAMのアドレスをCPUのアド
レス(CPU −ADD)から前記カウンタの出力に切
り換えるマルチプレクサ(MPX)と、前記CPUのア
ドレスと前記タグ用RAMから出力されたアドレスを比
較する比較回路(CMP)と、パージ中、前記ディスエ
イブル信号を受け前記タグ用RAMへ書き込み信号(W
E)を送出する制御回路(CTL)とにより構成される
FIG. 1 is a diagram showing the basic configuration of the present invention. The present invention is a cache barge circuit that purges the contents of a cache memory, and includes a tag RAM (TAG) that stores addresses and valid/invalid bits, and an entire area of the tag RAM when a purge signal (P) is received. A flip-flop circuit that outputs a disable signal (DE) until the
FF), a counter (CNT) that counts up the address of the tag RAM every clock during purging;
A multiplexer (MPX) that switches the address of the tag RAM from the CPU address (CPU-ADD) to the output of the counter during purging, and a comparison circuit that compares the CPU address and the address output from the tag RAM. (CMP) and a write signal (W) to the tag RAM upon receiving the disable signal during purging.
E) and a control circuit (CTL) that sends out the signal.

〔作 用〕[For production]

キャッシュメモリのパージは通常、電源投入時あるいは
タスク切換時に実行される。前者はシステムの電源をオ
ンにする時に行い、後者は、マルチタスク環境下でタス
ク切換を行うためDMAにより主メモνの内容を更新し
た場合に新しいタスクの実行前に行う。本回路にパージ
信号Pが入力されると、フリップフロップFFがディス
エイブル信号DEを出力している間はパージ中となり、
そして、このパージ中は本回路は常に“ミスヒツト”M
を出力し、キャッシュはディスエイブルとみなしてCP
Uからのアクセスはすべて無条件に主メモリへ行われる
Cache memory purging is typically performed when power is turned on or when a task is switched. The former is performed when the system is powered on, and the latter is performed before executing a new task when the contents of the main memo ν are updated by DMA in order to switch tasks in a multitasking environment. When the purge signal P is input to this circuit, the purge is in progress while the flip-flop FF outputs the disable signal DE.
During this purge, this circuit always detects a “mishit” M.
is output, the cache is assumed to be disabled, and the CP
All accesses from U are made to main memory unconditionally.

〔実施例〕〔Example〕

第2図は、本発明の一実施例構成図である。図において
、lはフリップフロップ回路、2はカウンタ、3はマル
チプレクサ、4はタグ用5−RAM、5は比較回路、6
はタグ用制御回路、7はマルチプレクサ、8はキャッシ
ュ用5−RAM、9は主メモリ用制御回路、10は転送
ゲート、11は主メモリ (MS)、12はプロセッサ
(CP U)である。1〜7は本発明のキャッシュバー
ジ回路である。タグ用5−RAM4はアドレス、有効/
無効ビットを各エントリ毎に格納し、フリップフロップ
回路lはパージ信号Pを受けると5−RAM4の全エリ
アをクリアするまでディスエイブル信号DEを出力する
。この信号DBが“1”のときはキャッシュはディスエ
イブル状態である。カウンタ2はパージ中は5−RAM
4のアドレスをクロツタ毎にカウントアンプする。マル
チプレクサ3はパージ中は5−RAM4のアドレスをC
PUのアドレスCPU −ADDからカウンタ2の出力
に切り換え“る。比較回路5はCPU12のアドレスと
5−RAM4から出力されたアドレスを比較する。タグ
用制御回路6はパージ中、ディスエイブル信号DEを受
け5−RAM4へ四き込み信号WEを送出し“0”を書
き込む。キャッシュ用5−RAM8はデータの格納用で
あり、各エントリ毎にデータを格納する。MS用制御回
路9はパージ中はCPU12を主メモリ11に接続する
FIG. 2 is a configuration diagram of an embodiment of the present invention. In the figure, l is a flip-flop circuit, 2 is a counter, 3 is a multiplexer, 4 is a tag 5-RAM, 5 is a comparison circuit, and 6
1 is a tag control circuit, 7 is a multiplexer, 8 is a cache 5-RAM, 9 is a main memory control circuit, 10 is a transfer gate, 11 is a main memory (MS), and 12 is a processor (CPU). 1 to 7 are cash barge circuits of the present invention. 5-RAM4 for tag is address, valid/
An invalid bit is stored for each entry, and upon receiving the purge signal P, the flip-flop circuit 1 outputs a disable signal DE until the entire area of the 5-RAM 4 is cleared. When this signal DB is "1", the cache is in a disabled state. Counter 2 is 5-RAM during purge
4 address is counted and amplified for each block. Multiplexer 3 changes the address of 5-RAM4 to C during purge.
Switches from the PU address CPU-ADD to the output of the counter 2.The comparison circuit 5 compares the address of the CPU 12 and the address output from the 5-RAM 4.The tag control circuit 6 outputs the disable signal DE during purge. Sends the write signal WE to the receiving 5-RAM 4 and writes "0".The cache 5-RAM 8 is for storing data, and stores data for each entry.The MS control circuit 9 Connect the CPU 12 to the main memory 11.

転送ゲー1−10は制御回路9からの制御信号TRによ
りデータとアドレスの転送方向を制御する。
The transfer game 1-10 controls the direction of data and address transfer using a control signal TR from the control circuit 9.

本実施例では、タグ用もキャッシュ用も同じ単機能の高
速5−RAMを使用して実現している。
In this embodiment, the same single-function high-speed 5-RAM is used for tags and caches.

また、13はドライバであって比較回路5から“ヒツト
”信号Hがきたらオンしてキャッシュ用5−RAM7の
データをCPU12へ読み出す。
Further, 13 is a driver which is turned on when a "hit" signal H is received from the comparator circuit 5, and reads out data in the cache RAM 7 to the CPU 12.

尚、ADDはアドレス線、DATAはデータ線、RAS
、CASはストローブ信号である。マルチプレクサ7は
パージ中の“O″出力CPUアドレスとをディスエイブ
ル信号DEにより切り換える。即ち、ドライバ14はO
Rゲート15の出力により“パージ”か“ミスヒツト”
かの更新を行うもので、ORゲート15の入力にはディ
スエイブル信号DEと制御信号TRが入力され、その出
力でドライバ14を駆動する。尚、WDはライトデータ
、RDはリードデータである。
In addition, ADD is an address line, DATA is a data line, and RAS
, CAS are strobe signals. The multiplexer 7 switches between the "O" output CPU address during purging and the disable signal DE. That is, the driver 14
“Purge” or “mishit” depending on the output of R gate 15
The disable signal DE and the control signal TR are input to the input of the OR gate 15, and the driver 14 is driven by the output thereof. Note that WD is write data and RD is read data.

第3図は第2図回路の信号タイミングチャートである。FIG. 3 is a signal timing chart of the circuit of FIG. 2.

まず、パージ信号Pがフリップフロップ1に入力される
と、信号DEは“1”となりこの信号DEはカウンタ2
に入力されカウンタ2は5−RAM4のアドレスをクロ
ックCLKごとにカウントアツプする。パージ中は書き
込み信号WEが制御回路6から5−RAM4に送出され
、ディスエイブル信号DEにより図示しないレジスタ等
の内容の“0”が書き込まれ各エントリがパージされる
。CPUのアドレス(CPU−ADD)はこの間、制御
回路9を経て主メモリ11をアクセスし、主メモリ11
のデータ(MS −DATA)が転送ゲー)10を経て
CPUI 2へ転送される。
First, when the purge signal P is input to the flip-flop 1, the signal DE becomes "1" and this signal DE is input to the counter 2.
The counter 2 counts up the address of the 5-RAM 4 every clock CLK. During purging, a write signal WE is sent from the control circuit 6 to the 5-RAM 4, and a disable signal DE writes "0" in the contents of a register, etc. (not shown), and each entry is purged. During this time, the CPU address (CPU-ADD) accesses the main memory 11 via the control circuit 9, and
The data (MS-DATA) is transferred to the CPU 2 via the transfer game 10.

タグ用5−RAM4は“ヒント”されていないのでこの
間信号はなく、またキャッシュ用5−RAM8もアクセ
スされていないのでそのデータ(CHE −DATA)
も出力されない。
5-RAM4 for tag is not "hinted", so there is no signal during this time, and 5-RAM8 for cache is not accessed, so its data (CHE-DATA)
is not output either.

第4図はパージの実行を説明する図である。タスク1に
おいてキャッシュと主メモリMSが専有されているとき
、タスク2に切り換える場合、まず、O3(オペレーテ
ィングシステム)にもとすきDMAによりMSをタスク
2に更新し、次にタスクの切り換えを行った後、キャッ
シュ内のタスク1をパージする。これによりキャッシュ
の中はクリアされ、タスク1は外部記憶装置に移される
FIG. 4 is a diagram illustrating the execution of purge. When the cache and main memory MS are occupied by task 1, when switching to task 2, first update the MS to task 2 using O3 (operating system) DMA, and then switch the task. After that, purge task 1 in the cache. As a result, the cache is cleared and task 1 is moved to the external storage device.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明によれば、単機能の高速5
−RAMを用いて比較的簡単な回路構成によりパージの
高速化が図れ、かつ特殊な機能の5−RAMを用いない
ためコストダウンを図ることもでき、大容量化も可能で
ある。
As explained above, according to the present invention, a single-function high-speed 5
- It is possible to achieve high-speed purging with a relatively simple circuit configuration using -RAM, and it is also possible to reduce costs because it does not use 5-RAM with special functions, and it is also possible to increase capacity.

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

第1図は本発明の原理構成図、 第2図は本発明の一実施例構成図、 第3図は本発明の信号タイミングチャート、第4図はパ
ージの実行を説明する図である。 (符号の説明) 1:フリップフロップ回路、2:カウンタ、3.7:マ
ルチプレクサ、 4:タグ用5−RAM、  5:比較回路、6:タグ用
制御回路、 8:キャッシュ用5−RAM。 9:MS制御回路、     10:転送ゲート、11
:主メモリ、      12:CPU。 13.14:ドライバ、   15:ORゲート。 本発明の原理溝成図 ・ぐ−ノ実行 ・ぞ−ノの実行を説明する図
FIG. 1 is a diagram showing the principle of the present invention, FIG. 2 is a diagram showing the configuration of an embodiment of the present invention, FIG. 3 is a signal timing chart of the present invention, and FIG. 4 is a diagram explaining the execution of purge. (Explanation of symbols) 1: Flip-flop circuit, 2: Counter, 3.7: Multiplexer, 4: 5-RAM for tag, 5: Comparison circuit, 6: Control circuit for tag, 8: 5-RAM for cache. 9: MS control circuit, 10: Transfer gate, 11
: Main memory, 12: CPU. 13.14: Driver, 15: OR gate. A diagram explaining the principles of the present invention: groove formation, execution, and execution of the groove.

Claims (1)

【特許請求の範囲】 1、キャッシュメモリの内容をパージするキャッシュパ
ージ回路であって、 アドレス、有効/無効ビットを格納するタグ用RAM(
TAG)と、 パージ信号(P)を受けると前記タグ用RAMの全エリ
アをクリアするまでディスエイブル信号(DE)を出力
するフリップフロップ回路(FF)と、 パージ中は前記タグ用RAMのアドレスをクロック毎に
カウントアップするカウンタ(CNT)と、 パージ中は前記タグ用RAMのアドレスをCPUのアド
レス(CPU・ADD)から前記カウンタの出力に切り
換えるマルチプレクサ(MPX)と、 前記CPUのアドレスと前記タグ用RAMから出力され
たアドレスを比較する比較回路(CMP)と、 パージ中、前記ディスエイブル信号を受け前記タグ用R
AMへ書き込み信号(WE)を送出するタグ用制御回路
(CTL)と、 を具備することを特徴とするキャッシュパージ回路。
[Claims] 1. A cache purge circuit that purges the contents of a cache memory, which includes a tag RAM (RAM) that stores addresses and valid/invalid bits.
TAG), a flip-flop circuit (FF) that outputs a disable signal (DE) when receiving the purge signal (P) until the entire area of the tag RAM is cleared, and a flip-flop circuit (FF) that outputs a disable signal (DE) until the entire area of the tag RAM is cleared; a counter (CNT) that counts up every clock; a multiplexer (MPX) that switches the address of the tag RAM from the CPU address (CPU・ADD) to the output of the counter during purge; a comparator circuit (CMP) that compares the addresses output from the tag RAM; and a comparator circuit (CMP) that compares the addresses output from the tag RAM;
A cache purge circuit comprising: a tag control circuit (CTL) that sends a write signal (WE) to an AM;
JP63143541A 1988-06-13 1988-06-13 Cache purge circuit Pending JPH01312649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63143541A JPH01312649A (en) 1988-06-13 1988-06-13 Cache purge circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63143541A JPH01312649A (en) 1988-06-13 1988-06-13 Cache purge circuit

Publications (1)

Publication Number Publication Date
JPH01312649A true JPH01312649A (en) 1989-12-18

Family

ID=15341150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63143541A Pending JPH01312649A (en) 1988-06-13 1988-06-13 Cache purge circuit

Country Status (1)

Country Link
JP (1) JPH01312649A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108482A (en) * 1991-10-11 1993-04-30 Nec Corp Cache invalidating system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05108482A (en) * 1991-10-11 1993-04-30 Nec Corp Cache invalidating system

Similar Documents

Publication Publication Date Title
US5526508A (en) Cache line replacing system for simultaneously storing data into read and write buffers having multiplexer which controls by counter value for bypassing read buffer
US5535350A (en) Cache memory unit including a replacement address register and address update circuitry for reduced cache overhead
US5253358A (en) Cache memory expansion and transparent interconnection
JP2523814B2 (en) Moveout system
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
JPH01312649A (en) Cache purge circuit
JP3614428B2 (en) Cache memory device
KR100251784B1 (en) Method and apparatus for providing a readable and writable cache tag memory
JPH05282208A (en) Cache memory control system
JPH02213960A (en) Cache memory
EP0398191A2 (en) Quadruple word, multiplexed, paged mode and cache memory
JP2645477B2 (en) Microprocessor and its cache memory
JP3729832B2 (en) Cache memory device
JP2689920B2 (en) Prefetch buffer device used in arithmetic processing system
JP2972451B2 (en) Cache memory control method by hardware control software
JP3761890B2 (en) Cache memory device
JPH0232436A (en) Buffer memory
JPH07152650A (en) Cache control unit
JP2000285019A (en) Cache control circuit
JPH09251424A (en) Cache device
JP3074897B2 (en) Memory circuit
JPH02236651A (en) Memory buffer
JP3147456B2 (en) Cache memory system
JP2557857B2 (en) Cache storage
JP2004240520A (en) In-non cache area high speed memory access method