JPH07271669A - Cache memory control circuit - Google Patents

Cache memory control circuit

Info

Publication number
JPH07271669A
JPH07271669A JP6056424A JP5642494A JPH07271669A JP H07271669 A JPH07271669 A JP H07271669A JP 6056424 A JP6056424 A JP 6056424A JP 5642494 A JP5642494 A JP 5642494A JP H07271669 A JPH07271669 A JP H07271669A
Authority
JP
Japan
Prior art keywords
write
cache memory
data
address
fifo
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.)
Withdrawn
Application number
JP6056424A
Other languages
Japanese (ja)
Inventor
Yasukazu Watanabe
能一 渡辺
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 Engineering Ltd
Original Assignee
NEC Engineering 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 NEC Engineering Ltd filed Critical NEC Engineering Ltd
Priority to JP6056424A priority Critical patent/JPH07271669A/en
Publication of JPH07271669A publication Critical patent/JPH07271669A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To improve the efficiency of a system by enabling data to be written back to a main memory without stopping the operation of a CPU and unnecessarily occupying a system bus. CONSTITUTION:When an address from a CPU 1 makes a cache hit in writing operation, a cache memory part 2 stores the address of the FIFO memory in write-back FIFO 3 as write-back information. A bus control part 4 issues a request with the lowest priority for writing-back operation to the main memory to a control bus 103 and writes the data of the write-back FIFO 3 or the block of the cache memory part 2 back to the main memory when the data are present in the write-back FIFO 3 or when the data of the write-back FIFO 3 are replaced in the main memory.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はキャッシュメモリ制御回
路に関し、特にライトバック方式によるキャッシュメモ
リ制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory control circuit, and more particularly to a cache memory control system by a write back system.

【0002】[0002]

【従来の技術】近年、CPU性能は日に日に高速化して
おり、このCPU性能を満足させかつシステム性能を向
上させるためにキャッシュメモリが使用されている。
2. Description of the Related Art In recent years, CPU performance has been increasing day by day, and a cache memory is used to satisfy this CPU performance and improve system performance.

【0003】従来、キャッシュメモリの書込み制御方式
としては、ライトスルー方式とライトバック方式とが用
いられている。ライトスルー方式とはCPUが書込み動
作(ライト動作)を行う場合にメインメモリ及びキャッ
シュメモリの両方に同時に書込みを行う方式であり、ラ
イトバック方式とはライト動作をキャッシュのみに行う
方式である。
Conventionally, a write-through method and a write-through method have been used as a write control method for a cache memory. The write-through method is a method of simultaneously writing to both the main memory and the cache memory when the CPU performs a write operation (write operation), and the write-back method is a method of performing the write operation only to the cache.

【0004】ライトスルー方式では常にメインメモリと
キャッシュメモリとの間でデータの一致性が保たれてい
る反面、ライト動作の頻度が高いとメインメモリへのア
クセス頻度が高まり、システムの性能が低下する。
In the write-through method, the consistency of data is always maintained between the main memory and the cache memory, but when the frequency of write operation is high, the frequency of access to the main memory increases and the system performance deteriorates. .

【0005】また、ライトバック方式ではライトスルー
方式に比べてシステムの性能が向上するが、キャッシュ
ミスヒットが生じると新しいブロック(メインメモリの
データ)と古いブロック(キャッシュメモリのデータ)
とを入れ替える(以下、リプレースとする)必要があ
る。
The write-back method improves the system performance as compared with the write-through method, but when a cache miss hit occurs, a new block (data in the main memory) and an old block (data in the cache memory).
It is necessary to replace and (and replace).

【0006】つまり、キャッシュメモリにおいてライト
動作によって書換えられたブロックをメインメモリに書
込む(以下、ライトバックとする)必要がある。このラ
イトバックによってシステムバス上で他装置との競合が
発生することがあり、この競合がシステムの性能に影響
してくる。
That is, it is necessary to write the block rewritten by the write operation in the cache memory to the main memory (hereinafter referred to as write back). This write-back may cause contention with other devices on the system bus, and this contention affects system performance.

【0007】このライトバック方式の問題を解決するた
めに、システムバスの空き時間を検出し、検出した空き
時間を利用してライトバック動作を実施する技術が特開
平3−228150号公報に開示されている。
In order to solve the problem of the write-back method, Japanese Patent Laid-Open No. 3-228150 discloses a technique for detecting the free time of the system bus and executing the write-back operation by utilizing the detected free time. ing.

【0008】この技術においては、図3に示すように、
CPU5とキャッシュメモリコントローラ6とキャッシ
ュ用SRAM(Static Random Acce
ssMemory)7とシステムバス空き検出回路8と
がアドレスバス151とデータバス152と制御バス1
53とを介して互いに接続されている。
In this technique, as shown in FIG.
CPU 5, cache memory controller 6, cache SRAM (Static Random Access)
The ssMemory 7 and the system bus availability detection circuit 8 are the address bus 151, the data bus 152, and the control bus 1.
53 and 53 are connected to each other.

【0009】特に、システムバス空き検出回路8でシス
テムバスの空き時間を検出すると、ライトバック指示信
号156がキャッシュメモリコントローラ6に送出され
る。このとき、キャッシュメモリコントローラ6からは
ライトバック指示アクノリッジ信号157がシステムバ
ス空き検出回路8に返送される。
In particular, when the system bus vacancy detection circuit 8 detects the vacant time of the system bus, the write-back instruction signal 156 is sent to the cache memory controller 6. At this time, the cache memory controller 6 returns the write-back instruction acknowledge signal 157 to the system bus availability detection circuit 8.

