[go: up one dir, main page]

JP3465362B2 - Data processing device having cache memory - Google Patents

Data processing device having cache memory

Info

Publication number
JP3465362B2
JP3465362B2 JP18440294A JP18440294A JP3465362B2 JP 3465362 B2 JP3465362 B2 JP 3465362B2 JP 18440294 A JP18440294 A JP 18440294A JP 18440294 A JP18440294 A JP 18440294A JP 3465362 B2 JP3465362 B2 JP 3465362B2
Authority
JP
Japan
Prior art keywords
data
cache memory
instruction
memory
signal
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
Application number
JP18440294A
Other languages
Japanese (ja)
Other versions
JPH0798673A (en
Inventor
光太郎 島村
多加志 堀田
俊彦 栗原
成弥 田中
英雄 澤本
明良 大角
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 Ltd
Original Assignee
Hitachi 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 filed Critical Hitachi Ltd
Priority to JP18440294A priority Critical patent/JP3465362B2/en
Publication of JPH0798673A publication Critical patent/JPH0798673A/en
Application granted granted Critical
Publication of JP3465362B2 publication Critical patent/JP3465362B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、キャッシュメモリを有
する計算機に関するソフトウェアプリフェッチを行うデ
ータ処理装置に係り、とくに2種類のキャッシュメモリ
を効率よく用いるデータ処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device for software prefetching a computer having a cache memory, and more particularly to a data processing device which efficiently uses two types of cache memories.

【0002】[0002]

【従来の技術】キャッシュメモリを有する計算機は、大
容量・低速の主メモリに格納されているデータの中で頻
繁に使われるデータを小容量・高速なキャッシュメモリ
に格納し、CPU等の命令ユニットはキャッシュメモリ
との間でデータのアクセスを高速に行い、キャッシュメ
モリにデータが無い場合にだけ主メモリとアクセスする
ものが一般的である。
2. Description of the Related Art A computer having a cache memory stores frequently used data in a small-capacity, high-speed cache memory among data stored in a large-capacity, low-speed main memory, and an instruction unit such as a CPU. Generally performs high-speed data access with the cache memory and accesses the main memory only when there is no data in the cache memory.

【0003】しかし、メモリに比べてCPUのマシンサ
イクルが急激に短縮されたため、キャッシュミス時のペ
ナルティ(主メモリから要求データを獲得するまでの時
間)が大きくなってきている。
However, since the machine cycle of the CPU is drastically shortened as compared with the memory, the penalty at the time of a cache miss (the time until the requested data is acquired from the main memory) is increasing.

【0004】これを解決するためのソフトウェアプリフ
ェッチとよばれる手法が、David Callahan 他、“Softw
are Prefetching”Fourth International Conference o
nArchitectual Support for Programming Languages an
d Operating Systems, 1991, p.40〜52に記載されてい
る。この第1の従来技術によると、プリフェッチ命令に
よって、命令ユニットがデータを必要とする以前に、ア
ドレス計算を行い、そのアドレスが示すデータがキャッ
シュメモリにあるかどうか検出し、キャッシュメモリに
なければ主メモリよりキャッシュメモリへ転送してお
く。このようにすることで、データを必要としたときに
は、プリフェッチ命令により予めキャッシュメモリにデ
ータが格納されているので、キャッシュメモリのヒット
率を向上させ、ペナルティを最小にすることができる。
A method called software prefetch for solving this problem is described in "Softw" of David Callahan et al.
are Prefetching ”Fourth International Conference o
nArchitectual Support for Programming Languages an
d Operating Systems, 1991, p.40-52. According to the first conventional technique, the prefetch instruction performs address calculation before the instruction unit needs the data, detects whether or not the data indicated by the address exists in the cache memory, and if the data does not exist in the cache memory, the main operation is performed. Transfer from memory to cache memory. By doing so, when the data is needed, the data is stored in the cache memory in advance by the prefetch instruction, so that the hit rate of the cache memory can be improved and the penalty can be minimized.

【0005】また、キャッシュメモリを用途の異なる2
つのバッファから構成し、ハードウェアによって使い分
けるものが特開平4−303248 号に記載されている。
Further, the cache memory has two different uses.
Japanese Patent Application Laid-Open No. 4-303248 discloses a buffer which is composed of three buffers and which is selectively used depending on the hardware.

【0006】この第2の従来技術によると、キャッシュ
メモリは時間的に頻繁にアクセスするデータを格納する
Sバッファとプログラムにより将来に参照されるアドレ
スが現在の参照しているアドレスの近傍にあるデータを
格納するPバッファとを有し、アドレス指定方式とアド
レス計算に用いられるレジスタによって、Pバッファと
Sバッファとを使い分けている。
According to the second conventional technique, the cache memory stores the data which is frequently accessed in time and the data which is referred to in the future by the program in the vicinity of the address currently referred to by the program. , And a P buffer for storing the P buffer, and the P buffer and the S buffer are selectively used depending on the addressing method and the register used for the address calculation.

【0007】[0007]

【発明が解決しようとする課題】第1の従来技術による
と、主メモリからキャッシュメモリへの転送と命令ユニ
ットからのメモリ参照命令を同時に処理するためには、
高価な2ポートキャッシュメモリを用いなければならな
いという第1の問題がある。勿論、同時処理を行わない
のであれば、一般に用いられている1ポートキャッシュ
メモリでよいが、これだと処理時間がかかり、ソフトウ
ェアプリフェッチの特徴が活かせない。
According to the first prior art, in order to process a transfer from a main memory to a cache memory and a memory reference instruction from an instruction unit at the same time,
The first problem is that an expensive 2-port cache memory must be used. Of course, if the simultaneous processing is not performed, a commonly used 1-port cache memory may be used, but this requires a long processing time and the characteristics of software prefetch cannot be utilized.

【0008】また、キャッシュメモリから1度読み出さ
れるだけで、すぐにキャッシュから追い出されてしまう
データをキャッシュメモリに保持しておくと、キャッシ
ュメモリの汚染が大きくなり、ヒット率が低下するとい
う第2の問題がある。
Further, if the data that is read out from the cache memory only once and is immediately evicted from the cache is held in the cache memory, the pollution of the cache memory becomes large and the hit rate decreases. There is a problem.

【0009】これらの問題は、キャッシュメモリに入り
きれない大規模なデータを扱うプログラムで顕著であ
る。
These problems are remarkable in a program that handles large-scale data that cannot fit in the cache memory.

【0010】第2の従来技術によると、2つのキャッシ
ュメモリのどちらにデータをいれるかは、アドレス指定
方式とアドレス計算に用いるレジスタから決めるので、
データサイズ等のデータの特性を考慮して2つのキャッ
シュメモリを使い分けれないという第3の問題がある。
According to the second conventional technique, which of the two cache memories is to receive data is determined by the addressing method and the register used for the address calculation.
There is a third problem that the two cache memories cannot be used properly in consideration of data characteristics such as data size.

【0011】本発明の目的は、上記問題点を解決し、キ
ャッシュメモリに格納され頻繁にアクセスされる小容量
のデータと、キャッシュメモリに入りきれない大規模デ
ータとを高速に効率よく処理し、キャッシュメモリの汚
染を小さくし、ヒット率を向上させるデータ処理装置を
提供することにある。
An object of the present invention is to solve the above-mentioned problems and to process small data stored in a cache memory and frequently accessed and large-scale data that cannot be stored in the cache memory efficiently at high speed. An object of the present invention is to provide a data processing device that reduces the pollution of the cache memory and improves the hit rate.

【0012】[0012]

【課題を解決するための手段】上記目的を達成するため
の本発明の特徴は、主メモリと命令処理部との間に大容
量で1ポートの第1のキャッシュメモリと小容量で2ポ
ートの第2のキャッシュメモリとを有し、アクセス頻度
の高いデータは上記第1のキャッシュメモリに格納し、
アクセス頻度の低いデータは上記第2のキャッシュメモ
リに格納するプリフェッチ命令によって制御される制御
部であって、データを格納するために上記第1のキャッ
シュメモリ又は上記第2のキャッシュメモリを制御する
制御部とを有することを特徴とする。
A feature of the present invention for achieving the above object is that a large-capacity 1-port first cache memory and a small-capacity 2-port are provided between a main memory and an instruction processing unit. A second cache memory, and stores frequently accessed data in the first cache memory;
The data having a low access frequency is a control unit controlled by a prefetch instruction stored in the second cache memory, and is a control for controlling the first cache memory or the second cache memory to store the data. And a part.

【0013】[0013]

【作用】第1のキャッシュメモリにはアクセス頻度の高
いデータを格納するので、ヒット率が向上する。また、
アクセス頻度の低いデータは格納しないので、第1キャ
ッシュメモリの汚染を小さくできる。
Since the frequently accessed data is stored in the first cache memory, the hit rate is improved. Also,
Since the data with low access frequency is not stored, the pollution of the first cache memory can be reduced.

【0014】第2のキャッシュメモリにはアクセス頻度
の低いデータを格納するので、そのデータが処理された
あとは第2のキャッシュメモリから削除することができ
る。つまり、第2のキャッシュメモリの容量は小容量で
はあるが常にアクセスされるべきデータが格納されてい
るのでヒット率を高めることができる。
Since data having a low access frequency is stored in the second cache memory, it can be deleted from the second cache memory after the data is processed. That is, although the capacity of the second cache memory is small, since the data to be accessed at all times is stored, the hit rate can be increased.

【0015】また、第2のキャッシュメモリは2ポート
であるので、アクセス頻度の低い大規模データに対し
て、主メモリからのデータ転送と命令ユニットからのメ
モリ参照命令とを同時に処理することで、高効率な処理
ができる。
Since the second cache memory has two ports, by simultaneously processing the data transfer from the main memory and the memory reference instruction from the instruction unit for large-scale data with low access frequency, Highly efficient processing is possible.

【0016】さらに、主メモリからのデータ転送と命令
ユニットからのメモリ参照命令との同時処理の機能は、
小容量の第2のキャッシュメモリにだけもたせればよい
ので、ハードウェアの物量が小さくて済み、コストも低
くできる。
Furthermore, the function of simultaneous processing of data transfer from the main memory and memory reference instruction from the instruction unit is:
Since only the small capacity second cache memory needs to be provided, the amount of hardware can be small and the cost can be reduced.

【0017】[0017]

【実施例】図34は、本発明の概略図である。FIG. 34 is a schematic diagram of the present invention.

【0018】本発明の計算機は、命令ユニット201,
メモリユニット202及び主メモリ203から構成され
る。
The computer of the present invention comprises an instruction unit 201,
It is composed of a memory unit 202 and a main memory 203.

【0019】命令ユニット201は例えば演算や制御を
行うCPUなどである。
The instruction unit 201 is, for example, a CPU or the like that performs calculation and control.

【0020】メモリユニット202は、第1のキャッシ
ュメモリ101,第2のキャッシュメモリ100及び制
御ユニット1600から構成される。
The memory unit 202 comprises a first cache memory 101, a second cache memory 100 and a control unit 1600.

【0021】主メモリ203は、命令やデータを格納す
る記憶装置である。
The main memory 203 is a storage device for storing instructions and data.

【0022】命令ユニット201は命令の処理を行うユ
ニットであり、バス3402を介して、メモリユニット
202にデータの読み出し及び書き込みを要求し、アド
レス、及びデータをやり取りする。また、プリフェッチ
命令の処理を行う時には、主メモリ203からメモリユ
ニット202に転送されたデータを、第1のキャッシュ
メモリ101,第2のキャッシュメモリ100のいずれ
に書き込むかの情報を、制御信号線3404を介して制
御ユニット1600に送出する。
The instruction unit 201 is a unit for processing instructions, requests the memory unit 202 to read and write data, and exchanges addresses and data via the bus 3402. Further, when the prefetch instruction is processed, the control signal line 3404 receives information indicating whether the data transferred from the main memory 203 to the memory unit 202 is written in the first cache memory 101 or the second cache memory 100. To the control unit 1600 via.

【0023】制御ユニット1600は、命令ユニット2
01が読み出しまたは書き込みを要求したアドレスのデ
ータが、第1のキャッシュメモリ101,第2のキャッ
シュメモリ100のいずれかに存在する時には、該当す
るキャッシュメモリの読み出しまたは書き込みを行う。
命令ユニット201が要求したアドレスのデータが、第
1のキャッシュメモリ101,第2のキャッシュメモリ
100のいずれにも存在しない時には、バス3406を
介して、主メモリ203にデータの読み出しまたは書き
込みを要求し、アドレス及びデータをやり取りする。ま
た、命令ユニット201からプリフェッチ命令の要求を
受け付けた時には、主メモリ203にデータの読み出し
を要求し、制御信号線3404を通して受け取った情報
に従って、主メモリ203から転送されてきたデータを
第1のキャッシュメモリ101、または第2のキャッシ
ュメモリ100のいずれかに書き込む。
The control unit 1600 is the command unit 2
When the data of the address that 01 has requested to read or write exists in either the first cache memory 101 or the second cache memory 100, the corresponding cache memory is read or written.
When the data at the address requested by the instruction unit 201 does not exist in either the first cache memory 101 or the second cache memory 100, the main memory 203 is requested to read or write the data via the bus 3406. , Exchange addresses and data. When the prefetch instruction request is received from the instruction unit 201, the main memory 203 is requested to read the data, and the data transferred from the main memory 203 is transferred to the first cache according to the information received through the control signal line 3404. Write to either the memory 101 or the second cache memory 100.

【0024】主メモリ203は、メモリユニット202
の要求に従って、データの読み出しまたは書き込みを行
う。
The main memory 203 is a memory unit 202.
The data is read or written according to the request.

【0025】図1は、本発明のブロック図である。FIG. 1 is a block diagram of the present invention.

【0026】メモリユニット202は、第1のキャッシ
ュメモリ101,第2のキャッシュメモリ100及びこ
れらにデータの入出力を行うためのセレクタ104,16
05や制御ユニット1600からなる制御部から構成され
る。
The memory unit 202 includes a first cache memory 101, a second cache memory 100, and selectors 104, 16 for inputting / outputting data to / from these.
It is composed of a control unit consisting of 05 and control unit 1600.

【0027】命令ユニット201は例えば演算や制御を
行うCPUなどである。
The instruction unit 201 is, for example, a CPU or the like that performs calculation and control.

【0028】メモリユニット202は、第1のキャッシ
ュメモリ101,第2のキャッシュメモリ100及びこ
れらにデータの入出力を行うためのセレクタ104,16
05や制御ユニット1600からなる制御部から構成され
る。
The memory unit 202 includes a first cache memory 101, a second cache memory 100, and selectors 104 and 16 for inputting / outputting data to / from these.
It is composed of a control unit consisting of 05 and control unit 1600.

【0029】主メモリ203は、命令やデータを格納す
る記憶装置である。
The main memory 203 is a storage device for storing instructions and data.

【0030】第1のキャッシュメモリ101は、第2の
キャッシュメモリ100に比べて大容量で1ポートのキ
ャッシュメモリである。
The first cache memory 101 is a one-port cache memory having a larger capacity than the second cache memory 100.

【0031】第2のキャッシュメモリ100は、第1の
キャッシュメモリに比べて小容量で2ポートを有するキ
ャッシュメモリである。
The second cache memory 100 is a cache memory having a smaller capacity and two ports than the first cache memory.

【0032】命令ユニット201は、命令の処理を行う
ユニットであり、バス210,211,212を通して第1
のキャッシュメモリ101、及び、第2のキャッシュメ
モリ100とデータのやり取りを行う。つまり、アドレ
スバス210,4バイト幅の書き込みデータバス21
1,制御信号線213を介して、アドレス,データ及び
制御信号をメモリユニット202,主メモリ203に送
出する。
The instruction unit 201 is a unit for processing instructions, and is a first unit through the buses 210, 211 and 212.
Data is exchanged with the cache memory 101 and the second cache memory 100. That is, the address bus 210 and the write data bus 21 having a 4-byte width
1, to send address, data and control signals to the memory unit 202 and the main memory 203 via the control signal line 213.

【0033】メモリユニット202は、4バイト幅の読
み出しデータバス212,待ち信号線214を介して、
データ及び待ち信号を命令ユニット201に送出し、要
求信号線218を介して、要求信号を主メモリ203に
送出する。
The memory unit 202 has a 4-byte width read data bus 212 and a wait signal line 214,
The data and the wait signal are sent to the instruction unit 201, and the request signal is sent to the main memory 203 via the request signal line 218.

【0034】主メモリ203は、バス215,216を
通して第1のキャッシュメモリ101と第2のキャッシュ
メモリ100へデータを転送する。つまり、主メモリ2
03は、転送データバス215,転送アドレスバス21
6,応答信号線217を介して、データ,アドレス及び
応答信号をメモリユニット202に送出する。
The main memory 203 transfers data to the first cache memory 101 and the second cache memory 100 via the buses 215 and 216. That is, the main memory 2
03 is a transfer data bus 215, a transfer address bus 21
6. Send data, address and response signal to the memory unit 202 via the response signal line 217.

【0035】図12は、図1の命令ユニット201で処
理する命令のオペコードのフォーマットの1例を説明す
る図である。OPはオペコード、A,Bは、ソースレジ
スタを指示するフィールド、Cはターゲットレジスタを
指示するフィールド、dは、イミィディエットデータを
示すフィールドである。
FIG. 12 is a diagram for explaining an example of the format of the operation code of the instruction processed by the instruction unit 201 of FIG. OP is an opcode, A and B are fields for instructing a source register, C is a field for instructing a target register, and d is a field for indicating immediate data.

【0036】図13は、図1の命令ユニット201で処
理する命令の種類を示す図である。簡単のため、本実施
例では命令は10命令に限られているが、これは本発明
の用途を限定するものではない。通常のプロセッサと同
じように数十から百以上の命令を持った計算機の場合に
も、本発明を適用することができる。
FIG. 13 is a diagram showing the types of instructions processed by the instruction unit 201 of FIG. For simplicity, the number of instructions is limited to 10 in this embodiment, but this does not limit the application of the present invention. The present invention can be applied to a computer having a few tens to a hundred or more instructions like a normal processor.

【0037】AND,OR,ADD,SUBの各命令
は、ソースレジスタAとBに対応する演算を施し、ター
ゲットレジスタCに格納する。
The AND, OR, ADD, and SUB instructions carry out operations corresponding to the source registers A and B and store them in the target register C.

【0038】NOT命令はソースレジスタAのビット反
転をターゲットレジスタCに格納する。
The NOT instruction stores the bit inversion of source register A in target register C.

【0039】分岐命令BRAは、プログラムカウンタP
Cにイミィディエットdを加算してプログラムカウンタ
PCに格納する。
The branch instruction BRA is a program counter P.
Immediate d is added to C and stored in the program counter PC.

【0040】ロード命令LDは、レジスタAの内容とB
の内容を加算したものをアドレスとし、読み出したデー
タをレジスタCに格納する。
The load instruction LD is the contents of register A and B.
The read data is stored in the register C by adding the contents of the above to the address.

【0041】ストア命令STは、レジスタBの内容を、
レジスタAの内容をアドレスとして書き込む。
The store instruction ST changes the contents of the register B to
The contents of register A are written as an address.

【0042】次に、プリフェッチ命令について説明す
る。
Next, the prefetch instruction will be described.

【0043】プリフェッチ命令PF1は、レジスタAの
内容とBの内容を加算したものをアドレスとして、前記
第1のキャッシュメモリ101と第2のキャッシュメモ
リ100に該当するデータが有るか無いかを調べ、無い
ときには、主メモリ203より第1キャッシュメモリ1
01にデータを転送する。
The prefetch instruction PF1 checks whether or not there is corresponding data in the first cache memory 101 and the second cache memory 100 by using an address obtained by adding the contents of the register A and the contents of B, When there is not, the first cache memory 1 from the main memory 203
The data is transferred to 01.

【0044】プリフェッチ命令PF2は、PF1とほぼ
同じ機能であるが、転送したデータを第2キャッシュメ
モリ100に書き込む点が異なる。
The prefetch instruction PF2 has almost the same function as that of PF1 except that the transferred data is written in the second cache memory 100.

【0045】後で詳しく説明するが、第1キャッシュメ
モリ101は、容量1Mバイト,ブロックサイズ16バ
イトのダイレクトマップ方式のキャッシュメモリであ
る。
As will be described later in detail, the first cache memory 101 is a direct map type cache memory having a capacity of 1 Mbytes and a block size of 16 bytes.

【0046】ダイレクトマップ方式は、メモリのアドレ
スにより、キャッシュに格納する場所が一意的に決まる
方式である。
The direct map system is a system in which a memory location is uniquely determined by a memory address.

【0047】第2キャッシュメモリ100は、ブロック
サイズ4バイト,64エントリのフルアソシアティブ方
式のキャッシュメモリである。
The second cache memory 100 is a full-associative cache memory having a block size of 4 bytes and 64 entries.

【0048】フルアソシアティブ方式は、メモリの任意
アドレスのデータをキャッシュ上の任意の格納場所に格
納する方式である。
The full associative method is a method of storing data at an arbitrary address in the memory in an arbitrary storage location on the cache.

【0049】再利用する可能性のあるデータをプリフェ
ッチするときには、PF1命令を用い、再利用する可能
性の無い、又は、少ないデータをプリフェッチするとき
には、PF2命令を用いる。
The PF1 instruction is used when prefetching data that may be reused, and the PF2 instruction is used when prefetching data that has no or little reuse possibility.

【0050】再利用性の判断はコンパイラがオブジェク
トコード生成時に行う。例えば、キャッシュに入りきれ
ないような大規模なデータをアクセスするときには、キ
ャッシュに入れても再利用の可能性無しと判断してPF
2命令を用いる。
The determination of reusability is made by the compiler when the object code is generated. For example, when accessing a large amount of data that cannot fit in the cache, it is judged that there is no possibility of reuse even if it is stored in the cache, and the PF
Two instructions are used.

【0051】第1のキャッシュメモリ101は容量1M
バイトと、第2のキャッシュメモリ100に比べて大容
量であるが、1ポートであるため、全体としてはそれほ
ど大きくなく、又、高速動作する。
The first cache memory 101 has a capacity of 1M.
Although it has a byte and a larger capacity than the second cache memory 100, since it is one port, it is not so large as a whole and operates at high speed.

【0052】第2のキャッシュメモリ100はフルアソ
シアティブ方式で、かつ、命令ユニット1よりのメモリ
参照命令と、主メモリ203よりのデータ転送を並列し
て処理するため、セルの構造は複雑であるが、エントリ
数が64と少ないため、全体としての大きさは、小さ
く、また高速化も可能である。
The second cache memory 100 is of the fully associative type, and since the memory reference instruction from the instruction unit 1 and the data transfer from the main memory 203 are processed in parallel, the cell structure is complicated. Since the number of entries is as small as 64, the overall size is small and the speed can be increased.

【0053】第2のキャッシュメモリ100はPF2命
令により、再利用されることのないデータを格納するの
に使われるため、PF2命令により主メモリ203から
転送されたがLD命令でまだ使われていないデータを一
時的に保持しておくだけなので、容量が小さくてもヒッ
ト率が高く、高性能化が可能である。
The second cache memory 100 is transferred from the main memory 203 by the PF2 instruction but is not used by the LD instruction because it is used by the PF2 instruction to store data that is not reused. Since the data is only temporarily stored, the hit rate is high and the performance can be improved even if the capacity is small.

【0054】ロード命令実行時には、命令ユニット20
1は、ロードすべきデータのアドレスをアドレスバス2
10にのせ、制御信号213でロード命令であることを
指示する。メモリユニット202内のキャッシュメモリ
に該当するデータがあれば、メモリユニット202はそ
のデータを読み出しデータバス212にのせる。無い場
合には、命令ユニット201に待ち信号214を送出
し、主メモリ203にそのデータの転送要求をする要求
信号218を‘1’にする。それを受けると主メモリ2
03は、そのデータを読み出し、転送データバス215
にのせ、応答信号217をメモリユニット202に返
す。メモリユニット202は、そのデータを内蔵するキ
ャッシュに書くことと共に、命令ユニット201に読み
出しデータバス212を通してデータを送り、待ち信号
214を‘0’にする。
When the load instruction is executed, the instruction unit 20
1 indicates the address of the data to be loaded on the address bus 2
Then, the control signal 213 indicates that the instruction is a load instruction. If there is corresponding data in the cache memory in the memory unit 202, the memory unit 202 loads the data on the read data bus 212. If it does not exist, the wait signal 214 is sent to the instruction unit 201, and the request signal 218 for requesting the transfer of the data to the main memory 203 is set to "1". Main memory 2 when receiving it
03 reads the data and transfers it to the transfer data bus 215.
Then, the response signal 217 is returned to the memory unit 202. The memory unit 202 sends the data to the instruction unit 201 through the read data bus 212 while writing the data in the internal cache, and sets the wait signal 214 to "0".

【0055】ストア命令実行時には、命令ユニット20
1は、書き込みアドレスをアドレスバス210に、書き
込むべきデータを書き込みデータバス211にのせ、メ
モリユニット202,主メモリ203,入出力装置20
4に送出する。簡単のため本実施例では、書き込みは、
キャッシュ100、又は、101と主メモリ203の両
方に行う(ライトスルー方式)。又、書き込み時に、キ
ャッシュがミスしても、主メモリ203からキャッシュ
へのデータ転送は行わない。データ空間への書き込み時
には、メモリユニット202はキャッシュがヒットすれ
ば書き込みデータ211より送られてきたデータをキャ
ッシュに書き、又、主メモリ203も、同じデータを主
メモリに書く。
When executing a store instruction, the instruction unit 20
1, the write address is placed on the address bus 210 and the data to be written is placed on the write data bus 211.
Send to 4. For simplicity, in this embodiment, writing is
Both the cache 100 or 101 and the main memory 203 are performed (write-through method). Further, at the time of writing, even if the cache misses, data transfer from the main memory 203 to the cache is not performed. When writing to the data space, the memory unit 202 writes the data sent from the write data 211 to the cache if the cache hits, and the main memory 203 also writes the same data to the main memory.

【0056】301は命令キャッシュ、320は演算ユ
ニット、302はメモリインタフェースである。命令キ
ャッシュ301は、命令を信号307として、演算ユニ
ット320とメモリインタフェース302に送る。メモ
リインタフェース302は、命令LD,ST,PF1,
PF2の実行時に、制御信号213を送出し、信号21
4を受け取る。待ち信号214が‘1’になったときに
は、信号308を演算ユニット320に送出し、待ち信
号214が‘0’になるまで、パイプラインを止める。
1600は制御ユニット、1605,104はセレクタ
である。制御ユニット1600は、メモリインタフェー
ス302,主メモリ203と制御信号213,214,
217,218をやり取りし、セレクタ1605,第2
のキャッシュメモリ100,第1のキャッシュメモリ1
01を信号111,113,122〜125により制御
する。セレクタ104は、第2のキャッシュメモリ10
0よりのデータバス110と、第1のキャッシュメモリ
101よりのデータバス112より、正しいほうのデー
タを選び、信号212として命令ユニット201へ送
る。第1のキャッシュメモリ101が1ポートであるた
め、主メモリ203からのアクセスと、命令ユニット2
01からのアクセスを逐次的にしか処理できない。制御
ユニット1600はセレクタ1605によりどちらが第
1のキャッシュメモリ101にアクセスするかを決め
る。
Reference numeral 301 is an instruction cache, 320 is an arithmetic unit, and 302 is a memory interface. The instruction cache 301 sends the instruction as a signal 307 to the arithmetic unit 320 and the memory interface 302. The memory interface 302 includes instructions LD, ST, PF1,
When the PF2 is executed, the control signal 213 is transmitted and the signal 21
Receive 4 When the wait signal 214 becomes "1", the signal 308 is sent to the arithmetic unit 320, and the pipeline is stopped until the wait signal 214 becomes "0".
Reference numeral 1600 is a control unit, and 1605 and 104 are selectors. The control unit 1600 includes a memory interface 302, a main memory 203 and control signals 213, 214,
217 and 218 are exchanged, and the selector 1605 and the second
Cache memory 100, first cache memory 1
01 is controlled by signals 111, 113, 122-125. The selector 104 includes the second cache memory 10
The correct data is selected from the data bus 110 of 0 and the data bus 112 of the first cache memory 101 and sent to the instruction unit 201 as a signal 212. Since the first cache memory 101 has one port, access from the main memory 203 and instruction unit 2
The access from 01 can be processed only sequentially. The control unit 1600 uses the selector 1605 to determine which accesses the first cache memory 101.

【0057】図3は、図1の命令ユニット201の構成
例である。301は命令キャッシュ、303はデコー
ダ、302はメモリインタフェース、305はレジス
タ、306はALU、304はアドレス加算器である。命
令キャッシュは、命令をバス307を通してデコーダ30
3とメモリインタフェース302に命令を送出する。デ
コーダ303は受け取った命令をデコードし、レジスタ
305,ALU306,アドレス加算器304を信号330に
より制御する。ALU306は、レジスタ305より、バス3
12,313を通してデータを受取り、演算を施して、
結果をバス314を通してレジスタ305に書き込む。
アドレス加算器304は、レジスタ305よりバス31
0,311を通してデータを読み出し、加算して結果を
ロード、又は、ストアすべきアドレスとしてバス210
に送出する。ストア時には、ストアすべきデータが、レ
ジスタ305より読み出され、バス211へ送出され
る。ロード時には、読み出したデータをバス212を通
して受取り、レジスタ305に書き込む。
FIG. 3 is a structural example of the instruction unit 201 of FIG. 301 is an instruction cache, 303 is a decoder, 302 is a memory interface, 305 is a register, 306 is an ALU, and 304 is an address adder. The instruction cache stores the instructions on the bus 30 via the decoder 30.
3 and the memory interface 302. The decoder 303 decodes the received instruction and controls the register 305, the ALU 306, and the address adder 304 with the signal 330. ALU306 uses register 3
Receive the data through 12,313, perform the calculation,
The result is written to register 305 via bus 314.
Address adder 304 uses bus 31 from register 305.
Data is read through 0, 311 and added to load or store the result, or the bus 210 is used as an address to be stored.
Send to. At the time of storing, the data to be stored is read from the register 305 and sent to the bus 211. At the time of loading, the read data is received through the bus 212 and written in the register 305.

【0058】メモリインタフェース302は、命令L
D,ST,PF1,PF2の実行時に、制御信号213
を送出し、信号214を受け取る。待ち信号214が
‘1’になったときには、信号308をデコーダ303
に送出し、待ち信号214が‘0’になるまで、パイプ
ラインを止める。
The memory interface 302 uses the instruction L.
When executing D, ST, PF1, and PF2, the control signal 213
To receive signal 214. When the wait signal 214 becomes “1”, the signal 308 is sent to the decoder 303.
And the pipeline is stopped until the wait signal 214 becomes "0".

【0059】図4は、パイプラインの処理を説明する図
である。IFは命令読み出しステージ、Dはデコードス
テージ、Eは演算、及び、アドレス加算ステージ、A
は、キャッシュアクセスステージ、Wはレジスタ書き込
みステージである。ロード命令実行時には、Aステージ
でキャッシュをアクセスし、Wステージで読み出したデ
ータをレジスタ305に書き込む。ストア命令実行時に
は、Aステージでキャッシュをチェックし、ヒットすれ
ばAステージでキャッシュへの書き込みを行う。図2
は、図1のメモリユニット202の構成例である。10
1は、容量1Mバイト,ブロックサイズ16バイトのダ
イレクトマップ方式の第1のキャッシュメモリ、100
は、ブロックサイズ4バイト,容量256バイト,フル
アソシアティブ方式の第2のキャッシュメモリ、102
は4エントリのプリフェッチキュー、103は制御回
路、104,105はセレクタである。
FIG. 4 is a diagram for explaining the pipeline processing. IF is an instruction read stage, D is a decode stage, E is an operation and address addition stage, A
Is a cache access stage, and W is a register write stage. When the load instruction is executed, the cache is accessed at the A stage and the data read at the W stage is written in the register 305. When the store instruction is executed, the cache is checked at the A stage, and if there is a hit, the cache is written at the A stage. Figure 2
Is an example of the configuration of the memory unit 202 in FIG. 1. 10
1 is a first direct-mapped cache memory having a capacity of 1 Mbyte and a block size of 16 bytes, 100
Is a second cache memory of block size 4 bytes, capacity 256 bytes, full associative method, 102
Is a 4-entry prefetch queue, 103 is a control circuit, and 104 and 105 are selectors.

【0060】第1のキャッシュメモリ101は、アドレ
ス130,転送データバス215,セレクタ制御信号1
23,書き込み信号122,書き込みデータ211を入
力として受け、読み出しデータ112,ヒット信号11
3を出力する。第2のキャッシュメモリ100は、アド
レス210,転送アドレス216,転送データ215,
登録信号124,書き込み信号125,書き込みデータ
211を受取り、読み出しデータ110,ヒット信号1
11を送出する。プリフェッチキュー102は、キャッ
シュ選択信号213−1,転送アドレス216,アドレ
ス210,セット信号120,リセット信号121を受
け、フル信号114,ヒット信号115,キャッシュ選
択信号116を出力する。
The first cache memory 101 has an address 130, a transfer data bus 215, and a selector control signal 1
23, write signal 122, write data 211 as input, read data 112, hit signal 11
3 is output. The second cache memory 100 has an address 210, a transfer address 216, transfer data 215, and
Receives registration signal 124, write signal 125, write data 211, read data 110, hit signal 1
11 is sent out. The prefetch queue 102 receives the cache selection signal 213-1, the transfer address 216, the address 210, the set signal 120, and the reset signal 121, and outputs a full signal 114, a hit signal 115, and a cache selection signal 116.

【0061】制御回路103は、命令ユニット201よ
り制御信号213−2を、プリフェッチキュー102よ
りフル信号114,ヒット信号115,キャッシュ選択
信号116を、主メモリ203より応答信号217を、
第2キャッシュメモリ100よりヒット信号111を、
第1キャッシュメモリ101よりヒット信号113をそ
れぞれ受取り、命令ユニット201へ待ち信号214
を、プリフェッチキュー102へセット信号120とリ
セット信号121を、主メモリ203へ転送要求信号2
18を、第2キャッシュメモリ100へ登録信号12
4,書き込み信号125,第1キャッシュメモリ101
へ書き込み信号122,セレクタ制御信号123を、セ
レクタ105へセレクタ制御信号123をそれぞれ送出
する。
The control circuit 103 outputs a control signal 213-2 from the instruction unit 201, a full signal 114, a hit signal 115 and a cache selection signal 116 from the prefetch queue 102, and a response signal 217 from the main memory 203.
The hit signal 111 from the second cache memory 100,
The hit signal 113 is received from the first cache memory 101, and the wait signal 214 is sent to the instruction unit 201.
, A set signal 120 and a reset signal 121 to the prefetch queue 102, and a transfer request signal 2 to the main memory 203.
18 to the second cache memory 100 with a registration signal 12
4, write signal 125, first cache memory 101
The write signal 122 and the selector control signal 123 are sent to the selector 105, and the selector control signal 123 is sent to the selector 105.

【0062】セレクタ104は第2キャッシュメモリ1
00よりデータ110,ヒット信号111,第1キャッ
シュメモリ101よりデータ112,ヒット信号113
を受取り、ヒット信号111がアサートされればデータ
110を、ヒット信号113がアサートされればデータ
112を出力として読み出し、データバス212に出力
する。またセレクタ105は、セレクタ制御信号123
の制御によりアドレス210,転送アドレス216のど
ちらかを選んで、出力130として第1のキャッシュメ
モリ101に送出する。
The selector 104 is the second cache memory 1
00, data 110, hit signal 111, first cache memory 101 data 112, hit signal 113
When the hit signal 111 is asserted, the data 110 is read, and when the hit signal 113 is asserted, the data 112 is read as an output and is output to the data bus 212. Further, the selector 105 outputs the selector control signal 123.
Either the address 210 or the transfer address 216 is selected under the control of 1 and is sent to the first cache memory 101 as the output 130.

【0063】第1のキャッシュメモリ101は、書き込
み信号122が読み出しを指示しているときには、アド
レス130の内容でキャッシュメモリを読み出し、読み
出しデータ112とヒット信号113を送出する。又、
書き込み信号122が書き込み指示しているときには、
セレクタ制御信号123が1のときには転送データ21
5を、0のときには書き込みデータ211の内容を書き
込む。
When the write signal 122 indicates a read operation, the first cache memory 101 reads the cache memory with the contents of the address 130 and sends the read data 112 and the hit signal 113. or,
When the write signal 122 is instructing to write,
When the selector control signal 123 is 1, the transfer data 21
When 5 is 0, the content of the write data 211 is written.

【0064】第2のキャッシュメモリ100は、書き込
み信号125がネゲートされ、読み出しを指示している
ときには、アドレス210でキャッシュの内容を調べ、
読み出したデータ110とヒット信号111を送出す
る。書き込み信号125がアサートされ、書き込みを指
示しているときには、キャッシュの中を調べ、ヒットし
ていれば書き込みデータバス211の内容を書き込む。
上記動作とは並行して登録信号124がアサートされた
ときには、転送アドレス216と転送データ215のペア
を登録する。
The second cache memory 100 checks the contents of the cache at the address 210 when the write signal 125 is negated and the reading is instructed.
The read data 110 and the hit signal 111 are transmitted. When the write signal 125 is asserted and a write is instructed, the cache is checked, and if there is a hit, the contents of the write data bus 211 are written.
In parallel with the above operation, when the registration signal 124 is asserted, the pair of the transfer address 216 and the transfer data 215 is registered.

【0065】プリフェッチキュー102は、主メモリ2
03より転送中のデータのアドレスを最大4エントリま
で保持できるキューであり、セット信号120がアサー
トされたときには、アドレス210とセット選択信号2
13−1の内容をキューに登録、又、リセット信号12
1がアサートされたときには転送アドレス216に対応
するキャッシュ選択信号116を出力し、そのエントリ
を無効化する。又、アドレス210と内部に保持してい
るアドレスと比較し、そのエントリが主メモリ203よ
り転送中であればヒット信号115をアサートする。ま
た全てのエントリに有効なアドレスが保持されている間
は、それを示すフル信号114をアサートする。最後に
制御回路103の動作について説明する。図14に制御
回路103の構成例を示す。制御回路103は、制御信号
213−2をデコードして、LD、ST,PF1,PF
2の各命令の起動を受け付ける。LD命令実行中で、第
2キャッシュメモリ100よりのヒット信号111と第
1キャッシュメモリ101よりのヒット信号113の両
者がネゲートされているとき、キャッシュが両方ともミ
スしているので、主メモリ203よりデータを転送する
間命令ユニット201を待たせるため、待ち信号214を
アサートする。又、LD,PF1,PF2命令実行中で
第2キャッシュメモリ100よりのヒット信号111と
第1キャッシュメモリ101よりのヒット信号113の
両者がネゲートされており、かつ、プリフェッチキュー
102よりのヒット信号115もネゲートされているが
プリフェッチキュー102よりのフル信号114がアサ
ートされているとき、プリフェッチキュー102が一杯
で、命令をキューに積むことができないため、プリフェ
ッチキュー102にあきができるまで命令ユニット20
1を待たせるため、待ち信号214をアサートする。
The prefetch queue 102 is the main memory 2
This is a queue that can hold the address of the data being transferred from 03 up to 4 entries. When the set signal 120 is asserted, the address 210 and the set selection signal 2
The contents of 13-1 are registered in the queue, and the reset signal 12
When 1 is asserted, the cache selection signal 116 corresponding to the transfer address 216 is output and the entry is invalidated. Further, the address 210 is compared with the address held internally, and if the entry is being transferred from the main memory 203, the hit signal 115 is asserted. Further, while the valid address is held in all the entries, the full signal 114 indicating it is asserted. Finally, the operation of the control circuit 103 will be described. FIG. 14 shows a configuration example of the control circuit 103. The control circuit 103 decodes the control signal 213-2 to output LD, ST, PF1, PF.
The activation of each instruction of 2 is accepted. During execution of the LD instruction, when both the hit signal 111 from the second cache memory 100 and the hit signal 113 from the first cache memory 101 are negated, both caches have missed. In order to make the instruction unit 201 wait while transferring data, the wait signal 214 is asserted. Further, both the hit signal 111 from the second cache memory 100 and the hit signal 113 from the first cache memory 101 are negated during execution of the LD, PF1, and PF2 instructions, and the hit signal 115 from the prefetch queue 102 is also executed. Is also negated but the full signal 114 from the prefetch queue 102 is asserted, the prefetch queue 102 is full and the instruction cannot be queued.
The wait signal 214 is asserted in order to make 1 wait.

【0066】LD,PF1、又は、PF2命令実行中
で、プリフェッチキュー102よりのフル信号114が
ネゲートされており、かつ、第2キャッシュメモリ10
0よりのヒット信号111,第1キャッシュメモリ10
1よりのヒット信号113もネゲートされているときに
は、主メモリ203への転送要求信号218をアサート
し、同時に、プリフェッチキュー102へのセット信号
120をアサートし、プリフェッチキュー102に登録
する。
While the LD, PF1 or PF2 instruction is being executed, the full signal 114 from the prefetch queue 102 is negated, and the second cache memory 10
0 hit signal 111, first cache memory 10
When the hit signal 113 from 1 is also negated, the transfer request signal 218 to the main memory 203 is asserted, and at the same time, the set signal 120 to the prefetch queue 102 is asserted and registered in the prefetch queue 102.

【0067】一方、主メモリ203よりの応答信号21
7がアサートされたとき、プリフェッチキュー102よ
りそのエントリをリセットするため、プリフェッチキュ
ー102へのリセット信号121をアサートし、転送デ
ータをキャッシュに登録するために、キャッシュ選択信
号116を見て、それが第1キャッシュメモリ101への
書き込みを指示しているときには、第1キャッシュメモ
リ101への書き込み信号122をアサートし、第2キ
ャッシュメモリ100への書き込みを指示しているとき
には、第2キャッシュメモリ100への登録信号124
をアサートする。
On the other hand, the response signal 21 from the main memory 203
When 7 is asserted, the reset signal 121 to the prefetch queue 102 is asserted to reset the entry from the prefetch queue 102, and the cache select signal 116 is seen to register the transfer data in the cache. When instructing to write to the first cache memory 101, the write signal 122 to the first cache memory 101 is asserted, and when instructing to write to the second cache memory 100, to the second cache memory 100. Registration signal 124
Assert.

【0068】ST命令実行時で、第1キャッシュメモリ
101よりのヒット信号113がアサートされていると
きには、そのデータを第1キャッシュメモリ101へ書
き込むため、第1キャッシュメモリ101への書き込み
信号122をアサートする。同様に、ST命令実行時
で、第2キャッシュメモリ100よりのヒット信号111
がアサートされたときには、そのデータを第2キャッシ
ュメモリ100に書き込むため第2キャッシュメモリ1
00への書き込み信号125をアサートする。
When the hit signal 113 from the first cache memory 101 is asserted during execution of the ST instruction, the write signal 122 to the first cache memory 101 is asserted to write the data to the first cache memory 101. To do. Similarly, when the ST instruction is executed, the hit signal 111 from the second cache memory 100 is sent.
Is written to write the data to the second cache memory 100, the second cache memory 1
The write signal 125 to 00 is asserted.

【0069】図5は図2のプリフェッチキュー102の
構成例である。500はプライオリティ回路、501は
判定回路、502〜505はセルである。セル502〜
505は、読み出しアドレス212,キャッシュ選択信号
213−1,転送アドレス216,リセット信号121
を受け、有効信号506,509,512,515,ヒ
ット信号507,510,513,516,選択信号1
16を送出する。又、セット信号508,511,51
4,517を受ける。
FIG. 5 shows an example of the structure of the prefetch queue 102 shown in FIG. Reference numeral 500 is a priority circuit, 501 is a determination circuit, and 502 to 505 are cells. Cell 502-
505 is a read address 212, a cache selection signal 213-1, a transfer address 216, and a reset signal 121.
In response, the valid signals 506, 509, 512, 515, the hit signals 507, 510, 513, 516, the selection signal 1
16 is sent out. Also, set signals 508, 511, 51
Receive 4,517.

【0070】プライオリティ回路500は、セル502
〜505より、有効信号506,509,512,51
5を、制御回路103よりセット信号120を受け、セ
ット信号508,511,514,517をセル502
〜505に送出する。
The priority circuit 500 includes a cell 502.
From ~ 505, valid signals 506, 509, 512, 51
5 is received from the control circuit 103 and the set signals 508, 511, 514 and 517 are transmitted to the cell 502.
To 505.

【0071】判定回路501は、有効信号506,50
9,512,515とヒット信号507,510,51
3,516をセル502〜505より受け、フル信号11
4とヒット信号115を制御回路103へ送出する。
The determination circuit 501 is provided with valid signals 506 and 50.
9,512,515 and hit signals 507,510,51
3,516 received from cells 502-505, full signal 11
4 and the hit signal 115 are sent to the control circuit 103.

【0072】各セル502〜505は同一機能なので、
セル502についてのみ動作を説明する。セル502は
内部に、アドレスと、キャッシュ選択ビットを保持する
レジスタとその有効ビットを持つ。セット信号508が
アサートされたときには、有効ビットをアサートし、転
送アドレス216の内容とキャッシュ選択信号213−
1の内容を内部に取り込む。読み出しアドレス212と
内部に保持している有効なアドレスを比較し、一致して
いれば、保持している対応するキャッシュ選択ビットを
信号116に送出する。転送アドレス216と内部に保
持するアドレスが一致し、リセット信号121がアサー
トされたときには、有効ビットを無効化する。プライオ
リティ回路500はセット信号120がアサートされた
とき、有効信号506,509,512,515をみ
て、有効なセルのうち1つを選んで対応するセット信号
508,511,514,517をアサートする。優先
順位はセル502〜505の順であり、セル502から
順にセットされる。
Since each cell 502-505 has the same function,
The operation will be described only for the cell 502. The cell 502 internally has an address, a register holding a cache selection bit, and its valid bit. When the set signal 508 is asserted, the valid bit is asserted, and the contents of the transfer address 216 and the cache selection signal 213-
The contents of 1 are taken inside. The read address 212 is compared with the valid address held inside, and if they match, the corresponding cache selection bit held is sent to the signal 116. When the transfer address 216 matches the internally held address and the reset signal 121 is asserted, the valid bit is invalidated. When the set signal 120 is asserted, the priority circuit 500 looks at the valid signals 506, 509, 512, 515, selects one of the valid cells and asserts the corresponding set signal 508, 511, 514, 517. The order of priority is cells 502-505, and cells 502 are set in order.

【0073】判定回路501は、有効信号,ヒット信号
が共にアサートされるセルが1つでもあれば、ヒット信
号115をアサートする。又、有効信号506,50
9,512,515が全てアサートされているとき、フ
ル信号114をアサートする。
The determination circuit 501 asserts the hit signal 115 if there is at least one cell in which both the valid signal and the hit signal are asserted. Also, valid signals 506, 50
When 9, 512 and 515 are all asserted, full signal 114 is asserted.

【0074】図6は、図5のセル502の構成例であ
る。601は無効ビットを保持するレジスタ、602は
アドレスを保持するレジスタ、603はキャッシュ選択
ビットを保持するレジスタ、604,605はコンパレ
ータ、630はトライステートバッファ、631,63
2はANDゲートである。有効ビット601は、セット
信号508がアサートされたときにセットされ、信号6
08がアサートされたときにリセットされる。セット信
号508は有効ビット601,アドレスレジスタ60
2,キャッシュ選択ビット603に接続されており、セ
ット信号508がアサートされたときに、有効ビット6
01はセットされ、アドレスレジスタ602は読み出し
アドレス212を取り込み、キャッシュ選択レジスタ6
03はキャッシュ選択信号213−1を取り込む。有効
ビットはその出力を有効信号506として送出する。コ
ンパレータ604は読み出しアドレス212とアドレス
レジスタ602の出力606を比較し、一致しており、
かつ、有効ビット601がアサートされていればヒット
信号507をアサートする。コンパレータ605はアド
レスレジスタ602の出力606と転送アドレス216
を比較し、一致していればトライステートバッファ63
0を開き、キャッシュ選択ビットレジスタ603の内容
を、信号116に送出する。又、さらに、リセット信号
121がアサートされたとき、信号608がアサートさ
れ、有効ビット601がリセットされる。図7は、図5
のプライオリティ回路500の構成例である。705〜
707は、インバータ、701〜704はANDゲート
である。図8は、図5の判定回路501の構成例であ
る。801〜804,806はANDゲート、805は
ORゲートである。図9は、図2の第2のキャッシュメ
モリ100の構成例である。900は判定回路、901
〜903は有効ビット,アドレス,データのペアを、保
持するセルである。セル901〜903は読み出しアド
レス210,登録要求124,書き込みデータ211,
書き込み要求125を入力として受け、データ110を
出力する。又、セル901〜903はそれぞれヒット信
号910〜912を判定回路900に送出する。セル90
1は転送アドレス216,転送データ215を受け、ア
ドレス913,データ914をセル902に送る。同様
に、セル902はアドレス915,916を次のセルに
送る。最後のセル912は、アドレス917,データ9
18を受ける。
FIG. 6 is a structural example of the cell 502 of FIG. Reference numeral 601 is a register holding an invalid bit, 602 is a register holding an address, 603 is a register holding a cache selection bit, 604, 605 are comparators, 630 is a tri-state buffer, 631, 63.
2 is an AND gate. Valid bit 601 is set when set signal 508 is asserted and signal 6
It is reset when 08 is asserted. The set signal 508 is a valid bit 601, an address register 60.
2, the cache select bit 603 is connected, and when the set signal 508 is asserted, the valid bit 6
01 is set, the address register 602 fetches the read address 212, and the cache selection register 6
03 takes in the cache selection signal 213-1. The valid bit sends its output as a valid signal 506. The comparator 604 compares the read address 212 with the output 606 of the address register 602, and they match,
If the valid bit 601 is asserted, the hit signal 507 is asserted. The comparator 605 outputs the output 606 of the address register 602 and the transfer address 216.
Are compared, and if they match, the tri-state buffer 63
0 is opened and the contents of the cache selection bit register 603 are sent to the signal 116. Furthermore, when the reset signal 121 is asserted, the signal 608 is asserted and the valid bit 601 is reset. FIG. 7 shows FIG.
3 is a configuration example of the priority circuit 500 of FIG. 705-
Reference numeral 707 is an inverter, and 701 to 704 are AND gates. FIG. 8 is a configuration example of the determination circuit 501 of FIG. Reference numerals 801 to 804 and 806 are AND gates, and 805 is an OR gate. FIG. 9 is a configuration example of the second cache memory 100 of FIG. 900 is a determination circuit, 901
Numerals 903 are cells for holding a pair of valid bit, address and data. The cells 901 to 903 are read addresses 210, registration requests 124, write data 211,
It receives a write request 125 as an input and outputs data 110. Also, the cells 901 to 903 send hit signals 910 to 912 to the determination circuit 900, respectively. Cell 90
1 receives the transfer address 216 and the transfer data 215, and sends the address 913 and the data 914 to the cell 902. Similarly, cell 902 sends addresses 915 and 916 to the next cell. The last cell 912 has an address 917, a data 9
Receive 18.

【0075】判定回路900はセル901〜903より
のヒット信号910〜912のうち、どれか1つがアサ
ートされたなら制御回路103、及び、セレクタ104
へのヒット信号111をアサートする。セル901は、
読み出しアドレス210と、内部に保持するアドレスを
比較し、一致し、かつ、有効であれば、ヒット信号91
0を送出し、対応する内部に保持するデータをバス11
0に出力する。書き込み要求125がアサートされたと
きには、内部に保持するアドレスと書き込みアドレス2
10を比較し、一致し、かつ、有効ビットがアサートさ
れていれば、書き込みデータ211の内容を取り込む。
以上の動作とは並列に、登録要求124がアサートされた
ときには、有効ビットをアサートし、転送アドレス21
6,転送データ215を内部に取り込む。この時セル9
02はセル901の保持していたアドレスとデータをそ
れぞれ信号913,914を通して取り込む。即ち、セ
ル901〜903はFIFOになっている。図10は、
図9のセル901の構成例である。1000,100
1,1002はそれぞれ有効ビット,アドレス,データ
を保持するレジスタである。1004はコンパレータ、
1005,1006はANDゲート、1003はトライ
ステートバッファである。登録要求124は有効ビット
を保持するレジスタ1000,アドレスを保持するレジ
スタ1001,データを保持するレジスタ1002に接
続されている。登録要求124がアサートされたとき
に、有効ビット1000はセットされ、アドレスを保持
するレジスタ1001は転送アドレス216をとり込
み、データを保持するレジスタ1002はデータ215を取
り込む。コンパレータ1004はアドレスを保持するレ
ジスタの出力913と、アドレス210を比較する。A
NDゲート1006は、コンパレータ1004の出力が
アサートされ、かつ、有効ビットがアサートされている
ときに、ヒット信号910をアサートし、トライステー
トバッファ1003を開きデータを保持するレジスタの
内容をデータバス110に送出する。又、ヒット信号9
10がアサートされ、書き込み要求がアサートされたこ
とをANDゲート1005が検知すると、データを保持
するレジスタ1002への信号1008をアサートし、
書き込みデータ211を、データを保持するレジスタ1
002に取り込む。
The determination circuit 900 determines if any one of the hit signals 910 to 912 from the cells 901 to 903 is asserted, the control circuit 103 and the selector 104.
The hit signal 111 to is asserted. Cell 901 is
The read address 210 is compared with the address held internally, and if they match and are valid, the hit signal 91
0 is transmitted and the corresponding data to be held internally is stored in the bus 11
Output to 0. When the write request 125 is asserted, the address held internally and the write address 2
If 10 is compared and they match and the valid bit is asserted, the content of the write data 211 is fetched.
In parallel with the above operation, when the registration request 124 is asserted, the valid bit is asserted and the transfer address 21
6, The transfer data 215 is taken in inside. Cell 9 at this time
02 receives the address and data held in the cell 901 through signals 913 and 914, respectively. That is, the cells 901 to 903 are FIFO. Figure 10
It is a configuration example of the cell 901 of FIG. 1,000, 100
Reference numerals 1 and 1002 denote registers that hold valid bits, addresses, and data, respectively. 1004 is a comparator,
AND gates 1005 and 1006, and a tri-state buffer 1003. The registration request 124 is connected to a register 1000 that holds a valid bit, a register 1001 that holds an address, and a register 1002 that holds data. When the registration request 124 is asserted, the valid bit 1000 is set, the register 1001 holding the address fetches the transfer address 216, and the register 1002 holding the data fetches the data 215. The comparator 1004 compares the address 210 with the output 913 of the register holding the address. A
The ND gate 1006 asserts the hit signal 910 when the output of the comparator 1004 is asserted and the valid bit is asserted, opens the tri-state buffer 1003, and transfers the contents of the register holding the data to the data bus 110. Send out. Also, hit signal 9
When AND gate 1005 detects that 10 is asserted and the write request is asserted, signal 1008 to register 1002 holding data is asserted,
Register 1 for holding the write data 211
002.

【0076】上述のように第2のキャッシュメモリ10
0はフルアソシアティブ方式で、かつ、命令ユニット2
01よりのメモリ参照命令と、主メモリ203よりのデ
ータ転送を並列して処理するため、セルの構造は複雑で
あるが、エントリ数が64と少ないため、全体としての
大きさは、小さく、また高速化も可能である。
As described above, the second cache memory 10
0 is a fully associative method and instruction unit 2
Since the memory reference instruction from 01 and the data transfer from the main memory 203 are processed in parallel, the cell structure is complicated, but since the number of entries is as small as 64, the overall size is small, and Speeding up is also possible.

【0077】又、第2のキャッシュメモリ100はPF
2命令により、再利用されることのないデータを格納す
るのに使われるため、PF2命令により主メモリ203
から転送されたがLD命令でまだ使われていないデータ
を一時的に保持しておくだけなので、容量が小さくても
ヒット率が高く、高性能化が可能である。
The second cache memory 100 has a PF
2 instructions are used to store data that will not be reused, so the PF2 instruction causes the main memory 203
Since only the data that has been transferred from, but is not yet used by the LD instruction is temporarily held, the hit rate is high and the performance can be improved even if the capacity is small.

【0078】又、図9のキャッシュメモリは、ブロック
サイズが4バイトと小さいため、ブロックサイズを第1
のキャッシュメモリと同じ16バイトにした場合に比
べ、同一容量でエントリ数を多くすることができる。そ
のため、多数の配列データを一度に処理する場合であっ
ても、各配列を別々のエントリに格納することが可能と
なり、エントリ数の不足による性能低下を防止すること
が可能となる。また、主メモリからのデータ転送を4バ
イト単位で行うため、不連続なアドレスのデータに対し
て処理を行う時にも、不必要なデータを転送することが
なく、高速に処理を行うことができる。
Since the block size of the cache memory in FIG. 9 is as small as 4 bytes, the block size is set to the first block.
It is possible to increase the number of entries with the same capacity as compared with the case where the cache memory has the same 16 bytes. Therefore, even when a large number of array data are processed at one time, it is possible to store each array in a separate entry, and it is possible to prevent performance degradation due to insufficient number of entries. Further, since the data transfer from the main memory is performed in units of 4 bytes, even when processing data of discontinuous addresses, it is possible to perform high-speed processing without transferring unnecessary data. .

【0079】図11は、図2の第1のキャッシュメモリ
の構成例である。1100はアドレスアレイ、1101
は有効ビット、1102はデータアレイ、1104はコ
ンパレータ、1105はANDゲート、1103はセレ
クタである。セレクタ1103は制御信号123より制御さ
れ、転送データ215、又は、書き込みデータ211を
選択して出力をデータアレイ1102に送出する。
FIG. 11 is a configuration example of the first cache memory of FIG. 1100 is an address array, 1101
Is a valid bit, 1102 is a data array, 1104 is a comparator, 1105 is an AND gate, 1103 is a selector. The selector 1103 is controlled by the control signal 123, selects the transfer data 215 or the write data 211, and sends the output to the data array 1102.

【0080】アドレスアレイ1100,有効ビット11
01は、アドレス130の下位ビット130―1でアク
セスされる。コンパレータ1104はアドレスアレイ出
力1106とアドレス130の上位130―2を比較す
る。1105はコンパレータの出力がアサートされ、有
効ビット1107がアサートされていることを検知する
と、ヒット信号112を送出する。又、書き込み信号1
22がアサートされると、アドレス130―2を取り込
み、対応する有効ビットを立てる。データアレイはアド
レス130の下位ビット130―1でアクセスされ、読
み出したデータを、バス113に送出する。書き込み信
号122がアサートされたときには、セレクタ1103
の出力を書き込む。
Address array 1100, valid bit 11
01 is accessed by the lower bit 130-1 of the address 130. The comparator 1104 compares the address array output 1106 with the higher order 130-2 of the address 130. When 1105 detects that the output of the comparator is asserted and the valid bit 1107 is asserted, it outputs a hit signal 112. Also, write signal 1
When 22 is asserted, it takes the address 130-2 and raises the corresponding valid bit. The data array is accessed by the lower bits 130-1 of the address 130, and the read data is sent to the bus 113. When the write signal 122 is asserted, the selector 1103
Write the output of.

【0081】第1のキャッシュメモリ101は容量1M
バイトと、第2のキャッシュメモリ100に比べて大容
量であるが、1ポートであるため、全体としてはそれほ
ど大きくなく、又、高速動作が期待できる。
The first cache memory 101 has a capacity of 1M.
The number of bytes is larger than that of the second cache memory 100, but since it is one port, it is not so large as a whole and high-speed operation can be expected.

【0082】図14は、図2の制御回路103の構成例
である。1400,1406,1410はORゲート、14
01〜1405,1407〜1409,1411はAN
Dゲートである。1412はデコーダで、命令ユニット
201よりに制御信号213−2をデコードし、実行中
の命令がLD,ST,PF1,PF2の各命令であるか
どうかを判定する機能を有する。
FIG. 14 shows an example of the configuration of the control circuit 103 shown in FIG. 1400, 1406, 1410 are OR gates, 14
01 to 1405, 1407 to 1409, 1411 are ANs
It is a D gate. A decoder 1412 has a function of decoding the control signal 213-2 by the instruction unit 201 and determining whether or not the instruction being executed is each instruction of LD, ST, PF1, and PF2.

【0083】図15は、図1のメモリユニット202の
第2の構成例である。図15の構成例は、図2の構成例
とほぼ同じであるが、第1のキャッシュメモリ101と
第2のキャッシュメモリ100との間にインダフェース
130がある点が異なる。
FIG. 15 shows a second configuration example of the memory unit 202 of FIG. The configuration example of FIG. 15 is almost the same as the configuration example of FIG. 2, except that an interface 130 is provided between the first cache memory 101 and the second cache memory 100.

【0084】図2の構成例の第1の問題点は、中小規模
のプログラムをPF1命令を用いて実行するとき、第2
キャッシュメモリが無駄になることである。第2の問題
点は第1のキャッシュメモリがダイレクトマップである
ため、同一容量のセットアソシアティブ方式のキャッシ
ュメモリに比べて、ヒット率が低いということである。
この問題点を改善するのが図15の実施例である。
The first problem of the configuration example of FIG. 2 is that when a small-to-medium-sized program is executed using the PF1 instruction, the second problem is
The cache memory is wasted. The second problem is that since the first cache memory is a direct map, the hit rate is lower than that of a set associative cache memory having the same capacity.
The embodiment of FIG. 15 solves this problem.

【0085】図15の実施例では、第1のキャッシュメ
モリ101がミスしたときに、まず、第2のキャッシュ
メモリ100を探し、ヒットすれば、インタフェース1
30を通して対応するデータを第2のキャッシュメモリ
100から、第1のキャッシュメモリに101に転送す
る。又、第1のキャッシュメモリに登録するときには、
溢れたデータを、インタフェース130を通して、第2
のキャッシュメモリ100に登録する。このようなキャ
ッシュはビクティムキャッシュと呼ばれ、ダイレクトマ
ップ方式のキャッシュメモリに比べ、ヒット率が改善で
きることがNormann P. Jouppi,“Improving Direct-Map
ped Cache Performance by theAddition of a small Fu
lly-Associative Cache and Prefetch Buffers,”Proc.
17th Symp. on Comp. Arch., Sattle, WA, pp364−373,
may, 1990に書かれている。
In the embodiment shown in FIG. 15, when the first cache memory 101 misses, first, the second cache memory 100 is searched, and if there is a hit, the interface 1
Corresponding data is transferred from the second cache memory 100 to the first cache memory 101 through the numeral 30. Also, when registering in the first cache memory,
The overflowed data is transferred to the second
Registered in the cache memory 100. Such a cache is called a victim cache, and it is possible to improve the hit rate compared to the cache memory of the direct map method. Normann P. Jouppi, “Improving Direct-Map
ped Cache Performance by theAddition of a small Fu
lly-Associative Cache and Prefetch Buffers, ”Proc.
17th Symp. On Comp. Arch., Sattle, WA, pp364−373,
Written in may, 1990.

【0086】図15の第2の実施例によれば、中小規模
のプログラムを第1のキャッシュメモリ101と第2の
キャッシュメモリ100の両者を有効に利用して、性能
を高めることができるという利点がある。
According to the second embodiment of FIG. 15, it is possible to improve the performance by effectively utilizing both the first cache memory 101 and the second cache memory 100 for a small-to-medium-sized program. There is.

【0087】図23は、図2の第1のキャッシュメモリ
101の第2の構成例である。図23のキャッシュメモ
リは、容量1Mバイト,ブロックサイズ16バイト,2
ウェイセットアソシアティブ方式のキャッシュメモリで
ある。2301,2303はアドレスアレイ、230
2,2304は有効ビット、2305,2306はデー
タアレイ、2307,2308はコンパレータ、230
9はアレイ選択メモリ、2310,2312,231
3,2314,2315はANDゲート、2311,23
16はORゲート、2320,2322はセレクタであ
る。以下の説明では、アドレスアレイ2301,有効ビ
ット2302,データアレイ2305を合わせてアレイ
1,アドレスアレイ2303,有効ビット2304,デ
ータアレイ2306を合わせてアレイ2と呼ぶことにす
る。
FIG. 23 shows a second configuration example of the first cache memory 101 of FIG. The cache memory in FIG. 23 has a capacity of 1 Mbytes, a block size of 16 bytes, and 2
This is a wayset associative cache memory. 2301 and 2303 are address arrays, 230
2, 2304 are valid bits, 2305, 2306 are data arrays, 2307, 2308 are comparators, 230
9 is an array selection memory, 2310, 2312, 231
3,2314,2315 are AND gates, 2311,23
16 is an OR gate, and 2320 and 2322 are selectors. In the following description, the address array 2301, the valid bit 2302 and the data array 2305 are collectively referred to as the array 1, the address array 2303, the valid bit 2304 and the data array 2306 are collectively referred to as the array 2.

【0088】セレクタ2320は制御信号123より制
御され、転送データ215、又は、書き込みデータ21
1を選択して出力2330をデータアレイ2305,23
06に送出する。第1のアドレスアレイ2301,有効ビ
ット2302は、アドレス130の下位ビット130―
1でアクセスされる。コンパレータ2307はアドレス
アレイ出力2331とアドレス130の上位ビット13
0―2を比較する。ANDゲート2314はコンパレー
タ2307の出力がアサートされ、有効ビット2332
がアサートされていることを検知すると、アレイ1のヒ
ット信号2335を送出する。又、第1のアドレスアレイ2
301,有効ビット2302は、アレイ1の書き込み信
号2337がアサートされると、アドレス130―2を
取り込み、対応する有効ビットを立てる。同様に、第2
のアドレスアレイ2303,有効ビット2304は、ア
ドレス130の下位ビット130―1でアクセスされ
る。コンパレータ2308はアドレスアレイ出力233
3とアドレス130の上位ビット130―2を比較す
る。ANDゲート2315はコンパレータ2308の出
力がアサートされ、有効ビット2334がアサートされ
ていることを検知すると、アレイ2のヒット信号233
6を送出する。又、第2のアドレスアレイ2303,有効ビ
ット2304は、アレイ2の書き込み信号2338がア
サートされると、アドレス130―2を取り込み、対応
する有効ビットを立てる。ORゲート2316は、アレ
イ1のヒット信号2335と、アレイ2のヒット信号2
336のいずれかがアサートされると、ヒット信号11
3を送出する。第1のデータアレイ2305はアドレス
130の下位ビット130―1でアクセスされ、読み出
したデータを、バス2339に送出する。アレイ1の書
き込み信号2337がアサートされたときには、セレク
タ2320の出力2330を書き込む。同様に、第2の
データアレイ2306はアドレス130の下位ビット1
30―1でアクセスされ、読み出したデータを、バス2
340に送出する。アレイ2の書き込み信号2338が
アサートされたときには、セレクタ2320の出力23
30を書き込む。セレクタ2322は、アレイ1のヒッ
ト信号2335がアサートされると第1のデータアレイ
の出力2339を選択し、それ以外の時には第2のデー
タアレイの出力2340を選択して、結果をデータバス
112に送出する。アレイ選択メモリ2309は、書き
込み信号122がアサートされた時に、アレイ1とアレ
イ2のどちらに書き込みを行ったかの情報を保持する。
主メモリから転送されてきた転送データ215の書き込
みを行う時には、前回書き込みを行ったのがアレイ1で
あればアレイ2に書き込みを行い、前回書き込みを行っ
たのがアレイ2であればアレイ1に書き込みを行う。一
方、命令ユニットから転送されてきたストア命令の書き
込みデータ211を書き込む時には、アレイ1とアレイ
2のうちヒットしたほうのアレイに書き込みを行い、ア
レイ選択メモリ2309に保持された情報は無視され
る。以下に、アレイ1の書き込み信号2337と、アレ
イ2の書き込み信号2338の生成方法について説明す
る。アレイ選択メモリ2309はアドレス130の下位ビッ
ト130―1でアクセスされ、読み出したデータを、A
NDゲート2310に送出する。書き込み信号122が
アサートされたときには、アレイ選択信号2341の値
を書き込む。ANDゲート2310は、ヒット信号11
3がアサートされていず、アレイ選択メモリ2309の
出力もアサートされていない時に制御信号2342を送
出する。ORゲート2311は、アレイ1のヒット信号
2335と制御信号2342のいずれか一方がアサート
されると、アレイ選択信号2341を送出する。アレイ
選択信号2341がアサートされている時にはアレイ1
に書き込みを行うことを示し、アレイ選択信号2341
がアサートされていない時にはアレイ2に書き込みを行
うことを示す。ANDゲート2312は、書き込み信号
122がアサートされ、アレイ選択信号2341がアサ
ートされている時に、アレイ1の書き込み信号2337
を送出する。同様に、ANDゲート2313は、書き込
み信号122がアサートされ、アレイ選択信号2341
がアサートされていない時に、アレイ2の書き込み信号
2338を送出する。図23のキャッシュメモリは、2
ウェイセットアソシアティブ方式であるため、図11の
キャッシュメモリに比べて物量は大きいが、ブロック競
合の発生を防止することができるため、図11のキャッ
シュメモリに比べて、ヒット率が向上する。
The selector 2320 is controlled by the control signal 123, and transfers data 215 or write data 21.
1 is selected and the output 2330 is output to the data arrays 2305 and 23.
Send to 06. The first address array 2301 and valid bit 2302 are the lower bits 130- of the address 130.
Accessed with 1. The comparator 2307 outputs the address array output 2331 and the high-order bit 13 of the address 130.
Compare 0-2. The output of the comparator 2307 is asserted in the AND gate 2314, and the valid bit 2332
When it detects that is asserted, it outputs the array 1 hit signal 2335. Also, the first address array 2
When the write signal 2337 of array 1 is asserted, 301 and valid bit 2302 fetch the address 130-2 and set the corresponding valid bit. Similarly, the second
Address array 2303 and valid bit 2304 are accessed by the lower bits 130-1 of address 130. The comparator 2308 outputs the address array output 233.
3 and the upper bits 130-2 of the address 130 are compared. When the AND gate 2315 detects that the output of the comparator 2308 is asserted and the valid bit 2334 is asserted, the hit signal 233 of the array 2 is detected.
6 is sent out. Also, the second address array 2303 and valid bit 2304 take in the address 130-2 and raise the corresponding valid bit when the write signal 2338 of the array 2 is asserted. The OR gate 2316 outputs the hit signal 2335 of the array 1 and the hit signal 2 of the array 2.
Hit signal 11 when any of 336 is asserted.
3 is sent out. The first data array 2305 is accessed by the lower bits 130-1 of the address 130 and sends the read data to the bus 2339. When the write signal 2337 of array 1 is asserted, the output 2330 of the selector 2320 is written. Similarly, the second data array 2306 has the lower bit 1 of the address 130.
The data read and accessed by 30-1 is transferred to the bus 2
340. When the write signal 2338 of the array 2 is asserted, the output 23 of the selector 2320
Write 30. The selector 2322 selects the output 2339 of the first data array when the hit signal 2335 of the array 1 is asserted, and selects the output 2340 of the second data array otherwise, and outputs the result to the data bus 112. Send out. The array selection memory 2309 holds information on which of the array 1 and the array 2 is written when the write signal 122 is asserted.
When the transfer data 215 transferred from the main memory is written, the array 2 was written last time, the array 2 is written, and the last written data is the array 2, array 1 is written. Write. On the other hand, when the write data 211 of the store instruction transferred from the instruction unit is written, the array that hits one of the array 1 and the array 2 is written, and the information held in the array selection memory 2309 is ignored. Hereinafter, a method of generating the write signal 2337 of the array 1 and the write signal 2338 of the array 2 will be described. The array selection memory 2309 is accessed by the lower bit 130-1 of the address 130, and the read data is
It is sent to the ND gate 2310. When the write signal 122 is asserted, the value of the array selection signal 2341 is written. The AND gate 2310 outputs the hit signal 11
When 3 is not asserted and the output of the array selection memory 2309 is not asserted, the control signal 2342 is transmitted. The OR gate 2311 sends out the array selection signal 2341 when either the hit signal 2335 of the array 1 or the control signal 2342 is asserted. Array 1 when array select signal 2341 is asserted
Array select signal 2341
Indicates that the array 2 is to be written when is not asserted. The AND gate 2312 outputs the write signal 2337 of the array 1 when the write signal 122 is asserted and the array select signal 2341 is asserted.
Is sent. Similarly, in the AND gate 2313, the write signal 122 is asserted, and the array selection signal 2341 is output.
Array 2 is asserted, array 2 write signal 2338 is sent. The cache memory in FIG.
Since the method is the way set associative method, the physical quantity is larger than that of the cache memory of FIG. 11, but since block conflict can be prevented from occurring, the hit rate is improved as compared with the cache memory of FIG.

【0089】図24は、図2の第2のキャッシュメモリ
100の第2の構成例である。図24のキャッシュメモ
リは、容量2Kバイト,ブロックサイズ32バイト,2
ウェイセットアソシアティブ方式のキャッシュメモリで
ある。2401,2403はアドレスアレイ、240
2,2404は有効ビット、2405,2406はデー
タアレイ、2407,2408はコンパレータ、240
9はアレイ選択メモリ、2410,2411,241
2,2413,2414,2415はANDゲート、2
416はORゲート、2417は反転回路、2422は
セレクタである。以下の説明では、アドレスアレイ24
01,有効ビット2402,データアレイ2405を合
わせてアレイ1,アドレスアレイ2403,有効ビット
2404,データアレイ2406を合わせてアレイ2と
呼ぶことにする。
FIG. 24 shows a second configuration example of the second cache memory 100 of FIG. The cache memory in FIG. 24 has a capacity of 2 Kbytes, a block size of 32 bytes, 2
This is a wayset associative cache memory. 2401 and 2403 are address arrays and 240
2, 2404 are valid bits, 2405, 2406 are data arrays, 2407, 2408 are comparators, 240
9 is an array selection memory, 2410, 2411, 241
2, 2413, 2414, 2415 are AND gates, 2
Reference numeral 416 is an OR gate, 2417 is an inverting circuit, and 2422 is a selector. In the following description, the address array 24
01, valid bit 2402 and data array 2405 are collectively referred to as array 1, address array 2403, valid bit 2404 and data array 2406 are collectively referred to as array 2.

【0090】第1のアドレスアレイ2401,有効ビッ
ト2402は、読み出しアドレス210の下位ビット2
10―1で指定されたアドレスの値を出力する。コンパ
レータ2407はアドレスアレイ出力2431とアドレ
ス210の上位ビット210―2を比較する。ANDゲー
ト2414はコンパレータ2407の出力がアサートさ
れ、有効ビット2432がアサートされていることを検
知すると、アレイ1のヒット信号2435を送出する。
又、第1のアドレスアレイ2401,有効ビット240
2は、アレイ1の第1の書き込み信号2437がアサー
トされると、読み出しアドレス210の下位ビット21
0−1で指定されたアドレスに、読み出しアドレス21
0の上位ビット210―2を取り込み、対応する有効ビ
ットを立てる。又、アレイ1の第2の書き込み信号24
39がアサートされると、転送アドレス216の下位ビ
ット216−1で指定されたアドレスに、転送アドレス
216の上位ビット216―2を取り込み、対応する有
効ビットを立てる。同様に、第2のアドレスアレイ24
03,有効ビット2404は、読み出しアドレス210
の下位ビット210―1で指定されたアドレスの値を出
力する。コンパレータ2408はアドレスアレイ出力2
433とアドレス210の上位ビット210−2を比較す
る。ANDゲート2415はコンパレータ2408の出
力がアサートされ、有効ビット2434がアサートされ
ていることを検知すると、アレイ2のヒット信号243
6を送出する。又、第2のアドレスアレイ2403,有
効ビット2404は、アレイ2の第1の書き込み信号2
438がアサートされると、読み出しアドレス210の
下位ビット210−1で指定されたアドレスに、読み出
しアドレス210の上位ビット210―2を取り込み、
対応する有効ビットを立てる。又、アレイ2の第2の書
き込み信号2440がアサートされると、転送アドレス
216の下位ビット216−1で指定されたアドレス
に、転送アドレス216の上位ビット216―2を取り
込み、対応する有効ビットを立てる。ORゲート241
6は、アレイ1のヒット信号2435と、アレイ2のヒ
ット信号2436のいずれかがアサートされると、ヒッ
ト信号111を送出する。第1のデータアレイ2405
は読み出しアドレス210の下位ビット210―1で指
定されたアドレスのデータを、バス2441に送出す
る。アレイ1の第1の書き込み信号2437がアサート
されたときには、読み出しアドレス210の下位ビット
210―1で指定されたアドレスに書込みデータ211
を書き込む。アレイ1の第2の書き込み信号2439が
アサートされたときには、転送アドレス216の下位ビ
ット216―1で指定されたアドレスに転送データ21
5を書き込む。同様に、第1のデータアレイ2406は
読み出しアドレス210の下位ビット210―1で指定
されたアドレスのデータを、バス2442に送出する。
アレイ2の第1の書き込み信号2438がアサートされ
たときには、読み出しアドレス210の下位ビット21
0―1で指定されたアドレスに書込みデータ211を書
き込む。アレイ1の第2の書き込み信号2440がアサ
ートされたときには、転送アドレス216の下位ビット
216―1で指定されたアドレスに転送データ215を
書き込む。セレクタ2422は、アレイ1のヒット信号
2435がアサートされると第1のデータアレイの出力
2441を選択し、それ以外の時には第2のデータアレ
イの出力2442を選択して、結果をデータバス110
に送出する。アレイ選択メモリ2409は、登録要求1
24、または書込み要求125がアサートされた時に、
アレイ1とアレイ2のどちらに書き込みを行ったかの情
報を保持する。主メモリから転送されてきた転送データ
215の書き込みを行う時には、前回書き込みを行った
のがアレイ1であればアレイ2に書き込みを行い、前回
書き込みを行ったのがアレイ2であればアレイ1に書き
込みを行う。一方、命令ユニットから転送されてきた、
ストア命令の書き込みデータ211を書き込む時には、
アレイ1とアレイ2のうちヒットしたほうのアレイに書
き込みを行い、アレイ選択メモリ2409に保持された
情報は無視される。以下に、アレイ1の書き込み信号2
437,2439と、アレイ2の書き込み信号243
8,2440の生成方法について説明する。アレイ選択メモ
リ2409は転送アドレス216の下位ビット216―
1で指定されたアドレスのデータを、反転回路2417
に送出する。書込み要求125がアサートされたときに
は、読み出しアドレス210の下位ビット210―1で指
定されたアドレスにアレイ1のヒット信号2435の値
を書き込む。登録要求124がアサートされたときに
は、転送アドレス216の下位ビット216―1で指定さ
れたアドレスにアレイ選択信号2443の値を書き込
む。反転回路2417は、アレイ選択メモリ2409の
出力がアサートされていない時に、アレイ選択信号24
43を送出する。ANDゲート2410は、書込み要求
125がアサートされ、アレイ1のヒット信号2435
がアサートされている時に、アレイ1の第1の書き込み
信号2437を送出する。ANDゲート2411は、書
込み要求125がアサートされ、アレイ1のヒット信号
2435がアサートされていない時に、アレイ2の第1の書
き込み信号2438を送出する。同様に、ANDゲート
2412は、登録要求124がアサートされ、アレイ選
択信号2443がアサートされている時に、アレイ1の
第2の書き込み信号2439を送出する。ANDゲート
2413は、登録要求124がアサートされ、アレイ選
択信号2443がアサートされていない時に、アレイ2
の第2の書き込み信号2440を送出する。図24のキ
ャッシュメモリは、2ウェイセットアソシアティブ方式
であるため、フルセットアソシアティブ方式である図9
のキャッシュメモリに比べて、少ない物量で容量を大き
くすることができる。また、ブロックサイズが32バイ
トと大きいため、主メモリから一度に転送するデータの
量が大きい。従って、連続アドレスのデータの処理を行
う場合には、ブロックサイズの小さい図9のキャッシュ
メモリに比べて、一定量のデータを主メモリから第2の
キャッシュメモリに転送するために処理する必要のある
プリフェッチ命令の数が少ないため、性能が向上する。
The first address array 2401 and valid bit 2402 are the lower bits 2 of the read address 210.
The value of the address specified in 10-1 is output. The comparator 2407 compares the address array output 2431 with the high-order bits 210-2 of the address 210. When AND gate 2414 detects that the output of comparator 2407 is asserted and valid bit 2432 is asserted, it outputs hit signal 2435 of array 1.
Also, the first address array 2401, valid bit 240
2 is the lower bit 21 of the read address 210 when the first write signal 2437 of array 1 is asserted.
The read address 21 is added to the address specified by 0-1.
The upper bit 210-2 of 0 is taken in and the corresponding valid bit is set. Also, the second write signal 24 of the array 1
When 39 is asserted, the upper bit 216-2 of the transfer address 216 is fetched into the address specified by the lower bit 216-1 of the transfer address 216, and the corresponding valid bit is set. Similarly, the second address array 24
03, valid bit 2404, read address 210
The value of the address designated by the lower bit 210-1 of the is output. Comparator 2408 outputs address array output 2
433 and the upper bits 210-2 of the address 210 are compared. When the AND gate 2415 detects that the output of the comparator 2408 is asserted and the valid bit 2434 is asserted, the hit signal 243 of the array 2 is detected.
6 is sent out. Also, the second address array 2403 and the valid bit 2404 are the same as the first write signal 2 of the array 2.
When 438 is asserted, the upper bit 210-2 of the read address 210 is fetched into the address specified by the lower bit 210-1 of the read address 210,
Set the corresponding valid bit. Further, when the second write signal 2440 of the array 2 is asserted, the upper bit 216-2 of the transfer address 216 is fetched into the address designated by the lower bit 216-1 of the transfer address 216, and the corresponding valid bit is fetched. Stand up. OR gate 241
6 outputs the hit signal 111 when either the hit signal 2435 of the array 1 or the hit signal 2436 of the array 2 is asserted. First data array 2405
Sends the data of the address specified by the lower bit 210-1 of the read address 210 to the bus 2441. When the first write signal 2437 of the array 1 is asserted, the write data 211 is written to the address specified by the lower bit 210-1 of the read address 210.
Write. When the second write signal 2439 of the array 1 is asserted, the transfer data 21 is transferred to the address specified by the lower bit 216-1 of the transfer address 216.
Write 5. Similarly, the first data array 2406 outputs the data of the address specified by the lower bit 210-1 of the read address 210 to the bus 2442.
When the first write signal 2438 of array 2 is asserted, the lower bit 21 of read address 210 is
The write data 211 is written to the address designated by 0-1. When the second write signal 2440 of the array 1 is asserted, the transfer data 215 is written to the address designated by the lower bit 216-1 of the transfer address 216. The selector 2422 selects the output 2441 of the first data array when the hit signal 2435 of the array 1 is asserted, and selects the output 2442 of the second data array otherwise, and outputs the result to the data bus 110.
Send to. Array selection memory 2409 has a registration request 1
24, or when write request 125 is asserted,
Information on which of array 1 and array 2 has been written is held. When the transfer data 215 transferred from the main memory is written, the array 2 was written last time, the array 2 is written, and the last written data is the array 2, array 1 is written. Write. On the other hand, transferred from the instruction unit,
When writing the write data 211 of the store instruction,
Data is written to the one of the arrays 1 and 2 which hits, and the information held in the array selection memory 2409 is ignored. Below, write signal 2 of array 1
437 and 2439 and the write signal 243 of the array 2
A method of generating 8,2440 will be described. The array selection memory 2409 stores the lower bits 216-of the transfer address 216.
The data of the address designated by 1 is converted into the inversion circuit 2417.
Send to. When the write request 125 is asserted, the value of the hit signal 2435 of the array 1 is written to the address designated by the lower bit 210-1 of the read address 210. When the registration request 124 is asserted, the value of the array selection signal 2443 is written to the address designated by the lower bit 216-1 of the transfer address 216. The inverting circuit 2417 outputs the array selection signal 24 when the output of the array selection memory 2409 is not asserted.
43 is sent out. The AND gate 2410 outputs the hit signal 2435 of the array 1 when the write request 125 is asserted.
Asserts the first write signal 2437 for array 1 when is asserted. The AND gate 2411 outputs the hit signal of the array 1 when the write request 125 is asserted.
When 2435 is not asserted, it sends array 2 first write signal 2438. Similarly, the AND gate 2412 outputs the second write signal 2439 of the array 1 when the registration request 124 is asserted and the array selection signal 2443 is asserted. The AND gate 2413 operates when the registration request 124 is asserted and the array selection signal 2443 is not asserted.
The second write signal 2440 is transmitted. Since the cache memory in FIG. 24 is a 2-way set associative method, it is a full set associative method.
The capacity can be increased with a small amount of material compared to the cache memory of. Moreover, since the block size is as large as 32 bytes, the amount of data transferred from the main memory at one time is large. Therefore, when processing data of consecutive addresses, it is necessary to process a certain amount of data from the main memory to the second cache memory as compared with the cache memory of FIG. 9 having a small block size. Performance is improved due to the small number of prefetch instructions.

【0091】図16は、本発明の第2の実施例の概略図
である。図16の実施例の構成要素のうち、図1の実施
例の構成要素と同一のものは、同じ番号をつけてある。
本実施例の特徴は、2本のアドレスバス1710,17
13、及び、4本のデータバス1711,1712,1
714,1715を有することである。これによって、
2つのメモリ参照命令の並列処理を行うことが可能とな
る。
FIG. 16 is a schematic diagram of the second embodiment of the present invention. Of the constituent elements of the embodiment shown in FIG. 16, those which are the same as those of the embodiment shown in FIG. 1 are designated by the same reference numerals.
The feature of this embodiment is that two address buses 1710 and 17 are provided.
13 and four data buses 1711, 1712, 1
714, 1715. by this,
It is possible to perform parallel processing of two memory reference instructions.

【0092】図16の実施例は、命令ユニット170
1,メモリユニット1702及び主メモリ1703から
構成される。
In the embodiment shown in FIG. 16, the instruction unit 170 is used.
1, a memory unit 1702 and a main memory 1703.

【0093】命令ユニット1701は、命令の処理を行
うユニットであり、命令キャッシュ1801,メモリイ
ンタフェース1802,演算ユニット1820から構成
される。命令ユニット1701は、バス1710〜17
12、及び、バス1713〜1715を通して第1のキ
ャッシュメモリ101、及び、第2のキャッシュメモリ
1690とデータのやり取りを行う。つまり、アドレス
バス1710,1713、4バイト幅の書き込みデータバス
1711,1714,制御信号線1716、を介して、
アドレス,データ及び制御信号をメモリユニット170
2,主メモリ1703に送出する。
The instruction unit 1701 is a unit for processing instructions and is composed of an instruction cache 1801, a memory interface 1802, and an arithmetic unit 1820. The instruction unit 1701 includes buses 1710 to 17
12, and exchanges data with the first cache memory 101 and the second cache memory 1690 via the buses 1713 to 1715. In other words, via the address buses 1710 and 1713, 4-byte width write data buses 1711 and 1714, and the control signal line 1716,
The memory unit 170 stores address, data and control signals.
2. Send to main memory 1703.

【0094】メモリユニット1702は、第1のキャッ
シュメモリ101,第2のキャッシュメモリ1690及
びこれらにデータの入出力を行うためのセレクタ10
4,1695や制御ユニット1692からなる制御部か
ら構成される。第1のキャシュメモリ101は図1の実
施例の第1のキャッシュメモリと同じ構成であり、大容
量で1ポートのキャッシュメモリである。第2のキャッ
シュメモリ1690は、小容量で3ポートを有するキャ
ッシュメモリである。メモリユニット1702は、4バ
イト幅の読み出しデータバス1712,1715,待ち
信号線1717を介して、データ及び待ち信号を命令ユ
ニット1701に送出し、要求信号線1723,172
4を介して、要求信号を主メモリ1703に送出する。
The memory unit 1702 includes a first cache memory 101, a second cache memory 1690, and a selector 10 for inputting / outputting data to / from these.
4, 1695 and a control unit 1692. The first cache memory 101 has the same configuration as the first cache memory of the embodiment shown in FIG. 1, and is a large-capacity one-port cache memory. The second cache memory 1690 is a cache memory having a small capacity and three ports. The memory unit 1702 sends data and a wait signal to the instruction unit 1701 via the 4-byte width read data buses 1712 and 1715 and the wait signal line 1717, and the request signal lines 1723 and 172.
4, the request signal is sent to the main memory 1703.

【0095】主メモリ1703は、命令やデータを格納
する記憶装置であり、バス1720,1721を通して
第1のキャッシュメモリ101と第2のキャッシュメモ
リ1690へデータを転送する。つまり、主メモリ17
03は、転送データバス1720,転送アドレスバス1
721,応答信号線1722を介して、データ,アドレ
ス及び応答信号をメモリユニット1702に送出する。
The main memory 1703 is a storage device for storing instructions and data, and transfers data to the first cache memory 101 and the second cache memory 1690 via the buses 1720 and 1721. That is, the main memory 17
03 is a transfer data bus 1720 and a transfer address bus 1
Data, an address and a response signal are sent to the memory unit 1702 via the 721 and the response signal line 1722.

【0096】図16の命令ユニット1701で処理する
命令のオペコードのフォーマットは、図12で示したも
のと同一である。また、処理する命令の種類は、図13
で示したものと同一である。
The format of the operation code of the instruction processed by the instruction unit 1701 of FIG. 16 is the same as that shown in FIG. The types of instructions to be processed are shown in FIG.
Is the same as that shown in.

【0097】図18は、図16の命令ユニット1701
の構成例である。1801は命令キャッシュ、1803
はデコーダ、1802はメモリインタフェース、180
5はレジスタ、1806はALU、1841,1842
はアドレス加算器である。命令キャッシュは、命令をバ
ス1807を通してデコーダ1803とメモリインタフ
ェース1802に命令を送出する。デコーダ1803は
受け取った命令をデコードし、レジスタ1805,ALU1
806 ,アドレス加算器1841,1842を信号183
0により制御する。ALU1806 は、レジスタ1805よ
り、バス1812,1813を通してデータを受取り、
演算を施して、結果をバス1814を通してレジスタ1
805に書き込む。第1のアドレス加算器1841は、
レジスタ1805よりバス1810,1811を通して
データを受け取り、加算して結果をロード、又は、スト
アすべきアドレスとしてバス1713に送出する。スト
ア時には、ストアすべきデータが、レジスタ1805よ
り読み出され、バス1714へ送出される。ロード時には、
読み出したデータをバス1715を通して受取り、レジ
スタ1805に書き込む。同様に、第2のアドレス加算
器1842は、レジスタ1805よりバス1814,1
815を通してデータを読み出し、加算して結果をロー
ド、又は、ストアすべきアドレスとしてバス1710に
送出する。ストア時には、ストアすべきデータが、レジ
スタ1805より読み出され、バス1711へ送出され
る。ロード時には、読み出したデータをバス1712を
通して受取り、レジスタ1805に書き込む。
FIG. 18 shows the instruction unit 1701 of FIG.
It is a configuration example of. 1801 is an instruction cache, 1803
Is a decoder, 1802 is a memory interface, 180
5 is a register, 1806 is an ALU, 1841, 1842
Is an address adder. The instruction cache sends the instruction to the decoder 1803 and the memory interface 1802 via the bus 1807. The decoder 1803 decodes the received instruction, registers 1805, ALU1
806, the address adders 1841 and 1842 to the signal 183
Control by 0. The ALU1806 receives data from the register 1805 through the buses 1812 and 1813,
The operation is performed and the result is sent to the register 1 through the bus 1814.
Write to 805. The first address adder 1841 is
The data is received from the register 1805 through the buses 1810 and 1811, added, and the result is loaded or sent to the bus 1713 as an address to be stored. At the time of storing, the data to be stored is read from the register 1805 and sent to the bus 1714. When loading,
The read data is received through the bus 1715 and written in the register 1805. Similarly, the second address adder 1842 receives the bus 1814, 1 from the register 1805.
The data is read through 815, added, and the result is loaded or sent to the bus 1710 as an address to be stored. At the time of storing, the data to be stored is read from the register 1805 and sent to the bus 1711. At the time of loading, the read data is received through the bus 1712 and written in the register 1805.

【0098】メモリインタフェース1802は、命令L
D,ST,PF1,PF2の実行時に、制御信号171
6を送出し、待ち信号1717を受け取る。待ち信号17
17が‘1’になったときには、信号1808をデコーダ
1803に送出し、待ち信号1717が‘0’になるま
で、パイプラインを止める。
The memory interface 1802 uses the instruction L.
When executing D, ST, PF1, and PF2, control signal 171
6 is sent, and the wait signal 1717 is received. Waiting signal 17
When 17 becomes "1", the signal 1808 is sent to the decoder 1803, and the pipeline is stopped until the wait signal 1717 becomes "0".

【0099】図19は、パイプラインの処理を説明する
図である。IFは命令読み出しステージ、Dはデコード
ステージ、Eは演算、及び、アドレス加算ステージ、A
はキャッシュアクセスステージ、Wはレジスタ書き込み
ステージ、Rはキャッシュアクセスをやり直すステー
ジ、Xは待ちステージである。2つのロード命令、命令
1と命令2を並列処理する時には、命令1はAステージ
で第1のキャッシュメモリと第2のキャッシュメモリを
同時にアクセスし、命令2はAステージで第2のキャッ
シュメモリのみをアクセスする。命令1は第2のキャッ
シュメモリがヒットするため、第2のキャッシュメモリ
から読み出したデータをWステージでレジスタに書き込
む。命令2は、第2のキャッシュメモリがヒットするた
め、第2のキャッシュメモリから読み出したデータを、
Wステージでレジスタに書き込む。命令3と命令4を並
列処理する時には、命令3はAステージで第1のキャッ
シュメモリと第2のキャッシュメモリを同時にアクセス
し、命令4はAステージで第2のキャッシュメモリのみ
をアクセスする。命令3は第2のキャッシュメモリがヒ
ットするため、第2のキャッシュメモリから読み出した
データをWステージでレジスタに書き込む。命令4は、
第2のキャッシュメモリがミスするため、Rステージで
第1のキャッシュメモリをアクセスし、読み出したデー
タを、Wステージでレジスタに書き込む。命令5と命令
6を並列処理する時には、命令5はAステージで第1の
キャッシュメモリと第2のキャッシュメモリを同時にア
クセスし、命令6はAステージで第2のキャッシュメモ
リのみをアクセスする。命令5は第1のキャッシュメモ
リがヒットするため、第1のキャッシュメモリから読み
出したデータをWステージでレジスタに書き込む。命令
6は、第2のキャッシュメモリがヒットするため、第2
のキャッシュメモリから読み出したデータを、Wステー
ジでレジスタに書き込む。命令7と命令8を並列処理す
る時には、命令7はAステージで第1のキャッシュメモ
リと第2のキャッシュメモリを同時にアクセスし、命令
8はAステージで第2のキャッシュメモリのみをアクセ
スする。命令7は第1のキャッシュメモリがヒットする
ため、第1のキャッシュメモリから読み出したデータを
Wステージでレジスタに書き込む。命令8は、第2のキ
ャッシュメモリがミスするため、Rステージで第1のキ
ャッシュメモリをアクセスし、読み出したデータを、W
ステージでレジスタに書き込む。
FIG. 19 is a diagram for explaining the pipeline processing. IF is an instruction read stage, D is a decode stage, E is an operation and address addition stage, A
Is a cache access stage, W is a register write stage, R is a stage for reattempting cache access, and X is a wait stage. When two load instructions, instruction 1 and instruction 2, are processed in parallel, instruction 1 simultaneously accesses the first cache memory and the second cache memory at the A stage, and instruction 2 only accesses the second cache memory at the A stage. To access. Since the instruction 1 hits the second cache memory, the data read from the second cache memory is written to the register at the W stage. Since the instruction 2 hits the second cache memory, the data read from the second cache memory is
Write to register at W stage. When the instructions 3 and 4 are processed in parallel, the instruction 3 simultaneously accesses the first cache memory and the second cache memory in the A stage, and the instruction 4 accesses only the second cache memory in the A stage. Since the instruction 3 hits the second cache memory, the data read from the second cache memory is written to the register at the W stage. Instruction 4 is
Since the second cache memory misses, the first cache memory is accessed at the R stage and the read data is written to the register at the W stage. When the instruction 5 and the instruction 6 are processed in parallel, the instruction 5 simultaneously accesses the first cache memory and the second cache memory in the A stage, and the instruction 6 accesses only the second cache memory in the A stage. Since the instruction 5 hits the first cache memory, the data read from the first cache memory is written to the register at the W stage. Since the instruction 6 hits the second cache memory,
The data read from the cache memory is written in the register in the W stage. When the instructions 7 and 8 are processed in parallel, the instruction 7 simultaneously accesses the first cache memory and the second cache memory in the A stage, and the instruction 8 accesses only the second cache memory in the A stage. Since the instruction 7 hits the first cache memory, the data read from the first cache memory is written to the register at the W stage. Since the instruction 8 misses the second cache memory, the first cache memory is accessed at the R stage, and the read data is written as W
Write to register on stage.

【0100】ストア命令実行時のパイプライン処理もロ
ード命令実行時と同様であり、AステージまたはRステ
ージでキャッシュをチェックし、ヒットすればAステー
ジまたはRステージでキャッシュへの書き込みを行う。
The pipeline processing at the time of executing the store instruction is the same as that at the time of executing the load instruction. The cache is checked at the A stage or the R stage, and if it is hit, writing to the cache is performed at the A stage or the R stage.

【0101】上述したように、2番目の命令が第2のキ
ャッシュメモリにヒットした時には、2つのメモリ参照
命令の並列処理を行う。従って、PF2命令を用いて第
2のキャッシュメモリにデータを転送しておくことによ
り、常に2つのメモリ参照命令の並列処理を行うことが
可能となり、性能が向上する。
As described above, when the second instruction hits the second cache memory, two memory reference instructions are processed in parallel. Therefore, by transferring the data to the second cache memory using the PF2 instruction, it becomes possible to always perform parallel processing of the two memory reference instructions and improve the performance.

【0102】図17は、図16のメモリユニット170
2の構成例である。101は第1のキャッシュメモリ、
1690は第2のキャッシュメモリ、102は4エント
リのプリフェッチキュー、1603は制御回路、10
4,1740,1742,1731,1734はセレクタで
ある。
FIG. 17 shows the memory unit 170 of FIG.
2 is a configuration example of No. 2. 101 is the first cache memory,
1690 is a second cache memory, 102 is a 4-entry prefetch queue, 1603 is a control circuit, 10
4, 1740, 1742, 1731 and 1734 are selectors.

【0103】第1のキャッシュメモリ101は、アドレ
ス1630,転送データ1720,セレクタ制御信号1
623,書き込み信号1622,書き込みデータ174
4を入力として受け、読み出しデータ1612,ヒット
信号1613を出力する。第2のキャッシュメモリ16
90は、アドレス1710,1713,転送アドレス1
721,転送データ1720,登録信号1624,書き
込み信号1625,1626,書き込みデータ171
1,1714を受取り、読み出しデータ1610,171
2,ヒット信号1611,1681を送出する。プリフ
ェッチキュー102は、キャッシュ選択信号1733,転
送アドレス1721,アドレス1730,セット信号1
20,リセット信号121を受け、フル信号114,ヒ
ット信号115,キャッシュ選択信号116を出力す
る。
The first cache memory 101 has an address 1630, transfer data 1720, selector control signal 1
623, write signal 1622, write data 174
4 is input, and read data 1612 and hit signal 1613 are output. Second cache memory 16
90 is address 1710, 1713, transfer address 1
721, transfer data 1720, registration signal 1624, write signals 1625 and 1626, write data 171
1,1714 are received and read data 1610,171
2. Hit signals 1611 and 1681 are transmitted. The prefetch queue 102 has a cache selection signal 1733, a transfer address 1721, an address 1730, and a set signal 1
20, the reset signal 121 is received, and the full signal 114, the hit signal 115, and the cache selection signal 116 are output.

【0104】制御回路1603は、命令ユニットより制
御信号1716−3,1716−4を、プリフェッチキ
ュー102よりフル信号114,ヒット信号115,キ
ャッシュ選択信号116を、主メモリより応答信号17
22を、第2のキャッシュメモリ1690よりヒット信
号1611,1681を、第1のキャッシュメモリ10
1よりヒット信号1613をそれぞれ受取り、命令ユニ
ットへ待ち信号1717を、プリフェッチキュー102へセ
ット信号120とリセット信号121、選択信号173
2を、主メモリへ転送要求信号1723,1724を、
第2のキャッシュメモリ1690へ登録信号1624,
書き込み信号1625,1626,第1のキャッシュメ
モリ101へ書き込み信号1622,セレクタ制御信号
1623を、セレクタ1740、及び1742へセレクタ制
御信号1623,1627をそれぞれ送出する。
The control circuit 1603 outputs control signals 1716-3 and 1716-4 from the instruction unit, a full signal 114, a hit signal 115 and a cache selection signal 116 from the prefetch queue 102 and a response signal 17 from the main memory.
22 from the second cache memory 1690 and hit signals 1611 and 1681 from the second cache memory 1690.
1, the hit signal 1613 is received, the wait signal 1717 is sent to the instruction unit, the set signal 120, the reset signal 121, and the selection signal 173 are sent to the prefetch queue 102.
2 to the main memory, transfer request signals 1723 and 1724,
A registration signal 1624 to the second cache memory 1690,
Write signals 1625, 1626, write signal 1622 to the first cache memory 101, selector control signal
1623 is sent to selectors 1740 and 1742 as selector control signals 1623 and 1627, respectively.

【0105】セレクタ104は第2のキャッシュメモリ
1690よりデータ1610,ヒット信号1611,第
1のキャッシュメモリ101よりデータ1612,ヒッ
ト信号1613を受取り、ヒット信号1611がアサー
トされればデータ1610を、ヒット信号1613がア
サートされればデータ1612を出力として読み出し、
データバス1715に出力する。またセレクタ1740
は、セレクタ制御信号1623,1627の制御により
アドレス1713,アドレス1710,転送アドレス1
721のいずれかを選んで、出力1630として第1の
キャッシュメモリ101に送出する。またセレクタ17
42は、セレクタ制御信号1627の制御により書き込
みデータ1714,書き込みデータ1711のいずれか
を選んで、出力1744として第1のキャッシュメモリ
101に送出する。またセレクタ1731は、選択信号
1732の制御によりアドレス1713,アドレス1710
のどちらかを選んで、出力1730としてプリフェッチ
キュー102に送出する。またセレクタ1734は、選
択信号1732の制御によりセット選択信号1716−1,
セット選択信号1716−2のどちらかを選んで、出力
1733としてプリフェッチキュー102に送出する。
The selector 104 receives the data 1610 and the hit signal 1611 from the second cache memory 1690 and the data 1612 and the hit signal 1613 from the first cache memory 101. If the hit signal 1611 is asserted, the data 1610 and the hit signal 1611 are received. If 1613 is asserted, the data 1612 is read as output,
Output to the data bus 1715. Also selector 1740
Are address 1713, address 1710, transfer address 1 under the control of selector control signals 1623 and 1627.
721 is selected and sent to the first cache memory 101 as the output 1630. Also selector 17
42 selects either the write data 1714 or the write data 1711 under the control of the selector control signal 1627, and sends it to the first cache memory 101 as an output 1744. Further, the selector 1731 controls the address 1713 and the address 1710 under the control of the selection signal 1732.
Is output to the prefetch queue 102 as the output 1730. Further, the selector 1734 controls the selection signal 1732 to set the selection signals 1716-1,
Either one of the set selection signals 1716-2 is selected and sent as the output 1733 to the prefetch queue 102.

【0106】第1のキャッシュメモリ101は、書き込
み信号1622が読み出しを指示しているときには、ア
ドレス1630の内容でキャッシュメモリを読み出し、
読み出しデータ1612とヒット信号1613を送出す
る。又、書き込み信号1622が書き込み指示しているとき
には、セレクタ制御信号1623が1のときには転送デ
ータ1720を、0のときには書き込みデータ1744
の内容を書き込む。
The first cache memory 101 reads the cache memory with the contents of the address 1630 when the write signal 1622 instructs the read,
The read data 1612 and the hit signal 1613 are transmitted. Further, when the write signal 1622 is instructing to write, the transfer data 1720 is set when the selector control signal 1623 is 1, and the write data 1744 is set when it is 0.
Write the contents of.

【0107】第2のキャッシュメモリ1690は、書き
込み信号1625がネゲートされ、読み出しを指示して
いるときには、アドレス1713でキャッシュの内容を
調べ、読み出したデータ1610とヒット信号1611
を送出する。書き込み信号1625がアサートされ、書
き込みを指示しているときには、キャッシュの中を調
べ、ヒットしていれば書き込みデータバス1714の内
容を書き込む。同様に、書き込み信号1626がネゲー
トされ、読み出しを指示しているときには、アドレス1
710でキャッシュの内容を調べ、読み出したデータ1
712とヒット信号1681を送出する。書き込み信号
1626がアサートされ、書き込みを指示しているとき
には、キャッシュの中を調べ、ヒットしていれば書き込
みデータバス1711の内容を書き込む。上記動作とは
並行して登録信号1624がアサートされたときには、
転送アドレス1721と転送データ1720のペアを登
録する。
When the write signal 1625 is negated and read is instructed, the second cache memory 1690 checks the contents of the cache at the address 1713 and reads the read data 1610 and the hit signal 1611.
Is sent. When the write signal 1625 is asserted and a write is instructed, the cache is checked, and if there is a hit, the contents of the write data bus 1714 are written. Similarly, when the write signal 1626 is negated and a read instruction is issued, the address 1
The data read out by checking the cache contents in 710 1
712 and a hit signal 1681 are transmitted. When the write signal 1626 is asserted and the writing is instructed, the cache is checked, and if there is a hit, the contents of the write data bus 1711 are written. When the registration signal 1624 is asserted in parallel with the above operation,
A pair of transfer address 1721 and transfer data 1720 is registered.

【0108】プリフェッチキュー102は、主メモリよ
り転送中のデータのアドレスを最大4エントリまで保持
できるキューであり、セット信号120がアサートされ
たときには、アドレス1730とキャッシュ選択信号1
733の内容をキューに登録する。又、リセット信号1
21がアサートされたときには転送アドレス1721に
対応するキャッシュ選択信号116を出力し、そのエン
トリを無効化する。又、アドレス1730と内部に保持
しているアドレスと比較し、そのエントリが主メモリよ
り転送中であればヒット信号115をアサートする。ま
た全てのエントリに有効なアドレスが保持されている間
は、それを示すフル信号114をアサートする。
The prefetch queue 102 is a queue capable of holding an address of data being transferred from the main memory up to 4 entries. When the set signal 120 is asserted, the address 1730 and the cache selection signal 1 are stored.
The contents of 733 are registered in the queue. Also, reset signal 1
When 21 is asserted, the cache selection signal 116 corresponding to the transfer address 1721 is output to invalidate the entry. Further, the address 1730 is compared with the address held internally, and if the entry is being transferred from the main memory, the hit signal 115 is asserted. Further, while the valid address is held in all the entries, the full signal 114 indicating it is asserted.

【0109】図22に図17の制御回路1603の構成
例を示す。制御回路1603は、第1の命令に関する制
御信号1716−3、及び第2の命令に関する制御信号
1716−4をデコードして、LD,ST,PF1,PF2
の各命令の起動を受け付ける。第1の命令がLD命令
で、第1のキャッシュメモリよりのヒット信号1613
と第2のキャッシュメモリよりの第1のヒット信号16
11の両者がネゲートされているとき、キャッシュが両
方ともミスしているので、主メモリよりデータを転送す
る間命令ユニットを待たせるため、第1の命令の待ち信
号2201をアサートする。また、第1の命令がLD,
PF1,PF2命令で第1のキャッシュメモリよりのヒ
ット信号1613と第2キャッシュメモリよりの第1の
ヒット信号1611との両者がネゲートされており、か
つ、プリフェッチキューよりのヒット信号115もネゲ
ートされているがプリフェッチキューよりのフル信号1
14がアサートされているとき、プリフェッチキューが
一杯で、命令をキューに積むことができないため、プリ
フェッチキューに空きができるまで命令ユニットを待た
せるため、第1の命令の待ち信号2201をアサートす
る。また、第1の命令がLD,PF1,PF2命令で第
1のキャッシュメモリよりのヒット信号1613と第2キャ
ッシュメモリよりの第1のヒット信号1611との両者
がネゲートされており、かつ、プリフェッチキューより
のヒット信号115もフル信号114もネゲートされて
いるときには、主メモリへの転送要求信号1723をア
サートする。同時に、プリフェッチキューへの選択信号
1732とセット信号120をアサートし、第1の命令
をプリフェッチキューに登録する。また、第1の命令が
ST命令で、第1キャッシュメモリよりのヒット信号1
613がアサートされているときには、そのデータを第
1のキャッシュメモリへ書き込むため、第1キャッシュ
メモリへの書き込み信号1622をアサートする。同様
に、第1の命令がST命令で、第2のキャッシュメモリ
よりの第1のヒット信号1611がアサートされたとき
には、そのデータを第2のキャッシュメモリに書き込む
ため第2のキャッシュメモリへの第1の書き込み信号1
625をアサートする。
FIG. 22 shows a configuration example of the control circuit 1603 shown in FIG. The control circuit 1603 controls the control signal 1716-3 relating to the first instruction and the control signal relating to the second instruction.
Decode 1716-4 to LD, ST, PF1, PF2
Accepts the activation of each instruction. The first instruction is the LD instruction, and the hit signal 1613 from the first cache memory
And the first hit signal 16 from the second cache memory
When both 11 are negated, both caches miss and therefore the first instruction wait signal 2201 is asserted to make the instruction unit wait while transferring data from the main memory. Also, the first instruction is LD,
Both the hit signal 1613 from the first cache memory and the first hit signal 1611 from the second cache memory are negated by the PF1 and PF2 instructions, and the hit signal 115 from the prefetch queue is also negated. Full signal from prefetch queue 1
When 14 is asserted, the instruction fetch unit 2201 is asserted in order to make the instruction unit wait until the prefetch queue becomes available because the prefetch queue is full and instructions cannot be queued. Further, the first instruction is the LD, PF1, PF2 instruction, both the hit signal 1613 from the first cache memory and the first hit signal 1611 from the second cache memory are negated, and the prefetch queue When both the hit signal 115 and the full signal 114 are negated, the transfer request signal 1723 to the main memory is asserted. At the same time, the selection signal 1732 for the prefetch queue and the set signal 120 are asserted to register the first instruction in the prefetch queue. The first instruction is the ST instruction, and the hit signal 1 from the first cache memory
When 613 is asserted, the write signal 1622 to the first cache memory is asserted to write the data to the first cache memory. Similarly, when the first instruction is the ST instruction and the first hit signal 1611 from the second cache memory is asserted, the data is written to the second cache memory in order to write the data to the second cache memory. Write signal 1
Assert 625.

【0110】一方、第2の命令がLD,ST,PF1,
PF2命令で、第2のキャッシュメモリよりの第2のヒ
ット信号1681がネゲートされているとき、次のサイ
クルでキャッシュ1にアクセスする必要があるため、第
2の命令の待ち信号2202をアサートする。第2の命
令のキャッシュ1へのアクセスは、第1の命令の待ち信
号2201がネゲートされ、第1の命令のキャッシュへ
のアクセスが終了した時点で行う。ANDゲート221
1は、第1の命令の待ち信号2201がネゲートされ、
第2の命令の待ち信号2202がアサートされた時に、
制御信号2203をアサートする。レジスタ2212は、制
御信号2203がアサートされると、1サイクル後にキ
ャッシュ1への選択信号1627をアサートする。選択
信号1627が1であるときは、第2の命令のキャッシュ1
へのアクセスを行い、第1の命令のキャッシュへのアク
セスは行わない。第2の命令がLD命令で、キャッシュ
1への選択信号1627がアサートされており、第1の
キャッシュメモリよりのヒット信号1613がネゲート
されているとき、キャッシュが両方ともミスしているの
で、主メモリよりデータを転送する間命令ユニットを待
たせるため、第2の命令の待ち信号2202をアサート
する。また、第2の命令がLD,PF1,PF2命令
で、キャッシュ1への選択信号1627がアサートされ
ており、第1のキャッシュメモリよりのヒット信号16
13がネゲートされており、かつ、プリフェッチキュー
よりのヒット信号115もネゲートされているがプリフ
ェッチキューよりのフル信号114がアサートされてい
るとき、プリフェッチキューが一杯で、命令をキューに
積むことができないため、プリフェッチキューに空きが
できるまで命令ユニットを待たせるため、命令2の待ち
信号2202をアサートする。また、第2の命令がL
D,PF1,PF2命令で、キャッシュ1への選択信号
1627がアサートされており、第1のキャッシュメモ
リよりのヒット信号1613がネゲートされており、か
つ、プリフェッチキューよりのヒット信号115もフル
信号114もネゲートされているときには、主メモリへ
の転送要求信号1724をアサートする。同時に、プリ
フェッチキューへのセット信号120をアサートし、プリ
フェッチキューに第2の命令を登録する。また、第2の
命令がST命令で、キャッシュ1への選択信号1627
がアサートされており、第1キャッシュメモリよりのヒ
ット信号1613がアサートされているときには、その
データを第1キャッシュメモリへ書き込むため、第1キ
ャッシュメモリへの書き込み信号1622をアサートす
る。また、第2の命令がST命令で、第2のキャッシュ
メモリよりの第2のヒット信号1681がアサートされ
たときには、そのデータを第2のキャッシュメモリに書
き込むため第2のキャッシュメモリへの第2の書き込み
信号1626をアサートする。
On the other hand, the second instruction is LD, ST, PF1,
When the second hit signal 1681 from the second cache memory is negated in the PF2 instruction, the wait signal 2202 of the second instruction is asserted because it is necessary to access the cache 1 in the next cycle. The access of the second instruction to the cache 1 is performed when the wait signal 2201 of the first instruction is negated and the access of the first instruction to the cache is completed. AND gate 221
1, the wait signal 2201 of the first instruction is negated,
When the wait signal 2202 of the second instruction is asserted,
Assert the control signal 2203. When the control signal 2203 is asserted, the register 2212 asserts the select signal 1627 to the cache 1 after one cycle. When the selection signal 1627 is 1, the second instruction cache 1
Is accessed, but the cache of the first instruction is not accessed. When the second instruction is the LD instruction, the select signal 1627 to the cache 1 is asserted, and the hit signal 1613 from the first cache memory is negated, both caches miss, The second instruction wait signal 2202 is asserted to make the instruction unit wait while the data is transferred from the memory. The second instruction is an LD, PF1, or PF2 instruction, the select signal 1627 to the cache 1 is asserted, and the hit signal 16 from the first cache memory 16
When 13 is negated and the hit signal 115 from the prefetch queue is also negated but the full signal 114 from the prefetch queue is asserted, the prefetch queue is full and the instruction cannot be queued. Therefore, in order to make the instruction unit wait until the prefetch queue becomes available, the wait signal 2202 of the instruction 2 is asserted. The second instruction is L
In the D, PF1, and PF2 instructions, the select signal 1627 to the cache 1 is asserted, the hit signal 1613 from the first cache memory is negated, and the hit signal 115 from the prefetch queue is also the full signal 114. Also, when it is negated, the transfer request signal 1724 to the main memory is asserted. At the same time, the set signal 120 to the prefetch queue is asserted, and the second instruction is registered in the prefetch queue. The second instruction is the ST instruction, and the selection signal 1627 to the cache 1
Is asserted and the hit signal 1613 from the first cache memory is asserted, the write signal 1622 to the first cache memory is asserted to write the data to the first cache memory. When the second instruction is the ST instruction and the second hit signal 1681 from the second cache memory is asserted, the second data is written to the second cache memory in order to write the data to the second cache memory. Write signal 1626 is asserted.

【0111】ORゲート2213は、第1の命令の待ち
信号2201と、第2の命令の待ち信号2202のいず
れかがアサートされたとき、命令ユニットへの待ち信号
1717をアサートする。
The OR gate 2213 waits for the instruction unit when either the wait signal 2201 for the first instruction or the wait signal 2202 for the second instruction is asserted.
Assert 1717.

【0112】また、主メモリよりの応答信号1722が
アサートされたとき、プリフェッチキュー102よりそ
のエントリをリセットするため、プリフェッチキューへ
のリセット信号121をアサートする。同時に、転送デ
ータをキャッシュに登録するために、キャッシュ選択信
号116を見て、それが第1キャッシュメモリへの書き
込みを指示しているときには、第1キャッシュメモリへ
の書き込み信号1622、および選択信号1623をアサー
トし、第2キャッシュメモリへの書き込みを指示してい
るときには、第2キャッシュメモリへの登録信号162
4をアサートする。
When the response signal 1722 from the main memory is asserted, the reset signal 121 to the prefetch queue is asserted to reset the entry from the prefetch queue 102. At the same time, in order to register the transfer data in the cache, the cache selection signal 116 is viewed, and when it is instructed to write to the first cache memory, the write signal 1622 to the first cache memory and the selection signal 1623. Is asserted to instruct to write to the second cache memory, the registration signal 162 to the second cache memory is
Assert 4.

【0113】図20は、図17の第2のキャッシュメモ
リ1690の構成例である。図20のキャッシュメモリ
は、ブロクサイズ4バイト,容量256バイト,フルア
ソシアティブ方式のキャッシュメモリである。2000
は判定回路、2001〜2003は有効ビット,アドレス,
データのペアを、保持するセルである。セル2001〜
2003は読み出しアドレス1713,1710,登録
要求1624,書き込みデータ1714,1711,書
き込み要求1625,1626を入力として受け、デー
タ1610,1712を出力する。又、セル2001〜
2003はそれぞれヒット信号2010〜2012,2
020〜2022を判定回路2000に送出する。セル
2001は転送アドレス1721,転送データ1720
を受け、アドレス2013,データ2014をセル20
02に送る。同様に、セル2002はアドレス2015,2
016を次のセルに送る。最後のセル2003は、アド
レス2017,データ2018を受ける。
FIG. 20 shows an example of the configuration of the second cache memory 1690 shown in FIG. The cache memory in FIG. 20 is a full-associative cache memory having a block size of 4 bytes and a capacity of 256 bytes. 2000
Is a decision circuit, 2001 to 2003 are valid bits, addresses,
A cell that holds a pair of data. Cell 2001-
2003 receives read addresses 1713 and 1710, registration request 1624, write data 1714 and 1711, and write requests 1625 and 1626 as inputs, and outputs data 1610 and 1712. Also, cells 2001 to
2003 are hit signals 2010 to 2012 and 2 respectively.
020-2022 are sent to the determination circuit 2000. The cell 2001 has a transfer address 1721 and transfer data 1720.
Address 2013 and data 2014 in cell 20
Send to 02. Similarly, cell 2002 has addresses 2015, 2
Send 016 to the next cell. The last cell 2003 receives the address 2017 and the data 2018.

【0114】判定回路2000はセル2001〜200
3よりのヒット信号2010〜2012のうち、どれか1つ
がアサートされたならヒット信号1611をアサートす
る。同様に、セル2001〜2003よりのヒット信号
2020〜2022のうち、どれか1つがアサートされ
たならヒット信号1681をアサートする。セル2001
は、読み出しアドレス1713と、内部に保持するアド
レスを比較し、一致し、かつ、有効であれば、ヒット信
号2010を送出し、対応する内部に保持するデータを
バス1610に出力する。書き込み要求1625がアサ
ートされたときには、内部に保持するアドレスとアドレ
ス1713を比較し、一致し、かつ、有効ビットがアサ
ートされていれば、書き込みデータ1714の内容を取
り込む。同様に、読み出しアドレス1710と、内部に
保持するアドレスを比較し、一致し、かつ、有効であれ
ば、ヒット信号2020を送出し、対応する内部に保持
するデータをバス1712に出力する。書き込み要求1
626がアサートされたときには、内部に保持するアド
レスとアドレス1710を比較し、一致し、かつ、有効
ビットがアサートされていれば、書き込みデータ171
1の内容を取り込む。以上の動作とは並列に、登録要求
1624がアサートされたときには、有効ビットをアサ
ートし、転送アドレス1721,転送データ1720を
内部に取り込む。この時セル2002はセル2001の
保持していたアドレスとデータをそれぞれ信号201
3,2014を通して取り込む。即ち、セル2001〜
2003はFIFOになっている。
The determination circuit 2000 is composed of cells 2001 to 200.
If any one of the hit signals 2010 to 2012 from 3 is asserted, the hit signal 1611 is asserted. Similarly, if any one of the hit signals 2020 to 2022 from the cells 2001 to 2003 is asserted, the hit signal 1681 is asserted. Cell 2001
Compares the read address 1713 with the address held inside, and if they match and is valid, sends a hit signal 2010 and outputs the corresponding data held inside to the bus 1610. When the write request 1625 is asserted, the internally held address is compared with the address 1713. If they match and the valid bit is asserted, the content of the write data 1714 is fetched. Similarly, the read address 1710 is compared with the address held internally, and if they match and are valid, the hit signal 2020 is sent and the corresponding data held internally is output to the bus 1712. Write request 1
When 626 is asserted, the address held internally is compared with the address 1710. If they match and the valid bit is asserted, the write data 171 is written.
Take in the contents of 1. In parallel with the above operation, when the registration request 1624 is asserted, the valid bit is asserted and the transfer address 1721 and the transfer data 1720 are fetched inside. At this time, the cell 2002 outputs the address and data held by the cell 2001 to the signal 201.
Take in through 3,2014. That is, cells 2001 to
2003 is a FIFO.

【0115】図21は、図20のセル2001の構成例
である。2100,2101,2102はそれぞれ有効ビッ
ト,アドレス,データを保持するレジスタである。21
04,2114はコンパレータ、2105,2106,
2115,2116はANDゲート、2103,211
3はトライステートバッファである。登録要求1624は有
効ビットを保持するレジスタ2100,アドレスを保持
するレジスタ2101,データを保持するレジスタ21
02に接続されている。登録要求1624がアサートさ
れたときに、有効ビット2100はセットされ、アドレ
スを保持するレジスタ2101は転送アドレス1721
をとり込み、データを保持するレジスタ2102は転送
データ1720を取り込む。コンパレータ2104はア
ドレスを保持するレジスタの出力2013と、アドレス
1713を比較する。ANDゲート2106は、コンパ
レータ2104の出力がアサートされ、かつ、有効ビッ
トがアサートされているときに、ヒット信号2010を
アサートし、トライステートバッファ2103を開きデ
ータを保持するレジスタの内容をデータバス1610に送出
する。又、ヒット信号2010がアサートされ、書込み
要求1625がアサートされたことをANDゲート21
05が検知すると、データを保持するレジスタ2102
への信号2108をアサートし、書き込みデータ171
4を、データを保持するレジスタ2102に取り込む。
同様に、コンパレータ2114はアドレスを保持するレ
ジスタの出力2013と、アドレス1710を比較す
る。ANDゲート2116は、コンパレータ2114の出
力がアサートされ、かつ、有効ビットがアサートされて
いるときに、ヒット信号2020をアサートし、トライ
ステートバッファ2113を開きデータを保持するレジ
スタの内容をデータバス1712に送出する。又、ヒッ
ト信号2020がアサートされ、書込み要求1626がアサ
ートされたことをANDゲート2115が検知すると、
データを保持するレジスタ2102への信号2118を
アサートし、書き込みデータ1711を、データを保持
するレジスタ2102に取り込む。
FIG. 21 shows a structural example of the cell 2001 of FIG. Reference numerals 2100, 2101 and 2102 are registers that hold valid bits, addresses and data, respectively. 21
04 and 2114 are comparators, and 2105 and 2106.
2115 and 2116 are AND gates, 2103 and 211
3 is a tri-state buffer. The registration request 1624 includes a register 2100 holding a valid bit, a register 2101 holding an address, and a register 21 holding data.
02 is connected. When the registration request 1624 is asserted, the valid bit 2100 is set, and the register 2101 holding the address has the transfer address 1721.
And the register 2102 for holding the data fetches the transfer data 1720. The comparator 2104 compares the output 2013 of the register holding the address with the address 1713. The AND gate 2106 asserts the hit signal 2010 when the output of the comparator 2104 is asserted and the valid bit is asserted, opens the tri-state buffer 2103, and outputs the contents of the register holding the data to the data bus 1610. Send out. Further, the AND signal 21 indicates that the hit signal 2010 is asserted and the write request 1625 is asserted.
05 detects, the register 2102 for holding the data
Signal 2108 to write data 171
4 is loaded into the register 2102 which holds the data.
Similarly, the comparator 2114 compares the address 1710 with the output 2013 of the register holding the address. The AND gate 2116 asserts the hit signal 2020 when the output of the comparator 2114 is asserted and the valid bit is asserted, opens the tri-state buffer 2113, and outputs the contents of the register holding the data to the data bus 1712. Send out. When the AND signal 2115 detects that the hit signal 2020 is asserted and the write request 1626 is asserted,
A signal 2118 to the register 2102 holding the data is asserted, and the write data 1711 is fetched in the register 2102 holding the data.

【0116】上述のように、図20のキャッシュメモリ
はフルアソシアティブ方式であり、2つのメモリ参照命
令のアクセス及び主メモリからの転送データの書き込み
を並列に処理するため、構成は複雑であるが、容量が2
56バイトと少ないため、全体としての大きさは小さ
く、また、高速化も可能である。
As described above, the cache memory of FIG. 20 is of the fully associative type, and since the access of two memory reference instructions and the writing of the transfer data from the main memory are processed in parallel, the configuration is complicated. Capacity is 2
Since it is as small as 56 bytes, the overall size is small, and the speed can be increased.

【0117】図25は、本発明の第3の実施例の概略図
である。図25の実施例の構成要素のうち、図1の実施
例の構成要素と同一のものは、同じ番号をつけてある。
本実施例の特徴は、メモリユニット2602内にST命
令の情報を保持するレジスタ2580を設けたことにあ
る。これによって、ST命令のキャッシュヒット判定
と、データの書き込みを別々のマシンサイクルに行うこ
とができるため、ST命令を処理する時に1マシンサイ
クルに必要とされる時間が減少し、動作周波数が向上す
る。
FIG. 25 is a schematic diagram of the third embodiment of the present invention. Of the constituent elements of the embodiment shown in FIG. 25, the same constituent elements as those of the embodiment shown in FIG. 1 are designated by the same reference numerals.
The feature of this embodiment resides in that the memory unit 2602 is provided with a register 2580 for holding the information of the ST instruction. As a result, the cache hit determination of the ST instruction and the data writing can be performed in different machine cycles, so that the time required for one machine cycle when processing the ST instruction is reduced and the operating frequency is improved. .

【0118】図25の実施例は、命令ユニット201,
メモリユニット2602及び主メモリ203から構成さ
れる。
In the embodiment of FIG. 25, the instruction unit 201,
It is composed of a memory unit 2602 and a main memory 203.

【0119】命令ユニット201は、図1の実施例の命
令ユニットと同じ構成である。
The instruction unit 201 has the same structure as the instruction unit of the embodiment shown in FIG.

【0120】メモリユニット2602は、第1のキャッ
シュメモリ101,第2のキャッシュメモリ2590及
びこれらにデータの入出力を行うためのセレクタ10
4,2595や制御ユニット2592からなる制御部か
ら構成される。第1のキャシュメモリ101は図1の実
施例の第1のキャッシュメモリと同じ構成であり、大容
量で1ポートのキャッシュメモリである。第2のキャッ
シュメモリ2590は、メモリ参照命令のアクセスと、
ST命令のデータ書き込み、主メモリからの転送データ
の書き込みとを並列に処理するため、3つのポートを有
する。メモリユニット2602は、4バイト幅の読み出
しデータバス212,待ち信号線214を介して、デー
タ及び待ち信号を命令ユニット201に送出し、要求信
号線218を介して、要求信号を主メモリ203に送出
する。
The memory unit 2602 includes a first cache memory 101, a second cache memory 2590 and a selector 10 for inputting / outputting data to / from these.
4, 2595 and a control unit 2592. The first cache memory 101 has the same configuration as the first cache memory of the embodiment shown in FIG. 1, and is a large-capacity one-port cache memory. The second cache memory 2590 accesses the memory reference instruction and
It has three ports for parallel processing of writing ST command data and writing transfer data from the main memory. The memory unit 2602 sends data and a wait signal to the instruction unit 201 via the 4-byte width read data bus 212 and the wait signal line 214, and sends a request signal to the main memory 203 via the request signal line 218. To do.

【0121】主メモリ203は、図1の実施例の主メモ
リと同じ構成である。
The main memory 203 has the same structure as the main memory of the embodiment shown in FIG.

【0122】図25の命令ユニット201で処理する命
令のオペコードのフォーマットは、図12で示したもの
と同一である。また、処理する命令の種類は、図13で
示したものと同一である。
The format of the operation code of the instruction processed by the instruction unit 201 of FIG. 25 is the same as that shown in FIG. The types of instructions to be processed are the same as those shown in FIG.

【0123】図27は、パイプラインの処理を説明する
図である。IFは命令読み出しステージ、Dはデコード
ステージ、Eは演算、及び、アドレス加算ステージ、A
はキャッシュアクセスステージ、Wはレジスタ書き込み
ステージ、Rはキャッシュアクセスをやり直すステー
ジ、Xは待ちステージ、SはST命令のデータ書き込み
ステージである。図27のパイプラインでは、図4のパ
イプラインとは異なり、ST命令のデータ書き込みをA
ステージではなく、Sステージで行う。まず、図27
(a)について説明する。命令1はAステージで第1の
キャッシュメモリと第2のキャッシュメモリを同時にア
クセスする。命令1は第2のキャッシュメモリがヒット
するため、Sステージで第2のキャッシュメモリに書き
込みを行う。命令2はAステージで第1のキャッシュメ
モリと第2のキャッシュメモリを同時にアクセスする。
命令2の第2のキャッシュメモリの読み出しは、命令1
の第2のキャッシュメモリへのデータ書き込みと同一サ
イクルであるが、第2のキャッシュメモリはLD命令の
データ読み出しとST命令のデータ書き込みを1マシン
サイクル内に処理することができるため、命令2の処理
は余分なペナルティなしに実行することができる。命令
2は第2のキャッシュメモリがヒットするため、第2の
キャッシュメモリから読み出したデータをWステージで
レジスタに書き込む。次に、図27(b)について説明
する。命令1はAステージで第1のキャッシュメモリと
第2のキャッシュメモリを同時にアクセスする。命令1
は第2のキャッシュメモリがヒットするため、Sステー
ジで第2のキャッシュメモリに書き込みを行う。命令2
はAステージで第1のキャッシュメモリと第2のキャッ
シュメモリを同時にアクセスする。命令2の第2のキャ
ッシュメモリの読み出しは、命令1の第2のキャッシュ
メモリへのデータ書き込みと同一サイクルであるが、第
2のキャッシュメモリはLD命令のデータ読み出しとS
T命令のデータ書き込みを1マシンサイクル内に処理す
ることができるため、命令2の処理は余分なペナルティ
なしに実行することができる。命令2は第1のキャッシ
ュメモリがヒットするため、第1のキャッシュメモリか
ら読み出したデータをWステージでレジスタに書き込
む。次に、図27(c)について説明する。命令1はA
ステージで第1のキャッシュメモリと第2のキャッシュ
メモリを同時にアクセスする。命令1は第1のキャッシ
ュメモリがヒットするため、Sステージで第1のキャッ
シュメモリに書き込みを行う。命令2はAステージで第
2のキャッシュメモリのみをアクセスする。命令2の第
1のキャッシュメモリの読み出しは、命令1の第1のキ
ャッシュメモリへのデータ書き込みと同一サイクルに実
行することができないため、Aステージでは第1のキャ
ッシュメモリはアクセスしない。命令2は第2のキャッ
シュメモリがヒットするため、第1のキャッシュメモリ
をアクセスすることはせず、第2のキャッシュメモリか
ら読み出したデータをWステージでレジスタに書き込
む。次に、図27(d)について説明する。命令1はA
ステージで第1のキャッシュメモリと第2のキャッシュ
メモリを同時にアクセスする。命令1は第1のキャッシ
ュメモリがヒットするため、Sステージで第1のキャッ
シュメモリに書き込みを行う。命令2はAステージで第
2のキャッシュメモリのみをアクセスする。命令2の第
1のキャッシュメモリの読み出しは、命令1の第1のキ
ャッシュメモリへのデータ書き込みと同一サイクルに実
行することができないため、Aステージでは第1のキャ
ッシュメモリはアクセスしない。命令2は第2のキャッ
シュメモリがミスするため、Rステージで第1のキャッ
シュメモリをアクセスする。Rステージで第1のキャッ
シュメモリをアクセスした結果、第1のキャッシュメモ
リがヒットするため、第1のキャッシュメモリから読み
出したデータをWステージでレジスタに書き込む。
FIG. 27 is a diagram for explaining the pipeline processing. IF is an instruction read stage, D is a decode stage, E is an operation and address addition stage, A
Is a cache access stage, W is a register write stage, R is a stage for redoing cache access, X is a wait stage, and S is a data write stage of an ST instruction. In the pipeline of FIG. 27, unlike the pipeline of FIG.
Perform on the S stage, not the stage. First, FIG.
(A) will be described. Instruction 1 simultaneously accesses the first cache memory and the second cache memory in the A stage. Since the instruction 1 hits the second cache memory, the instruction 1 writes to the second cache memory in the S stage. Instruction 2 simultaneously accesses the first cache memory and the second cache memory in the A stage.
The instruction 2 is read from the second cache memory by the instruction 1
This is the same cycle as the data write to the second cache memory of, but the second cache memory can process the data read of the LD instruction and the data write of the ST instruction within one machine cycle. Processing can be performed without extra penalties. Since the instruction 2 hits the second cache memory, the data read from the second cache memory is written to the register at the W stage. Next, FIG. 27B will be described. Instruction 1 simultaneously accesses the first cache memory and the second cache memory in the A stage. Instruction 1
Writes to the second cache memory in the S stage because the second cache memory hits. Instruction 2
Simultaneously accesses the first cache memory and the second cache memory at the A stage. The read of the second cache memory of the instruction 2 is the same cycle as the data write of the instruction 1 to the second cache memory, but the second cache memory reads the data of the LD instruction and the S
Since the data writing of the T instruction can be processed within one machine cycle, the processing of the instruction 2 can be executed without an extra penalty. Since the instruction 2 hits the first cache memory, the data read from the first cache memory is written to the register at the W stage. Next, FIG. 27C will be described. Instruction 1 is A
At the stage, the first cache memory and the second cache memory are simultaneously accessed. Since the instruction 1 hits the first cache memory, the instruction 1 writes to the first cache memory in the S stage. Instruction 2 accesses only the second cache memory at the A stage. Since the reading of the first cache memory of the instruction 2 cannot be executed in the same cycle as the data writing of the instruction 1 to the first cache memory, the first cache memory is not accessed in the A stage. Since the instruction 2 hits the second cache memory, it does not access the first cache memory and writes the data read from the second cache memory into the register at the W stage. Next, FIG. 27D will be described. Instruction 1 is A
At the stage, the first cache memory and the second cache memory are simultaneously accessed. Since the instruction 1 hits the first cache memory, the instruction 1 writes to the first cache memory in the S stage. Instruction 2 accesses only the second cache memory at the A stage. Since the reading of the first cache memory of the instruction 2 cannot be executed in the same cycle as the data writing of the instruction 1 to the first cache memory, the first cache memory is not accessed in the A stage. Since the instruction 2 misses the second cache memory, it accesses the first cache memory at the R stage. As a result of accessing the first cache memory in the R stage, the first cache memory is hit, so the data read from the first cache memory is written in the register in the W stage.

【0124】上述したように、ST命令のヒットチェッ
クとデータの書き込みを別々のステージで行うため、1
ステージに行う処理の量が減少し、高速に処理を行うこ
とが可能となる。また、ST命令が第2のキャッシュメ
モリにヒットした時には、次のLD命令は余分なペナル
ティなしに処理を行う。従って、PF2命令を用いて第
2のキャッシュメモリにデータを転送しておくことによ
り、常に余分なペナルティなしに処理を行うことができ
るため、性能が向上する。
As described above, since the hit check of the ST instruction and the writing of data are performed in different stages, 1
The amount of processing performed on the stage is reduced, and processing can be performed at high speed. Further, when the ST instruction hits the second cache memory, the next LD instruction is processed without extra penalty. Therefore, by transferring the data to the second cache memory by using the PF2 instruction, the processing can always be performed without an extra penalty, and the performance is improved.

【0125】図26は、図25のメモリユニット260
2の構成例である。101は第1のキャッシュメモリ、
2590は第2のキャッシュメモリ、102は4エント
リのプリフェッチキュー、2503は制御回路、10
4,2640はセレクタ、2631,2632はレジス
タである。
FIG. 26 shows the memory unit 260 of FIG.
2 is a configuration example of No. 2. 101 is the first cache memory,
2590 is a second cache memory, 102 is a 4-entry prefetch queue, 2503 is a control circuit, 10
4, 2640 are selectors, and 2631, 2632 are registers.

【0126】第1のキャッシュメモリ101は、アドレ
ス2530,転送データ215,セレクタ制御信号25
23,書き込み信号2522,書き込みデータ2644
を入力として受け、読み出しデータ2512,ヒット信
号2513を出力する。第2のキャッシュメモリ259
0は、読み出しアドレス210,書き込みアドレス26
13,転送アドレス216,転送データ215,登録信
号2524,書き込み信号2525,書き込みデータ2
644を受取り、読み出しデータ2510,ヒット信号
2511を送出する。プリフェッチキュー102は、キ
ャッシュ選択信号213−1,転送アドレス216,ア
ドレス210,セット信号120,リセット信号121
を受け、フル信号114,ヒット信号115,キャッシ
ュ選択信号116を出力する。
The first cache memory 101 has an address 2530, transfer data 215, and selector control signal 25.
23, write signal 2522, write data 2644
Of the read data 2512 and the hit signal 2513 are output. Second cache memory 259
0 is a read address 210 and a write address 26
13, transfer address 216, transfer data 215, registration signal 2524, write signal 2525, write data 2
644 is received, and read data 2510 and hit signal 2511 are transmitted. The prefetch queue 102 has a cache selection signal 213-1, a transfer address 216, an address 210, a set signal 120, and a reset signal 121.
In response, the full signal 114, the hit signal 115, and the cache selection signal 116 are output.

【0127】制御回路2503は、命令ユニットより制
御信号213−2を、プリフェッチキュー102よりフ
ル信号114,ヒット信号115,キャッシュ選択信号
116を、主メモリより応答信号217を、第2のキャッ
シュメモリ2590よりヒット信号2511を、第1の
キャッシュメモリ101よりヒット信号2513をそれ
ぞれ受取り、命令ユニットへ待ち信号214を、プリフ
ェッチキュー102へセット信号120とリセット信号
121を、主メモリへ転送要求信号218を、第2のキ
ャッシュメモリ2590へ登録信号2524,書き込み
信号2525を、第1のキャッシュメモリ101へ書き
込み信号2522,セレクタ制御信号2523を、セレ
クタ2640へセレクタ制御信号2523,2527を
それぞれ送出する。
The control circuit 2503 receives the control signal 213-2 from the instruction unit and the full signal 114, hit signal 115, cache select signal from the prefetch queue 102.
116, the response signal 217 from the main memory, the hit signal 2511 from the second cache memory 2590, the hit signal 2513 from the first cache memory 101, and the wait signal 214 to the instruction unit and the prefetch queue 102. The signal 120 and the reset signal 121, the transfer request signal 218 to the main memory, the registration signal 2524 and the write signal 2525 to the second cache memory 2590, the write signal 2522 and the selector control signal 2523 to the first cache memory 101, Selector control signals 2523 and 2527 are sent to the selector 2640, respectively.

【0128】セレクタ104は第2のキャッシュメモリ
2590よりデータ2510,ヒット信号2511,第
1のキャッシュメモリ101よりデータ2512,ヒッ
ト信号2513を受取り、ヒット信号2511がアサー
トされればデータ2510を、ヒット信号2513がア
サートされればデータ2512を出力として読み出し、
データバス212に出力する。またセレクタ2640
は、セレクタ制御信号2523,2527の制御により
アドレス210,アドレス2613,転送アドレス21
6のいずれかを選んで、出力2530として第1のキャ
ッシュメモリ101に送出する。
The selector 104 receives the data 2510 and the hit signal 2511 from the second cache memory 2590, the data 2512 and the hit signal 2513 from the first cache memory 101, and when the hit signal 2511 is asserted, the data 2510 and the hit signal 2511. If 2513 is asserted, data 2512 is read as output,
Output to the data bus 212. Also selector 2640
Are address 210, address 2613, transfer address 21 under the control of selector control signals 2523 and 2527.
6 is selected and sent as the output 2530 to the first cache memory 101.

【0129】第1のキャッシュメモリ101は、書き込
み信号2522が読み出しを指示しているときには、ア
ドレス2530の内容でキャッシュメモリを読み出し、
読み出しデータ2512とヒット信号2513を送出す
る。又、書き込み信号2522が書き込み指示しているとき
には、セレクタ制御信号2523が1のときには転送デ
ータ215を、0のときには書き込みデータ2644の
内容を書き込む。
When the write signal 2522 instructs the first cache memory 101 to read, the first cache memory 101 reads the cache memory with the contents of the address 2530,
The read data 2512 and the hit signal 2513 are transmitted. When the write signal 2522 is instructing to write, the transfer data 215 is written when the selector control signal 2523 is 1, and the content of the write data 2644 is written when the selector control signal 2523 is 0.

【0130】第2のキャッシュメモリ2590は、アド
レス210でキャッシュの内容を調べ、読み出したデー
タ2510とヒット信号2511を送出する。書き込み
信号2525がアサートされ、書き込みを指示している
ときには、アドレス2613でキャッシュの中を調べ、
ヒットしていれば書き込みデータバス2644の内容を
書き込む。上記動作とは並行して登録信号2524がア
サートされたときには、転送アドレス216と転送デー
タ215のペアを登録する。
The second cache memory 2590 checks the contents of the cache at the address 210 and sends the read data 2510 and the hit signal 2511. When the write signal 2525 is asserted and the write is instructed, the address 2613 is searched in the cache,
If there is a hit, the contents of the write data bus 2644 are written. In parallel with the above operation, when the registration signal 2524 is asserted, the pair of the transfer address 216 and the transfer data 215 is registered.

【0131】プリフェッチキュー102の動作は、図2
のプリフェッチキュー102の動作と同じである。
The operation of the prefetch queue 102 is shown in FIG.
The operation of the prefetch queue 102 is the same.

【0132】レジスタ2631は書き込みデータ211
を受け取り、次のサイクルにデータバス2644に出力
する。レジスタ2632はアドレス210を受け取り、
次のサイクルにバス2613に出力する。
The register 2631 stores the write data 211.
Is received and output to the data bus 2644 in the next cycle. Register 2632 receives address 210,
Output to the bus 2613 in the next cycle.

【0133】図30に制御回路2503の構成例を示
す。制御回路2503は、制御信号213−2をデコー
ドして、LD,ST,PF1,PF2の各命令の起動を
受け付ける。制御信号2527は、第1のキャッシュメ
モリへのストアデータの書き込みを行うことを示す信号
であり、この信号が1のとき、他の命令の第1のキャッ
シュメモリへのアクセスを行うことはできない。制御信
号2527が1で、LD,ST,PF1,PF2命令実
行中であり、第2のキャッシュメモリよりのヒット信号
2511がネゲートされているとき、次のサイクルで第
1のキャッシュメモリをアクセスする必要があるため、
待ち信号214をアサートする。また、制御信号252
7が0で、LD命令実行中であり、第1のキャッシュメ
モリよりのヒット信号2513と第2のキャッシュメモ
リよりのヒット信号2511の両者がネゲートされてい
るとき、キャッシュが両方ともミスしているので、主メ
モリよりデータを転送する間命令ユニットを待たせるた
め、待ち信号214をアサートする。また、制御信号2
527が0で、LD,PF1,PF2命令実行中で第1
のキャッシュメモリよりのヒット信号2513と第2キ
ャッシュメモリよりのヒット信号2511との両者がネ
ゲートされており、かつ、プリフェッチキューよりのヒ
ット信号115もネゲートされているがプリフェッチキ
ューよりのフル信号114がアサートされているとき、
プリフェッチキューが一杯で、命令をキューに積むこと
ができないため、プリフェッチキューに空きができるま
で命令ユニットを待たせるため、待ち信号214をアサ
ートする。また、制御信号2527が0で、LD,PF
1,PF2命令実行中で第1のキャッシュメモリよりの
ヒット信号2513と第2キャッシュメモリよりのヒッ
ト信号2511との両者がネゲートされており、かつ、
プリフェッチキューよりのヒット信号115もフル信号
114もネゲートされているときには、主メモリへの転
送要求信号218をアサートする。それと同時に、プリ
フェッチキューへのセット信号120をアサートし、プリ
フェッチキューに登録する。また、制御信号2527が
0で、ST命令実行中であり、第1キャッシュメモリよ
りのヒット信号2513がアサートされているときに
は、制御信号3001をアサートする。レジスタ3011
は、制御信号3001がアサートされると、次のサイク
ルに制御信号2527をアサートする。ORゲート30
13は、制御信号2527がアサートされると、第1の
キャッシュメモリへの書き込み信号2522をアサート
する。これによって、第1のキャッシュメモリにストア
データが書き込まれる。同様に、ST命令実行中で、第
2のキャッシュメモリよりのヒット信号2511がアサ
ートされたときには、制御信号3002をアサートす
る。レジスタ3012は、制御信号3002がアサートされ
ると、次のサイクルに第2のキャッシュメモリへの書き
込み信号2525をアサートする。これによって、第2
のキャッシュメモリにストアデータが書き込まれる。
FIG. 30 shows a configuration example of the control circuit 2503. The control circuit 2503 decodes the control signal 213-2 and receives activation of each instruction of LD, ST, PF1, and PF2. The control signal 2527 is a signal indicating that the store data is written to the first cache memory. When this signal is 1, another instruction cannot access the first cache memory. When the control signal 2527 is 1, the LD, ST, PF1, and PF2 instructions are being executed, and the hit signal 2511 from the second cache memory is negated, it is necessary to access the first cache memory in the next cycle. Because there is
Assert wait signal 214. In addition, the control signal 252
When 7 is 0, the LD instruction is being executed, and both the hit signal 2513 from the first cache memory and the hit signal 2511 from the second cache memory are negated, both caches miss. Therefore, the wait signal 214 is asserted to make the instruction unit wait while the data is transferred from the main memory. Also, control signal 2
527 is 0, and LD, PF1, and PF2 instructions are being executed.
Both the hit signal 2513 from the cache memory and the hit signal 2511 from the second cache memory are negated, and the hit signal 115 from the prefetch queue is also negated, but the full signal 114 from the prefetch queue is When asserted,
Since the prefetch queue is full and the instruction cannot be accumulated in the queue, the wait signal 214 is asserted in order to make the instruction unit wait until the prefetch queue becomes available. Further, when the control signal 2527 is 0, LD, PF
1, the PF2 instruction is being executed, both the hit signal 2513 from the first cache memory and the hit signal 2511 from the second cache memory are negated, and
When both the hit signal 115 and the full signal 114 from the prefetch queue are negated, the transfer request signal 218 to the main memory is asserted. At the same time, the set signal 120 for the prefetch queue is asserted and registered in the prefetch queue. When the control signal 2527 is 0, the ST instruction is being executed, and the hit signal 2513 from the first cache memory is asserted, the control signal 3001 is asserted. Register 3011
Asserts the control signal 2527 in the next cycle when the control signal 3001 is asserted. OR gate 30
13 asserts the write signal 2522 to the first cache memory when the control signal 2527 is asserted. As a result, the store data is written in the first cache memory. Similarly, when the hit signal 2511 from the second cache memory is asserted during execution of the ST instruction, the control signal 3002 is asserted. When the control signal 3002 is asserted, the register 3012 asserts the write signal 2525 to the second cache memory in the next cycle. By this, the second
Store data is written in the cache memory of.

【0134】また、主メモリよりの応答信号217がア
サートされたとき、プリフェッチキュー102よりその
エントリをリセットするため、プリフェッチキューへの
リセット信号121をアサートする。同時に、転送デー
タをキャッシュに登録するために、キャッシュ選択信号
116を見て、それが第1キャッシュメモリへの書き込
みを指示しているときには、第1キャッシュメモリへの
書き込み信号2522、および選択信号2523をアサ
ートし、第2キャッシュメモリへの書き込みを指示して
いるときには、第2キャッシュメモリへの登録信号25
24をアサートする。
When the response signal 217 from the main memory is asserted, the reset signal 121 to the prefetch queue is asserted to reset the entry from the prefetch queue 102. At the same time, in order to register the transfer data in the cache, the cache selection signal 116 is looked at, and when it indicates the writing to the first cache memory, the write signal 2522 to the first cache memory and the selection signal 2523. Is asserted to instruct to write to the second cache memory, the registration signal 25 to the second cache memory 25
Assert 24.

【0135】図28は、図26の第2のキャッシュメモ
リ2590の構成例である。図28のキャッシュメモリ
は、ブロクサイズ4バイト,容量256バイト,フルア
ソシアティブ方式のキャッシュメモリである。2800
は判定回路、2801〜2803は有効ビット,アドレス,
データのペアを、保持するセルである。セル2801〜
2803は読み出しアドレス210,書き込みアドレス
2613,登録要求2524,書き込みデータ264
4,書き込み要求2525を入力として受け、データ2
510を出力する。又、セル2801〜2803はそれ
ぞれヒット信号2810〜2812を判定回路2800
に送出する。セル2801は転送アドレス216,転送
データ215を受け、アドレス2813,データ281
4をセル2802に送る。同様に、セル2802はアド
レス2815,データ2816を次のセルに送る。最後
のセル2812は、アドレス2817,データ2818
を受ける。
FIG. 28 is a configuration example of the second cache memory 2590 of FIG. The cache memory in FIG. 28 is a full-associative cache memory with a block size of 4 bytes and a capacity of 256 bytes. 2800
Is a decision circuit, and 2801 to 2803 are valid bits, addresses,
A cell that holds a pair of data. Cell 2801
2803 is a read address 210, a write address 2613, a registration request 2524, and write data 264.
4, write request 2525 is received as input, and data 2
510 is output. The cells 2801 to 2803 output the hit signals 2810 to 2812, respectively, to the determination circuit 2800.
Send to. The cell 2801 receives the transfer address 216 and the transfer data 215, and receives the address 2813 and the data 281.
4 to cell 2802. Similarly, cell 2802 sends address 2815, data 2816 to the next cell. The last cell 2812 has an address 2817, data 2818
Receive.

【0136】判定回路2800はセル2801〜280
3よりのヒット信号2810〜2812のうち、どれか1つ
がアサートされたならヒット信号2511をアサートす
る。セル2801は、読み出しアドレス210と、内部
に保持するアドレスを比較し、一致し、かつ、有効であ
れば、ヒット信号2810を送出し、対応する内部に保
持するデータをバス2510に出力する。書き込み要求
2525がアサートされたときには、内部に保持するア
ドレスと書き込みアドレス2613を比較し、一致し、
かつ、有効ビットがアサートされていれば、書き込みデ
ータ2644の内容を取り込む。以上の動作とは並列
に、登録要求2524がアサートされたときには、有効
ビットをアサートし、転送アドレス216,転送データ
215を内部に取り込む。この時セル2802はセル2
801の保持していたアドレスとデータをそれぞれ信号
2813,2814を通して取り込む。即ち、セル28
01〜2803はFIFOになっている。
Judgment circuit 2800 has cells 2801 to 280.
If any one of the hit signals 2810 to 2812 from 3 is asserted, the hit signal 2511 is asserted. The cell 2801 compares the read address 210 with the address held internally and, if they match and is valid, sends a hit signal 2810 and outputs the corresponding internally held data to the bus 2510. When the write request 2525 is asserted, the address held internally is compared with the write address 2613 and they match,
If the valid bit is asserted, the contents of the write data 2644 are fetched. In parallel with the above operation, when the registration request 2524 is asserted, the valid bit is asserted and the transfer address 216 and the transfer data 215 are fetched inside. At this time, cell 2802 is cell 2
The address and data held in 801 are fetched through signals 2813 and 2814, respectively. That is, cell 28
01 to 2803 are FIFO.

【0137】図29は、図28のセル2801の構成例
である。2900,2901,2902はそれぞれ有効ビッ
ト,アドレス,データを保持するレジスタである。29
04,2914はコンパレータ、2906,2915,
2916はANDゲート、2903はトライステートバ
ッファである。登録要求2524は有効ビットを保持す
るレジスタ2900,アドレスを保持するレジスタ29
01,データを保持するレジスタ2902に接続されて
いる。登録要求2524がアサートされたときに、有効
ビット2900はセットされ、アドレスを保持するレジ
スタ2901は転送アドレス216をとり込み、データ
を保持するレジスタ2902は転送データ215を取り
込む。コンパレータ2904はアドレスを保持するレジ
スタの出力2813と、読み出しアドレス210を比較
する。ANDゲート2906は、コンパレータ2904
の出力がアサートされ、かつ、有効ビットがアサートさ
れているときに、ヒット信号2810をアサートし、ト
ライステートバッファ2903を開きデータを保持する
レジスタの内容をデータバス2510に送出する。一
方、コンパレータ2914はアドレスを保持するレジス
タの出力2813と、書き込みアドレス2613を比較
する。ANDゲート2916は、コンパレータ2914
の出力がアサートされ、かつ、有効ビットがアサートさ
れているときに、ヒット信号2920をアサートする。
ヒット信号2920がアサートされ、書込み要求252
5がアサートされると、ANDゲート2915は、デー
タを保持するレジスタ2902への信号2918をアサ
ートし、書き込みデータ2644を、データを保持するレジ
スタ2902に取り込む。
FIG. 29 is a structural example of the cell 2801 of FIG. Reference numerals 2900, 2901, and 2902 are registers that hold valid bits, addresses, and data, respectively. 29
04, 2914 are comparators, 2906, 2915,
2916 is an AND gate, and 2903 is a tri-state buffer. The registration request 2524 includes a register 2900 holding a valid bit and a register 29 holding an address.
01, and is connected to a register 2902 that holds data. When the registration request 2524 is asserted, the valid bit 2900 is set, the register 2901 holding the address fetches the transfer address 216, and the register 2902 holding the data fetches the transfer data 215. The comparator 2904 compares the read address 210 with the output 2813 of the register holding the address. The AND gate 2906 is connected to the comparator 2904.
When the output of is asserted and the valid bit is asserted, the hit signal 2810 is asserted, the tri-state buffer 2903 is opened, and the content of the register holding the data is sent to the data bus 2510. On the other hand, the comparator 2914 compares the output 2813 of the register holding the address with the write address 2613. The AND gate 2916 has a comparator 2914.
The hit signal 2920 is asserted when the output of is asserted and the valid bit is asserted.
Hit signal 2920 is asserted, write request 252
When 5 is asserted, the AND gate 2915 asserts the signal 2918 to the register 2902 which holds the data, and fetches the write data 2644 into the register 2902 which holds the data.

【0138】上述のように、図28のキャッシュメモリ
はフルアソシアティブ方式であり、メモリ参照命令のア
クセスと、ST命令のデータ書き込みと、主メモリから
の転送データの書き込みの並列処理を行うため、構成は
複雑であるが、容量が256バイト少ないため、全体と
しての大きさは小さく、また、高速化も可能である。図
31は、本発明の第4の実施例の概略図である。図31
の実施例の構成要素のうち、図16の実施例の構成要素
と同一のものは、同じ番号をつけてある。本実施例の特
徴は、第1のキャッシュメモリと第2のキャッシュメモ
リの両方に1ポートのキャッシュメモリを使用し、第1
のキャッシュメモリへのメモリ参照と、第2のキャッシ
ュメモリへのメモリ参照を並列処理するようにしたこと
である。図16の実施例では、第2のキャッシュメモリ
は小容量であるため、再利用性の高いデータに対しては
ヒット率が低下するという問題があった。一方、図31
の実施例では、比較的小さな物量で第2のキャッシュメ
モリを大容量にすることができるため、再利用性の高い
データを第2のキャッシュメモリに入れてもヒット率は
低下しない。従って、複数の再利用性の高いデータを第
1のキャッシュメモリと第2のキャッシュメモリに分け
て入れることにより、再利用性の高いデータに対するメ
モリ参照命令同志の並列処理を行うことが可能となる。
As described above, the cache memory of FIG. 28 is of the fully associative type, and is configured to perform parallel processing of memory reference instruction access, ST instruction data writing, and transfer data writing from the main memory. Is complicated, but its capacity is smaller than 256 bytes, so the overall size is small and the speed can be increased. FIG. 31 is a schematic diagram of the fourth embodiment of the present invention. Figure 31
16 are the same as those in the embodiment of FIG. 16, and the same numbers are given to them. The feature of this embodiment is that a 1-port cache memory is used for both the first cache memory and the second cache memory.
The memory reference to the cache memory and the memory reference to the second cache memory are processed in parallel. In the embodiment of FIG. 16, since the second cache memory has a small capacity, there is a problem that the hit rate is lowered for data having high reusability. On the other hand, FIG.
In the embodiment, since the second cache memory can be made large in capacity with a relatively small amount, the hit rate does not decrease even if highly reusable data is put in the second cache memory. Therefore, by dividing a plurality of highly reusable data into the first cache memory and the second cache memory separately, it becomes possible to perform parallel processing of memory reference instructions for highly reusable data. .

【0139】図31の命令ユニット3151で処理する
命令のオペコードのフォーマットは、図12で示したも
のと同一である。
The format of the operation code of the instruction processed by the instruction unit 3151 of FIG. 31 is the same as that shown in FIG.

【0140】図33は、図31の命令ユニットで処理す
る命令の種類を示す図である。AND,OR,NOT,
ADD,SUB、及びBRA命令は、図13で説明した
ものと同じである。
FIG. 33 is a diagram showing the types of instructions processed by the instruction unit shown in FIG. AND, OR, NOT,
The ADD, SUB, and BRA instructions are the same as those explained in FIG.

【0141】ロード命令LD1は、レジスタAの内容と
Bの内容を加算したものをアドレスとし、読み出したデ
ータをレジスタCに格納する。この命令は、第1のキャ
ッシュメモリにデータがある可能性が高い時に使用する
命令であり、この命令の処理を行う時には第1のキャッ
シュメモリに優先的にアクセスする。
The load instruction LD1 stores the read data in the register C using the sum of the contents of the register A and the contents of B as an address. This instruction is used when there is a high possibility that there is data in the first cache memory, and the first cache memory is accessed with priority when processing this instruction.

【0142】ロード命令LD2は、レジスタAの内容と
Bの内容を加算したものをアドレスとし、読み出したデ
ータをレジスタCに格納する。この命令は、第2のキャ
ッシュメモリにデータがある可能性が高い時に使用する
命令であり、この命令の処理を行う時には第2のキャッ
シュメモリに優先的にアクセスする。
The load instruction LD2 stores the read data in the register C with the address obtained by adding the contents of the registers A and B. This instruction is used when there is a high possibility that there is data in the second cache memory, and the second cache memory is preferentially accessed when processing this instruction.

【0143】ストア命令ST1は、レジスタAの内容
を、レジスタBの内容をアドレスとして書き込む。この
命令は、第1のキャッシュメモリにデータがある可能性
が高い時に使用する命令であり、この命令の処理を行う
時には第1のキャッシュメモリに優先的にアクセスす
る。
The store instruction ST1 writes the contents of register A using the contents of register B as an address. This instruction is used when there is a high possibility that there is data in the first cache memory, and the first cache memory is accessed with priority when processing this instruction.

【0144】ストア命令ST2は、レジスタAの内容
を、レジスタBの内容をアドレスとして書き込む。この
命令は、第2のキャッシュメモリにデータがある可能性
が高い時に使用する命令であり、この命令の処理を行う
時には第2のキャッシュメモリに優先的にアクセスす
る。
The store instruction ST2 writes the contents of register A using the contents of register B as an address. This instruction is used when there is a high possibility that there is data in the second cache memory, and the second cache memory is preferentially accessed when processing this instruction.

【0145】PF1、及びPF2命令は、図13で説明
したものと同じである。
The PF1 and PF2 instructions are the same as those explained in FIG.

【0146】図32は、パイプラインの処理を説明する
図である。IFは命令読み出しステージ、Dはデコード
ステージ、Eは演算、及び、アドレス加算ステージ、A
はキャッシュアクセスステージ、Wはレジスタ書き込み
ステージ、Rはキャッシュアクセスをやり直すステー
ジ、Xは待ちステージである。LD1命令、または、S
T1命令を実行するときには、Aステージで第1のキャ
ッシュメモリにアクセスし、ミスした時のみRステージ
で第2のキャッシュメモリにアクセスする。一方、LD
2命令、または、ST2命令を実行するときには、Aス
テージで第2のキャッシュメモリにアクセスし、ミスし
た時のみRステージで第1のキャッシュメモリにアクセ
スする。まず、図32(a)のパイプラインについて説
明する。2つのロード命令、命令1と命令2を並列処理
する時には、命令1はAステージで第1のキャッシュメ
モリをアクセスし、命令2はAステージで第2のキャッ
シュメモリをアクセスする。命令1は第1のキャッシュ
メモリがヒットするため、第1のキャッシュメモリから
読み出したデータをWステージでレジスタに書き込む。
命令2は、第2のキャッシュメモリがヒットするため、
第2のキャッシュメモリから読み出したデータを、Wス
テージでレジスタに書き込む。命令3と命令4を並列処
理する時には、命令3はAステージで第1のキャッシュ
メモリをアクセスし、命令4はAステージで第2のキャ
ッシュメモリをアクセスする。命令3は第1のキャッシ
ュメモリがヒットするため、第1のキャッシュメモリか
ら読み出したデータをWステージでレジスタに書き込
む。命令4は、第2のキャッシュメモリがミスするた
め、Rステージで第1のキャッシュメモリをアクセス
し、読み出したデータを、Wステージでレジスタに書き
込む。命令5と命令6を並列処理する時には、命令5は
Aステージで第1のキャッシュメモリをアクセスし、命
令6はAステージで第2のキャッシュメモリをアクセス
する。命令5は第1のキャッシュメモリがミスするた
め、Rステージで第2のキャッシュメモリをアクセス
し、読み出したデータを、Wステージでレジスタに書き
込む。命令6は、第2のキャッシュメモリがヒットする
ため、第2のキャッシュメモリから読み出したデータ
を、Wステージでレジスタに書き込む。命令7と命令8
を並列処理する時には、命令7はAステージで第1のキ
ャッシュメモリをアクセスし、命令8はAステージで第
2のキャッシュメモリをアクセスする。命令7は第1の
キャッシュメモリがミスするため、Rステージで第2の
キャッシュメモリをアクセスし、読み出したデータを、
Wステージでレジスタに書き込む。命令8は、第2のキ
ャッシュメモリがミスするため、Rステージで第1のキ
ャッシュメモリをアクセスし、読み出したデータを、W
ステージでレジスタに書き込む。次に図32(b)のパ
イプラインについて説明する。図32(b)は、命令
1,3,5,7がLD2命令であり、命令2,4,6,
8がLD1命令である。この場合には、命令1,3,
5,7はAステージで第2のキャッシュメモリにアクセ
スし、命令2,4,6,8はAステージで第1のキャッ
シュメモリにアクセスする。その他の処理内容は、図3
2(a)と同じである。
FIG. 32 is a diagram for explaining the pipeline processing. IF is an instruction read stage, D is a decode stage, E is an operation and address addition stage, A
Is a cache access stage, W is a register write stage, R is a stage for reattempting cache access, and X is a wait stage. LD1 command or S
When executing the T1 instruction, the first cache memory is accessed at the A stage, and the second cache memory is accessed at the R stage only when a miss occurs. On the other hand, LD
When executing two instructions or ST2 instructions, the second cache memory is accessed at the A stage, and the first cache memory is accessed at the R stage only when a miss occurs. First, the pipeline in FIG. 32A will be described. When two load instructions, instruction 1 and instruction 2, are processed in parallel, instruction 1 accesses the first cache memory at the A stage, and instruction 2 accesses the second cache memory at the A stage. Since the instruction 1 hits the first cache memory, the data read from the first cache memory is written to the register at the W stage.
Instruction 2 hits the second cache memory, so
The data read from the second cache memory is written to the register in the W stage. When the instructions 3 and 4 are processed in parallel, the instruction 3 accesses the first cache memory in the A stage, and the instruction 4 accesses the second cache memory in the A stage. Since the instruction 3 hits the first cache memory, the data read from the first cache memory is written to the register at the W stage. Since the instruction 4 misses the second cache memory, the first cache memory is accessed in the R stage and the read data is written in the register in the W stage. When the instructions 5 and 6 are processed in parallel, the instruction 5 accesses the first cache memory in the A stage, and the instruction 6 accesses the second cache memory in the A stage. Since the instruction 5 misses the first cache memory, the second cache memory is accessed at the R stage, and the read data is written to the register at the W stage. Since the instruction 6 hits the second cache memory, the data read from the second cache memory is written to the register at the W stage. Instruction 7 and instruction 8
In parallel processing, the instruction 7 accesses the first cache memory in the A stage, and the instruction 8 accesses the second cache memory in the A stage. Instruction 7 misses the first cache memory, so the second cache memory is accessed at the R stage and the read data is
Write to register at W stage. Since the instruction 8 misses the second cache memory, the first cache memory is accessed at the R stage, and the read data is written as W
Write to register on stage. Next, the pipeline of FIG. 32 (b) will be described. In FIG. 32B, instructions 1, 3, 5, and 7 are LD2 instructions, and instructions 2, 4, 6, and
8 is an LD1 instruction. In this case, instructions 1, 3,
5, 5 and 7 access the second cache memory in the A stage, and instructions 2, 4, 6, and 8 access the first cache memory in the A stage. Other processing contents are shown in FIG.
The same as 2 (a).

【0147】ストア命令実行時のパイプライン処理もロ
ード命令実行時と同様であり、AステージまたはRステ
ージでキャッシュをチェックし、ヒットすればAステー
ジまたはRステージでキャッシュへの書き込みを行う。
The pipeline processing at the time of executing the store instruction is the same as that at the time of executing the load instruction. The cache is checked at the A stage or the R stage, and if it hits, the writing to the cache is performed at the A stage or the R stage.

【0148】上述したように、LD1、またはST1命
令が第1のキャッシュメモリにヒットし、LD2、また
はST2命令が第2のキャッシュメモリにヒットした時
には、メモリ参照命令同志の並列処理を行うことができ
る。従って、PF1命令で第1のキャッシュメモリに転
送しておいたデータにアクセスする時はLD1命令,S
T1命令を使用し、PF2命令を用いて第2のキャッシ
ュメモリに転送しておいたデータにアクセスする時はL
D2命令,ST2命令を使用することにより、メモリ参
照命令同志の並列処理を行うことが可能となり、性能が
向上する。
As described above, when the LD1 or ST1 instruction hits the first cache memory and the LD2 or ST2 instruction hits the second cache memory, parallel processing of memory reference instructions can be performed. it can. Therefore, when accessing the data transferred to the first cache memory with the PF1 instruction, the LD1 instruction, S
L is used when accessing the data transferred to the second cache memory by using the T1 instruction and the PF2 instruction.
By using the D2 instruction and the ST2 instruction, it becomes possible to perform parallel processing of memory reference instructions, and the performance is improved.

【0149】次に、図31の実施例について説明する。
図31のデータ処理装置は、命令ユニット3151,メ
モリユニット3152及び主メモリ1703から構成さ
れる。
Next, the embodiment shown in FIG. 31 will be described.
The data processing device shown in FIG. 31 includes an instruction unit 3151, a memory unit 3152 and a main memory 1703.

【0150】命令ユニット3151は、図18で説明し
た命令ユニットとほぼ同じ構成であるが、処理する命令
の種類が図13から図33に変わったため、命令の種類
を識別するデコータ及びメモリインタフェースの構成が
若干異なる。命令ユニット3151は、バス3210〜
3212、及び、バス3213〜3215を通して第1
のキャッシュメモリ3191、及び、第2のキャッシュ
メモリ3190とデータのやり取りを行う。つまり、ア
ドレスバス3210,3213,4バイト幅の書き込み
データバス3211,3214,制御信号線3216を
介して、アドレス,データ及び制御信号をメモリユニッ
ト3152,主メモリ1703に送出する。
The instruction unit 3151 has almost the same configuration as the instruction unit described with reference to FIG. 18, but since the type of instruction to be processed is changed from FIG. 13 to FIG. 33, the configuration of the decoder and the memory interface for identifying the type of instruction. Is slightly different. The instruction unit 3151 is a bus 3210.
3212 and first through buses 3213-3215
Data is exchanged with the cache memory 3191 and the second cache memory 3190. That is, the address, data and control signals are sent to the memory unit 3152 and the main memory 1703 via the address buses 3210 and 3213, the 4-byte width write data buses 3211 and 3214, and the control signal line 3216.

【0151】メモリユニット3152は、第1のキャッ
シュメモリ3191,第2のキャッシュメモリ3190
及びこれらにデータの入出力を行うためのセレクタ31
81〜3184や制御ユニット3192からなる制御部
から構成される。第1のキャシュメモリ3191及び第
2のキャッシュメモリ3190は、容量512Kバイ
ト,ブロックサイズ16バイト,ダイレクトマップ方式
のキャッシュメモリであり、容量が異なる点を除いて
は、図11で説明したキャッシュメモリと同じ構成であ
る。メモリユニット3152は、4バイト幅の読み出し
データバス3212,3215,待ち信号線3217を
介して、データ及び待ち信号を命令ユニット3151に
送出し、転送要求信号1723,1724を主メモリ1
703に送出する。
The memory unit 3152 includes a first cache memory 3191 and a second cache memory 3190.
And a selector 31 for inputting / outputting data to / from these
81 to 1184 and a control unit 3192. The first cache memory 3191 and the second cache memory 3190 are direct-map type cache memories with a capacity of 512 Kbytes, a block size of 16 bytes, and are the same as the cache memories described in FIG. 11 except that they have different capacities. It has the same structure. The memory unit 3152 sends data and a wait signal to the instruction unit 3151 via the 4-byte width read data buses 3212 and 3215 and the wait signal line 3217, and transfers the transfer request signals 1723 and 1724 to the main memory 1.
703.

【0152】主メモリ1703は、命令やデータを格納
する記憶装置であり、バス1720,1721を通して
第1のキャッシュメモリ3191と第2のキャッシュメ
モリ3190へデータを転送する。つまり、主メモリ1
703は、転送データバス1720,転送アドレスバス
1721,応答信号線1722を介して、データ,アド
レス及び応答信号をメモリユニット3152に送出す
る。
The main memory 1703 is a storage device for storing instructions and data, and transfers data to the first cache memory 3191 and the second cache memory 3190 via the buses 1720 and 1721. That is, the main memory 1
703 sends out data, address and response signals to the memory unit 3152 via the transfer data bus 1720, the transfer address bus 1721 and the response signal line 1722.

【0153】第1の命令がLD1命令の時には、命令ユ
ニット3151は、ロードすべきデータのアドレスをア
ドレスバス3213にのせ、制御信号3216でLD1
命令であることを指示する。メモリユニット3152
は、まず最初に、セレクタ3181でアドレス3213
を選択し、第1のキャッシュメモリ3191を読み出
す。第1のキャッシュメモリ3191がヒットした時に
は、セレクタ3183で第1のキャッシュメモリ319
1から読み出したデータを選択し、データバス3215
に出力する。第1のキャッシュメモリ3191がミスし
た時には、命令ユニット3151への待ち信号3217
を1にし、次のサイクルにセレクタ3182でアドレス
3213を選択して、第2のキャッシュメモリ3190
を読み出す。第2のキャッシュメモリ3190がヒット
した時には、セレクタ3183で第2のキャッシュメモ
リ3190から読み出したデータを選択し、データバス
3215に出力すると同時に、待ち信号3217を0に
する。第2のキャッシュメモリ3190がミスした時には、
主メモリ1703へのデータ転送要求信号1723を1
にする。転送要求信号1723を受けると主メモリ17
03は、そのデータを読み出し、転送データバス172
0にのせ、応答信号1722をメモリユニット3152に返
す。メモリユニット3152は、転送されたデータを第
1のキャッシュメモリ3191に書き込むと同時に、デ
ータバス3215を通して命令ユニット3151にデータを
転送し、待ち信号3217を0にする。
When the first instruction is the LD1 instruction, the instruction unit 3151 places the address of the data to be loaded on the address bus 3213, and the LD1 is sent by the control signal 3216.
Indicates that it is an instruction. Memory unit 3152
First, the selector 3181 selects the address 3213.
Is selected to read the first cache memory 3191. When the first cache memory 3191 is hit, the selector 3183 selects the first cache memory 319.
The data read from 1 is selected, and the data bus 3215 is selected.
Output to. When the first cache memory 3191 misses, a wait signal 3217 to the instruction unit 3151
Is set to 1, and the address 3213 is selected by the selector 3182 in the next cycle, and the second cache memory 3190 is selected.
Read out. When the second cache memory 3190 hits, the selector 3183 selects the data read from the second cache memory 3190, outputs the data to the data bus 3215, and sets the wait signal 3217 to 0. When the second cache memory 3190 misses,
1 for data transfer request signal 1723 to main memory 1703
To When the transfer request signal 1723 is received, the main memory 17
03 reads the data and transfers the data to the transfer data bus 172.
Then, the response signal 1722 is returned to the memory unit 3152. The memory unit 3152 writes the transferred data to the first cache memory 3191 and at the same time transfers the data to the instruction unit 3151 through the data bus 3215 and sets the wait signal 3217 to 0.

【0154】第1の命令がLD2命令の時には、命令ユ
ニット3151は、ロードすべきデータのアドレスをア
ドレスバス3213にのせ、制御信号3216でLD2
命令であることを指示する。メモリユニット3152
は、まず最初に、セレクタ3182でアドレス3213を選
択し、第2のキャッシュメモリ3190を読み出す。第
2のキャッシュメモリ3190がヒットした時には、セ
レクタ3183で第2のキャッシュメモリ3190から
読み出したデータを選択し、データバス3215に出力
する。第2のキャッシュメモリ3190がミスした時に
は、命令ユニット3151への待ち信号3217を1に
し、次のサイクルにセレクタ3181でアドレス321
3を選択して、第1のキャッシュメモリ3191を読み
出す。第1のキャッシュメモリ3191がヒットした時
には、セレクタ3183で第1のキャッシュメモリ31
91から読み出したデータを選択し、データバス321
5に出力すると同時に、待ち信号3217を0にする。
第1のキャッシュメモリ3191がミスした時には、主メモ
リ1703へのデータ転送要求信号1723を1にす
る。転送要求信号1723を受けると主メモリ1703
は、そのデータを読み出し、転送データバス1720に
のせ、応答信号1722をメモリユニット3152に返す。
メモリユニット3152は、転送されたデータを第2の
キャッシュメモリ3190に書き込むと同時に、データ
バス3215を通して命令ユニット3151にデータを転送
し、待ち信号3217を0にする。
When the first instruction is the LD2 instruction, the instruction unit 3151 places the address of the data to be loaded on the address bus 3213, and the LD2 is issued by the control signal 3216.
Indicates that it is an instruction. Memory unit 3152
First, the selector 3182 selects the address 3213 and reads the second cache memory 3190. When the second cache memory 3190 hits, the selector 3183 selects the data read from the second cache memory 3190 and outputs it to the data bus 3215. When the second cache memory 3190 misses, the wait signal 3217 to the instruction unit 3151 is set to 1, and the selector 3181 selects the address 321 in the next cycle.
3 is selected and the first cache memory 3191 is read. When the first cache memory 3191 is hit, the selector 3183 selects the first cache memory 31
The data read from 91 is selected, and the data bus 321 is selected.
At the same time as outputting to 5, the wait signal 3217 is set to 0.
When the first cache memory 3191 misses, the data transfer request signal 1723 to the main memory 1703 is set to 1. Upon receiving the transfer request signal 1723, the main memory 1703
Reads the data, puts it on the transfer data bus 1720, and returns a response signal 1722 to the memory unit 3152.
The memory unit 3152 writes the transferred data to the second cache memory 3190 and at the same time transfers the data to the instruction unit 3151 through the data bus 3215 and sets the wait signal 3217 to 0.

【0155】第1の命令がST1命令の時には、命令ユ
ニット3151は、書き込みアドレスをアドレスバス3
213に、書き込むべきデータをデータバス3214に
のせ、制御信号3216でST1命令であることを指示
する。メモリユニット3152は、まず最初に、セレクタ3
181でアドレス3213を選択し、第1のキャッシュ
メモリ3191を読み出す。第1のキャッシュメモリ3
191がヒットした時には、セレクタ3181で書き込
みデータ3214を選択し、第1のキャッシュメモリ3
191に書き込む。第1のキャッシュメモリ3191が
ミスした時には、命令ユニット3151への待ち信号3
217を1にし、次のサイクルにセレクタ3182でア
ドレス3213を選択し、第2のキャッシュメモリ31
90を読み出す。第2のキャッシュメモリ3190がヒ
ットした時には、セレクタ3182で書き込みデータ321
4を選択し、第2のキャッシュメモリ3190に書き込
む。第2のキャッシュメモリ3190がミスした時に
は、主メモリ1703からデータを転送せずに待ち信号
3217を0にする。上記動作と平行して、主メモリ1
703も、同じデータを主メモリに書き込む。
When the first instruction is the ST1 instruction, the instruction unit 3151 transfers the write address to the address bus 3
In 213, the data to be written is placed on the data bus 3214, and the control signal 3216 is used to instruct the ST1 instruction. First, the memory unit 3152 has a selector 3
The address 3213 is selected in 181 and the first cache memory 3191 is read. First cache memory 3
When 191 hits, the selector 3181 selects the write data 3214, and the first cache memory 3
Write to 191. When the first cache memory 3191 misses, the wait signal 3 to the instruction unit 3151
217 is set to 1, the address 3213 is selected by the selector 3182 in the next cycle, and the second cache memory 31
Read 90. When the second cache memory 3190 is hit, the write data 321 is selected by the selector 3182.
4 is selected and written in the second cache memory 3190. When the second cache memory 3190 misses, the wait signal 3217 is set to 0 without transferring the data from the main memory 1703. In parallel with the above operation, the main memory 1
703 also writes the same data to the main memory.

【0156】第1の命令がST2命令の時には、命令ユ
ニット3151は、書き込みアドレスをアドレスバス3
213に、書き込むべきデータをデータバス3214に
のせ、制御信号3216でST2命令であることを指示
する。メモリユニット3152は、まず最初に、セレクタ3
182でアドレス3213を選択し、第2のキャッシュ
メモリ3190を読み出す。第2のキャッシュメモリ3
190がヒットした時には、セレクタ3182で書き込
みデータ3214を選択し、第2のキャッシュメモリ3
190に書き込む。第2のキャッシュメモリ3190が
ミスした時には、命令ユニット3151への待ち信号3
217を1にし、次のサイクルにセレクタ3181でア
ドレス3213を選択し、第1のキャッシュメモリ31
91を読み出す。第1のキャッシュメモリ3191がヒ
ットした時には、セレクタ3181で書き込みデータ321
4を選択し、第1のキャッシュメモリ3191に書き込
む。第1のキャッシュメモリ3191がミスした時に
は、主メモリ1703からデータを転送せずに待ち信号
3217を0にする。上記動作と平行して、主メモリ1
703も、同じデータを主メモリに書き込む。
When the first instruction is the ST2 instruction, the instruction unit 3151 transfers the write address to the address bus 3
In 213, the data to be written is placed on the data bus 3214, and the control signal 3216 indicates that the instruction is the ST2 instruction. First, the memory unit 3152 has a selector 3
At 182, the address 3213 is selected and the second cache memory 3190 is read. Second cache memory 3
When 190 is hit, the selector 3182 selects the write data 3214, and the second cache memory 3
Write to 190. When the second cache memory 3190 misses, a wait signal 3 to the instruction unit 3151
217 is set to 1, the address 3213 is selected by the selector 3181 in the next cycle, and the first cache memory 31
Read out 91. When the first cache memory 3191 is hit, the write data 321 is selected by the selector 3181.
4 is selected and written in the first cache memory 3191. When the first cache memory 3191 misses, the wait signal 3217 is set to 0 without transferring the data from the main memory 1703. In parallel with the above operation, the main memory 1
703 also writes the same data to the main memory.

【0157】第1の命令がPF1命令の時には、命令ユ
ニット3151は、プリフェッチすべきデータのアドレ
スをアドレスバス3213にのせ、制御信号3216で
PF1命令であることを指示する。メモリユニット315
2は、セレクタ3181及び3182でアドレス321
3を選択し、第1のキャッシュメモリ3191と第2の
キャッシュメモリ3190を同時に読み出す。第1のキ
ャッシュメモリ3191または、第2のキャッシュメモリ3
190がヒットした時には、主メモリからデータを転送
することなく処理を終了する。第1のキャッシュメモリ
3191と第2のキャッシュメモリ3190の両方がミ
スした時には、主メモリ1703へのデータ転送要求信
号1723を1にする。転送要求信号1723を受ける
と主メモリ1703は、そのデータを読み出し、転送デ
ータバス1720にのせ、応答信号1722をメモリユ
ニット3152に返す。メモリユニット3152は、転
送されたデータを第1のキャッシュメモリ3191に書
き込む。第1の命令がPF2命令の時の処理もほぼ同じで
あるが、主メモリ1703から転送されてきたデータを
第2のキャッシュメモリ3190に書き込む点が異な
る。
When the first instruction is the PF1 instruction, the instruction unit 3151 places the address of the data to be prefetched on the address bus 3213, and the control signal 3216 is used.
Indicates that it is a PF1 command. Memory unit 315
2 is address 321 by selectors 3181 and 3182
3 is selected and the first cache memory 3191 and the second cache memory 3190 are read simultaneously. The first cache memory 3191 or the second cache memory 3
When 190 is hit, the process ends without transferring the data from the main memory. When both the first cache memory 3191 and the second cache memory 3190 miss, the data transfer request signal 1723 to the main memory 1703 is set to 1. Upon receiving the transfer request signal 1723, the main memory 1703 reads the data, places it on the transfer data bus 1720, and returns a response signal 1722 to the memory unit 3152. The memory unit 3152 writes the transferred data in the first cache memory 3191. The processing when the first instruction is the PF2 instruction is almost the same, except that the data transferred from the main memory 1703 is written in the second cache memory 3190.

【0158】第2の命令の処理も同様であり、アドレス
バス3210,読み出しデータバス3212,書き込み
データバス3211を用いてデータのやりとりを行う。
The processing of the second instruction is similar, and data is exchanged using the address bus 3210, the read data bus 3212, and the write data bus 3211.

【0159】[0159]

【発明の効果】本発明によれば、キャッシュメモリに対
してプリフェッチ機能を有する計算機を、キャッシュメ
モリに入れたデータの再利用のある中小規模のプログラ
ムとキャッシュにいれたデータの再利用のない大規模プ
ログラムの両者に対して、安価に、高性能化できるとい
う効果がある。
According to the present invention, a computer having a prefetch function for a cache memory is used in a small-to-medium-sized program that reuses data stored in the cache memory and a large-scale computer that does not reuse data stored in the cache. There is an effect that the performance can be improved inexpensively for both of the scale programs.

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

【図1】本発明の実施例の全体図。FIG. 1 is an overall view of an embodiment of the present invention.

【図2】図1メモリユニット202の第1の構成例。FIG. 2 is a first configuration example of the memory unit 202 of FIG.

【図3】図2命令ユニット201の構成例。FIG. 3 is a configuration example of an instruction unit 201 in FIG.

【図4】パイプラインを説明する図。FIG. 4 is a diagram illustrating a pipeline.

【図5】図2のプリフェッチキュー102の構成例。5 is a configuration example of a prefetch queue 102 in FIG.

【図6】図5のセル502の構成例。6 is a configuration example of a cell 502 in FIG.

【図7】図5のプライオリティ回路500の構成例。7 is a configuration example of a priority circuit 500 of FIG.

【図8】図5の判定回路501の構成例。8 is a configuration example of a determination circuit 501 in FIG.

【図9】図2の第2のキャッシュメモリ100の構成
例。
9 is a configuration example of the second cache memory 100 of FIG.

【図10】図9のセル901の構成例。10 is a configuration example of a cell 901 in FIG.

【図11】図1の第一のキャッシュメモリ101の構成
例。
11 is a configuration example of the first cache memory 101 of FIG.

【図12】命令フォーマットを説明する図。FIG. 12 is a diagram illustrating an instruction format.

【図13】命令の種類を説明する図。FIG. 13 is a diagram illustrating types of instructions.

【図14】図2の制御回路103の構成例。14 is a configuration example of a control circuit 103 in FIG.

【図15】図1メモリユニット202の第2の構成例。FIG. 15 is a second configuration example of the memory unit 202 in FIG.

【図16】本発明の第2の実施例の全体図。FIG. 16 is an overall view of a second embodiment of the present invention.

【図17】図16のメモリユニット1702の構成例。17 is a configuration example of the memory unit 1702 of FIG.

【図18】図16の命令ユニット1701の構成例。18 is an exemplary configuration of an instruction unit 1701 shown in FIG.

【図19】図16のデータ処理装置で命令を実行したと
きのパイプラインを説明する図。
19 is a diagram illustrating a pipeline when an instruction is executed by the data processing device of FIG.

【図20】図17の第2のキャッシュメモリ1690の
構成例。
20 is a configuration example of the second cache memory 1690 of FIG.

【図21】図20のセル2001の構成例。FIG. 21 is a configuration example of the cell 2001 of FIG. 20.

【図22】図17の制御回路1603の構成例。22 is a configuration example of the control circuit 1603 in FIG.

【図23】図2の第1のキャッシュメモリ101の第2
の構成例。
FIG. 23 is a second of the first cache memory 101 of FIG.
Configuration example.

【図24】図2の第2のキャッシュメモリ100の第2
の構成例。
FIG. 24 is a second of the second cache memory 100 of FIG.
Configuration example.

【図25】本発明の第3の実施例の全体図。FIG. 25 is an overall view of a third embodiment of the present invention.

【図26】図25のメモリユニット2602の構成例。FIG. 26 is a configuration example of the memory unit 2602 of FIG. 25.

【図27】図25のデータ処理装置で命令を実行したと
きのパイプラインを説明する図。
FIG. 27 is a diagram illustrating a pipeline when an instruction is executed by the data processing device of FIG. 25.

【図28】図26の第2のキャッシュメモリ2590の
構成例。
28 is a configuration example of the second cache memory 2590 of FIG.

【図29】図28のセル2801の構成例。FIG. 29 is a configuration example of the cell 2801 in FIG. 28.

【図30】図26の制御回路2503の構成例。30 is a configuration example of the control circuit 2503 in FIG.

【図31】本発明の第4の実施例の全体図。FIG. 31 is an overall view of a fourth embodiment of the present invention.

【図32】図31のデータ処理装置で命令を実行したと
きのパイプラインを説明する図。
32 is a diagram illustrating a pipeline when an instruction is executed by the data processing device of FIG. 31.

【図33】図31のデータ処理装置で処理する命令の種
類を説明する図。
FIG. 33 is a diagram for explaining the types of instructions processed by the data processing device of FIG. 31.

【図34】本発明のデータ処理装置の全体図。FIG. 34 is an overall view of a data processing device of the present invention.

【符号の説明】[Explanation of symbols]

100…第2のキャッシュメモリ、101…第1のキャ
ッシュメモリ、201…命令ユニット、203…主メモ
リ、1600…制御ユニット。
Reference numeral 100 ... Second cache memory, 101 ... First cache memory, 201 ... Instruction unit, 203 ... Main memory, 1600 ... Control unit.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 田中 成弥 茨城県日立市大みか町七丁目1番1号 株式会社 日立製作所 日立研究所内 (72)発明者 澤本 英雄 神奈川県秦野市堀山下1番地 株式会社 日立製作所 汎用コンピュータ事業部 内 (72)発明者 大角 明良 茨城県日立市大みか町七丁目1番1号 株式会社 日立製作所 日立研究所内 (56)参考文献 特開 平5−143451(JP,A) 特開 昭54−9535(JP,A) 特開 平4−270431(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/08 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Shigeya Tanaka 7-1-1 Omika-cho, Hitachi City, Ibaraki Hitachi Ltd. Hitachi Research Laboratory (72) Inventor Hideo Sawamoto 1 Horiyamashita, Hadano City, Kanagawa Stock Company Hitachi Co., Ltd. General-purpose computer division (72) Inventor Akira Okuno 7-1-1 Omika-cho, Hitachi-shi, Ibaraki Hitachi Co., Ltd. Hitachi Research Laboratory (56) Reference JP-A-5-143451 (JP, A) JP 54-9535 (JP, A) JP 4-270431 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 12/08

Claims (15)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】命令を実行しデータを処理するデータ処理
部と、 メモリからプリフェッチされるデータを保持する複数の
キャッシュメモリと、 上記複数のキャッシュメモリの中からプリフェッチする
キャッシュメモリを特定しデータをプリフェッチするプ
リフェッチ命令によって、上記メモリから特定されたキ
ャッシュメモリへデータをプリフェッチする制御部とを
し、 上記制御部は、上記プリフェッチ命令を実行中に、上記
複数のキャッシュメモリのいずれにも上記データ処理部
で処理するデータが記憶されていない場合に上記メモリ
へ転送要求信号を出力する データ処理装置。
1. A data processing unit that executes instructions and processes data, a plurality of cache memories that hold data prefetched from a memory, and a cache memory that prefetches is specified from among the plurality of cache memories to specify data. the prefetch instruction prefetching, have a control unit for prefetching data into the cache memory that is specified from the memory, the control unit during the execution of the prefetch instruction, the
The data processing unit is used for any of the plurality of cache memories.
If the data to be processed by is not stored in the above memory
A data processing device that outputs a transfer request signal to .
【請求項2】請求項において、 上記制御部は、複数のロード命令によって特定の上記キ
ャッシュメモリからデータを上記データ処理部へ転送
し、上記プリフェッチ命令によって上記メモリから所定
のキャッシュメモリへデータをプリフェッチすることを
特徴とするデータ処理装置。
2. The control unit according to claim 1, wherein the control unit transfers data from the specific cache memory to the data processing unit by a plurality of load instructions, and the prefetch instruction transfers data from the memory to a predetermined cache memory. A data processing device characterized by prefetching.
【請求項3】請求項1〜2のいずれか1項において、 上記複数のキャッシュメモリは大容量で1ポートの第1
のキャッシュメモリと小容量で2ポートの第2のキャッ
シュメモリであって、上記制御部は、アクセス頻度の高
いデータは上記第1のキャッシュメモリに格納し、アク
セス頻度の低いデータは上記第2のキャッシュメモリに
格納することを特徴とするデータ処理装置。
In any one of the claims 3] according to claim 1 or 2, a plurality of cache memory of one port in mass 1
And a small-capacity two-port second cache memory, the control unit stores frequently accessed data in the first cache memory and infrequently accessed data is stored in the second cache memory. A data processing device characterized by storing in a cache memory.
【請求項4】請求項において、 上記第2のキャッシュメモリは、主メモリからのデータ
転送処理と上記命令処理部から指示される上記第2のキ
ャッシュメモリ内のデータ参照処理とを、1マシンサイ
クル内に実行することを特徴とするデータ処理装置。
4. The machine according to claim 3, wherein the second cache memory performs a data transfer process from a main memory and a data reference process in the second cache memory instructed by the instruction processing unit on one machine. A data processing device characterized by being executed in a cycle.
【請求項5】請求項3〜4のうちいずれか1項におい
て、 上記制御部は、上記主メモリより転送中のデータのアド
レスを少なくとも1つ保持するプリフェッチキューと、
上記保持されたアドレスに基づいて上記第1又は上記第
2のキャッシュメモリへのデータのアクセスを制御する
制御処理部とを有することを特徴とするデータ処理装
置。
5. The prefetch queue according to claim 3 , wherein the controller holds at least one address of data being transferred from the main memory,
A data processing device comprising: a control processing unit that controls access of data to the first or second cache memory based on the held address.
【請求項6】請求項において、 上記プリフェッチキューには、プリフェッチ下データを
上記第1のキャッシュメモリに書き込むか、上記第2の
キャッシュメモリに書き込むかを指示する書き込み情報
を保持することを特徴とするデータ処理装置。
6. The prefetch queue according to claim 5, wherein the prefetch queue holds write information for instructing whether to write prefetched data in the first cache memory or the second cache memory. And data processing device.
【請求項7】データ又は命令を格納する主メモリと上記
データを上記命令に基づいて処理する命令処理部との間
に複数のキャッシュメモリからなるキャッシュメモリ部
を有し、 上記キャッシュメモリ部は、主メモリから転送したデー
タを上記複数のキャッシュメモリの内の一つを指定して
格納するプリフェッチ命令によって制御される制御部を
有し、 上記制御部は上記データを格納するために上記複数のキ
ャッシュメモリを制御するとともに、上記プリフェッチ
命令を実行中に、上記複数のキャッシュメモリのいずれ
にも上記データ処理部で処理するデータが記憶されてい
ない場合に上記メモリへ転送要求信号を出力することを
特徴とするデータ処理装置。
7. A cache memory unit comprising a plurality of cache memories between a main memory for storing data or instructions and an instruction processing unit for processing the data based on the instructions, the cache memory unit comprising: The control unit has a control unit controlled by a prefetch instruction that stores the data transferred from the main memory by designating one of the cache memories, and the control unit stores the plurality of caches in order to store the data. Controls memory and prefetches
Any of the above cache memories while executing the instruction
Also stores the data to be processed by the data processing unit.
A data processing device, which outputs a transfer request signal to the memory when there is no data.
【請求項8】請求項において、 上記キャッシュメモリ部は、第1のキャッシュメモリ
と、第2のキャッシュメモリとを有し、上記第2のキャ
ッシュメモリのポート数は上記第1のキャッシュメモリ
のポート数より多いことを特徴とするデータ処理装置。
8. The cache memory unit according to claim 7, wherein the cache memory unit has a first cache memory and a second cache memory, and the number of ports of the second cache memory is the same as that of the first cache memory. A data processing device characterized by having more ports.
【請求項9】請求項7〜8のうちいずれか1項におい
て、 上記キャッシュメモリ部は、第1のキャッシュメモリ
と、第2のキャッシュメモリとを有し、上記第1のキャ
ッシュメモリの容量は上記第2のキャッシュメモリの容
量より大きいことを特徴とするデータ処理装置。
9. The cache memory unit according to any one of claims 7 to 8, wherein the cache memory unit includes a first cache memory and a second cache memory. A data processing device, wherein the capacity of the cache memory is larger than the capacity of the second cache memory.
【請求項10】請求項7〜9のうちいずれか1項におい
て、 上記第2のキャッシュメモリは、上記命令処理部から指
示される第1のメモリ参照命令の上記第2のキャッシュ
メモリ内のデータ参照処理と、上記命令処理部から指示
される第2のメモリ参照命令の上記第2のキャッシュメ
モリ内のデータ書き込み処理とを、1マシンサイクル内
に実行することを特徴とするデータ処理装置。
10. The data in the second cache memory according to any one of claims 7 to 9 , wherein the second cache memory is a data in the second cache memory of a first memory reference instruction instructed by the instruction processing unit. A data processing device, wherein a reference process and a data write process in a second cache memory of a second memory reference instruction instructed by the instruction processing unit are executed within one machine cycle.
【請求項11】請求項7〜10のうちいずれか1項にお
いて、 上記キャッシュメモリ部は、上記第1のキャッシュメモ
リから上記第2のキャッシュメモリへデータを転送する
データバスを有することを特徴とするデータ処理装置。
11. The cache memory unit according to claim 7 , further comprising a data bus for transferring data from the first cache memory to the second cache memory. Data processing device.
【請求項12】請求項7〜11のうちいずれか1項にお
いて、 上記制御部は、上記主メモリより転送中のデータのアド
レスを少なくとも1つ保持するプリフェッチキューと、
上記保持されたアドレスに基づいて上記複数のキャッシ
ュメモリへのデータのアクセスを制御する制御処理部と
を有することを特徴とするデータ処理装置。
12. The prefetch queue according to claim 7 , wherein the controller holds at least one address of data being transferred from the main memory,
And a control processing unit that controls access to data to the plurality of cache memories based on the held address.
【請求項13】請求項12において、 上記プリフェッチキューには、プリフェッチ下データを
上記複数のキャッシュメモリのうちのどれに書き込むか
を指示する書き込み情報を保持することを特徴とするデ
ータ処理装置。
13. The data processing device according to claim 12, wherein the prefetch queue holds write information that indicates to which of the plurality of cache memories the prefetched data is written.
【請求項14】請求項7〜12のうちいずれか1項にお
いて、 上記キャッシュメモリ部は、第1のキャッシュメモリ
と、第2のキャッシュメモリを有し、上記キャッシュメ
モリ部は、上記命令処理部から指示される第1のメモリ
参照命令の上記第1のキャッシュメモリ内のデータ参照
処理と、上記命令処理部から指示される第2のメモリ参
照命令の上記第2のキャッシュメモリ内のデータ参照処
理とを、1マシンサイクル内に実行することを特徴とす
るデータ処理装置。
14. The cache memory unit according to any one of claims 7 to 12 , wherein the cache memory unit has a first cache memory and a second cache memory, and the cache memory unit is the instruction processing unit. Data reference processing in the first cache memory of a first memory reference instruction instructed by the following, and data reference processing in the second cache memory of a second memory reference instruction instructed by the instruction processing unit A data processing device, characterized in that and are executed within one machine cycle.
【請求項15】請求項7〜12,14のうちいずれか1
項において、 上記キャッシュメモリ部は、上記複数のキャッシュメモ
リのうちの一つにデータが存在する可能が高いことを指
定するメモリ参照命令によって制御される制御部を有
し、上記制御部は上記メモリ参照命令を処理するために
上記複数のキャッシュメモリを制御することを特徴とす
るデータ処理装置。
15. Any one of claims 7 to 12 and 14.
In the paragraph, the cache memory unit has a control unit controlled by a memory reference instruction designating that data is likely to exist in one of the plurality of cache memories, and the control unit is the memory unit. A data processing device characterized by controlling the plurality of cache memories for processing a reference instruction.
JP18440294A 1993-08-05 1994-08-05 Data processing device having cache memory Expired - Fee Related JP3465362B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18440294A JP3465362B2 (en) 1993-08-05 1994-08-05 Data processing device having cache memory

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP5-194482 1993-08-05
JP19448293 1993-08-05
JP18440294A JP3465362B2 (en) 1993-08-05 1994-08-05 Data processing device having cache memory

Publications (2)

Publication Number Publication Date
JPH0798673A JPH0798673A (en) 1995-04-11
JP3465362B2 true JP3465362B2 (en) 2003-11-10

Family

ID=26502481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18440294A Expired - Fee Related JP3465362B2 (en) 1993-08-05 1994-08-05 Data processing device having cache memory

Country Status (1)

Country Link
JP (1) JP3465362B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4680340B2 (en) * 1999-12-14 2011-05-11 独立行政法人科学技術振興機構 Processor

Also Published As

Publication number Publication date
JPH0798673A (en) 1995-04-11

Similar Documents

Publication Publication Date Title
EP0637800B1 (en) Data processor having cache memory
US5809530A (en) Method and apparatus for processing multiple cache misses using reload folding and store merging
US7370150B2 (en) System and method for managing a cache memory
US5826052A (en) Method and apparatus for concurrent access to multiple physical caches
US6523109B1 (en) Store queue multimatch detection
US5423016A (en) Block buffer for instruction/operand caches
EP0097790A2 (en) Apparatus for controlling storage access in a multilevel storage system
JPH06222990A (en) Data processing device
JPH02208728A (en) Virtual instruction cash refill algorithm
EP1202180A1 (en) Scalar data cache for a vector processor
JP2000242558A (en) Cache system and operating method thereof
US20060155935A1 (en) System and method for maintaining cache coherency in a shared memory system
JP2001195303A (en) Translation lookaside buffer whose function is parallelly distributed
US6751700B2 (en) Date processor and storage system including a set associative cache with memory aliasing
US6434665B1 (en) Cache memory store buffer
KR100710922B1 (en) Cache Management Method
US20050273577A1 (en) Microprocessor with integrated high speed memory
JP3465362B2 (en) Data processing device having cache memory
EP0726524A2 (en) Protocol and system for performing line-fill addressing during copy-back operation
EP0442690A2 (en) Data cache store buffer for high performance computer
JPH04340145A (en) Cache memory device
US20040024974A1 (en) Cache controller
JPH0421044A (en) One-chip cache memory
JPH08335188A (en) Software controllable cache memory device
JPS60118932A (en) Control system of instruction readvanced fetch

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070829

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080829

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080829

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090829

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100829

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees