JPS6389951A - Cache memory device - Google Patents

Cache memory device

Info

Publication number
JPS6389951A
JPS6389951A JP61236468A JP23646886A JPS6389951A JP S6389951 A JPS6389951 A JP S6389951A JP 61236468 A JP61236468 A JP 61236468A JP 23646886 A JP23646886 A JP 23646886A JP S6389951 A JPS6389951 A JP S6389951A
Authority
JP
Japan
Prior art keywords
bank
cache
cache memory
memory
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP61236468A
Other languages
Japanese (ja)
Inventor
Masaki Arima
有馬 正木
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP61236468A priority Critical patent/JPS6389951A/en
Publication of JPS6389951A publication Critical patent/JPS6389951A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To prevent the delay of accessing from being generated, by making a cache memory into a bank, estimating the mis-caching of the bank to which a CPU is accessing, and switching the bank when the mis-caching is generated. CONSTITUTION:The CPU10, when the mis-caching of a cache memory bank 12a being generated, interrupts the accessing, and outputs control signals CMa and CCb of H levels respectively to two-way buffers 13b and 14b. Also, it outputs control signals CMb and CCa of L levels respectively to two-way buffers 13b and 14a. Therefore, the data bus DBb of a memory bank 12b is separated from a main member 11, and is connected to the CPU10 through the buffer 14b. Meanwhile, the data bus DBa of the memory bank 12a is separated from the CPU10, and is connected to the main memory 11 through the buffer 13a, and the CPU10 accesses to the memory bank 12b. Similarly, by estimating the mis-caching of the bank memory 12b, it is switched to the memory bank 12a if the mis-caching is generated.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、CPU応用装置においてメモリアクセスの高
速化を図るキャッシュメモリ装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a cache memory device for speeding up memory access in a CPU application device.

従来の技術 従来のキャッシュメモリ装置は、第3図1に示すように
、通常の動作状態では、CPU lがら双方2 ヘ一/ 向バッファ2aに対するコントロール信号CCかハイレ
ベル、CPU1から双方向ノくソファ2bVc対スルコ
ントロール信号CHがローレベルでアリ、双方向バッフ
ァ2aがイネーブル状態、双方向ノくッファ2bがディ
スエーブル状態である。
2. Description of the Related Art As shown in FIG. 3, in a conventional cache memory device, in a normal operating state, a control signal CC from the CPU 1 to the buffer 2a is at a high level, and a control signal CC from the CPU 1 to the buffer 2a is at a high level. The sofa 2bVc control signal CH is at a low level, the bidirectional buffer 2a is enabled, and the bidirectional buffer 2b is disabled.

したがって、キャッシュメモリ3にM続きれた。Therefore, the cache memory 3 was followed by M.

データバスDBは、双方向ノ;ツファ2aを介してCP
U 1に接続されてるとともに双方向ノ(ツファ2bに
接続された主メモリ4とは切り離されており、CPU 
1は双方向バッファ2aを介してキャッシュメモリ3に
アクセスする。
The data bus DB is bidirectional;
The CPU
1 accesses the cache memory 3 via the bidirectional buffer 2a.

他方、キャッシュミスが発生するとCPU1&t、キャ
ッシュメモリ3に対するアクセスを中断して双方向バッ
ファ2bに対ずろコントロール信号CHをハイレベル、
双方向)<ツファ2aに対スるコントロール信号CC’
5’ OV ヘ/l/ K ス;’;r。
On the other hand, when a cache miss occurs, the CPUs 1 & t interrupt access to the cache memory 3 and set the zero control signal CH to the bidirectional buffer 2b at a high level.
Bidirectional)<Control signal CC' for Tufa 2a
5' OV He/l/K S;';r.

