JPH01211144A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH01211144A
JPH01211144A JP63037121A JP3712188A JPH01211144A JP H01211144 A JPH01211144 A JP H01211144A JP 63037121 A JP63037121 A JP 63037121A JP 3712188 A JP3712188 A JP 3712188A JP H01211144 A JPH01211144 A JP H01211144A
Authority
JP
Japan
Prior art keywords
data
access
signal
cpu
memory
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
JP63037121A
Other languages
Japanese (ja)
Inventor
Atsushi Kasuya
粕谷 淳
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP63037121A priority Critical patent/JPH01211144A/en
Publication of JPH01211144A publication Critical patent/JPH01211144A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve an information processing speed by outputting the data in a cache to a CPU when a continuous access signal from the CPU is detected and an access address and a tag address are coincident. CONSTITUTION:When a memory access signal 6 comes from a CPU 1, it is judged by a read/write signal 9 whether or not the access is written. When the signal 9 is a reading signal and the access of a CPU is a continuous access signal 6, a tag address corresponding to the entry designated by a bit 2b of an address bus 2 is read to a comparator 14 and it is judged whether or not a cache hit is obtained. When the address of data stored in data memories 12a-12d is continuous while it is a cache hit, coincident to the data of the same address of a main memory, the data of a memory 12a designated by a decoding signal 11a are outputted to the CPU 1. Continuously, the data of memories 12a-12d are all outputted to the CPU 1.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はキャッシュメモリに関するものであり、特に、
キャッシュメモリに対するCPUのアクセスが一部ブロ
ックの連続アクセスである場合に、アドレス比較時間を
短縮して命令の処理速度を向上できるようにしたキャッ
シュメモリ(以下、単にキャッシュという)に関するも
のである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a cache memory, and in particular,
The present invention relates to a cache memory (hereinafter simply referred to as cache) that can shorten address comparison time and improve instruction processing speed when a CPU accesses the cache memory by sequentially accessing some blocks.

(従来の技術) データ処理装置において命令の処理速度を向上させるた
めに、主記憶装置の記憶内容の一部をCPU内部に設け
たキャッシュにコピーし、大部分のメモリ参照をこのキ
ャッシュに対して行うようにする方式が用いられている
(Prior art) In order to improve the processing speed of instructions in a data processing device, a part of the storage contents of the main memory device is copied to a cache provided inside the CPU, and most memory references are directed to this cache. A method is used to do this.

第3図にキャッシュを有する上記データ処理方式のブロ
ック図を・示す。同図において、CPUIはアドレスバ
ス2およびデータバス3によって、該バス2および3に
接続された主記憶装置4およびキャッシュ5をアクセス
する。
FIG. 3 shows a block diagram of the above data processing system having a cache. In the figure, the CPUI uses an address bus 2 and a data bus 3 to access a main memory 4 and a cache 5 connected to the buses 2 and 3.

CPUIが前記バス2および3を介して、主記憶装置4
およびキャッシュ5をアクセスするとき、CPUIから
メモリアクセス信号6がキャッシュ5に出力される。該
アクセス信号で指定されたアドレスと、キャッシュ5の
タグアドレスとが一致(ヒツト)した場合、キャッシュ
5はデータバス2にデータを出力し、アクノリッジ信号
7をアクティブにしてアクセス完了をCPUIに知らせ
る。
The CPU is connected to the main memory 4 via the buses 2 and 3.
When accessing the cache 5, a memory access signal 6 is output from the CPUI to the cache 5. When the address specified by the access signal and the tag address of the cache 5 match (hit), the cache 5 outputs the data to the data bus 2, activates the acknowledge signal 7, and notifies the CPUI of the completion of the access.

一方、CPUIからのアクセスによって要求されたデー
タがキャッシュ5内になかった(ミスヒツト)場合、キ
ャッシュ5は動作信号8を主記憶装置4に出力し、該主
記憶装置4を動作させる。
On the other hand, if the data requested by the access from the CPUI is not found in the cache 5 (miss), the cache 5 outputs an operation signal 8 to the main memory 4 to operate the main memory 4.

主記憶装置4はCPUIからのアクセスに対する動作完
了時にアクノリッジ信号7をアクティブにして、アクセ
ス完了をCPUIおよびキャッシュ5に知らせる。主記
憶装置4およびキャッシュ5に対するCPUIのアクセ
スには、読み出しおよび書き込みがあり、この区別はC
PUIから出力されるリード/ライト信号9によって主
記憶装置4およびキャッシュ5に知らされる。
The main memory device 4 activates the acknowledge signal 7 upon completion of the operation for access from the CPUI, and notifies the CPUI and the cache 5 of the completion of the access. CPUI accesses to the main storage device 4 and cache 5 include reading and writing, and this distinction is
The main storage device 4 and cache 5 are informed by read/write signals 9 output from the PUI.

上記構成のようなデータ処理方式では、一般にCPUの
内部処理速度に比べて、主記憶装置へのアクセス速度は
数倍〜士数倍も遅い。したがって、大部分のメモリ参照
を前記キャッシュに対して行うようにすればCPUのマ
シンサイクルと同等の処理速度が得られる。
In a data processing system such as the above configuration, the access speed to the main storage device is generally several to several times slower than the internal processing speed of the CPU. Therefore, if most memory references are made to the cache, a processing speed equivalent to the machine cycle of the CPU can be obtained.

従来のキャッシュでは、CPUからのアクセスがミスヒ
ツトした場合、上述のようにCPUは主記憶装置から必
要なデータを参照すると同時に、前記必要なデータを含
む数十バイトのデータをキャッシュに転送してキャッシ
ュ内のデータが更新されるようになっている。
In conventional caches, when an access from the CPU misses, the CPU refers to the necessary data from the main memory as described above, and at the same time transfers several tens of bytes of data including the necessary data to the cache. The data within is now updated.

上記データ処理方式において、命令の処理速度を向上さ
せるために、1つの命令が実行されている間に、主記憶
装置4またはキャッシュ5から次のアドレスの命令を取
り込むようにするブリフェッチ機構をCPUIが有して
いる場合がある。さらに処理速度を向上させる制御とし
て、いくつか先の命令まで取り込み、連続するアドレス
のインストラクション・フェッチ(命令の取り込み)、
デコード(命令解読)、実行を同時に行うようにしたパ
イプライン制御とよばれるブリフェッチ機構を有する場
合もある。該データ処理方式では、キャッシュ5に対し
て一定のブロックが連続してアクセスされるようになり
、この場合はCPUIからのメモリアクセス信号6に、
該アクセスが一定ブロックの連続アクセスであることを
表す信号が付加されて出力される。
In the above data processing system, in order to improve the processing speed of instructions, the CPU has a briefetch mechanism that fetches an instruction at the next address from the main memory 4 or cache 5 while one instruction is being executed. You may have one. Furthermore, as a control to improve processing speed, it is possible to fetch instructions several times ahead, instruction fetch (instruction fetch) of consecutive addresses,
It may also have a brief fetch mechanism called pipeline control that allows decoding (instruction decoding) and execution to be performed simultaneously. In this data processing method, a certain block is successively accessed to the cache 5, and in this case, the memory access signal 6 from the CPU
A signal indicating that the access is a continuous access of a certain block is added and output.

(発明が解決しようとする課題) 上記した従来の技術は、次のような問題点を有していた
(Problems to be Solved by the Invention) The above-described conventional technology had the following problems.

上述のブリフェッチ機構、とくに前記バイブライン制御
機構を有するデータ処理方式において、プログラムの実
行中にジャンプ命令がある場合にはブリフェッチされた
命令の処理は中断され、ジャンプ先で改めてブリフェッ
チを行わなければならない。ジャンプ先ではまだ命令が
ブリフェッチされていないので、ジャンプ後にできるだ
け高速で一定の連続する命令がブリフェッチされること
が望ましい。
In a data processing system having the above-mentioned brifetch mechanism, especially the above-mentioned vibe line control mechanism, if there is a jump instruction during program execution, the processing of the briefetched instruction is interrupted, and a briefetch must be performed again at the jump destination. . Since instructions have not yet been pre-fetched at the jump destination, it is desirable that a constant number of consecutive instructions be pre-fetched as quickly as possible after the jump.

ところが従来のキャッシュでは、CPUのアクセス毎に
アドレス比較を行うようにしていたため、アドレス比較
時間によってキャッシュの応答時間が定まってしまい、
処理速度を高速化できないという問題点があった。
However, in conventional caches, addresses are compared every time the CPU accesses, so the response time of the cache is determined by the address comparison time.
There was a problem that the processing speed could not be increased.

本発明は、前述の問題点を解決するためになされたもの
である。
The present invention has been made to solve the above-mentioned problems.

(課題を解決するための手段および作用)前記の問題点
を解決するために本発明は、CPUの一定ブロックの連
続アクセス信号を検出する手段と、該連続アクセス信号
を検出した場合に、最初のメモリサイクルでアクセスア
ドレスおよびタグアドレスの比較を行い、該両アドレス
が一致した場合、前記連続アクセスの2番目以降のメモ
リサイクルでは前記両アドレスの比較を行わないでキャ
ッシュ内デー、夕をCPUに出力するように構成したコ
ントローラとを具備した点に特徴がある。
(Means and Operations for Solving the Problems) In order to solve the above-mentioned problems, the present invention provides means for detecting continuous access signals of a certain block of a CPU, and means for detecting continuous access signals of a certain block of a CPU, The access address and tag address are compared in a memory cycle, and if the two addresses match, in the second and subsequent memory cycles of the continuous access, the data in the cache is output to the CPU without comparing the two addresses. It is characterized in that it is equipped with a controller configured to do so.

上記構成による本発明では、CPUからの一定ブロック
の連続アクセスに対しても、1回だけのアドレス比較に
よってキャッシュ内の連続するデ−タを有効と判断する
ようにしたので、高速に応答することができる。
In the present invention with the above configuration, continuous data in the cache is determined to be valid by comparing addresses only once, even when a certain block is accessed continuously from the CPU, so that a high-speed response can be achieved. Can be done.

(実施例) 以下に図面を参照して、本発明の詳細な説明する。第1
図は本発明の一実施例を示したプロ・ツク図である。同
図において第3図と同一の符号は、同一または同等部分
を表している。
(Example) The present invention will be described in detail below with reference to the drawings. 1st
The figure is a process diagram showing one embodiment of the present invention. In this figure, the same reference numerals as in FIG. 3 represent the same or equivalent parts.

第1図において、キャッジ:L5のメモリ部5aは段数
のエントリに分割されていて、それぞれのエントリは、
4個のデータメモリ12a〜12dと、該データメモリ
12a〜12dのアドレスを保持しているタグメモリ1
0と、該データメモリ12a〜12dのすべてに記憶さ
れているデータのアドレスが連続していて、かつ主記憶
装置4の同アドレスの記憶内容と同一データであること
を示すバリッドビット25を有している。
In FIG. 1, the memory section 5a of the carriage L5 is divided into entries of the number of stages, and each entry is as follows.
Four data memories 12a to 12d and a tag memory 1 holding addresses of the data memories 12a to 12d.
0, and a valid bit 25 indicating that the addresses of data stored in all of the data memories 12a to 12d are consecutive and the data is the same as the data stored at the same address in the main storage device 4. ing.

CPUIからのアドレスバス2は3つに分割され、該ア
ドレスバス2の下位2ビツト2aのデータはブロックデ
コーダ13に入力される。ブロックデコーダ13からの
デコード出力11a〜lidによってデータメモリ12
a〜12dの内の1つのブロックが選択される。アドレ
スバス2の次の上位ビット2bのデータはメモリ部5a
に入力され、該ビット2bのデータによってタグメモリ
10、バリッドビット25およびデータメモリ12a〜
12dのエントリが選択される。アドレスバス2の上位
ビ・レト2Cのデータは比較器14およびゲート15に
人力される。
The address bus 2 from the CPUI is divided into three parts, and the data of the lower two bits 2a of the address bus 2 is input to the block decoder 13. The data memory 12 is decoded by decoding outputs 11a to lid from the block decoder 13.
One block from a to 12d is selected. The data of the next high-order bit 2b of the address bus 2 is stored in the memory section 5a.
The data of bit 2b is input to tag memory 10, valid bit 25 and data memories 12a to 12a.
Entry 12d is selected. The data on the upper bit 2C of the address bus 2 is inputted to the comparator 14 and the gate 15.

タグメモリ10の入出カライン16は比較器14および
ゲート15に接続されていて、比較器14において、前
記ビット2bで選択されたエントリのタグメモリ10内
に保持されているタグアドレスと前記上位ビット2Cの
データとの比較が行われる。比較の結果、上位ビット2
Cのデータとタグアドレスとが一致したとき(以下、キ
ャツシュヒツトという)は、ヒツト信号17がコントロ
ーラ18に出力される。ゲート15はコントローラ18
から出力される制御信号24によって制御され、タグメ
モリ10のデータ更新を行う際に開かれる。
The input/output line 16 of the tag memory 10 is connected to a comparator 14 and a gate 15, and the comparator 14 compares the tag address held in the tag memory 10 of the entry selected by the bit 2b with the upper bit 2C. A comparison is made with the data. As a result of comparison, upper bit 2
When the data in C and the tag address match (hereinafter referred to as a cash hit), a hit signal 17 is output to the controller 18. Gate 15 is controller 18
It is controlled by a control signal 24 output from the tag memory 10 and is opened when data in the tag memory 10 is updated.

データメモリ12a〜12dの入出カライン20はゲー
ト21を介してデータバス3に接続される。データメモ
リ12a〜12dにデータを読み書きする際には、コン
トローラ18からゲート21に該ゲート21の開閉の方
向を制御する制御信号22が出力され、かつデータメモ
リ12a〜12dに読み書きの一方を指定するデータ更
新信号23がそれぞれ出力される。
Input/output lines 20 of data memories 12a-12d are connected to data bus 3 via gates 21. When reading and writing data to the data memories 12a to 12d, the controller 18 outputs a control signal 22 to the gate 21 to control the direction of opening and closing of the gate 21, and designates either reading or writing to the data memories 12a to 12d. Data update signals 23 are output respectively.

