JP3147456B2 - Cache memory system - Google Patents
Cache memory systemInfo
- Publication number
- JP3147456B2 JP3147456B2 JP01738592A JP1738592A JP3147456B2 JP 3147456 B2 JP3147456 B2 JP 3147456B2 JP 01738592 A JP01738592 A JP 01738592A JP 1738592 A JP1738592 A JP 1738592A JP 3147456 B2 JP3147456 B2 JP 3147456B2
- Authority
- JP
- Japan
- Prior art keywords
- cache
- main memory
- cache memory
- memory
- data block
- 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.)
- Expired - Fee Related
Links
- 230000015654 memory Effects 0.000 title claims description 132
- 238000000034 method Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 17
- 101500021172 Aplysia californica Myomodulin-C Proteins 0.000 description 2
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000000415 inactivating effect Effects 0.000 description 1
- 230000000873 masking effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明はキャッシュメモリシステ
ムに関し、特にキャッシュ・ミスヒット時にメモリ間の
データ・ブロックを転送する構成のキャッシュメモリシ
ステムに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cache memory system, and more particularly to a cache memory system configured to transfer a data block between memories when a cache miss occurs.
【0002】[0002]
【従来の技術】従来のキャッシュメモリシステムは、図
6(A),(B)に示すように、メインメモリ制御信号
MMC及びメインメモリアドレスMAに従ってデータブ
ロックの書込み,読出しを行うメインメモリ3と、キャ
ッシュメモリ制御信号CMC及びキャッシュメモリアド
レスCAに従ってデータブロックの書込み,読出しを行
うキャッシュメモリ2と、所定のタイミングで順次上位
アドレスAHを発生しキャッシュ・ミスヒット信号CM
ISがインアクティブのとき所定のタイミングで下位キ
ャッスアドレスCALを発生しこれらアドレスからなる
キャッシュアドレスCAを発生し、キャッシュ・ミスヒ
ット信号CMISがアクティブになるとキャッシュアド
レスCAの発生を無効化するアドレス生成部11a,キ
ャッシュ・ミスヒット信号CMISがアクティブになる
とクロック信号CKのカウントを開始しこのクロック信
号CKに従って順次カウントアップする値の下位メイン
メモリアドレスMALを発生してアドレス生成部11a
からの上位アドレスAHと結合してメインメモリアドレ
スMAとし、カウント値が最大値になるとアクティブの
オーバーフロー信号OVFLを発生するカウンタ14
a、オーバーフロー信号OVFLがインアクティブのと
きはクロック信号CKをカウンタ14aへ供給しアクテ
ィブになるとカウンタ14aへのクロック信号CKをマ
スクするORゲート13、及びキャッシュミスが発生し
ていないとき及びオーバーフロー信号OVFLがアクテ
ィブのときはキャッシュ・ミスヒット信号CMISをイ
ンアクティブにすると共に制御信号CNTをキャッシュ
メモリ制御信号CMCにし、キャッシュミスが発生する
とキャッシュ・ミスヒット信号CMISをアクティブに
すると共に制御信号CNTをメインメモリ制御信号MM
Cにして出力する制御信号生成部1aを備えたメモリ制
御部10aを含み、メインメモリ3及びキャッシュメモ
リ2のデータブロックの書込み,読出し,転送制御,並
びにメインメモリ3及びキャッシュメモリ2から読出さ
れたデータブロックに対する処理を含む各種制御処理を
行うCPU1aと、CPU1a,キャッシュメモリ2,
メインメモリ3間のデータブロックを転送するデータバ
ス6とを有する構成となっていた。2. Description of the Related Art As shown in FIGS. 6A and 6B, a conventional cache memory system includes a main memory 3 for writing and reading data blocks according to a main memory control signal MMC and a main memory address MA. A cache memory 2 for writing / reading data blocks in accordance with a cache memory control signal CMC and a cache memory address CA; and a cache mishit signal CM which sequentially generates an upper address AH at a predetermined timing.
When IS is inactive, a lower cache address CAL is generated at a predetermined timing to generate a cache address CA composed of these addresses, and when the cache mishit signal CMIS becomes active, an address generator for invalidating the generation of the cache address CA. 11a, when the cache mishit signal CMIS becomes active, the count of the clock signal CK is started, and a lower main memory address MAL of a value sequentially counted up according to the clock signal CK is generated to generate an address generator 11a.
The counter 14 generates an active overflow signal OVFL when the count value reaches the maximum value by combining with the higher address AH from the main memory address MA.
a, an OR gate 13 that supplies the clock signal CK to the counter 14a when the overflow signal OVFL is inactive and masks the clock signal CK to the counter 14a when it becomes active, and when no cache miss occurs and the overflow signal OVFL Is active, the cache miss signal CMIS is made inactive, and the control signal CNT is changed to the cache memory control signal CMC. When a cache miss occurs, the cache miss signal CMIS is activated and the control signal CNT is changed to the main memory. Control signal MM
C includes a memory control unit 10a having a control signal generation unit 1a that outputs a data block, and controls writing, reading, and transfer of data blocks in the main memory 3 and the cache memory 2, and reading from the main memory 3 and the cache memory 2. A CPU 1a for performing various control processes including a process for a data block, a CPU 1a, a cache memory 2,
The configuration has a data bus 6 for transferring a data block between the main memories 3.
【0003】次にこのキャッシュメモリシステムの動作
について説明する。図7はこのキャッシュメモリシステ
ムの動作を説明するための各部信号のタイミング図であ
る。Next, the operation of the cache memory system will be described. FIG. 7 is a timing chart of signals at various parts for explaining the operation of the cache memory system.
【0004】キャッシュミスが発生していない間は、キ
ャッシュ・ミスヒット信号CMISは低レベルのインア
クティブ、制御信号CNTはキャッシュメモリ制御信号
CMCとなっており、CPU1aはキャッシュメモリ2
をアクセスして高速動作を行っている。While a cache miss does not occur, the cache miss signal CMIS is a low level inactive, the control signal CNT is a cache memory control signal CMC, and the CPU 1a is
To perform high-speed operation.
【0005】今、下位キャッシュメモリアドレスCAL
が“A”のときキャッシュミスが発生したとすると、キ
ャッシュ・ミスヒット信号CMISが高レベルのアクテ
ィブとなり、キャッシュミスの発生をアドレス生成部1
1a,カウンタ14aに知らせる。カウンタ14aはキ
ャッシュ・ミスヒット信号CMISの高レベルをクロッ
ク信号KCの高上り(t1)で検出してこのタイミング
でカウントを開始すると共にオーバー信号OVFLがア
クティブであればこれをインアクティブにし、クロック
信号CKに従って順次カウントアップする下位メインメ
モリアドレスMALを発生する。このt1のタイミング
で制御信号CNTはメインメモリ制御信号MMCに切換
わる。一方、下位キャッシュメモリアドレスCALは不
定となる。この結果、メインメモリ3のアクセスが行な
われメインメモリ3から読出されたデータブロックがデ
ータバス6を介してCPU1aに転送されこのデータブ
ロックに対する処理が行われる。Now, the lower cache memory address CAL
Is "A", a cache miss signal CMIS becomes active at a high level, and the occurrence of a cache miss is notified to the address generation unit 1.
1a, inform the counter 14a. The counter 14a detects the high level of the cache mishit signal CMIS at the high rise (t1) of the clock signal KC, starts counting at this timing, and inactivates the over signal OVFL if it is active. A lower main memory address MAL which sequentially counts up according to CK is generated. At the timing of this t1, the control signal CNT switches to the main memory control signal MMC. On the other hand, the lower cache memory address CAL is undefined. As a result, the main memory 3 is accessed, the data block read from the main memory 3 is transferred to the CPU 1a via the data bus 6, and the processing for this data block is performed.
【0006】カウンタ14aの最大カウント値を“3”
とすると、t1のタイミングから4つめのクロック信号
CKでカウンタ14aのカウント値(すなわちMAL)
は“3”となりオーバーフロー信号OVFLは高レベル
のアクティブとなる。そして次のクロック信号CKの立
上り(t2)でキャッシュ・ミスヒット信号CMISは
インアクティブ(低レベル)となる。この結果、制御信
号CNTはキャッシュメモリ制御信号CMCとなり、ア
ドレス生成部11aからのキャッシュメモリアドレスC
Aが有効となりCPU1aいにょるアクセスはメインメ
モリ3からキャッシュメモリ2へ移る。すなわち、キャ
ッシュミスが発生したときにメインメモリ3から読出さ
れ転送されるデータブロックの数はカウンタ14aの最
大カウント値(この例では“4”)に固定されている。The maximum count value of the counter 14a is "3"
Then, the count value of the counter 14a (ie, MAL) is obtained by the fourth clock signal CK from the timing of t1.
Becomes "3" and the overflow signal OVFL becomes active at a high level. Then, at the next rise (t2) of the clock signal CK, the cache mishit signal CMIS becomes inactive (low level). As a result, the control signal CNT becomes the cache memory control signal CMC, and the cache memory address C
A becomes valid, and the access to the CPU 1a moves from the main memory 3 to the cache memory 2. That is, the number of data blocks read and transferred from the main memory 3 when a cache miss occurs is fixed to the maximum count value of the counter 14a ("4" in this example).
【0007】[0007]
【発明が解決しようとする課題】この従来のキャッシュ
メモリシステムでは、キャッシュミスが発生したときに
発生するメインメモリ3から読出され転送されるデータ
ブロックの数が固定であるため、命令の並びやキャッシ
ュミスが発生する位置によって、キャッシュメモリ2に
読込まれているが実行されない命令が多数発生すること
があるという問題点があった。この実行されない命令が
多いと、相対的にキャッシュミスの発生率が高くなり、
システム性能が低下する。In this conventional cache memory system, since the number of data blocks read from the main memory 3 and transferred when a cache miss occurs is fixed, the order of instructions and the cache There is a problem that a number of instructions that are read into the cache memory 2 but are not executed may occur depending on the position where the miss occurs. If there are many unexecuted instructions, the cache miss rate will be relatively high,
System performance decreases.
【0008】図8(A)〜(C)にキャッシュミス時の
データブロックの転送数とCPU1aの実行パターンと
の関係を説明するための模式図を示す。図8において、
キャッシュメモリ2には命令Xから命令Yまでのアドレ
スが連続する4命令が記憶されておらず、CPU1aが
この4命令を連続実行し、命令7が分岐命令であるとす
る。また、CPU1aがキャッシュミスする回数を“C
“とし、キャッシュミスが発生してデータブロックの転
送を開始するまでに4クロック(Tm)、データブロッ
クの転送時に1命令転送するのに1クロック(Tt)を
要するとする。データブロックの転送時のデータブロッ
ク数をTbとすると、命令Xでキャッシュミスが発生し
命令Yの実行が完了するまでに命令実行以外に必要なク
ロック数(T)は T=(Tm+Tb・Tt)・C で表される。図8(A)では T=(4+1・1)・4=20クロック 図8(B)では T=(4+8・1)・1=12クロック となる。図8(C)では T=(4+4・1)・1=8クロック となり、キャッシュミス時の損失時間は図8(C)のと
き最小になる。FIGS. 8A to 8C are schematic diagrams for explaining the relationship between the number of data block transfers at the time of a cache miss and the execution pattern of the CPU 1a. In FIG.
It is assumed that the cache memory 2 does not store four consecutive instructions from the instruction X to the instruction Y, and the CPU 1a continuously executes these four instructions, and the instruction 7 is a branch instruction. The number of cache misses by the CPU 1a is represented by “C
It is assumed that four clocks (Tm) are required until a cache miss occurs and the transfer of the data block is started, and one clock (Tt) is required to transfer one instruction during the transfer of the data block. Assuming that the number of data blocks is Tb, the number of clocks (T) required for the execution of the instruction Y besides the instruction execution until the execution of the instruction Y is completed is represented by T = (Tm + Tb.Tt) .C 8 (A), T = (4 + 1.1) ・ 4 = 20 clocks In FIG. 8 (B), T = (4 + 8.1) ・ 1 = 12 clocks In FIG. 4 + 4−1) · 1 = 8 clocks, and the loss time in the event of a cache miss is minimized in FIG. 8C.
【0009】図8(A)では、キャッシュミスした命令
のみメインメモリ3から読出すが、キャッシュミスの回
数が多くなるため結果的に命令実行以外の損失時間が多
くかかる。図8(B)では、図8(A)場合より損失時
間が少ないが、分岐命令が実行されて分岐する頻度が高
いプログラムでは、キャッシュミスによるデータブロッ
ク転送でキャッシュメモリ2に書込まれた命令が分岐に
よって実行されない場合が多くなる。In FIG. 8 (A), only instructions for which a cache miss has occurred are read from the main memory 3. However, the number of cache misses increases, resulting in a long time loss other than the instruction execution. 8B, the loss time is shorter than that of FIG. 8A, but in a program in which a branch instruction is executed and the frequency of branching is high, an instruction written in the cache memory 2 by data block transfer due to a cache miss is performed. Is often not executed by branching.
【0010】これらの場合では、損失時間差が8クロッ
クも異なる。この事からもデータブロック数の選定はシ
ステム全体の性能を大きく左右する事が分かる。しか
し、キャッシュミス時に発生するデータブロック転送の
数はプログラムの形態,命令の並び等で最適な値が変わ
るため、データブロックの転送数の決定が非常に難しい
という問題点があった。[0010] In these cases, the lost time difference differs by eight clocks. This also indicates that the selection of the number of data blocks greatly affects the performance of the entire system. However, the optimal number of data block transfers that occur at the time of a cache miss varies depending on the form of the program, the arrangement of instructions, and the like, so that it is very difficult to determine the number of data block transfers.
【0011】[0011]
【課題を解決するための手段】本発明のキャッシュメモ
リシステムは、メインメモリ制御信号及びメインメモリ
アドレスに従ってデータバスに対してタグビットを含む
データブロックの書込み,読出しを行うメインメモリ
と、キャッシュメモリ制御信号及びキャッシュメモリア
ドレスに従ってデータブロックの書込み,読出しを行う
キャッシュメモリと、前記メインメモリ及びキャッシュ
メモリの前記データブロックの書込み,読出し,転送制
御並びに前記メインメモリ及びキャッシュメモリから読
出されたデータブロックに対する処理を行うCPUと、
基準タグビットを格納するストップレジスタと、を備え
たキャッシュメモリシステムであって、前記キャッシュ
メモリに対するキャッシュミスヒットが発生すると前記
キャッシュメモリに対する前記メインメモリの読出しを
開始し、前記ストップレジスタに格納された前記基準タ
グビットと前記メインメモリから読み出された前記デー
タブロックの前記タグビットの値とが一致したとき前記
メインメモリのデータブロックの読出しを終了する手段
を備えることを特徴とする。A cache memory system according to the present invention comprises: a main memory for writing and reading a data block including a tag bit to and from a data bus in accordance with a main memory control signal and a main memory address; A cache memory for writing / reading data blocks in accordance with signals and cache memory addresses; write / read / transfer control of the data blocks in the main memory and the cache memory; and processing for data blocks read from the main memory and the cache memory A CPU for performing
A stop register for storing a reference tag bits, a cache memory system wherein the starts reading of the main memory to the cache memory for the cache memory and a cache miss occurs, is stored in the stop register Means for terminating reading of the data block of the main memory when the reference tag bit and the value of the tag bit of the data block read from the main memory match
Characterized in that it comprises a.
【0012】また、各データブロックと対応しかつこれ
らデータブロックの読出しと共に読出されるタグビット
を設け、ストップレジスタに前記タグビットと同一ビッ
ト数の基準タグビットを格納し、前記比較器が読出され
た前記各データブロックのタグビットと前記基準タグビ
ットとを比較するようにした構成を有している。A tag bit corresponding to each data block and read at the time of reading these data blocks is provided, the same number of reference tag bits as the tag bits is stored in a stop register, and the comparator is read. And comparing the tag bit of each data block with the reference tag bit.
【0013】[0013]
【実施例】次に本発明の実施例について図面を参照して
説明する。Next, an embodiment of the present invention will be described with reference to the drawings.
【0014】図1(A),(B)はそれぞれ本発明の第
1の実施例のブロック図及びこの実施例のメモリ制御部
の内部ブロック図である。FIGS. 1A and 1B are a block diagram of a first embodiment of the present invention and an internal block diagram of a memory control unit of this embodiment, respectively.
【0015】この実施例は、メインメモリ制御信号MM
C及びメインメモリアドレスMAに従ってデータブロッ
クの書込み,読出しを行うメインメモリ3と、キャッシ
ュメモリ制御信号CMC及びキャッシュメモリアドレス
CAに従ってデータブロックの書込み,読出しを行うキ
ャッシュメモリ2と、所定のタイミングで上位アドレス
AHを発生しキャッシュ・ミスヒット信号CMISがイ
ンアクティブ(低レベル)のとき所定のタイミングで下
位キャッシュメモリアドレスCALを発生してこれらア
ドレスから成るキャッシュアドレスCAを発生し、キャ
ッシュ・ミスヒット信号CMISがアクティブ(高レベ
ル)になるとキャッシュメモリアドレスCAを無効化す
るアドレス生成部11,キャッシュ・ミスヒット信号C
MISがアクティブになると下位キャッシュメモリアド
レスCALを取込み、クロック信号に従ってこの取込ん
だ値から順次カウントアップする下位メインメモリアド
レスMALを発生して上位アドレスAHと結合してメイ
ンメモリアドレスMAを発生するカウンタ14、キャッ
シュ・ミスヒット信号CMISがインアクティブのとき
は制御信号CNTをキャッシュメモリ制御信号(CM
C)にして出力しキャッシュミスが発生するとキャッシ
ュ・ミスヒット信号CMISをアクティブにすると共に
制御信号CNTをメインメモリ制御信号MMCにして出
力し比較結果信号RSTPがアクティブ(高レベル)に
なるとキャッシュ・ミスヒット信号CMISをインアク
ティブにすると共に制御信号CNTをキャッシュメモリ
制御信号CMCとして出力する制御信号発生部12、及
び比較結果信号RSTPがアクティブのときクロック信
号CKのカウンタ14への供給をマスクするORゲート
13を備えたメモリ制御部10を含み、メインメモリ3
及びキャッシュメモリ2のデータブロックの書込み,読
出し転送制御並びにメインメモリ3及びキャッシュメモ
リ2から読出され転送されたデータブロックに対する処
理を含む各種制御処理を行うCPU1と、比較基準デー
タRDTを格納するストップレジスタ4と、比較基準デ
ータRDTとメインメモリから読出されたデータブロッ
クの所定の部分とを比較しこれらが一致したときアクテ
ィブとなる比較結果信号RSTPを発生する比較器5と
を有する構成となっている。This embodiment uses a main memory control signal MM
C and a main memory 3 for writing and reading data blocks in accordance with the main memory address MA; a cache memory 2 for writing and reading data blocks in accordance with the cache memory control signal CMC and the cache memory address CA; When AH is generated and the cache mishit signal CMIS is inactive (low level), a lower cache memory address CAL is generated at a predetermined timing to generate a cache address CA composed of these addresses, and the cache mishit signal CMIS is generated. The address generator 11 invalidates the cache memory address CA when it becomes active (high level), and the cache mishit signal C
When MIS becomes active, a lower cache memory address CAL is fetched, a lower main memory address MAL which sequentially counts up from the fetched value is generated according to a clock signal, and is combined with an upper address AH to generate a main memory address MA. 14. When the cache mishit signal CMIS is inactive, the control signal CNT is transmitted to the cache memory control signal (CM
C), the cache miss signal CMIS is activated when a cache miss occurs, and the control signal CNT is output as the main memory control signal MMC. When the comparison result signal RSTP becomes active (high level), a cache miss occurs. A control signal generator 12 for inactivating the hit signal CMIS and outputting the control signal CNT as the cache memory control signal CMC, and an OR gate for masking the supply of the clock signal CK to the counter 14 when the comparison result signal RSTP is active. 13 includes a memory control unit 10 having a main memory 3
A CPU 1 for performing various control processes including writing and reading transfer control of data blocks in the cache memory 2 and processing for data blocks read and transferred from the main memory 3 and the cache memory 2; and a stop register for storing comparison reference data RDT. 4 and a comparator 5 that compares the comparison reference data RDT with a predetermined portion of the data block read from the main memory and generates a comparison result signal RSTP that becomes active when they match. .
【0016】次にこの実施例の動作について説明する。
図2はこの実施例の動作を説明するための各部信号のタ
イミング図である。Next, the operation of this embodiment will be described.
FIG. 2 is a timing chart of signals at various parts for explaining the operation of this embodiment.
【0017】キャッシュミスが発生していない間は、キ
ャッシュ・ミスヒット信号CMIS,比較結果信号RS
TPは低レベルのインアクティブ、制御信号CNTはキ
ャッシュメモリ制御信号CMCとなっており、CPU1
はキャッシュメモリ2をアクセスして高速動作を行って
いる。While no cache miss occurs, the cache miss signal CMIS and the comparison result signal RS
TP is a low level inactive, and the control signal CNT is a cache memory control signal CMC.
Access the cache memory 2 and perform high-speed operation.
【0018】今、下位キャッシュメモリアドレスCAL
が“A”のときキャッシュミスが発生したとすると、キ
ャッシュ・ミスヒット信号CMISが高レベルのアクテ
ィブとなり、キャッシュミスの発生をアドレス生成部1
1,カウンタ14に知らせる。カウンタ14はキャッシ
ュ・ミスヒット信号CMISが高レベルになるとクロッ
ク信号CKの立上り(t1)で取込みこの値を初期値と
してクロック信号CKに従って順次カウントアップする
下位メインメモリアドレスMALを発生する。このt1
のタイミングで制御信号CNTはメインメモリ制御信号
MMCに切換わる。一方、下位キャッシュメモリアドレ
スCALは不定となる。この結果、メインメモリ3のア
クセスが行なわれ、メインメモリから読出されたデータ
ブロックがデータバス6を介してCPU1に転送され、
このデータブロックに対する処理が行われる。Now, the lower cache memory address CAL
Is "A", a cache miss signal CMIS becomes active at a high level, and the occurrence of a cache miss is notified to the address generation unit 1.
1. Notify the counter 14. When the cache mishit signal CMIS goes high, the counter 14 takes in the rising edge (t1) of the clock signal CK and uses this value as an initial value to generate a lower main memory address MAL which sequentially counts up in accordance with the clock signal CK. This t1
At this timing, the control signal CNT switches to the main memory control signal MMC. On the other hand, the lower cache memory address CAL is undefined. As a result, the main memory 3 is accessed, and the data block read from the main memory is transferred to the CPU 1 via the data bus 6,
Processing is performed on this data block.
【0019】ストップレジスタ4には、比較基準データ
RDTとして所定の命令コードが格納されており、比較
器5はメインメモリ3からデータブロックが読出される
たびにこのデータブロックの命令コード(CDT)とス
トップレジスタ4からの命令コードとを比較し、これら
が一致したときアクティブとなる比較結果信号RSTP
を発生する。A predetermined instruction code is stored in the stop register 4 as comparison reference data RDT. Each time a data block is read from the main memory 3, the comparator 5 stores the instruction code (CDT) of this data block. The instruction code from the stop register 4 is compared with the instruction code, and when they match, the comparison result signal RSTP becomes active.
Occurs.
【0020】今、下位メインメモリアドレスMALが
“A+3”のとき比較結果信号RSTPがアクティブに
なったとすると(t2)、この比較結果信号RSTPに
よりキャッシュ・ミスヒット信号CMISはインアクテ
ィブになり、カウンタ14は下位メインメモリアドレス
MALの発生を停止し、アドレス生成部11は再び下位
キャッシュメモリアドレスCALを発生し、制御信号C
NTはキャッシュメモリ制御信号CMCに切換って、C
PU1によるアクセスはメインメモリ3からキャッシュ
メモリ2へと移る。If the comparison result signal RSTP becomes active when the lower main memory address MAL is "A + 3" (t2), the cache mishit signal CMIS becomes inactive by the comparison result signal RSTP, and the counter 14 Stops the generation of the lower main memory address MAL, the address generator 11 generates the lower cache memory address CAL again, and
NT switches to the cache memory control signal CMC, and C
The access by the PU 1 moves from the main memory 3 to the cache memory 2.
【0021】このように、キャッシュミスが発生したと
きに、メインメモリ2から読出されたデータブロックの
内容がストップレジスタ4の記憶内容と一致したときメ
インメモリ2からのデータブロックの読出しを終了する
ので、命令の並びや、キャッシュミスの発生位置等に適
合した数のデータブロックの読出しが可能となる。As described above, when a cache miss occurs, the reading of the data block from the main memory 2 is terminated when the content of the data block read from the main memory 2 matches the content stored in the stop register 4. , The number of data blocks suitable for the sequence of instructions, the position where a cache miss occurs, and the like can be read.
【0022】図3はこの実施例のストップレジスタ4及
び比較器5の内部構成の具体例を示すブロック図であ
る。FIG . 3 is a block diagram showing a specific example of the internal configuration of the stop register 4 and the comparator 5 of this embodiment .
【0023】ストップレジスタ4は複数の内部レジスタ
41で構成され、比較器5は、これら内部レジスタ41
の記憶内容(RDT)とメインメモリ3からのデータブ
ロック内の所定のデータ(CDT)とをそれぞれ対応し
て比較する複数の内部比較器51と、これら内部比較器
51の比較結果を統合するORゲート52と、このOR
ゲートの出力をクロック信号CKに同期してラッチし比
較結果信号RSTPとして出力するフリップフロップ5
3とを備えた構成となっている。The stop register 4 comprises a plurality of internal registers 41, and the comparator 5
And a plurality of internal comparators 51 for respectively comparing the stored contents (RDT) of the main memory 3 with predetermined data (CDT) in the data block from the main memory 3, and an OR for integrating the comparison results of the internal comparators 51 Gate 52 and this OR
Flip-flop 5 that latches the output of the gate in synchronization with clock signal CK and outputs the result as comparison result signal RSTP
3 is provided.
【0024】図4(A),(B)はそれぞれこの実施例
のデータブロックの一例のデータフォーマット図及びス
トップレジスタ4の記憶内容の一例を示す模式図であ
る。FIGS. 4A and 4B are a data format diagram of an example of a data block of this embodiment and a schematic diagram showing an example of contents stored in the stop register 4, respectively.
【0025】ストップレジスタ4の各内部レジスタ41
には、6ビットの命令コードICを比較基準データRD
Tとして記憶する。一般的に命令の流れの中で、分岐命
令はキャッシュミスを発生させる可能性が高い。キャッ
シュメモリ2は命令の局所性を利用しているため、少な
いメモリ容量でも高いヒット率が得られるが、命令の流
れが局所的な部分以外に移行する頻度が高いプログラム
では、ヒット率が極端に低下する。命令の流れは分岐命
令実行による分岐や例外発生時に変わる。この実施例で
は、命令の流れが変わることが予想可能な分岐命令につ
いて特に有効である。つまり、分岐命令の実行によって
命令の流れが変わると、分岐命令以降の命令をキャッシ
ュミス時にブロック読出ししても実行されない可能性が
ある。キャッシュミスによってメインメモリ3から読出
す命令は確実に実行される命令のみにすることにより、
キャッシュメモリ2を有効に利用できる。Each internal register 41 of the stop register 4
, The 6-bit instruction code IC is compared with the comparison reference data RD.
Stored as T. Generally, a branch instruction is likely to cause a cache miss in the flow of instructions. Since the cache memory 2 uses the locality of instructions, a high hit rate can be obtained with a small memory capacity. However, the hit rate is extremely high in a program in which the flow of instructions frequently shifts to a portion other than a local portion. descend. The flow of instructions changes when a branch or exception occurs due to execution of a branch instruction. This embodiment is particularly effective for a branch instruction whose instruction flow can be expected to change. That is, if the flow of the instruction is changed by the execution of the branch instruction, there is a possibility that the instruction after the branch instruction is not executed even if the block is read at the time of a cache miss. The instructions read from the main memory 3 due to the cache miss are limited to the instructions that are surely executed.
The cache memory 2 can be used effectively.
【0026】図5(A),(B)はそれぞれ本発明の第
2の実施例のブロック図及びこの実施例て扱うデータブ
ロック,タグビットのデータフォーマット図である。FIGS. 5A and 5B are a block diagram of a second embodiment of the present invention, and a data format diagram of data blocks and tag bits handled in this embodiment, respectively.
【0027】この実施例においては、16ビットの各デ
ータブロックDTと対応して1ビットのタグビットTG
が設けられ、メインメモリ3aに記憶されている。そし
てメインメモリ3aから1つのデータブロックDTが読
出されると同時に対応するタグビットTGも読出され
る。一方、ストップレジスタ4aは、このタグビットT
Gの比較の基準となる基準タグビットRTGが格納され
ている。そして比較器5aにより読出されたタグビット
TGと基準タグビットRTGとが比較され、これらが一
致したときアクティブとなる比較結果信号RSTPが出
力される。上記以外は第1の実施例と同様である。In this embodiment, 1-bit tag bit TG corresponds to each 16-bit data block DT.
Are stored in the main memory 3a. Then, one data block DT is read from main memory 3a, and at the same time, the corresponding tag bit TG is read. On the other hand, the stop register 4a stores the tag bit T
A reference tag bit RTG serving as a reference for G comparison is stored. The comparator 5a compares the read tag bit TG with the reference tag bit RTG, and outputs a comparison result signal RSTP which becomes active when they match. Other than the above, it is the same as the first embodiment.
【0028】この実施例は、メインメモリ3aにデータ
ブロックDTと対応するタグデータTGを付加する形態
をとるため、命令に限らずデータのキャッシュミス時に
も応用可能である。また、比較対象が1ビットであるの
でハードウェアが単純化されるという利点がある。Since this embodiment takes a form in which tag data TG corresponding to the data block DT is added to the main memory 3a, it is applicable not only to instructions but also to data cache misses. Further, since the comparison target is 1 bit, there is an advantage that hardware is simplified.
【0029】[0029]
【発明の効果】以上説明したように本発明は、ストップ
レジスタに比較基準データを格納しておき、キャッシュ
ミス時、メインメモリから読出されたデータブロック又
はタグビットが比較基準データと一致したときメインメ
モリのデータブロックの読出しを終了する構成とするこ
とにより、命令の並びやキャッシュミス発生位置等に適
合した数のデータブロックの読出しができるので、CP
Uが命令を実行していない損失時間を低減でき、システ
ムの処理速度を向上させることができる効果がある。As described above, according to the present invention, the comparison reference data is stored in the stop register, and when the data block or the tag bit read from the main memory coincides with the comparison reference data at the time of a cache miss, By ending the reading of the data blocks in the memory, it is possible to read the number of data blocks suitable for the instruction sequence, the location of the cache miss, and the like.
There is an effect that the loss time during which U does not execute an instruction can be reduced, and the processing speed of the system can be improved.
【図1】本発明の第1の実施例のブロック図及びこの実
施例のメモリ制御部の内部ブロック図である。FIG. 1 is a block diagram of a first embodiment of the present invention and an internal block diagram of a memory control unit of this embodiment.
【図2】図1に示された実施例の動作を説明するための
各部信号のタイミング図である。FIG. 2 is a timing chart of signals of respective parts for explaining the operation of the embodiment shown in FIG. 1;
【図3】図1に示された実施例のストップレジスタ及び
比較器の内部構成の一例を示す回路図である。FIG. 3 is a circuit diagram showing an example of an internal configuration of a stop register and a comparator of the embodiment shown in FIG.
【図4】図1に示された実施例で扱うデータブロックの
データフォーマット図及びストップレジスタの記憶内容
の一例を示す模式図である。FIG. 4 is a schematic diagram showing an example of a data format of a data block handled in the embodiment shown in FIG. 1 and an example of storage contents of a stop register.
【図5】本発明の第2の実施例のブロック図及びこの実
施例で扱うデータブロック,タグビットのデータフォー
マット図である。FIG. 5 is a block diagram of a second embodiment of the present invention and a data format diagram of data blocks and tag bits handled in this embodiment.
【図6】従来のキャッシュメモリシステムの一例を示す
ブロック図及びこのキャッシュメモリシステムのメモリ
制御部の内部構成を示すブロック図である。FIG. 6 is a block diagram illustrating an example of a conventional cache memory system and a block diagram illustrating an internal configuration of a memory control unit of the cache memory system.
【図7】図6に示されたキャッシュメモリシステムの動
作を説明するための各部信号のタイミング図である。FIG. 7 is a timing chart of signals of respective units for explaining the operation of the cache memory system shown in FIG. 6;
【図8】図6に示されたキャッシュメモリシステムの課
題を説明するためのCPUの実行パターンとデータブロ
ック転送数との関係を示す模式図である。8 is a schematic diagram illustrating a relationship between an execution pattern of a CPU and the number of data block transfers for explaining a problem of the cache memory system illustrated in FIG. 6;
1,1a CPU 2 キャッシュメモリ 3,3a メインメモリ 4,4a ストップレジスタ 5,5a 比較器 6 データバス 10,10a メモリ制御部 11,11a アドレス生成部 12,12a 制御信号生成部 13 ORゲート 14,14a カウンタ 1, 1a CPU 2 cache memory 3, 3a main memory 4, 4a stop register 5, 5a comparator 6 data bus 10, 10a memory control unit 11, 11a address generation unit 12, 12a control signal generation unit 13 OR gate 14, 14a counter
フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 12/08 - 12/12 G06F 9/44 501 Continuation of the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 12/08-12/12 G06F 9/44 501
Claims (1)
ドレスに従ってデータバスに対してタグビットを含むデ
ータブロックの書込み,読出しを行うメインメモリと、 キャッシュメモリ制御信号及びキャッシュメモリアドレ
スに従ってデータブロックの書込み,読出しを行うキャ
ッシュメモリと、 前記メインメモリ及びキャッシュメモリの前記データブ
ロックの書込み,読出し,転送制御並びに前記メインメ
モリ及びキャッシュメモリから読出されたデータブロッ
クに対する処理を行うCPUと、 基準タグビットを格納するストップレジスタと、を備え
たキャッシュメモリシステムであって、 前記キャッシュメモリに対するキャッシュミスヒットが
発生すると前記キャッシュメモリに対する前記メインメ
モリの読出しを開始し、前記ストップレジスタに格納さ
れた前記基準タグビットと前記メインメモリから読み出
された前記データブロックの前記タグビットの値とが一
致したとき前記メインメモリのデータブロックの読出し
を終了する手段を備えることを特徴とするキャッシュメ
モリシステム。1. A main memory for writing and reading a data block including a tag bit to and from a data bus in accordance with a main memory control signal and a main memory address, and writing and reading of a data block in accordance with a cache memory control signal and a cache memory address. A CPU that performs write, read, and transfer control of the data block in the main memory and the cache memory, and a process for the data block that is read from the main memory and the cache memory; and a stop that stores a reference tag bit. a cache memory system comprising a register, wherein the start the reading of the main memory to the cache memory for the cache memory and a cache miss occurs, the stopper And characterized in that it comprises means for terminating the reading of data blocks of the main memory when said tag bit value of the data block and the reference tag bits stored in Purejisuta read from the main memory match Cache memory system.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP01738592A JP3147456B2 (en) | 1992-02-03 | 1992-02-03 | Cache memory system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP01738592A JP3147456B2 (en) | 1992-02-03 | 1992-02-03 | Cache memory system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH05216755A JPH05216755A (en) | 1993-08-27 |
| JP3147456B2 true JP3147456B2 (en) | 2001-03-19 |
Family
ID=11942538
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP01738592A Expired - Fee Related JP3147456B2 (en) | 1992-02-03 | 1992-02-03 | Cache memory system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3147456B2 (en) |
-
1992
- 1992-02-03 JP JP01738592A patent/JP3147456B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH05216755A (en) | 1993-08-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0405882B1 (en) | Move 16 block move and coprocessor interface instruction | |
| JP4057114B2 (en) | Data processing system with cache and method therefor | |
| JP3204323B2 (en) | Microprocessor with built-in cache memory | |
| HK1002438B (en) | Move 16 block move and coprocessor interface instruction | |
| KR950006590B1 (en) | Microprocessor with cache memory | |
| JP3935871B2 (en) | MEMORY SYSTEM FOR COMPUTER CIRCUIT HAVING PIPELINE AND METHOD FOR PROVIDING DATA TO PIPELINE FUNCTIONAL UNIT | |
| US6976130B2 (en) | Cache controller unit architecture and applied method | |
| CN116166186A (en) | Cache controller based on dual-port Sram and working method | |
| JP3147456B2 (en) | Cache memory system | |
| US7577791B2 (en) | Virtualized load buffers | |
| JP3962853B2 (en) | Memory data error correction method | |
| JP3729832B2 (en) | Cache memory device | |
| JP3614428B2 (en) | Cache memory device | |
| JP3564343B2 (en) | Data transfer device and method during cache bypass | |
| JP3761890B2 (en) | Cache memory device | |
| JPS62115553A (en) | Invalidating system for buffer storage | |
| JP3614946B2 (en) | Memory buffer device | |
| JPH0212358A (en) | Data transfer system | |
| JP3260466B2 (en) | Memory update method | |
| US6223257B1 (en) | Instruction cache address generation technique having reduced delays in fetching missed data | |
| JP2883335B2 (en) | Information processing device | |
| JPH1185613A (en) | Cache memory | |
| JP2025149554A (en) | Microcomputer memory control circuit | |
| JP2001344152A (en) | Cache memory device | |
| JPH07105086A (en) | Bus snoop controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20000425 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20001212 |
|
| LAPS | Cancellation because of no payment of annual fees |