したがって、キャッシュメモリ3からのデータバスDB
は、CPU 1から切り離されて双方向ノくッファ2b
を介して主メモリ4に接続され、メモリ転送制御回路5
が主メモリ4の必要なデータと3 ベージ キャッシュメモリ3の不用なデータとを交換する。
Therefore, data bus DB from cache memory 3
is separated from CPU 1 and becomes bidirectional buffer 2b.
is connected to the main memory 4 via the memory transfer control circuit 5.
exchanges necessary data in main memory 4 with unnecessary data in base cache memory 3.

データ交換が完了するとcpu iは、双方向バッファ
2aに対するコントロール信号CCをハイレベル、双方
向バッファ2bに対するコントロール信号CHをローレ
ベルにし、キャッシュメモリ3に対するアクセスを再開
する。
When the data exchange is completed, the CPU i sets the control signal CC for the bidirectional buffer 2a at a high level and the control signal CH for the bidirectional buffer 2b at a low level, and resumes accessing the cache memory 3.

発明が解決しようとする問題点 しかしながら、かかる構成にあっては、キャッジ−ミス
が発生すると、主メモリ4の必要なデータとキャッシュ
メモリ3の不用なデータとの交換のために、CPUIは
実行を中断しなければならず、したがってアクセス遅延
が生ずるという問題点がある。
Problems to be Solved by the Invention However, in such a configuration, when a cache miss occurs, the CPU is forced to stop execution in order to exchange necessary data in the main memory 4 with unnecessary data in the cache memory 3. There is a problem in that the access has to be interrupted, resulting in access delay.

本発明は上記問題点に鑑み、キャッシュミスが生じても
アクセス遅延が生ずることがないキャッシュメモリ装置
を提供することを目的とする。
SUMMARY OF THE INVENTION In view of the above problems, it is an object of the present invention to provide a cache memory device that does not cause access delay even if a cache miss occurs.

問題点を解決するための手段 本発明は上記問題点を解決するために、キャッシュメモ
リをバンク化するとともに、CPUがアクセスしている
バンクのキャッシュミスを予測し、キャッシュミスが発
生した場合にバンクを切り換えるようにしたことを特徴
とする。
Means for Solving the Problems In order to solve the above-mentioned problems, the present invention divides the cache memory into banks, predicts a cache miss in the bank being accessed by the CPU, and updates the bank when a cache miss occurs. It is characterized by being able to switch between.

作    用 本発明は上記構成により、CPUは現在アクセスしてい
るバンクにキャッシュミスが発生しても他のバンクにア
、クセスずろことができ、したがってアクセス遅延が生
ずることがない。
Operation According to the above configuration, the CPU can shift the access to another bank even if a cache miss occurs in the currently accessed bank, so that no access delay occurs.

実施例 以下、図面を参照して本発明の実施例を説明する。第1
図は、本発明に係るキャッシュメモリ装置の一実施例を
示すブロック図、第2図は、第1図のキャッシュミス予
測制御回路のより詳細なブロック図である。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. 1st
1 is a block diagram showing an embodiment of the cache memory device according to the present invention, and FIG. 2 is a more detailed block diagram of the cache miss prediction control circuit of FIG. 1.