さらにコントローラ18には、CPU1からのメモリア
クセス信号6(該信号には一部ブロックあ連続アクセス
をあられす信号も付加される)、リード/ライト信号9
およびブロックデコーダ13からの出力11dが入力さ
れ、一方該コントローラ18からはCPUIに対するア
クノリッジ信号7および主記憶装置4に対する動作要求
信号8が出力される。
Furthermore, the controller 18 receives a memory access signal 6 from the CPU 1 (a signal indicating continuous access to some blocks is also added), a read/write signal 9
and the output 11d from the block decoder 13 are input, while the controller 18 outputs an acknowledge signal 7 to the CPUI and an operation request signal 8 to the main storage device 4.

次に、上記構成による本実施例の動作を図面を参照して
説明する。第2図はコントローラ18の動作を示したフ
ローチャートである。
Next, the operation of this embodiment with the above configuration will be explained with reference to the drawings. FIG. 2 is a flowchart showing the operation of the controller 18.

同図において、まずステップS1でCPUIからメモリ
アクセス信号6が来たか否かの判断がされる。アクセス
がなければ判断は否定となって該ステップS1の処理を
繰り返すが、アクセスがあれば判断は肯定となってステ
ップS2に進む。ステップS2ではリード/ライト信号
9によって前記アクセスが書き込みか否かの判断を行う
。書き込みサイクルであれば、該ステップS2の判断は
肯定となりステップS3に移る。
In the figure, first, in step S1, it is determined whether or not a memory access signal 6 has been received from the CPUI. If there is no access, the determination is negative and the process of step S1 is repeated, but if there is access, the determination is positive and the process proceeds to step S2. In step S2, it is determined based on the read/write signal 9 whether the access is for writing or not. If it is a write cycle, the determination in step S2 is affirmative and the process moves to step S3.

ステップS3では、アドレスバス2のビット2bによっ
て指定されたエントリに対応するタグアドレスが、人出
カライン16を通って比較器14に読み出され、キャツ
シュヒツトか否かが判断される。キャツシュヒツトの場
合はステップS4に進む。ステップS4では、前記バス
下位ビット2bで選択されたエントリのバリッドビット
25を“0゛ (無効化)にする。
In step S3, the tag address corresponding to the entry specified by bit 2b of address bus 2 is read out to comparator 14 through turnout line 16, and it is determined whether or not it is a cash hit. In the case of a hit, the process advances to step S4. In step S4, the valid bit 25 of the entry selected by the bus lower bit 2b is set to "0" (invalidated).

書き込みサイクルでは、主記憶装置4にデータが格納さ
れるだけで、キャッシュ5のデータメモリ12a〜12
dにはデータは記憶されない。したがって、書き込みサ
イクルにおいてキャッシュヒツトした場合には、主記憶
装置4の記憶内容とデータメモリ12a〜12dの記憶
内容が一致しなくなるので、該ステップS4においてバ
リッドビット25が無効化される。
In the write cycle, data is only stored in the main storage device 4, and the data memories 12a to 12 of the cache 5 are
No data is stored in d. Therefore, if there is a cache hit in the write cycle, the stored contents of the main storage device 4 and the stored contents of the data memories 12a to 12d will no longer match, so the valid bit 25 is invalidated in step S4.

バリッドビット25を無効化した後、ステップS5にお
いて、動作信号8を出力して主記憶装置4に動作要求を
行う。主記憶装置4では該動作要求に応答して、CPU
Iから出力されたデータを記憶する。
After invalidating the valid bit 25, in step S5, the operation signal 8 is output to issue an operation request to the main memory device 4. In the main storage device 4, in response to the operation request, the CPU
Stores data output from I.

バス」−位ビット2Cで表されたアドレスと、バス下位
ビット2bで選択されたエントリのタグメモリ10に保
持されている、タグアドレスとがヒツトしなかった場合
(以下、キャッシュミスヒツトという)は、ステップS
3の判断は否定となってステップS4はスキップされ、
ステップS5に移り主記憶装置4に動作要求信号8を出
力する。
If the address represented by bit 2C of the lower bit 2C of the bus does not match the tag address held in the tag memory 10 of the entry selected by the lower bit 2b of the bus (hereinafter referred to as a cache miss), , step S
The determination in step S4 is negative and step S4 is skipped.
Proceeding to step S5, the operation request signal 8 is output to the main storage device 4.

主記憶装置4では該動作要求に応答して、前記キャツシ
ュヒツトの場合と同様、CPUIから出力されたデータ
を取り込む。
In response to the operation request, the main storage device 4 takes in the data output from the CPUI, as in the case of the cash hit.

