JPH0816390A - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JPH0816390A
JPH0816390A JP6151005A JP15100594A JPH0816390A JP H0816390 A JPH0816390 A JP H0816390A JP 6151005 A JP6151005 A JP 6151005A JP 15100594 A JP15100594 A JP 15100594A JP H0816390 A JPH0816390 A JP H0816390A
Authority
JP
Japan
Prior art keywords
instruction
data
cache
write
control circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6151005A
Other languages
Japanese (ja)
Inventor
Takashi Moriyama
隆志 森山
Masahide Tsuboi
正英 坪井
Hiroshi Murashima
寛志 村嶋
Toshiro Akiyama
俊郎 秋山
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
Hitachi Chubu Software Ltd
Original Assignee
Hitachi Ltd
Hitachi Chubu Software Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Chubu Software Ltd filed Critical Hitachi Ltd
Priority to JP6151005A priority Critical patent/JPH0816390A/en
Publication of JPH0816390A publication Critical patent/JPH0816390A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute a program without any contradiction by matching the contents of cache memories for instruction and for data by writing the same data into the cache memory for instruction in the case where write access to the cache memory for data occurs. CONSTITUTION:When a flag showing whether operating a deciding circuit or not is turned on and the write access to a cache 3 for data occurs, the deciding circuit decides whether an entry corresponding to a write address is stored in a cache 5 for instruction or not. As a result, when that entry is stored, a write control circuit 1 writes the write data into the correspondent entry of the cache 5 for instruction. When that entry is not stored, the write control circuit 1 does nothing. When the flag showing whether operating the deciding circuit or not is turned off, the deciding circuit is not operated and the write control circuit 1 does not do anything, either even when the write access to the cache 3 for data occurs.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、命令用キャッシュメモ
リとデ−タ用キャッシュメモリを独立に持つマイクロプ
ロセッサに係り、特に命令の書替えを許しているア−キ
テクチャを持つマイクロプロセッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor having an instruction cache memory and a data cache memory independently, and more particularly to a microprocessor having an architecture which allows rewriting of instructions.

【0002】[0002]

【従来の技術】従来技術としては、特開昭63−364
41号公報の「先行読み出し命令の書き変え方式」に記
載されているように、命令を書き替える場合、その書き
替え命令を先行読み出しレジスタにも書き込ませるとい
う内容ものが知られている。
2. Description of the Related Art As a conventional technique, Japanese Patent Laid-Open No. 63-364
As described in "Rewriting Method of Preceding Read Command" in Japanese Patent Publication No. 41, when rewriting an instruction, it is known that the rewriting instruction can be written also in the preceding read register.

【0003】[0003]

【発明が解決しようとする課題】近年のマイクロプロセ
ッサは、キャッシュのヒット率の向上を狙って、命令用
キャッシュメモリとデ−タ用キャッシュメモリを独立に
持つものが増えてきた。この場合、一般的なRISCプ
ロセッサに見られるように命令の書替えを禁止するア−
キテクチャに対しては何ら問題は生じないが、従来のC
ISCプロセッサに見られるように命令の書替えを許し
ているア−キテクチャに対しては命令用キャッシュメモ
リ・デ−タ用キャッシュメモリの内容を常に一致させて
おく必要がある。
In recent years, an increasing number of microprocessors have an instruction cache memory and a data cache memory independently in order to improve the cache hit rate. In this case, an instruction that prohibits the rewriting of instructions, as is found in general RISC processors, is used.
There is no problem with the architecture, but the conventional C
For an architecture that allows rewriting of instructions as seen in the ISC processor, the contents of the instruction cache memory and the data cache memory must always match.

【0004】命令用キャッシュメモリとデ−タ用キャッ
シュメモリを独立に持ち、また、命令の書替えを許して
いるア−キテクチャのマイクロプロセッサを考えた場
合、上記従来技術は、先行して読み込まれた命令に対し
ては、命令書替えが考慮されているが、命令用キャッシ
ュメモリ・デ−タ用キャッシュメモリの内容を常に一致
させると言う事に対して考慮がなされていなかった。
Considering an architecture microprocessor which has an instruction cache memory and a data cache memory independently, and which allows rewriting of instructions, the above prior art is read in advance. Although the instruction rewriting is considered for the instruction, it is not considered that the contents of the instruction cache memory and the data cache memory are always matched.