第1図に16いて、このキャッシュメモリ装置は、CP
Ul0と、主メモリ11と、それぞれCPUl0が主メ
モリ11に対するアクセス時間を短縮するためのキャッ
シュメモリバンク12a、12bと、キャッシュミス発
生時に主メモリ11の必要なデータとキャッシュメモリ
バンク13a、13bの不用なデータをそれぞれ一時記
憶する双方向バ5 ベージ ッファ13a、13bと、キャッシュミスが発生してい
ない通常状態でCPU15とキャッシュメモリバンク1
2a、12bとの間のデータをそれぞれ一時記憶する双
方向バッファ14a、14bと、CPUl0Kよりアク
セスされているキャッシュメモリバンク12g又は12
bに対してキャッシュミス発生の予測を行い、その結果
を基に他方のアクセスされていないキャッシュメモリバ
ンク12b又は12a内の不用なデータと主メモリ11
内の必要なデータとの交換を行うキャッシュメモリ予測
制御回路15より概略構成されている。
16 in FIG. 1, this cache memory device has a CP
Ul0, main memory 11, cache memory banks 12a and 12b for shortening the access time for CPUl0 to main memory 11, and unnecessary data of main memory 11 and cache memory banks 13a and 13b when a cache miss occurs. bidirectional buffers 13a and 13b that temporarily store data, and the CPU 15 and cache memory bank 1 in a normal state where no cache miss occurs.
bidirectional buffers 14a and 14b that temporarily store data between the CPU 2a and 12b, and the cache memory bank 12g or 12 that is accessed by the CPUl0K.
A cache miss occurrence is predicted for b, and based on the result, unnecessary data in the other unaccessed cache memory bank 12b or 12a and the main memory 11 are predicted.
It is generally composed of a cache memory prediction control circuit 15 that exchanges necessary data within the cache memory.

キャッシュメモリ予測制御回路15は第2図に示すよう
に、過去の分岐命令により分岐したときの最新の分岐命
令のアドレスと分岐先のアドレスとが記憶された分岐予
測テーブル15aと、主メモリ11のどのデータがキャ
ッシュメモリバンク12a、12b内に記憶されている
かを示すアドレス範囲が記憶されたキャッジ−アドレス
テーブル15bと、分岐予測テーブル15aのデータと
キャッシュアドレステーブル15bのデータとを比6 
ペー〉′ 較し、分岐予測アドレスを出力する比較器15cと、比
較器15cがらの分岐予測アドレス如より主メモリ11
のデータをキャッシュメモリバンク12a、12bに転
送するメモリ転送制御回路15dより構成されている。
As shown in FIG. 2, the cache memory prediction control circuit 15 stores a branch prediction table 15a in which the address of the latest branch instruction and the address of the branch destination when branching due to a past branch instruction is stored, and a branch prediction table 15a stored in the main memory 11. The cache address table 15b stores an address range indicating which data is stored in the cache memory banks 12a, 12b, and the data in the branch prediction table 15a and the data in the cache address table 15b are compared 6.
A comparator 15c compares and outputs a predicted branch address, and a main memory 11 according to the predicted branch address from the comparator 15c.
The memory transfer control circuit 15d transfers the data to the cache memory banks 12a and 12b.

上記構成に係る実施例の動作を、CPUl0がキャッシ
ュメモリバンク12aをアクセスしている場合について
説明する。
The operation of the embodiment according to the above configuration will be described with reference to the case where the CPU 10 is accessing the cache memory bank 12a.

この場合、CPUl0は、ローレベルのコントロール信
号CM a及びccbをそれぞれ双方向バッファ13a
及び14bに出力し、またハイレベルのコントロール信
号CMb及びCCaをそれぞれ双方向バッファ13b及
び14aに用カしており、したがって、キャッシュメモ
リバンク12aのデータバスDBaは主メモリ11がら
切り離されて双方向バッファ14aを介してCPUl0
K接続され、他方、キャッシュメモリバンク12bのデ
ータバスDBbはCPUl0がら切り前されて双方向バ
ッファ13bを介して主メモリIIK接続されている。
In this case, the CPU 10 sends the low level control signals CM a and ccb to the bidirectional buffer 13a, respectively.
and 14b, and high-level control signals CMb and CCa are used for bidirectional buffers 13b and 14a, respectively. Therefore, data bus DBa of cache memory bank 12a is separated from main memory 11 and is bidirectional. CPU10 via buffer 14a
On the other hand, data bus DBb of cache memory bank 12b is cut from CPU10 and connected to main memory IIK via bidirectional buffer 13b.