ステップS6では、CPU1のアクセスが終了したか否
かの判断が行われ、該ステップS6の判断が肯定になれ
ばステップS1に戻る。
In step S6, it is determined whether the access by the CPU 1 has ended or not, and if the determination in step S6 is affirmative, the process returns to step S1.

また、前記ステップS2において、リード/ライト信号
9が読み出し信号であれば、該ステップS2の判断は、
否定となってステップS7に移行する。ステップS7に
おいて、CPU1のアクセスが連続アクセスか否かの判
断が行われる。連続アクセスであるかどうかは信号6に
よって判断され、連続アクセスであれば、該ステップS
7の判断は肯定となってステップS8に進む。
Further, in step S2, if the read/write signal 9 is a read signal, the determination in step S2 is as follows:
If the result is negative, the process moves to step S7. In step S7, it is determined whether the access by the CPU 1 is a continuous access. Whether or not it is a continuous access is determined by the signal 6, and if it is a continuous access, the step S
The determination in step 7 is affirmative and the process advances to step S8.

ステップS8では前記ステップS3と同様に、アドレス
バス2のビット2bによって指定されたエントリに対応
するタグアドレスが入出カライン16を通って比較器1
4に読み出され、キャツシュヒツトか否かが判断される
。キャツシュヒツトであるかどうかは、比較器14から
出力される信号17によって判断され、キャツシュヒツ
トの場合は、該ステップS8の判断ば肯定となり、ステ
ップS9に進む。
In step S8, similarly to step S3, the tag address corresponding to the entry specified by bit 2b of the address bus 2 is passed through the input/output line 16 to the comparator 1.
4, and it is determined whether or not it is a cash hit. Whether or not it is a cash hit is determined by the signal 17 output from the comparator 14. If it is a cash hit, the determination in step S8 is affirmative, and the process proceeds to step S9.

ステップS9では、バリッドビット25が“1“か否か
の判断がおこなわれる。バリッドビット25が“1°、
すなわちデータメモリ12a〜12dに記憶されている
データのアドレスが連続していて、かつ主記憶装置4の
同アドレスのデータと一致していれば該ステップS9の
判断は肯定となってステップSlOに進む。
In step S9, it is determined whether the valid bit 25 is "1". Valid bit 25 is “1°,
That is, if the addresses of the data stored in the data memories 12a to 12d are consecutive and match the data at the same address in the main storage device 4, the determination in step S9 is affirmative and the process proceeds to step SlO. .

ステップS10においては、デコード信号11aで指定
されたデータメモリ12aのデータをCPUIに出力す
る。データがCPUIに出力されると、CPUIに対し
て出力完了を知らせるアクノリッジ信号7が出力される
(ステップ511)。
In step S10, the data in the data memory 12a specified by the decode signal 11a is output to the CPUI. When the data is output to the CPUI, an acknowledge signal 7 notifying completion of output is output to the CPUI (step 511).

ステップS12では、CPUIのアクセスが終了したか
否かの判断が行われ、CPUIのアクセスが終了したな
らば、該ステップS12の判断は肯定になりステップS
13に進む。ステップ813においては、最上位のデコ
ード信号lidが出力されたか否かの判断が行われる。
In step S12, it is determined whether or not the CPUI access has ended, and if the CPUI access has ended, the determination in step S12 is affirmative, and step S
Proceed to step 13. In step 813, it is determined whether the most significant decode signal lid has been output.

すなわち該ステップS13では、連続するメモリアクセ
スにおいて、連続して出力されるデコード信号11a〜
lidの最後の信号lidが出力され、データメモリ1
2a〜12dのデータがすべてCPUIに出力されたか
否かが判断される。該ステップS13の判断が肯定なら
ばステップS1に戻る。まだ最上位デコード信号lid
が出力されていない場合は、該ステップS13の判断は
否定となってステップS14に進む。
That is, in step S13, the decode signals 11a to 11a to 11a to
The last signal lid of lid is output and the data memory 1
It is determined whether all data 2a to 12d have been output to the CPUI. If the determination in step S13 is affirmative, the process returns to step S1. Still the top decode signal lid
If not, the determination in step S13 is negative and the process proceeds to step S14.

ステップ514では、一定の連続するアクセスの、残り
のアクセスがあるまで待機し、アクセスがあれば該ステ
ップS14の判断は肯定となってステップSIOに戻る
。最上位デコード信号lidに応答して、データメモリ
12dのデータが出力されると、ステップS13の判断
は肯定となって上述したようにステップS1に戻る。
In step 514, the process waits until there is a remaining access in the constant series of accesses, and if there is an access, the determination in step S14 becomes affirmative and the process returns to step SIO. When the data in the data memory 12d is output in response to the highest decode signal lid, the determination in step S13 becomes affirmative and the process returns to step S1 as described above.

