JP2952884B2 - Cache controller - Google Patents

Cache controller

Info

Publication number
JP2952884B2
JP2952884B2 JP1097944A JP9794489A JP2952884B2 JP 2952884 B2 JP2952884 B2 JP 2952884B2 JP 1097944 A JP1097944 A JP 1097944A JP 9794489 A JP9794489 A JP 9794489A JP 2952884 B2 JP2952884 B2 JP 2952884B2
Authority
JP
Japan
Prior art keywords
memory
address
signal
valid bit
cpu
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
JP1097944A
Other languages
Japanese (ja)
Other versions
JPH02275550A (en
Inventor
康陽 田中
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
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP1097944A priority Critical patent/JP2952884B2/en
Publication of JPH02275550A publication Critical patent/JPH02275550A/en
Application granted granted Critical
Publication of JP2952884B2 publication Critical patent/JP2952884B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はキャッシュコントローラに関し、特にデュア
ルポート・メモリセルからなるアドレスタグ用メモリを
含んだキャッシュコントローラに関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache controller, and more particularly, to a cache controller including an address tag memory composed of dual-port memory cells.

〔従来の技術〕[Conventional technology]

従来、デュアルポート・メモリセルを使用したアドレ
スタグ用メモリを含んだキャッシュ・コントローラは、
第3図のブロック図にようになっていた。アドレスタグ
用メモリ1とバリッド・ビット・メモリ10はデュアルポ
ート・メモリセルを使用したものである。したがって、
メモリ1とメモリ10とはCPUからのセットアドレス20と
メインメモリからのセットアドレス30との同時読み出し
アクセスを受付けて動作することができる。セットアド
レス20のアクセスに対しメモリ1からアドレスタグ22が
読み出され、CPUからのタダアドレス21とが比較器2で
比較されて、一致信号23を出力する。同時にセットアド
レス20でアクセスされたメモリ10からはバリッドビット
信号35を出力し、AND(アンド)ゲート4で一致信号23
とのANDをとり、ヒット信号25を出力する。同様に、メ
モリ1とメモリ10とはメインメモリからのセットアドレ
ス30のアクセスに対し、メモリ1からはアドレスタグ32
が読み出され、メインメモリからのタグアドレス31と比
較器3で比較されて、一致信号34を出力する。同時に、
アドレス30でアクセスされたメモリ10からはバリッドビ
ット信号36を出力し、ANDゲート12で一致信号34とのAND
をとり、ライトアクセス要求信号37を出力する。この信
号37はヒット信号を意味する。
Conventionally, a cache controller including a memory for an address tag using a dual-port memory cell is:
This was as shown in the block diagram of FIG. The address tag memory 1 and the valid bit memory 10 use dual port memory cells. Therefore,
The memories 1 and 10 can operate by receiving simultaneous read accesses of the set address 20 from the CPU and the set address 30 from the main memory. The address tag 22 is read from the memory 1 in response to the access of the set address 20, and the free address 21 from the CPU is compared by the comparator 2 to output a coincidence signal 23. At the same time, a valid bit signal 35 is output from the memory 10 accessed by the set address 20, and the match signal 23 is output by the AND gate 4.
And outputs a hit signal 25. Similarly, the memory 1 and the memory 10 access the set address 30 from the main memory, while the memory 1 sends the address tag 32
Is read out, compared with the tag address 31 from the main memory by the comparator 3, and outputs a coincidence signal. at the same time,
The memory 10 accessed at the address 30 outputs a valid bit signal 36, and the AND gate 12 performs an AND operation with the coincidence signal 34.
And outputs a write access request signal 37. This signal 37 means a hit signal.

このとき、ライトアクセス要求信号37がヒット状態値
になれば、メモリ10内のアドレス30で指定されるバリッ
ド・ビットをOFFにして、アドレス30で指定されるメモ
リ1内のアドレスタグを無効化する為に、アービタ(調
停器)11を起動させる。メモリ1とメモリ10とは同一ア
ドレスに対してCPUからのリードもしくはライトアクセ
スとメインメモリからのライトアクセスは同時に動作が
できないので、アービタ11はメインメモリからのライト
アクセス要求信号37と、CPUからのアクセス要求信号38
とを調停し、いずれか早く要求のあった方を受付けてメ
モリ1とメモリ10へ調停信号39を出力する。
At this time, if the write access request signal 37 becomes a hit state value, the valid bit specified by the address 30 in the memory 10 is turned off, and the address tag in the memory 1 specified by the address 30 is invalidated. For this purpose, the arbiter (arbiter) 11 is activated. Since the memory 1 and the memory 10 cannot simultaneously perform read or write access from the CPU and write access from the main memory for the same address, the arbiter 11 sends the write access request signal 37 from the main memory and the CPU Access request signal 38
And an arbitration signal 39 is output to the memory 1 and the memory 10 in response to the earlier request.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

上述した従来のキャッシュ・コントローラは、メイン
メモリの書替え監視の結果によってバリッドビットを無
効化する場合、バリッドビットへのライト要求を出して
CPUからのアクセス要求との調停が必要であるので、CPU
の動作を一時的にウエイト(待ち)をかけてしまう可能
性があり、それによってCPU性能をダウンさせてしまう
という欠点がある。
The above-described conventional cache controller issues a write request to the valid bit when invalidating the valid bit according to the result of the rewrite monitoring of the main memory.
Since arbitration with the access request from the CPU is necessary, the CPU
Has the disadvantage that it may temporarily wait (wait) for its operation, thereby reducing CPU performance.

本発明の目的は、メインメモリの書替え監視の結果、
アドレスタグの有効性の有無をCPUからのアクセスとは
無関係に記憶するバリッド・ビット・レジスタを備える
ことによって、メインメモリの書替え監視動作およびバ
リッド・ビットの無効化動作によりCPUの動作を一時的
にウエイトをかける必要をなくし、CPU性能をダウンさ
せずにメインメモリの書替え監視のできるキャッシュ・
コントローラを提供することにある。
An object of the present invention is to monitor the rewriting of the main memory,
By providing a valid bit register that stores the validity of the address tag regardless of the access from the CPU, the CPU operation can be temporarily stopped by the rewrite monitoring operation of the main memory and the invalid bit invalidating operation. A cache that can monitor rewriting of the main memory without the need to wait and reduce the CPU performance
To provide a controller.

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

本発明のキャッシュコントローラは、デュアルポート
メモリから成りCPUからのアクセスとメインメモリから
のアクセスとに対して同時に動作ができるアドレスタグ
用メモリと、このアドレスタダ用メモリへの前記CPUか
らのアクセスに対してアドレスタグの有効性の有無を記
憶するバリッドビット・メモリと、前記メインメモリの
書替え監視の結果に従って前記メインメモリのセットア
ドレスに対応して無効化データを書き込む記憶回路を有
しこの記憶回路の出力データを前記CPUのセットアドレ
スにより選択して前記アドレスタグ用メモリ内のアドレ
スタグの有効性の有無を読み出すバリッドビット・レジ
スタと、前記CPUからのアクセス時に前記バリッドビッ
ト・メモリと前記バリットビット・レジスタの両方がア
ドレスタグの有効性を示している時、ヒット信号を発生
する論理回路とを含むことを特徴とする。
The cache controller of the present invention comprises a dual-port memory, an address tag memory that can operate simultaneously for access from the CPU and access from the main memory, and a memory for the address free memory that is accessed from the CPU. A valid bit memory for storing the validity of the address tag, and a storage circuit for writing invalidation data corresponding to the set address of the main memory in accordance with the result of rewriting monitoring of the main memory. A valid bit register for selecting output data by the set address of the CPU and reading the validity of the address tag in the address tag memory; and a valid bit memory and the valid bit register when accessed from the CPU. Both registers indicate the validity of the address tag When that, characterized in that it comprises a logic circuit for generating a hit signal.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be described with reference to the drawings.

第1図は本発明の一実施例のブロック図であり、本発
明に関係する部分のみを示している。アドレスタグ用メ
モリ1はデュアルポート・メモリセルを使用しているの
で、CPUからのセットアドレス20とメインメモリからの
セットアドレス30との同時読出しアクセスを受付け動作
することができる。アドレス20のアクセスに対し、メモ
リ1からアドレスタグ22が読み出され、CPUからのタグ
アドレス21と比較器2で比較されて、一致信号23を出力
する。同時に、セットアドレス20でアクセスされたバリ
ッド・ビット・メモリ5からはバリッドビット信号33を
出力し、バリッド・ビット・レジスタ6へ送る。このバ
リッド・ビット・レジスタ6ではバリッドビット信号33
とアドレス20に対応するレジスタビットとが両方とも有
効であるかどうかの判定を行ない、有効信号24をANDゲ
ート4に出力し、ANDゲート4では比較器2からの一致
信号23とのANDをとりヒット信号25を出力する。
FIG. 1 is a block diagram of an embodiment of the present invention, and shows only parts related to the present invention. Since the address tag memory 1 uses a dual-port memory cell, it can receive and perform simultaneous read access of the set address 20 from the CPU and the set address 30 from the main memory. In response to the access to the address 20, the address tag 22 is read from the memory 1 and compared with the tag address 21 from the CPU by the comparator 2 to output a coincidence signal 23. At the same time, a valid bit signal 33 is output from the valid bit memory 5 accessed by the set address 20, and sent to the valid bit register 6. This valid bit register 6 stores a valid bit signal 33
And whether the register bit corresponding to the address 20 is valid is determined, and a valid signal 24 is output to the AND gate 4. The AND gate 4 performs an AND operation with the coincidence signal 23 from the comparator 2. The hit signal 25 is output.

一方、メインメモリ書替え監視によるセットアドレス
30をメモリ1へアクセスすると、メモリ1からアドレス
タグ32が読み出され、メインメモリからのタグアドレス
31と比較器3で比較されて、一致信号34を出力する。こ
の一致信号34は制御回路7に送られて、もし、一致信号
34が一致を示す状態値であれば、バリッド・ビット・レ
ジスタ6の対応するレジスタビットを“0"ライトしてバ
リッドビットをOFFにする。すなわち、セットアドレス3
0で指定されるメモリ1内のアドレスタグを無効化す
る。このとき、メモリ5のセットアドレス30で指定され
るバリッドビットは無効化されない。但し、前述したよ
うにCPUからのアクセス時はメモリ5のバリッドビット
とレジスタ6のバリッドビットとが両方有効でないと、
有効信号24は有効状態値にはならない。
On the other hand, set address by main memory rewrite monitoring
When 30 is accessed to the memory 1, the address tag 32 is read from the memory 1, and the tag address from the main memory is read.
31 is compared with the comparator 3 and a coincidence signal 34 is output. The coincidence signal 34 is sent to the control circuit 7, and if the coincidence signal
If 34 is a status value indicating a match, the corresponding register bit of the valid bit register 6 is written "0" to turn off the valid bit. That is, set address 3
Invalidates the address tag in the memory 1 specified by 0. At this time, the valid bit specified by the set address 30 of the memory 5 is not invalidated. However, as described above, when the valid bit of the memory 5 and the valid bit of the register 6 are not valid at the time of access from the CPU,
The valid signal 24 does not become a valid state value.

レジスタ6はレジスタビットをOFFする際に使用する
メインメモリからのセットアドレス30を入力し、逆にON
にする際に使用するCPUからのセットアドレス20を入力
する。
Register 6 inputs the set address 30 from the main memory used to turn off the register bits, and turns on
Enter the set address 20 from the CPU to be used for setting.

制御回路7はレジスタビットをOFFする指示信号の一
致信号34を入力し、ONする指示信号のリプレース信号27
を入力する。またCPUと同期したクロック26を入力し、O
FF指示の場合は“0"に、ON指示の場合は“1"にセットさ
れたデータ信号28をレジスタ書込みパルス29と共にレジ
スタ6へ送る。
The control circuit 7 receives the coincidence signal 34 of the instruction signal for turning off the register bit, and replaces the instruction signal 27 for turning on the register bit.
Enter Also, input clock 26 synchronized with CPU and
The data signal 28 set to "0" in the case of the FF instruction and set to "1" in the case of the ON instruction is sent to the register 6 together with the register write pulse 29.

本発明の効果を出すために、バリッド・ビット・メモ
リ5の代りに、バリッドビット・レジスタ6を用いて実
現できることも明らかである。また、メモリ1はデュア
ルポート・メモリセルを用いないで同様の機能を有する
メモリ回路を使用することもできる。
It is apparent that the present invention can be realized by using a valid bit register 6 instead of the valid bit memory 5 in order to obtain the effect of the present invention. Further, the memory 1 may use a memory circuit having a similar function without using a dual-port memory cell.

第2図は本発明の主要回路であるバリッド・ビット・
レジスタ6と制御回路7の具体回路を示している。
FIG. 2 shows a main circuit of the present invention, a valid bit
2 shows specific circuits of a register 6 and a control circuit 7.

レジスタ6はアドレス30をデコードするデコーダ61を
有し、出力信号としてのデコード信号群41はそれぞれレ
ジスタ63の各ビットをイネーブル信号として使用する。
また、アドレス20をデコードするデコーダ62を有し、出
力信号としてのデコード信号群42は、レジスタ63からの
各バリッド・ビット信号群43とそれぞれNANDゲート群64
でNANDをとり、さらにNANDゲート群64の出力信号群44を
一括してNANDゲート65でNANDをとる。すなわちNANDゲー
ト65の出力信号45はCPUからのアクセスされたアドレス
タグのバリッドビットがレジスタ6内で有効かどうかを
示す。メモリ5からのバリッドビット信号33と出力信号
45とをANDゲート66でANDをとり有効信号24を出力する。
The register 6 has a decoder 61 for decoding the address 30, and the decode signal group 41 as an output signal uses each bit of the register 63 as an enable signal.
Further, it has a decoder 62 for decoding the address 20, and the decoded signal group 42 as an output signal is composed of each valid bit signal group 43 from the register 63 and each NAND gate group 64.
, And the output signal group 44 of the NAND gate group 64 is collectively NANDed by the NAND gate 65. That is, the output signal 45 of the NAND gate 65 indicates whether the valid bit of the address tag accessed from the CPU is valid in the register 6. Valid bit signal 33 and output signal from memory 5
The signal 45 and the AND signal 66 are ANDed and the valid signal 24 is output.

制御回路7はリプレース信号27と一致信号34のいずれ
かがONであれば、クロック信号26をレジスタ6へ出力し
てデータ信号29をレジスタ6へ書込む。このデータ信号
29はNANDゲート73,74,75により、一致信号34がONのとき
は“0"に、リプレース信号27がONのときは“1"になる。
If either the replace signal 27 or the coincidence signal 34 is ON, the control circuit 7 outputs the clock signal 26 to the register 6 and writes the data signal 29 to the register 6. This data signal
29 is set to "0" by the NAND gates 73, 74 and 75 when the coincidence signal 34 is ON, and becomes "1" when the replacement signal 27 is ON.

このリプレース信号とはメインメモリのデータをキャ
ッシュメモリへロードするときに発生するもので、この
場合は、ロードが完了すると該当するアドレスは有効に
なるので、バリッドビットをONにしなければならない。
また、一致信号はキャッシュメモリ内にあるデータが他
のプロセッサなどによってメインメモリで書替えがあっ
た場合に、キャッシュメモリとメインメモリのデータと
を常に一致させる為に、キャッシュメモリ内のデータを
無効にするときのチェック信号で、一致信号が出力され
れば、キャッシュメモリ内にあるデータがメインメモリ
内で書替えられたことを示す。
The replace signal is generated when data of the main memory is loaded into the cache memory. In this case, the corresponding address becomes valid when the loading is completed, and the valid bit must be turned ON.
In addition, when the data in the cache memory is rewritten in the main memory by another processor or the like, the match signal invalidates the data in the cache memory so that the data in the cache memory always matches the data in the main memory. If a match signal is output at the time of the check signal, it indicates that data in the cache memory has been rewritten in the main memory.

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

以上説明したように本発明は、メインメモリの書替え
監視の結果、アドレスタグの有効性の有無をCPUからの
アクセスとは無関係に記憶するバリッド・ビット・レジ
スタを備えることによって、メインメモリの書替え監視
動作によってCPUの動作を一時的にウエイトをかけるこ
とがなくなり、CPUの性能をダウンせずにメインメモリ
の書替え監視ができるという効果がある。
As described above, the present invention includes a valid bit register that stores the validity of an address tag as a result of monitoring the rewriting of the main memory irrespective of access from the CPU. The operation eliminates the need to temporarily wait for the operation of the CPU, and has the effect of monitoring rewriting of the main memory without deteriorating the performance of the CPU.

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

第1図は本発明の一実施例のブロック図、第2図は第1
図の実施例の主要回路の具体例の回路図、第3図は従来
のキャッシュコントローラの一例のブロック図である。 1……アドレスタグ用メモリ(デュアルポート・メモリ
セル使用)、2,3……比較器、4,12,71,66……ANDゲー
ト、5……シングルポート・メモリセルを使用したバリ
ッド・ビット・メモリ、6……バリッド・ビット・レジ
スタ、7……制御回路、10……デュアルポート・メモリ
セル使用のバリッド・ビット・メモリ、11……アービ
タ、20,30……セットアドレス、21,31……タグアドレ
ス、22,32……アドレスタグ、23,34……一致信号、24…
…有効信号、25……ヒット信号、26……クロック(C
L)、27……リプレース信号(RE)、28……データ信
号、29……レジスタ書込みパルス、33,35,36……バリッ
ドビット信号、37……ライトアクセス要求信号、38……
アクセス要求信号、39……調停信号、61,62……デコー
ダ、63……レジスタ、64,65,73,74,75……NANDゲート、
72……ORゲート。
FIG. 1 is a block diagram of one embodiment of the present invention, and FIG.
FIG. 3 is a block diagram of an example of a conventional cache controller, and FIG. 3 is a block diagram of an example of a conventional cache controller. 1 ... Memory for address tag (using dual-port memory cells), 2,3 ... Comparator, 4,12,71,66 ... AND gate, 5 ... Valid bit using single-port memory cell • Memory, 6: Valid bit register, 7: Control circuit, 10: Valid bit memory using dual-port memory cells, 11: Arbiter, 20, 30, ... Set address, 21, 31 …… Tag address, 22,32 …… Address tag, 23,34 …… Match signal, 24…
… Valid signal, 25… hit signal, 26… clock (C
L), 27: Replace signal (RE), 28: Data signal, 29: Register write pulse, 33, 35, 36 ... Valid bit signal, 37 ... Write access request signal, 38 ...
Access request signal, 39 Arbitration signal, 61, 62 Decoder, 63 Register, 64, 65, 73, 74, 75 NAND gate
72 …… OR gate.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】デュアルポートメモリから成りCPUからの
アクセスとメインメモリからのアクセスとに対して同時
に動作ができるアドレスタグ用メモリと、このアドレス
タダ用メモリへの前記CPUからのアクセスに対してアド
レスタグの有効性の有無を記憶するバリッドビット・メ
モリと、前記メインメモリの書替え監視の結果に従って
前記メインメモリのセットアドレスに対応して無効化デ
ータを書き込む記憶回路を有しこの記憶回路の出力デー
タを前記CPUのセットアドレスにより選択して前記アド
レスタグ用メモリ内のアドレスタグの有効性の有無を読
み出すバリッドビット・レジスタと、前記CPUからのア
クセス時に前記バリッドビット・メモリと前記バリット
ビット・レジスタの両方がアドレスタグの有効性を示し
ている時、ヒット信号を発生する論理回路とを含むこと
を特徴とするキャッシュコントローラ。
1. An address tag memory comprising a dual port memory and capable of simultaneously operating for access from a CPU and access from a main memory, and an address for access from the CPU to the address free memory. A valid bit memory for storing the validity of the tag, and a storage circuit for writing invalidation data in accordance with a set address of the main memory according to a result of rewriting monitoring of the main memory; A valid bit register for selecting the validity of the address tag in the address tag memory by selecting the set address of the CPU and the valid bit memory and the valid bit register when the CPU accesses. Hit signal when both indicate address tag validity Cache controller which comprises a logic circuit which.
JP1097944A 1989-04-17 1989-04-17 Cache controller Expired - Lifetime JP2952884B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1097944A JP2952884B2 (en) 1989-04-17 1989-04-17 Cache controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1097944A JP2952884B2 (en) 1989-04-17 1989-04-17 Cache controller

Publications (2)

Publication Number Publication Date
JPH02275550A JPH02275550A (en) 1990-11-09
JP2952884B2 true JP2952884B2 (en) 1999-09-27

Family

ID=14205782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1097944A Expired - Lifetime JP2952884B2 (en) 1989-04-17 1989-04-17 Cache controller

Country Status (1)

Country Link
JP (1) JP2952884B2 (en)

Also Published As

Publication number Publication date
JPH02275550A (en) 1990-11-09

Similar Documents

Publication Publication Date Title
US5276833A (en) Data cache management system with test mode using index registers and CAS disable and posted write disable
US4937738A (en) Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction
US4794523A (en) Cache memory architecture for microcomputer speed-up board
JPH0668735B2 (en) Cache memory
JPH02113492A (en) Random-access-memory circuit having condition writing means
US5479625A (en) Ring systolic array system for synchronously performing matrix/neuron computation using data transferred through cyclic shift register connected in cascade of trays
WO1988006762A1 (en) Central processor unit for digital data processing system including cache management mechanism
US5010475A (en) Consistency ensuring system for the contents of a cache memory
JP2952884B2 (en) Cache controller
US5893154A (en) CPU write-back cache coherency mechanism that transeers data from a cache memory to a main memory before access of the main memory by an alternate bus master
JPH03121547A (en) Cache memory control system
US5276892A (en) Destination control logic for arithmetic and logic unit for digital data processor
JP2680293B2 (en) Data processing device and cache memory control method
JPH05265916A (en) Data processor
JPH0628258A (en) Microprocessor
JP2791319B2 (en) Data processing device
JPH0630074B2 (en) Processor
JP2703255B2 (en) Cache memory writing device
JPH04195563A (en) Controller for memory system
JPH10232833A (en) Data processing system
JPH07141174A (en) Register
JPH01315851A (en) Cache memory control system
JPH04181343A (en) Cache memory system
JPH08190508A (en) Cache memory control circuit
JPH1049440A (en) Cache memory system