JPS61214039A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPS61214039A
JPS61214039A JP60054639A JP5463985A JPS61214039A JP S61214039 A JPS61214039 A JP S61214039A JP 60054639 A JP60054639 A JP 60054639A JP 5463985 A JP5463985 A JP 5463985A JP S61214039 A JPS61214039 A JP S61214039A
Authority
JP
Japan
Prior art keywords
signal
cache memory
data
associative
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
JP60054639A
Other languages
Japanese (ja)
Inventor
Atsushi Hasegawa
淳 長谷川
Tadahiko Nishimukai
西向井 忠彦
Tamotsu Takahashi
保 高橋
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.)
Hitachi Microcomputer System Ltd
Hitachi Ltd
Original Assignee
Hitachi Ltd
Hitachi Microcomputer Engineering 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 Hitachi Ltd, Hitachi Microcomputer Engineering Ltd filed Critical Hitachi Ltd
Priority to JP60054639A priority Critical patent/JPS61214039A/en
Publication of JPS61214039A publication Critical patent/JPS61214039A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0864Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using pseudo-associative means, e.g. set-associative or hashing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To increase the stored data quantity with the same chip area and also to suppress the increase of overhead in a mishit mode by storing the new data in a memory part based on a flag showing an effective data memory state for each word of a data part. CONSTITUTION:The signals 12 and 18 are supplied to the associative memory 2 of a cache memory 1 in the form of the associative write input and a valid flag respectively. The hit/mishit states, i.e., the associative results are delivered to a signal 33, and a specific row that received a hit is delivered to a signal 40. Both RAM 3a and 3b are addressed by the signal 40, and signals 14, 34 and 11 are supplied in the form of the write inputs together with signals 31, 32, 35 and 36 supplied as the read outputs respectively. The memory 2 stores the 29-bit associative information and a 1-bit valid flag and compares the signal 12 with the associative information stored in each row when a signal 19 is kept off. Then the signal 33 is turned on when a coincident row exists and the valid flag of the row is equal to '1'. The value of the signal 12 and the value of the signal 18 are written to a designated row in the form of the associative information and a valid flag respectively when the signal 19 is kept on.

Description

【発明の詳細な説明】 〔発明の利用分野〕 化に好適なオンチップキャッシュメモリに関する〔発明
の背景〕 ザ モトローラ エムシニ68020  アイイーイー
イー マイクロ 8月1984年 第101−118頁
(The Motorola MC68020IEEE
 11icr。
Detailed Description of the Invention [Field of Application of the Invention] Relating to an on-chip cache memory suitable for computer processing [Background of the Invention] The Motorola MC68020 IEEE Micro, August 1984, pages 101-118 (The Motorola MC68020 IEEE
11icr.

August  1984  ppl、0l−118)
  に記載された32ビツトマイクロプロセツサMC6
8020は、チップ上にキャッシュメモリを有している
August 1984 ppl, 0l-118)
The 32-bit microprocessor MC6 described in
8020 has cache memory on the chip.

このキャッシュメモリは1個のアドレス記憶部に対して
、32ビツトデータが対応している。アドレス記憶部は
アドレス情報のみを記憶しておりキャッシーメモリのヒ
ツト率に対しあまり寄与しないのでキャッシュメモリ全
体の面積に対しデータ記憶部の容量を大きくすることが
ヒツト率が高くできる。
In this cache memory, 32 bit data corresponds to one address storage section. Since the address storage section stores only address information and does not contribute much to the hit rate of the cache memory, the hit rate can be increased by increasing the capacity of the data storage section relative to the area of the entire cache memory.