キャッシュミスヒツトの場合、ヒツト信号17は出力さ
れないのでステップS8の判断は否定となりステップS
15に進む。バリッドビットが“1”でない場合もステ
ップS9の判断は否定となりステップS15に進む。ス
テップS15では、コントローラ18からの制御信号2
4によりゲ−ト15が開かれ、タグメモリ10へ、バス
上位2cのデータが取り込まれタグアドレスが更新され
る。タグアドレスが更新された後、ステップS16にお
いて、主記憶装置4に動作要求信号8が出力される。
In the case of a cache miss, the hit signal 17 is not output, so the determination in step S8 is negative and the process proceeds to step S.
Proceed to step 15. Even if the valid bit is not "1", the determination in step S9 is negative and the process proceeds to step S15. In step S15, the control signal 2 from the controller 18 is
4, the gate 15 is opened, the data on the upper bus 2c is taken into the tag memory 10, and the tag address is updated. After the tag address is updated, the operation request signal 8 is output to the main storage device 4 in step S16.

主記憶装置4は動作要求信号8を受けてCPU1にデー
タを出力し終わると、アクノリッジ信号7を出力する。
When the main storage device 4 receives the operation request signal 8 and finishes outputting data to the CPU 1, it outputs an acknowledge signal 7.

ステップS17ではコントローラ18が前記アクノリッ
ジ信号を検出したか否かの判断が行われ、アクノリッジ
信号が検出されれば該ステップS17の判断は肯定とな
りステップS18に進む。
In step S17, it is determined whether the controller 18 has detected the acknowledge signal, and if the acknowledge signal is detected, the determination in step S17 is affirmative and the process proceeds to step S18.

ステップS1gでは、主記憶装置4からCPU1に出力
されたデータと同データがキャッシュ内のデータメモリ
12aに取り込まれる。
In step S1g, the same data as the data output from the main storage device 4 to the CPU 1 is taken into the data memory 12a in the cache.

ステップS19ではCPUIのアクセスが終了したか否
かの判断が行われ、CPUIのアクセスが終了したなら
ば、該ステップS19の判断は肯定になりステップS2
0に進む。ステップS20においては、最上位のデコー
ド信号lidが出力されたか否かの判断が行われる。す
なわち該ステップS20では、連続するメモリアクセス
において、連続して出力されるデコード信号11a〜l
idの最後の信号lidが出力され、主記憶装置4から
データメモリ12a〜12dにデータがすべて入力さ′
れたか否かが判断される。まだ最上位デコード信号li
dが出力されていない場合は、該ステップS20の判断
は否定となってステップS21に進む。
In step S19, it is determined whether or not the CPUI access has ended, and if the CPUI access has ended, the determination in step S19 is affirmative, and step S2
Go to 0. In step S20, it is determined whether the highest decoded signal lid has been output. That is, in step S20, decode signals 11a to 11a to l that are successively output in consecutive memory accesses are
The last signal lid of id is output, and all data is input from the main storage device 4 to the data memories 12a to 12d.
It is determined whether or not the Still the highest decoded signal li
If d has not been output, the determination at step S20 is negative and the process advances to step S21.

ステップS21では、一定の連続するアクセスの、残り
のアクセスがあるまで待機し、アクセスがあれば該ステ
ップS21の判断は肯定となってステップ816に戻る
。最上位デコード信号lidに応答して、データメモリ
12dのデータが更新されると、ステップS20の判断
は肯定となってステップS22に移る。
In step S21, the process waits until there is a remaining access in a certain number of continuous accesses, and if there is an access, the determination in step S21 becomes affirmative and the process returns to step 816. When the data in the data memory 12d is updated in response to the highest decode signal lid, the determination in step S20 becomes affirmative and the process moves to step S22.

ステップS22では、バリッドビット25を“1”にし
て有効化する。すなわち該バリッドビット25の“1”
はデータメモリ12a〜12dに記憶されているデータ
がすべて更新され、該データのアドレスが連続していて
いて、かつ該データは主記憶装置4の同アドレスの記憶
内容と一致していることを示す。バリッドビット25を
有効化したならばステップS1に戻る。
In step S22, the valid bit 25 is set to "1" to enable it. In other words, the valid bit 25 is “1”
indicates that all of the data stored in the data memories 12a to 12d has been updated, the addresses of the data are consecutive, and the data matches the content stored at the same address in the main storage device 4. . Once the valid bit 25 has been validated, the process returns to step S1.