【0005】本発明の第一の目的は、命令用キャッシュ
メモリとデ−タ用キャッシュメモリをそれぞれ独立に持
ち、命令の書替えを許しているア−キテクチャのマイク
ロプロセッサにおいて、命令の書替えが実行された場合
にも、命令用キャッシュメモリとデ−タ用キャッシュメ
モリの内容を常に一致させ、矛盾なくプログラムが実行
されるマイクロプロセッサを提供することにある。
A first object of the present invention is to execute instruction rewriting in an microprocessor having an architecture which has an instruction cache memory and a data cache memory independently and allows instruction rewriting. In this case, the contents of the instruction cache memory and the data cache memory are always matched to provide a microprocessor in which a program can be executed without contradiction.

【0006】また、本発明の第二の目的は、命令用キャ
ッシュメモリとデ−タ用キャッシュメモリをそれぞれ独
立に持ち、命令の書替えを許しているア−キテクチャの
マイクロプロセッサであっても、明らかに命令の書替え
を行なわないようなプログラムに関しては、不必要な命
令用キャッシュメモリの書替えをなくし、効率的にプロ
グラムが実行される様なマイクロプロセッサを提供する
ことにある。
A second object of the present invention is clear even in the case of an architecture microprocessor which has an instruction cache memory and a data cache memory independently of each other and permits instruction rewriting. For a program in which instructions are not rewritten, unnecessary microprocessor cache memory is not rewritten, and a microprocessor is provided that allows programs to be executed efficiently.

【0007】[0007]

【課題を解決するための手段】本発明の第一の目的は、
デ−タ用キャッシュメモリへのライトアクセスが生じた
場合、命令用キャッシュメモリに対して同一デ−タを書
き込むことにより達成される。すなわち、命令用キャッ
シュメモリに、デ−タ用キャッシュメモリへのライトア
クセスアドレスに対応するエントリが格納されているか
否かの判定回路、及び、上記判定回路の出力に従って、
命令用キャッシュメモリの対応するエントリにライトデ
−タを書き込む為の書込制御回路を設ける事により達成
される。本発明の第二の目的は、上記判定回路を動作さ
せるか否かを示すフラグを設け、上記フラグがオン状態
の時は、上記判定回路を動作させて命令用キャッシュメ
モリに書き込みを行ない、また上記フラグがオフ状態の
時は、該ライトアクセスにたいして上記命令用キャッシ
ュメモリでは何もしないことを特徴としている。
The first object of the present invention is to:
When a write access to the data cache memory occurs, it is achieved by writing the same data to the instruction cache memory. That is, the instruction cache memory determines whether or not the entry corresponding to the write access address to the data cache memory is stored, and according to the output of the determination circuit,
This is achieved by providing a write control circuit for writing write data to the corresponding entry of the instruction cache memory. A second object of the present invention is to provide a flag indicating whether or not to operate the judgment circuit, and when the flag is on, operate the judgment circuit to write to the instruction cache memory, and When the flag is off, nothing is done in the instruction cache memory for the write access.

【0008】[0008]

【作用】本発明によれば、命令用キャッシュメモリ、及
び、デ−タ用キャッシュメモリを独立に持ち、また、命
令の書替えを許しているア−キテクチャのマイクロプロ
セッサにおいて、命令の書替えが実行された場合にも、
命令用キャッシュメモリ・デ−タ用キャッシュメモリの
内容を常に一致させる事ができ、矛盾なくプログラムを
実行することができる。
According to the present invention, the instruction rewriting is executed in the microprocessor of the architecture which has the instruction cache memory and the data cache memory independently and permits the instruction rewriting. Even if
The contents of the instruction cache memory and the data cache memory can always be matched, and the program can be executed without contradiction.

【0009】すなわち、上記判定回路を動作させるか否
かを示すフラグがオン状態の時は、デ−タ用キャッシュ
メモリへのライトアクセスが生じた場合、上記判定回路
によって、ライトアドレスに対応するエントリが、命令
用キャッシュメモリに格納されているか否かの判定が行
なわれる。その結果、格納されている場合には、書込制
御回路により命令用キャッシュメモリの対応するエント
リにライトデ−タを書き込む。格納されていない場合に
は書込制御回路は何もしない。
That is, when a write access to the data cache memory occurs when the flag indicating whether or not to operate the determination circuit is on, the determination circuit causes the entry corresponding to the write address. However, it is determined whether or not it is stored in the instruction cache memory. As a result, if it is stored, the write control circuit writes the write data to the corresponding entry of the instruction cache memory. If not stored, the write control circuit does nothing.