【0010】その際、CPU5はオア回路9からのホー
ルドリクエスト信号154によってその動作が停止さ
れ、キャッシュ用SRAM7はオア回路10からのチッ
プセレクト信号155によって駆動される。
At this time, the operation of the CPU 5 is stopped by the hold request signal 154 from the OR circuit 9, and the cache SRAM 7 is driven by the chip select signal 155 from the OR circuit 10.

【0011】上記のキャッシュメモリコントローラ6
は、図4に示すように、アドレスインデックスを入力し
て翻訳するデコーダ61と、タグ情報を格納するタグメ
モリ62と、バリッドビットを格納するバリッドメモリ
63と、ダーティビットを格納するダーティメモリ64
とを有するほかに、デコーダ65とポインタ67とイン
クリメンタ66とを有している。
The above cache memory controller 6
As shown in FIG. 4, a decoder 61 that inputs and translates an address index, a tag memory 62 that stores tag information, a valid memory 63 that stores valid bits, and a dirty memory 64 that stores dirty bits.
In addition to having, the decoder 65, the pointer 67, and the incrementer 66 are provided.

【0012】上述した如く構成されたシステムにおける
CPU5からの読出し動作(リード動作)では、CPU
5からのアドレスをキャッシュメモリコントローラ6に
てチェックし、そのアドレスがタグメモリ62にあれば
キャッシュ用SRAM7から該当するデータをCPU5
に対して出力するようになっている。
In the read operation (read operation) from the CPU 5 in the system configured as described above, the CPU
The address from 5 is checked by the cache memory controller 6, and if the address is in the tag memory 62, the corresponding data is retrieved from the cache SRAM 7 by the CPU 5
It is designed to output to.

【0013】一方、そのアドレスがタグメモリ62にな
ければ、現時点でのキャッシュ用SRAM7の中にある
ブロックからLRU(Least Recentry
Used),FIFO(First In First
Out)アルゴリズム等に基づいてリプレースするた
め、キャッシュ用SRAM7から追い出すブロックを決
定する。
On the other hand, if the address is not in the tag memory 62, the block in the cache SRAM 7 at the present time starts from the LRU (Least Retry).
Used), FIFO (First In First)
Out) A block to be removed from the cache SRAM 7 is determined because replacement is performed based on the algorithm or the like.

【0014】この場合、追い出されるブロックのダーテ
ィビットが“0”であればそのブロックをパージし、メ
インメモリ(図示せず)からCPU5が必要とするブロ
ックを新たにキュッシュ用SRAM7に読込む。
In this case, if the dirty bit of the block to be ejected is "0", the block is purged and a block required by the CPU 5 is newly read into the cache SRAM 7 from the main memory (not shown).

【0015】しかしながら、追い出されるブロックのダ
ーティビットが“1”であればそのブロックがCPU5
によって書換えられていることを示しているので、その
ブロックをメインメモリに転送し、その後に上記のダー
ティビットが“0”の場合の処理と同様の処理を行う。
However, if the dirty bit of the block to be ejected is "1", that block is the CPU 5
Indicates that the block has been rewritten, the block is transferred to the main memory, and thereafter, the same processing as that when the dirty bit is "0" is performed.

【0016】これに対し、CPU5からのライト動作で
は、CPU5からのアドレスをキャッシュメモリコント
ローラ6にてチェックし、そのアドレスがタグメモリ6
2にあればキャッシュ用SRAM7に存在する該当アド
レスのデータを書換えると同時に、ダーティメモリ64
の該当アドレスのダーティビットを“1”にする。
On the other hand, in the write operation from the CPU 5, the address from the CPU 5 is checked by the cache memory controller 6, and the address is checked by the tag memory 6
If it is 2, the data of the corresponding address existing in the cache SRAM 7 is rewritten and at the same time the dirty memory 64
Set the dirty bit of the corresponding address of "1".

【0017】一方、そのアドレスがタグメモリ62にな
ければ、キャッシュメモリコントローラ6はCPU5か
ら出力されるデータをメインメモリ上の該当アドレスに
書込む。
On the other hand, if the address is not in the tag memory 62, the cache memory controller 6 writes the data output from the CPU 5 in the corresponding address in the main memory.

【0018】上記のようなシステムにおいて、システム
バス空き検出回路8がシステムバスの空きを検出する
と、システムバス空き検出回路8からキャッシュメモリ
コントローラ6にライトバック指示信号156が送出さ
れる。
In the above system, when the system bus vacancy detection circuit 8 detects the vacancy of the system bus, the system bus vacancy detection circuit 8 sends a write back instruction signal 156 to the cache memory controller 6.

【0019】キャッシュメモリコントローラ6はライト
バック指示信号156を受信すると、ポインタ67をク
リアしてダーティメモリ64内のダーティビットが
“1”のタグアドレスを検索し始める。
When the cache memory controller 6 receives the write-back instruction signal 156, it clears the pointer 67 and starts searching for the tag address with the dirty bit "1" in the dirty memory 64.

【0020】ポインタ67においてダーティビットが検
索されると、ポインタ67からシステムバス空き検出回
路8にライトバック指示アクノリッジ信号157が出力
される。ポインタ67においてはダーティビットが検索
されなければ、その値をインクリメンタ66によってイ
ンクリメントしながらダーティビットが見つかるまで検
索を継続する。
When the pointer 67 retrieves the dirty bit, the pointer 67 outputs a write-back instruction acknowledge signal 157 to the system bus availability detection circuit 8. If the dirty bit is not found in the pointer 67, the value is incremented by the incrementer 66 and the search is continued until the dirty bit is found.