なお、前記ステップS7において、CPUIからのメモ
リアクセスが連続でないと判断されると、該ステップS
7の判断は否定となってステップS23に移行する。
Note that if it is determined in step S7 that the memory accesses from the CPUI are not continuous, step S7
The determination in step S23 is negative and the process moves to step S23.

ステップS23においては、キャツシュヒツトか否かの
判断が行われる。キャツシュヒツトなら該ステップS2
3の判断は肯定となり、ステップS24に進む。ステッ
プS24ではバリッドビット25が“1”か否かが判断
され、バリッドビット25が“1°ならばステップS2
5に進む。ステップS25ではデコード信号11aで指
定されたデータメモリ12aのデータをCPUIに出力
する。データがCPUIに出力されると、CPU1に対
して出力完了を知らせるアクノリッジ信号7が出力され
る(ステップ526)。
In step S23, it is determined whether or not there is a cash hit. If it is a catch hit, the corresponding step S2
3 is affirmative, and the process advances to step S24. In step S24, it is determined whether the valid bit 25 is "1" or not, and if the valid bit 25 is "1°", step S2
Proceed to step 5. In step S25, the data in the data memory 12a specified by the decode signal 11a is output to the CPUI. When the data is output to the CPUI, an acknowledge signal 7 notifying completion of output is output to the CPU 1 (step 526).

ステップS27では、CPU1のアクセスが終了したか
否かの判断が行われ、CPUIのアクセスが終了したな
らば、該ステップS27の判断は肯定になりステップS
1に戻る。
In step S27, it is determined whether or not the access by the CPU 1 has ended, and if the access by the CPU 1 has ended, the determination in step S27 is affirmative, and step S27 is determined to be positive.
Return to 1.

ステップS23においてキャッシュミスヒツトならば、
該ステップS23の判断は否定となってステップ32g
に移り、コントローラ18から主記憶装置4に動作要求
信号8が出力される。ステップS24において、バリッ
ドビット25が“11でない場合もステップ5211t
に移行する。主記憶装置4は動作要求信号8に応答して
CPUIにデータを出力するが、該非連続アクセスに対
しては、キャッシュ5のデータは更新しない。
If there is a cache miss in step S23,
The judgment in step S23 is negative and the process proceeds to step 32g.
Then, the operation request signal 8 is outputted from the controller 18 to the main storage device 4 . In step S24, even if the valid bit 25 is not "11", step 5211t
to move to. The main memory device 4 outputs data to the CPUI in response to the operation request signal 8, but the data in the cache 5 is not updated in response to the discontinuous access.

本実施例では上述の説明のように、一定ブロック(本実
施例では4ブロツク)の連続するメモリアクセスの際に
、CPUIから出力される、連続アクセスであることを
表す信号を検出して(前記フローチャートステップS7
)、該連続アクセスの最初のメモリアクセスの時だけ、
アドレスバス2の上位2cとタグメモリ10に保持され
ているタグアドレスとを比較する。該比較において、キ
ャッシュヒットであり、さらにデータメモリ12a〜1
2dのデータが連続するアドレスであることを示す、バ
リッドビット25がを効を示している場合(前記フロー
チャートステップS8およびステップS9)には、連続
アクセスの残りのアクセスではタグアドレスの比較を行
わないで、キャッシュ内データを出力するようにしてい
る。
In this embodiment, as described above, when a certain block (4 blocks in this embodiment) is accessed consecutively, a signal indicating continuous access is output from the CPUI and is detected (as described above). Flowchart step S7
), only at the first memory access of the consecutive accesses,
The upper 2c of the address bus 2 and the tag address held in the tag memory 10 are compared. In this comparison, there is a cache hit, and the data memories 12a to 1
If valid bit 25, which indicates that the data in 2d is a continuous address, is valid (steps S8 and S9 in the flowchart above), tag addresses are not compared in the remaining accesses of the continuous accesses. So, I am trying to output the data in the cache.

(発明の効果) 以上の説明から明らかなように、本発明によれば、CP
Uからの連続アクセスの場合のタグアドレスの比較を簡
素化でき、キャッシュからCPUに対して高速で応答で
きるようになった。換言すれば、CPUのアクセス毎に
アドレス比較を行う必要がないのでアドレス比較時間を
短縮できる。
(Effect of the invention) As is clear from the above explanation, according to the present invention, the CP
Comparison of tag addresses in the case of continuous access from U can be simplified, and the cache can now respond to the CPU at high speed. In other words, since it is not necessary to perform address comparison every time the CPU accesses, the address comparison time can be shortened.

したがって、ジャンプ命令後における連続する命令のブ
リフェッチが迅速に行えCPUのプリフェッチ機構が効
果的に機能され、情報処理速度が向上する。
Therefore, the prefetching of consecutive instructions after a jump instruction can be quickly performed, the prefetch mechanism of the CPU can function effectively, and the information processing speed can be improved.

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

