JPH01118944A - Cache memory controller - Google Patents

Cache memory controller

Info

Publication number
JPH01118944A
JPH01118944A JP62276026A JP27602687A JPH01118944A JP H01118944 A JPH01118944 A JP H01118944A JP 62276026 A JP62276026 A JP 62276026A JP 27602687 A JP27602687 A JP 27602687A JP H01118944 A JPH01118944 A JP H01118944A
Authority
JP
Japan
Prior art keywords
memory
data
cache memory
tag
cache
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
JP62276026A
Other languages
Japanese (ja)
Inventor
Nobutaka Nishigaki
信孝 西垣
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP62276026A priority Critical patent/JPH01118944A/en
Publication of JPH01118944A publication Critical patent/JPH01118944A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To simplify the control logic by always securing the coincidence of contents between a cache memory and a main memory even if a bus master is a CPU or a DMA controller and eliminating the need for the existence of a valid bit of a tag within the cache memory. CONSTITUTION:When a DMA controller 15 serves as a bus master in place of a CPU 11, the controller 15 obtains the necessary data from an input/output device 14 and writes them to a main memory 12 in the next cycle. In this case, the tag memory of a cache memory 13 is checked and the memory 13 is rewritten with new data when an address equal to that of the memory 12 is held by the memory 13. Otherwise no operation is carried out. As a result, the contents of the memory 13 are always coincident with those of the memory 12 even if the bus master is the CPU 11 or the controller 15. Then it is not required to have a valid bit in a tag memory and therefore the control logic is simplified.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明はパーソナルコンビーータに使用して好適なキャ
ッシュメモリ制御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a cache memory control device suitable for use in a personal computer beater.

(従来の技術) キャッジ、メモリは汎用コンピュータやミニコンピユー
タ等でメモリアクセスの高速化の念め使用される方式で
ある。これらのコンピュータでは一般的に第3図に示す
パス構造を採用することが多い。第3図を用い簡単に従
来例を説明する。
(Prior Art) Cage memory is a system used in general-purpose computers, minicomputers, etc. to speed up memory access. These computers generally often employ the path structure shown in FIG. A conventional example will be briefly explained using FIG.

例えばデータ等をハードディスク等入出力デバイス35
から入力する場合1通常DMAコントローラ(DMAC
) j 4を介しメインメモリ33にデータ転送する。
For example, data etc. can be transferred to an input/output device 35 such as a hard disk.
When inputting from 1 Normal DMA controller (DMAC
) j 4 to the main memory 33.

この時CPU 31はこの動作に関与していない。従が
って、キャッシュメモリ32とメインメモリ33の内容
の不一致が生じることがある。
At this time, the CPU 31 is not involved in this operation. Therefore, a mismatch between the contents of the cache memory 32 and the main memory 33 may occur.

(発明が解決しようとする問題点) 上記不具合に対処するため、キャッジ、メモリ中に、デ
ータの有効ピットを用意し、不一致が起きたときに、こ
の有効ビットをクリア、即ち無効とし、読出しを禁止す
る制御を施している。しかし、これらの制御は非常に複
雑でありその制御のロジックは大きく高価なものであっ
た。
(Problem to be Solved by the Invention) In order to deal with the above problem, a valid data pit is prepared in the cache and memory, and when a mismatch occurs, this valid bit is cleared, that is, invalidated, and reading is disabled. Controls are in place to prohibit it. However, these controls are extremely complex, and the control logic is large and expensive.

ところで最近の32ビツトマイクロプロセツサは従来の
8ビツト、16ビツトのマイクロプロセッサに比べ非常
に高速であるためその能力を最大限に引き出すために、
キャッシュメモリを採用することが考えられる。ノ等−
ソナルコンピュータにキャッシュメモリを採用する場合
、上述した様にロジックが複雑且つ大きくなυコストも
上がる。
By the way, recent 32-bit microprocessors are much faster than conventional 8-bit and 16-bit microprocessors, so in order to make the most of their capabilities,
It is possible to use cache memory. etc.
When a cache memory is used in a personal computer, as mentioned above, the logic is complicated and large, which increases the cost.

本発明はこのことに鑑みてなされ次ものであシ、ロジッ
クを簡単で、小さくし、更にコストを下げるためのキャ
ッシュメモリ制御方式を提供することを目的とする。
The present invention has been made in view of this problem, and an object thereof is to provide a cache memory control method that makes the logic simple and small, and further reduces the cost.