【0021】ポインタ67はダーティビットを発見する
と、システムバス空き検出回路8にライトバック指示ア
クノリッジ信号157を出力するとともに、該当するタ
グ情報をタグメモリ62から出力させる。
When the pointer 67 finds a dirty bit, it outputs a write-back instruction acknowledge signal 157 to the system bus vacancy detection circuit 8 and also outputs corresponding tag information from the tag memory 62.

【0022】したがって、システムバス空き検出回路8
はキャッシュメモリコントローラ6からライトバック指
示アクノリッジ信号157とタグメモリ62のタグ出力
とを同時に受取り、タグ出力をラッチする。
Therefore, the system bus empty detection circuit 8
Simultaneously receives the write-back instruction acknowledge signal 157 and the tag output of the tag memory 62 from the cache memory controller 6, and latches the tag output.

【0023】その後に、システムバス空き検出回路8は
そのタグ出力をブロックアドレスとしてキャッシュ用S
RAM7の該当するブロックをメインメモリに転送す
る。この転送が終了すると、システムバス空き検出回路
8はライトバック指示信号156をインアクティブにす
る。上述した如く、システムバスの空き時間が利用され
てライトバック動作が実施される。
After that, the system bus vacancy detection circuit 8 uses the tag output as a block address for the cache S.
The corresponding block of RAM 7 is transferred to the main memory. When this transfer is completed, the system bus availability detection circuit 8 inactivates the write-back instruction signal 156. As described above, the write back operation is performed by utilizing the free time of the system bus.

【0024】[0024]

【発明が解決しようとする課題】上述した従来のキャッ
シュメモリ制御方式では、システムバスの空き時間にラ
イトバック動作を行っているが、システムバスの空き時
間を検出してからキャッシュメモリコントローラ内のダ
ーティビットを検索しているので、システムバスの空き
時間を検出してからライトバック動作を行うまでに検索
動作の時間分だけ時間差が生ずることとなる。
In the conventional cache memory control system described above, the write-back operation is performed during the free time of the system bus. However, after the free time of the system bus is detected, the dirty in the cache memory controller is detected. Since the bits are searched, there is a time difference of the search operation time from the detection of the free time of the system bus to the write back operation.

【0025】このため、検索動作の時間を含めてライト
バック動作の間、システムバスが占有されてしまうの
で、システムバスに対する他装置からのアクセスが待た
されてしまうとともに、ライトバック動作を行っている
間、CPUがキャッシュメモリコントローラからのホー
ルドリクエスト信号によってホールドされてしまい、シ
ステムの効率が悪くなるという問題がある。
For this reason, the system bus is occupied during the write-back operation including the time of the search operation, so that access from the other device to the system bus is kept waiting and the write-back operation is performed. During this period, the CPU is held by the hold request signal from the cache memory controller, and there is a problem that the efficiency of the system deteriorates.

【0026】そこで、本発明の目的は上記の問題点を解
消し、CPUの動作を停止させることなくかつシステム
バスを無駄に占有することなく、メインメモリへのライ
トバックを可能とすることができ、システムの効率を向
上させることができるキャッシュメモリ制御回路を提供
することにある。
Therefore, an object of the present invention is to solve the above problems and enable write back to the main memory without stopping the operation of the CPU and without wastefully occupying the system bus. , Providing a cache memory control circuit capable of improving system efficiency.

【0027】[0027]

【課題を解決するための手段】本発明によるキャッシュ
メモリ制御回路は、書込み動作をキャッシュメモリに対
してのみ行うライトバック方式で制御するキャッシュメ
モリ制御回路であって、前記キャッシュメモリ内の主記
憶装置にライトバックするデータ及びそのアドレスを保
持する保持手段と、前記保持手段に当該データ及びアド
レスが保持されているときに当該データ及びアドレスを
前記主記憶装置にライトバックするためのリクエストを
バス優先度を最低位にして発行する発行手段とを備えて
いる。
A cache memory control circuit according to the present invention is a cache memory control circuit for controlling a write operation only in a cache memory by a write-back method, and is a main memory device in the cache memory. Holding means for holding the data to be written back to and the address thereof, and a request for writing back the data and the address to the main storage device when the holding means holds the bus priority. And the issuing means for issuing at the lowest rank.

【0028】[0028]

【作用】CPUのライト動作によってキャッシュメモリ
が書換えられるとき、書換えられたアドレス及びデータ
をFIFOメモリにライトバック情報として格納する。
When the cache memory is rewritten by the write operation of the CPU, the rewritten address and data are stored in the FIFO memory as write back information.

【0029】このFIFOメモリにデータが存在する場
合、あるいはキャッシュメモリのブロックをメインメモ
リにリプレースする場合、メインメモリへのライトバッ
クのための最低優先のリクエストを発行してメインメモ
リへのライトバックを行う。
When data is present in this FIFO memory, or when a block of the cache memory is replaced with the main memory, the lowest priority request for write back to the main memory is issued to write back to the main memory. To do.

【0030】これによって、CPUの動作を停止させる
ことなくかつシステムバスを無駄に占有することなくメ
インメモリへのライトバックが可能となるので、システ
ムの効率を向上させることができる。
This enables write back to the main memory without stopping the operation of the CPU and without wastefully occupying the system bus, so that the efficiency of the system can be improved.

【0031】[0031]