そこでIBM社のシステム370では1アドレスに対し
て64ピツトまたは128ピツトのデータを割り当てて
いる。しかし、同様の方法を32ビツトマイクロプロセ
ツサに取り入れようとした場合、次のような問題が生ず
る。システム370においてCPUとメモリを結ぶデー
タバスの巾は64または128ピツトなのでミスヒツト
の場合メモリからキャッシュメモリへの転送は1回で終
るが、32ピツトマイクロプロセツサのデータバス巾は
32ビツトまたはそれ以下なのでミスヒツト時の転送に
2回または4回以上かかつてしまう。
Therefore, IBM's system 370 allocates 64 or 128 pits of data to one address. However, when trying to incorporate a similar method into a 32-bit microprocessor, the following problems arise. In the system 370, the width of the data bus connecting the CPU and memory is 64 or 128 bits, so in the case of a miss, the transfer from memory to cache memory is completed once, but the data bus width of a 32-bit microprocessor is 32 bits or more. Because of the following, transfers may occur twice or more than four times in the event of a mishit.

キャッシュメモリへ転送したデータを全て使う場合には
問題ないが、分岐命令の実行等によって転送された残り
のデータを使わず新たなデータを必要とする場合にはオ
ーバーヘッドとなってしまう。
There is no problem if all the data transferred to the cache memory is used, but if new data is required without using the remaining data transferred due to execution of a branch instruction, etc., it becomes an overhead.

〔発明の目的〕[Purpose of the invention]

本発明の目的は同一のチップ面積で記憶できるデータ量
を多くシ、かつミスヒツト時のオーバーヘッドが増えな
いキャッシュメモリを提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a cache memory that can store a large amount of data with the same chip area and that does not increase overhead when a miss occurs.

〔発明の概要〕[Summary of the invention]

キャッシュメモリの1つのROWを連想部の1つのアド
レス情報と外部データバス巾を単位とした複数ワードか
ら成るデータ部から構成し、データ部の各ワードごとに
そのワードに記憶されたデータが有効か否かを示すフラ
グ(以下VALIDフラグと称す)を設ければ、記憶さ
れるデータ1ワード当りの連想部の面積を小さくでき、
ミスヒツト時には該当するデータのみを書込むことによ
ってオーバーヘッドも増やさずにすむ。
One ROW of the cache memory consists of a data section consisting of one address information of an associative section and a plurality of words with the external data bus width as a unit, and each word of the data section is checked to see if the data stored in that word is valid. By providing a flag (hereinafter referred to as a VALID flag) indicating whether or not the data is valid, the area of the associative part per word of stored data can be reduced.
In the event of a mishit, only the relevant data is written, thereby eliminating the need for increased overhead.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を第1図番こより説明する。 DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIG.

キャッシュメモリ1を内蔵するマイクロプロセッサは、
例えば、メモリのデータをバイト単位にアドレッシング
可能で32ビツトのアドレス空間を有し、メモリとの間
では32ビツトを基本単位(以下、これをワードと記す
)としてデータの転送を行うものとする。また、説明を
簡単にするため、め、キャッシュメモリにはデータは保
持せず、命令のみを保持するものとする。
The microprocessor with built-in cache memory 1 is
For example, it is assumed that memory data can be addressed in bytes and has a 32-bit address space, and that data is transferred to and from the memory using 32 bits as a basic unit (hereinafter referred to as a word). Furthermore, to simplify the explanation, it is assumed that the cache memory does not hold data but only holds instructions.

キャッシュメモリ1には、命令フェッチアドレスとして
上位29ビツト(A31〜A3)の信号12と30ビツ
ト目(A2)の信号11が、命令入力として32ビツト
の信号14が入力される。
The cache memory 1 receives a signal 12 of the upper 29 bits (A31 to A3) and a signal 11 of the 30th bit (A2) as an instruction fetch address, and a signal 14 of 32 bits as an instruction input.

キャッシュメモリ1から読み出された32ビツトの命令
は信号13から、ヒツト/ミスヒツトζこ関する情報は
信号15.16および17から夫々出力される。キャッ
シュメモリ1には制御信号として信号18,19,20
,21.22が入力される。
A 32-bit instruction read from cache memory 1 is output from signal 13, and information regarding hits/misses ζ is output from signals 15, 16 and 17, respectively. The cache memory 1 receives signals 18, 19, 20 as control signals.
, 21.22 are input.

