JPH02217943A - Rapid cache memory - Google Patents
Rapid cache memoryInfo
- Publication number
- JPH02217943A JPH02217943A JP1038241A JP3824189A JPH02217943A JP H02217943 A JPH02217943 A JP H02217943A JP 1038241 A JP1038241 A JP 1038241A JP 3824189 A JP3824189 A JP 3824189A JP H02217943 A JPH02217943 A JP H02217943A
- Authority
- JP
- Japan
- Prior art keywords
- address
- array
- cpu
- data
- write
- 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
Links
- 239000013256 coordination polymer Substances 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
本発明は、特に9183728.17間を短縮させたキ
ャッシュメモリ関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Field of Application) The present invention particularly relates to a cache memory that shortens the time between 9183728.17.
(従来の技術)
一般にキャッシュメモリはCPUと低速な主メモリの間
に設けられて高速のバッフ7メモリの機能を果たす。C
PUが主メモリをリードしたとき、そのアドレスとリー
ドデータをキャッシュメモリに格納しておき、再びCP
Uが同一アドレスをリードしたとき、キャッシュメモリ
に格納したアドレスと比較し、一致した場合は主メモリ
ではなくキャッシュからデータをリードすることにより
CPUの処理を高速化している。(Prior Art) Generally, a cache memory is provided between a CPU and a low-speed main memory and functions as a high-speed buffer memory. C
When the PU reads the main memory, the address and read data are stored in the cache memory, and then the PU reads the main memory.
When U reads the same address, it compares it with the address stored in the cache memory, and if they match, the CPU speeds up the processing by reading the data from the cache instead of from the main memory.
ライトバックは、CPUが主メモリにライトするとき、
実際はキャッシュメモリにだけそのアドレスとデータを
格納しておき、後でまとめてキャッシュメモリから主メ
モリへその内容を移す方式次に従来のキャッシュメモリ
の一例を第2図、第3図に示すブロック図について説明
すると、10はアドレスバスの下位と後述のカウンタ3
0のカウント出力を切り換えるマルチプレクサである。Writeback is when the CPU writes to main memory.
In reality, the address and data are stored only in the cache memory, and the contents are later transferred from the cache memory to the main memory.Next, an example of a conventional cache memory is shown in block diagrams in Figures 2 and 3. To explain, 10 is the lower order of the address bus and counter 3, which will be described later.
This is a multiplexer that switches the count output of 0.
20は、アドレスバスの上位とアドレスアレイ40のア
ドレスタグ出力を切換えるマルチプレクサであり、カウ
ンタ30はライトバック動作時に後述のアドレスアレイ
40とデータアレイ50を走査する。Reference numeral 20 denotes a multiplexer that switches between the upper address bus and the address tag output of the address array 40, and the counter 30 scans the address array 40 and data array 50, which will be described later, during a write-back operation.
アドレスアレイ40はキャッシュメモリの保持している
アドレス及びそのステータスを格納し、RAMで構成さ
れている。The address array 40 stores addresses held in the cache memory and their statuses, and is composed of a RAM.
データアレイ50は、キャッシュメモリの保持している
データを格納し、RAMで構成され、60はアドレスア
レイ40内に格納されているアドレスとアドレスバスの
上位を比較するコンパレータである。70はコントロー
ラであって、マルチプレクサ10.20の切り換え、カ
ウンタ30の動作や、アドレスアレイ40とデータアレ
イ50のリード/ライト、主メモリのアクセス、CPU
への応答動作を制御する。The data array 50 stores data held in the cache memory and is composed of a RAM, and 60 is a comparator that compares the address stored in the address array 40 with the upper address of the address bus. 70 is a controller that controls switching of multiplexers 10 and 20, operation of counter 30, read/write of address array 40 and data array 50, main memory access, and CPU
control response behavior.
あるアドレスのデータがキャッシュメモリにあるという
ことは、そのアドレスの下位に対応するアドレスアレイ
40のアドレスタグ部には、そのアドレスの上位が格納
され、このアドレスをCPUがアクセスしたときはコン
パレータ60の比較結果は一致となる。またこのときの
アドレスの下位に対応するデータアレイ50にはこのと
きのデータが格納され、さらにアドレスアレイ40の対
応するステータス部にはアドレスタグが有効であること
が格納されている。The fact that data at a certain address is in the cache memory means that the upper part of that address is stored in the address tag part of the address array 40 corresponding to the lower part of that address, and when this address is accessed by the CPU, the data of the comparator 60 is stored. The comparison result is a match. Further, the data at this time is stored in the data array 50 corresponding to the lower order of the address at this time, and furthermore, the fact that the address tag is valid is stored in the corresponding status section of the address array 40.
もし、そのアドレスへCP、Uからのライトがあったな
らば、対応するステータス部にはライトがあったことも
格納されている(第3図参照)。If there is a write from CP or U to that address, the corresponding status field also stores that there was a write (see FIG. 3).
次にCPUのアクセス動作について説明すると、はじめ
にアドレスアレイ40はリード動作となっており、CP
Uがアクセスを開始すると、CPUからのアドレスの下
位に対応するアドレスアレイの内容がリードされ、その
アドレスタグ部はCPUからの上位アドレスとコンパレ
ータ60で比較される。この比較結果とリードされたア
ドレスアレイ40のステータス部の状態、すなわちCP
Uがアクセスしたアドレスのデータがあるかどうかとい
うことと、CPUからのライトがあったかどうかという
ことと、CPUのアクセスがリードかライトかによりC
PUの種々の動作が行なわれる。Next, the access operation of the CPU will be explained. First, the address array 40 is in a read operation, and the CPU
When U starts accessing, the contents of the address array corresponding to the lower address from the CPU are read, and the address tag part is compared with the upper address from the CPU by the comparator 60. This comparison result and the state of the status section of the read address array 40, that is, CP
C depends on whether there is data at the address accessed by U, whether there is a write from the CPU, and whether the CPU access is read or write.
Various operations of the PU are performed.
次にキャッシュメモリのライトバック動作について説明
する。Next, the write-back operation of the cache memory will be explained.
アドレスアレイ40とデータアレイ50の内容を走査し
、CPUによりキャッシュメモリがライトされたことが
あった場合は、アドレスタグの内容を主メモリ側の上位
アドレス、カウンタ30のカウント出力を主メモリ側の
下位アドレスとして対応するデータアレイ50の内容を
主メモリヘテイトし、ステータス部はCPUによるキャ
ッシュメモリのライトが無かった状態にライトする。The contents of the address array 40 and data array 50 are scanned, and if the cache memory has been written by the CPU, the contents of the address tag are used as the upper address on the main memory side, and the count output of the counter 30 is used as the upper address on the main memory side. The contents of the data array 50 corresponding to the lower address are transferred to the main memory, and the status section is written to the state in which the cache memory was not written by the CPU.
(発明が解決しようとする課題)
このように従来のキャッシュメモリにおいて、キャッシ
ュメモリから主メモリへのライトバック動作は、ライト
バックの必要のない領域に対しても全て走査しなければ
ならないので、ライトバックの動作時間が長くなりCP
Uの処理速度が低下した。(Problem to be Solved by the Invention) As described above, in the conventional cache memory, when writing back from the cache memory to the main memory, all areas that do not need to be written back must be scanned. Back operation time becomes longer and CP
The processing speed of U has decreased.
本発明はこのような事情により発明されたもので、ライ
トバック動作はCPUがらキャッユメモリへのライトが
あった領域だけを走査して、ライトバック時の動作時間
を低減することを1j的とする。The present invention was invented under these circumstances, and the purpose of the write-back operation is to reduce the operation time during write-back by scanning only the area where the write to the cache memory has been performed from the CPU.
〔発明の構成]
(課題を解決するための手段)
本発明は、CPUのライトアクセスのときのアドレスを
記憶するライトアドレス用記憶メモリを備え、このライ
トアドレス用記憶メモリに記憶されているアドレスにつ
いてのみアドレスアレイ等を走査することを特徴とする
。[Structure of the Invention] (Means for Solving the Problems) The present invention includes a write address storage memory that stores an address at the time of write access by a CPU, and provides information about the addresses stored in the write address storage memory. The feature is that only the address array is scanned.
(作用)
ライトバックのときは、CPUのライトアクセスのみの
アドレスでアドレスアレイ、データアレイを走査するこ
とができる。(Function) During write-back, the address array and data array can be scanned using only write access addresses of the CPU.
(実施例) 次に第1図に示す本発明の一実施例について説明する。(Example) Next, an embodiment of the present invention shown in FIG. 1 will be described.
1はアドレスバスの下位と後述のFIFOメモリ3の出
力を切り換える第1のマルチプレクサ、2はアドレスバ
スの上位と後述のアドレスアレイ4のアドレスタグ出力
を切り換える第2のマルチプレクサである。Reference numeral 1 designates a first multiplexer for switching between the lower order of the address bus and the output of a FIFO memory 3, which will be described later. Reference numeral 2 designates a second multiplexer that switches between the upper order of the address bus and the address tag output of an address array 4, which will be described later.
FIFOメモリ3のデータの人出力は、いわゆるtir
st tn first Out方式を用いてお
り、CPUからライトがあったアドレス、例えば下位ア
ドレスを記憶する。すなわち、CPUのライトアクセス
のときのアドレスをJ己憶するライトアドレス用記憶メ
モリとして、FIFOメモリを用いている。アドレスア
レイ4は、RAMで構成され、キャッシュメモリの保持
しているアドレスをアドレスタグ部に、アドレスタグ部
が有効かどうか、CPUからのライトがあったかどうか
、FIFOメモリ31こアドレスがご己憶されているか
どうかをステータス部に1ataする。The human output of the data in FIFO memory 3 is the so-called tir
It uses the st tn first out method, and stores the address to which the CPU has written, for example, the lower address. That is, a FIFO memory is used as a write address storage memory that stores addresses for write access by the CPU. The address array 4 is composed of a RAM, and stores the address held in the cache memory in the address tag part, whether the address tag part is valid, whether there is a write from the CPU, and the FIFO memory 31 address. 1ata is sent to the status section to indicate whether the
5は、キャッシュメモリの保持しているデータを記憶し
ておくデータアレイで、RAMで構成されている。6は
アドレスアレイ4のアドレスタグ出力とアドレスバスの
上位アドレスとを比較するコンパレータである。Reference numeral 5 denotes a data array for storing data held by the cache memory, and is composed of a RAM. A comparator 6 compares the address tag output of the address array 4 with the upper address of the address bus.
7はコントローラであって、第1のマルチプレクサ11
第2のマルチプレクサ2の切り換えやFIFOメモリ3
の動作、アドレスアレイ4とデータアレイ5のリードお
よびライト、主メモリのアクセス、CPUへの応答動作
等を制御する。7 is a controller, and the first multiplexer 11
Switching of the second multiplexer 2 and FIFO memory 3
, read and write of address array 4 and data array 5, access to main memory, response operation to CPU, etc.
次に本発明の詳細な説明する。Next, the present invention will be explained in detail.
まずCPUのアクセス動作について説明する。First, the access operation of the CPU will be explained.
通常、第1のマルチプレクサ1、第2のマルチプレクサ
2はアドレスバス側が接続されている。Usually, the first multiplexer 1 and the second multiplexer 2 are connected on the address bus side.
はじめの動作は、アドレスアレイ4に対してリード動作
となっており、コンパレータ6の比較値とアドレスアレ
イ4のステータス部の状態及びCPUのアクセスがリー
ドかライトかにより以下58類の動作を行う。The first operation is a read operation for the address array 4, and the following 58 types of operations are performed depending on the comparison value of the comparator 6, the state of the status section of the address array 4, and whether the CPU access is a read or write.
CPUのアクセスがリードでCPUのアクセスしたアド
レスのデータがキャッシュメモリにある場合、コントロ
ーラ7は、そのデータをデータアレイ5からリードし、
リードしたデータをCPUへ伝送する。このとき、アド
レスアレイ4およびデータアレイ5は更新されない。If the CPU access is a read and the data at the address accessed by the CPU is in the cache memory, the controller 7 reads that data from the data array 5,
Transmit the read data to the CPU. At this time, address array 4 and data array 5 are not updated.
CPUのアクセスがリードで、CPUのアクセスしたア
ドレスのデータがキャッシュになく、CPUがアクセス
したキャッシュメモリの領域をCPUがライトしたこと
がない場合、コントローラ7はCPUからのアドレスを
用いて主メモリをリードし、そのリードしたデータをC
PUへ伝送すると共に、そのアドレスに対応するデータ
アレイ5にそのデータをライトし、対応するアドレスア
レイ4のアドレスタグ部にはその時の上位アドレスを、
ステータス部にはアドレスタグが有効であること、その
アドレスがCPUがライトしていないことを3々ライト
する。FIFOメモリ3にアドレスがt己憶されている
かどうかは、そのままであって変更しない。If the CPU access is a read, and the data at the address accessed by the CPU is not in the cache, and the CPU has never written to the cache memory area accessed by the CPU, the controller 7 uses the address from the CPU to read the main memory. Read the read data to C
At the same time as transmitting the data to the PU, the data is written to the data array 5 corresponding to the address, and the upper address at that time is written in the address tag section of the corresponding address array 4.
Three messages are written in the status section to indicate that the address tag is valid and that the CPU has not written to that address. Whether or not the address is stored in the FIFO memory 3 remains unchanged.
CPUのアクセスがリードであって、CPUのアクセス
したアドレスのデータがキャッシュメモリになく、アク
セスしたアドレスに対応するキャッシュメモリのアドレ
スをCPUがライトしたことがある場合、コントローラ
7は第2のマルチプレクサ2をアドレスバスからアドレ
スアレイ4の入力に切り換えてデータアレイ5をリード
し、過去にCPUからライトされたデータを主メモリヘ
ライトする。If the access by the CPU is a read, and the data at the address accessed by the CPU is not in the cache memory, and the CPU has written an address in the cache memory corresponding to the accessed address, the controller 7 sends the data to the second multiplexer 2. is switched from the address bus to the input of the address array 4, the data array 5 is read, and the data previously written by the CPU is written to the main memory.
次にコントローラ7は第2のマルチプレクサ2をアドレ
スバス上位に切り換え、これ以降はCPUのアクセスが
リードでCPUのアクセスしたアドレスのデータがキャ
ッユメモリになく、その領域をCPUがライトしたこと
が無い場合と同様の動作を行なう。Next, the controller 7 switches the second multiplexer 2 to the upper address bus, and from this point on, when the CPU accesses are read, the data at the address accessed by the CPU is not in the cache memory, and the CPU has never written to that area. Perform the same action.
CPUのアクセスがライトで、CPUがアクセスしたア
ドレスのデータがキャッシュメモリにあるか又はそのア
ドレスをCPUがライトしたことがない場合、コントロ
ーラ7はそのライトデータをデータアレイ5にライトし
、その時の上位アドレスをアドレスアレイ4のアドレス
タグ部へライトし、アドレスアレイ4のステータス部に
はアドレスタグが白゛効でCPUからライトがあったこ
とをライトする。If the CPU access is a write and the data at the address accessed by the CPU is in the cache memory or the CPU has never written to that address, the controller 7 writes the write data to the data array 5, and The address is written to the address tag part of the address array 4, and the status part of the address array 4 is written to indicate that the address tag is white and that there has been a write from the CPU.
もし、FIFOメモリ3にその時の下位アドレスバス上
位されていなかった場合は、FIFOメモリ3にそのア
ドレスを、アドレスアレイ4にはFIFOメモリ3にア
ドレスが記憶されたことを各々ライトする。FIFOメ
モリ3にその時の下位アドレスが記憶されているときは
変更しない。If the upper address of the lower address bus at that time is not stored in the FIFO memory 3, the address is written in the FIFO memory 3, and the fact that the address is stored in the FIFO memory 3 is written in the address array 4, respectively. If the lower address at that time is stored in the FIFO memory 3, it is not changed.
CPUのアクセスがライトで、CP Llがアクセスし
たアドレスのデータがキャッシュメモリにない上に、そ
のアドレスをCPUがライトしたことがある場合、コン
トローラ7は第2のマルチプレクサ2をアドレスアレイ
4側に切り換え、データアレイ5をリードして過去にC
PUからライトされたデータを主メモリヘライトする。If the CPU access is a write and the data at the address accessed by the CP Ll is not in the cache memory, and the CPU has written to that address before, the controller 7 switches the second multiplexer 2 to the address array 4 side. , leading data array 5 and past C
Writes data written from PU to main memory.
次に第2マルチプレクサ2をアドレスバス上位に戻し、
CPUのライトデータをデータアレイ4にライトし、C
PUからの上位アドレスをアドレスアレイ4のアドレス
タグ部へ、ステータス部にはアドレスタグが有効でCP
Uからライトがあったことをライトする。Next, return the second multiplexer 2 to the upper address bus,
Write the CPU write data to data array 4, and
The upper address from the PU is sent to the address tag part of address array 4, and the address tag is valid in the status part.
Writes that there was a light from U.
尚、このときFIFOメモリ3の内容は、変更しない。Note that the contents of the FIFO memory 3 are not changed at this time.
次にキャッシュメモリのライトバック動作を説明する。Next, the write-back operation of the cache memory will be explained.
ライトバック動作時において、第1のマルチプレクサ1
、第2のマルチプレクサ2はFIFOメモリ3、アドレ
スアレイ4側に切り換え接続される。During write-back operation, the first multiplexer 1
, the second multiplexer 2 is switched and connected to the FIFO memory 3 and address array 4 side.
コントローラ7の制御により、FIFOメモリ3の出力
に基づいてアドレスアレイ4とデータアレイ5を走査し
、CPUによりキャッシュメモリがライトされたことが
あった場合は、対応するデータアレイ5のデータをアド
レスアレイ4のアドレスタグ部を使って主メモリヘライ
トする。この走査は、FIFOメモリ3が空になるまで
行なわれる。また、主メモリへライトが終了するとき、
アドレスアレイ4のステータス部には、FIFOメモリ
3にアドレスが記憶されてないことをライトする。Under the control of the controller 7, the address array 4 and data array 5 are scanned based on the output of the FIFO memory 3, and if the cache memory has been written by the CPU, the data in the corresponding data array 5 is scanned from the address array. Write to the main memory using address tag section 4. This scanning is performed until the FIFO memory 3 becomes empty. Also, when writing to main memory ends,
A message indicating that no address is stored in the FIFO memory 3 is written in the status section of the address array 4.
このように、本発明はCPUからのライトがあった下位
アドレスをFIFOメモリ3に記憶しておき、FIFO
メモリ3に記憶されたアドレスのみに対応するアドレス
アレイ4、データアレイ5を走査することになる。In this way, the present invention stores the lower address to which the CPU has written in the FIFO memory 3, and
The address array 4 and data array 5 corresponding to only the addresses stored in the memory 3 are scanned.
[発明の効果]
この発明によれば、キャッシュメモリのライトバックは
、CPU等からのライトがあったアドレスを記憶してい
るメモリからのアドレスのみについてアドレスアレイ、
データアレイの走査で足りるので、ライトハック動作時
間を大幅に低減することができ、キャッシュメモリの高
速化を図ることができる。[Effects of the Invention] According to the present invention, cache memory write-back is performed using an address array for only addresses from a memory that stores addresses written by a CPU or the like.
Since it is sufficient to scan the data array, the write hack operation time can be significantly reduced and the speed of the cache memory can be increased.
第1図は、本発明の一実施例を示すもので、構成を示す
ブロック図である。第2図、第3因は従来例を示すブロ
ック図である。
データアレイ、6・・・コンパレータ、7・・・コント
ローフOFIG. 1 shows one embodiment of the present invention, and is a block diagram showing the configuration. The third factor in FIG. 2 is a block diagram showing a conventional example. Data array, 6... Comparator, 7... Control O
Claims (1)
記憶しているデータのアドレスを記憶するアドレスアレ
イと、このアドレスアレイからのアドレスとアドレスバ
スからのアドレスとを比較するコンパレータとを備え、
前記コンパレータの比較により前記アドレスアレイから
のアドレスとアドレスバスからのアドレスが一致したと
き、この一致したアドレスに対応するデータアレイのデ
ータを出力するキャッシュメモリにおいて、ライトアク
セスのときのアドレスを記憶するライトアドレス用記憶
メモリと、キャッシュメモリのライトバックの動作のと
きは、このライトアドレス用記憶メモリに記憶されてい
るアドレスについてのみ前記アドレスアレイとデータア
レイを走査するコントローラとを具備したことを特徴と
する高速キャッシュメモリ。A data array that stores data, an address array that stores addresses of data stored in the data array, and a comparator that compares the address from the address array with the address from the address bus,
When the address from the address array and the address from the address bus match as a result of the comparison by the comparator, the cache memory outputs the data of the data array corresponding to the matched address, and the write memory stores the address at the time of write access. The present invention is characterized by comprising an address storage memory and a controller that scans the address array and data array only for addresses stored in the write address storage memory during a write-back operation of the cache memory. Fast cache memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1038241A JPH02217943A (en) | 1989-02-20 | 1989-02-20 | Rapid cache memory |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1038241A JPH02217943A (en) | 1989-02-20 | 1989-02-20 | Rapid cache memory |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02217943A true JPH02217943A (en) | 1990-08-30 |
Family
ID=12519811
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1038241A Pending JPH02217943A (en) | 1989-02-20 | 1989-02-20 | Rapid cache memory |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02217943A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10320274A (en) * | 1997-03-19 | 1998-12-04 | Toshiba Corp | Cache flashing device, computer system provided with the device and recording medium |
-
1989
- 1989-02-20 JP JP1038241A patent/JPH02217943A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10320274A (en) * | 1997-03-19 | 1998-12-04 | Toshiba Corp | Cache flashing device, computer system provided with the device and recording medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2695017B2 (en) | Data transfer method | |
US5293622A (en) | Computer system with input/output cache | |
JPH04308953A (en) | Virtual address computer system | |
JPH02217943A (en) | Rapid cache memory | |
JPS5853075A (en) | Information processor provided with high speed separation buffer | |
JPH09114969A (en) | Image reader | |
JP3238390B2 (en) | Buffer storage device | |
KR100348808B1 (en) | Device for transmitting data between memories | |
KR940001590B1 (en) | Method and device for shortening memory access time in reading and writing | |
JPH09319657A (en) | Processor provided with buffer for reading instruction | |
JPH0447350A (en) | Main storage read/response control | |
JPH0728990A (en) | Graphic memory access circuit | |
KR200216750Y1 (en) | Access Speed Enhancement Device at SCS | |
JPH1069428A (en) | Video display device | |
JPH02226447A (en) | Computer system and memory access therefor | |
JP2000181788A (en) | File managing method for file system | |
JPH03164850A (en) | Direct memory access device | |
JPH10116227A (en) | Write-back control system for cache memory | |
JPH03158962A (en) | Document processor | |
JPH02217944A (en) | Bus monitoring device in cache memory | |
JPS6232828B2 (en) | ||
JPH03210645A (en) | Cache control system | |
JP2003195847A (en) | Graphic processor | |
KR970705116A (en) | A Display Controller Capable of Accessing Graphics Data from a Shared System Memory. | |
JPH0744449A (en) | Graphics memory control circuit |