【実施例】次に、本発明の一実施例について図面を参照
して説明する。
An embodiment of the present invention will be described with reference to the drawings.

【0032】図1は本発明の一実施例の構成を示すブロ
ック図である。図において、CPU1とキャッシュメモ
リ部2とライトバックFIFO3とは夫々内部アドレス
バス111と内部データバス112と内部制御バス11
3とを介して互いに接続されている。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In the figure, the CPU 1, the cache memory unit 2, and the write-back FIFO 3 are respectively an internal address bus 111, an internal data bus 112, and an internal control bus 11.
3 and 3 are connected to each other.

【0033】キャッシュメモリ部2ではライトバックF
IFO3からの格納データが一杯か否かを示すFIFO
−FULL信号131を認識し、CPU1からのライト
動作がヒットした場合、あるいはダーティビットを認識
した場合にライトバックFIFO3へのFIFO書込み
信号121を有効とする。
In the cache memory unit 2, write back F
FIFO indicating whether or not the storage data from IFO3 is full
-When the FULL signal 131 is recognized and the write operation from the CPU 1 is hit, or when the dirty bit is recognized, the FIFO write signal 121 to the write-back FIFO 3 is validated.

【0034】ライトバックFIFO3は内部にアドレス
用及びデータ用のFIFOメモリ(図示せず)を搭載し
ており、キャッシュメモリ部2からのFIFO書込み信
号121とバス制御部4からのFIFO読出し信号14
1とによって制御される。
The write-back FIFO 3 is internally equipped with an address and data FIFO memory (not shown), and a FIFO write signal 121 from the cache memory unit 2 and a FIFO read signal 14 from the bus control unit 4 are provided.
1 and 1.

【0035】バス制御部4はライトバックFIFO3か
らのFIFOメモリ内におけるアドレス及びデータの有
無を示すFIFO−EMPTY信号132を認識し、ラ
イトバックFIFO3にFIFO読出し信号141を出
力する。
The bus control unit 4 recognizes the FIFO-EMPTY signal 132 from the write-back FIFO 3 indicating the presence or absence of an address and data in the FIFO memory, and outputs the FIFO read signal 141 to the write-back FIFO 3.

【0036】また、バス制御部4はライトバックFIF
O3から出力されたFIFO出力アドレス133及びF
IFO出力データ134を内部でラッチする。このと
き、バス制御部4はそれらFIFO出力アドレス133
及びFIFO出力データ134をラッチすると同時に、
ラッチしたアドレスをモニタアドレスとしてアドレスラ
イン124を介してキャッシュメモリ部2に対して出力
する。
The bus control unit 4 is a write-back FIF.
FIFO output address 133 and F output from O3
The IFO output data 134 is latched internally. At this time, the bus control unit 4 uses the FIFO output address 133
And latching the FIFO output data 134,
The latched address is output to the cache memory unit 2 via the address line 124 as a monitor address.

【0037】一方、キャッシュメモリ部2ではバス制御
部4からのモニタアドレスをチェックし、そのアドレス
がキャッシュメモリ部2内で有効であればバス制御部4
に対してアドレス有効信号122を出力する。
On the other hand, the cache memory unit 2 checks the monitor address from the bus control unit 4, and if the address is valid in the cache memory unit 2, the bus control unit 4
The address valid signal 122 is output to.

【0038】バス制御部4はシステムバスのアドレスバ
ス101とデータバス102と制御バス103とに接続
されており、キャッシュメモリ部2からアドレス有効信
号122を受信するのと同時に制御バス103に最低優
先のリクエストを出力する。
The bus control unit 4 is connected to the address bus 101, the data bus 102 and the control bus 103 of the system bus, and receives the address valid signal 122 from the cache memory unit 2 and at the same time gives the control bus 103 the lowest priority. Output the request.

【0039】ここで、最低優先のリクエストは上記の各
部を含む装置内における優先度が最低のリクエストとし
て予め設定されてバスコントローラ(図示せず)に記憶
されており、自装置と他装置との間の優先度も予め設定
されてバスコントローラに記憶されている。
Here, the lowest-priority request is preset as a request having the lowest priority in the device including the above-mentioned units and stored in the bus controller (not shown). The priority of the interval is also preset and stored in the bus controller.

【0040】上記のシステムバスのアドレスバス101
及びデータバス102はリプレース時及びキャッシュミ
スヒット時にメインメモリに対するアクセスにおいて使
用される。
Address bus 101 of the above system bus
The data bus 102 is used for accessing the main memory at the time of replacement and a cache miss.

【0041】図2は図1のキャッシュメモリ部2の構成
を示すブロック図である。図において、キャッシュメモ
リ部2はデータメモリ21と、デコーダ22,23と、
ディレクトリ24と、比較器25と、データメモリ制御
部26と、ダーティビット検索部27とから構成されて
いる。
FIG. 2 is a block diagram showing the configuration of the cache memory unit 2 of FIG. In the figure, the cache memory unit 2 includes a data memory 21, decoders 22 and 23,
The directory 24, the comparator 25, the data memory control unit 26, and the dirty bit search unit 27 are included.

【0042】データメモリ21は内部データバス112
とデータライン123とに接続され、CPU1及びメイ
ンメモリからのデータを格納する。デコーダ22,23
は内部アドレスバス111に接続され、CPU1からの
アドレスをデコードする。
The data memory 21 is an internal data bus 112.
And the data line 123 to store data from the CPU 1 and the main memory. Decoders 22 and 23
Is connected to the internal address bus 111 and decodes the address from the CPU 1.