【0010】一方、上記判定回路を動作させるか否かを
示すフラグがオフ状態の時は、デ−タ用キャッシュメモ
リへのライトアクセスが生じた場合でも、上記判定回路
は動作せず、書込制御回路は何もしない。本発明は、以
上のように動作し、誤動作することはない。
On the other hand, when the flag indicating whether or not to operate the judgment circuit is in the off state, the judgment circuit does not operate and the write operation is performed even if a write access to the data cache memory occurs. The control circuit does nothing. The present invention operates as described above and does not malfunction.

【0011】なお、本発明は、上記で述べたキャッシュ
の実現方法には依存しないで実現可能である。すなわ
ち、キャッシュの方法は、ライトスル−方式でも良い
し、ライトバック方式でも良い。また、ダイレクトマッ
ピング方式でも良いし、n−ウェイ・セット・アソシア
ティヴ方式でも良い。
The present invention can be implemented without depending on the cache implementation method described above. That is, the cache method may be the write-through method or the write-back method. The direct mapping method or the n-way set associative method may be used.

【0012】[0012]

【実施例】以下、本発明の一実施例について説明する。EXAMPLES An example of the present invention will be described below.

【0013】図1は、本発明の一実施例のブロック図で
ある。図1において、1は命令キャッシュ書込制御回
路、2はデ−タライトに伴う命令キャッシュのヒット判
定回路、3はデ−タ用キャッシュ、4はデータ用アドレ
スアレイ、5は命令用キャッシュ、6は2ポ−トの命令
用アドレスアレイ、7はデ−タ用キャッシュ制御回路、
8は命令用キャッシュ制御回路、9はデ−タ用キャッシ
ュのヒット判定回路、10は命令用キャッシュのヒット
判定回路、11はデ−タキャッシュより読み出されたデ
−タを保持するレジスタ(図中、MBR(Memory
BufferRegister)と表示する)、12
はデ−タ用キャッシュをアクセスするためのアドレスを
保持するレジスタ(図中、D−MA(Data Mem
oryAddress Register)と表示す
る)、15は命令用キャッシュをアクセスするためのア
ドレスを保持するレジスタ(図中、I−MA(Inst
ruction Memory Address Re
gister)と表示する)、13はデ−タライトに伴
う命令キャッシュのヒット判定回路2の動作/非動作を
決めるフラグ、14はキャッシュに対するライトデ−タ
を保持するレジスタ(図中、MBW(Memory B
uffer Write Register)と表示す
る)、16は命令用ャッシュ5より読み出された命令を
保持するレジスタ(図中、IR(Instructio
n Register)と表示する)、17は命令用キ
ャッシュ5より読み出された命令の実行を制御する命令
実行制御回路である。
FIG. 1 is a block diagram of an embodiment of the present invention. In FIG. 1, 1 is an instruction cache write control circuit, 2 is an instruction cache hit determination circuit associated with data write, 3 is a data cache, 4 is a data address array, 5 is an instruction cache, and 6 is A 2-port instruction address array, 7 is a data cache control circuit,
8 is an instruction cache control circuit, 9 is a data cache hit determination circuit, 10 is an instruction cache hit determination circuit, and 11 is a register for holding data read from the data cache (see FIG. Medium, MBR (Memory
(Buffer Register)), 12
Is a register for holding an address for accessing the data cache (in the figure, D-MA (Data Mem)
and 15 is a register for holding an address for accessing the instruction cache (I-MA (Inst in the figure).
reduction Memory Address Re
13) is a flag for deciding the operation / non-operation of the hit determination circuit 2 of the instruction cache associated with the data write, and 14 is a register (MBW (Memory B in the figure) for holding the write data for the cache).
16 is a register for holding an instruction read from the instruction cache 5 (IR (Instructio in the figure).
n Register)), 17 is an instruction execution control circuit for controlling the execution of the instruction read from the instruction cache 5.

【0014】まず、命令用キャッシュ5のリ−ドの手順
について説明する。命令実行制御回路17は、命令用キ
ャッシュ5に対するリ−ド要求信号104を命令用キャ
ッシュ制御回路8に対して送出すると共に、I−MA1
5に命令用キャッシュ5のアクセスアドレス122をセ
ットする。命令用キャッシュ制御回路8は、I−MA1
5にセットされている命令用キャッシュ5のアクセスア
ドレス122を用いて、命令用アドレスアレイ6を読み
出す。この時、アドレスセレクタ120は、命令キャッ
シュ書込制御回路1が送出するセレクタ制御信号107
により命令用キャッシュのアクセスアドレス122を選
択する。命令用アドレスアレイ6より読み出されたタグ
デ−タは、命令用キャッシュ5のヒット判定回路10に
おいて命令用キャッシュ5のアクセスアドレス122と
比較され、その結果はヒット信号113として命令用キ
ャッシュ制御回路8に伝えられる。ヒット信号113の
情報がヒットであれば、命令用キャッシュ制御回路8は
命令実行制御回路17に対して応答信号105を送出
し、命令実行制御回路17は命令用キャッシュ5から読
み出された命令をIR16にセットする。IR16にセ
ットされた命令は、命令実行制御回路17に伝えられ実
行される。ヒット信号113の情報がヒットでなけれ
ば、命令用キャッシュ制御回路8は2次キャッシュまた
は主記憶装置等に対してアクセス要求を出し(図示せ
ず)、所望のデ−タをバス117と命令用キャッシュ5
とIR16とを経由して受け取った後に、命令実行制御
回路17に対して応答信号105を送出する。
First, the procedure for reading the instruction cache 5 will be described. The instruction execution control circuit 17 sends a read request signal 104 to the instruction cache 5 to the instruction cache control circuit 8 and also the I-MA1.
5, the access address 122 of the instruction cache 5 is set. The instruction cache control circuit 8 uses the I-MA1
The instruction address array 6 is read using the access address 122 of the instruction cache 5 set to 5. At this time, the address selector 120 has the selector control signal 107 sent from the instruction cache write control circuit 1.
Selects the access address 122 of the instruction cache. The tag data read from the instruction address array 6 is compared with the access address 122 of the instruction cache 5 in the hit determination circuit 10 of the instruction cache 5, and the result is a hit signal 113 as the instruction cache control circuit 8 Be transmitted to. If the information of the hit signal 113 is a hit, the instruction cache control circuit 8 sends a response signal 105 to the instruction execution control circuit 17, and the instruction execution control circuit 17 outputs the instruction read from the instruction cache 5. Set to IR16. The instruction set in the IR 16 is transmitted to the instruction execution control circuit 17 and executed. If the information in the hit signal 113 is not a hit, the instruction cache control circuit 8 issues an access request (not shown) to the secondary cache or the main storage device, and outputs desired data to the bus 117 and the instruction. Cache 5
And IR16, the response signal 105 is sent to the instruction execution control circuit 17.

【0015】次に、デ−タ用キャッシュ3のリ−ドの手
順について説明する。命令実行制御回路17は、デ−タ
用キャッシュ3に対するリ−ド要求信号101をデ−タ
用キャッシュ制御回路7に対して送出すると共に、D−
MA12にデ−タ用キャッシュ3のアクセスアドレス1
21をセットする。データ用キャッシュ制御回路7は、
D−MA12にセットされているデ−タ用キャッシュ3
のアクセスアドレス121を用いてデ−タ用アドレスア
レイ4からタグデータを読み出す。デ−タ用アドレスア
レイ4より読み出されたタグデ−タは、デ−タ用キャッ
シュ3のヒット判定回路9においてデ−タ用キャッシュ
3のアクセスアドレス121と比較され、その結果はヒ
ット信号112としてデ−タ用キャッシュ制御回路7に
伝えられる。ヒット信号112の情報がヒットであれ
ば、データ用キャッシュ制御回路7は命令実行制御回路
17に対して応答信号103を送出し、命令実行制御回
路17はそれにより、デ−タ用キャッシュ3からの読み
出されたデータをMBR11にセットする。MBR11
にセットされたデ−タは命令実行制御回路17に伝えら
れ使用される。ヒット信号112の情報がヒットでなけ
れば、キャッシュ制御回路7は、2次キャッシュまたは
主記憶装置等に対してアクセス要求を出し(図示せ
ず)、所望のデ−タをバス117とデータ用キャッシュ
3とMBR11とを経由して受け取った後に、命令実行
制御回路17に対して応答信号103を送出する。
Next, the procedure for reading the data cache 3 will be described. The instruction execution control circuit 17 sends a read request signal 101 to the data cache 3 to the data cache control circuit 7 and, at the same time, D-
Access address 1 of data cache 3 in MA 12
Set 21. The data cache control circuit 7
Data cache 3 set in D-MA12
The tag data is read from the data address array 4 using the access address 121. The tag data read from the data address array 4 is compared with the access address 121 of the data cache 3 in the hit determination circuit 9 of the data cache 3, and the result is a hit signal 112. It is transmitted to the data cache control circuit 7. If the information of the hit signal 112 is a hit, the data cache control circuit 7 sends a response signal 103 to the instruction execution control circuit 17, and the instruction execution control circuit 17 thereby receives the data from the data cache 3. The read data is set in the MBR 11. MBR11
The data set in (1) is transmitted to the instruction execution control circuit 17 and used. If the information of the hit signal 112 is not a hit, the cache control circuit 7 issues an access request (not shown) to the secondary cache or the main storage device, and outputs desired data to the bus 117 and the data cache. 3 and the MBR 11, the response signal 103 is sent to the instruction execution control circuit 17.

【0016】更に、デ−タ用キャッシュ3ヘのライト手
順について説明する。命令実行制御回路17は、デ−タ
用キャッシュ3に対するライト要求信号102をデ−タ
用キャッシュ制御回路7に対して送出すると共に、D−
MA12にデ−タ用キャッシュ3のアクセスアドレス1
21をセットし、MBR11にライトデータをセットす
る。データ用キャッシュ制御回路7は、ライト要求信号
102を受けてD−MA12にセットされているデ−タ
用キャッシュ3のアクセスアドレス121を用いてデ−
タ用アドレスアレイ4を読み出す。デ−タ用アドレスア
レイ4より読み出されたタグデ−タは、デ−タ用アドレ
スアレイ4のヒット判定回路9において、デ−タ用キャ
ッシュ3のアクセスアドレス121と比較され、その比
較結果はヒット信号112としてデ−タ用キャッシュ制
御回路7に伝えられる。ヒット信号112の情報がヒッ
トであれば、デ−タ用キャッシュ3に対してライトイネ
−ブル信号114を送出し、MBW14にセットされて
いるデ−タをライトする。一方、命令キャッシュ側で
は、命令実行制御回路17の送出するデ−タ用キャッシ
ュ3に対するライト要求信号102を命令キャッシュ書
込制御回路1で監視し、ライト要求信号102が出力さ
れると、デ−タ用キャッシュ3のアクセスアドレス12
1により命令用アドレスアレイ6を読み出す。命令用ア
ドレスアレイ6より読み出されたタグデ−タは、命令用
キャッシュのヒット判定回路2においてデ−タ用キャッ
シュのアクセスアドレス121と比較されその結果はヒ
ット信号111により命令キャッシュ書込制御回路1に
伝えられる。命令キャッシュ書込制御回路1では、デ−
タライトに伴う命令キャッシュのヒット判定回路2の動
作/非動作を決めるフラグ13がオン状態に有り、か
つ、ヒット信号111の情報がヒットであれば、命令用
キャッシュ制御回路8に対してライト要求信号106を
送出する。命令用キャッシュ制御回路8では、命令用キ
ャッシュ5に対してライトイネ−ブル信号115を送出
し、MBW14にセットされているデ−タをライトす
る。この時、アドレスセレクタ120では、命令キャッ
シュ書込制御回路1が送出するセレクタ制御信号107
によりデ−タ用キャッシュ3のアクセスアドレス121
を選択出力する。命令キャッシュ書込制御回路1は、デ
−タライトに伴う命令用キャッシュ5のヒット判定回路
2の動作/非動作を決めるフラグ13がオフ状態に有る
か、またはヒット信号111の情報がヒットでなけれ
ば、何もしない。
Further, the procedure for writing to the data cache 3 will be described. The instruction execution control circuit 17 sends a write request signal 102 for the data cache 3 to the data cache control circuit 7, and at the same time D-
Access address 1 of data cache 3 in MA 12
21 is set, and write data is set in the MBR 11. The data cache control circuit 7 receives the write request signal 102 and uses the access address 121 of the data cache 3 set in the D-MA 12 to write data.
The address array 4 for data is read. The tag data read from the data address array 4 is compared with the access address 121 of the data cache 3 in the hit determination circuit 9 of the data address array 4, and the comparison result is a hit. A signal 112 is transmitted to the data cache control circuit 7. If the information of the hit signal 112 is a hit, the write enable signal 114 is sent to the data cache 3 and the data set in the MBW 14 is written. On the other hand, on the instruction cache side, the instruction cache write control circuit 1 monitors the write request signal 102 for the data cache 3 sent from the instruction execution control circuit 17, and when the write request signal 102 is output, the data is written. Access address 12 of data cache 3
1 reads out the instruction address array 6. The tag data read from the instruction address array 6 is compared with the access address 121 of the data cache in the hit determining circuit 2 of the instruction cache, and the result is hit signal 111 to the instruction cache write control circuit 1. Be transmitted to. In the instruction cache write control circuit 1,
If the flag 13 for deciding the operation / non-operation of the instruction cache hit determination circuit 2 associated with the write is on and the information of the hit signal 111 is a hit, a write request signal to the instruction cache control circuit 8 is issued. 106 is sent out. The instruction cache control circuit 8 sends a write enable signal 115 to the instruction cache 5 to write the data set in the MBW 14. At this time, in the address selector 120, the selector control signal 107 sent from the instruction cache write control circuit 1
Access address 121 of data cache 3
Is output selectively. In the instruction cache write control circuit 1, if the flag 13 that determines the operation / non-operation of the hit determination circuit 2 of the instruction cache 5 associated with the data write is in the off state, or if the information of the hit signal 111 does not hit. ,do nothing.

【0017】命令キャッシュ書込制御回路1は、上記デ
−タライトの監視が終了すると、監視終了信号108を
デ−タ用のキャッシュ制御回路7に対して送出し、キャ
ッシュ制御回路7はこれにより命令実行制御回路17に
対して、応答信号103を送出し、ライトアクセスを終
了する。
When the instruction cache write control circuit 1 finishes monitoring the data write, it sends a monitoring end signal 108 to the data cache control circuit 7, and the cache control circuit 7 receives the instruction. The response signal 103 is sent to the execution control circuit 17, and the write access ends.

【0018】また、デ−タライトに伴う命令キャッシュ
のヒット判定回路2の動作/非動作を決めるフラグ13
のセット/リセットは専用命令によりソフトウェアの指
定で行なう。
Further, a flag 13 for deciding the operation / non-operation of the hit decision circuit 2 of the instruction cache associated with the data write.
Is set / reset by software instruction using a dedicated instruction.

【0019】以上により、命令用キャッシュ5に対して
もデ−タをライトすることができ、矛盾なくプログラム
を実行することができる。
As described above, the data can be written to the instruction cache 5 and the program can be executed without contradiction.

【0020】上記実施例によれば、命令用キャッシュメ
モリとデ−タ用キャッシュメモリを独立に持ち、また、
命令の書替えを許しているア−キテクチャのマイクロプ
ロセッサにおいて、命令の書替えが実行された場合に
も、命令用キャッシュメモリ・デ−タ用キャッシュメモ
リの内容を常に一致させ、矛盾なくプログラムを実行す
ることができる。
According to the above embodiment, the instruction cache memory and the data cache memory are independently provided, and
Even if an instruction is rewritten in an architecture microprocessor that allows instruction rewriting, the contents of the instruction cache memory and the data cache memory are always matched to execute the program without contradiction. be able to.

【0021】また、命令用キャッシュメモリとデ−タ用
キャッシュメモリを独立に持ち、また、命令の書替えを
許しているア−キテクチャのマイクロプロセッサであっ
ても、明らかに命令の書替えを行なわないようなプログ
ラムに関しては、フラグ13の働きにより、不必要な命
令用キャッシュメモリの書替えをなくし、効率的にプロ
グラムを実行することができる。
Further, even in the case of an architecture microprocessor which has an instruction cache memory and a data cache memory independently and permits instruction rewriting, it is obvious that the instruction rewriting is not performed. With respect to such a program, the function of the flag 13 can eliminate unnecessary rewriting of the instruction cache memory and can efficiently execute the program.

【0022】[0022]

【発明の効果】本発明によれば、命令用キャッシュメモ
リとデ−タ用キャッシュメモリを独立に持ち、また、命
令の書替えを許しているア−キテクチャのマイクロプロ
セッサにおいて、命令の書替えが実行された場合にも、
命令用キャッシュメモリ・デ−タ用キャッシュメモリの
内容を常に一致させ、矛盾なくプログラムを実行するこ
とができる。
According to the present invention, the instruction rewriting is executed in the microprocessor of the architecture which has the instruction cache memory and the data cache memory independently and permits the instruction rewriting. Even if
The contents of the instruction cache memory and the data cache memory can always be matched so that the program can be executed without contradiction.

【0023】また、本発明によれば、命令用キャッシュ
メモリとデ−タ用キャッシュメモリを独立に持ち、ま
た、命令の書替えを許しているア−キテクチャのマイク
ロプロセッサであっても、明らかに命令の書替えを行な
わないようなプログラムに関しては、不必要な命令用キ
ャッシュメモリの書替えをなくし、効率的にプログラム
を実行することができる。
According to the present invention, the instruction cache memory and the data cache memory are independently provided, and even if the microprocessor has an architecture that allows the rewriting of instructions, the instructions are obviously provided. For a program that is not rewritten, the unnecessary rewriting of the instruction cache memory can be eliminated and the program can be efficiently executed.

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

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

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

1…命令キャッシュ書込制御回路、2…ヒット判定回
路、3…デ−タ用キャッシュ、4…デ−タ用アドレスア
レイ、5…命令用キャッシュ、6…2ポ−トの命令用ア
ドレスアレイ、7…デ−タ用キャッシュ制御回路、8…
命令用キャッシュ制御回路、9…データ用キャッシュの
ヒット判定回路、10…命令用キャッシュのヒット判定
回路、11…デ−タキャッシュより読み出されたデ−タ
を保持するレジスタ(MBR)、12…デ−タ用キャッ
シュをアクセスするためのアドレスを保持するレジスタ
(D−MA)、13…デ−タライトに伴う命令用キャッ
シュのヒット判定回路2の動作/非動作を決めるフラ
グ、14…キャッシュに対するライトデ−タを保持する
レジスタ(MBW)、15…命令用キャッシュをアクセ
スするためのアドレスを保持するレジスタ(I−M
A)、16…命令用キャッシュより読み出された命令保
持するレジスタ(IR)、17…命令用キャッシュより
読み出された命令の実行を制御する命令実行制御回路。
1 ... Instruction cache writing control circuit, 2 ... Hit determination circuit, 3 ... Data cache, 4 ... Data address array, 5 ... Instruction cache, 6 ... 2-port instruction address array, 7 ... Cache control circuit for data, 8 ...
Instruction cache control circuit, 9 ... Data cache hit determination circuit, 10 ... Instruction cache hit determination circuit, 11 ... Register (MBR) for holding data read from the data cache, 12 ... A register (D-MA) for holding an address for accessing the data cache, 13 ... A flag for determining the operation / non-operation of the instruction cache hit determination circuit 2 associated with the data write, 14 ... A write data for the cache -A register holding the data (MBW), 15 ... A register holding the address for accessing the instruction cache (IM
A), 16 ... A register (IR) for holding the instruction read from the instruction cache, 17 ... An instruction execution control circuit for controlling the execution of the instruction read from the instruction cache.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 村嶋 寛志 愛知県尾張旭市晴丘町池上1番地 株式会 社日立製作所オフィスシステム事業部内 (72)発明者 秋山 俊郎 愛知県名古屋市中区栄三丁目10番22号 日 立中部ソフトウェア 株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Hiroshi Murashima 1 Ikegami, Haruoka-cho, Owariasahi-shi, Aichi Hitachi Ltd. Office Systems Division (72) Inventor Toshiro Akiyama 10-22 Sakae, Naka-ku, Nagoya-shi, Aichi No.Nitori Chubu Software Co., Ltd.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 命令用キャッシュメモリとデ−タ用キャ
ッシュメモリを独立に持つマイクロプロセッサにおい
て、 上記デ−タ用キャッシュメモリへのライトアクセスが生
じたとき、上記命令用キャッシュメモリに、上記デ−タ
用キャッシュメモリへのライトアクセスアドレスに対応
するエントリが存在するか否かを判定する判定回路と、 上記判定回路が、上記エントリは存在すると判定したと
き、上記デ−タ用キャッシュメモリへのライトデ−タを
上記命令用キャッシュメモリの対応するエントリに書き
込む為の書込制御回路と、 上記判定回路を動作させるか否かを示すフラグとを設け
たことを特徴とするマイクロプロセッサ。
1. A microprocessor having an instruction cache memory and a data cache memory independently, wherein when a write access to the data cache memory occurs, the instruction cache memory is written to the data cache memory. A judgment circuit for judging whether or not there is an entry corresponding to the write access address to the data cache memory, and when the judgment circuit judges that the entry exists, the write data to the data cache memory is written. A microprocessor provided with a write control circuit for writing the data into a corresponding entry of the instruction cache memory, and a flag indicating whether or not to operate the determination circuit.
JP6151005A 1994-07-01 1994-07-01 Microprocessor Pending JPH0816390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6151005A JPH0816390A (en) 1994-07-01 1994-07-01 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6151005A JPH0816390A (en) 1994-07-01 1994-07-01 Microprocessor

Publications (1)

Publication Number Publication Date
JPH0816390A true JPH0816390A (en) 1996-01-19

Family

ID=15509214

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6151005A Pending JPH0816390A (en) 1994-07-01 1994-07-01 Microprocessor

Country Status (1)

Country Link
JP (1) JPH0816390A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6718426B2 (en) * 2000-07-19 2004-04-06 Hitachi, Ltd. Cache memory apparatus and central processor, hand-held device and arithmetic processor using the same
US7035979B2 (en) 2002-05-22 2006-04-25 International Business Machines Corporation Method and apparatus for optimizing cache hit ratio in non L1 caches
US7073030B2 (en) 2002-05-22 2006-07-04 International Business Machines Corporation Method and apparatus providing non level one information caching using prefetch to increase a hit ratio
JP2006318471A (en) * 2005-05-09 2006-11-24 Sony Computer Entertainment Europe Ltd Memory caching in data processing

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6718426B2 (en) * 2000-07-19 2004-04-06 Hitachi, Ltd. Cache memory apparatus and central processor, hand-held device and arithmetic processor using the same
US7035979B2 (en) 2002-05-22 2006-04-25 International Business Machines Corporation Method and apparatus for optimizing cache hit ratio in non L1 caches
US7073030B2 (en) 2002-05-22 2006-07-04 International Business Machines Corporation Method and apparatus providing non level one information caching using prefetch to increase a hit ratio
JP2006318471A (en) * 2005-05-09 2006-11-24 Sony Computer Entertainment Europe Ltd Memory caching in data processing
JP4666511B2 (en) * 2005-05-09 2011-04-06 ソニー コンピュータ エンタテインメント ヨーロッパ リミテッド Memory caching in data processing

Similar Documents

Publication Publication Date Title
US5822755A (en) Dual usage memory selectively behaving as a victim cache for L1 cache or as a tag array for L2 cache
KR100327854B1 (en) Cache Memory System
EP0777183B1 (en) Computer cache system
US5148526A (en) Data processing system with an enhanced cache memory control
JP3227707B2 (en) Cache memory control method for each driving mode
KR100758185B1 (en) Data processing device
JPH0748190B2 (en) Microprocessor with cache memory
US6049852A (en) Preserving cache consistency in a computer system having a plurality of memories with overlapping address ranges
JPH0816390A (en) Microprocessor
JPH0784879A (en) Cache memory device
JP3039391B2 (en) Memory system
JP2927160B2 (en) Register device
JP3799451B2 (en) Electronic computer system
JP2637934B2 (en) Cache control unit
JP2923273B2 (en) Data processing system
JPH0512120A (en) Data cache control system
JPH05265916A (en) Data processor
JPH0447350A (en) Main storage read/response control
JPH07191910A (en) Cache memory control method
JP2791319B2 (en) Data processing device
JPS62145342A (en) Cache memory system
JPH0498339A (en) Buffer invalidation control system
JPH0498352A (en) Buffer invalidation control system
JPH0384642A (en) Cache memory control system
JPH0612324A (en) Cache memory device