[発明の構成コ (問題点を解決するための手段) 本発明はキャッシュメモリがタグの有効ビットを持たず
にキャッシュの動作を簡素化するものであり、CPU及
びDMAコントローラがバスマスタになつてバスとなっ
てパスに接続されるメインメモリ及びキャッシュメモリ
を使用するコンピュータシステムにおいて上記メインメ
モリのデータの一部写しを記憶するデータメモリとタグ
情報を記憶するタグメモリと、上記メモリ使用デバイス
により生成声れるアドレスに従がいタグ情報を比較する
コンミ4レー夕と、上記バスマスタになつてバスがいず
れであってもデータ書込み時にタグメモリの内容を調べ
、キャッジ、メモリ中にメインメモリと同じアドレスが
保持されているなら新データに書替え、否のときキャッ
ジ、メそすに対しノーオペレーションの実行指示を行な
うキャッジ、メモリ制御回路とを備え次ものである。
[Structure of the Invention (Means for Solving Problems)] The present invention simplifies the cache operation by making the cache memory do not have a valid tag bit, and the CPU and DMA controller become the bus masters to control the bus. In a computer system that uses a main memory and a cache memory that are connected to a path, a data memory that stores a copy of a portion of the data in the main memory, a tag memory that stores tag information, and a voice generated by the device that uses the memory. The controller compares the tag information according to the address that is sent, and the controller becomes the bus master and checks the contents of the tag memory when writing data, regardless of which bus it is. It is equipped with a memory control circuit and a cache which instructs the memory controller to rewrite the data with new data if it has been, and to instruct the memory controller to perform a no-operation if it has not.

(作用) 上記構成においてCPUがバスマスタになつてバスとな
ったときCPUはアドレスバスにアドレスを出力し制御
パスにリードのスティタスを出力する。最初、キャッジ
、メモリが動作し、ヒツトであればキャッジ、メモリか
らデータをリードしメインメモリからはリードしない。
(Function) In the above configuration, when the CPU becomes a bus master and becomes a bus, the CPU outputs an address to the address bus and a read status to the control path. At first, the cache and memory operate, and if it is a hit, data is read from the cache and memory but not from the main memory.

ミスであればキャッジ、メモリからリードせず更にキャ
ッシュメモリの内容も更新する。DMAコントローラが
バスマスタになつてバスの時はまず、DMAコントロー
ラが必要データを入出力デバイスから得、次のサイクル
でメインメモリにライトする。この時、キャッシュメモ
リ中のタグメモリを調ベキャッシュメモリ中にメインメ
モリと同じアドレスが保持されているならば新しいデー
タで書替え、そりでなければノーオペレーションを実行
する。
If it is a miss, the contents of the cache memory are updated without reading from the cache memory. When the DMA controller becomes the bus master and uses the bus, the DMA controller first obtains necessary data from the input/output device and writes it to the main memory in the next cycle. At this time, the tag memory in the cache memory is checked, and if the same address as the main memory is held in the cache memory, it is rewritten with new data, and if it is not warped, a no-operation is executed.

このことにより、バスマスタになつてバスがCPUであ
ろうとDMAコントローラであろうとキャッシュメモリ
の内容はメインメモリと常に一致し、タグメモリ中に有
効ビットを持つ必要がなくなるため、制御が簡単化され
、更に周辺ハードウェアの削減がはがれる。
As a result, the contents of the cache memory always match the main memory regardless of whether the bus is the CPU or the DMA controller when the bus becomes the bus master, and there is no need to have a valid bit in the tag memory, which simplifies control. Furthermore, peripheral hardware can be reduced.

(実施例) 以下図面を使用して本発明実施例について詳細に説明す
る。第1図は本発明の実施例を示すブロック図である。
(Example) Examples of the present invention will be described in detail below using the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention.

図において、11は全体の処理を行うCPU、12はプ
ログラムやデータを蓄えるメインメモリ、13はCPU
 11のメインメモリ33へのアクセスを高速化するた
めのキャッシュメモリである。14はプログラムやデー
タをやりとりする入出力デバイスであり、15はこの入
出力デバイス14とメインメモリ12との間のDMA転
送を行う次めのDMAコントローラ(DMAC)である
In the figure, 11 is a CPU that performs overall processing, 12 is a main memory that stores programs and data, and 13 is a CPU.
This is a cache memory for speeding up access to the main memory 33 of No. 11. 14 is an input/output device that exchanges programs and data, and 15 is a next DMA controller (DMAC) that performs DMA transfer between this input/output device 14 and the main memory 12.

16は上述した各構成要素11〜15を共通接続するパ
スである。本発明にて使用されるキャッジ、メモリ13
はダイレクトマツプ方式で書き込み制御がライトスルー
で使用されるものとする。キャッシュメモリ13の内部
構成は第2図に示される。
Reference numeral 16 denotes a path that commonly connects each of the above-mentioned components 11 to 15. Cage and memory 13 used in the present invention
It is assumed that the direct map method is used and the write control is write-through. The internal configuration of cache memory 13 is shown in FIG.

131は、タグアドレス格納するタグ用RAM。131 is a tag RAM for storing tag addresses.

132はキャッジ、されたデータを格納するためのデー
タ用RAMである。133は、タグの内容を書き換える
ときにアドレスバスのタグフィールドをタグ用RAM 
Z 31に通すためのバッファ、134は、キャッシュ
メモリのデータがヒツトしているか否かを判定するコン
トロ−ラである。又、135−はキャツシュメモリ13
全体OR@ad/Wrl toを制御する制御回路であ
る。
132 is a data RAM for storing cached data. 133 stores the tag field of the address bus in the tag RAM when rewriting the tag contents.
A buffer 134 for passing the data to the Z 31 is a controller that determines whether data in the cache memory is hit or not. In addition, 135- is the cash memory 13
This is a control circuit that controls the entire OR@ad/Wrl to.

尚21はキャッシュメモリ13のヒツトミスを判定スる
ためのアドレスバス中のタグフィールド、22はタグ用
RAM 131、データ用RAM 132のアドレスと
して入力されるアドレスバスの中のインデックスフィー
ルド、231rl、ヤヤツシュされたデータを流すため
のデータバス、24はタグ用RAM Z 31に読み書
きされるタグデータ、25はコンパレータ134から出
力されるヒツト信号、26はタグ用RAM Z 31、
データ用RAM 132、そしてコンパレータ134を
制御するための制御信号がそれぞれ伝播する信号線であ
る。
21 is a tag field in the address bus for determining a hit/miss in the cache memory 13; 22 is an index field in the address bus input as the address of the tag RAM 131 and the data RAM 132; 231rl; 24 is tag data read/written to/from the tag RAM Z 31; 25 is a hit signal output from the comparator 134; 26 is the tag RAM Z 31;
These are signal lines through which control signals for controlling the data RAM 132 and the comparator 134 are propagated.

以下本発明実施例の動作について詳細に説明する。まず
、CPU 11がバスマスタになつてバスのときについ
て説明すると、例えばメインメモリ12からリードする
とき、CPU 11は、アドレスバスにアドレスを出力
し、制御パスにメモリリードのステータスを出力する。
The operation of the embodiment of the present invention will be explained in detail below. First, when the CPU 11 becomes the bus master and reads from the main memory 12, for example, when reading from the main memory 12, the CPU 11 outputs an address to the address bus and outputs the memory read status to the control path.

初めにキャッシュメモリ13が動作し、ヒツトであれば
、キャッシュメモリ13からデータをリードし、メイン
メモリ12からはリードしない。もし、ミスであればキ
ャッシュメモリドし、更に、キャッシュメモリ13の内
容も更新する。
First, the cache memory 13 operates, and if it is a hit, data is read from the cache memory 13 but not from the main memory 12. If there is a mistake, the data is stored in the cache memory, and the contents of the cache memory 13 are also updated.

?KK、DMAコントローラ15がバスマスタになつて
バスのときについて説明する。例えば、入出力デバイス
14からデータをリードしメインメモリ12に転送する
とき、DMAコントローラは必要データを入出力デバイ
ス14からリードする。
? KK, the case where the DMA controller 15 becomes the bus master and uses the bus will be explained. For example, when reading data from the input/output device 14 and transferring it to the main memory 12, the DMA controller reads the necessary data from the input/output device 14.

そして、それと同時に、または−度リードデータをDM
Aコントローラ15が保持してから次のサイクルに、メ
インメモリ12にライトする。このとき、キャッシュメ
モリ13にメインメモリ12と同じアドレスが保持され
ているならば新しいデータで書き変え、そうでなければ
、キャッシュメモリ13に対しては何もしない。以上の
ようにバスマスタになつてバスが、CPU11であって
も、DMAコントローラ15であってもキャッシュメモ
リ13の内容は常にメインメモリ12と一致している。
At the same time, or DM the read data.
After being held by the A controller 15, it is written to the main memory 12 in the next cycle. At this time, if the cache memory 13 holds the same address as the main memory 12, it is rewritten with new data; otherwise, nothing is done to the cache memory 13. As described above, the contents of the cache memory 13 always match those of the main memory 12, whether the bus is the CPU 11 or the DMA controller 15, which becomes the bus master.

次に、第2図を用い上述したキャッシュメモリ13の詳
細動作について説明する。動作にはリードとライト、そ
してヒツトとミスの組み合せで4通シの場合がある。ま
ずリードでヒツトのときについてのみ説明する。アドレ
スが入力されるとインデックスフィールド22の部分は
タグ用RAM131に入力され、ここでタグデータが出
力され、コン・母レータ134に入力されあらかじめ入
力されていたアドレスのタグフィールド21と比較され
る。ここで一致が確認されるとヒツトとみなされ、デー
タ用RAM 132からデータがデータバス23上に出
力される。このデータをCPU I Z等のバスマスタ
になつてバスがリードする。
Next, the detailed operation of the cache memory 13 described above will be explained using FIG. 2. There are cases where there are four operations, a combination of read and write, and hits and misses. First, we will only explain when the lead is a hit. When an address is input, the index field 22 is input to the tag RAM 131, where the tag data is output, input to the controller 134, and compared with the tag field 21 of the address previously input. If a match is confirmed here, it is regarded as a hit, and data is output from the data RAM 132 onto the data bus 23. This data is read by a bus such as CPU IZ which becomes a bus master.

次にリードでミスのときについて説明する。コンバレー
p134で比較するところまでは上述したリードでヒツ
トのときと同様である。コンパレータ134で比較され
、一致していなければミスとみなされ、キャッシュメモ
リ13は動作を中断しメインメモリ12にミスであるこ
とを知らせ、メインメモリ12からのデータがデータバ
ス23上に出力されるのを待つ。データが出力されたと
きデータ用RAM 132には、そのデータが書き込ま
れ、更に、タグ用RAM 1j 1には、バッファ13
3を通して、アドレスバスのタグフィールド21の情報
が書き込まれる。次にライトでヒツトのときについて説
明する。同様に、コンパレータ134でタグが比較され
、一致していれば、ヒツトとみなされ、データバス23
上のデータがデータ用RAM 132に書き込まれる。
Next, I will explain what happens when you make a mistake on the lead. Up to the point where the comparison is made using the combo barre p134, it is the same as when using the lead and the hit described above. They are compared by the comparator 134, and if they do not match, it is considered a miss, the cache memory 13 interrupts its operation, notifies the main memory 12 that there is a miss, and the data from the main memory 12 is output onto the data bus 23. wait for. When data is output, the data is written to the data RAM 132, and furthermore, the tag RAM 1j 1 is written to the buffer 13.
3, the information in the tag field 21 of the address bus is written. Next, I will explain what happens when the light is hit. Similarly, the comparator 134 compares the tags, and if they match, it is considered a hit and the data bus 23
The above data is written to the data RAM 132.

最後に、ライトでミスのときについて説明する。Finally, I will explain what happens when you make a mistake in the right field.

Mmに、コンパレータ134でタグが比較され、一致し
ていなければミスとみなされ、タグ用RAM131もデ
ータ用RAM 132も書き込まれずに動作を終了する
◇ 以上説明の様に、本発明では、キャッシュメモリがタグ
の有効ピットを持たずにキャッシュの動作の簡素化して
いる。
The comparator 134 compares the tags in Mm, and if they do not match, it is considered a miss, and the operation ends without writing to either the tag RAM 131 or the data RAM 132 ◇ As explained above, in the present invention, the cache memory There is a simplification of cache behavior without having tags enabled.

[発明の効果] 以上説明の様に本発明に従えばDMAコントローラがバ
スマスタになつてバスであってもキャッシュメモリとメ
インメモリの間でデータの不一致が起こることなく、キ
ャッシュメモリ内にタグの有効ビラトラ持つ必要がなく
なシ制御のロジックが簡潔になり、ロジック量も小さく
できる。更にそれによりコストの低減化をはかることが
できる。上記の効果により、高速なマイクロプロセッサ
を使用し次パーソナルコンピュータにも比較的安価で容
易にキャッシュメモリを組み込むことができる。
[Effects of the Invention] As explained above, according to the present invention, the DMA controller becomes the bus master, and even if the DMA controller is a bus, there will be no data mismatch between the cache memory and the main memory, and the tags will be valid in the cache memory. There is no need to have a built-in controller, the control logic becomes simpler, and the amount of logic can be reduced. Furthermore, it is possible to reduce costs. As a result of the above effects, a cache memory can be easily incorporated into a personal computer using a high-speed microprocessor at a relatively low cost.

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

第1図は本発明の実施例を示すブロック図、第2図は第
1図中のキャッシュメそり周辺部分を詳細に示すブロッ
ク図、第3図は従来例を示すブロック図である。 11・・・CPU、12・・・メインメモリ、13・・
・キャッシュメモリ、14・・・入出力デバイス、15
・・・DMAコントローラ、131・・・タグ用メモリ
、132・・・データ用メモリ、133・・・バッファ
、134・・・コン/4’レータ、135・・・キャッ
シュメモIJ 制御回路。 出願人代理人  弁理士 鈴 江 武 彦第1図 第3図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram showing details of the peripheral portion of the cache memory in FIG. 1, and FIG. 3 is a block diagram showing a conventional example. 11...CPU, 12...Main memory, 13...
・Cache memory, 14... Input/output device, 15
...DMA controller, 131...tag memory, 132...data memory, 133...buffer, 134...con/4'lator, 135...cache memo IJ control circuit. Applicant's representative Patent attorney Takehiko Suzue Figure 1 Figure 3

Claims (1)

【特許請求の範囲】[Claims] CPU及びDMAコントローラがバスマスタになってバ
スに接続されるメインメモリ及びキャッシュメモリを使
用するコンピュータシステムにおいて、上記メインメモ
リのデータの一部写しを記憶するデータメモリと、タグ
情報を記憶するタグメモリと、上記メモリ使用デバイス
により生成されるアドレスに従がいタグ情報を比較する
コンパレータと、上記バスマスタがいずれであってもデ
ータ書込み時にタグメモリの内容を調べ、キャッシュメ
モリ中にメインメモリと同じアドレスが保持されている
なら新データに書換え、否のときキャッシュメモリに対
しノーオペレーションの実行指示を行なうキャッシュメ
モリ制御回路とを具備することを特徴とするキャッシュ
メモリ制御装置。
In a computer system that uses a main memory and a cache memory in which a CPU and a DMA controller are bus masters and are connected to a bus, there is provided a data memory that stores a copy of a portion of the data in the main memory, and a tag memory that stores tag information. , a comparator that compares tag information according to the address generated by the memory-using device mentioned above, and a comparator that checks the contents of the tag memory when writing data regardless of the bus master mentioned above, and maintains the same address in the cache memory as the main memory. 1. A cache memory control device comprising: a cache memory control circuit that rewrites the cache memory with new data if the data has been processed, and instructs the cache memory to perform a no-operation if the data has not been processed.
JP62276026A 1987-10-31 1987-10-31 Cache memory controller Pending JPH01118944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62276026A JPH01118944A (en) 1987-10-31 1987-10-31 Cache memory controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62276026A JPH01118944A (en) 1987-10-31 1987-10-31 Cache memory controller

Publications (1)

Publication Number Publication Date
JPH01118944A true JPH01118944A (en) 1989-05-11

Family

ID=17563760

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62276026A Pending JPH01118944A (en) 1987-10-31 1987-10-31 Cache memory controller

Country Status (1)

Country Link
JP (1) JPH01118944A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105090A (en) * 1993-09-20 1995-04-21 Internatl Business Mach Corp <Ibm> Asynchronous dma cache

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07105090A (en) * 1993-09-20 1995-04-21 Internatl Business Mach Corp <Ibm> Asynchronous dma cache

Similar Documents

Publication Publication Date Title
JPH0668735B2 (en) Cache memory
JP2695017B2 (en) Data transfer method
JP2818415B2 (en) Buffer storage device
EP0579418A2 (en) Computer system maintaining data consistency between the cache and the main memory
JPS60124754A (en) Buffer storage control system
WO1997004392A1 (en) Shared cache memory device
JPH01118944A (en) Cache memory controller
JPS60237553A (en) Cash coherence system
KR100251784B1 (en) Method and apparatus for providing a readable and writable cache tag memory
JP3006204B2 (en) Information processing device
JPH02110646A (en) Pre-readout device for memory
JPH03172943A (en) Cache memory control system
JPH04195563A (en) Controller for memory system
JPS63240651A (en) Cache memory
JPS6135583B2 (en)
US8230173B2 (en) Cache memory system, data processing apparatus, and storage apparatus
JPH02259945A (en) Storing processing system
JPH10207773A (en) Bus connecting device
JPH0448263B2 (en)
JPH08272687A (en) Input/output cache memory
JPH04352047A (en) Method and device for controlling address conversion
JPH0740245B2 (en) Memory interference detector
JPH05265916A (en) Data processor
JPS60123944A (en) Buffer memory controlling system of information processor
JPH01316850A (en) Cache memory system