【0043】ディレクトリ24はタグアドレスを格納す
るタグ部24aと、バリッドビットを格納するバリッド
ビット部24bと、ダーティビットを格納するダーティ
ビット部24cとからなっている。
The directory 24 comprises a tag section 24a for storing a tag address, a valid bit section 24b for storing a valid bit, and a dirty bit section 24c for storing a dirty bit.

【0044】比較器25は内部アドレスバス111を介
して入力されるCPU1からのアドレスと、ディレクト
リ24のタグ部24aからのタグアドレスとを比較し、
それらのアドレスが一致するとヒット信号125を出力
する。
The comparator 25 compares the address from the CPU 1 input via the internal address bus 111 with the tag address from the tag section 24a of the directory 24,
When the addresses match, the hit signal 125 is output.

【0045】データメモリ制御部26は比較器25から
のヒット信号125と、ダーティビット検索部27から
のダーティビット認識信号126とによってデータメモ
リ21の制御を行う。
The data memory control unit 26 controls the data memory 21 by the hit signal 125 from the comparator 25 and the dirty bit recognition signal 126 from the dirty bit search unit 27.

【0046】ダーティビット検索部27は常にダーティ
ビット部24c内のダーティビットを検索しており、ラ
イトバックFIFO3からのFIFO−FULL信号1
31によってFIFO書込み信号121とダーティビッ
ト認識信号126とを制御する。
The dirty bit retrieving unit 27 always retrieves the dirty bit in the dirty bit unit 24c, and the FIFO-FULL signal 1 from the write-back FIFO 3 is retrieved.
31 controls the FIFO write signal 121 and the dirty bit recognition signal 126.

【0047】また、ダーティビット検索部27はバス制
御部4からのライトバックのためのモニタアドレスをア
ドレスライン124を介して入力し、タグ部24aのタ
グアドレス及びバリッドビット部24bのバリッドビッ
トを検索する。
The dirty bit search unit 27 inputs the monitor address for write back from the bus control unit 4 via the address line 124, and searches the tag address of the tag unit 24a and the valid bit of the valid bit unit 24b. To do.

【0048】ダーティビット検索部27はバス制御部4
からのモニタアドレスがディレクトリ24内で有効であ
ればアドレス有効信号122を出力し、同時にそのモニ
タアドレスに対応するダーティビット部24c内のダー
ティビットを無効にする。
The dirty bit search unit 27 is the bus control unit 4
If the monitor address from is valid in the directory 24, the address valid signal 122 is output, and at the same time, the dirty bit in the dirty bit portion 24c corresponding to the monitor address is invalidated.

【0049】これら図1及び図2を用いて本発明の一実
施例の動作について説明する。ここで、CPU1からの
リード動作とライト動作時のミスヒット動作については
従来例と同様であるので、それらの動作の説明は省略す
る。
The operation of the embodiment of the present invention will be described with reference to FIGS. Here, the read operation from the CPU 1 and the mishit operation at the time of the write operation are the same as in the conventional example, and therefore the description of those operations will be omitted.

【0050】CPU1からのライト動作時、キャッシュ
メモリ部2内の比較器25はCPU1からのアドレスと
タグ部24a内のタグアドレスとを比較する。比較器2
5はタグ部24b内に対応するアドレスがあればヒット
信号125を有効にする。
During the write operation from the CPU 1, the comparator 25 in the cache memory unit 2 compares the address from the CPU 1 with the tag address in the tag unit 24a. Comparator 2
5 enables the hit signal 125 if there is a corresponding address in the tag portion 24b.

【0051】そこで、ダーティビット検索部27はライ
トバックFIFO3からのFIFO−FULL信号13
1を認識し、ライトバックFIFO3のアドレス用及び
データ用のFIFOメモリが一杯でなければ、ライトバ
ックFIFO3に対してFIFO書込み信号121を有
効にする。
Therefore, the dirty bit search unit 27 uses the FIFO-FULL signal 13 from the write-back FIFO 3.
If 1 is recognized and the FIFO memory for address and data of the write-back FIFO 3 is not full, the FIFO write signal 121 is enabled for the write-back FIFO 3.

【0052】同時に、ダーティビット検索部27はダー
ティビット部24c内の対応するブロックのダーティビ
ットを有効にし、データメモリ制御部26にダーティビ
ット認識信号126を出力する。よって、データメモリ
21の対応するブロックの内容がデータメモリ制御部2
6の制御でCPU1からのデータに書換えられる。
At the same time, the dirty bit search unit 27 validates the dirty bit of the corresponding block in the dirty bit unit 24c and outputs the dirty bit recognition signal 126 to the data memory control unit 26. Therefore, the content of the corresponding block of the data memory 21 is changed to the data memory controller 2
The data from the CPU 1 is rewritten under the control of 6.

【0053】一方、ダーティビット検索部27はライト
バックFIFO3からのFIFO−FULL信号131
を認識し、ライトバックFIFO3のアドレス用及びデ
ータ用のFIFOメモリが一杯であれば、ライトバック
FIFO3に対するFIFO書込み信号121を有効に
しない。
On the other hand, the dirty bit search unit 27 receives the FIFO-FULL signal 131 from the write-back FIFO 3.
If the FIFO memory for address and data of the write-back FIFO 3 is full, the FIFO write signal 121 to the write-back FIFO 3 is not validated.