連想メモリ2には連想拳書込み入力として信号12が、
VALIDフラグとして信号18が入力され、連想結果
のヒツト/ミスヒツトが信号33に、どのROWにヒツ
トしたかが信号40に出力される。RAM3a、3bは
信号40によってtアドレッシングされ、書込み入力と
して信号1434.11が入力され、読み出し出力は信
号3132.35.36である。RAM3aの入力信号
14に対応する出力は信号31.入力信号34に対応す
る出力は信号35であり、RAM36の入力信号14に
対応する出力は信号32、入力信411に対応する出力
は信号36である。セレクタ4に入力された信号31.
32は信号11によって選択され、0のときは信号31
の値が、1のときは信号32の値が信号13に出力され
る。信号19は連想メモリ2の書込み指示信号であり信
号20は書込むROWの指定信号である。信号21はR
AM3aの書込み指示信号であり、信号22はRAM3
bの書込み指示信号である。
The associative memory 2 receives a signal 12 as an associative fist writing input.
A signal 18 is input as a VALID flag, a hit/miss in the association result is output as a signal 33, and a signal 40 indicates which ROW was hit. The RAMs 3a, 3b are t-addressed by the signal 40, the write input is the signal 1434.11, and the read output is the signal 3132.35.36. The output corresponding to the input signal 14 of the RAM 3a is the signal 31. The output corresponding to the input signal 34 is the signal 35, the output corresponding to the input signal 14 of the RAM 36 is the signal 32, and the output corresponding to the input signal 411 is the signal 36. Signal 31 inputted to selector 4.
32 is selected by signal 11, and when it is 0, signal 31
When the value of is 1, the value of signal 32 is output as signal 13. The signal 19 is a write instruction signal for the content addressable memory 2, and the signal 20 is a signal specifying the ROW to be written. Signal 21 is R
This is a write instruction signal for AM3a, and signal 22 is a write instruction signal for RAM3.
This is a write instruction signal of b.

連想メモリ2は29ビツトの連想情報と1ビツトのVA
LIDフラグを記憶し、信号19がオフのときは、信号
12と各ROWに記憶されている連想情報とを比較し一
致したROWがありかつそのROWのVALIDフラグ
が1の場合には信号33をオンにし、信号40のそのR
OWに対応するラインをオンにする。信号19がオンの
ときには、信号20によって指定されるROWに連想情
報として信号12の値をVALIDフラグとして信号1
8の値を書込み、信号40のそのROWに対応するライ
ンをオンにする。RAM3aとRAM3bはそれぞれ偶
数ワードアドレス、奇数ワードアドレスの命令を保持す
る。キャッシュメモリ1は、この外に、インバータ5.
e 、ANDゲート7.8,9、ORゲート10から成
る。
Associative memory 2 has 29 bits of associative information and 1 bit of VA.
The LID flag is stored, and when the signal 19 is off, the signal 12 is compared with the association information stored in each ROW, and if there is a matching ROW and the VALID flag of that ROW is 1, the signal 33 is activated. Turn on, that R of signal 40
Turn on the line corresponding to OW. When the signal 19 is on, the value of the signal 12 is sent as the VALID flag to the ROW specified by the signal 20 as associative information.
Write a value of 8 and turn on the line of signal 40 corresponding to that ROW. RAM3a and RAM3b hold instructions for even word addresses and odd word addresses, respectively. In addition to this, the cache memory 1 includes an inverter 5.
e, AND gates 7, 8, 9, and OR gate 10.

連想メモリ2とRAM3a、3bの各ROWの状態は4
つの状態をとりつる。この各状態は第2図に示されるよ
うに、連想メモリ2のVALIDフラグがOで該当RO
Wには有効なC命令が記憶されていない状態■、偶数ワ
ード側のみ有効な命令を記憶している状態■、奇数ワー
ド側のみに有効な命令を記憶している状態■、偶数・奇
数双方とも有効な命令を記憶している状態■である。
The status of each ROW of associative memory 2 and RAM 3a, 3b is 4.
Take control of two states. As shown in FIG. 2, in each of these states, the VALID flag of the associative memory 2 is O
A state in which no valid C instruction is stored in W, ■ A state in which a valid instruction is stored only on the even word side ■, A state in which a valid instruction is stored only in the odd word side ■, A state in which both even and odd numbers are stored Both are in a state (■) in which valid commands are stored.