7 ベージ 上記動作において、キャッシュミス予測制御回路】5の
分岐予測テーブル15aには、前述したように過去に分
岐命令が実行されたときに分岐したアドレスとその分岐
命令のあったアドレスの最新情報が記録されている。し
たがって、キャッシュミス予測制御回路15は、次に同
一の分岐命令が実行されたときに同方向に分岐する確率
が高いために、分岐命令の分岐先を分岐予測テーブル1
5aに記録された分岐先に分岐すると予測する。
In the above operation, the branch prediction table 15a of Cache Miss Prediction Control Circuit [5] contains the latest information of the address to which a branch was executed when a branch instruction was executed in the past and the address where the branch instruction was located, as described above. recorded. Therefore, since the cache miss prediction control circuit 15 has a high probability of branching in the same direction the next time the same branch instruction is executed, the cache miss prediction control circuit 15 selects the branch destination of the branch instruction from the branch prediction table 1.
It is predicted that the branch will be taken to the branch destination recorded in 5a.

すなわち、比較器15eは、分岐予測テーブル15aの
分岐命令アドレスとキャッシュアドレステーブル15b
のアドレス範囲を比較することにより、分岐命令がキャ
ッシュメモリバンク12aに記憶されているかどうかを
検出する。分岐命令がキャッシュメモリバンク12aに
記憶されている場合には、その中で最小アドレスの分岐
命令に対して、対応する分岐先のアドレスとキャッシュ
アドレステーブル15bのアドレス範囲とを比較する。
That is, the comparator 15e compares the branch instruction address of the branch prediction table 15a with the cache address table 15b.
By comparing the address ranges of , it is detected whether the branch instruction is stored in the cache memory bank 12a. If a branch instruction is stored in the cache memory bank 12a, for the branch instruction with the smallest address among them, the corresponding branch destination address is compared with the address range of the cache address table 15b.

分岐先のアドレスがキャッシュアドレステーブル15b
のアドレス範囲内にない場合には、分岐命令により分岐
が生ずるとキャッシュミスが発生するために、比較器1
5eは分岐先アドレスをメモリ転送制御回路15dに出
力する。
The branch destination address is in the cache address table 15b
If it is not within the address range of comparator 1, a cache miss will occur if a branch occurs due to a branch instruction.
5e outputs the branch destination address to the memory transfer control circuit 15d.

他方、分岐先のアドレスがキャッシュアドレステーブル
15bのアドレス範囲内にある場合には、分岐命令によ
り分岐が生じてもキャッシュミスが発生しないと予測し
、次の最小アドレスの分岐命令に対して同様の比較を行
う。
On the other hand, if the branch destination address is within the address range of the cache address table 15b, it is predicted that a cache miss will not occur even if a branch occurs due to a branch instruction, and a similar procedure is performed for the next branch instruction with the lowest address. Make a comparison.

比較対象となる全ての分岐命令に対してキャッシュミス
がないことを予測するか、或いは比較対象となる分岐命
令がキャッジ−アドレステーブル15bのアドレス範囲
内に存在しない場合には、キャッシュメモリバンク12
aの最終アドレスの次のアドレスをメモリ転送制御回路
15dに出力する。
If it is predicted that there is no cache miss for all the branch instructions to be compared, or if the branch instructions to be compared do not exist within the address range of the cache address table 15b, the cache memory bank 12
The address next to the final address of a is output to the memory transfer control circuit 15d.

メモリ転送制御回路15dは比較器15eからのアドレ
スにより主メモリ11からそのアドレス以降のデータを
現在未使用のキャッシュメモリバンク12bに出力する
Based on the address from the comparator 15e, the memory transfer control circuit 15d outputs data from the main memory 11 to the currently unused cache memory bank 12b.