【0054】同時に、ダーティビット検索部27はダー
ティビット部24c内の対応するブロックのダーティビ
ットを有効にし、データメモリ制御部26にダーティビ
ット認識信号126を出力する。よって、データメモリ
21の対応するブロックの内容がデータメモリ制御部2
6の制御でCPU1からのデータに書換えられる。
At the same time, the dirty bit search unit 27 validates the dirty bit of the corresponding block in the dirty bit unit 24c and outputs the dirty bit recognition signal 126 to the data memory control unit 26. Therefore, the content of the corresponding block of the data memory 21 is changed to the data memory controller 2
The data from the CPU 1 is rewritten under the control of 6.

【0055】この際、ライトバックFIFO3ではキャ
ッシュメモリ部2からのFIFO書込み信号121が有
効であれば、キャッシュメモリ部2におけるCPU1か
らのデータによるデータメモリ21の書換えと同時に、
内部のアドレス用及びデータ用のFIFOメモリにCP
U1からのアドレスとライトデータとを書込む。
At this time, in the write-back FIFO 3, if the FIFO write signal 121 from the cache memory unit 2 is valid, at the same time as the rewriting of the data memory 21 by the data from the CPU 1 in the cache memory unit 2,
CP in the internal FIFO memory for addresses and data
Write the address and write data from U1.

【0056】バス制御部4においてはライトバックFI
FO3からのFIFO−EMPTY信号132を認識
し、ライトバックFIFO3にデータが存在していれば
FIFO読出し信号141を有効にする。これによっ
て、バス制御部4はCPU1でのライトバックアドレス
及びデータをライトバックFIFO3から読込み、それ
らを内部でラッチする。
In the bus control unit 4, the write back FI
The FIFO-EMPTY signal 132 from the FO3 is recognized, and if the write-back FIFO3 has data, the FIFO read signal 141 is validated. As a result, the bus control unit 4 reads the write back address and data in the CPU 1 from the write back FIFO 3 and latches them internally.

【0057】このとき同時に、バス制御部4はキャッシ
ュメモリ部2に対してラッチしたアドレスをモニタアド
レスとしてアドレスライン124を介してキャッシュメ
モリ部2に対して出力する。
At the same time, the bus control unit 4 outputs the address latched to the cache memory unit 2 as a monitor address to the cache memory unit 2 via the address line 124.

【0058】キャッシュメモリ部2ではダーティビット
検索部27によってタグ部24a及びバリッドビット部
24b各々の内容を参照し、ライトバックされるアドレ
スがキャッシュメモリ部2内で有効か否かを判定する。
In the cache memory unit 2, the dirty bit search unit 27 refers to the contents of each of the tag unit 24a and the valid bit unit 24b and determines whether the address to be written back is valid in the cache memory unit 2.

【0059】キャッシュメモリ部2はライトバックされ
るアドレスが有効と判定すると、アドレス有効信号12
2をバス制御部4に出力し、同時にそのアドレスに対応
するダーティビット部24cのダーティビットを無効に
する。バス制御部4はアドレス有効信号122を受信す
るのと同時に、メインメモリへのライトバックのための
最低優先のリクエストを制御バス103に発行する。
When the cache memory unit 2 determines that the address to be written back is valid, the address valid signal 12
2 is output to the bus control unit 4, and at the same time, the dirty bit of the dirty bit unit 24c corresponding to the address is invalidated. At the same time that the bus control unit 4 receives the address valid signal 122, it issues a lowest priority request for write back to the main memory to the control bus 103.

【0060】また、キャッシュメモリ部2ではライトバ
ックFIFO3のアドレス用及びデータ用のFIFOメ
モリが一杯で書込めなかったデータを常にダーティビッ
ト検索部27で検索している。
In the cache memory unit 2, the dirty bit search unit 27 always searches for data that cannot be written because the address and data FIFO memories of the write-back FIFO 3 are full.

【0061】キャッシュメモリ部2ではダーティビット
検索部27で有効なダーティビットが検索されると、F
IFO−FULL信号131を認識してライトバックF
IFO3のFIFOメモリが一杯でなく、しかもCPU
1が内部バスを使用していなければ、ダーティビット検
索部27からデータメモリ制御部26へのダーティビッ
ト認識信号126を有効にする。
In the cache memory unit 2, when the dirty bit search unit 27 searches for a valid dirty bit, F
Writeback F by recognizing IFO-FULL signal 131
The FIFO memory of IFO3 is not full and the CPU
If 1 does not use the internal bus, the dirty bit recognition signal 126 from the dirty bit search unit 27 to the data memory control unit 26 is validated.

【0062】よって、データメモリ制御部26はダーテ
ィビット認識信号126を受信すると、該当するデータ
メモリ21からライトバックデータを読出し、さらに該
当するアドレスをディレクトリ24の内容から生成し、
それらを内部アドレスバス111及び内部データバス1
12に出力する。
Therefore, when the data memory control unit 26 receives the dirty bit recognition signal 126, the write back data is read from the corresponding data memory 21, and the corresponding address is generated from the contents of the directory 24.
The internal address bus 111 and the internal data bus 1
Output to 12.

【0063】このとき同時に、キャッシュメモリ部2で
はダーティビット検索部27からライトバックFIFO
3へのFIFO書込み信号121を有効とする。ライト
バックFIFO3はFIFO書込み信号121を受信す
ると、キャッシュメモリ部2から内部アドレスバス11
1及び内部データバス112に出力されたアドレス及び
データを内部のFIFOメモリに取込む。
At the same time, in the cache memory unit 2, the dirty bit search unit 27 causes the write-back FIFO to be executed.
The FIFO write signal 121 to 3 is made valid. When the write-back FIFO 3 receives the FIFO write signal 121, it writes from the cache memory unit 2 to the internal address bus 11
1 and the address and data output to the internal data bus 112 are taken into the internal FIFO memory.