第3図はキャッシュメモリ1を内蔵するマイクロプロセ
ッサのキャッシュメモリ書込み制御回路の一例である。
FIG. 3 shows an example of a cache memory write control circuit of a microprocessor incorporating the cache memory 1.

書込み制御回路は、インバータ101.102.ORゲ
ート103,104゜105 、 ANDゲート106
,107,108から成り、書込み信号50、アドレス
(A2)信号11、キャッシュメモリ1からの出力信号
15および信号18を入力とし、キャッシュメモリ1に
対する制御信号19,21.22を出力する。
The write control circuit includes inverters 101, 102 . OR gate 103, 104゜105, AND gate 106
, 107, and 108, and receives the write signal 50, address (A2) signal 11, output signal 15 and signal 18 from the cache memory 1, and outputs control signals 19, 21, and 22 for the cache memory 1.

以下、キャッシュメモリ1の動作をパージ(PURGE
 )(キャッシュメモリのクリア)、読み出し、書込み
の順に説明する。
The operation of cache memory 1 is described below.
) (clearing the cache memory), reading, and writing will be explained in this order.

PURGEは連想メモリ2力鯉己憶するVALIDフラ
グの値を全てOにすることである。最初に信号18を0
にし信号20を第1ROWを指すようにして書込み信号
50をオンにする。以後、信号20を次のROWを指す
ように変えてこれを順次繰り返す。信号18を0にして
書込み信号50をオンにすると、第3図の書込み制御回
路のインノく一タ102.ORゲート105 、AND
ゲート108の働きにより信号19がオンにされる。信
号19がオンにされると連想メモリ2への書込みが行な
われるが信号18がOなので該当ROWのVALIDフ
ラグは0にされる。従って連想メモリ2の全ROWのV
ALIDフラグがOにされPURGEが完了する。
PURGE is to set all the values of the VALID flags stored in the associative memory to O. First set signal 18 to 0
Then, the write signal 50 is turned on so that the signal 20 points to the first ROW. Thereafter, the signal 20 is changed to point to the next ROW and this process is repeated sequentially. When the signal 18 is set to 0 and the write signal 50 is turned on, the input terminal 102 of the write control circuit of FIG. OR gate 105, AND
The action of gate 108 turns on signal 19. When the signal 19 is turned on, writing to the content addressable memory 2 is performed, but since the signal 18 is 0, the VALID flag of the corresponding ROW is set to 0. Therefore, V of all ROWs of content addressable memory 2
The ALID flag is set to O and PURGE is completed.

次に読み出し動作について説明する。読み出しを行う場
合には書込み信号50をオフにし読み出す命令のアドレ
スを信号11および信号12より入力する。書込み信号
50がオフなので、書込み制御回路のANDゲート10
6,107,108によって連想メモ!J2、RAM3
a、3bに書込みを指示する信号19,21.22もオ
フにされる。連想メモリ2は信号19がオフなので信号
12によって連想を行い結果が信号33および信号40
に出力される。当該アドレスが記憶されていない場合に
は信号33がオフとなりANDゲー)37.38および
ORゲート10の働きにより信号16がオフにされ、該
当する命令がキャッシュメモリ1には保持されていない
ことが通知される。
Next, the read operation will be explained. When reading is to be performed, the write signal 50 is turned off and the address of the read command is input from the signals 11 and 12. Since the write signal 50 is off, the AND gate 10 of the write control circuit
Associative memo by 6,107,108! J2, RAM3
Signals 19, 21 and 22 instructing writing to a and 3b are also turned off. Since the signal 19 is off, the content addressable memory 2 performs association using the signal 12, and the results are the signals 33 and 40.
is output to. If the address is not stored, the signal 33 is turned off, and the AND gate 37, 38 and the OR gate 10 turn off the signal 16, indicating that the corresponding instruction is not held in the cache memory 1. Be notified.