9 ベージ CPUl0は、キャッシュメモリバンク12aに対する
キャッシュミスが発生するとアクセスを中断し、ハイレ
ベルのコントロール信号CMa及びccbをそれぞれ双
方向バッファ13a及び14bに出力し、またローレベ
ルのコントロール信号CMb及びCCaをそれぞれ双方
向バッファ13b及び14aに出力する。
9 When a cache miss occurs to the cache memory bank 12a, the page CPU 10 interrupts access, outputs high-level control signals CMa and ccb to the bidirectional buffers 13a and 14b, and outputs low-level control signals CMb and CCa. The signals are output to bidirectional buffers 13b and 14a, respectively.

したがって、キャッシュメモリバンク12bのデータバ
スDBbは主メモリ11から切り離されて双方向バッフ
ァ14bを介してCPU 10に接続され、他方、キャ
ッシュメモリバンク12aのデータバスDBaはCPU
l0から切り離されて双方向バッファ13aを介して主
メモリ11に接続され、CPUl0はキャッシュメモリ
バンク12bに対してアクセスする。
Therefore, data bus DBb of cache memory bank 12b is separated from main memory 11 and connected to CPU 10 via bidirectional buffer 14b, while data bus DBa of cache memory bank 12a is connected to CPU 10 via bidirectional buffer 14b.
It is separated from CPU 10 and connected to main memory 11 via bidirectional buffer 13a, and CPU 10 accesses cache memory bank 12b.

以下同様に、キャッシュメモリバンク12bに対するキ
ャッジ−ミスを予測し、キャッジ−ミスが発生するとキ
ャッシュメモリバンク12aに切り換えろ。
Similarly, a cache miss for cache memory bank 12b is predicted, and when a cache miss occurs, the cache memory bank is switched to cache memory bank 12a.

以上説明したように、上記実施例では、キャラ10 べ
−7 シュミス予測制御回路15がキャッシュミスの発生を予
測して、キャッシュメモリバンク12a、12bを切り
換えるので、CPUl0の実行が中断することがない。
As explained above, in the above embodiment, the Schmis prediction control circuit 15 predicts the occurrence of a cache miss and switches between the cache memory banks 12a and 12b, so that the execution of the CPU10 is not interrupted. .

尚、上記実施例では、キャッシュメモリを2バンク化し
た場合について説明したが、その他任意の複数の数にバ
ンク化してもよい。
In the above embodiment, the case where the cache memory is divided into two banks has been described, but the cache memory may be divided into any number of banks.

また、キャッシュミスの予測確率が篩くなるにつれてキ
ャッシュミス発生によろCPUl0のアクセス遅延をよ
り減少することができろが、上記構成に係るキャッジ−
ミス予測制御回路15は一例であり、限定されるもので
はない。
Furthermore, as the predicted probability of a cache miss becomes smaller, the access delay of CPU10 due to the occurrence of a cache miss can be further reduced.
The miss prediction control circuit 15 is an example, and is not limited thereto.

発明の詳細 な説明したように、本発明は、キャッシュメモリをバン
ク化するとともに、CPUがアクセスしているバンクの
キャッシーミスヲ予i1+11 L、キャッシュミスが
発生した場合にバンクを切り換えるようにしたので、C
PUは現在アクセスしているバンクにキャッシュミスが
発生しても他のバンクにアクセスすることができ、した
がってアクセス11 ページ 遅延が生ずることがない。
As described in detail, in the present invention, the cache memory is organized into banks, and the bank is switched when a cache miss occurs in the bank being accessed by the CPU. , C
Even if a cache miss occurs in the currently accessed bank, the PU can access other banks, so no page delay occurs during access.

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