【0064】リプレースが発生した場合には、リプレー
ス時のライトバックがダーティビット部24c内のダー
ティビットのうち有効なダーティビットに対応するブロ
ックに対してのみ行われる。
When replacement occurs, write-back at the time of replacement is performed only on the block corresponding to the effective dirty bit among the dirty bits in the dirty bit portion 24c.

【0065】この場合、まだライトバックFIFO3に
リプレース対象ブロックのライトバックデータが残って
いれば、バス制御部4はライトバックFIFO3から読
出したアドレスの有効性をキャッシュメモリ部2でチェ
ックするため、アドレスライン124を介してキャッシ
ュメモリ部2に送出する。
In this case, if the write-back data of the block to be replaced still remains in the write-back FIFO 3, the bus control unit 4 checks the validity of the address read from the write-back FIFO 3 in the cache memory unit 2. It is sent to the cache memory unit 2 via the line 124.

【0066】キャッシュメモリ部2ではバス制御部4か
らモニタアドレスが入力されるのがリプレース後である
ので、データメモリ21の内容がメインメモリにライト
バックされている。したがって、キャッシュメモリ部2
では対応するバリッドビット部24bのバリッドビット
が無効となっているので、バス制御部4へのアドレス有
効信号122が有効となることはない。
In the cache memory unit 2, since the monitor address is input from the bus control unit 4 after the replacement, the contents of the data memory 21 are written back to the main memory. Therefore, the cache memory unit 2
Then, since the valid bit of the corresponding valid bit section 24b is invalid, the address valid signal 122 to the bus control section 4 is never valid.

【0067】よって、バス制御部4からは該当するライ
トバックのためのリクエストが出力されることはないの
で、ライトバックFIFO3に格納されたライトバック
のためのアドレス及びデータがともに破棄される。これ
によって、リプレース後の不要なライトバックによるメ
インメモリ上のデータへの上書きは防止される。
Therefore, since the corresponding request for write back is not output from the bus control unit 4, both the address and data for write back stored in the write back FIFO 3 are discarded. This prevents overwriting of data in the main memory due to unnecessary writeback after replacement.

【0068】上述した如く、キャッシュメモリのCPU
1が書換えた部分をキャッシュメモリ部2の制御でライ
トバックFIFO3に順次格納しておき、このライトバ
ックFIFO3に格納されたライトバック情報を、バス
制御部4から自装置内の最低優先のリクエストでメイン
メモリにライトバックすることで、メインメモリへのラ
イトバックでシステムバスが無駄に占有されるのを防ぐ
ことができる。
As described above, the CPU of the cache memory
The portion rewritten by 1 is sequentially stored in the write-back FIFO 3 under the control of the cache memory unit 2, and the write-back information stored in this write-back FIFO 3 is sent from the bus control unit 4 to the lowest priority request in its own device. By writing back to the main memory, it is possible to prevent the system bus from being unnecessarily occupied by the writing back to the main memory.

【0069】このように、CPU1が書換えたキャッシ
ュメモリのブロックをライトバックFIFO3に順次格
納しておき、ライトバックFIFO3に格納されたライ
トバック情報を最低優先のリクエストでメインメモリに
ライトバックすることによって、CPU1の動作を停止
させることなく、かつシステムバスを無駄に占有するこ
となく、メインメモリへのライトバックを行うことがで
きる。よって、システムの効率を向上させることがで
き、効率のよいキャッシュメモリシステムを実現するこ
とができる。
As described above, the blocks of the cache memory rewritten by the CPU 1 are sequentially stored in the write-back FIFO 3, and the write-back information stored in the write-back FIFO 3 is written back to the main memory by the lowest priority request. The write back to the main memory can be performed without stopping the operation of the CPU 1 and occupying the system bus unnecessarily. Therefore, the efficiency of the system can be improved, and an efficient cache memory system can be realized.

【0070】[0070]

【発明の効果】以上説明したように本発明によれば、キ
ャッシュメモリ内の主記憶装置にライトバックするデー
タ及びそのアドレスをFIFOに保持しておき、これら
データ及びアドレスをその装置内におけるバス優先度が
最低位のリクエストで主記憶装置にライトバックするこ
とによって、CPUの動作を停止させることなくかつシ
ステムバスを無駄に占有することなく、メインメモリへ
のライトバックを可能とすることができ、システムの効
率を向上させることができるという効果がある。
As described above, according to the present invention, the data to be written back to the main memory device in the cache memory and its address are held in the FIFO, and these data and address are given the bus priority in the device. By writing back to the main storage device at the lowest frequency request, it is possible to write back to the main memory without stopping the operation of the CPU and without wastefully occupying the system bus. There is an effect that the efficiency of the system can be improved.

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

【図1】本発明の一実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】図1のキャッシュメモリ部の構成を示すブロッ
ク図である。
FIG. 2 is a block diagram showing a configuration of a cache memory unit in FIG.

【図3】従来例の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration of a conventional example.

【図4】図3のキャッシュメモリコントローラの構成を
示すブロック図である。
FIG. 4 is a block diagram showing a configuration of a cache memory controller of FIG.

【符号の説明】[Explanation of symbols]