第1図は本発明の実施例を示すブロック図、第2図はコ
ントローラの動作を示すフローチャート、第3図はキャ
ッシュを有する情報処理方式のブロック図である。 1・・・CPU、2・・・アドレスバス、3・・・デー
タバス、4・・・主記憶装置、5・・・キャッシュメモ
リ、6・・・連続アクセス信号、7・・・アクノリッジ
信号、8・・・動作要求信号、9・・・リード/ライト
信号、10・・・タグメモリ、12a〜12d・・・デ
ータメモリ、14・・・比較器、18・・・コントロー
ラ代理人 弁理士 平木通人 外18 第   1   図 第  2  図(その1) 第  2  図(その3) 第  3  図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a flow chart showing the operation of a controller, and FIG. 3 is a block diagram of an information processing system having a cache. DESCRIPTION OF SYMBOLS 1...CPU, 2...Address bus, 3...Data bus, 4...Main storage device, 5...Cache memory, 6...Continuous access signal, 7...Acknowledge signal, 8... Operation request signal, 9... Read/write signal, 10... Tag memory, 12a to 12d... Data memory, 14... Comparator, 18... Controller agent Patent attorney Hiraki Figure 1 Figure 2 (Part 1) Figure 2 (Part 3) Figure 3

Claims (1)

【特許請求の範囲】[Claims] (1)1つのタグアドレスに対応して複数のデータメモ
リを有するキャッシュメモリにおいて、CPUから出力
されるメモリアクセスが連続アクセスであるか否かを判
定する手段と、該連続アクセスの最初のメモリサイクル
のキャッシュヒットを検知する手段と、前記複数のデー
タメモリに記憶されているデータのアドレスが連続して
いて、かつ主記憶装置の同アドレスの内容と同データが
記憶されている時に有効を示すバリッドビットと、前記
それぞれの手段によって検知された連続アクセスを示す
信号、キャッシュヒットを示す信号、およびバリッドビ
ットの有効信号を検知した後は、アクセスアドレスとタ
グアドレスの比較を行わないで前記データメモリのデー
タをCPUに出力するコントローラとを具備したことを
特徴とするキャッシュメモリ。
(1) In a cache memory having a plurality of data memories corresponding to one tag address, means for determining whether memory access output from a CPU is continuous access, and the first memory cycle of the continuous access. means for detecting a cache hit; and a valid indicator that indicates validity when the addresses of data stored in the plurality of data memories are consecutive and the same data as the contents of the same address in the main storage device is stored. After detecting the bit, the signal indicating continuous access, the signal indicating cache hit, and the valid signal of the valid bit detected by the respective means, the data memory is read without comparing the access address and the tag address. A cache memory characterized by comprising a controller that outputs data to a CPU.
JP63037121A 1988-02-19 1988-02-19 Cache memory Pending JPH01211144A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63037121A JPH01211144A (en) 1988-02-19 1988-02-19 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63037121A JPH01211144A (en) 1988-02-19 1988-02-19 Cache memory

Publications (1)

Publication Number Publication Date
JPH01211144A true JPH01211144A (en) 1989-08-24

Family

ID=12488770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63037121A Pending JPH01211144A (en) 1988-02-19 1988-02-19 Cache memory

Country Status (1)

Country Link
JP (1) JPH01211144A (en)

Similar Documents

Publication Publication Date Title
US5493666A (en) Memory architecture using page mode writes and single level write buffering
US5479641A (en) Method and apparatus for overlapped timing of cache operations including reading and writing with parity checking
US8117395B1 (en) Multi-stage pipeline for cache access
US20090292857A1 (en) Cache memory unit
JPS63238646A (en) Microprocessor
US5724548A (en) System including processor and cache memory and method of controlling the cache memory
JPH01211144A (en) Cache memory
JPS6022376B2 (en) Cache memory control device
JPH0210450A (en) Prefetch control system for cache memory
JPH04369061A (en) Control system for cache memory
JP2540959B2 (en) Information processing device
JP2542565B2 (en) Branch predictive control method
JPS63101943A (en) Cache move-in control system
JP2580587B2 (en) Address translation buffer
JP2555461B2 (en) Cache memory system
JPS63189943A (en) Branch forecasting control system
JPS5836434B2 (en) Batshua Memory Souch
JP2000259495A (en) Cache memory control method and multiprocessor system
JP2001154845A (en) Memory bus access control system after cache miss
JPS6141019B2 (en)
KR0140952B1 (en) A single cache sharing device in a multiprocessor system and data writing / reading method using the device
JPH03147132A (en) Information processor
JPH01307849A (en) Data access device
JPS6027418B2 (en) Instruction preemption control device
JPH01111245A (en) Cache memory