第1図は、本発明に係るキャッシュメモリ装置の一実施
例を示すブロック図、第2図は、第1図のキャッジ−ミ
ス予測制御回路のより詳細なブロック図、第3図は、従
来例を示すブロック図である。 10・ CPU、11 ・・・主メモリ、12a、12
b・・・キャッシュメモリバンク、13a、13b−1
4a。 14b・・・双方向バッファ、15・・・キャッシュミ
ス予測制御回路、15a・・・分岐予測テーブル、15
b・・・キャッシュアドレステーブル、15’c・・・
比較器15d・・・メモIJ k送制御回路。 代理人の氏名 弁理士 中 尾 敏 男 はか1名第1
FIG. 1 is a block diagram showing an embodiment of a cache memory device according to the present invention, FIG. 2 is a more detailed block diagram of the cache-miss prediction control circuit of FIG. 1, and FIG. 3 is a conventional example. FIG. 10. CPU, 11...Main memory, 12a, 12
b...Cache memory bank, 13a, 13b-1
4a. 14b... Bidirectional buffer, 15... Cache miss prediction control circuit, 15a... Branch prediction table, 15
b...cache address table, 15'c...
Comparator 15d...Memo IJk sending control circuit. Name of agent: Patent attorney Toshio Nakao (1st person)
figure

Claims (1)

【特許請求の範囲】[Claims] 複数の数にバンク化されたキャッシュメモリと、CPU
がアクセスしているバンクに対するキャッシュミスを予
測し、キャッシュミス発生を予測した場合に主メモリの
データとCPUによりアクセスされていないバンクのデ
ータとを交換する手段とを有し、キャッシュミスが発生
した場合にバンクを切り替えることを特徴とするキャッ
シュメモリ装置。
Cache memory banked into multiple numbers and CPU
means for predicting a cache miss for a bank that is being accessed by the CPU, and exchanging data in the main memory with data in a bank that has not been accessed by the CPU when a cache miss is predicted, and when a cache miss has occurred. A cache memory device characterized in that banks can be switched depending on the case.
JP61236468A 1986-10-03 1986-10-03 Cache memory device Pending JPS6389951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61236468A JPS6389951A (en) 1986-10-03 1986-10-03 Cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61236468A JPS6389951A (en) 1986-10-03 1986-10-03 Cache memory device

Publications (1)

Publication Number Publication Date
JPS6389951A true JPS6389951A (en) 1988-04-20

Family

ID=17001189

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61236468A Pending JPS6389951A (en) 1986-10-03 1986-10-03 Cache memory device

Country Status (1)

Country Link
JP (1) JPS6389951A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0895857A (en) * 1994-09-29 1996-04-12 Shikoku Nippon Denki Software Kk Input/output cache
JPH08166905A (en) * 1994-12-12 1996-06-25 Nec Corp Cache memory control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0895857A (en) * 1994-09-29 1996-04-12 Shikoku Nippon Denki Software Kk Input/output cache
JPH08166905A (en) * 1994-12-12 1996-06-25 Nec Corp Cache memory control method

Similar Documents

Publication Publication Date Title
US5765187A (en) Control system for a ring buffer which prevents overrunning and underrunning
US5594878A (en) Bus interface structure and system for controlling the bus interface structure
US4658356A (en) Control system for updating a change bit
JPS6126702B2 (en)
JPH07248967A (en) Memory control system
JPS6389951A (en) Cache memory device
US5623630A (en) Data processor with application program buffer to cache buffer copy capability to prevent mismatches
JP2001290704A (en) Device and method for controlling multiprocess
JP2746189B2 (en) File access control system
US5440696A (en) Data processing device for reducing the number of internal bus lines
JP3201635B2 (en) Storage controller
JPS63245743A (en) Memory access system
JP2980163B2 (en) Data transfer method
JPS6022243A (en) Content retrieval processing system
KR20020033254A (en) Apparatus and method for flow control in dual processor system
JPH1055308A (en) Cache memory
JP2752834B2 (en) Data transfer device
JPS62164134A (en) Hardware stack control system
JPH0242549A (en) Write-after type disk cache controller
JPH05113888A (en) Microprocessor unit
JPH02307123A (en) Computer
JPH0248749A (en) Buffer storage control device
JPH0460729A (en) Information processor
JPS6159555A (en) Method for controlling data transfer of multiple hierarchical storage device
JPS6243737A (en) Interruption control system