1 CPU 2 キャッシュメモリ部 3 ライトバックFIFO 4 バス制御部 21 データメモリ 22,23 デコーダ 24 ディレクトリ 24a タグ部 24b バリッドビット部 24c ダーティビット部 25 比較器 26 データメモリ制御部 27 ダーティビット検索部 1 CPU 2 cache memory unit 3 write-back FIFO 4 bus control unit 21 data memory 22, 23 decoder 24 directory 24a tag unit 24b valid bit unit 24c dirty bit unit 25 comparator 26 data memory control unit 27 dirty bit search unit

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 書込み動作をキャッシュメモリに対して
のみ行うライトバック方式で制御するキャッシュメモリ
制御回路であって、前記キャッシュメモリ内の主記憶装
置にライトバックするデータ及びそのアドレスを保持す
る保持手段と、前記保持手段に当該データ及びアドレス
が保持されているときに当該データ及びアドレスを前記
主記憶装置にライトバックするためのリクエストをバス
優先度を最低位にして発行する発行手段とを有すること
を特徴とするキャッシュメモリ制御回路。
1. A cache memory control circuit for controlling a write-back operation in which a write operation is performed only to a cache memory, and holding means for holding data to be written back to a main memory device in the cache memory and its address. And an issuing means for issuing a request for writing back the data and address to the main storage device when the data and address are held in the holding means, with the bus priority being the lowest. And a cache memory control circuit.
【請求項2】 前記保持手段は、前記キャッシュメモリ
内の主記憶装置にライトバックするデータ及びそのアド
レスを格納順に出力するファーストインファーストアウ
トメモリからなることを特徴とする請求項1記載のキャ
ッシュメモリ制御回路。
2. The cache memory according to claim 1, wherein the holding means comprises a first-in first-out memory which outputs data to be written back to a main storage device in the cache memory and addresses thereof in a storage order. Control circuit.
【請求項3】 前記発行手段は、前記キャッシュメモリ
内のデータブロックを前記主記憶装置にライトバックす
るリプレース時に前記キャッシュメモリ内で書換えられ
たことを示すダーティビットが有効である前記キャッシ
ュメモリ内のデータを前記保持手段に保持されたデータ
に優先して主記憶装置にライトバックするよう構成され
たことを特徴とする請求項1または請求項2記載のキャ
ッシュメモリ制御回路。
3. The issuing means stores in the cache memory a dirty bit indicating that the data block in the cache memory has been rewritten in the cache memory at the time of replacement for writing back the data block in the cache memory. 3. The cache memory control circuit according to claim 1, wherein the data is written back to the main storage device with priority over the data held in the holding means.
JP6056424A 1994-03-28 1994-03-28 Cache memory control circuit Withdrawn JPH07271669A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6056424A JPH07271669A (en) 1994-03-28 1994-03-28 Cache memory control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6056424A JPH07271669A (en) 1994-03-28 1994-03-28 Cache memory control circuit

Publications (1)

Publication Number Publication Date
JPH07271669A true JPH07271669A (en) 1995-10-20

Family

ID=13026723

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6056424A Withdrawn JPH07271669A (en) 1994-03-28 1994-03-28 Cache memory control circuit

Country Status (1)

Country Link
JP (1) JPH07271669A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106663057A (en) * 2014-08-04 2017-05-10 Arm 有限公司 Write operations to non-volatile memory
US10621103B2 (en) 2017-12-05 2020-04-14 Arm Limited Apparatus and method for handling write operations

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106663057A (en) * 2014-08-04 2017-05-10 Arm 有限公司 Write operations to non-volatile memory
JP2017527023A (en) * 2014-08-04 2017-09-14 エイアールエム リミテッド Write operation to non-volatile memory
US11429532B2 (en) 2014-08-04 2022-08-30 Arm Limited Write operations to non-volatile memory
US10621103B2 (en) 2017-12-05 2020-04-14 Arm Limited Apparatus and method for handling write operations

Similar Documents

Publication Publication Date Title
JP3587591B2 (en) Method of controlling cache miss and computer system thereof
US5353426A (en) Cache miss buffer adapted to satisfy read requests to portions of a cache fill in progress without waiting for the cache fill to complete
US6023747A (en) Method and system for handling conflicts between cache operation requests in a data processing system
JP3352598B2 (en) Microprocessor
US6047357A (en) High speed method for maintaining cache coherency in a multi-level, set associative cache hierarchy
US7546418B2 (en) System and method for managing power consumption and data integrity in a computer system
US20110173400A1 (en) Buffer memory device, memory system, and data transfer method
JPH0342745A (en) Plural cash-memory-access method
US7941608B2 (en) Cache eviction
KR100710922B1 (en) Set-associative cache-management method using parallel reads and serial reads initiated while processor is waited
US6049849A (en) Imprecise method and system for selecting an alternative cache entry for replacement in response to a conflict between cache operation requests
US6477622B1 (en) Simplified writeback handling
US6976130B2 (en) Cache controller unit architecture and applied method
US5619673A (en) Virtual access cache protection bits handling method and apparatus
JPH04336641A (en) Data cache and method for use in processing system
JPH07271669A (en) Cache memory control circuit
JP2011248389A (en) Cache memory and cache memory system
JP2000122929A (en) Information processor
US20060174062A1 (en) Method and system for cache utilization by limiting number of pending cache line requests
JPH06103169A (en) Read data prefetching mechanism for central arithmetic processor
US20080244153A1 (en) Cache systems, computer systems and operating methods thereof
WO1996034339A1 (en) Address tenure control for cache management
JPH05342101A (en) Hierarchical cache memory
JPH0784879A (en) Cache memory device
JPH02224161A (en) Fast data processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010605