命令アドレスが奇数ワードアドレス、状態が■の場合に
は信号11が1.信号36が0なのでインバータロ、A
NDゲート7 、ANDゲート8゜ORゲート10の働
きにより信号16がオフにされ命令が保持されていない
ことを通知する。
When the instruction address is an odd word address and the state is ■, the signal 11 is 1. Since the signal 36 is 0, the inverter is A.
The functions of the ND gate 7, the AND gate 8, and the OR gate 10 turn off the signal 16 to notify that the command is not held.

命令アドレスが奇数ワードアドレス、状態が■または■
の場合には信号11力月、信号36が1なのでANDゲ
ー) 8 、ORゲート10の働きにより信号16がオ
ンにされる。また、信号32の値がセレクタ4を介して
信号13に出力される。
Instruction address is odd word address, status is ■ or ■
In the case of , the signal 11 is 1 and the signal 36 is 1, so the AND game) 8, the signal 16 is turned on by the action of the OR gate 10. Further, the value of the signal 32 is outputted to the signal 13 via the selector 4.

次に書込み動作について説明する。書込み動作は、読み
出そうとした命令が全く記憶されていない場合、第2図
の状態■または■のように連想メモリ2にアドレスは記
憶されているがRAM3aまたはRAM3bには記憶さ
れていない場合に行なわれる。キャッシュメモリへの書
込みは信号18を1にし書込む命令のアドレスを信号1
1および信号12に、書込む命令を信号14に与えた状
態で書込み信号50をオンにすることにより行なわれる
Next, the write operation will be explained. A write operation is performed when the instruction to be read is not stored at all, or when the address is stored in the associative memory 2 but not in the RAM 3a or RAM 3b, as in state ■ or ■ in Figure 2. It will be held in To write to the cache memory, set signal 18 to 1 and set the address of the instruction to write to signal 1.
This is done by turning on the write signal 50 with a write command given to the signal 14 and the write command to the signals 1 and 12.

当該アドレスが記憶されている場合にけ信号33がオン
番こされる。また信号21および信号22がオフなので
l(AM3aおよびRAM3b(7)信号40で示され
るROWの内容が信号31.信号32.信号35.信号
36に読み出される。この後の動作は読み出す命令のア
ドレスが偶数ワードアドレスか奇数ワードアドレスか、
またRAM3aおよびRAM3bの状態が第2図の■、
■。
Only when the address is stored, the signal 33 is turned on. Also, since the signals 21 and 22 are off, the contents of the ROW indicated by the (AM3a and RAM3b (7) signal 40 are read out to the signals 31, 32, 35, and 36. is an even word address or an odd word address,
In addition, the states of RAM3a and RAM3b are as shown in Figure 2.
■.

■のいずれかの状態によって異なる。■It depends on the state of either.

命令アドレスが偶数ワードアドレスで状態が■または■
の場合には信号11がO1信号35が1なのでインバー
タ6 、ANDゲー) 7 、ORゲート10の働きに
より信号16がオンされ該当する命令が保持されている
ことが通知され、信号31の値がセレクタ4を介して信
号13に出力される。
The instruction address is an even word address and the status is ■ or ■
In this case, since the signal 11 is O1 and the signal 35 is 1, the inverter 6 and the AND gate 7 turn on the signal 16 due to the action of the OR gate 10, notifying that the corresponding command is held, and the value of the signal 31 becomes It is output as a signal 13 via the selector 4.

命令アドレスが偶数ワードアドレスで状態が■の場合に
は信号11がO2信号35がOなのでインバータ6 、
ANDゲート7 、ANDゲート8゜ORゲート10の
働きにより信号16がオフにされ命令が保持されていな
いことが通知される。
If the instruction address is an even word address and the state is ■, the signal 11 is O2 and the signal 35 is O, so the inverter 6,
The AND gate 7, the AND gate 8 and the OR gate 10 turn off the signal 16 and notify that the command is not held.

読み出そうとした命令が全く記憶されていない場合、連
想メモリ2の信号33がオフになるのでインバータ5の
出力信号15はオンとなる。書込み制御回路で書込み信
号50がオンで信号15がオンとなるのでOftゲート
103,104,105ANDゲート106,107.
108の働きにより信号19,21.22はすべてオン
となる。信号19がオンになると連想メモリ2の信号2
0によって指定されるROWに信号12と信号18の値
が書込まれる。書込む命令のアドレスが偶数ワードアド
レスの場合、信号11は0でありインバータ6の出力信
号34が1となるのでRAN3alこは信号14の命令
が書込まれVALID情報は1にされ、RAM3bには
信号14の命令は書込まれるがV A L I D情報
はOにされるので第2図の状態■となる。書込む命令の
アドレスが奇数ワードアドレスの場合、信号11は1で
ありインバータ6の出力信号34がOとなるので前記と
逆に状態■となる。
If the instruction to be read is not stored at all, the signal 33 of the associative memory 2 is turned off, and the output signal 15 of the inverter 5 is turned on. Since the write signal 50 is turned on and the signal 15 is turned on in the write control circuit, Of gates 103, 104, 105 AND gates 106, 107 .
Due to the action of signal 108, signals 19, 21, and 22 are all turned on. When signal 19 turns on, signal 2 of associative memory 2
The values of signals 12 and 18 are written to the ROW designated by 0. If the address of the instruction to write is an even word address, the signal 11 is 0 and the output signal 34 of the inverter 6 is 1, so the instruction of the signal 14 is written to the RAN3al, the VALID information is set to 1, and the RAM 3b is set to 1. Although the command of signal 14 is written, the VALID information is set to O, resulting in the state 2 in FIG. 2. When the address of the write instruction is an odd word address, the signal 11 is 1 and the output signal 34 of the inverter 6 is O, so that the state 2 is reversed to the above.

状態■で命令を書込む場合、すなわち奇数ワードアドレ
スで信号11が1の場合は、信号33がオンとなりイン
バータ5の出力信号15はオフとなるので書込み制御回
路のORゲート104゜ANDゲート107の働きによ
り信号22はオン番こされるが、信号19と信号21は
オフのままとなる。信号22がオンとなるのでRAM3
bには、信号14の命令が書込まれVALID情報は1
にされる。これによりキャッシュメモリ1の状態は■に
なる。
When writing a command in state ■, that is, when the signal 11 is 1 at an odd word address, the signal 33 is turned on and the output signal 15 of the inverter 5 is turned off. As a result, signal 22 is turned on, but signal 19 and signal 21 remain off. Since signal 22 is turned on, RAM3
The command of signal 14 is written to b, and the VALID information is 1.
be made into As a result, the state of the cache memory 1 becomes ■.

状態■で命令を書込む場合、すなわち奇数ワードアドレ
スで信号11がOの場合は、書込み制御回路の出力のう
ち信号21がオンとなり信号19と信号22はオフとな
る。信号21がオンとなるのでRAM3aには信号14
の命令が書込まれVALID情報は1tこなる。よって
キャッジ纂メモリ1の状態は■になる。
When writing a command in state (2), that is, when the signal 11 is O at an odd word address, the signal 21 among the outputs of the write control circuit is turned on, and the signals 19 and 22 are turned off. Since signal 21 is turned on, signal 14 is stored in RAM3a.
This command is written and the VALID information becomes 1t. Therefore, the state of the cache compilation memory 1 becomes ■.

信号17はANDゲート9の入力が信号33と信号36
なので命令フヱッチアドレスの値にかかわらず奇数ワー
ドアドレス側がヒツトしたかどうかを表すので偶数ワー
ドアドレスの読み出し時に次の命令がキャラ勾モリ1に
あるかどうかの判定が行なえる。次の命令がキャッシュ
メモリにある場合、次の命令はRAM3bから読み出さ
れているのでアドレス信号11を1にしセレクタ4を切
り換えることにより次の命令が信号131こ出力される
The input of the AND gate 9 is the signal 17, which is the signal 33 and the signal 36.
Therefore, regardless of the value of the instruction switch address, it indicates whether the odd word address side has been hit or not, so it can be determined whether the next instruction is in character memory 1 when reading the even word address. When the next instruction is in the cache memory, the next instruction has been read out from the RAM 3b, so by setting the address signal 11 to 1 and switching the selector 4, the next instruction is output as the signal 131.

本実施例によれば偶数ワードアドレスtこ次いて次の命
令を読み出す場合、該当命令がキャッシュメモリにあれ
ば直ちに読み出すことができ、該当命令がない場合にも
読み出し動作を行なわずに判明されるため平均的な命令
フェッチ時間を短かくする効果がある。
According to this embodiment, when reading the next instruction after an even word address t, if the relevant instruction is in the cache memory, it can be read immediately, and even if the relevant instruction is not present, it can be determined without performing a read operation. This has the effect of shortening the average instruction fetch time.

なお、本実施例では連想メモリに対応するRAMのワー
ド数を2としたが、2のべき乗であれば容易に拡張出来
ることは自明であろう。
In this embodiment, the number of words of the RAM corresponding to the associative memory is set to 2, but it is obvious that it can be easily expanded to a power of 2.

本発明によればアドレス連想部1ワードに対し複数ワー
ドのデータ部を対応させることができ、また対応するデ
ータ部すべてに有効なデータを書く必要もないので、小
さい面積で多くのデータを記憶できるキャッシュメモリ
を構成することができ、プロセッサと主記憶との間のデ
ータ線の本数を増加させなくとも不必要なメモリアクセ
スを生しないようにできるので、信号線数およびチップ
面積に制限のあるマイクロプロセッサの高速化に効果が
ある。
According to the present invention, it is possible to associate a plurality of word data sections with one word of the address association section, and it is not necessary to write valid data in all the corresponding data sections, so a large amount of data can be stored in a small area. Cache memory can be configured, and unnecessary memory access can be avoided without increasing the number of data lines between the processor and main memory. Effective in speeding up the processor.

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

第1図は本発明の一実施例であるキャッシュメモリの構
成図、第2図はキャッシュメモリの内部状態図、第3図
は書込み制御回路である。 1・・・キャッシュメモリ、2・・・連想メモリ、3a
13b・・・ランダムアクセスメモリ、4・・・セレク
タ、5.6・・・インバータ、7,8.9・・・AND
ゲート、10・・・ORゲート。 代理人 弁理士 小 川 勝 男 第7図
FIG. 1 is a block diagram of a cache memory according to an embodiment of the present invention, FIG. 2 is an internal state diagram of the cache memory, and FIG. 3 is a write control circuit. 1...Cache memory, 2...Associative memory, 3a
13b... Random access memory, 4... Selector, 5.6... Inverter, 7, 8.9... AND
Gate, 10...OR gate. Agent: Patent Attorney Katsoo Ogawa Figure 7

Claims (1)

【特許請求の範囲】 1、アドレス情報の記憶と一致検出を行う連想部と該連
想部の1アドレス情報に対し複数のワードを記憶するデ
ータ部から成るキャッシュメモリにおいて、データ部の
各ワードごとに対応するワードに有効なデータが記憶さ
れているか否かを示すフラグを設け、該フラグに基づき
該記憶部に新規データを記憶することを特徴とするキャ
ッシュメモリ。 2、前記連想部は該データ部とは別に前記フラグを有す
ることを特徴とする特許請求の範囲第1項のキャッシュ
メモリ。 3、前記データ部の各ワードと対応する前記フラグは対
にして、各々のワード間では独立に書込みを行えること
を特徴とする特許請求の範囲第1項または第2項のキャ
ッシュメモリ。 4、前記データ部の前記フラグは該複数のワードに対応
するものが同時に読み出せることを特徴とする特許請求
の範囲第1項乃至第3項のキャッシュメモリ。 5、前記複数のワードは連続したアドレスに対応するこ
とを特徴とする特許請求の範囲第1項乃至第4項のキャ
ッシュメモリ。
[Scope of Claims] 1. In a cache memory consisting of an associative part that stores address information and detects a match, and a data part that stores a plurality of words for one address information of the associative part, for each word of the data part. A cache memory characterized by providing a flag indicating whether or not valid data is stored in a corresponding word, and storing new data in the storage unit based on the flag. 2. The cache memory according to claim 1, wherein the association section has the flag separately from the data section. 3. The cache memory according to claim 1 or 2, wherein the flags corresponding to each word of the data section are paired, and writing can be performed independently between each word. 4. The cache memory according to any one of claims 1 to 3, wherein the flags of the data portion corresponding to the plurality of words can be read simultaneously. 5. The cache memory according to any one of claims 1 to 4, wherein the plurality of words correspond to consecutive addresses.
JP60054639A 1985-03-20 1985-03-20 Cache memory Pending JPS61214039A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60054639A JPS61214039A (en) 1985-03-20 1985-03-20 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60054639A JPS61214039A (en) 1985-03-20 1985-03-20 Cache memory

Publications (1)

Publication Number Publication Date
JPS61214039A true JPS61214039A (en) 1986-09-22

Family

ID=12976341

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60054639A Pending JPS61214039A (en) 1985-03-20 1985-03-20 Cache memory

Country Status (1)

Country Link
JP (1) JPS61214039A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0267628A2 (en) * 1986-11-14 1988-05-18 Hitachi, Ltd. Microprocessor with a cache memory
JPH01199249A (en) * 1987-10-05 1989-08-10 Motorola Inc Bus master for selectively trying to fill cash line to full entry
JPH0527971A (en) * 1991-07-24 1993-02-05 Nec Corp Information processor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0267628A2 (en) * 1986-11-14 1988-05-18 Hitachi, Ltd. Microprocessor with a cache memory
JPS63238646A (en) * 1986-11-14 1988-10-04 Hitachi Ltd Microprocessor
EP0267628A3 (en) * 1986-11-14 1990-07-04 Hitachi, Ltd. Microprocessor with a cache memory
JPH01199249A (en) * 1987-10-05 1989-08-10 Motorola Inc Bus master for selectively trying to fill cash line to full entry
JPH0527971A (en) * 1991-07-24 1993-02-05 Nec Corp Information processor

Similar Documents

Publication Publication Date Title
JP2776132B2 (en) Data processing system with static and dynamic masking of information in operands
JPH08328958A (en) Instruction cache as well as apparatus and method for cache memory
JPS63195752A (en) Cache memory
KR950006590B1 (en) Microprocessor with a cache memory
JPH03147038A (en) Cache memory
JPS629456A (en) Data transfer unit
JPS60124754A (en) Buffer storage control system
JPS61214039A (en) Cache memory
JP2000207281A (en) Processor and method for data processing
JP3688736B2 (en) Data memory
EP0787326B1 (en) System and method for processing of memory data and communication system comprising such system
US6279082B1 (en) System and method for efficient use of cache to improve access to memory of page type
JPH0239339A (en) Cache memory device
JPH1055308A (en) Cache memory
JPH04195563A (en) Controller for memory system
JP2002149488A (en) Integrated circuit device and method for controlling cache memory
JPH06266623A (en) Cache memory and cache memory control method
JPH04288647A (en) Substitution controller for cache memory
JP3074897B2 (en) Memory circuit
JPS60183652A (en) Cache memory control method
JPS63201852A (en) Access control system for cache memory
JPH06243045A (en) Cache memory
JPH03127126A (en) Information processor
JPH0498550A (en) Diagnostic system for cache coincidence processing unit
JPH06168346A (en) Configuration system for storage device